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 ⌀ |
|---|---|---|---|---|
django__channels-49 | nginx websocket proxy
Hi,
I'm currently playing with django channels and it looks really great. I have tried several other websocket stuff in the last weeks, like crossbar (http://crossbar.io) and something I have build with tornado.
I have added following snippet to my nginx configuration:
```
location /ws/ {
... | [
{
"content": "import time\n\nfrom autobahn.twisted.websocket import (\n WebSocketServerFactory, WebSocketServerProtocol,\n)\nfrom twisted.internet import reactor\n\nfrom .websocket_autobahn import get_factory, get_protocol\n\n\nclass WebsocketTwistedInterface(object):\n \"\"\"\n Easy API to run a WebSo... | [
{
"content": "import time\n\nfrom autobahn.twisted.websocket import (\n WebSocketServerFactory, WebSocketServerProtocol,\n)\nfrom twisted.internet import reactor\n\nfrom .websocket_autobahn import get_factory, get_protocol\n\n\nclass WebsocketTwistedInterface(object):\n \"\"\"\n Easy API to run a WebSo... | diff --git a/channels/interfaces/websocket_twisted.py b/channels/interfaces/websocket_twisted.py
index f8a4c4b46..1a924acd9 100644
--- a/channels/interfaces/websocket_twisted.py
+++ b/channels/interfaces/websocket_twisted.py
@@ -20,7 +20,7 @@ def __init__(self, channel_backend, port=9000):
self.port = port
... |
pre-commit__pre-commit-287 | Make pre-commit consider a hook as "failed" if it modifies files and still (incorrectly?) exits 0
This would allow us to ditch autopep8-wrapper and support a bunch of hooks which refused to be scriptable (yapf, etc.)
| [
{
"content": "from __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport logging\nimport os\nimport sys\n\nfrom pre_commit import color\nfrom pre_commit import git\nfrom pre_commit.logging_handler import LoggingHandler\nfrom pre_commit.output import get_hook_message\nfrom pre_commi... | [
{
"content": "from __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport logging\nimport os\nimport sys\n\nfrom pre_commit import color\nfrom pre_commit import git\nfrom pre_commit.logging_handler import LoggingHandler\nfrom pre_commit.output import get_hook_message\nfrom pre_commi... | diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py
index 95a9f90b3..2004e6f3f 100644
--- a/pre_commit/commands/run.py
+++ b/pre_commit/commands/run.py
@@ -85,7 +85,13 @@ def _run_single_hook(hook, repo, args, write, skips=frozenset()):
write(get_hook_message(_hook_msg_start(hook, args.verbose), e... |
Lightning-AI__pytorch-lightning-2969 | ddp_backend in 0.9.0rc12 fails if no CUDA_VISIBLE_DEVICES found
## 🐛 Bug
In ddp_backend, training immediately fails if the environment variable CUDA_VISIBLE_DEVICES isn't set. This line should handle the None case gracefully: https://github.com/PyTorchLightning/pytorch-lightning/blob/master/pytorch_lightning/accelera... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | diff --git a/docs/source/debugging.rst b/docs/source/debugging.rst
index 56c96607bcc4b..19c75acae16e1 100644
--- a/docs/source/debugging.rst
+++ b/docs/source/debugging.rst
@@ -1,8 +1,8 @@
.. testsetup:: *
from pytorch_lightning.trainer.trainer import Trainer
-
- .. _debugging:
+
+.. _debugging:
Debuggin... |
streamlink__streamlink-3619 | Unable to use --player-fifo with MPV
Streamlink 2.0.0
mpv 0.33.0-76-g93066ff12f Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
```
streamlink --player-fifo https://www.twitch.tv/channelName best
[cli][info] Found matching plugin twitch for URL https://www.twitch.tv/channelName
[cli][info] Available streams... | [
{
"content": "import logging\nimport os\nimport re\nimport shlex\nimport subprocess\nimport sys\nfrom time import sleep\n\nfrom streamlink_cli.compat import is_win32, stdout\nfrom streamlink_cli.constants import PLAYER_ARGS_INPUT_DEFAULT, PLAYER_ARGS_INPUT_FALLBACK, SUPPORTED_PLAYERS\nfrom streamlink_cli.utils ... | [
{
"content": "import logging\nimport os\nimport re\nimport shlex\nimport subprocess\nimport sys\nfrom time import sleep\n\nfrom streamlink_cli.compat import is_win32, stdout\nfrom streamlink_cli.constants import PLAYER_ARGS_INPUT_DEFAULT, PLAYER_ARGS_INPUT_FALLBACK, SUPPORTED_PLAYERS\nfrom streamlink_cli.utils ... | diff --git a/src/streamlink_cli/output.py b/src/streamlink_cli/output.py
index 24499d59820..f684625e0e8 100644
--- a/src/streamlink_cli/output.py
+++ b/src/streamlink_cli/output.py
@@ -180,6 +180,11 @@ def _mpv_title_escape(cls, title_string):
def _create_arguments(self):
if self.namedpipe:
f... |
ipython__ipython-6586 | notebook.start_kernel is undefined
Hi, in notificationarea.js, when we need to restart a kernel we call `notebook.start_kernel` which doesn't exist. Not sure how you guys were planning to handle this, but I took a stab at it.
thanks!
| [
{
"content": "\"\"\"Tornado handlers for the sessions web service.\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport json\n\nfrom tornado import web\n\nfrom ...base.handlers import IPythonHandler, json_errors\nfrom IPython.utils.jsonutil imp... | [
{
"content": "\"\"\"Tornado handlers for the sessions web service.\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport json\n\nfrom tornado import web\n\nfrom ...base.handlers import IPythonHandler, json_errors\nfrom IPython.utils.jsonutil imp... | diff --git a/IPython/html/services/sessions/handlers.py b/IPython/html/services/sessions/handlers.py
index addfd887a16..d88aa9656a1 100644
--- a/IPython/html/services/sessions/handlers.py
+++ b/IPython/html/services/sessions/handlers.py
@@ -106,7 +106,11 @@ def patch(self, session_id):
def delete(self, session_id)... |
ivy-llc__ivy-21291 | cholesky_solve
| [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle import promote_types_of_paddle_inputs\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@with_supported_dtypes(\n ... | [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle import promote_types_of_paddle_inputs\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@with_supported_dtypes(\n ... | diff --git a/ivy/functional/frontends/paddle/tensor/linalg.py b/ivy/functional/frontends/paddle/tensor/linalg.py
index 82fbcefb51ac8..126961573e701 100644
--- a/ivy/functional/frontends/paddle/tensor/linalg.py
+++ b/ivy/functional/frontends/paddle/tensor/linalg.py
@@ -122,6 +122,16 @@ def solve(x1, x2, name=None):
... |
PlasmaPy__PlasmaPy-2590 | Update testing guide to reflect that repeat runs of tox are only a few seconds slower than pytest
The testing guide currently states that running tests with tox is slower because it needs to recreate an environment. More recent versions of tox are doing a better job at caching environments, so I'm finding now that runn... | [
{
"content": "\"\"\"\nGlobal substitutions that can be used throughout PlasmaPy's\nreStructuredText documentation, using the sphinxcontrib-globalsubs\nextension to Sphinx.\n\nThe substitutions are defined in ``global_substitutions``, which is then\nimported in :file:`docs/conf.py` so that sphinxcontrib-globalsu... | [
{
"content": "\"\"\"\nGlobal substitutions that can be used throughout PlasmaPy's\nreStructuredText documentation, using the sphinxcontrib-globalsubs\nextension to Sphinx.\n\nThe substitutions are defined in ``global_substitutions``, which is then\nimported in :file:`docs/conf.py` so that sphinxcontrib-globalsu... | diff --git a/changelog/2590.doc.rst b/changelog/2590.doc.rst
new file mode 100644
index 0000000000..79c514650d
--- /dev/null
+++ b/changelog/2590.doc.rst
@@ -0,0 +1,3 @@
+Updated the |testing guide| to reflect recent performance improvements with |tox|
+via the ``tox-uv`` extension, and the |documentation guide| to ref... |
flask-admin__flask-admin-1008 | Issue with empty List of ReferenceField since 1.2.0
Hello,
There is an issue (or is it a feature ?) with MongoEngine's ListField of ReferenceField. I cannot save my object in Flask-Admin (be it a new or edited object) when an attribute of ListField(ReferenceField()) type is empty. The save returns to the same page say... | [
{
"content": "from mongoengine import ReferenceField, ListField\nfrom mongoengine.base import BaseDocument, DocumentMetaclass, get_document\n\nfrom wtforms import fields, validators\nfrom flask_mongoengine.wtf import orm, fields as mongo_fields\n\nfrom flask_admin import form\nfrom flask_admin.model.form import... | [
{
"content": "from mongoengine import ReferenceField, ListField\nfrom mongoengine.base import BaseDocument, DocumentMetaclass, get_document\n\nfrom wtforms import fields, validators\nfrom flask_mongoengine.wtf import orm, fields as mongo_fields\n\nfrom flask_admin import form\nfrom flask_admin.model.form import... | diff --git a/flask_admin/contrib/mongoengine/form.py b/flask_admin/contrib/mongoengine/form.py
index e7beb74be..3fa250d10 100644
--- a/flask_admin/contrib/mongoengine/form.py
+++ b/flask_admin/contrib/mongoengine/form.py
@@ -114,7 +114,7 @@ def conv_List(self, model, field, kwargs):
return AjaxSelectMu... |
zestedesavoir__zds-site-4906 | Le ping est KO sur les réponses à un tuto/billet/article
https://sentry.sandhose.fr/zeste-de-savoir/beta-backend/issues/1523/
| [
{
"content": "from django.contrib.auth.models import User\nfrom django.contrib.contenttypes.models import ContentType\nimport logging\n\nfrom django.db import DatabaseError\n\nfrom zds.tutorialv2.signals import content_unpublished\n\nfrom zds.utils.models import Tag\n\ntry:\n from functools import wraps\nexc... | [
{
"content": "from django.contrib.auth.models import User\nfrom django.contrib.contenttypes.models import ContentType\nimport logging\n\nfrom django.db import DatabaseError\n\nfrom zds.tutorialv2.signals import content_unpublished\n\nfrom zds.utils.models import Tag\n\ntry:\n from functools import wraps\nexc... | diff --git a/zds/notification/receivers.py b/zds/notification/receivers.py
index 3b1b8716a2..9b117bbf4f 100644
--- a/zds/notification/receivers.py
+++ b/zds/notification/receivers.py
@@ -346,7 +346,7 @@ def answer_comment_event(sender, *, instance, user, **__):
assert comment is not None
assert user is not ... |
nerfstudio-project__nerfstudio-1766 | Blank viewer
When I run nerfstudio on linux and open the viewer, I don't see the input image, just a blank coordinate system,please tell me why.
I can see training progress in the terminal。
| [
{
"content": "# Copyright 2022 The Nerfstudio Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\... | [
{
"content": "# Copyright 2022 The Nerfstudio Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\... | diff --git a/nerfstudio/viewer/server/viewer_state.py b/nerfstudio/viewer/server/viewer_state.py
index 22e0bd021c..601f1a7c4c 100644
--- a/nerfstudio/viewer/server/viewer_state.py
+++ b/nerfstudio/viewer/server/viewer_state.py
@@ -125,7 +125,7 @@ def __init__(
self.camera_message = None
- self.viser... |
ansible__ansible-modules-extras-2875 | ZFS module incorrectly reports change to sharesmb property
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
ZFS module
##### ANSIBLE VERSION
```
ansible 2.1.1.0
config file =
configured module search path = Default w/o overrides
```
##### CONFIGURATION
Default
##### OS / ENVIRONMENT
Running Ansible on and man... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2013, Johan Wiren <johan.wiren.se@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Fou... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2013, Johan Wiren <johan.wiren.se@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Fou... | diff --git a/system/zfs.py b/system/zfs.py
index fb987017d13..0d79569d77a 100644
--- a/system/zfs.py
+++ b/system/zfs.py
@@ -198,8 +198,9 @@ def get_current_properties(self):
if source == 'local':
properties[prop] = value
# Add alias for enhanced sharing properties
- proper... |
paperless-ngx__paperless-ngx-2494 | [BUG] Rollback doesn't work as described in the documentation
### Description
Rollback doesn't work properly as described in the documentation.
### Steps to reproduce
1. Go to 'https://docs.paperless-ngx.com/setup/#moving-back-to-paperless'
2. Open a terminal from the container and execute the command like mentione... | [
{
"content": "# Generated by Django 4.0.4 on 2022-05-23 07:14\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n (\"documents\", \"1021_webp_thumbnail_conversion\"),\n ]\n\n operations = [\n migr... | [
{
"content": "# Generated by Django 4.0.4 on 2022-05-23 07:14\n\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n (\"documents\", \"1021_webp_thumbnail_conversion\"),\n ]\n\n operations = [\n migr... | diff --git a/src/documents/migrations/1022_paperlesstask.py b/src/documents/migrations/1022_paperlesstask.py
index b89e9bbac9f..5f1293a1eec 100644
--- a/src/documents/migrations/1022_paperlesstask.py
+++ b/src/documents/migrations/1022_paperlesstask.py
@@ -24,7 +24,7 @@ class Migration(migrations.Migration):
... |
bridgecrewio__checkov-5222 | CKV_GIT_4 always fail with terraform_plan
**Describe the issue**
Once a GitHub org/repo secret is created and stored in the terraform state, the check CKV_GIT_4 will always fail when scanning terraform plans even if the value was created using an encrypted value.
It seems like the check consider `"plaintext_text": ... | [
{
"content": "from typing import List, Any, Dict\n\nfrom checkov.common.models.enums import CheckCategories, CheckResult\nfrom checkov.terraform.checks.resource.base_resource_negative_value_check import BaseResourceNegativeValueCheck\nfrom checkov.common.models.consts import ANY_VALUE\n\n\nclass SecretsEncrypte... | [
{
"content": "from typing import List, Any, Dict\n\nfrom checkov.common.models.enums import CheckCategories, CheckResult\nfrom checkov.terraform.checks.resource.base_resource_negative_value_check import BaseResourceNegativeValueCheck\nfrom checkov.common.models.consts import ANY_VALUE\n\n\nclass SecretsEncrypte... | diff --git a/checkov/terraform/checks/resource/github/SecretsEncrypted.py b/checkov/terraform/checks/resource/github/SecretsEncrypted.py
index 30c6c1fbbf..9e80bb3369 100644
--- a/checkov/terraform/checks/resource/github/SecretsEncrypted.py
+++ b/checkov/terraform/checks/resource/github/SecretsEncrypted.py
@@ -25,6 +25,... |
bokeh__bokeh-5709 | Fix a typo in LayoutDOM
`bokeh` `0.12.4`
https://github.com/bokeh/bokeh/blob/master/bokeh/models/layouts.py#L64
reads
```
``"scale_both"`` elements will responsively resize to fir both the width and height available,
```
Expected:
```
``"scale_both"`` elements will responsively resize to for both the width a... | [
{
"content": "\"\"\" Various kinds of layout components.\n\n\"\"\"\nfrom __future__ import absolute_import\n\nimport logging\nlogger = logging.getLogger(__name__)\n\nfrom ..core import validation\n\nfrom ..core.validation.warnings import (\n EMPTY_LAYOUT,\n BOTH_CHILD_AND_ROOT,\n)\nfrom ..core.enums impor... | [
{
"content": "\"\"\" Various kinds of layout components.\n\n\"\"\"\nfrom __future__ import absolute_import\n\nimport warnings\nimport logging\nlogger = logging.getLogger(__name__)\n\nfrom ..core import validation\n\nfrom ..core.validation.warnings import (\n EMPTY_LAYOUT,\n BOTH_CHILD_AND_ROOT,\n)\nfrom .... | diff --git a/bokeh/models/layouts.py b/bokeh/models/layouts.py
index f75d98c5287..00d85903c8c 100644
--- a/bokeh/models/layouts.py
+++ b/bokeh/models/layouts.py
@@ -61,7 +61,7 @@ class LayoutDOM(Model):
``plot_width/plot_height`` is maintained. A plot with ``"scale_height"`` mode needs
to be wrapped in a ``Ro... |
marshmallow-code__webargs-471 | Importing ABC directly from collections module was removed in Python 3.9
Since the project is Python 3 only importing from collections.abc will resolve the issue. I will raise a PR.
https://github.com/marshmallow-code/webargs/blob/1b34470908cb54862b7aeb578f794ac3285cdf38/src/webargs/pyramidparser.py#L141
| [
{
"content": "\"\"\"Pyramid request argument parsing.\n\nExample usage: ::\n\n from wsgiref.simple_server import make_server\n from pyramid.config import Configurator\n from pyramid.response import Response\n from marshmallow import fields\n from webargs.pyramidparser import use_args\n\n hello... | [
{
"content": "\"\"\"Pyramid request argument parsing.\n\nExample usage: ::\n\n from wsgiref.simple_server import make_server\n from pyramid.config import Configurator\n from pyramid.response import Response\n from marshmallow import fields\n from webargs.pyramidparser import use_args\n\n hello... | diff --git a/src/webargs/pyramidparser.py b/src/webargs/pyramidparser.py
index 55fa6e04..ba8ede85 100644
--- a/src/webargs/pyramidparser.py
+++ b/src/webargs/pyramidparser.py
@@ -138,7 +138,7 @@ def use_args(
location = location or self.location
# Optimization: If argmap is passed as a dictionary, we ... |
django-helpdesk__django-helpdesk-1165 | Failed to install demo using both 'make rundemo' and docker variants
**Describe the bug**
Once make command had done its job it throws the exception `ModuleNotFoundError` see screenshort
**To Reproduce**
Steps to reproduce the behavior:
1. Download help-desk-package from github
2. Extract the data into folder ... | [
{
"content": "\"\"\"\nDjango settings for django-helpdesk demodesk project.\n\n\"\"\"\n\nimport os\n\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n\n# Quick-start development settings - unsuitable for product... | [
{
"content": "\"\"\"\nDjango settings for django-helpdesk demodesk project.\n\n\"\"\"\n\nimport os\n\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n\n# Quick-start development settings - unsuitable for product... | diff --git a/.gitignore b/.gitignore
index 5ff0d848f..35a1f114f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,7 @@ docs/doctrees/*
*.swp
.idea
.tox/**
+.venv
# ignore demo attachments that user might have added
helpdesk/attachments/
@@ -25,4 +26,3 @@ demo/demodesk/media/helpdesk/attachments/DH-3/3/*
dem... |
PaddlePaddle__models-2456 | There is a small error in face_detection reader
https://github.com/PaddlePaddle/models/blob/55138a40a219975bcbbeb6c1edef5284de721f72/PaddleCV/face_detection/reader.py#L312
the code should be
```
img = img.convert('RGB')
```
| [
{
"content": "# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0... | [
{
"content": "# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0... | diff --git a/PaddleCV/face_detection/reader.py b/PaddleCV/face_detection/reader.py
index 4839ba5c53..6fdd2848b2 100644
--- a/PaddleCV/face_detection/reader.py
+++ b/PaddleCV/face_detection/reader.py
@@ -309,7 +309,7 @@ def infer(settings, image_path):
def batch_reader():
img = Image.open(image_path)
... |
huggingface__optimum-630 | torch_ones in fx.optimisation.FuseBiasInLinear creates tensor/proxy in cpu
### System Info
```shell
Colab Environment:
- `optimum` version : 1.5.2
- `transformers` version: 4.25.1
- Platform: Linux-5.10.133+-x86_64-with-glibc2.27
- Python version: 3.8.16
- Huggingface_hub version: 0.11.1
- PyTorch version (... | [
{
"content": "# coding=utf-8\n# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/license... | [
{
"content": "# coding=utf-8\n# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/license... | diff --git a/optimum/fx/optimization/transformations.py b/optimum/fx/optimization/transformations.py
index 7c0656b828..b9fb718406 100644
--- a/optimum/fx/optimization/transformations.py
+++ b/optimum/fx/optimization/transformations.py
@@ -406,7 +406,7 @@ def transform(self, graph_module: "GraphModule") -> "GraphModule"... |
pymedusa__Medusa-10669 | WARNING badge repeatedly lit up on SHOWQUEUE-UPDATE spurious IMDbPie "error"
Seems like this could be log.info() instead of log.warning(). On every nightly show update, the following appears in the log; because it is a WARNING the tools pulldown badge is always lit with warnings every morning. This makes the badge l... | [
{
"content": "# coding=utf-8\n\"\"\"Imdb indexer api module.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport locale\nimport logging\nfrom collections import OrderedDict, namedtuple\nfrom datetime import datetime\nfrom itertools import chain\nfrom time import time\n\nfrom imdbpie import imdbpie\n\nfro... | [
{
"content": "# coding=utf-8\n\"\"\"Imdb indexer api module.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport locale\nimport logging\nfrom collections import OrderedDict, namedtuple\nfrom datetime import datetime\nfrom itertools import chain\nfrom time import time\n\nfrom imdbpie import imdbpie\n\nfro... | diff --git a/medusa/indexers/imdb/api.py b/medusa/indexers/imdb/api.py
index 5b56c71319..7bf7e57d20 100644
--- a/medusa/indexers/imdb/api.py
+++ b/medusa/indexers/imdb/api.py
@@ -64,6 +64,10 @@ def imdb_id(self):
@imdb_id.setter
def imdb_id(self, value):
"""Set imdb id."""
+ if value is None o... |
keras-team__keras-7869 | DirectoryIterator should have a sorted filenames when shuffle=False
I am trying to perform images segmentation.
In one directorty I have a list of files :
- Image1.tif
- Image2.tif
- Image3.tif
And in an other directory the masks :
- Mask1.tif
- Mask2.tif
- Mask3.tif
If I say to flow_from_directory wit... | [
{
"content": "\"\"\"Fairly basic set of tools for real-time data augmentation on image data.\nCan easily be extended to include new transformations,\nnew preprocessing methods, etc...\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nimport numpy as np\nimport re\nfrom sc... | [
{
"content": "\"\"\"Fairly basic set of tools for real-time data augmentation on image data.\nCan easily be extended to include new transformations,\nnew preprocessing methods, etc...\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nimport numpy as np\nimport re\nfrom sc... | diff --git a/keras/preprocessing/image.py b/keras/preprocessing/image.py
index 0dd78e77039d..3efed7f8b017 100644
--- a/keras/preprocessing/image.py
+++ b/keras/preprocessing/image.py
@@ -910,7 +910,7 @@ def _recursive_list(subpath):
subdir = os.path.basename(directory)
basedir = os.path.dirname(directory)
... |
svthalia__concrexit-3129 | Add nice validation for event slug uniqueness
### Describe the bug
https://thalia.sentry.io/issues/4199123754/?project=1463433&query=is%3Aunresolved&referrer=issue-stream&stream_index=1
When saving an event with duplicate slug, you get a 500. The admin should have pretty validation for this.
### How to reproduce... | [
{
"content": "import uuid\n\nfrom django.conf import settings\nfrom django.core import validators\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.db import models, router\nfrom django.db.models import Count, Q\nfrom django.db.models.deletion import Collector\nfrom django.url... | [
{
"content": "import uuid\n\nfrom django.conf import settings\nfrom django.core import validators\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.db import models, router\nfrom django.db.models import Count, Q\nfrom django.db.models.deletion import Collector\nfrom django.url... | diff --git a/website/events/models/event.py b/website/events/models/event.py
index 269185d12..799b3319d 100644
--- a/website/events/models/event.py
+++ b/website/events/models/event.py
@@ -349,6 +349,8 @@ def clean(self):
# pylint: disable=too-many-branches
super().clean()
errors = {}
+ ... |
mkdocs__mkdocs-397 | NoneType object is not callable
I'm not sure if this is my own stupidity, related to #283, or something I've ended up doing myself by accident.
I'm working on developing a mkdocs theme, and `mkdocs build` and `mkdocs build --clean` both run without any issues.
However, if I try and `mkdocs serve` then I get hit by an... | [
{
"content": "# coding: utf-8\nfrom __future__ import print_function\n\nfrom watchdog import events\nfrom watchdog.observers.polling import PollingObserver\nfrom mkdocs.build import build\nfrom mkdocs.compat import httpserver, socketserver, urlunquote\nfrom mkdocs.config import load_config\nimport os\nimport po... | [
{
"content": "# coding: utf-8\nfrom __future__ import print_function\n\nfrom watchdog import events\nfrom watchdog.observers.polling import PollingObserver\nfrom mkdocs.build import build\nfrom mkdocs.compat import httpserver, socketserver, urlunquote\nfrom mkdocs.config import load_config\nimport os\nimport po... | diff --git a/mkdocs/serve.py b/mkdocs/serve.py
index 6220aa2522..911e9b5314 100644
--- a/mkdocs/serve.py
+++ b/mkdocs/serve.py
@@ -94,6 +94,8 @@ def serve(config, options=None):
observer = PollingObserver()
observer.schedule(event_handler, config['docs_dir'], recursive=True)
for theme_dir in config['them... |
pypa__setuptools-3306 | [BUG] PEP 631 TOMLs can conflict with deprecated configuration files
### setuptools version
setuptools==62.1.0
### Python version
Python 3.10.4
### OS
Arch Linux
### Additional environment information
_No response_
### Description
A package with PEP 621/631 compliant `pyproject.toml` and the ... | [
{
"content": "\"\"\"Translation layer between pyproject config and setuptools distribution and\nmetadata objects.\n\nThe distribution and metadata objects are modeled after (an old version of)\ncore metadata, therefore configs in the format specified for ``pyproject.toml``\nneed to be processed before being app... | [
{
"content": "\"\"\"Translation layer between pyproject config and setuptools distribution and\nmetadata objects.\n\nThe distribution and metadata objects are modeled after (an old version of)\ncore metadata, therefore configs in the format specified for ``pyproject.toml``\nneed to be processed before being app... | diff --git a/changelog.d/3206.change.rst b/changelog.d/3206.change.rst
new file mode 100644
index 0000000000..f4d8683942
--- /dev/null
+++ b/changelog.d/3206.change.rst
@@ -0,0 +1,4 @@
+Fixed behaviour when both ``install_requires`` (in ``setup.py``) and
+``dependencies`` (in ``pyproject.toml``) are specified.
+The con... |
ckan__ckan-260 | Recline does not preview datastore anymore
The new plugin does not evaluate `datastore_active`.
<!---
@huboard:{"order":247.0}
-->
Recline does not preview datastore anymore
The new plugin does not evaluate `datastore_active`.
<!---
@huboard:{"order":247.0}
-->
| [
{
"content": "from logging import getLogger\n\nimport ckan.plugins as p\nimport ckan.plugins.toolkit as toolkit\n\nlog = getLogger(__name__)\n\n\nclass ReclinePreview(p.SingletonPlugin):\n \"\"\"This extension previews resources using recline\n\n This extension implements two interfaces\n\n - ``IConf... | [
{
"content": "from logging import getLogger\n\nimport ckan.plugins as p\nimport ckan.plugins.toolkit as toolkit\n\nlog = getLogger(__name__)\n\n\nclass ReclinePreview(p.SingletonPlugin):\n \"\"\"This extension previews resources using recline\n\n This extension implements two interfaces\n\n - ``IConf... | diff --git a/ckanext/reclinepreview/plugin.py b/ckanext/reclinepreview/plugin.py
index cde0dc01bb1..826227b1d16 100644
--- a/ckanext/reclinepreview/plugin.py
+++ b/ckanext/reclinepreview/plugin.py
@@ -26,6 +26,9 @@ def update_config(self, config):
toolkit.add_resource('theme/public', 'ckanext-reclinepreview')
... |
sktime__sktime-735 | SettingWithCopyWarning in Prophet with exogenous data
**Describe the bug**
Running `Prophet` with `X` different from `None` throws the following warning
```python
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
X["ds"] = ... | [
{
"content": "#!/usr/bin/env python3 -u\n# -*- coding: utf-8 -*-\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\n__author__ = [\"Markus Löning\", \"Martin Walter\"]\n__all__ = [\"_ProphetAdapter\"]\n\nimport os\n\nimport pandas as pd\n\nfrom sktime.forecasting.base._base import DEFAU... | [
{
"content": "#!/usr/bin/env python3 -u\n# -*- coding: utf-8 -*-\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\n__author__ = [\"Markus Löning\", \"Martin Walter\"]\n__all__ = [\"_ProphetAdapter\"]\n\nimport os\n\nimport pandas as pd\n\nfrom sktime.forecasting.base._base import DEFAU... | diff --git a/sktime/forecasting/base/adapters/_fbprophet.py b/sktime/forecasting/base/adapters/_fbprophet.py
index a9c332af280..ee47981bf29 100644
--- a/sktime/forecasting/base/adapters/_fbprophet.py
+++ b/sktime/forecasting/base/adapters/_fbprophet.py
@@ -187,7 +187,7 @@ def _merge_X(df, X):
X.columns = X.columns... |
pantsbuild__pants-16936 | Nondeterministic `ImportError: No module named __pants_df_parser` while computing changed targets
(NOTE: There's been a lot of discussion on this in Slack [here](https://pantsbuild.slack.com/archives/C046T6T9U/p1658412143380059), but I realized I never filed an issue for it)
**Describe the bug**
A few times per d... | [
{
"content": "# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport dataclasses\nimport json\nimport logging\nimport os\nimport shlex\nfrom dataclasses import dataclass\nfrom pathlib imp... | [
{
"content": "# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport dataclasses\nimport json\nimport logging\nimport os\nimport shlex\nfrom dataclasses import dataclass\nfrom pathlib imp... | diff --git a/src/python/pants/backend/python/util_rules/pex.py b/src/python/pants/backend/python/util_rules/pex.py
index 901a413f5c2..c13b0e029a5 100644
--- a/src/python/pants/backend/python/util_rules/pex.py
+++ b/src/python/pants/backend/python/util_rules/pex.py
@@ -696,8 +696,7 @@ def _create_venv_script(
... |
kubeflow__pipelines-5120 | Invalid pipeline is generated if its name contains non-ascii chars only
### What steps did you take:
[A clear and concise description of what the bug is.]
Suppose there is a pipeline with non-ascii name:
```py
# sample.py
from kfp import dsl
@dsl.pipeline(name="サンプル")
def sample():
...
```
Then comp... | [
{
"content": "# Copyright 2018-2019 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 app... | [
{
"content": "# Copyright 2018-2019 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 app... | diff --git a/sdk/python/kfp/compiler/compiler.py b/sdk/python/kfp/compiler/compiler.py
index 382c08290a9..70eed90308d 100644
--- a/sdk/python/kfp/compiler/compiler.py
+++ b/sdk/python/kfp/compiler/compiler.py
@@ -689,7 +689,8 @@ def _create_pipeline_workflow(self, parameter_defaults, pipeline, op_transformer
e... |
learningequality__kolibri-3406 | Showing 120% score in exam report
### Observed behavior
After submitting exam, when coach user watching progress of each user in exam report. Coach user see 120% score in exam report. We have attached screenshot and database file,so you can easily re-generate this issue.
### Expected behavior
Score must be between... | [
{
"content": "from django.db.models import Sum\nfrom django.utils.timezone import now\nfrom kolibri.auth.models import FacilityUser\nfrom kolibri.core.serializers import KolibriModelSerializer\nfrom kolibri.logger.models import AttemptLog, ContentSessionLog, ContentSummaryLog, ExamAttemptLog, ExamLog, MasteryLo... | [
{
"content": "from django.db.models import Sum\nfrom django.utils.timezone import now\nfrom kolibri.auth.models import FacilityUser\nfrom kolibri.core.serializers import KolibriModelSerializer\nfrom kolibri.logger.models import AttemptLog, ContentSessionLog, ContentSummaryLog, ExamAttemptLog, ExamLog, MasteryLo... | diff --git a/kolibri/core/assets/src/exams/utils.js b/kolibri/core/assets/src/exams/utils.js
index aa70fd679fc..b57dd5c1212 100644
--- a/kolibri/core/assets/src/exams/utils.js
+++ b/kolibri/core/assets/src/exams/utils.js
@@ -74,18 +74,25 @@ function getExamReport(store, examId, userId, questionNumber = 0, interactionIn... |
pantsbuild__pants-16931 | Nondeterministic `ImportError: No module named __pants_df_parser` while computing changed targets
(NOTE: There's been a lot of discussion on this in Slack [here](https://pantsbuild.slack.com/archives/C046T6T9U/p1658412143380059), but I realized I never filed an issue for it)
**Describe the bug**
A few times per d... | [
{
"content": "# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport dataclasses\nimport json\nimport logging\nimport os\nimport shlex\nfrom dataclasses import dataclass\nfrom pathlib imp... | [
{
"content": "# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport dataclasses\nimport json\nimport logging\nimport os\nimport shlex\nfrom dataclasses import dataclass\nfrom pathlib imp... | diff --git a/src/python/pants/backend/python/util_rules/pex.py b/src/python/pants/backend/python/util_rules/pex.py
index 7edf34e9da7..16daa11aaf0 100644
--- a/src/python/pants/backend/python/util_rules/pex.py
+++ b/src/python/pants/backend/python/util_rules/pex.py
@@ -749,8 +749,7 @@ def _create_venv_script(
... |
lutris__lutris-4053 | Lutris doesn't create coverart folder
### Bug description
After upgrading Lutris to v0.5.10-beta1 at every start a popup is shown with the text
`[Errno 2] No such file or directory: '/home/user/.cache/lutris/coverart'`
After clicking 'OK' Lutris starts normal
Restarting Lutris displays the popup again since the... | [
{
"content": "\"\"\"Check to run at program start\"\"\"\nimport os\nimport sqlite3\nimport time\nfrom gettext import gettext as _\n\nfrom lutris import runners, settings\nfrom lutris.database.games import get_games\nfrom lutris.database.schema import syncdb\nfrom lutris.game import Game\nfrom lutris.gui.dialogs... | [
{
"content": "\"\"\"Check to run at program start\"\"\"\nimport os\nimport sqlite3\nimport time\nfrom gettext import gettext as _\n\nfrom lutris import runners, settings\nfrom lutris.database.games import get_games\nfrom lutris.database.schema import syncdb\nfrom lutris.game import Game\nfrom lutris.gui.dialogs... | diff --git a/lutris/startup.py b/lutris/startup.py
index 9512c4fde0..13cfc4ca21 100644
--- a/lutris/startup.py
+++ b/lutris/startup.py
@@ -35,7 +35,7 @@ def init_dirs():
os.path.join(settings.DATA_DIR, "covers"),
settings.ICON_PATH,
os.path.join(settings.CACHE_DIR, "banners"),
- os.pat... |
mampfes__hacs_waste_collection_schedule-1665 | [Bug]: Dudley Council, UK - Not Loading
### I Have A Problem With:
A specific source
### What's Your Problem
Now the Xmas alternative dates have been removed from the council website it's no longer loading my bin dates into my calendar and showing the below error messages in the HA log file
### Source (if r... | [
{
"content": "import re\nfrom datetime import date, datetime, timedelta\n\nimport requests\nfrom bs4 import BeautifulSoup\nfrom waste_collection_schedule import Collection # type: ignore[attr-defined]\n\nTITLE = \"Dudley Metropolitan Borough Council\"\nDESCRIPTION = \"Source for Dudley Metropolitan Borough Cou... | [
{
"content": "import re\nfrom datetime import date, datetime, timedelta\n\nimport requests\nfrom bs4 import BeautifulSoup\nfrom waste_collection_schedule import Collection # type: ignore[attr-defined]\n\nTITLE = \"Dudley Metropolitan Borough Council\"\nDESCRIPTION = \"Source for Dudley Metropolitan Borough Cou... | diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/dudley_gov_uk.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/dudley_gov_uk.py
index 7e7ed6743..923135f89 100644
--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/... |
kornia__kornia-1413 | warp_perspective produced wrong results with integer input
### Describe the bug
got a runtime error when I test warp_perspective
### Reproduction steps
run
```bash
def test_warp_perspective() :
import kornia as K
import torch
input = torch.zeros(1,3,1000,1000).cuda()
print(... | [
{
"content": "from typing import Optional, Tuple\n\nimport torch\nimport torch.nn.functional as F\n\nfrom kornia.geometry.conversions import (\n angle_to_rotation_matrix,\n convert_affinematrix_to_homography,\n convert_affinematrix_to_homography3d,\n normalize_pixel_coordinates,\n)\nfrom kornia.geom... | [
{
"content": "from typing import Optional, Tuple\n\nimport torch\nimport torch.nn.functional as F\n\nfrom kornia.geometry.conversions import (\n angle_to_rotation_matrix,\n convert_affinematrix_to_homography,\n convert_affinematrix_to_homography3d,\n normalize_pixel_coordinates,\n)\nfrom kornia.geom... | diff --git a/.github/workflows/tests_cpu.yml b/.github/workflows/tests_cpu.yml
index a0bbb05bd7..7fae7065cb 100644
--- a/.github/workflows/tests_cpu.yml
+++ b/.github/workflows/tests_cpu.yml
@@ -5,7 +5,7 @@ on:
branches: [master]
pull_request:
branches: [master]
- types: [open, review_requested, ready_f... |
encode__uvicorn-595 | Typo in protocol logging.
Line 137 of /protocols/http/h11_impl.py has a typo:
`self.logger.log(TRACE_LOG_LEVEL, "%Connection lost", prefix)` should be `self.logger.log(TRACE_LOG_LEVEL, "%sConnection lost", prefix)`. This causes an exception to be thrown when logging at trace level.
| [
{
"content": "import asyncio\nimport http\nimport logging\nfrom urllib.parse import unquote\n\nimport h11\n\nfrom uvicorn.protocols.utils import (\n get_client_addr,\n get_local_addr,\n get_path_with_query_string,\n get_remote_addr,\n is_ssl,\n)\n\n\ndef _get_status_phrase(status_code):\n try:... | [
{
"content": "import asyncio\nimport http\nimport logging\nfrom urllib.parse import unquote\n\nimport h11\n\nfrom uvicorn.protocols.utils import (\n get_client_addr,\n get_local_addr,\n get_path_with_query_string,\n get_remote_addr,\n is_ssl,\n)\n\n\ndef _get_status_phrase(status_code):\n try:... | diff --git a/uvicorn/protocols/http/h11_impl.py b/uvicorn/protocols/http/h11_impl.py
index 027e9fe58..a3dcd0af0 100644
--- a/uvicorn/protocols/http/h11_impl.py
+++ b/uvicorn/protocols/http/h11_impl.py
@@ -134,7 +134,7 @@ def connection_lost(self, exc):
if self.logger.level <= TRACE_LOG_LEVEL:
pr... |
scikit-hep__uproot5-293 | Xrootd vector read has no timeout
In https://github.com/scikit-hep/uproot4/blob/7e3353cfdec91c340c7a0e26a31a695d2db3bcf1/uproot/source/xrootd.py#L341-L343 there is no timeout argument passed to `vector_read`. The signature supports it: https://xrootd.slac.stanford.edu/doc/python/xrootd-python/modules/client/file.html#X... | [
{
"content": "# BSD 3-Clause License; see https://github.com/scikit-hep/uproot4/blob/main/LICENSE\n\n\"\"\"\nThis module defines a physical layer for remote files, accessed via the XRootD protocol.\n\nDefines a :doc:`uproot.source.xrootd.XRootDResource` (``XRootD.File``) and two\nsources: :doc:`uproot.source.xr... | [
{
"content": "# BSD 3-Clause License; see https://github.com/scikit-hep/uproot4/blob/main/LICENSE\n\n\"\"\"\nThis module defines a physical layer for remote files, accessed via the XRootD protocol.\n\nDefines a :doc:`uproot.source.xrootd.XRootDResource` (``XRootD.File``) and two\nsources: :doc:`uproot.source.xr... | diff --git a/uproot/source/xrootd.py b/uproot/source/xrootd.py
index 2f1468830..12a75ae9a 100644
--- a/uproot/source/xrootd.py
+++ b/uproot/source/xrootd.py
@@ -339,7 +339,9 @@ def add_request_range(start, length, sub_ranges_list):
callback = self._resource.callbacker(futures, results)
statu... |
DataBiosphere__toil-3387 | Memory Limit value Zero
https://github.com/DataBiosphere/toil/blob/f159848b4e0c06dc27cccd6c3389dd6efbbad750/src/toil/batchSystems/lsf.py#L252
```
Traceback (most recent call last):
File "/nfs/production/panda/ensembl/thiagogenez/usr/linuxbrew/Cellar/cactus/HEAD-71f6430/libexec/lib/python3.9/site-packages/toil/batchS... | [
{
"content": "# Copyright (C) 2013 by Thomas Keane (tk2@sanger.ac.uk)\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rig... | [
{
"content": "# Copyright (C) 2013 by Thomas Keane (tk2@sanger.ac.uk)\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rig... | diff --git a/src/toil/batchSystems/lsf.py b/src/toil/batchSystems/lsf.py
index 84efc255fd..f63637767c 100644
--- a/src/toil/batchSystems/lsf.py
+++ b/src/toil/batchSystems/lsf.py
@@ -249,7 +249,7 @@ def prepareBsub(self, cpu, mem, jobID):
mem_resource = parse_memory_resource(mem)
... |
python-discord__bot-1085 | Handle error for long poll titles in a user-friendly way
Sentry Issue: [BOT-7Q](https://sentry.io/organizations/python-discord/issues/1821866467/?referrer=github_integration)
The poll command puts the poll's question in the embed's title, which has a maximum character limit of 256. Instead of letting the exception f... | [
{
"content": "import difflib\nimport logging\nimport re\nimport unicodedata\nfrom email.parser import HeaderParser\nfrom io import StringIO\nfrom typing import Tuple, Union\n\nfrom discord import Colour, Embed, utils\nfrom discord.ext.commands import BadArgument, Cog, Context, clean_content, command\n\nfrom bot... | [
{
"content": "import difflib\nimport logging\nimport re\nimport unicodedata\nfrom email.parser import HeaderParser\nfrom io import StringIO\nfrom typing import Tuple, Union\n\nfrom discord import Colour, Embed, utils\nfrom discord.ext.commands import BadArgument, Cog, Context, clean_content, command\n\nfrom bot... | diff --git a/bot/cogs/utils.py b/bot/cogs/utils.py
index 91c6cb36e1..d96abbd5a6 100644
--- a/bot/cogs/utils.py
+++ b/bot/cogs/utils.py
@@ -232,6 +232,8 @@ async def vote(self, ctx: Context, title: clean_content(fix_channel_mentions=Tru
A maximum of 20 options can be provided, as Discord supports a max of 20
... |
CTFd__CTFd-1485 | Theme settings
There needs to be some way to change settings in themes themselves. People complain about a lot of nonsensical things that they should fix in their forks and not need to be a concern in master.
| [
{
"content": "from CTFd.utils import get_config\nfrom CTFd.utils.helpers import markup\n\n\nclass _ConfigsWrapper:\n def __getattr__(self, attr):\n return get_config(attr)\n\n @property\n def ctf_name(self):\n return get_config(\"theme_header\", default=\"CTFd\")\n\n @property\n def... | [
{
"content": "import json\n\nfrom CTFd.utils import get_config\nfrom CTFd.utils.helpers import markup\n\n\nclass _ConfigsWrapper:\n def __getattr__(self, attr):\n return get_config(attr)\n\n @property\n def ctf_name(self):\n return get_config(\"theme_header\", default=\"CTFd\")\n\n @pr... | diff --git a/CTFd/constants/config.py b/CTFd/constants/config.py
index a56c2d773..b9171cfc4 100644
--- a/CTFd/constants/config.py
+++ b/CTFd/constants/config.py
@@ -1,3 +1,5 @@
+import json
+
from CTFd.utils import get_config
from CTFd.utils.helpers import markup
@@ -18,5 +20,9 @@ def theme_header(self):
def t... |
pytorch__text-65 | Possible bug in LanguageModelingDataset
In the code for [`LanguageModelingDataset`](https://github.com/pytorch/text/blob/master/torchtext/datasets/language_modeling.py), the original text seems to be pre-processed twice, viz.:
- `text += text_field.preprocess(line)` [at line 22](https://github.com/pytorch/text/blob/... | [
{
"content": "from collections import Counter, OrderedDict\nimport six\nimport torch\nfrom torch.autograd import Variable\n\nfrom .dataset import Dataset\nfrom .pipeline import Pipeline\nfrom .utils import get_tokenizer\nfrom ..vocab import Vocab\n\n\nclass Field(object):\n \"\"\"Defines a datatype together ... | [
{
"content": "from collections import Counter, OrderedDict\nimport six\nimport torch\nfrom torch.autograd import Variable\n\nfrom .dataset import Dataset\nfrom .pipeline import Pipeline\nfrom .utils import get_tokenizer\nfrom ..vocab import Vocab\n\n\nclass Field(object):\n \"\"\"Defines a datatype together ... | diff --git a/torchtext/data/field.py b/torchtext/data/field.py
index d4fca84f64..b0324164d3 100644
--- a/torchtext/data/field.py
+++ b/torchtext/data/field.py
@@ -87,7 +87,7 @@ def preprocess(self, x):
`preprocessing` Pipeline."""
if six.PY2 and isinstance(x, six.string_types):
x = Pipeli... |
vas3k__vas3k.club-858 | Bug: возможность замьютить самого себя
## Чеклист
- [x] Я поискал поиском по трекеру похожие проблемы, в том числе в закрытых Issues
- [x] Баг стабильно воспроизводится и я знаю как это сделать
## Описание бага
Пользователь технически может замьюить самого себя, после чего не сможет увидеть свои посты и комме... | [
{
"content": "from django.conf import settings\nfrom django.http import HttpResponseForbidden\nfrom django.shortcuts import get_object_or_404, render\n\nfrom auth.helpers import auth_required\nfrom club.exceptions import AccessDenied\nfrom notifications.telegram.users import notify_admin_user_on_mute\nfrom user... | [
{
"content": "from django.conf import settings\nfrom django.http import HttpResponseForbidden\nfrom django.shortcuts import get_object_or_404, render\n\nfrom auth.helpers import auth_required\nfrom club.exceptions import AccessDenied\nfrom notifications.telegram.users import notify_admin_user_on_mute\nfrom user... | diff --git a/users/views/muted.py b/users/views/muted.py
index 014a3f06c..41b56f466 100644
--- a/users/views/muted.py
+++ b/users/views/muted.py
@@ -15,6 +15,10 @@ def toggle_mute(request, user_slug):
if user_to.is_curator or user_to.is_moderator:
raise AccessDenied(title="У этого юзера иммунитет от мьюта... |
Qiskit__qiskit-2769 | text drawer in jupyter notebook is not using a fully-monospaced font
It seems that the text drawer is not using a monospaced font when in jupyter notebooks (at least, for the black square character).
<img width="510" alt="Screen Shot 2019-07-07 at 3 52 32 PM" src="https://user-images.githubusercontent.com/766693/60773... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2018.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2018.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org... | diff --git a/qiskit/visualization/text.py b/qiskit/visualization/text.py
index 9f3028d25042..56c29ff15cf1 100644
--- a/qiskit/visualization/text.py
+++ b/qiskit/visualization/text.py
@@ -459,7 +459,9 @@ def __str__(self):
def _repr_html_(self):
return '<pre style="word-wrap: normal;' \
'wh... |
OpenNMT__OpenNMT-tf-367 | Sharing Embedding meets ERROR!
when I set "share_embeddings=EmbeddingsSharingLevel.ALL" in Transformer model, The trained model can not be correctly infered, e.g. the model will output serveral same tokens for each input query. There may be a bug under this parameter. I also tried share_embeddings=EmbeddingsSharingLeve... | [
{
"content": "\"\"\"Define generic inputters.\"\"\"\n\nimport abc\nimport six\n\nimport tensorflow as tf\n\nfrom opennmt.layers.reducer import ConcatReducer, JoinReducer\nfrom opennmt.utils import compat\nfrom opennmt.utils.data import inference_pipeline, training_pipeline\nfrom opennmt.utils.misc import extrac... | [
{
"content": "\"\"\"Define generic inputters.\"\"\"\n\nimport abc\nimport six\n\nimport tensorflow as tf\n\nfrom opennmt.layers.reducer import ConcatReducer, JoinReducer\nfrom opennmt.utils import compat\nfrom opennmt.utils.data import inference_pipeline, training_pipeline\nfrom opennmt.utils.misc import extrac... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e903d755..21c1ae5b4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@ OpenNMT-tf follows [semantic versioning 2.0.0](https://semver.org/). The API cov
### Fixes and improvements
* Fix checkpoint restore during evaluation when using a `PositionEmbedder` or... |
pwndbg__pwndbg-1757 | "'function' object has no attribute '_reset'" in `pwndbg/pwndbg/color/syntax_highlight.py`
<!--
Before reporting a new issue, make sure that we do not have any duplicates already open.
If there is one it might be good to take part in the discussion there.
Please make sure you have checked that the issue persists o... | [
{
"content": "import os.path\nimport re\nfrom typing import Any\nfrom typing import Dict\n\nimport pygments\nimport pygments.formatters\nimport pygments.lexers\n\nimport pwndbg.gdblib.config\nfrom pwndbg.color import disable_colors\nfrom pwndbg.color import message\nfrom pwndbg.color import theme\nfrom pwndbg.c... | [
{
"content": "import os.path\nimport re\nfrom typing import Any\nfrom typing import Dict\n\nimport pygments\nimport pygments.formatters\nimport pygments.lexers\n\nimport pwndbg.gdblib.config\nfrom pwndbg.color import disable_colors\nfrom pwndbg.color import message\nfrom pwndbg.color import theme\nfrom pwndbg.c... | diff --git a/pwndbg/color/syntax_highlight.py b/pwndbg/color/syntax_highlight.py
index 086046b75f2..2820df30db7 100644
--- a/pwndbg/color/syntax_highlight.py
+++ b/pwndbg/color/syntax_highlight.py
@@ -34,7 +34,7 @@ def check_style() -> None:
# Reset the highlighted source cache
from pwndbg.commands.co... |
OCA__manufacture-530 | [12.0] mrp_multi_level: BoM explosion ignores product variant attributes
**Impacted versions:** 12.0, 13.0
**Steps to reproduce:** (using Customizable Desk from demo data)
1. Create configurable components products
* Desk Leg, Steel
* Desk Leg, Aluminum
* Desk Leg, Custom
* White Trim Kit
* Blac... | [
{
"content": "# Copyright 2016 Ucamco - Wim Audenaert <wim.audenaert@ucamco.com>\n# Copyright 2016-19 ForgeFlow S.L. (https://www.forgeflow.com)\n# - Jordi Ballester Alomar <jordi.ballester@forgeflow.com>\n# - Lois Rilo <lois.rilo@forgeflow.com>\n# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.ht... | [
{
"content": "# Copyright 2016 Ucamco - Wim Audenaert <wim.audenaert@ucamco.com>\n# Copyright 2016-19 ForgeFlow S.L. (https://www.forgeflow.com)\n# - Jordi Ballester Alomar <jordi.ballester@forgeflow.com>\n# - Lois Rilo <lois.rilo@forgeflow.com>\n# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.ht... | diff --git a/mrp_multi_level/demo/mrp_bom_demo.xml b/mrp_multi_level/demo/mrp_bom_demo.xml
index e31a7d9db74..21e90a8226e 100644
--- a/mrp_multi_level/demo/mrp_bom_demo.xml
+++ b/mrp_multi_level/demo/mrp_bom_demo.xml
@@ -40,6 +40,59 @@
<field name="sequence">5</field>
<field name="bom_id" ref="mrp_bom... |
vyperlang__vyper-1338 | Custom constants of lists
### Version Information
* vyper Version: 0.1.0 beta 7
### What's your issue about?
I'm not sure whether this is designed or a bug but Vyper doesn't support custom constants of lists.
It'd be better to support it if there is no concern?
```
# Invalid value for constant type, expecte... | [
{
"content": "import abc\nimport ast\nfrom collections import (\n OrderedDict,\n)\nimport copy\nimport warnings\n\nfrom vyper.exceptions import (\n InvalidTypeException,\n)\nfrom vyper.utils import (\n base_types,\n ceil32,\n check_valid_varname,\n valid_units,\n)\n\n\ndef unit_from_type(typ):... | [
{
"content": "import abc\nimport ast\nfrom collections import (\n OrderedDict,\n)\nimport copy\nimport warnings\n\nfrom vyper.exceptions import (\n InvalidTypeException,\n)\nfrom vyper.utils import (\n base_types,\n ceil32,\n check_valid_varname,\n valid_units,\n)\n\n\ndef unit_from_type(typ):... | diff --git a/tests/parser/syntax/test_constants.py b/tests/parser/syntax/test_constants.py
index 4ca8703bde..77d087915d 100644
--- a/tests/parser/syntax/test_constants.py
+++ b/tests/parser/syntax/test_constants.py
@@ -129,6 +129,15 @@ def test():
def deposit(deposit_input: bytes[2048]):
assert msg.value >= as_we... |
aio-libs__aiohttp-2088 | Subsequent removal and addition of a cookie may leave the cookie removed
## Long story short
I encountered a flaky test failure when testing login-logout-login and discovered that a login right after a logout may not work, in other words, the authentication cookie may not be set.
This boiled down to the following... | [
{
"content": "import datetime\nimport pathlib\nimport pickle\nimport re\nfrom collections import defaultdict\nfrom collections.abc import Mapping\nfrom http.cookies import Morsel\nfrom math import ceil\n\nfrom yarl import URL\n\nfrom .abc import AbstractCookieJar\nfrom .helpers import SimpleCookie, is_ip_addres... | [
{
"content": "import datetime\nimport pathlib\nimport pickle\nimport re\nfrom collections import defaultdict\nfrom collections.abc import Mapping\nfrom http.cookies import Morsel\nfrom math import ceil\n\nfrom yarl import URL\n\nfrom .abc import AbstractCookieJar\nfrom .helpers import SimpleCookie, is_ip_addres... | diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index c20e0cb217f..c6c44075700 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -178,6 +178,7 @@ Will McGugan
Willem de Groot
Wilson Ong
Yannick Koechlin
+Yegor Roganov
Young-Ho Cha
Yuriy Shatrov
Yury Selivanov
diff --git a/aiohttp/cookiejar.py b/aiohttp/coo... |
learningequality__kolibri-5861 | new accounts are seemingly created in the wrong facility
### Observed behavior
Accounts created in one facility seem to actually get created in another facility.
### Expected behavior
Facility should be correct. Might be related to #5812, so we should address that issue at the same time.
### User-facing c... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport time\n\nfrom django.contrib.auth import authenticate\nfrom django.contrib.auth import login\nfrom django.contrib.auth import logout\nfrom django.contrib.auth import upda... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport time\n\nfrom django.contrib.auth import authenticate\nfrom django.contrib.auth import login\nfrom django.contrib.auth import logout\nfrom django.contrib.auth import upda... | diff --git a/kolibri/core/assets/src/api-resources/index.js b/kolibri/core/assets/src/api-resources/index.js
index 9015991409f..745bbc6387c 100644
--- a/kolibri/core/assets/src/api-resources/index.js
+++ b/kolibri/core/assets/src/api-resources/index.js
@@ -16,7 +16,6 @@ export { default as FacilityResource } from './fa... |
kivy__kivy-2814 | codeinput.py example missing Pro.ttf
I was trying the various kivy examples, and one of them failed, the `codeinput.py` file, with the following error:
```
sinclair@blastocyst $ kivy /Users/sinclair/kivy/examples/widgets/codeinput.py
[INFO ] Kivy v1.8.0
[INFO ] [Logger ] Record log in /... | [
{
"content": "from kivy.app import App\nfrom kivy.extras.highlight import KivyLexer\nfrom kivy.uix.spinner import Spinner, SpinnerOption\nfrom kivy.uix.boxlayout import BoxLayout\nfrom kivy.uix.codeinput import CodeInput\nfrom kivy.uix.popup import Popup\nfrom kivy.properties import ListProperty\nfrom kivy.core... | [
{
"content": "from kivy.app import App\nfrom kivy.extras.highlight import KivyLexer\nfrom kivy.uix.spinner import Spinner, SpinnerOption\nfrom kivy.uix.boxlayout import BoxLayout\nfrom kivy.uix.codeinput import CodeInput\nfrom kivy.uix.popup import Popup\nfrom kivy.properties import ListProperty\nfrom kivy.core... | diff --git a/examples/widgets/codeinput.py b/examples/widgets/codeinput.py
index 60ffc4f0f8..a2871f0d2b 100644
--- a/examples/widgets/codeinput.py
+++ b/examples/widgets/codeinput.py
@@ -134,8 +134,9 @@ def _update_size(self, instance, size):
self.codeinput.font_size = float(size)
def _update_font(self,... |
napari__napari-413 | Massive traceback when deleting a (markers) layer
## 🐛 Bug
Sorry, no time to investigate now, but here is the traceback I saw when deleting a markers layer (using the trash icon):
<details>
```pytb
In [15]: WARNING: Traceback (most recent call last):
File "/Users/jni/conda/envs/36/bin/ipython", line 11, i... | [
{
"content": "from ..layers import Layer\n\nfrom ..util.naming import inc_name_count\nfrom ..util.list import ListModel\n\n\ndef _add(event):\n \"\"\"When a layer is added, set its name and order.\"\"\"\n layers = event.source\n layer = event.item\n layer.name = layers._coerce_name(layer.name, layer... | [
{
"content": "from ..layers import Layer\n\nfrom ..util.naming import inc_name_count\nfrom ..util.list import ListModel\nfrom vispy.visuals.transforms import ChainTransform\n\n\ndef _add(event):\n \"\"\"When a layer is added, set its name and order.\"\"\"\n layers = event.source\n layer = event.item\n ... | diff --git a/napari/components/layerlist.py b/napari/components/layerlist.py
index cf7bf246b54..8b1407e6029 100644
--- a/napari/components/layerlist.py
+++ b/napari/components/layerlist.py
@@ -2,6 +2,7 @@
from ..util.naming import inc_name_count
from ..util.list import ListModel
+from vispy.visuals.transforms impor... |
ethereum__web3.py-631 | Docs lack examples for "any-of" and "all-of" topic filters
* `web3.py` version: 3.8.1 (web3[gevent])
* node: `geth 1.6.5-stable`, local (via IPC)
* Python: 3.5
* OS: Ubuntu 16.04.2 LTS
### What seems wrong?
Retrieving past log events while specifying `'topics'` gives an empty list, if value of `'topics'` is a ... | [
{
"content": "import itertools\n\nfrom eth_abi import (\n decode_abi,\n decode_single,\n encode_single,\n)\nfrom eth_abi.abi import (\n process_type,\n)\nfrom eth_utils import (\n encode_hex,\n event_abi_to_log_topic,\n is_list_like,\n to_tuple,\n)\n\nfrom web3.exceptions import (\n M... | [
{
"content": "import itertools\n\nfrom eth_abi import (\n decode_abi,\n decode_single,\n encode_single,\n)\nfrom eth_abi.abi import (\n process_type,\n)\nfrom eth_utils import (\n encode_hex,\n event_abi_to_log_topic,\n is_list_like,\n to_tuple,\n)\n\nfrom web3.exceptions import (\n M... | diff --git a/README.md b/README.md
index 9e66da2484..ce6941caca 100644
--- a/README.md
+++ b/README.md
@@ -80,6 +80,9 @@ sudo apt-get install libssl-dev libffi-dev autoconf automake libtool
sudo pacman -Sy libsecp256k1
# ^ This is for ArchLinux system
+sudo dnf install openssl-devel libffi-devel autoconf automake l... |
Netflix__lemur-148 | Error messages not displaying long enough
Currently error messages are displayed for only a period of time. They should be displayed until the user acknowledges the error.
| [
{
"content": "\"\"\"\n.. module: lemur.common.utils\n :platform: Unix\n :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more\n :license: Apache, see LICENSE for more details.\n\n.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>\n\"\"\"\nimport string\nimport random\nfrom functools import wra... | [
{
"content": "\"\"\"\n.. module: lemur.common.utils\n :platform: Unix\n :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more\n :license: Apache, see LICENSE for more details.\n\n.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>\n\"\"\"\nimport string\nimport random\nfrom functools import wra... | diff --git a/lemur/common/utils.py b/lemur/common/utils.py
index 4b2d0a0017..283b9ef902 100644
--- a/lemur/common/utils.py
+++ b/lemur/common/utils.py
@@ -63,9 +63,9 @@ def wrapper(*args, **kwargs):
if hasattr(e, 'data'):
return {'message': e.data['message']}, 400
... |
python-trio__trio-576 | Check CapacityLimiter's handling of _pending_borrowers
I was just reading the code for an unrelated reason, and realized that this code looks very suspicious:
https://github.com/python-trio/trio/blob/65729b121c55ff0aa1f5d43bd9cdcd6a81e54f0c/trio/_sync.py#L286-L296
Specifically, if the call to `await self._lot.par... | [
{
"content": "import operator\nfrom collections import deque, OrderedDict\n\nimport attr\nimport outcome\n\nfrom . import _core\nfrom ._util import aiter_compat\n\n__all__ = [\n \"Event\",\n \"CapacityLimiter\",\n \"Semaphore\",\n \"Lock\",\n \"StrictFIFOLock\",\n \"Condition\",\n \"Queue\"... | [
{
"content": "import operator\nfrom collections import deque, OrderedDict\n\nimport attr\nimport outcome\n\nfrom . import _core\nfrom ._util import aiter_compat\n\n__all__ = [\n \"Event\",\n \"CapacityLimiter\",\n \"Semaphore\",\n \"Lock\",\n \"StrictFIFOLock\",\n \"Condition\",\n \"Queue\"... | diff --git a/newsfragments/548.bugfix.rst b/newsfragments/548.bugfix.rst
new file mode 100644
index 000000000..90c549af8
--- /dev/null
+++ b/newsfragments/548.bugfix.rst
@@ -0,0 +1 @@
+Fix a memory leak in :class:`trio.CapacityLimiter`, that could occurr when ``acquire`` or ``acquire_on_behalf_of`` was cancelled.
diff ... |
sopel-irc__sopel-1943 | cli: error if `extra` directory contains `setup.py`
Lazy Copypasta from IRC
```
<deathbybandaid> started writing a plugin and discovered something strange when
adding it to the `extra=` line
<deathbybandaid> I accidentally specified the directory above the plugin with
`setup.py`... | [
{
"content": "# coding=utf-8\n# Copyright 2008, Sean B. Palmer, inamidst.com\n# Copyright © 2012, Elad Alfassa <elad@fedoraproject.org>\n# Copyright 2012-2015, Elsie Powell, http://embolalia.com\n# Copyright 2019, Florian Strzelecki <florian.strzelecki@gmail.com>\n#\n# Licensed under the Eiffel Forum License 2.... | [
{
"content": "# coding=utf-8\n# Copyright 2008, Sean B. Palmer, inamidst.com\n# Copyright © 2012, Elad Alfassa <elad@fedoraproject.org>\n# Copyright 2012-2015, Elsie Powell, http://embolalia.com\n# Copyright 2019, Florian Strzelecki <florian.strzelecki@gmail.com>\n#\n# Licensed under the Eiffel Forum License 2.... | diff --git a/sopel/bot.py b/sopel/bot.py
index 082a5e9469..e5a36c26f3 100644
--- a/sopel/bot.py
+++ b/sopel/bot.py
@@ -300,6 +300,10 @@ def setup_plugins(self):
except Exception as e:
load_error = load_error + 1
LOGGER.exception('Error loading %s: %s', name, e)
+ ... |
goauthentik__authentik-4746 | Unable to generate avatars
**Describe the bug**
It seems that Authentik is unable to generate avatars and as a result groups API request is not succeeding.
**To Reproduce**
Steps to reproduce the behavior:
1. Had been using gh-next for the security key fix
2. Update to 2022.2.2
3. See error
**Expected behavi... | [
{
"content": "\"\"\"Avatar utils\"\"\"\nfrom base64 import b64encode\nfrom functools import cache as funccache\nfrom hashlib import md5\nfrom typing import TYPE_CHECKING, Optional\nfrom urllib.parse import urlencode\n\nfrom django.core.cache import cache\nfrom django.templatetags.static import static\nfrom lxml... | [
{
"content": "\"\"\"Avatar utils\"\"\"\nfrom base64 import b64encode\nfrom functools import cache as funccache\nfrom hashlib import md5\nfrom typing import TYPE_CHECKING, Optional\nfrom urllib.parse import urlencode\n\nfrom django.core.cache import cache\nfrom django.templatetags.static import static\nfrom lxml... | diff --git a/authentik/lib/avatars.py b/authentik/lib/avatars.py
index 30a240b19975..25e3e37639ea 100644
--- a/authentik/lib/avatars.py
+++ b/authentik/lib/avatars.py
@@ -154,7 +154,7 @@ def generate_avatar_from_name(
def avatar_mode_generated(user: "User", mode: str) -> Optional[str]:
"""Wrapper that converts ... |
optuna__optuna-4133 | `None` categorical not visible on Slice plot
### Expected behavior
I have a categorical like this: `trial.suggest_categorical("class_weight", ["balanced", None])`
The slice plot shows the "balanced" value but not the `None` value.
I could write a workaround by using `"None"` as a string and then convert it to `N... | [
{
"content": "from typing import Any\nfrom typing import Callable\nfrom typing import cast\nfrom typing import List\nfrom typing import NamedTuple\nfrom typing import Optional\n\nfrom optuna.logging import get_logger\nfrom optuna.study import Study\nfrom optuna.trial import FrozenTrial\nfrom optuna.trial import... | [
{
"content": "from typing import Any\nfrom typing import Callable\nfrom typing import cast\nfrom typing import List\nfrom typing import NamedTuple\nfrom typing import Optional\n\nfrom optuna.logging import get_logger\nfrom optuna.study import Study\nfrom optuna.trial import FrozenTrial\nfrom optuna.trial import... | diff --git a/optuna/visualization/_slice.py b/optuna/visualization/_slice.py
index f16aefa6ed..32abd4b5b2 100644
--- a/optuna/visualization/_slice.py
+++ b/optuna/visualization/_slice.py
@@ -195,9 +195,12 @@ def _get_slice_plot(info: _SlicePlotInfo) -> "go.Figure":
def _generate_slice_subplot(subplot_info: _SliceS... |
django-wiki__django-wiki-1119 | Exception Value: __init__() got an unexpected keyword argument 'disabled' error in version 0.6
After upgrading to v0.6, I get the following error when trying to access the settings of a wiki page (see below).
Is there a quick fix for it?
Thanks a lot in advance.
```
Internal Server Error: /wiki/intranet-intro... | [
{
"content": "__all__ = [\n \"UserCreationForm\",\n \"UserUpdateForm\",\n \"WikiSlugField\",\n \"SpamProtectionMixin\",\n \"CreateRootForm\",\n \"MoveForm\",\n \"EditForm\",\n \"SelectWidgetBootstrap\",\n \"TextInputPrepend\",\n \"CreateForm\",\n \"DeleteForm\",\n \"Permissio... | [
{
"content": "__all__ = [\n \"UserCreationForm\",\n \"UserUpdateForm\",\n \"WikiSlugField\",\n \"SpamProtectionMixin\",\n \"CreateRootForm\",\n \"MoveForm\",\n \"EditForm\",\n \"SelectWidgetBootstrap\",\n \"TextInputPrepend\",\n \"CreateForm\",\n \"DeleteForm\",\n \"Permissio... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index eb2b8d537..f175096e1 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -4,8 +4,8 @@ repos:
hooks:
- id: flake8
exclude: "^(.*/migrations/|testproject/testproject/settings/)"
- - repo: git://github.com/pre-comm... |
beetbox__beets-3085 | Selection interface: option to "skip remaining tracks" and take action
### Problem
I love the `modify` command's select mode, because it means you don't have to write super-specific queries - instead you can write a more general query and then simply type an `n` to skip those tracks you don't want to retag.
Unfor... | [
{
"content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, 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 the Software without restriction, in... | [
{
"content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, 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 the Software without restriction, in... | diff --git a/beets/ui/__init__.py b/beets/ui/__init__.py
index d3c3dafc2c..1abce2e672 100644
--- a/beets/ui/__init__.py
+++ b/beets/ui/__init__.py
@@ -408,9 +408,14 @@ def input_select_objects(prompt, objs, rep):
out = []
for obj in objs:
rep(obj)
- if input_yn(u'%s? (yes/no)' ... |
Lightning-Universe__lightning-bolts-308 | docs: Fix URI links to classes defined in `pytorch_lightning`
## 📚 Documentation
In docs, there are URIs referring to base classes for each class defined in bolts. However, links to `pytorch_lightning` are not properly rendered while links to `torch` are perfectly rendered.
### Example
https://pytorch-lightning-b... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup ------------------------------... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup ------------------------------... | diff --git a/docs/source/conf.py b/docs/source/conf.py
index 67a11e88fb..d7744fceb5 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -253,6 +253,7 @@
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
+ 'pytorch_lightning': ('https://pytorch-lightn... |
City-of-Helsinki__linkedevents-162 | YSO p12262 is deprecated
Espoo importer fails when running
`python manage.py event_import --events espoo`
YSO term p12262 "lapset (kooste)" is deprecated on 26.05.2016
http://finto.fi/yso/fi/page/?uri=p12262
It is used here:
https://github.com/City-of-Helsinki/linkedevents/blob/master/events/importer/espoo.py#L101
... | [
{
"content": "# -*- coding: utf-8 -*-\nimport re\nimport time\nfrom datetime import datetime, timedelta\n\nimport requests\n\nimport bleach\nimport dateutil.parser\nimport pytz\nimport requests_cache\nfrom django.utils.html import strip_tags\nfrom events.models import (\n DataSource,\n Event,\n Keyword... | [
{
"content": "# -*- coding: utf-8 -*-\nimport re\nimport time\nfrom datetime import datetime, timedelta\n\nimport requests\n\nimport bleach\nimport dateutil.parser\nimport pytz\nimport requests_cache\nfrom django.utils.html import strip_tags\nfrom events.models import (\n DataSource,\n Event,\n Keyword... | diff --git a/events/importer/espoo.py b/events/importer/espoo.py
index e24bcc6e7..3a8618869 100644
--- a/events/importer/espoo.py
+++ b/events/importer/espoo.py
@@ -98,8 +98,8 @@
u'pelitapahtumat': u'p6062', # -> pelit
u'satutunnit': u'p14710',
u'koululaiset': u'p16485',
- u'lasten ja nuorten tapahtu... |
getpelican__pelican-1708 | Intra-site links for draft posts
Probably a really low-priority issue: When you link to a file that is currently under `:status: draft`, the links will not work.
```
.. _some href: |filename|my-drafted-article.rst
```
This will create a link to the article as if it was not in the drafts folder. Not a very pressing is... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\n\nimport os\nimport six\nimport math\nimport random\nimport logging\nimport shutil\nimport fnmatch\nimport calendar\n\nfrom codecs import open\nfrom collections import defaultdict\nfrom functools import partial\nfrom... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\n\nimport os\nimport six\nimport math\nimport random\nimport logging\nimport shutil\nimport fnmatch\nimport calendar\n\nfrom codecs import open\nfrom collections import defaultdict\nfrom functools import partial\nfrom... | diff --git a/pelican/generators.py b/pelican/generators.py
index 75bd6b2a8..e95ec3abd 100644
--- a/pelican/generators.py
+++ b/pelican/generators.py
@@ -525,6 +525,7 @@ def generate_context(self):
preread_sender=self,
context_signal=signals.article_generator_context,
... |
CTFd__CTFd-2419 | Dynamic challenges do not show a Next Challenge
<!--
If this is a bug report please fill out the template below.
If this is a feature request please describe the behavior that you'd like to see.
-->
**Environment**:
- CTFd Version/Commit: 3.6.0/8ead306f8b57c059192cd8b137f37ee41a078a41
- Operating System: Al... | [
{
"content": "from flask import Blueprint\n\nfrom CTFd.models import Challenges, db\nfrom CTFd.plugins import register_plugin_assets_directory\nfrom CTFd.plugins.challenges import CHALLENGE_CLASSES, BaseChallenge\nfrom CTFd.plugins.dynamic_challenges.decay import DECAY_FUNCTIONS, logarithmic\nfrom CTFd.plugins.... | [
{
"content": "from flask import Blueprint\n\nfrom CTFd.models import Challenges, db\nfrom CTFd.plugins import register_plugin_assets_directory\nfrom CTFd.plugins.challenges import CHALLENGE_CLASSES, BaseChallenge\nfrom CTFd.plugins.dynamic_challenges.decay import DECAY_FUNCTIONS, logarithmic\nfrom CTFd.plugins.... | diff --git a/CTFd/plugins/dynamic_challenges/__init__.py b/CTFd/plugins/dynamic_challenges/__init__.py
index 94ebe20a9..0d62fdb19 100644
--- a/CTFd/plugins/dynamic_challenges/__init__.py
+++ b/CTFd/plugins/dynamic_challenges/__init__.py
@@ -75,6 +75,7 @@ def read(cls, challenge):
"minimum": challenge.minim... |
facebookresearch__nevergrad-83 | BO optimizer budget error
## Steps to reproduce
1. pip install nevergrad
2. run relevant code below in jupyter notebook
## Observed Results
```
---------------------------------------------------------------------------
UnboundLocalError Traceback (most recent call last)
~/.conda/... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom typing import Optional, Callable, Dict, List, Any\nimport numpy as np\nfrom bayes_opt imp... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom typing import Optional, Callable, Dict, List, Any\nimport numpy as np\nfrom bayes_opt imp... | diff --git a/nevergrad/optimization/recastlib.py b/nevergrad/optimization/recastlib.py
index 6e3277944..199c52c6c 100644
--- a/nevergrad/optimization/recastlib.py
+++ b/nevergrad/optimization/recastlib.py
@@ -117,7 +117,6 @@ def my_obj(**kwargs: Any) -> float:
for j in range(self.dimension):
... |
great-expectations__great_expectations-6128 | Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`
| [
{
"content": "import copy\nimport datetime\nimport hashlib\nimport logging\nimport math\nimport os\nimport random\nimport re\nimport string\nimport traceback\nimport warnings\nfrom pathlib import Path\nfrom typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union\n\nfrom great_expectations._ver... | [
{
"content": "import copy\nimport datetime\nimport hashlib\nimport logging\nimport math\nimport os\nimport random\nimport re\nimport string\nimport traceback\nimport warnings\nfrom pathlib import Path\nfrom typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union\n\nfrom great_expectations._ver... | diff --git a/great_expectations/execution_engine/sqlalchemy_execution_engine.py b/great_expectations/execution_engine/sqlalchemy_execution_engine.py
index 63e12c8f04fa..7b576a81cc49 100644
--- a/great_expectations/execution_engine/sqlalchemy_execution_engine.py
+++ b/great_expectations/execution_engine/sqlalchemy_execu... |
huggingface__transformers-11079 | GPTNeo: importing model with padded vocab size should truncate wte
## Environment info
<!-- You can run the command `transformers-cli env` and copy-and-paste its output below.
Don't forget to fill out the missing fields in that output! -->
- `transformers` version: latest from `master`
### Who can help
... | [
{
"content": "# coding=utf-8\n# Copyright 2021 The Eleuther AI and 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://w... | [
{
"content": "# coding=utf-8\n# Copyright 2021 The Eleuther AI and 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://w... | diff --git a/src/transformers/models/gpt_neo/modeling_gpt_neo.py b/src/transformers/models/gpt_neo/modeling_gpt_neo.py
index 9fb0d7475fb9..d6e74d6f89ee 100755
--- a/src/transformers/models/gpt_neo/modeling_gpt_neo.py
+++ b/src/transformers/models/gpt_neo/modeling_gpt_neo.py
@@ -112,6 +112,10 @@ def load_tf_weights_in_g... |
ietf-tools__datatracker-7241 | development instances attempt to POST to the production rfc-editor when a stream manager requests publication
In development this POST should be bypassed and assumed to have succeeded instead.
Development instances don't have the right secrets available to allow the POST to succeed so until this is fixed, the only iss... | [
{
"content": "# Copyright The IETF Trust 2012-2020, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nimport base64\nimport datetime\nimport re\nimport requests\n\nfrom typing import Iterator, Optional, Union\nfrom urllib.parse import urlencode\nfrom xml.dom import pulldom, Node\n\nfrom django.conf import setti... | [
{
"content": "# Copyright The IETF Trust 2012-2020, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nimport base64\nimport datetime\nimport re\nimport requests\n\nfrom typing import Iterator, Optional, Union\nfrom urllib.parse import urlencode\nfrom xml.dom import pulldom, Node\n\nfrom django.conf import setti... | diff --git a/ietf/sync/rfceditor.py b/ietf/sync/rfceditor.py
index 8ae1354139..d3371ea36c 100644
--- a/ietf/sync/rfceditor.py
+++ b/ietf/sync/rfceditor.py
@@ -802,6 +802,10 @@ def post_approved_draft(url, name):
the data from the Datatracker and start processing it. Returns
response and error (empty string if... |
python-poetry__poetry-2256 | Optional URL dependency is locked as non-optional
<!--
Hi there! Thank you for discovering and submitting an issue.
Before you submit this; let's make sure of a few things.
Please make sure the following boxes are ticked if they are correct.
If not, please try and fulfill these first.
-->
<!-- Checked... | [
{
"content": "# -*- coding: utf-8 -*-\nimport copy\nimport logging\nimport re\n\nfrom contextlib import contextmanager\nfrom typing import Union\nfrom unicodedata import normalize\nfrom warnings import warn\n\nfrom poetry.semver import Version\nfrom poetry.semver import parse_constraint\nfrom poetry.spdx import... | [
{
"content": "# -*- coding: utf-8 -*-\nimport copy\nimport logging\nimport re\n\nfrom contextlib import contextmanager\nfrom typing import Union\nfrom unicodedata import normalize\nfrom warnings import warn\n\nfrom poetry.semver import Version\nfrom poetry.semver import parse_constraint\nfrom poetry.spdx import... | diff --git a/poetry/packages/package.py b/poetry/packages/package.py
index cb28ef70c7f..4940d6f027a 100644
--- a/poetry/packages/package.py
+++ b/poetry/packages/package.py
@@ -333,7 +333,9 @@ def add_dependency(
develop=constraint.get("develop", True),
)
elif ... |
Lightning-AI__torchmetrics-2060 | Incorrect split of columns and rows in a plot for multi label confusion matrix.
## 🐛 Bug
The specific values of `num_labels` in `MultilabelConfusionMatrix` can throw `IndexError` in the `plot` function.
The `_get_col_row_split` function for `num_labels=11` returns `rows=3, cols=3`, which is not enough for 11 ax... | [
{
"content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | [
{
"content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 98e253f4c0a..8804bf53041 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -37,7 +37,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed performance issues in `RecallAtFixedPrecision` for large batch sizes ([#2042](http... |
mitmproxy__mitmproxy-6088 | Toggling follow new option fails in single flow view.
#### Problem Description
Toggling follow new flow option via <kbd>F</kbd> does not work while in the view of a single flow.
#### Steps to reproduce the behavior:
1. launch mitmproxy
2. continually generate new requests
3. activate `Follow new` option
4. ente... | [
{
"content": "from mitmproxy.tools.console.keymap import Keymap\n\n\ndef map(km: Keymap) -> None:\n km.add(\":\", \"console.command \", [\"commonkey\", \"global\"], \"Command prompt\")\n km.add(\n \";\",\n \"console.command flow.comment @focus ''\",\n [\"flowlist\", \"flowview\"],\n ... | [
{
"content": "from mitmproxy.tools.console.keymap import Keymap\n\n\ndef map(km: Keymap) -> None:\n km.add(\":\", \"console.command \", [\"commonkey\", \"global\"], \"Command prompt\")\n km.add(\n \";\",\n \"console.command flow.comment @focus ''\",\n [\"flowlist\", \"flowview\"],\n ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 34591de21d..fe888cffed 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,8 @@
([#5904](https://github.com/mitmproxy/mitmproxy/pull/5904), @truebit)
* mitmproxy now requires Python 3.10 or above.
([#5954](https://github.com/mitmproxy/mitmproxy/pull/5954), @mh... |
paperless-ngx__paperless-ngx-5895 | [BUG] OIDC: signup fails if no email server setup
### Description
When setting up OIDC I noticed that the default settings concerning user signup contradict each other which results in an exception that leads to paperless needing a restart. As seen below the default settings disallow signups in general but allow soc... | [
{
"content": "import datetime\nimport json\nimport math\nimport multiprocessing\nimport os\nimport re\nimport tempfile\nfrom os import PathLike\nfrom pathlib import Path\nfrom platform import machine\nfrom typing import Final\nfrom typing import Optional\nfrom typing import Union\nfrom urllib.parse import urlpa... | [
{
"content": "import datetime\nimport json\nimport math\nimport multiprocessing\nimport os\nimport re\nimport tempfile\nfrom os import PathLike\nfrom pathlib import Path\nfrom platform import machine\nfrom typing import Final\nfrom typing import Optional\nfrom typing import Union\nfrom urllib.parse import urlpa... | diff --git a/docs/configuration.md b/docs/configuration.md
index 43eff582bfc..36a1bb1c9db 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -572,6 +572,17 @@ system. See the corresponding
Defaults to 'https'
+#### [`PAPERLESS_ACCOUNT_EMAIL_VERIFICATION=<string>`](#PAPERLESS_ACCOUNT_EMAIL_VERIFI... |
aws__aws-cli-4402 | A collection of new MediaStore CLI examples
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
| [
{
"content": "# Copyright 2012-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n... | [
{
"content": "# Copyright 2012-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n... | diff --git a/awscli/customizations/cloudformation/artifact_exporter.py b/awscli/customizations/cloudformation/artifact_exporter.py
index 936cad5f66eb..ed7652d9e8a6 100644
--- a/awscli/customizations/cloudformation/artifact_exporter.py
+++ b/awscli/customizations/cloudformation/artifact_exporter.py
@@ -438,6 +438,7 @@ d... |
e-valuation__EvaP-354 | Result detail pages need to show total grades and participation
The `results/course_detail` pages should again show the information that is already given on the overview page (average and medium grades and participation).
| [
{
"content": "from django.conf import settings\nfrom django.http import HttpResponse\nfrom django.shortcuts import get_object_or_404, render_to_response\nfrom django.template import RequestContext\nfrom django.utils.translation import get_language\n\nfrom evap.evaluation.auth import login_required, fsr_required... | [
{
"content": "from django.conf import settings\nfrom django.http import HttpResponse\nfrom django.shortcuts import get_object_or_404, render_to_response\nfrom django.template import RequestContext\nfrom django.utils.translation import get_language\n\nfrom evap.evaluation.auth import login_required, fsr_required... | diff --git a/evap/locale/de/LC_MESSAGES/django.po b/evap/locale/de/LC_MESSAGES/django.po
index 5ec4777134..8252317fff 100644
--- a/evap/locale/de/LC_MESSAGES/django.po
+++ b/evap/locale/de/LC_MESSAGES/django.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: EvaP\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-... |
Textualize__textual-4414 | [Bug] Describe failures for Integer validator
I encountered a small issue using input validators.
I have an `Input` widget with an `Integer` validator set. The error occurs when i try to get the `ValidationResult.failure_descriptions` property when the input is empty.
Since the `Integer` validator inherits from th... | [
{
"content": "\"\"\"Framework for validating string values\"\"\"\n\nfrom __future__ import annotations\n\nimport math\nimport re\nfrom abc import ABC, abstractmethod\nfrom dataclasses import dataclass, field\nfrom typing import Callable, Pattern, Sequence\nfrom urllib.parse import urlparse\n\nimport rich.repr\n... | [
{
"content": "\"\"\"Framework for validating string values\"\"\"\n\nfrom __future__ import annotations\n\nimport math\nimport re\nfrom abc import ABC, abstractmethod\nfrom dataclasses import dataclass, field\nfrom typing import Callable, Pattern, Sequence\nfrom urllib.parse import urlparse\n\nimport rich.repr\n... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6df2d6c3da..6327789eeb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
+- Fixed `Integer` validator missing failure description when not a number https://github.com/Textualiz... |
opendatacube__datacube-core-510 | Database integrity error ingesting data
### Expected behaviour
I've had a problem ingesting Sentinel-2 data with 1.6rc2+57.g0e4fe679 that I've managed to solve by downgrading to 1.5.4. I've tried to trace the problem back without luck. It seems that the `dataset.id` and `dataset.type.id` are not passed correctly to `p... | [
{
"content": "from __future__ import absolute_import\n\nimport time\nimport logging\nimport click\nimport cachetools\nimport itertools\nimport sys\nfrom copy import deepcopy\nfrom pathlib import Path\nfrom pandas import to_datetime\nfrom datetime import datetime\n\nimport datacube\nfrom datacube.api.core import... | [
{
"content": "from __future__ import absolute_import\n\nimport time\nimport logging\nimport click\nimport cachetools\nimport itertools\nimport sys\nfrom copy import deepcopy\nfrom pathlib import Path\nfrom pandas import to_datetime\nfrom datetime import datetime\n\nimport datacube\nfrom datacube.api.core import... | diff --git a/datacube/scripts/ingest.py b/datacube/scripts/ingest.py
index 183a694db3..4dba4a3048 100644
--- a/datacube/scripts/ingest.py
+++ b/datacube/scripts/ingest.py
@@ -144,6 +144,8 @@ def ensure_output_type(index, config, storage_format, allow_product_changes=Fals
raise ValueError("Ingest config... |
nipy__nipype-3476 | [ENH] DWIBiascorrect missing outputs' generation
### Summary
It's a quick fix, but the interface to mrtrix3's dwibiascorrect is missing the method to generate the output dictionary.
| [
{
"content": "# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n# -*- coding: utf-8 -*-\n\nimport os.path as op\n\nfrom ..base import (\n CommandLineInputSpec,\n CommandLine,\n traits,\n TraitedSpec,\n File,\n isdefined,\n Un... | [
{
"content": "# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n# -*- coding: utf-8 -*-\n\nimport os.path as op\n\nfrom ..base import (\n CommandLineInputSpec,\n CommandLine,\n traits,\n TraitedSpec,\n File,\n isdefined,\n Un... | diff --git a/nipype/interfaces/mrtrix3/preprocess.py b/nipype/interfaces/mrtrix3/preprocess.py
index ef67365f0b..928833aaf6 100644
--- a/nipype/interfaces/mrtrix3/preprocess.py
+++ b/nipype/interfaces/mrtrix3/preprocess.py
@@ -242,6 +242,13 @@ def _format_arg(self, name, trait_spec, value):
return f"-{... |
google__jax-3061 | minor problem in error message for jax.experimental.optimizers.piecewise_constant
Hi,
I think there is a small problem with the error message for jax.experimental.optimizers.piecewise_constant.
```python
def piecewise_constant(boundaries, values):
boundaries = jnp.array(boundaries)
values = jnp.array(value... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/jax/experimental/optimizers.py b/jax/experimental/optimizers.py
index 55615cd715ba..bea7f52fa82f 100644
--- a/jax/experimental/optimizers.py
+++ b/jax/experimental/optimizers.py
@@ -499,7 +499,7 @@ def piecewise_constant(boundaries, values):
if not boundaries.ndim == values.ndim == 1:
raise ValueEr... |
pypi__warehouse-13499 | Circular import for warehouse.oidc
Surfaced via:
```shellsession
python -c "import warehouse.oidc"
```
```
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "workpath/warehouse/warehouse/oidc/__init__.py", line 13, in <module>
from warehouse.oidc.interfaces import IOIDCP... | [
{
"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/.coveragerc b/.coveragerc
index c170c80db7e3..c3ba34b741c7 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -25,6 +25,7 @@ omit =
exclude_lines =
pragma: no cover
class \w+\(Interface\):
+ if (typing\.)?TYPE_CHECKING:
# Don't show us anything that's already 100% covered.
skip_covered = True
... |
adap__flower-1735 | deprecated eval_fn still used in examples
### Describe the bug
While running the `embedded_devices` example, an issue is faced due to the use of `eval_fn` keyword which was deprecated after Flower 1.0.0 and has now been changed to `evaluate_fn`
### Steps/Code to Reproduce
Setup the server as mentioned in the `exampl... | [
{
"content": "# Copyright 2020 Adap GmbH. 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 2020 Adap GmbH. 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/examples/embedded_devices/requirements.txt b/examples/embedded_devices/requirements.txt
new file mode 100644
index 000000000000..cdb29230ffeb
--- /dev/null
+++ b/examples/embedded_devices/requirements.txt
@@ -0,0 +1,4 @@
+flwr==1.3.0
+numpy==1.24.2
+torch==2.0.0
+torchvision==0.15.1
diff --git a/examples/e... |
open-telemetry__opentelemetry-python-2576 | View aggregation logs warning when no measurements are available
I configured a MeterProvider with a View and a `PeriodicExportingMetricReader` to report every 5 seconds, and ran the code for 10 seconds. This resulted in an unexpected warning being logged about a mismatched point type. This behaviour seems incorrect as... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/aggregation.py b/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/aggregation.py
index 4471e5f3f4f..8a61e78e723 100644
--- a/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/aggregation.py
+++ b/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/aggregation.py... |
certbot__certbot-7009 | Allow the certbot_dns_rfc2136 algorithm specified in it's config file to be case insensitive.
## My operating system is (include version):
```
[root@host ~]# head -n4 /etc/os-release
NAME=Fedora
VERSION="29 (Server Edition)"
ID=fedora
VERSION_ID=29
```
## I installed Certbot with (certbot-auto, OS package m... | [
{
"content": "\"\"\"DNS Authenticator using RFC 2136 Dynamic Updates.\"\"\"\nimport logging\n\nimport dns.flags\nimport dns.message\nimport dns.name\nimport dns.query\nimport dns.rdataclass\nimport dns.rdatatype\nimport dns.tsig\nimport dns.tsigkeyring\nimport dns.update\nimport zope.interface\n\nfrom certbot i... | [
{
"content": "\"\"\"DNS Authenticator using RFC 2136 Dynamic Updates.\"\"\"\nimport logging\n\nimport dns.flags\nimport dns.message\nimport dns.name\nimport dns.query\nimport dns.rdataclass\nimport dns.rdatatype\nimport dns.tsig\nimport dns.tsigkeyring\nimport dns.update\nimport zope.interface\n\nfrom certbot i... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 404956d5e3c..1b2c882e851 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -33,6 +33,9 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
--no-permissions-check.
* `acme` module uses now a POST-as-GET request to retrieve the registration
from an ACME v2... |
flask-admin__flask-admin-1031 | peewee BooleanField filter doesn't work
BooleanFields are not properly filtered when added to `column_filters`. Regardless of the value selected, it gets coerced to `1` for the query.
Reproduce by adding a BooleanField to a model in `examples/peewee/app.py` and add the field to the `column_filters` list. After creatin... | [
{
"content": "import time\nimport datetime\n\nfrom flask_admin.babel import lazy_gettext\n\nfrom flask_admin.model import filters\nfrom .tools import parse_like_term\n\n\nclass BasePeeweeFilter(filters.BaseFilter):\n \"\"\"\n Base Peewee filter.\n \"\"\"\n def __init__(self, column, name, option... | [
{
"content": "import time\nimport datetime\n\nfrom flask_admin.babel import lazy_gettext\n\nfrom flask_admin.model import filters\nfrom .tools import parse_like_term\n\n\nclass BasePeeweeFilter(filters.BaseFilter):\n \"\"\"\n Base Peewee filter.\n \"\"\"\n def __init__(self, column, name, option... | diff --git a/flask_admin/contrib/peewee/filters.py b/flask_admin/contrib/peewee/filters.py
index 503a38a68..660fad8e7 100644
--- a/flask_admin/contrib/peewee/filters.py
+++ b/flask_admin/contrib/peewee/filters.py
@@ -116,11 +116,13 @@ def operation(self):
# Customized type filters
class BooleanEqualFilter(FilterEqu... |
streamlink__streamlink-5854 | plugins.vimeo: live event URL triggers ValidationError / DASH errors
### Checklist
- [X] This is a [plugin issue](https://streamlink.github.io/plugins.html) and not [a different kind of issue](https://github.com/streamlink/streamlink/issues/new/choose)
- [X] [I have read the contribution guidelines](https://github.... | [
{
"content": "\"\"\"\n$description Global live-streaming and video hosting social platform.\n$url vimeo.com\n$type live, vod\n$metadata id\n$metadata author\n$metadata title\n$notes Password protected streams are not supported\n\"\"\"\n\nimport logging\nimport re\nfrom urllib.parse import urljoin, urlparse\n\nf... | [
{
"content": "\"\"\"\n$description Global live-streaming and video hosting social platform.\n$url vimeo.com\n$type live, vod\n$metadata id\n$metadata author\n$metadata title\n$notes Password protected streams are not supported\n\"\"\"\n\nimport logging\nimport re\nfrom urllib.parse import urljoin, urlparse\n\nf... | diff --git a/src/streamlink/plugins/vimeo.py b/src/streamlink/plugins/vimeo.py
index cdec2bc1b67..ec641a1dbdd 100644
--- a/src/streamlink/plugins/vimeo.py
+++ b/src/streamlink/plugins/vimeo.py
@@ -171,10 +171,12 @@ def _get_streams(self):
streams = []
+ hls = hls or {}
for url in hls.values... |
googleapis__google-auth-library-python-921 | Intersphinx URL for 'requests-oauthlib' now 404s
From [this failed build](https://source.cloud.google.com/results/invocations/56d76e91-941f-45a5-b4e4-6b74a9e86461/targets/cloud-devrel%2Fclient-libraries%2Fpython%2Fgoogleapis%2Fgoogle-auth-library-python%2Fpresubmit%2Fpresubmit/log):
```python
nox > Running session ... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# google-auth documentation build configuration file, created by\n# sphinx-quickstart on Thu Sep 22 12:50:15 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# google-auth documentation build configuration file, created by\n# sphinx-quickstart on Thu Sep 22 12:50:15 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/docs/conf.py b/docs/conf.py
index 58e5b9a99..652d808bd 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -363,7 +363,10 @@
"python": ("https://docs.python.org/3.5", None),
"urllib3": ("https://urllib3.readthedocs.io/en/stable", None),
"requests": ("https://requests.kennethreitz.org/en/master/"... |
sanic-org__sanic-2720 | Malfunction of middleware when the request aborted.
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
When the client aborts the request while processing the request on the server, on_request is called again after on_response.
### Code snippet
```py
... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Optional\n\n\nif TYPE_CHECKING:\n from sanic.request import Request\n from sanic.response import BaseHTTPResponse\n\nfrom asyncio import CancelledError, sleep\n\nfrom sanic.compat import Header\nfrom sanic.exceptions imp... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Optional\n\n\nif TYPE_CHECKING:\n from sanic.request import Request\n from sanic.response import BaseHTTPResponse\n\nfrom asyncio import CancelledError, sleep\n\nfrom sanic.compat import Header\nfrom sanic.exceptions imp... | diff --git a/sanic/http/http1.py b/sanic/http/http1.py
index 304e5e5e04..5884d0b4c3 100644
--- a/sanic/http/http1.py
+++ b/sanic/http/http1.py
@@ -428,7 +428,9 @@ async def error_response(self, exception: Exception) -> None:
if self.request is None:
self.create_empty_request()
- ... |
searxng__searxng-3410 | Yahoo: Result titles getting mixed together
**Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG**
2024.4.19+0f70e4d30
**How did you install SearXNG?**
searxng-docker
**What happened?**
I've noticed that result titles are getting mixed up together when they ... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n\"\"\"Yahoo Search (Web)\n\nLanguages are supported by mapping the language to a domain. If domain is not\nfound in :py:obj:`lang2domain` URL ``<lang>.search.yahoo.com`` is used.\n\n\"\"\"\n\nfrom urllib.parse import (\n unquote,\n urlencode,\n)... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n\"\"\"Yahoo Search (Web)\n\nLanguages are supported by mapping the language to a domain. If domain is not\nfound in :py:obj:`lang2domain` URL ``<lang>.search.yahoo.com`` is used.\n\n\"\"\"\n\nfrom urllib.parse import (\n unquote,\n urlencode,\n)... | diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py
index d5edde21261..305cf523dcd 100644
--- a/searx/engines/yahoo.py
+++ b/searx/engines/yahoo.py
@@ -132,7 +132,8 @@ def response(resp):
continue
url = parse_url(url)
- title = extract_text(result.xpath('.//h3//a/@aria-label'))
+... |
Lightning-AI__pytorch-lightning-1996 | Set precision=16 (using apex) would cause early stopping break
## 🐛 Bug
The current early stopping monitor initilize by comparing if the function monitor_op is equal to torch.lt.
`self.best = torch_inf if self.monitor_op == torch.lt else -torch_inf`
https://github.com/PyTorchLightning/pytorch-lightning/blob/1... | [
{
"content": "r\"\"\"\nEarly Stopping\n==============\n\nMonitor a validation metric and stop training when it stops improving.\n\n\"\"\"\n\nimport numpy as np\nimport torch\n\nfrom pytorch_lightning import _logger as log\nfrom pytorch_lightning.callbacks.base import Callback\nfrom pytorch_lightning.utilities i... | [
{
"content": "r\"\"\"\nEarly Stopping\n==============\n\nMonitor a validation metric and stop training when it stops improving.\n\n\"\"\"\n\nimport numpy as np\nimport torch\n\nfrom pytorch_lightning import _logger as log\nfrom pytorch_lightning.callbacks.base import Callback\nfrom pytorch_lightning.utilities i... | diff --git a/pytorch_lightning/callbacks/early_stopping.py b/pytorch_lightning/callbacks/early_stopping.py
index 61abfb879a666..321cf0a8b13bd 100644
--- a/pytorch_lightning/callbacks/early_stopping.py
+++ b/pytorch_lightning/callbacks/early_stopping.py
@@ -107,7 +107,7 @@ def on_train_start(self, trainer, pl_module):
... |
mlflow__mlflow-6683 | [BUG] Duplicate _SPARK_MODEL_PATH_SUB in mlflow.spark.log_model
### Willingness to contribute
Yes. I would be willing to contribute a fix for this bug with guidance from the MLflow community.
### MLflow version
v1.28.0
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**:
- **Pytho... | [
{
"content": "\"\"\"\nThe ``mlflow.spark`` module provides an API for logging and loading Spark MLlib models. This module\nexports Spark MLlib models with the following flavors:\n\nSpark MLlib (native) format\n Allows models to be loaded as Spark Transformers for scoring in a Spark session.\n Models with ... | [
{
"content": "\"\"\"\nThe ``mlflow.spark`` module provides an API for logging and loading Spark MLlib models. This module\nexports Spark MLlib models with the following flavors:\n\nSpark MLlib (native) format\n Allows models to be loaded as Spark Transformers for scoring in a Spark session.\n Models with ... | diff --git a/mlflow/spark.py b/mlflow/spark.py
index f04c0de151765..4c648ad14355b 100644
--- a/mlflow/spark.py
+++ b/mlflow/spark.py
@@ -231,7 +231,7 @@ def log_model(
# artifact repo via Spark. If this fails, we defer to Model.log().
elif is_local_uri(run_root_artifact_uri) or not _maybe_save_model(
... |
ipython__ipython-7855 | Contents Manager does not get passed config ?
I can't seem to have my custom contents manager receive a config.
In sessionmanager we seem to have `contents_manager = Instance('IPython.html.services.contents.manager.ContentsManager', args=())` but nowhere is it passed parent or config. Is that normal ?
| [
{
"content": "\"\"\"A base class session manager.\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport uuid\nimport sqlite3\n\nfrom tornado import web\n\nfrom IPython.config.configurable import LoggingConfigurable\nfrom IPython.utils.py3compat ... | [
{
"content": "\"\"\"A base class session manager.\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport uuid\nimport sqlite3\n\nfrom tornado import web\n\nfrom IPython.config.configurable import LoggingConfigurable\nfrom IPython.utils.py3compat ... | diff --git a/IPython/html/services/sessions/sessionmanager.py b/IPython/html/services/sessions/sessionmanager.py
index 4f05bf172eb..967c4b16e7a 100644
--- a/IPython/html/services/sessions/sessionmanager.py
+++ b/IPython/html/services/sessions/sessionmanager.py
@@ -16,7 +16,7 @@
class SessionManager(LoggingConfigurable... |
rasterio__rasterio-2080 | 1.2b2 from wheel can't locate proj.db
The PROJ search path isn't set properly. I had thought that the tests run by the wheel builder would find such bugs, but no.
```
$ rio info ~/projects/rasterio/tests/data/RGB.byte.tif
Traceback (most recent call last):
File "rasterio/_base.pyx", line 1455, in rasterio._bas... | [
{
"content": "\"\"\"Rasterio's GDAL/AWS environment\"\"\"\n\nimport attr\nfrom functools import wraps, total_ordering\nfrom inspect import getfullargspec as getargspec\nimport logging\nimport os\nimport re\nimport threading\nimport warnings\n\nfrom rasterio._env import (\n GDALEnv, get_gdal_config, set_g... | [
{
"content": "\"\"\"Rasterio's GDAL/AWS environment\"\"\"\n\nimport attr\nfrom functools import wraps, total_ordering\nfrom inspect import getfullargspec as getargspec\nimport logging\nimport os\nimport re\nimport threading\nimport warnings\n\nfrom rasterio._env import (\n GDALEnv, get_gdal_config, set_g... | diff --git a/rasterio/_env.pyx b/rasterio/_env.pyx
index 16f5ecb20..17f4266c7 100644
--- a/rasterio/_env.pyx
+++ b/rasterio/_env.pyx
@@ -369,6 +369,11 @@ cdef class GDALEnv(ConfigEnv):
path = os.environ["PROJ_LIB"]
set_proj_data_search_path(path)
+ ... |
MongoEngine__mongoengine-873 | No module named 'django.utils.importlib' (Django dev)
In mongoengine/django/mongo_auth/models.py
See https://github.com/django/django/tree/master/django/utils
No module named 'django.utils.importlib' (Django dev)
In mongoengine/django/mongo_auth/models.py
See https://github.com/django/django/tree/master/django/utils
| [
{
"content": "from django.conf import settings\nfrom django.contrib.auth.hashers import make_password\nfrom django.contrib.auth.models import UserManager\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.db import models\nfrom django.utils.importlib import import_module\nfrom django.utils.tr... | [
{
"content": "from django.conf import settings\nfrom django.contrib.auth.hashers import make_password\nfrom django.contrib.auth.models import UserManager\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.db import models\ntry:\n from django.utils.module_loading import import_module\nexcep... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index ae4ba85a2..436671ecb 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -5,6 +5,7 @@ Changelog
Changes in 0.9.X - DEV
======================
+- No module named 'django.utils.importlib' (Django dev) #872
- Field Choices Now Accept Subclasses of Doc... |
litestar-org__litestar-2673 | Bug: OpenAPI schema generation fails with pydantic < 2.0.0
### Description
When pydantic 1.* is installed, interactive API docs cannot be loaded.
It seems the problem is that a helper function is trying to access a `pydantic_v2` attribute without checking if it was imported correctly, the stack trace below provides... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any\n\nfrom typing_extensions import get_type_hints\n\nfrom litestar.types import Empty\nfrom litestar.utils import is_class_and_subclass\nfrom litestar.utils.predicates import is_generic\nfrom litestar.utils.typing import (\n... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any\n\nfrom typing_extensions import get_type_hints\n\nfrom litestar.types import Empty\nfrom litestar.utils import is_class_and_subclass\nfrom litestar.utils.predicates import is_generic\nfrom litestar.utils.typing import (\n... | diff --git a/litestar/contrib/pydantic/utils.py b/litestar/contrib/pydantic/utils.py
index 8a03d6c413..e77d00e30d 100644
--- a/litestar/contrib/pydantic/utils.py
+++ b/litestar/contrib/pydantic/utils.py
@@ -158,7 +158,7 @@ def pydantic_get_unwrapped_annotation_and_type_hints(annotation: Any) -> tuple[A
def is_pydantic... |
beetbox__beets-3302 | TypeError: update_after_write_time() got an unexpected keyword argument 'path'
Beets crashes on the `after_write` signal.
### Problem
```sh
$ beet -v convert -y -d usb playlist:Soul
user configuration: /home/jan/.config/beets/config.yaml
data directory: /home/jan/.config/beets
plugin paths:
/data/jan/Project... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"Populate an item's `added` and `mtime` fields by using the file\nmodification time (mtime) of the item's source file before import.\n\nReimported albums and items are skipped.\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\nimport os\n\... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"Populate an item's `added` and `mtime` fields by using the file\nmodification time (mtime) of the item's source file before import.\n\nReimported albums and items are skipped.\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\nimport os\n\... | diff --git a/beetsplug/importadded.py b/beetsplug/importadded.py
index 36407b14c6..29aeeab0ff 100644
--- a/beetsplug/importadded.py
+++ b/beetsplug/importadded.py
@@ -124,7 +124,7 @@ def update_item_times(self, lib, item):
util.displayable_path(item.path), item.added)
item.stor... |
liberapay__liberapay.com-1140 | GitLab support is broken
`{"error":"API V3 is no longer supported. Use API V4 instead."}`
| [
{
"content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom liberapay.elsewhere._base import PlatformOAuth2\nfrom liberapay.elsewhere._extractors import key\nfrom liberapay.elsewhere._paginators import header_links_paginator\n\n\nclass GitLab(PlatformOAuth2):\n\n ... | [
{
"content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom liberapay.elsewhere._base import PlatformOAuth2\nfrom liberapay.elsewhere._extractors import key\nfrom liberapay.elsewhere._paginators import header_links_paginator\n\n\nclass GitLab(PlatformOAuth2):\n\n ... | diff --git a/liberapay/elsewhere/gitlab.py b/liberapay/elsewhere/gitlab.py
index feb583d7bb..9119eac51e 100644
--- a/liberapay/elsewhere/gitlab.py
+++ b/liberapay/elsewhere/gitlab.py
@@ -26,7 +26,7 @@ class GitLab(PlatformOAuth2):
# http://doc.gitlab.com/ce/api/
api_format = 'json'
api_paginator = header... |
google__timesketch-2243 | gcs-importer fails to read username when importing Plaso db from GCS
**Describe the bug**
When the gcs-importer attempts to import a plaso file from GCS, it fails to read the username from the "requester" field in the .plaso.metadata.json file. This means the import fails.
Jul 14 07:51:58 timesketch-server python3[... | [
{
"content": "# Copyright 2020 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | [
{
"content": "# Copyright 2020 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | diff --git a/contrib/gcs_importer.py b/contrib/gcs_importer.py
index 1636b5a524..76c716b038 100644
--- a/contrib/gcs_importer.py
+++ b/contrib/gcs_importer.py
@@ -168,7 +168,10 @@ def callback(message):
with open(local_metadata_file, "r") as metadata_file:
metadata = json.load(metadata_file)
- us... |
sopel-irc__sopel-495 | [core] idiot-proof Willie: prevent running as root
We should add a check in willie.py to refuse running willie as root.
| [
{
"content": "#!/usr/bin/env python2.7\n#coding: utf8\n\"\"\"\nWillie - An IRC Bot\nCopyright 2008, Sean B. Palmer, inamidst.com\nCopyright © 2012-2014, Elad Alfassa <elad@fedoraproject.org>\nLicensed under the Eiffel Forum License 2.\n\nhttp://willie.dftba.net\n\"\"\"\nfrom __future__ import unicode_literals\n... | [
{
"content": "#!/usr/bin/env python2.7\n#coding: utf8\n\"\"\"\nWillie - An IRC Bot\nCopyright 2008, Sean B. Palmer, inamidst.com\nCopyright © 2012-2014, Elad Alfassa <elad@fedoraproject.org>\nLicensed under the Eiffel Forum License 2.\n\nhttp://willie.dftba.net\n\"\"\"\nfrom __future__ import unicode_literals\n... | diff --git a/willie.py b/willie.py
index b1e2f611d3..64d3d539af 100755
--- a/willie.py
+++ b/willie.py
@@ -92,6 +92,14 @@ def main(argv=None):
'database configuration options.'))
opts = parser.parse_args()
+ try:
+ if os.getuid() == 0 or os.geteuid() == 0:
+ ... |
dbt-labs__dbt-core-2559 | BigQuery project alias is ignored in config
### Describe the bug
A user reported that a config like:
```
{{ config(project='myproject') }}
...
```
has regressed in dbt v0.17.0. While this config worked in a BQ project in dbt v0.16.1, they reported that they needed to change `project` to `database` to apply th... | [
{
"content": "from copy import deepcopy\nfrom dataclasses import dataclass\nfrom typing import List, Iterator, Dict, Any, TypeVar, Union\n\nfrom dbt.config import RuntimeConfig, Project\nfrom dbt.contracts.graph.model_config import BaseConfig, get_config_for\nfrom dbt.exceptions import InternalException\nfrom d... | [
{
"content": "from copy import deepcopy\nfrom dataclasses import dataclass\nfrom typing import List, Iterator, Dict, Any, TypeVar, Union\n\nfrom dbt.config import RuntimeConfig, Project\nfrom dbt.contracts.graph.model_config import BaseConfig, get_config_for\nfrom dbt.exceptions import InternalException\nfrom d... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 384ed38274d..7068a5ba604 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
- dbt compile and ls no longer create schemas if they don't already exist ([#2525](https://github.com/fishtown-analytics/dbt/issues/2525), [#2528](https://github.com/fishtown-analytics/d... |
vyperlang__vyper-3235 | Folding constants can replace `Enum`'s fields
### Version Information
* vyper Version (output of `vyper --version`): 0.3.8+commit.4ae2527f
* OS: OSX
* Python Version (output of `python --version`): 3.8.0
### What's your issue about?
When folding replace user defined constants, it also replace members of `En... | [
{
"content": "import warnings\nfrom typing import Optional, Union\n\nfrom vyper.ast import nodes as vy_ast\nfrom vyper.builtins.functions import DISPATCH_TABLE\nfrom vyper.exceptions import UnfoldableNode, UnknownType\nfrom vyper.semantics.types.base import VyperType\nfrom vyper.semantics.types.utils import typ... | [
{
"content": "import warnings\nfrom typing import Optional, Union\n\nfrom vyper.ast import nodes as vy_ast\nfrom vyper.builtins.functions import DISPATCH_TABLE\nfrom vyper.exceptions import UnfoldableNode, UnknownType\nfrom vyper.semantics.types.base import VyperType\nfrom vyper.semantics.types.utils import typ... | diff --git a/tests/parser/syntax/test_enum.py b/tests/parser/syntax/test_enum.py
index 6860e438c1..2861e91b9f 100644
--- a/tests/parser/syntax/test_enum.py
+++ b/tests/parser/syntax/test_enum.py
@@ -116,6 +116,12 @@ def run() -> Order:
})
""",
"enum Foo:\n" + "\n".join([f" member{i}" for i in rang... |
goauthentik__authentik-3035 | Plans for converting to “Master” to “Main”?
**Describe your question**
In line with many other communities, and the Git project itself, does Authentik plan to change the primary branch to `main`? This process is relatively seamless now, and GitHub will additionally redirect any links which point to `<project>/master` ... | [
{
"content": "\"\"\"root settings for authentik\"\"\"\n\nimport importlib\nimport logging\nimport os\nimport sys\nfrom hashlib import sha512\nfrom json import dumps\nfrom time import time\nfrom urllib.parse import quote_plus\n\nimport structlog\nfrom celery.schedules import crontab\nfrom sentry_sdk import set_t... | [
{
"content": "\"\"\"root settings for authentik\"\"\"\n\nimport importlib\nimport logging\nimport os\nimport sys\nfrom hashlib import sha512\nfrom json import dumps\nfrom time import time\nfrom urllib.parse import quote_plus\n\nimport structlog\nfrom celery.schedules import crontab\nfrom sentry_sdk import set_t... | diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 98eae4be9113..f0f6c2dfcb7f 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,7 +1,7 @@
<!--
👋 Hello there! Welcome.
-Please check the [Contributing guidelines](https://github.com/goauthen... |
kymatio__kymatio-901 | Looks good but we're now missing docstring for `N`, `J` in `scattering_filter_factory`.
Looks good but we're now missing docstring for `N`, `J` in `scattering_filter_factory`.
_Originally posted by @janden in https://github.com/kymatio/kymatio/pull/863#pullrequestreview-1012149453_
So these docstrings need to be ... | [
{
"content": "import numpy as np\nimport math\nimport warnings\nfrom scipy.fft import ifft\n\ndef adaptive_choice_P(sigma, eps=1e-7):\n \"\"\"\n Adaptive choice of the value of the number of periods in the frequency\n domain used to compute the Fourier transform of a Morlet wavelet.\n\n This functio... | [
{
"content": "import numpy as np\nimport math\nimport warnings\nfrom scipy.fft import ifft\n\ndef adaptive_choice_P(sigma, eps=1e-7):\n \"\"\"\n Adaptive choice of the value of the number of periods in the frequency\n domain used to compute the Fourier transform of a Morlet wavelet.\n\n This functio... | diff --git a/kymatio/scattering1d/filter_bank.py b/kymatio/scattering1d/filter_bank.py
index 090e48d2e..1d729c3fd 100644
--- a/kymatio/scattering1d/filter_bank.py
+++ b/kymatio/scattering1d/filter_bank.py
@@ -354,6 +354,12 @@ def scattering_filter_factory(N, J, Q, T, r_psi=math.sqrt(0.5),
Parameters
-------... |
freedomofpress__securedrop-2064 | Release SecureDrop 0.4.1
This is a tracking issue for this week's release of SecureDrop 0.4.1, a bugfix release for #2049. Tasks may get added or modified.
# Prepare release
- [x] Create `release/0.4.1` branch - @redshiftzero
- [x] PR, test and merge the hotfix for #2049 in [this comment](https://github.com/freed... | [
{
"content": "__version__ = '0.4'\n",
"path": "securedrop/version.py"
},
{
"content": "# -*- coding: utf-8 -*-\n#\n# SecureDrop documentation build configuration file, created by\n# sphinx-quickstart on Tue Oct 13 12:08:52 2015.\n#\n# This file is execfile()d with the current directory set to its\n#... | [
{
"content": "__version__ = '0.4.1'\n",
"path": "securedrop/version.py"
},
{
"content": "# -*- coding: utf-8 -*-\n#\n# SecureDrop documentation build configuration file, created by\n# sphinx-quickstart on Tue Oct 13 12:08:52 2015.\n#\n# This file is execfile()d with the current directory set to its\... | diff --git a/changelog.md b/changelog.md
index f880053a8b..f82aeec31e 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.4.1
+
+* Fixes a bug in one of the Tails scripts used to set up the Desktop
+icons for the SecureDrop interfaces (#2049)
+
+The issues for this release were tracked in... |
pytorch__vision-7665 | bug when using PIL backend in classification references
### 🐛 Describe the bug
When I try to train a model using the train.py script under references/classification with the PIL backend, I encounter an error:
```bash
ValueError: backend can be 'tensor' or 'pil', but got pil
```
To reproduce this issue, you can ... | [
{
"content": "import torch\nfrom torchvision.transforms import autoaugment, transforms\nfrom torchvision.transforms.functional import InterpolationMode\n\n\nclass ClassificationPresetTrain:\n def __init__(\n self,\n *,\n crop_size,\n mean=(0.485, 0.456, 0.406),\n std=(0.229... | [
{
"content": "import torch\nfrom torchvision.transforms import autoaugment, transforms\nfrom torchvision.transforms.functional import InterpolationMode\n\n\nclass ClassificationPresetTrain:\n def __init__(\n self,\n *,\n crop_size,\n mean=(0.485, 0.456, 0.406),\n std=(0.229... | diff --git a/references/classification/presets.py b/references/classification/presets.py
index a710f92ae88..0f2c914be7e 100644
--- a/references/classification/presets.py
+++ b/references/classification/presets.py
@@ -69,11 +69,10 @@ def __init__(
backend="pil",
):
trans = []
-
backend = ... |
ansible__awx-13071 | CyberArk Conjur Secret Lookup - Versioning Does Not Work
### Please confirm the following
- [X] I agree to follow this project's [code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
- [X] I have checked the [current issues](https://github.com/ansible/awx/issues) for duplicates.
- ... | [
{
"content": "from .plugin import CredentialPlugin, CertFiles, raise_for_status\n\nimport base64\nfrom urllib.parse import urljoin, quote\n\nfrom django.utils.translation import gettext_lazy as _\nimport requests\n\n\nconjur_inputs = {\n 'fields': [\n {\n 'id': 'url',\n 'label': ... | [
{
"content": "from .plugin import CredentialPlugin, CertFiles, raise_for_status\n\nimport base64\nfrom urllib.parse import urljoin, quote\n\nfrom django.utils.translation import gettext_lazy as _\nimport requests\n\n\nconjur_inputs = {\n 'fields': [\n {\n 'id': 'url',\n 'label': ... | diff --git a/awx/main/credential_plugins/conjur.py b/awx/main/credential_plugins/conjur.py
index 5ae6be27f3cd..1987ff14d919 100644
--- a/awx/main/credential_plugins/conjur.py
+++ b/awx/main/credential_plugins/conjur.py
@@ -81,7 +81,8 @@ def conjur_backend(**kwargs):
# https://www.conjur.org/api.html#secrets-retrie... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.