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 ⌀ |
|---|---|---|---|---|
SeldonIO__MLServer-625 | starting mlserver using `mlserver start .` is not consistent with `mlserver start $PWD`
When I started mlserver using `mlserver start .` in directory tree
```
└── iris1
└── 1
├── model.joblib
└── model-settings.json
```
and settings `{"name":"iris1","implementation":"mlserver_sklearn.SKLear... | [
{
"content": "import os\nimport glob\n\nfrom typing import List\n\nfrom .settings import ModelParameters, ModelSettings\nfrom .errors import ModelNotFound\nfrom .logging import logger\n\nDEFAULT_MODEL_SETTINGS_FILENAME = \"model-settings.json\"\n\n\nclass ModelRepository:\n \"\"\"\n Model repository, resp... | [
{
"content": "import os\nimport glob\n\nfrom typing import List\n\nfrom .settings import ModelParameters, ModelSettings\nfrom .errors import ModelNotFound\nfrom .logging import logger\n\nDEFAULT_MODEL_SETTINGS_FILENAME = \"model-settings.json\"\n\n\nclass ModelRepository:\n \"\"\"\n Model repository, resp... | diff --git a/mlserver/repository.py b/mlserver/repository.py
index 7b41cb377..d0a4f3fd0 100644
--- a/mlserver/repository.py
+++ b/mlserver/repository.py
@@ -24,7 +24,8 @@ async def list(self) -> List[ModelSettings]:
# TODO: Use an async alternative for filesys ops
if self._root:
- pattern... |
open-mmlab__mmocr-1119 | Meaning of Recognition Scores
I am using ABINet to do some text recognition on TorchServe, and my question is very similar to https://github.com/open-mmlab/mmocr/issues/1092
However, in my case I modified https://github.com/open-mmlab/mmocr/blob/main/tools/deployment/mmocr_handler.py#L46 to be `results = model_inferen... | [
{
"content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\n\nimport mmocr.utils as utils\nfrom mmocr.models.builder import CONVERTORS\nfrom .base import BaseConvertor\n\n\n@CONVERTORS.register_module()\nclass AttnConvertor(BaseConvertor):\n \"\"\"Convert between text, index and tensor for e... | [
{
"content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\n\nimport mmocr.utils as utils\nfrom mmocr.models.builder import CONVERTORS\nfrom .base import BaseConvertor\n\n\n@CONVERTORS.register_module()\nclass AttnConvertor(BaseConvertor):\n \"\"\"Convert between text, index and tensor for e... | diff --git a/mmocr/models/textrecog/convertors/attn.py b/mmocr/models/textrecog/convertors/attn.py
index e90f841e4..e17411c4e 100644
--- a/mmocr/models/textrecog/convertors/attn.py
+++ b/mmocr/models/textrecog/convertors/attn.py
@@ -123,6 +123,7 @@ def tensor2idx(self, outputs, img_metas=None):
indexes, scores... |
ray-project__ray-6485 | Fix simple typo: verion -> version
# Issue Type
[x] Bug (Typo)
# Steps to Replicate
1. Examine python/ray/scripts/scripts.py.
2. Search for `verion`.
# Expected Behaviour
1. Should read `version`.
| [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport click\nfrom datetime import datetime\nimport json\nimport logging\nimport os\nimport subprocess\nimport sys\nimport time\n\nimport ray.services as services\nfrom ray.autoscaler.... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport click\nfrom datetime import datetime\nimport json\nimport logging\nimport os\nimport subprocess\nimport sys\nimport time\n\nimport ray.services as services\nfrom ray.autoscaler.... | diff --git a/python/ray/scripts/scripts.py b/python/ray/scripts/scripts.py
index b46d9ca72d76..62bfb52fdfb3 100644
--- a/python/ray/scripts/scripts.py
+++ b/python/ray/scripts/scripts.py
@@ -381,7 +381,7 @@ def start(node_ip_address, redis_address, address, redis_port,
redis_client = services.create_redis_clie... |
oppia__oppia-4165 | Error when running ExplorationStateIdMappingJob
When running ``ExplorationStateIdMappingJob`` on the test server after cherrypicking #4157 an error occurs:
```
Traceback (most recent call last): (third_party/gae-mapreduce-1.9.17.0/mapreduce/handlers.py:508)
File "third_party/gae-mapreduce-1.9.17.0/mapreduce/hand... | [
{
"content": "# coding: utf-8\n#\n# Copyright 2014 The Oppia 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/licen... | [
{
"content": "# coding: utf-8\n#\n# Copyright 2014 The Oppia 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/licen... | diff --git a/core/domain/exp_jobs_one_off.py b/core/domain/exp_jobs_one_off.py
index 51cead1e6e551..f7e6949551d7a 100644
--- a/core/domain/exp_jobs_one_off.py
+++ b/core/domain/exp_jobs_one_off.py
@@ -377,7 +377,7 @@ def map(item):
exp_services.get_multiple_explorations_by_version(
... |
open-mmlab__mmpose-1338 | 框架有很多没有通过测试的Bug
在我运行res50_freihand2d_224x224.py的过程中就碰到了两个问题
1. tools/dist_train.sh里面没有定义$MASTER_ADDR
2. res50_freihand2d_224x224.py 没有定义runner = dict(type='EpochBasedRunner', max_epochs=total_epochs)
其他的还没有跑,但感觉会有很多小问题
发布的版本有点粗糙呀,期待把这些小Bug尽快解决,后续很期待在这个框架上做更多实验
| [
{
"content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport argparse\nimport copy\nimport os\nimport os.path as osp\nimport time\nimport warnings\n\nimport mmcv\nimport torch\nimport torch.distributed as dist\nfrom mmcv import Config, DictAction\nfrom mmcv.runner import get_dist_info, init_dist, set_r... | [
{
"content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport argparse\nimport copy\nimport os\nimport os.path as osp\nimport time\nimport warnings\n\nimport mmcv\nimport torch\nimport torch.distributed as dist\nfrom mmcv import Config, DictAction\nfrom mmcv.runner import get_dist_info, init_dist, set_r... | diff --git a/tools/dist_train.sh b/tools/dist_train.sh
index d4621b51d8..2299ad510a 100755
--- a/tools/dist_train.sh
+++ b/tools/dist_train.sh
@@ -6,6 +6,7 @@ GPUS=$2
NNODES=${NNODES:-1}
NODE_RANK=${NODE_RANK:-0}
PORT=${PORT:-29500}
+MASTER_ADDR=${MASTER_ADDR:-"127.0.0.1"}
PYTHONPATH="$(dirname $0)/..":$PYTHONPAT... |
SciTools__cartopy-515 | Increase tolerance of test_pcolormesh_mercator_wrap.
This is the only test that is affected by matplotlib/matplotlib#15970. The new image is correct, but the difference is small enough to just change the tolerance.
| [
{
"content": "# (C) British Crown Copyright 2011 - 2014, Met Office\n#\n# This file is part of cartopy.\n#\n# cartopy is free software: you can redistribute it and/or modify it under\n# the terms of the GNU Lesser General Public License as published by the\n# Free Software Foundation, either version 3 of the Li... | [
{
"content": "# (C) British Crown Copyright 2011 - 2014, Met Office\n#\n# This file is part of cartopy.\n#\n# cartopy is free software: you can redistribute it and/or modify it under\n# the terms of the GNU Lesser General Public License as published by the\n# Free Software Foundation, either version 3 of the Li... | diff --git a/lib/cartopy/io/srtm.py b/lib/cartopy/io/srtm.py
index 3aa103ccf..f5d98b591 100644
--- a/lib/cartopy/io/srtm.py
+++ b/lib/cartopy/io/srtm.py
@@ -167,8 +167,8 @@ def SRTM3_retrieve(lon, lat):
None will be returned.
"""
- x = '%s%03d' % ('E' if lon > 0 else 'W', abs(int(lon)))
- y = '%s%02d'... |
kornia__kornia-694 | Broken link "InvDepthSmoothnessLoss"
## 📚 Documentation
In the documentation of this function https://kornia.readthedocs.io/en/latest/losses.html#kornia.losses.inverse_depth_smoothness_loss, the link is broken.
```See InvDepthSmoothnessLoss for details.```
The error is due to an incorrect name. The correct na... | [
{
"content": "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n# Based on\n# https://github.com/tensorflow/models/blob/master/research/struct2depth/model.py#L625-L641\n\n\ndef _gradient_x(img: torch.Tensor) -> torch.Tensor:\n assert len(img.shape) == 4, img.shape\n return img[:, :, ... | [
{
"content": "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n# Based on\n# https://github.com/tensorflow/models/blob/master/research/struct2depth/model.py#L625-L641\n\n\ndef _gradient_x(img: torch.Tensor) -> torch.Tensor:\n assert len(img.shape) == 4, img.shape\n return img[:, :, ... | diff --git a/kornia/losses/depth_smooth.py b/kornia/losses/depth_smooth.py
index 1d4f219567..05c6e2f7e6 100644
--- a/kornia/losses/depth_smooth.py
+++ b/kornia/losses/depth_smooth.py
@@ -21,7 +21,7 @@ def inverse_depth_smoothness_loss(
image: torch.Tensor) -> torch.Tensor:
r"""Computes image-aware inverse... |
getsentry__sentry-python-3081 | `sentry-sdk[grpcio]` requires `protobuf`
### How do you use Sentry?
Sentry Saas (sentry.io)
### Version
2.2.0
### Steps to Reproduce
See: https://stackoverflow.com/questions/78488561
Followed Sentry documentation [gRPC](https://docs.sentry.io/platforms/python/integrations/grpc/)
```bash
python3 -m... | [
{
"content": "#!/usr/bin/env python\n\n\"\"\"\nSentry-Python - Sentry SDK for Python\n=====================================\n\n**Sentry-Python is an SDK for Sentry.** Check out `GitHub\n<https://github.com/getsentry/sentry-python>`_ to find out more.\n\"\"\"\n\nimport os\nfrom setuptools import setup, find_pack... | [
{
"content": "#!/usr/bin/env python\n\n\"\"\"\nSentry-Python - Sentry SDK for Python\n=====================================\n\n**Sentry-Python is an SDK for Sentry.** Check out `GitHub\n<https://github.com/getsentry/sentry-python>`_ to find out more.\n\"\"\"\n\nimport os\nfrom setuptools import setup, find_pack... | diff --git a/setup.py b/setup.py
index a8ba845d6f..6c9fedf78c 100644
--- a/setup.py
+++ b/setup.py
@@ -57,7 +57,7 @@ def get_file_text(file_name):
"falcon": ["falcon>=1.4"],
"fastapi": ["fastapi>=0.79.0"],
"flask": ["flask>=0.11", "blinker>=1.1", "markupsafe"],
- "grpcio": ["grpcio>=1.... |
dbt-labs__dbt-core-1690 | alter-table statements during incremental run leads to potential errors on Snowflake
### Describe the bug
For incremental models, DBT generates the following:
```
alter table <table> add column <col>__dbt_alter character varying(17);
update <table> set <col>__dbt_alter = <col>;
alter table <table> drop colum... | [
{
"content": "from __future__ import absolute_import\n\nimport copy\n\nimport dbt.compat\nimport dbt.deprecations\nimport dbt.exceptions\nimport dbt.flags as flags\nimport dbt.clients.gcloud\nimport dbt.clients.agate_helper\n\nfrom dbt.adapters.base import BaseAdapter, available\nfrom dbt.adapters.bigquery impo... | [
{
"content": "from __future__ import absolute_import\n\nimport copy\n\nimport dbt.compat\nimport dbt.deprecations\nimport dbt.exceptions\nimport dbt.flags as flags\nimport dbt.clients.gcloud\nimport dbt.clients.agate_helper\n\nfrom dbt.adapters.base import BaseAdapter, available\nfrom dbt.adapters.bigquery impo... | diff --git a/core/dbt/include/global_project/macros/materializations/snapshot/snapshot.sql b/core/dbt/include/global_project/macros/materializations/snapshot/snapshot.sql
index a52e302d814..6244886c344 100644
--- a/core/dbt/include/global_project/macros/materializations/snapshot/snapshot.sql
+++ b/core/dbt/include/glob... |
deepset-ai__haystack-3170 | Join Nodes produce incorrect results if preceded by another JoinNode
**Describe the bug**
We have a pipeline made up of four Retrievers, whose results are combined in two JoinDocuments nodes, then another JoinDocuments node to combine the results of those prior JoinDocuments. Weights are specified for each Join node.... | [
{
"content": "from __future__ import annotations\nfrom typing import Any, Optional, Dict, List, Tuple, Union, Callable, Type\n\nfrom copy import deepcopy\nfrom abc import ABC, abstractmethod\nfrom functools import wraps\nimport inspect\nimport logging\n\nfrom haystack.schema import Document, MultiLabel\nfrom ha... | [
{
"content": "from __future__ import annotations\nfrom typing import Any, Optional, Dict, List, Tuple, Union, Callable, Type\n\nfrom copy import deepcopy\nfrom abc import ABC, abstractmethod\nfrom functools import wraps\nimport inspect\nimport logging\n\nfrom haystack.schema import Document, MultiLabel\nfrom ha... | diff --git a/haystack/nodes/base.py b/haystack/nodes/base.py
index e21fc8a8eb..d43d92430a 100644
--- a/haystack/nodes/base.py
+++ b/haystack/nodes/base.py
@@ -265,9 +265,9 @@ def _dispatch_run_general(self, run_method: Callable, **kwargs):
if all_debug:
output["_debug"] = all_debug
- # ad... |
openfun__richie-2029 | Frontend feature flags
## Feature Request
**Is your feature request related to a problem or unsupported use case? Please describe.**
We use feature flags configurable through environment variable to show/hide next features. Currently, those flags are only accessible by the backend. Those feature flags should be acc... | [
{
"content": "\"\"\"\nTemplate context processors\n\"\"\"\nimport json\nfrom collections import OrderedDict\nfrom urllib.parse import urlparse\n\nfrom django.conf import settings\nfrom django.contrib.sites.models import Site\nfrom django.core.files.storage import get_storage_class\nfrom django.http.request impo... | [
{
"content": "\"\"\"\nTemplate context processors\n\"\"\"\nimport json\nfrom collections import OrderedDict\nfrom urllib.parse import urlparse\n\nfrom django.conf import settings\nfrom django.contrib.sites.models import Site\nfrom django.core.files.storage import get_storage_class\nfrom django.http.request impo... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2d45a3276a..b35a390cd9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,6 +28,8 @@ information message when the product have no remaining order.
### Changed
+- Bind `settings.FEATURES` into `FRONTEND_CONTEXT['context']`
+through `context_processor`
- Show original... |
qtile__qtile-3507 | XWayland: second xwayland window doesn't receive input
When opening multiple X applications through the new XWayland support, they don't ever receive input. Only the first opened window gets the input, and all input actions done in more recently opened X applications get performed in the first one. When the first windo... | [
{
"content": "# Copyright (c) 2021 Matt Colligan\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 rights\n# to use, copy, ... | [
{
"content": "# Copyright (c) 2021 Matt Colligan\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 rights\n# to use, copy, ... | diff --git a/libqtile/backend/wayland/core.py b/libqtile/backend/wayland/core.py
index 1316087cc7..a60e152837 100644
--- a/libqtile/backend/wayland/core.py
+++ b/libqtile/backend/wayland/core.py
@@ -775,6 +775,7 @@ def focus_window(
elif surface.is_xwayland_surface and isinstance(win.surface, xwayland.Surfac... |
pytorch__examples-229 | Unused import of math in time_sequence_prediction example
The generate_sine_wave.py module imports math on the first line, but doesn't use it. This import should be removed.
| [
{
"content": "import math\nimport numpy as np\nimport torch\nT = 20\nL = 1000\nN = 100\nnp.random.seed(2)\nx = np.empty((N, L), 'int64')\nx[:] = np.array(range(L)) + np.random.randint(-4*T, 4*T, N).reshape(N, 1)\ndata = np.sin(x / 1.0 / T).astype('float64')\ntorch.save(data, open('traindata.pt', 'wb'))\n\n",
... | [
{
"content": "import numpy as np\nimport torch\n\nnp.random.seed(2)\n\nT = 20\nL = 1000\nN = 100\n\nx = np.empty((N, L), 'int64')\nx[:] = np.array(range(L)) + np.random.randint(-4 * T, 4 * T, N).reshape(N, 1)\ndata = np.sin(x / 1.0 / T).astype('float64')\ntorch.save(data, open('traindata.pt', 'wb'))\n",
"pa... | diff --git a/time_sequence_prediction/generate_sine_wave.py b/time_sequence_prediction/generate_sine_wave.py
index 66dd941701..2b6cdf0f46 100644
--- a/time_sequence_prediction/generate_sine_wave.py
+++ b/time_sequence_prediction/generate_sine_wave.py
@@ -1,12 +1,13 @@
-import math
import numpy as np
import torch
+
+n... |
Rapptz__discord.py-5807 | channel.permissions_synced is always False if any category overwrites are set
### Summary
`channel.permissions_synced` is always `False` if any permission overwrites are set in the channel's category, even if the channel's permissions are synced.
### Reproduction Steps
1. In Discord, create a new category and ... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2020 Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, includin... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2020 Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, includin... | diff --git a/discord/abc.py b/discord/abc.py
index 698582e4f010..85bcd203ef5c 100644
--- a/discord/abc.py
+++ b/discord/abc.py
@@ -440,7 +440,7 @@ def permissions_synced(self):
.. versionadded:: 1.3
"""
category = self.guild.get_channel(self.category_id)
- return bool(category and cate... |
helmholtz-analytics__heat-736 | Heat software development status "Beta"
**Related**
--
**Feature functionality**
The software development status in PyPI is listed as "3 - Alpha". We are currently considering Heat as Beta, so this should be reflected in the status, which I propose to set to "4 - Beta".
**Additional context**
--
| [
{
"content": "from setuptools import setup, find_packages\nimport codecs\n\n\nwith codecs.open(\"README.md\", \"r\", \"utf-8\") as handle:\n long_description = handle.read()\n\n__version__ = None # appeases flake, assignment in exec() below\nwith open(\"./heat/core/version.py\") as handle:\n exec(handle.... | [
{
"content": "from setuptools import setup, find_packages\nimport codecs\n\n\nwith codecs.open(\"README.md\", \"r\", \"utf-8\") as handle:\n long_description = handle.read()\n\n__version__ = None # appeases flake, assignment in exec() below\nwith open(\"./heat/core/version.py\") as handle:\n exec(handle.... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e8661ef1f1..a9de9823b1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,7 @@
# Pending additions
- [#717](https://github.com/helmholtz-analytics/heat/pull/717) Switch CPU CI over to Jenkins and pre-commit to GitHub action.
- [#720](https://github.com/helmholtz-an... |
pymeasure__pymeasure-936 | recent changes break MKS937B check_set_errors
It was previously ok that `check_errors` returns `None` (or nothing) as for example in [MKS937B](https://github.com/pymeasure/pymeasure/blob/68f5487b0837e9f3c5debd144a7ddfeb7bddf3e5/pymeasure/instruments/mksinst/mks937b.py#L150).
Recently it got mandatory that the `check... | [
{
"content": "#\n# This file is part of the PyMeasure package.\n#\n# Copyright (c) 2013-2023 PyMeasure Developers\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 restr... | [
{
"content": "#\n# This file is part of the PyMeasure package.\n#\n# Copyright (c) 2013-2023 PyMeasure Developers\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 restr... | diff --git a/pymeasure/instruments/mksinst/mks937b.py b/pymeasure/instruments/mksinst/mks937b.py
index ab2265abe1..9a752cf9eb 100644
--- a/pymeasure/instruments/mksinst/mks937b.py
+++ b/pymeasure/instruments/mksinst/mks937b.py
@@ -155,7 +155,8 @@ def check_set_errors(self):
reply = self._re_response.search(ret... |
voicepaw__so-vits-svc-fork-335 | Colab: Training steps / epochs not appearing on log, only D_0.pth and G_0.pth being created
**Describe the bug**
Ttarining step does not work. The log shows:
2023-04-13 22:53:18.009147: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in perfor... | [
{
"content": "from __future__ import annotations\n\nimport warnings\nfrom logging import getLogger\nfrom multiprocessing import cpu_count\nfrom pathlib import Path\nfrom typing import Any\n\nimport lightning.pytorch as pl\nimport torch\nfrom lightning.pytorch.accelerators import TPUAccelerator\nfrom lightning.p... | [
{
"content": "from __future__ import annotations\n\nimport warnings\nfrom logging import getLogger\nfrom multiprocessing import cpu_count\nfrom pathlib import Path\nfrom typing import Any\n\nimport lightning.pytorch as pl\nimport torch\nfrom lightning.pytorch.accelerators import TPUAccelerator\nfrom lightning.p... | diff --git a/src/so_vits_svc_fork/train.py b/src/so_vits_svc_fork/train.py
index 683b188c..1dce3faa 100644
--- a/src/so_vits_svc_fork/train.py
+++ b/src/so_vits_svc_fork/train.py
@@ -88,7 +88,7 @@ def train(
if hparams.train.get("bf16_run", False)
else 32,
strategy=strategy,
- callback... |
sopel-irc__sopel-943 | MeetBot .startmeeting error
When I type .startmeeting I get this error
/usr/local/lib/python2.7/dist-packages/sopel/config/**init**.py", line 168, in **getattr**)
Running on OSX 10.11
any ideas
thank you
| [
{
"content": "# coding=utf-8\n\"\"\"\nmeetbot.py - Sopel meeting logger module\nCopyright © 2012, Elad Alfassa, <elad@fedoraproject.org>\nLicensed under the Eiffel Forum License 2.\n\nThis module is an attempt to implement at least some of the functionallity of Debian's meetbot\n\"\"\"\nfrom __future__ import u... | [
{
"content": "# coding=utf-8\n\"\"\"\nmeetbot.py - Sopel meeting logger module\nCopyright © 2012, Elad Alfassa, <elad@fedoraproject.org>\nLicensed under the Eiffel Forum License 2.\n\nThis module is an attempt to implement at least some of the functionallity of Debian's meetbot\n\"\"\"\nfrom __future__ import u... | diff --git a/sopel/modules/meetbot.py b/sopel/modules/meetbot.py
index b2fec385b6..8eff1b9aad 100644
--- a/sopel/modules/meetbot.py
+++ b/sopel/modules/meetbot.py
@@ -156,9 +156,6 @@ def startmeeting(bot, trigger):
if trigger.is_privmsg:
bot.say('Can only start meetings in channels')
return
- ... |
saleor__saleor-6833 | Bug in validate_price_precision
### What I'm trying to achieve
Get sane validation obviously.
### Steps to reproduce the problem
1. Try to create a voucher with the minimum order amount set to `2000`
2. It will throw an error.
### What I expected to happen
It shouldn't throw an error.
### Observation
Upon... | [
{
"content": "from typing import TYPE_CHECKING, Optional\n\nfrom django.conf import settings\nfrom django.core.exceptions import ValidationError\nfrom django_prices.utils.formatting import get_currency_fraction\nfrom graphql.error import GraphQLError\n\nif TYPE_CHECKING:\n from decimal import Decimal\n\n\nde... | [
{
"content": "from typing import TYPE_CHECKING, Optional\n\nfrom django.conf import settings\nfrom django.core.exceptions import ValidationError\nfrom django_prices.utils.formatting import get_currency_fraction\nfrom graphql.error import GraphQLError\n\nif TYPE_CHECKING:\n from decimal import Decimal\n\n\nde... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2ca05f3e87d..45cd2464890 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@ All notable, unreleased changes to this project will be documented in this file.
## [Unreleased]
- Deprecate `Shop.geolocalization` query - #6828 by @maarcingebala
+- Price precision ... |
horovod__horovod-1342 | terminate called after throwing an instance of 'gloo::EnforceNotMet' ifa != nullptr. Unable to find address for: eth0
hvd.init() throws following error
```
>>> hvd.init()
terminate called after throwing an instance of 'gloo::EnforceNotMet'
what(): [enforce fail at /tmp/pip-install-3dvzdqhs/horovod/third_party/... | [
{
"content": "# Copyright 2019 Uber Technologies, 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\... | [
{
"content": "# Copyright 2019 Uber Technologies, 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\... | diff --git a/horovod/run/gloo_run.py b/horovod/run/gloo_run.py
index 1deb976a01..28f9a56e55 100644
--- a/horovod/run/gloo_run.py
+++ b/horovod/run/gloo_run.py
@@ -221,7 +221,7 @@ def gloo_run(settings, remote_host_names, common_intfs):
'HOROVOD_GLOO_RENDEZVOUS_PORT={port} '
'HOROVOD_CONTROLLER=gloo '
... |
pyca__cryptography-2285 | Installing cryptography with old pypy builds (and caches) bad wheels
If I install cryptography with pypy 2.5.1, the new cffi build mechanism isn't invoked and I get an installed package without any of the compiled modules. However, pip builds and caches `cryptography-1.0-py2-none-any.whl` which is platform-independent ... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport os\nimport platform\nimport subprocess... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport os\nimport platform\nimport subprocess... | diff --git a/setup.py b/setup.py
index 987f3b996a3d..e71e67609853 100644
--- a/setup.py
+++ b/setup.py
@@ -45,7 +45,13 @@
if sys.version_info < (3, 3):
requirements.append("ipaddress")
-if platform.python_implementation() != "PyPy":
+if platform.python_implementation() == "PyPy":
+ if sys.pypy_version_info <... |
pyro-ppl__pyro-1085 | Possible bug in docs
Should these two `iarange` have different names?
https://github.com/uber/pyro/blob/05e83add8a12b6ebc4bd4ef5846ffd6eb1a326d8/pyro/primitives.py#L230-L231
| [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport copy\nimport logging\nimport numbers\nimport warnings\nfrom collections import OrderedDict\nfrom contextlib import contextmanager\nfrom inspect import isclass\n\nimport torch\n\nimport pyro.distributions as dist\nimport pyr... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport copy\nimport logging\nimport numbers\nimport warnings\nfrom collections import OrderedDict\nfrom contextlib import contextmanager\nfrom inspect import isclass\n\nimport torch\n\nimport pyro.distributions as dist\nimport pyr... | diff --git a/pyro/primitives.py b/pyro/primitives.py
index 3d4b0bccec..5b9b6c292b 100644
--- a/pyro/primitives.py
+++ b/pyro/primitives.py
@@ -228,7 +228,7 @@ class iarange(object):
# This reuses two different independence contexts.
>>> x_axis = iarange('outer', 320, dim=-1)
- >>> y_axis = ia... |
scikit-image__scikit-image-5971 | bug: imsave cannot detect right extension of pathlib
imsave cannot detect right extension of pathlib
```python
from pathlib import Path
from skimage import io
filename = Path("out.jpg")
io.imsave(filename, im) # this saves im as a png file though the extension is jpg
io.imsave("out.jpg", im) #this is wor... | [
{
"content": "import pathlib\n\nimport numpy as np\n\nfrom .._shared.utils import warn\nfrom ..exposure import is_low_contrast\nfrom ..color.colorconv import rgb2gray, rgba2rgb\nfrom ..io.manage_plugins import call_plugin\nfrom .util import file_or_url_context\n\n\n__all__ = ['imread', 'imsave', 'imshow', 'show... | [
{
"content": "import pathlib\n\nimport numpy as np\n\nfrom .._shared.utils import warn\nfrom ..exposure import is_low_contrast\nfrom ..color.colorconv import rgb2gray, rgba2rgb\nfrom ..io.manage_plugins import call_plugin\nfrom .util import file_or_url_context\n\n\n__all__ = ['imread', 'imsave', 'imshow', 'show... | diff --git a/skimage/io/_io.py b/skimage/io/_io.py
index 5c38b096082..b775da9e7ae 100644
--- a/skimage/io/_io.py
+++ b/skimage/io/_io.py
@@ -128,6 +128,8 @@ def imsave(fname, arr, plugin=None, check_contrast=True, **plugin_args):
and largest file size (default 75). This is only available when using
the PIL a... |
python-pillow__Pillow-6973 | Cannot identify .fits file
### What did you do?
Tried using pillow for opening/handling a .fits file for training a machine learning model. According to the documentation opening/reading fits files should be enabled? Or am I misunderstanding how a fits file should be opened?
From Issue [4054](https://github.com/... | [
{
"content": "#\n# The Python Imaging Library\n# $Id$\n#\n# FITS file handling\n#\n# Copyright (c) 1998-2003 by Fredrik Lundh\n#\n# See the README file for information on usage and redistribution.\n#\n\nimport math\n\nfrom . import Image, ImageFile\n\n\ndef _accept(prefix):\n return prefix[:6] == b\"SIMPLE\"... | [
{
"content": "#\n# The Python Imaging Library\n# $Id$\n#\n# FITS file handling\n#\n# Copyright (c) 1998-2003 by Fredrik Lundh\n#\n# See the README file for information on usage and redistribution.\n#\n\nimport math\n\nfrom . import Image, ImageFile\n\n\ndef _accept(prefix):\n return prefix[:6] == b\"SIMPLE\"... | diff --git a/Tests/test_file_fits.py b/Tests/test_file_fits.py
index d2f5a6d1760..3048827e038 100644
--- a/Tests/test_file_fits.py
+++ b/Tests/test_file_fits.py
@@ -44,6 +44,12 @@ def test_naxis_zero():
pass
+def test_comment():
+ image_data = b"SIMPLE = T / comment string"
+ ... |
scikit-image__scikit-image-5280 | Error in documentation for watershed
The [documentation for watershed](https://scikit-image.org/docs/dev/api/skimage.segmentation.html#skimage.segmentation.watershed) says
> image : ndarray (2-D, 3-D, …) of integers
> Data array where the lowest value points are labeled first.
But when I look into the code and t... | [
{
"content": "\"\"\"watershed.py - watershed algorithm\n\nThis module implements a watershed algorithm that apportions pixels into\nmarked basins. The algorithm uses a priority queue to hold the pixels\nwith the metric for the priority queue being pixel value, then the time\nof entry into the queue - this settl... | [
{
"content": "\"\"\"watershed.py - watershed algorithm\n\nThis module implements a watershed algorithm that apportions pixels into\nmarked basins. The algorithm uses a priority queue to hold the pixels\nwith the metric for the priority queue being pixel value, then the time\nof entry into the queue - this settl... | diff --git a/skimage/segmentation/_watershed.py b/skimage/segmentation/_watershed.py
index e5d578d2042..1527c5f27f5 100644
--- a/skimage/segmentation/_watershed.py
+++ b/skimage/segmentation/_watershed.py
@@ -98,7 +98,7 @@ def watershed(image, markers=None, connectivity=1, offset=None, mask=None,
Parameters
... |
docker__docker-py-153 | Support multiple link aliases to same target
This is possible with Docker:
```
docker run -t -i -link redis:db -link redis:db1 -name webapp ubuntu bash
```
But the `links` argument to `start()` in docker-py takes a dictionary mapping name to alias, so multiple aliases are not possible.
Two possible fixes:
1) `links... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | diff --git a/README.md b/README.md
index 1b4e9d788..b79688825 100644
--- a/README.md
+++ b/README.md
@@ -206,6 +206,11 @@ container ports to the host. See "Port bindings" below for more
information. `lxc_conf` allows to pass LXC configuration options using a
dictionary. `privileged` starts the container in privileged... |
liqd__a4-meinberlin-532 | Participated projects visible for all on user profile
If I write a comment on platform meinBerlin and take part in a participation process, everyone can see my profile and in which participation process I took part, even I'm not logged in. It's not anonymous enough.
| [
{
"content": "from django.views.generic.detail import DetailView\n\nfrom adhocracy4.projects.models import Project\n\nfrom . import models\n\n\nclass ProfileView(DetailView):\n model = models.User\n slug_field = 'username'\n\n @property\n def get_participated_projects(self):\n user = self.obj... | [
{
"content": "from django.views.generic.detail import DetailView\n\nfrom . import models\n\n\nclass ProfileView(DetailView):\n model = models.User\n slug_field = 'username'\n",
"path": "apps/users/views.py"
}
] | diff --git a/apps/users/templates/meinberlin_users/user_detail.html b/apps/users/templates/meinberlin_users/user_detail.html
index 7d73662534..d397373eb2 100644
--- a/apps/users/templates/meinberlin_users/user_detail.html
+++ b/apps/users/templates/meinberlin_users/user_detail.html
@@ -9,18 +9,6 @@
<h1 cla... |
quantumlib__Cirq-1937 | ValueError for PhasedXPowGate with integer phase_exponent
`PhasedXPowGate._circuit_diagram_info_` contains a format string that throws a `ValueError` when `phase_exponent` is an `int`. I know the type annotation specifies `float` but mypy allows int.
```
c = cirq.Circuit.from_ops(
cirq.PhasedXPowGate(phase_ex... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/cirq/ops/phased_x_gate.py b/cirq/ops/phased_x_gate.py
index db58c8c8c4f..39bbb50612a 100644
--- a/cirq/ops/phased_x_gate.py
+++ b/cirq/ops/phased_x_gate.py
@@ -152,7 +152,7 @@ def _circuit_diagram_info_(self, args: protocols.CircuitDiagramInfoArgs
args.precision is None):
s = ... |
freedomofpress__securedrop-2997 | Error 500 on app startup when language `en` is in `securedrop_supported_locales`
# Bug
## Description
Using `en` in `securedrop_supported_locales` results in app unable to startup.
Validation logic in both in `develop` (new sdconfig) and in `0.5.2` allow a user to specify `en`
## Steps to Reproduce
- `vagrant ... | [
{
"content": "# -*- mode: python; coding: utf-8 -*-\n#\n# Copyright (C) 2013-2018 Freedom of the Press Foundation & al\n# Copyright (C) 2018 Loic Dachary <loic@dachary.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as... | [
{
"content": "# -*- mode: python; coding: utf-8 -*-\n#\n# Copyright (C) 2013-2018 Freedom of the Press Foundation & al\n# Copyright (C) 2018 Loic Dachary <loic@dachary.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as... | diff --git a/admin/securedrop_admin/__init__.py b/admin/securedrop_admin/__init__.py
index dc6290e6ce..5561e18df4 100755
--- a/admin/securedrop_admin/__init__.py
+++ b/admin/securedrop_admin/__init__.py
@@ -154,7 +154,7 @@ def __init__(self, appdir):
os.path.join(appdir, 'translations'))
def... |
scikit-hep__pyhf-1976 | jsonschema RefResolutionError for 0.6.3 or lower
### Summary
The newest version of `jsonschema` (4.15.0, released today) breaks the current release version of `pyhf` (0.6.3).
### OS / Environment
```console
NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/"
SUP... | [
{
"content": "import jsonschema\nimport pyhf.exceptions\nfrom pyhf.schema.loader import load_schema\nfrom pyhf.schema import variables\nfrom typing import Union, Mapping\n\n\ndef validate(spec: Mapping, schema_name: str, version: Union[str, None] = None):\n \"\"\"\n Validate a provided specification again... | [
{
"content": "import jsonschema\nimport pyhf.exceptions\nfrom pyhf.schema.loader import load_schema\nfrom pyhf.schema import variables\nfrom typing import Union, Mapping\n\n\ndef validate(spec: Mapping, schema_name: str, version: Union[str, None] = None):\n \"\"\"\n Validate a provided specification again... | diff --git a/src/pyhf/schema/validator.py b/src/pyhf/schema/validator.py
index 7edb094288..1f42b46b8e 100644
--- a/src/pyhf/schema/validator.py
+++ b/src/pyhf/schema/validator.py
@@ -27,8 +27,8 @@ def validate(spec: Mapping, schema_name: str, version: Union[str, None] = None):
# note: trailing slash needed for R... |
matrix-org__synapse-12770 | `federation_inbound_events_staging` is not cleared when a room is purged
### Description
since https://github.com/matrix-org/synapse/pull/11806 has been fixed, I now see the following message in my log:
```
2022-01-26 11:21:14,293 - synapse.metrics.background_process_metrics - 244 - ERROR - _handle_old_staged_ev... | [
{
"content": "# Copyright 2020 The Matrix.org Foundation C.I.C.\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 The Matrix.org Foundation C.I.C.\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/changelog.d/12770.bugfix b/changelog.d/12770.bugfix
new file mode 100644
index 000000000000..a958f9a16ba3
--- /dev/null
+++ b/changelog.d/12770.bugfix
@@ -0,0 +1 @@
+Delete events from the `federation_inbound_events_staging` table when a room is purged through the admin API.
diff --git a/synapse/storage/da... |
PaddlePaddle__PaddleSeg-849 | 使用Lovasz loss 训练时出错
训练一段时间之后突然循环报错以下信息(数据集已经通过脚本校验没有问题):
```
--------------------------------------------
C++ Call Stacks (More useful to developers):
--------------------------------------------
0 std::string paddle::platform::GetTraceBackString<char const*>(char const*&&, char const*, int)
1 paddle::platfor... | [
{
"content": "# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | [
{
"content": "# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | diff --git a/legacy/pdseg/lovasz_losses.py b/legacy/pdseg/lovasz_losses.py
index 61d1876de2..1afb09af41 100755
--- a/legacy/pdseg/lovasz_losses.py
+++ b/legacy/pdseg/lovasz_losses.py
@@ -158,6 +158,10 @@ def lovasz_softmax_flat(probas, labels, classes='present'):
class_pred = probas[:, 0]
else:
... |
learningequality__kolibri-6154 | Unselecting topic or resource sets size to import to 0
### Observed behavior
Tested the `0.13.0b2` release on Windows 7. Importing full channels works OK, but as soon as one subtopic or resource checkbox is unchecked, the total size of the content selected drops to zero ~(number is still apparently accurate)~, the num... | [
{
"content": "import hashlib\n\nfrom django.db.models import Sum\nfrom requests.exceptions import ChunkedEncodingError\nfrom requests.exceptions import ConnectionError\nfrom requests.exceptions import HTTPError\nfrom requests.exceptions import Timeout\n\nfrom kolibri.core.content.models import ContentNode\nfrom... | [
{
"content": "import hashlib\n\nfrom django.db.models import Sum\nfrom requests.exceptions import ChunkedEncodingError\nfrom requests.exceptions import ConnectionError\nfrom requests.exceptions import HTTPError\nfrom requests.exceptions import Timeout\n\nfrom kolibri.core.content.models import ContentNode\nfrom... | diff --git a/kolibri/core/content/utils/import_export_content.py b/kolibri/core/content/utils/import_export_content.py
index 9c5a8e47ca1..734b6c7ad64 100644
--- a/kolibri/core/content/utils/import_export_content.py
+++ b/kolibri/core/content/utils/import_export_content.py
@@ -57,8 +57,8 @@ def get_nodes_to_transfer(
... |
kartoza__prj.app-137 | rst export eats utf chars
Characters like ü are eaten in the rst export
Jürgen Fischer becomes Jrgen Fischer etc
| [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"**View classes for Version**\n\n\"\"\"\n\n__author__ = 'Tim Sutton <tim@kartoza.com>'\n__revision__ = '$Format:%H$'\n__date__ = ''\n__license__ = ''\n__copyright__ = ''\n\n# noinspection PyUnresolvedReferences\n# import logging\nfrom base.models import Project\n\n# L... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"**View classes for Version**\n\n\"\"\"\n\n__author__ = 'Tim Sutton <tim@kartoza.com>'\n__revision__ = '$Format:%H$'\n__date__ = ''\n__license__ = ''\n__copyright__ = ''\n\n# noinspection PyUnresolvedReferences\n# import logging\nfrom base.models import Project\n\n# L... | diff --git a/django_project/changes/views/version.py b/django_project/changes/views/version.py
index 26e90aa7f..4e10ed3c6 100644
--- a/django_project/changes/views/version.py
+++ b/django_project/changes/views/version.py
@@ -493,7 +493,7 @@ def render_to_response(self, context, **response_kwargs):
# convert th... |
python__peps-765 | Incorrect rending of Martin von Löwis' name in the PEP index
If you look at https://www.python.org/dev/peps/ you will notice that for e.g. PEP 384, Martin's last name is rendered as "22. Löwis". It turns out the template has an `<ol>` tag that is set to start at 22 for part of Martin's last name.
```html
<ol class="f... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Code for handling object representation of a PEP.\"\"\"\nfrom __future__ import absolute_import\nimport re\nimport sys\nimport textwrap\nimport unicodedata\n\nfrom email.parser import HeaderParser\n\nfrom . import constants\n\n\nclass PEPError(Exception):\n\n def ... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Code for handling object representation of a PEP.\"\"\"\nfrom __future__ import absolute_import\nimport re\nimport sys\nimport textwrap\nimport unicodedata\n\nfrom email.parser import HeaderParser\n\nfrom . import constants\n\n\nclass PEPError(Exception):\n\n def ... | diff --git a/pep0/pep.py b/pep0/pep.py
index b3194afc219..5d8e1215053 100644
--- a/pep0/pep.py
+++ b/pep0/pep.py
@@ -69,6 +69,9 @@ def __init__(self, author_and_email_tuple):
name_sep = name.index(last_name_fragment)
self.first = name[:name_sep].rstrip()
self.last = last_name_fragment
+ ... |
Gallopsled__pwntools-440 | disasm does not work on MIPS
```
In [7]: disasm("\xa2\x0f\x02$\x0c\x01\x01\x01", arch="mips")
[ERROR] There was an error running ['/usr/bin/mips-linux-gnu-objcopy', '-I', 'binary', '-O', 'elf32-littlemips', '-B', 'mips', '--set-section-flags', '.data=code', '--rename-section', '.data=.text', '-w', '-N', '*', '/tmp/pwn-... | [
{
"content": "# -*- coding: utf-8 -*-\nr\"\"\"\nUtilities for assembling and disassembling code.\n\nArchitecture Selection\n------------------------\n\n Architecture, endianness, and word size are selected by using :mod:`pwnlib.context`.\n\n Any parameters which can be specified to ``context`` can also be... | [
{
"content": "# -*- coding: utf-8 -*-\nr\"\"\"\nUtilities for assembling and disassembling code.\n\nArchitecture Selection\n------------------------\n\n Architecture, endianness, and word size are selected by using :mod:`pwnlib.context`.\n\n Any parameters which can be specified to ``context`` can also be... | diff --git a/pwnlib/asm.py b/pwnlib/asm.py
index d1bb54b88..a2d206fed 100644
--- a/pwnlib/asm.py
+++ b/pwnlib/asm.py
@@ -215,7 +215,7 @@ def _bfdname():
'amd64' : 'elf64-x86-64',
'arm' : 'elf32-littlearm',
'thumb' : 'elf32-littlearm',
- 'mips' : 'elf32-%smips' % context.endi... |
zestedesavoir__zds-site-3474 | Suprimmer les « Warning » pour Django 1.9
Les logs via Travis :
```
/home/travis/build/zestedesavoir/zds-site/zds/notification/models.py:19: RemovedInDjango19Warning: Model class zds.notification.models.Subscription doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was ... | [
{
"content": "# flake8: noqa\n\nimport receivers\n",
"path": "zds/notification/__init__.py"
},
{
"content": "# -*- coding: utf-8 -*-s\nfrom smtplib import SMTPException\n\nfrom django.contrib.auth.models import User\nfrom django.contrib.contenttypes.fields import GenericForeignKey\nfrom django.contr... | [
{
"content": "",
"path": "zds/notification/__init__.py"
},
{
"content": "# -*- coding: utf-8 -*-s\nfrom smtplib import SMTPException\n\nfrom django.contrib.auth.models import User\nfrom django.contrib.contenttypes.fields import GenericForeignKey\nfrom django.contrib.contenttypes.models import Conten... | diff --git a/zds/notification/__init__.py b/zds/notification/__init__.py
index b806ad8626..e69de29bb2 100644
--- a/zds/notification/__init__.py
+++ b/zds/notification/__init__.py
@@ -1,3 +0,0 @@
-# flake8: noqa
-
-import receivers
diff --git a/zds/notification/models.py b/zds/notification/models.py
index de3a5dea31..38... |
ipython__ipython-4915 | greedy completer bug in terminal console
i'm back from finishing my thesis and i'm awed by the massive progress over the last few months. i'm particularly fond of the terminal 2-process frontend, which is super-useful to me. alas the greedy completer is not working properly in this mode. if i start a console session wi... | [
{
"content": "\"\"\"Adapt readline completer interface to make ZMQ request.\n\"\"\"\n# -*- coding: utf-8 -*-\nimport readline\ntry:\n from queue import Empty # Py 3\nexcept ImportError:\n from Queue import Empty # Py 2\n\nfrom IPython.config import Configurable\nfrom IPython.utils.traitlets import Float... | [
{
"content": "\"\"\"Adapt readline completer interface to make ZMQ request.\n\"\"\"\n# -*- coding: utf-8 -*-\nimport readline\ntry:\n from queue import Empty # Py 3\nexcept ImportError:\n from Queue import Empty # Py 2\n\nfrom IPython.config import Configurable\nfrom IPython.core.completer import IPComp... | diff --git a/IPython/terminal/console/completer.py b/IPython/terminal/console/completer.py
index 93283b6d06f..ced0728804e 100644
--- a/IPython/terminal/console/completer.py
+++ b/IPython/terminal/console/completer.py
@@ -8,9 +8,10 @@
from Queue import Empty # Py 2
from IPython.config import Configurable
+from ... |
getpelican__pelican-2818 | Plugins run twice in autoreload mode
<!--
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 them first.
-->
<!-- Checked checkbox shou... | [
{
"content": "import importlib\nimport importlib.machinery\nimport importlib.util\nimport logging\nimport pkgutil\nimport sys\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef iter_namespace(ns_pkg):\n # Specifying the second argument (prefix) to iter_modules makes the\n # returned name an absolute name ... | [
{
"content": "import importlib\nimport importlib.machinery\nimport importlib.util\nimport logging\nimport pkgutil\nimport sys\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef iter_namespace(ns_pkg):\n # Specifying the second argument (prefix) to iter_modules makes the\n # returned name an absolute name ... | diff --git a/pelican/plugins/_utils.py b/pelican/plugins/_utils.py
index 4e6ec3c5d..ffe32799b 100644
--- a/pelican/plugins/_utils.py
+++ b/pelican/plugins/_utils.py
@@ -53,6 +53,9 @@ def load_legacy_plugin(plugin, plugin_paths):
if spec is None:
raise ImportError('Cannot import plugin `{}`'.format(plugin)... |
bookwyrm-social__bookwyrm-2235 | 403 when eating book
When I try to rate this book 3 stars, I’m getting a 403 forbidden page.
https://bookwyrm.social/book/102478/s/machines-like-me
I’m attempting to rate it publicly and I’m signed in.
| [
{
"content": "\"\"\" models for storing different kinds of Activities \"\"\"\nfrom dataclasses import MISSING\nimport re\n\nfrom django.apps import apps\nfrom django.core.cache import cache\nfrom django.core.exceptions import PermissionDenied\nfrom django.core.validators import MaxValueValidator, MinValueValida... | [
{
"content": "\"\"\" models for storing different kinds of Activities \"\"\"\nfrom dataclasses import MISSING\nimport re\n\nfrom django.apps import apps\nfrom django.core.cache import cache\nfrom django.core.exceptions import PermissionDenied\nfrom django.core.validators import MaxValueValidator, MinValueValida... | diff --git a/bookwyrm/models/status.py b/bookwyrm/models/status.py
index 3949e09a9b..fce69cae2b 100644
--- a/bookwyrm/models/status.py
+++ b/bookwyrm/models/status.py
@@ -218,7 +218,8 @@ def raise_not_editable(self, viewer):
"""certain types of status aren't editable"""
# first, the standard raise
... |
great-expectations__great_expectations-5630 | Validator throws KeyError 'table.head' while interactively creating Expectation Suite on a BigQuery datasource
**Describe the bug**
I am getting the same error as described in #3540 when interactively creating an Expectation Suite on a BigQuery datasource via CLI. As requested in the discussion, I am opening a new iss... | [
{
"content": "from typing import Any, Dict\n\nimport pandas as pd\n\nfrom great_expectations.core.metric_domain_types import MetricDomainTypes\nfrom great_expectations.execution_engine import (\n PandasExecutionEngine,\n SparkDFExecutionEngine,\n SqlAlchemyExecutionEngine,\n)\nfrom great_expectations.e... | [
{
"content": "from typing import Any, Dict\n\nimport pandas as pd\n\nfrom great_expectations.core.metric_domain_types import MetricDomainTypes\nfrom great_expectations.execution_engine import (\n PandasExecutionEngine,\n SparkDFExecutionEngine,\n SqlAlchemyExecutionEngine,\n)\nfrom great_expectations.e... | diff --git a/great_expectations/expectations/metrics/table_metrics/table_head.py b/great_expectations/expectations/metrics/table_metrics/table_head.py
index 6312fcd566b0..f6db6d127722 100644
--- a/great_expectations/expectations/metrics/table_metrics/table_head.py
+++ b/great_expectations/expectations/metrics/table_met... |
pyqtgraph__pyqtgraph-2595 | PlotCurveItem error with stepMode="center", autoRange and autoVisible
An error is raised when computing the bounds of a PlotCurveItem with stepMode="center" when both enableAutoRange and setAutoVisible are true.
### Code to reproduce
```python
import numpy as np
import pyqtgraph as pg
from PySide6 import QtWidge... | [
{
"content": "from ..Qt import QtCore, QtGui, QtWidgets\n\nHAVE_OPENGL = hasattr(QtWidgets, 'QOpenGLWidget')\nimport math\nimport sys\nimport warnings\n\nimport numpy as np\n\nfrom .. import Qt, debug\nfrom .. import functions as fn\nfrom .. import getConfigOption\nfrom .GraphicsObject import GraphicsObject\n\n... | [
{
"content": "from ..Qt import QtCore, QtGui, QtWidgets\n\nHAVE_OPENGL = hasattr(QtWidgets, 'QOpenGLWidget')\nimport math\nimport sys\nimport warnings\n\nimport numpy as np\n\nfrom .. import Qt, debug\nfrom .. import functions as fn\nfrom .. import getConfigOption\nfrom .GraphicsObject import GraphicsObject\n\n... | diff --git a/pyqtgraph/graphicsItems/PlotCurveItem.py b/pyqtgraph/graphicsItems/PlotCurveItem.py
index e261c8e050..0f93a87565 100644
--- a/pyqtgraph/graphicsItems/PlotCurveItem.py
+++ b/pyqtgraph/graphicsItems/PlotCurveItem.py
@@ -266,6 +266,8 @@ def dataBounds(self, ax, frac=1.0, orthoRange=None):
## If an or... |
urllib3__urllib3-2762 | `python_requires` prevents install of recent urllib3 when using Poetry
### Subject
re: https://github.com/urllib3/urllib3/pull/1309#issuecomment-356650894
I no longer see the suggestion of including `<4` in the link referenced earlier in that PR (content relocated to https://packaging.python.org/en/latest/guides/... | [
{
"content": "#!/usr/bin/env python\n# This file is protected via CODEOWNERS\n\nimport codecs\nimport os\nimport re\n\nfrom setuptools import setup\n\nbase_path = os.path.dirname(__file__)\n\n# Get the version (borrowed from SQLAlchemy)\nwith open(os.path.join(base_path, \"src\", \"urllib3\", \"_version.py\")) ... | [
{
"content": "#!/usr/bin/env python\n# This file is protected via CODEOWNERS\n\nimport codecs\nimport os\nimport re\n\nfrom setuptools import setup\n\nbase_path = os.path.dirname(__file__)\n\n# Get the version (borrowed from SQLAlchemy)\nwith open(os.path.join(base_path, \"src\", \"urllib3\", \"_version.py\")) ... | diff --git a/setup.py b/setup.py
index 45f5aededd..854e4798d6 100755
--- a/setup.py
+++ b/setup.py
@@ -82,7 +82,7 @@
],
package_dir={"": "src"},
requires=[],
- python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4",
+ python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3... |
comic__grand-challenge.org-2386 | Cannot resolve keyword 'name' into field.
See https://sentry.io/organizations/grand-challenge/issues/3186162930/?alert_rule_id=389098&alert_timestamp=1649749100615&alert_type=email&environment=production&project=303639&referrer=alert_email
| [
{
"content": "import csv\n\nfrom django.contrib import messages\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.mixins import PermissionRequiredMixin\nfrom django.contrib.messages.views import SuccessMessageMixin\nfrom django.core.exceptions import (\n NON_FIELD_ERRORS,\n Permiss... | [
{
"content": "import csv\n\nfrom django.contrib import messages\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.mixins import PermissionRequiredMixin\nfrom django.contrib.messages.views import SuccessMessageMixin\nfrom django.core.exceptions import (\n NON_FIELD_ERRORS,\n Permiss... | diff --git a/app/grandchallenge/reader_studies/views.py b/app/grandchallenge/reader_studies/views.py
index 4c3b6a7558..91417f3167 100644
--- a/app/grandchallenge/reader_studies/views.py
+++ b/app/grandchallenge/reader_studies/views.py
@@ -340,7 +340,7 @@ class ReaderStudyDisplaySetList(
raise_exception = True
... |
voicepaw__so-vits-svc-fork-354 | UnpicklingError: Weights only load failed. Unpickler error: Unsupported class numpy.core.multiarray._reconstruct
**Describe the bug**
I tried to update, but I got this exception start from version 3.6.0 during inference
```
UnpicklingError: Weights only load failed. Re-running `torch.load` with `weights_only` set to... | [
{
"content": "from __future__ import annotations\n\nfrom pathlib import Path\nfrom typing import Any\n\nimport torch\nfrom sklearn.cluster import KMeans\n\n\ndef get_cluster_model(ckpt_path: Path | str):\n with Path(ckpt_path).open(\"rb\") as f:\n checkpoint = torch.load(f, map_location=\"cpu\", weigh... | [
{
"content": "from __future__ import annotations\n\nfrom pathlib import Path\nfrom typing import Any\n\nimport torch\nfrom sklearn.cluster import KMeans\n\n\ndef get_cluster_model(ckpt_path: Path | str):\n with Path(ckpt_path).open(\"rb\") as f:\n checkpoint = torch.load(\n f, map_location=... | diff --git a/src/so_vits_svc_fork/cluster/__init__.py b/src/so_vits_svc_fork/cluster/__init__.py
index bbe9def2..91552237 100644
--- a/src/so_vits_svc_fork/cluster/__init__.py
+++ b/src/so_vits_svc_fork/cluster/__init__.py
@@ -9,7 +9,9 @@
def get_cluster_model(ckpt_path: Path | str):
with Path(ckpt_path).open("... |
open-telemetry__opentelemetry-python-contrib-1427 | [opentelemetry-instrumentation-redis] Stop sending db.name argument or rename it to redis[0-15]
Hi! I've been recently playing with OpenTelemetry for Python (Flask) application and noticed that for Redis **db.name** argument is send to OpenTelemetry collector which seems to be a number of database (integer). This seems... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 45163e7889..cc71d38d2c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,6 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#1424](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1424))
- `opentelemetry-i... |
ansible-collections__community.general-6562 | Proxmox_task_info api_password required along with api_user
### Summary
Cannot use the module with token id and secret only:
```
module = AnsibleModule(
argument_spec=module_args,
required_together=[('api_token_id', 'api_token_secret'),
('api_user', 'api_pa... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2021, Andreas Botzner (@paginabianca) <andreas at botzner dot com>\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)\n# SPDX-License-Identifier: GPL-3.0-or-later\n\nfrom ... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2021, Andreas Botzner (@paginabianca) <andreas at botzner dot com>\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)\n# SPDX-License-Identifier: GPL-3.0-or-later\n\nfrom ... | diff --git a/changelogs/fragments/6554-proxmox-tasks-info-fix-required-password.yaml b/changelogs/fragments/6554-proxmox-tasks-info-fix-required-password.yaml
new file mode 100644
index 00000000000..6edfa475c1f
--- /dev/null
+++ b/changelogs/fragments/6554-proxmox-tasks-info-fix-required-password.yaml
@@ -0,0 +1,3 @@
+... |
kivy__kivy-4359 | Loader never uses error_image on image loading error
I am using an AsyncImage to load network images, and sometimes the images are not available (404 Error) or cannot be loaded by some other reasons. In those cases, I would expect to get the Loader.error_image, but instead the Loader.loading_image keeps being used, whi... | [
{
"content": "'''\nAsynchronous data loader\n========================\n\nThis is the Asynchronous Loader. You can use it to load an image\nand use it, even if data are not yet available. You must specify a default\nloading image when using the loader::\n\n from kivy.loader import Loader\n image = Loader.i... | [
{
"content": "'''\nAsynchronous data loader\n========================\n\nThis is the Asynchronous Loader. You can use it to load an image\nand use it, even if data are not yet available. You must specify a default\nloading image when using the loader::\n\n from kivy.loader import Loader\n image = Loader.i... | diff --git a/kivy/loader.py b/kivy/loader.py
index b72c5887ce..dc18f185d9 100644
--- a/kivy/loader.py
+++ b/kivy/loader.py
@@ -348,7 +348,8 @@ def gettype(info):
Logger.exception('Loader: Failed to load image <%s>' % filename)
# close file when remote file not found or download error
... |
django-tastypie__django-tastypie-1544 | TypeError: 'NoneType' object is not iterable
I'm hitting what appears to be a logic error in the `dehydrate` method of `ToManyField` class in _fields.py_:
The code in question starts at line 856:
```
if the_m2ms is None:
if not self.null:
raise ApiFieldError("The model '%r' has... | [
{
"content": "from __future__ import unicode_literals\n\nimport datetime\nfrom dateutil.parser import parse\nimport decimal\nfrom decimal import Decimal\nimport importlib\n\nfrom django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned\nfrom django.db import models\ntry:\n from django.db.mod... | [
{
"content": "from __future__ import unicode_literals\n\nimport datetime\nfrom dateutil.parser import parse\nimport decimal\nfrom decimal import Decimal\nimport importlib\n\nfrom django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned\nfrom django.db import models\ntry:\n from django.db.mod... | diff --git a/tastypie/fields.py b/tastypie/fields.py
index 13b71c854..03ae23415 100644
--- a/tastypie/fields.py
+++ b/tastypie/fields.py
@@ -856,6 +856,7 @@ def dehydrate(self, bundle, for_list=True):
if the_m2ms is None:
if not self.null:
raise ApiFieldError("The model '%r' has a... |
holoviz__panel-5490 | --autoreload does not work in Panel 1.2.2
Run this code with `panel serve --autoreload tmp.py` and change the end to 2 the
``` python
# tmp.py
import panel as pn
pn.widgets.IntSlider(end=1).servable()
```
A git bisect indicates https://github.com/holoviz/panel/pull/5344 is the culprit.
| [
{
"content": "\"\"\"\nDefines callbacks to be executed on a thread or by scheduling it\non a running bokeh server.\n\"\"\"\nimport asyncio\nimport inspect\nimport logging\nimport time\n\nfrom functools import partial\n\nimport param\n\nfrom ..util import edit_readonly, function_name\nfrom .logging import LOG_PE... | [
{
"content": "\"\"\"\nDefines callbacks to be executed on a thread or by scheduling it\non a running bokeh server.\n\"\"\"\nimport asyncio\nimport inspect\nimport logging\nimport time\n\nfrom functools import partial\n\nimport param\n\nfrom ..util import edit_readonly, function_name\nfrom .logging import LOG_PE... | diff --git a/panel/io/callbacks.py b/panel/io/callbacks.py
index e762b1e517..24e373ea9a 100644
--- a/panel/io/callbacks.py
+++ b/panel/io/callbacks.py
@@ -84,7 +84,7 @@ def _exec_callback(self, post=False):
with set_curdoc(self._doc):
if self.running:
self.counter += 1... |
open-mmlab__mmpose-293 | Pylint: W0223
```bash
mmpose/models/detectors/bottom_up.py:19:0: W0223: Method 'simple_test' is abstract in class 'BasePose' but is not overridden (abstract-method)
mmpose/models/detectors/top_down.py:18:0: W0223: Method 'simple_test' is abstract in class 'BasePose' but is not overridden (abstract-method)
```
| [
{
"content": "from abc import ABCMeta, abstractmethod\nfrom collections import OrderedDict\n\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\n\n\nclass BasePose(nn.Module):\n \"\"\"Base class for pose detectors.\n\n All recognizers should subclass it.\n All subclass should overwr... | [
{
"content": "from abc import ABCMeta, abstractmethod\nfrom collections import OrderedDict\n\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\n\n\nclass BasePose(nn.Module):\n \"\"\"Base class for pose detectors.\n\n All recognizers should subclass it.\n All subclass should overwr... | diff --git a/mmpose/models/detectors/base.py b/mmpose/models/detectors/base.py
index f5ccae4709..8e59702be9 100644
--- a/mmpose/models/detectors/base.py
+++ b/mmpose/models/detectors/base.py
@@ -31,10 +31,6 @@ def forward_train(self, img, img_metas, **kwargs):
def forward_test(self, img, img_metas, **kwargs):
... |
akvo__akvo-rsr-1754 | Bug in IATI checks for planned disbursements
## Test plan
GIVEN a project with a planned disbursement
WHEN the IATI checks are performed (MyRSR -> My IATI -> Select organisation -> Perform checks)
THEN the checks should not crash
## Issue description
There is a small bug in the IATI checks for planned disbursements, ... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\nfrom datet... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\nfrom datet... | diff --git a/akvo/iati/checks/v201.py b/akvo/iati/checks/v201.py
index 45403c761f..5c10790c2c 100644
--- a/akvo/iati/checks/v201.py
+++ b/akvo/iati/checks/v201.py
@@ -434,7 +434,7 @@ def planned_disbursements(self):
checks = []
for pd in self.project.planned_disbursements.all():
- if not ... |
aws__aws-cli-3026 | aws s3 sync racing with local files
I'm having an issue with S3 sync bombing when local files (which would be excluded anyway) are removed by another process.
I found issue #2333, and updated to the latest release, but the issue persists. I think there is more that needs to be done to avoid these races.
| [
{
"content": "# Copyright 2013 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 2013 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/s3/filegenerator.py b/awscli/customizations/s3/filegenerator.py
index f972f316b4a5..4c0c7729776e 100644
--- a/awscli/customizations/s3/filegenerator.py
+++ b/awscli/customizations/s3/filegenerator.py
@@ -214,7 +214,7 @@ def list_files(self, path, dir_op):
def _safely_get_file_sta... |
saleor__saleor-10712 | Order number not available in ORDER_CONFIRMED event
### What I'm trying to achieve
Get all order detail included order number field in ORDER_CONFIRMED event
### Steps to reproduce the problem
<!-- Adding logs from the console, as well as query/response help us fix the bug faster -->
1. Confirm an order
2. The we... | [
{
"content": "import json\nimport uuid\nfrom collections import defaultdict\nfrom dataclasses import asdict\nfrom decimal import Decimal\nfrom typing import TYPE_CHECKING, Any, DefaultDict, Dict, Iterable, List, Optional, Set\n\nimport graphene\nfrom django.contrib.auth.models import AnonymousUser\nfrom django.... | [
{
"content": "import json\nimport uuid\nfrom collections import defaultdict\nfrom dataclasses import asdict\nfrom decimal import Decimal\nfrom typing import TYPE_CHECKING, Any, DefaultDict, Dict, Iterable, List, Optional, Set\n\nimport graphene\nfrom django.contrib.auth.models import AnonymousUser\nfrom django.... | diff --git a/saleor/webhook/payloads.py b/saleor/webhook/payloads.py
index d503b7201ae..cfd2c3ffe9e 100644
--- a/saleor/webhook/payloads.py
+++ b/saleor/webhook/payloads.py
@@ -296,6 +296,7 @@ def generate_order_payload(
extra_dict_data = {
"id": graphene.Node.to_global_id("Order", order.id),
"to... |
Lightning-AI__torchmetrics-1860 | off-by-one in MultiClassJaccard ignore_index handling
## 🐛 Bug
I believe the bugfix https://github.com/Lightning-AI/torchmetrics/pull/1386 introduced aother bug when computing `MulticlassJaccardIndex`.
This bug appears when `num_classes == ignore_index`.
### To Reproduce
<details>
<summary>Code sample</su... | [
{
"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 6e355c900ad..997938ee05b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -221,6 +221,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed number of bugs related to `average="macro"` in classification metrics ([#1821](https://github... |
feast-dev__feast-3766 | Feast ui cannot parse url path
## Expected Behavior
One of example cases:
When user navigate localhost:8888/p/order_count_project/feature-view/user_3_and_7_days_order_count should see related feature-view page
## Current Behavior
One of example cases:
When user navigate localhost:8888/p/order_count_project/... | [
{
"content": "import json\nimport threading\nfrom typing import Callable, Optional\n\nimport importlib_resources\nimport uvicorn\nfrom fastapi import FastAPI, Response\nfrom fastapi.middleware.cors import CORSMiddleware\nfrom fastapi.staticfiles import StaticFiles\n\nimport feast\n\n\ndef get_app(\n store: \... | [
{
"content": "import json\nimport threading\nfrom typing import Callable, Optional\n\nimport importlib_resources\nimport uvicorn\nfrom fastapi import FastAPI, Response\nfrom fastapi.middleware.cors import CORSMiddleware\nfrom fastapi.staticfiles import StaticFiles\n\nimport feast\n\n\ndef get_app(\n store: \... | diff --git a/sdk/python/feast/ui_server.py b/sdk/python/feast/ui_server.py
index 9950eea070f..8a39293f918 100644
--- a/sdk/python/feast/ui_server.py
+++ b/sdk/python/feast/ui_server.py
@@ -77,7 +77,7 @@ def read_registry():
# For all other paths (such as paths that would otherwise be handled by react router), pass... |
plone__Products.CMFPlone-1417 | Return HTTP errors in proper format
Proposer: Eric Brehault
Seconder:
# Motivation
When a page does not exist, or has an error, or is not allowed for the user, Plone returns the appropriate HTTP error (404, 500, ...), and the response is a human readable page, properly skinned, which nice for the user.
And if the requ... | [
{
"content": "## Script (Python) \"standard_error_message\"\n##bind container=container\n##bind context=context\n##bind namespace=\n##bind script=script\n##bind subpath=traverse_subpath\n##parameters=**kwargs\n##title=Dispatches to relevant error view\n\n## by default we handle everything in 1 PageTemplate.\n# ... | [
{
"content": "## Script (Python) \"standard_error_message\"\n##bind container=container\n##bind context=context\n##bind namespace=\n##bind script=script\n##bind subpath=traverse_subpath\n##parameters=**kwargs\n##title=Dispatches to relevant error view\n\n## by default we handle everything in 1 PageTemplate.\n# ... | diff --git a/CHANGES.rst b/CHANGES.rst
index c2e0192517..4aee29a7ff 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -73,6 +73,10 @@ Fixes:
- Sort relateditems tree by sortable_title in tinymce.
[Gagaro]
+- Return a JSON error instead of a the Plone error page when the requested
+ resource is not text/html (fix #63... |
getnikola__nikola-1145 | Never copy/list listings/*.py[co]
kinda related to invariance
| [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2014 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2014 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi... | diff --git a/nikola/plugins/task/listings.py b/nikola/plugins/task/listings.py
index 86be6c4946..b2ef6e371c 100644
--- a/nikola/plugins/task/listings.py
+++ b/nikola/plugins/task/listings.py
@@ -92,6 +92,7 @@ def render_listing(in_name, out_name, folders=[], files=[]):
template_deps = self.site.template_syst... |
zestedesavoir__zds-site-5839 | L'éditeur moderne n'est pas chargé sur l'édition de profile
**Description du bug**
Lorsqu'on essaye de modifier sa biographie en ayant activé l'éditeur moderne (easymde), l'éditeur n'est pas chargé.
**Comment reproduire ?**
La liste des étapes qui permet de reproduire le bug :
1. Allez sur le site en local
... | [
{
"content": "from django import forms\nfrom django.conf import settings\nfrom django.contrib.auth import authenticate\nfrom django.contrib.auth.models import User, Group\nfrom django.urls import reverse\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom captcha.fields import ReCaptchaField\nfrom ... | [
{
"content": "from django import forms\nfrom django.conf import settings\nfrom django.contrib.auth import authenticate\nfrom django.contrib.auth.models import User, Group\nfrom django.urls import reverse\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom captcha.fields import ReCaptchaField\nfrom ... | diff --git a/zds/member/forms.py b/zds/member/forms.py
index 55e2ff91da..4d33e25914 100644
--- a/zds/member/forms.py
+++ b/zds/member/forms.py
@@ -281,6 +281,7 @@ def __init__(self, *args, **kwargs):
self.fields['options'].initial += 'email_for_new_mp'
layout = Layout(
+ IncludeEasyMD... |
dotkom__onlineweb4-839 | Information "leak" through phone numbers
It has been reported that searching for phone numbers will reveal the user even though the user has hidden the information. Just confirmed this.
Do we consider this a problem? On one side if you already have the number, what is the problem? On the other side, users explicitly ... | [
{
"content": "# -*- coding: utf-8 -*-\nimport re\n\nfrom django import forms\nfrom django.utils.translation import ugettext as _\n\nfrom apps.profiles.models import Privacy\nfrom apps.authentication.models import OnlineUser, FIELD_OF_STUDY_CHOICES, Position\n\nclass ProfileForm(forms.ModelForm):\n\n class Me... | [
{
"content": "# -*- coding: utf-8 -*-\nimport re\n\nfrom django import forms\nfrom django.utils.translation import ugettext as _\n\nfrom apps.profiles.models import Privacy\nfrom apps.authentication.models import OnlineUser, FIELD_OF_STUDY_CHOICES, Position\n\nclass ProfileForm(forms.ModelForm):\n\n class Me... | diff --git a/apps/authentication/models.py b/apps/authentication/models.py
index 394f0d7fb..ee9f826e6 100644
--- a/apps/authentication/models.py
+++ b/apps/authentication/models.py
@@ -298,4 +298,4 @@ class Meta:
# Register OnlineUser in watson index for searching
-watson.register(OnlineUser)
+watson.register(Onli... |
strawberry-graphql__strawberry-2306 | Fix enum_value handling for inputs
A clean and easy solution for fixing the broken enum_value handling for inputs
Closes https://github.com/strawberry-graphql/strawberry/issues/2305
Closes https://github.com/strawberry-graphql/strawberry/pull/2203
Closes https://github.com/strawberry-graphql/strawberry/pull/2185
... | [
{
"content": "import dataclasses\nfrom enum import EnumMeta\nfrom typing import (\n Any,\n Callable,\n Iterable,\n List,\n Mapping,\n Optional,\n TypeVar,\n Union,\n overload,\n)\n\nfrom strawberry.type import StrawberryType\n\nfrom .exceptions import ObjectIsNotAnEnumError\n\n\n@data... | [
{
"content": "import dataclasses\nfrom enum import EnumMeta\nfrom typing import (\n Any,\n Callable,\n Iterable,\n List,\n Mapping,\n Optional,\n TypeVar,\n Union,\n overload,\n)\n\nfrom strawberry.type import StrawberryType\n\nfrom .exceptions import ObjectIsNotAnEnumError\n\n\n@data... | diff --git a/RELEASE.md b/RELEASE.md
new file mode 100644
index 0000000000..06571eccde
--- /dev/null
+++ b/RELEASE.md
@@ -0,0 +1,22 @@
+Release type: patch
+
+This release fixes an issue that prevented using enums that
+were using strawberry.enum_value, like the following example:
+
+```python
+from enum import Enum
+i... |
nonebot__nonebot2-1757 | Bug: `Adapter.bot_disconnect` 不应允许关闭其他适配器创建的 bot
**描述问题:**
当前的 `bot_disconnect` 只会根据 `bot.self_id` 关闭对应 bot。如果 `OneBot V12` 适配器调用 `bot_disconnect` 也能将 `OneBot V11` 适配器创建的 bot 移除。
**如何复现?**
<https://github.com/nonebot/adapter-onebot/pull/45>
<https://github.com/he0119/CoolQBot/issues/264>
**期望的结果**
如果关闭的... | [
{
"content": "import abc\nfrom contextlib import asynccontextmanager\nfrom typing import Any, Dict, AsyncGenerator\n\nfrom nonebot.config import Config\nfrom nonebot.internal.driver import (\n Driver,\n Request,\n Response,\n WebSocket,\n ForwardDriver,\n ReverseDriver,\n HTTPServerSetup,\n... | [
{
"content": "import abc\nfrom contextlib import asynccontextmanager\nfrom typing import Any, Dict, AsyncGenerator\n\nfrom nonebot.config import Config\nfrom nonebot.internal.driver import (\n Driver,\n Request,\n Response,\n WebSocket,\n ForwardDriver,\n ReverseDriver,\n HTTPServerSetup,\n... | diff --git a/nonebot/internal/adapter/adapter.py b/nonebot/internal/adapter/adapter.py
index 298ab143a824..4748a0ad59f6 100644
--- a/nonebot/internal/adapter/adapter.py
+++ b/nonebot/internal/adapter/adapter.py
@@ -66,8 +66,9 @@ def bot_disconnect(self, bot: Bot) -> None:
参数:
bot: {ref}`nonebot.ad... |
spack__spack-11648 | Installation issue: lua-luafilesystem
I have a nightly CI build that now dies while trying to do a `spack install lua-luafilesystem`. This occurred upon the the merge of #11528
In other words, I am seeing that `lua-luafilesystem` will not install using commit eb584d8 but will install from 8e3fd3f.
This is on Ce... | [
{
"content": "# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport os.path\n\n\nclass LuaLuafilesystem(Package):\n \"\"\"LuaFileSystem is a Lua library ... | [
{
"content": "# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport os.path\n\n\nclass LuaLuafilesystem(Package):\n \"\"\"LuaFileSystem is a Lua library ... | diff --git a/var/spack/repos/builtin/packages/lua-luafilesystem/package.py b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
index 65e259b660b43a..372e71a27eaa7d 100644
--- a/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
+++ b/var/spack/repos/builtin/packages/lua-luafilesystem/package.py
@... |
dotkom__onlineweb4-2102 | Updating "My profile" does not save all profile fields
## What kind of an issue is this?
- [x] Bug report
- [ ] Feature request
## What is the expected behaviour?
Seeing my post number at my [profile overview page](https://online.ntnu.no/profile/overview/)
## What is the current behaviour?
Seeing `None ... | [
{
"content": "# -*- coding: utf-8 -*-\nimport re\n\nfrom django import forms\nfrom django.contrib import auth\nfrom django.utils.translation import ugettext as _\n\nfrom apps.authentication.models import OnlineUser, Position\nfrom apps.profiles.models import Privacy\n\nZIP_CODE_VALIDATION_ERROR = \"Postnummer m... | [
{
"content": "# -*- coding: utf-8 -*-\nimport re\n\nfrom django import forms\nfrom django.contrib import auth\nfrom django.utils.translation import ugettext as _\n\nfrom apps.authentication.models import OnlineUser, Position\nfrom apps.profiles.models import Privacy\n\nZIP_CODE_VALIDATION_ERROR = \"Postnummer m... | diff --git a/apps/profiles/forms.py b/apps/profiles/forms.py
index 24e14306b..ba8bfbe69 100644
--- a/apps/profiles/forms.py
+++ b/apps/profiles/forms.py
@@ -37,9 +37,11 @@ class Meta(object):
def clean_zip_code(self):
zip_code = self.cleaned_data['zip_code']
- if zip_code and len(zip_code) != 0 a... |
biolab__orange3-6457 | Save: Retain data types
<!--
Thanks for taking the time to report a bug!
If you're raising an issue about an add-on (i.e., installed via Options > Add-ons), raise an issue in the relevant add-on's issue tracker instead. See: https://github.com/biolab?q=orange3
To fix the bug, we need to be able to reproduce it. Ple... | [
{
"content": "import pickle\nimport re\nimport sys\nimport warnings\nfrom typing import Iterable, Optional, Tuple, List, Generator, Callable, Any\n\nfrom ast import literal_eval\nfrom collections import OrderedDict\nfrom functools import lru_cache\nfrom itertools import chain, repeat\nfrom math import isnan\n\n... | [
{
"content": "import pickle\nimport re\nimport sys\nimport warnings\nfrom typing import Iterable, Optional, Tuple, List, Generator, Callable, Any\n\nfrom ast import literal_eval\nfrom collections import OrderedDict\nfrom functools import lru_cache\nfrom itertools import chain, repeat\nfrom math import isnan\n\n... | diff --git a/Orange/data/io_base.py b/Orange/data/io_base.py
index 67722099538..629fce5285a 100644
--- a/Orange/data/io_base.py
+++ b/Orange/data/io_base.py
@@ -654,7 +654,7 @@ def formatter(cls, var):
if var.is_time:
return var.repr_val
elif var.is_continuous:
- return lambda ... |
qutebrowser__qutebrowser-3509 | New completion: "Database is locked" errors
Around once a week I get a report with something similar to this:
```
20:42:34 DEBUG sql sql:run:99 Running SQL query: "SELECT EXISTS(SELECT * FROM History WHERE url = :val)"
20:42:34 DEBUG sql sql:run:102 query bindings: {':val': 'https://wiki.archli... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2016-2017 Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as pub... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2016-2017 Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as pub... | diff --git a/qutebrowser/misc/sql.py b/qutebrowser/misc/sql.py
index 00527e7fef9..65a93a4613b 100644
--- a/qutebrowser/misc/sql.py
+++ b/qutebrowser/misc/sql.py
@@ -115,6 +115,11 @@ def init(db_path):
raise SqliteError("Failed to open sqlite database at {}: {}"
.format(db_path, error... |
deepset-ai__haystack-7249 | API Docs - `haystack.dataclasses`
| [
{
"content": "import hashlib\nimport io\nimport logging\nfrom dataclasses import asdict, dataclass, field, fields\nfrom typing import Any, Dict, List, Optional\n\nfrom numpy import ndarray\nfrom pandas import DataFrame, read_json\n\nfrom haystack.dataclasses.byte_stream import ByteStream\n\nlogger = logging.get... | [
{
"content": "import hashlib\nimport io\nimport logging\nfrom dataclasses import asdict, dataclass, field, fields\nfrom typing import Any, Dict, List, Optional\n\nfrom numpy import ndarray\nfrom pandas import DataFrame, read_json\n\nfrom haystack.dataclasses.byte_stream import ByteStream\n\nlogger = logging.get... | diff --git a/haystack/dataclasses/document.py b/haystack/dataclasses/document.py
index e1f35ac03e..9cddb5ce37 100644
--- a/haystack/dataclasses/document.py
+++ b/haystack/dataclasses/document.py
@@ -143,7 +143,7 @@ def from_dict(cls, data: Dict[str, Any]) -> "Document":
"""
Creates a new Document obje... |
mathesar-foundation__mathesar-2483 | `clean_stale_db --force` kills demo databases newer than 3 days
## Description
`clean_stale_db --force` is meant to only kill demo databases older than 3 days (by default), but that doesn't seem to be the case.
## Additional context
https://github.com/centerofci/mathesar/blob/master/demo/management/commands/clea... | [
{
"content": "from datetime import timedelta\n\nfrom django.conf import settings\nfrom django.core.management import BaseCommand\nfrom django.utils.timezone import now\nfrom sqlalchemy import text\nfrom sqlalchemy.exc import OperationalError\n\nfrom db import engine\nfrom db.metadata import get_empty_metadata\n... | [
{
"content": "from datetime import timedelta\n\nfrom django.conf import settings\nfrom django.core.management import BaseCommand\nfrom django.utils.timezone import now\nfrom sqlalchemy import text\nfrom sqlalchemy.exc import OperationalError\n\nfrom db import engine\nfrom db.metadata import get_empty_metadata\n... | diff --git a/demo/management/commands/clean_stale_db.py b/demo/management/commands/clean_stale_db.py
index 23f8820fbf..bb165a42ea 100644
--- a/demo/management/commands/clean_stale_db.py
+++ b/demo/management/commands/clean_stale_db.py
@@ -43,7 +43,7 @@ def drop_all_stale_databases(force=False, max_days=3, *args, **kwar... |
lutris__lutris-1185 | Add copy command as an alias for merge
There's no way to copy a single downloaded file to two directories currently. So I end up having to do this:
```
- move:
dst: $GAMEDIR/Tools/Windows/x64/discord-rpc.dll
src: $rpc
- execute:
command: cp "$GAMEDIR/Tools/Windows/x64/discord-rpc.dll" "$GAMEDIR/Tool... | [
{
"content": "\"\"\"Commands for installer scripts\"\"\"\nimport multiprocessing\nimport os\nimport stat\nimport shutil\nimport shlex\nimport json\n\nfrom gi.repository import GLib\n\nfrom lutris.installer.errors import ScriptingError\n\nfrom lutris import runtime\nfrom lutris.util import extract, disks, system... | [
{
"content": "\"\"\"Commands for installer scripts\"\"\"\nimport multiprocessing\nimport os\nimport stat\nimport shutil\nimport shlex\nimport json\n\nfrom gi.repository import GLib\n\nfrom lutris.installer.errors import ScriptingError\n\nfrom lutris import runtime\nfrom lutris.util import extract, disks, system... | diff --git a/docs/installers.rst b/docs/installers.rst
index 4e6ea96c9c..5a93227685 100644
--- a/docs/installers.rst
+++ b/docs/installers.rst
@@ -212,7 +212,8 @@ Example:
Copying and merging directories
-------------------------------
-Both merging and copying actions are done with the ``merge`` directive.
+Both m... |
sanic-org__sanic-2236 | when HTTPRequestHandler returns empty(like: {}, []), request_exception run first than costom-response-middleware
when HTTPRequestHandler returns empty(like: {}, []), request_exception run first than costom-response-middleware
**Code snippet**
# No middleware results
if not response:
... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport logging.config\nimport os\nimport re\n\nfrom asyncio import (\n AbstractEventLoop,\n CancelledError,\n Protocol,\n ensure_future,\n get_event_loop,\n wait_for,\n)\nfrom asyncio.futures import Future\nfrom collections im... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport logging.config\nimport os\nimport re\n\nfrom asyncio import (\n AbstractEventLoop,\n CancelledError,\n Protocol,\n ensure_future,\n get_event_loop,\n wait_for,\n)\nfrom asyncio.futures import Future\nfrom collections im... | diff --git a/sanic/app.py b/sanic/app.py
index 04383587ab..634ba665c8 100644
--- a/sanic/app.py
+++ b/sanic/app.py
@@ -839,7 +839,7 @@ async def handle_request(self, request: Request): # no cov
if isawaitable(response):
response = await response
- if response:
+ ... |
open-telemetry__opentelemetry-python-2714 | LogEmitterProvider.force_flush hangs and ultimately timeouts randomly
**Describe your environment**
Python 3.6.8
Opentelemetry Python 1.7.1
Opentelemetry Collector 0.38.0
**Steps to reproduce**
Note that this is a random behavior.
Regularly call LogEmitterProvider.force_flush while emitting logs.
We're using ... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5a29ec31f03..965e4802c6d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.12.0rc1-0.31b0...HEAD... |
pallets__werkzeug-1887 | send_file should raise TypeError when mimetype and download_name aren't provided
All other places in `send_file` that check required parameter combinations raise a `TypeError`, but `mimetype` raises a `ValueError`.
| [
{
"content": "import codecs\nimport io\nimport mimetypes\nimport os\nimport pathlib\nimport pkgutil\nimport re\nimport sys\nimport unicodedata\nimport warnings\nfrom html.entities import name2codepoint\nfrom time import time\nfrom zlib import adler32\n\nfrom ._internal import _DictAccessorProperty\nfrom ._inter... | [
{
"content": "import codecs\nimport io\nimport mimetypes\nimport os\nimport pathlib\nimport pkgutil\nimport re\nimport sys\nimport unicodedata\nimport warnings\nfrom html.entities import name2codepoint\nfrom time import time\nfrom zlib import adler32\n\nfrom ._internal import _DictAccessorProperty\nfrom ._inter... | diff --git a/src/werkzeug/utils.py b/src/werkzeug/utils.py
index 477426240..6a0ebc5ec 100644
--- a/src/werkzeug/utils.py
+++ b/src/werkzeug/utils.py
@@ -643,7 +643,7 @@ def send_file(
if mimetype is None:
if download_name is None:
- raise ValueError(
+ raise TypeError(
... |
scikit-image__scikit-image-4569 | Signatures in dev API have backslashes before *
## Description
Compare
https://scikit-image.org/docs/dev/api/skimage.metrics.html#adapted-rand-error
https://scikit-image.org/docs/stable/api/skimage.metrics.html#adapted-rand-error
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# skimage documentation build configuration file, created by\n# sphinx-quickstart on Sat Aug 22 13:00:30 2009.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# skimage documentation build configuration file, created by\n# sphinx-quickstart on Sat Aug 22 13:00:30 2009.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\... | diff --git a/doc/source/conf.py b/doc/source/conf.py
index 6d6e69686c0..ed82938b3e3 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -29,6 +29,9 @@
# -- General configuration -----------------------------------------------------
+# Strip backslahes in function's signature
+strip_signature_backslash = Tr... |
Cog-Creators__Red-DiscordBot-6197 | Error with cleanup self if used in bot's dm
### What Red version are you using?
3.5.2
### Cog name
Cleanup
### Command name
cleanup self
### What did you expect to happen?
It should send the message that 1 message was deleted
### What actually happened?
Got this traceback
`Exception in command 'cleanup self... | [
{
"content": "import contextlib\nimport logging\nfrom datetime import datetime, timedelta, timezone\nfrom typing import Callable, List, Optional, Set, Union\n\nimport discord\n\nfrom redbot.core import commands, Config\nfrom redbot.core.bot import Red\nfrom redbot.core.commands import positive_int, RawUserIdCon... | [
{
"content": "import contextlib\nimport logging\nfrom datetime import datetime, timedelta, timezone\nfrom typing import Callable, List, Optional, Set, Union\n\nimport discord\n\nfrom redbot.core import commands, Config\nfrom redbot.core.bot import Red\nfrom redbot.core.commands import positive_int, RawUserIdCon... | diff --git a/redbot/cogs/cleanup/cleanup.py b/redbot/cogs/cleanup/cleanup.py
index 5d148d48daa..bd3095f2487 100644
--- a/redbot/cogs/cleanup/cleanup.py
+++ b/redbot/cogs/cleanup/cleanup.py
@@ -148,7 +148,7 @@ async def send_optional_notification(
"""
Sends a notification to the channel that a certain ... |
pyscript__pyscript-1779 | ImportError when importing PyWorker from pyscript
### Checklist
- [X] I added a descriptive title
- [X] I searched for other issues and couldn't find a solution or duplication
- [X] I already searched in Google and didn't find any good information or help
### What happened?
Importing `PyWorker` from the `pyscript` ... | [
{
"content": "# Some notes about the naming conventions and the relationship between various\n# similar-but-different names.\n#\n# import pyscript\n# this package contains the main user-facing API offered by pyscript. All\n# the names which are supposed be used by end users should be made\n# availab... | [
{
"content": "# Some notes about the naming conventions and the relationship between various\n# similar-but-different names.\n#\n# import pyscript\n# this package contains the main user-facing API offered by pyscript. All\n# the names which are supposed be used by end users should be made\n# availab... | diff --git a/pyscript.core/package-lock.json b/pyscript.core/package-lock.json
index 4a73cc8a787..fd6e502da76 100644
--- a/pyscript.core/package-lock.json
+++ b/pyscript.core/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@pyscript/core",
- "version": "0.2.5",
+ "version": "0.2.7",
"lockfileVersion": 3... |
zulip__zulip-11602 | integrations: Add missing logos.
We seem to be missing logos for Instagram, Twitter, and YouTube.
Also, the logo for Groove is too small (needs to be trimmed), and the logos for irc, matrix, and xkcd are too big (need to add some left and right padding probably to the container that holds the logo).
| [
{
"content": "import os\nimport pathlib\n\nfrom typing import Dict, List, Optional, Any\nfrom django.conf import settings\nfrom django.conf.urls import url\nfrom django.urls.resolvers import LocaleRegexProvider\nfrom django.utils.module_loading import import_string\nfrom django.utils.translation import ugettext... | [
{
"content": "import os\nimport pathlib\n\nfrom typing import Dict, List, Optional, Any\nfrom django.conf import settings\nfrom django.conf.urls import url\nfrom django.urls.resolvers import LocaleRegexProvider\nfrom django.utils.module_loading import import_string\nfrom django.utils.translation import ugettext... | diff --git a/static/images/integrations/logos/irc.svg b/static/images/integrations/logos/irc.svg
index d03ecbb7ac6dc..a35a7d1c345ad 100644
--- a/static/images/integrations/logos/irc.svg
+++ b/static/images/integrations/logos/irc.svg
@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/199... |
statsmodels__statsmodels-774 | AR model pvalues error with Pandas
Possibly related to #721
After running:
``` python
import statsmodels as sm
y=data.sentiment.dropna()
armodel=sm.tsa.ar_model.AR(y).fit(maxlags=15)
armodel.params
armodel.pvalues
```
armodel.params works just fine, but armodel.pvalues has the following traceback;
`````` python
... | [
{
"content": "from __future__ import division\n\nimport numpy as np\nfrom numpy import (dot, identity, atleast_2d, atleast_1d, zeros)\nfrom numpy.linalg import inv\nfrom scipy import optimize\nfrom scipy.stats import t, norm, ss as sumofsq\nfrom statsmodels.regression.linear_model import OLS\nfrom statsmodels.t... | [
{
"content": "from __future__ import division\n\nimport numpy as np\nfrom numpy import (dot, identity, atleast_2d, atleast_1d, zeros)\nfrom numpy.linalg import inv\nfrom scipy import optimize\nfrom scipy.stats import t, norm, ss as sumofsq\nfrom statsmodels.regression.linear_model import OLS\nfrom statsmodels.t... | diff --git a/statsmodels/tsa/ar_model.py b/statsmodels/tsa/ar_model.py
index 9db229fd711..23e0a917ba5 100644
--- a/statsmodels/tsa/ar_model.py
+++ b/statsmodels/tsa/ar_model.py
@@ -153,6 +153,7 @@ def _get_predict_start(self, start, dynamic):
start = _validate(start, k_ar, self.data.dates, method)
... |
python-pillow__Pillow-6758 | Can we get `getxmp` method for WebP images?
PNG, Jpeg and TIFF already have this method.
IMHO, it would be nice to add such a thing to WebP.
```python
Image.open("image.webp").getxmp()
```
I know it's stored in `info["xmp"]`, but a generic method would be more convenient.
| [
{
"content": "from io import BytesIO\n\nfrom . import Image, ImageFile\n\ntry:\n from . import _webp\n\n SUPPORTED = True\nexcept ImportError:\n SUPPORTED = False\n\n\n_VALID_WEBP_MODES = {\"RGBX\": True, \"RGBA\": True, \"RGB\": True}\n\n_VALID_WEBP_LEGACY_MODES = {\"RGB\": True, \"RGBA\": True}\n\n_V... | [
{
"content": "from io import BytesIO\n\nfrom . import Image, ImageFile\n\ntry:\n from . import _webp\n\n SUPPORTED = True\nexcept ImportError:\n SUPPORTED = False\n\n\n_VALID_WEBP_MODES = {\"RGBX\": True, \"RGBA\": True, \"RGB\": True}\n\n_VALID_WEBP_LEGACY_MODES = {\"RGB\": True, \"RGBA\": True}\n\n_V... | diff --git a/Tests/test_file_webp_metadata.py b/Tests/test_file_webp_metadata.py
index f77a245c035..4f513d82bc8 100644
--- a/Tests/test_file_webp_metadata.py
+++ b/Tests/test_file_webp_metadata.py
@@ -11,6 +11,11 @@
skip_unless_feature("webp_mux"),
]
+try:
+ from defusedxml import ElementTree
+except ImportE... |
GeotrekCE__Geotrek-admin-1048 | Send an email on feeback record creation
- rel https://github.com/makinacorpus/Geotrek-rando/issues/132
- Send to managers
- Import test send email from Geotrek-rando
| [
{
"content": "import logging\n\nfrom django.conf import settings\nfrom django.db import models\nfrom django.contrib.gis.db import models as gis_models\nfrom django.contrib.contenttypes.generic import GenericForeignKey\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.utils.translation imp... | [
{
"content": "import logging\n\nfrom django.conf import settings\nfrom django.db import models\nfrom django.contrib.gis.db import models as gis_models\nfrom django.contrib.contenttypes.generic import GenericForeignKey\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.utils.translation imp... | diff --git a/geotrek/feedback/models.py b/geotrek/feedback/models.py
index b0d4c7ca12..3281b08c93 100644
--- a/geotrek/feedback/models.py
+++ b/geotrek/feedback/models.py
@@ -66,9 +66,11 @@ def name_display(self):
@receiver(post_save, sender=Report, dispatch_uid="on_report_created")
-def on_report_created(sender, ... |
pytorch__pytorch-2579 | external nccl breaks gloo compilation
Currently, you can have a libnccl on your system, and pytorch setup favors that instead of compiling one itself from source. The code that takes care of this is:
https://github.com/pytorch/pytorch/blob/master/setup.py#L316-L318
However, this breaks gloo build because gloo gets ... | [
{
"content": "from setuptools import setup, Extension, distutils, Command, find_packages\nimport setuptools.command.build_ext\nimport setuptools.command.install\nimport setuptools.command.develop\nimport setuptools.command.build_py\nimport distutils.unixccompiler\nimport distutils.command.build\nimport distutil... | [
{
"content": "from setuptools import setup, Extension, distutils, Command, find_packages\nimport setuptools.command.build_ext\nimport setuptools.command.install\nimport setuptools.command.develop\nimport setuptools.command.build_py\nimport distutils.unixccompiler\nimport distutils.command.build\nimport distutil... | diff --git a/setup.py b/setup.py
index 9cc5191ced38b3..b91216c8e933cd 100644
--- a/setup.py
+++ b/setup.py
@@ -277,6 +277,13 @@ def run(self):
cwd = os.path.dirname(os.path.abspath(__file__))
lib_path = os.path.join(cwd, "torch", "lib")
+# Check if you remembered to check out submodules
+gloo_cmake = os.path.join(l... |
pydantic__pydantic-3642 | copy_on_model_validation config doesn't copy List field anymore in v1.9.0
### Checks
* [x] I added a descriptive title to this issue
* [x] I have searched (google, github) for similar issues and couldn't find anything
* [x] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think t... | [
{
"content": "import warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n ClassVar,\n Dict,\n Li... | [
{
"content": "import warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n ClassVar,\n Dict,\n Li... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 595c863d2a0..ab71fec76cd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -246,9 +246,6 @@ jobs:
with:
python-version: '3.10'
- - name: upgrade pip
- run: pip install -U pip setuptools wheel
-
- ... |
rucio__rucio-5514 | Update permission module for ESCAPE
Motivation
----------
The `perm_get_signed_url` permission wrongly requests `key=admin`.
Modification
------------
Change to `key=sign-gcs`
| [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright CERN since 2012\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# Unle... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright CERN since 2012\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# Unle... | diff --git a/lib/rucio/core/permission/escape.py b/lib/rucio/core/permission/escape.py
index 7f4bb93a81..4a7b9e94e7 100644
--- a/lib/rucio/core/permission/escape.py
+++ b/lib/rucio/core/permission/escape.py
@@ -1011,7 +1011,7 @@ def perm_get_signed_url(issuer, kwargs, session=None):
:param session: The DB session ... |
mozilla__kitsune-2981 | Add whitenoise and serve static files from the app
Add whitenoise to serve static files in the dev (and stage?) instances.
In production we'll probably go with another more efficient approach which is being investigated in #2949.
Whitenoise activation should be configurable via the `ENABLE_WHITENOISE` env variab... | [
{
"content": "\"\"\"\nWSGI config for kitsune project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/\n\"\"\"\nimport os\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ki... | [
{
"content": "\"\"\"\nWSGI config for kitsune project.\n\nIt exposes the WSGI callable as a module-level variable named ``application``.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/\n\"\"\"\nimport os\nos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ki... | diff --git a/requirements/default.txt b/requirements/default.txt
index edd028d8bc1..db384889445 100644
--- a/requirements/default.txt
+++ b/requirements/default.txt
@@ -413,3 +413,6 @@ greenlet==0.4.12 \
--hash=sha256:9c407aa6adfd4eea1232e81aa9f3cb3d9b955a9891c4819bf9b498c77efba14b \
--hash=sha256:b56ac981f07... |
pwr-Solaar__Solaar-2305 | Extend Makefile with installation and test targets
**Information**
- Solaar version: 1.1.11rc4
**Is your feature request related to a problem? Please describe.**
The Solaar installation with all its dependencies (pip, apt, udev etc.) is cumbersome. Although some setup steps for GItHub CI exists, they are not usabl... | [
{
"content": "#!/usr/bin/env python3\nimport subprocess\n\nfrom glob import glob as _glob\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nNAME = 'Solaar'\n\nwith open('lib/solaar/version', 'r') as vfile:\n version = vfile.read().strip()\n\ntry: # get c... | [
{
"content": "#!/usr/bin/env python3\nimport subprocess\n\nfrom glob import glob as _glob\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nNAME = 'Solaar'\n\nwith open('lib/solaar/version', 'r') as vfile:\n version = vfile.read().strip()\n\ntry: # get c... | diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
index 960ef7aba3..6dfc1c9326 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/c... |
conda__conda-build-1522 | Conda skeleton occasionally chokes on cpan module
_From @jerowe on November 8, 2016 5:49_
```
conda skeleton cpan Devel::CheckBin
```
```
INFO:stdoutlog:
.INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): api.metacpan.org
INFO:requests.packages.urllib3.connectionpool:Starting ne... | [
{
"content": "\"\"\"\nTools for converting CPAN packages to conda recipes.\n\"\"\"\n\nfrom __future__ import absolute_import, division, print_function\n\nfrom distutils.version import LooseVersion\nfrom glob import glob\nimport gzip\nimport json\nfrom os import makedirs, environ\nfrom os.path import basename, d... | [
{
"content": "\"\"\"\nTools for converting CPAN packages to conda recipes.\n\"\"\"\n\nfrom __future__ import absolute_import, division, print_function\n\nfrom distutils.version import LooseVersion\nfrom glob import glob\nimport gzip\nimport json\nfrom os import makedirs, environ\nfrom os.path import basename, d... | diff --git a/conda_build/skeletons/cpan.py b/conda_build/skeletons/cpan.py
index 0ab2418327..cb09341be3 100644
--- a/conda_build/skeletons/cpan.py
+++ b/conda_build/skeletons/cpan.py
@@ -600,7 +600,7 @@ def get_release_info(cpan_url, package, version, perl_version, config,
# If the latest isn't the version we're l... |
kornia__kornia-1318 | spatial_soft_argmax imports cause mypy error
### Describe the bug
Imports in `kornia.geometry.subpix.spatial_soft_argmax` raise error when running mypy.
This is fixed by simply changing the import from:
```python
from kornia.geometry import normalize_pixel_coordinates, normalize_pixel_coordinates3d
```
to... | [
{
"content": "from typing import Tuple, Union\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nimport kornia\nfrom kornia.geometry import normalize_pixel_coordinates, normalize_pixel_coordinates3d\nfrom kornia.geometry.subpix import dsnt\nfrom kornia.utils import create_meshgrid, creat... | [
{
"content": "from typing import Tuple, Union\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nimport kornia\nfrom kornia.geometry.conversions import normalize_pixel_coordinates, normalize_pixel_coordinates3d\nfrom kornia.geometry.subpix import dsnt\nfrom kornia.utils import create_mes... | diff --git a/kornia/geometry/subpix/spatial_soft_argmax.py b/kornia/geometry/subpix/spatial_soft_argmax.py
index 45a213f46b..6887666b19 100644
--- a/kornia/geometry/subpix/spatial_soft_argmax.py
+++ b/kornia/geometry/subpix/spatial_soft_argmax.py
@@ -5,7 +5,7 @@
import torch.nn.functional as F
import kornia
-from k... |
interlegis__sapl-3150 | Períodos de parlamentares sumiram
## Comportamento Esperado
Devem aparecer todos os períodos dos parlamentares, correspondentes às legislaturas.
## Comportamento Atual
Aparecem apenas da 6ª legislatura à atual.
Passos para Reproduzir (para bugs)
https://sapl.agudo.rs.leg.br/parlamentar/
## Contexto
Pesquis... | [
{
"content": "from django.core.paginator import EmptyPage\nfrom rest_framework import pagination\nfrom rest_framework.response import Response\n\n\nclass StandardPagination(pagination.PageNumberPagination):\n page_size = 10\n page_size_query_param = 'page_size'\n max_page_size = 50\n\n def get_pagin... | [
{
"content": "from django.core.paginator import EmptyPage\nfrom rest_framework import pagination\nfrom rest_framework.response import Response\n\n\nclass StandardPagination(pagination.PageNumberPagination):\n page_size = 10\n page_size_query_param = 'page_size'\n max_page_size = 50\n\n def paginate_... | diff --git a/sapl/api/pagination.py b/sapl/api/pagination.py
index 47d35ee65..3c77a7ee3 100644
--- a/sapl/api/pagination.py
+++ b/sapl/api/pagination.py
@@ -8,6 +8,11 @@ class StandardPagination(pagination.PageNumberPagination):
page_size_query_param = 'page_size'
max_page_size = 50
+ def paginate_querys... |
nerfstudio-project__nerfstudio-2623 | Dycheck Dataparser rescale shape error
**Describe the bug**
When using downscaling with the dycheck dataparser, the automatic downscaling has a shape error between `depth_raw` and `cosa` [here](https://github.com/nerfstudio-project/nerfstudio/blob/9528a3f717fe28a6c6500199b5b37d4f2c6e10ca/nerfstudio/data/dataparsers/dy... | [
{
"content": "# Copyright 2022 the Regents of the University of California, Nerfstudio Team and contributors. 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 a... | [
{
"content": "# Copyright 2022 the Regents of the University of California, Nerfstudio Team and contributors. 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 a... | diff --git a/nerfstudio/data/dataparsers/dycheck_dataparser.py b/nerfstudio/data/dataparsers/dycheck_dataparser.py
index d9d4c8f4c6..9af4f58001 100644
--- a/nerfstudio/data/dataparsers/dycheck_dataparser.py
+++ b/nerfstudio/data/dataparsers/dycheck_dataparser.py
@@ -173,7 +173,10 @@ def _rescale_depth(depth_raw: np.nda... |
abey79__vpype-683 | Examples in `lreverse`'help are wrong
As title says ☝🏻
| [
{
"content": "from __future__ import annotations\n\nimport random\n\nimport click\n\nimport vpype as vp\n\nfrom .cli import cli\nfrom .decorators import global_processor\nfrom .types import LayerType, multiple_to_layer_ids, single_to_layer_id\n\n__all__ = (\"lcopy\", \"lmove\", \"ldelete\", \"lreverse\", \"lswa... | [
{
"content": "from __future__ import annotations\n\nimport random\n\nimport click\n\nimport vpype as vp\n\nfrom .cli import cli\nfrom .decorators import global_processor\nfrom .types import LayerType, multiple_to_layer_ids, single_to_layer_id\n\n__all__ = (\"lcopy\", \"lmove\", \"ldelete\", \"lreverse\", \"lswa... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0227d523..eb67eca4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ Release date: UNRELEASED
### Bug fixes
* Fixed issue with ImageRenderer where the GL context wasn't released, ultimately causing a crash when running the test suite (which could involve m... |
buildbot__buildbot-481 | Warn about ignored buildHorizon and logHorizion.
These aren't currently used, but they could be supported in the database. Either we should get rid of them, or open a ticket to add back support (and probably document that they aren't currently working).
| [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | diff --git a/master/buildbot/status/web/logs.py b/master/buildbot/status/web/logs.py
index 79b953ada5f0..bc47d49f17b7 100644
--- a/master/buildbot/status/web/logs.py
+++ b/master/buildbot/status/web/logs.py
@@ -103,6 +103,11 @@ def render_GET(self, req):
self._setContentType(req)
self.req = req
+ ... |
aio-libs__aiohttp-8098 | ValueError: verify_ssl, ssl_context, fingerprint and ssl parameters are mutually exclusive
### Describe the bug
This change https://github.com/aio-libs/aiohttp/pull/8043 is listed in the changelog under "features" https://docs.aiohttp.org/en/stable/changes.html#features, but I think it is a breaking change.
For exa... | [
{
"content": "import asyncio\nimport codecs\nimport contextlib\nimport functools\nimport io\nimport re\nimport sys\nimport traceback\nimport warnings\nfrom hashlib import md5, sha1, sha256\nfrom http.cookies import CookieError, Morsel, SimpleCookie\nfrom types import MappingProxyType, TracebackType\nfrom typing... | [
{
"content": "import asyncio\nimport codecs\nimport contextlib\nimport functools\nimport io\nimport re\nimport sys\nimport traceback\nimport warnings\nfrom hashlib import md5, sha1, sha256\nfrom http.cookies import CookieError, Morsel, SimpleCookie\nfrom types import MappingProxyType, TracebackType\nfrom typing... | diff --git a/CHANGES/8097.bugfix.rst b/CHANGES/8097.bugfix.rst
new file mode 120000
index 00000000000..c799b052a6c
--- /dev/null
+++ b/CHANGES/8097.bugfix.rst
@@ -0,0 +1 @@
+8098.bugfix.rst
\ No newline at end of file
diff --git a/CHANGES/8098.bugfix.rst b/CHANGES/8098.bugfix.rst
new file mode 100644
index 00000000000.... |
numpy__numpy-4304 | fliplr documentation incorrectly states 2-d *not* required
[`fliplr` documentation](http://docs.scipy.org/doc/numpy/reference/generated/numpy.fliplr.html) incorrectly states 2-d _not_ required, but that is _not_ true. I think it is a typo, since `fliplr` was probably copied from `flipud` which _really_ doesn't require ... | [
{
"content": "\"\"\" Basic functions for manipulating 2d arrays\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\n__all__ = ['diag', 'diagflat', 'eye', 'fliplr', 'flipud', 'rot90', 'tri',\n 'triu', 'tril', 'vander', 'histogram2d', 'mask_indices',\n 'tril_indices'... | [
{
"content": "\"\"\" Basic functions for manipulating 2d arrays\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\n__all__ = ['diag', 'diagflat', 'eye', 'fliplr', 'flipud', 'rot90', 'tri',\n 'triu', 'tril', 'vander', 'histogram2d', 'mask_indices',\n 'tril_indices'... | diff --git a/numpy/lib/twodim_base.py b/numpy/lib/twodim_base.py
index 12c0f9bb367b..0dc7db3f66e9 100644
--- a/numpy/lib/twodim_base.py
+++ b/numpy/lib/twodim_base.py
@@ -25,7 +25,7 @@ def fliplr(m):
Parameters
----------
m : array_like
- Input array.
+ Input array, must be at least 2-D.
... |
scikit-hep__awkward-1832 | Requests from review of #1776 (merging docs into main).
### Which documentation?
Tutorials site
### What needs to be documented?
This is a follow-up of https://github.com/scikit-hep/awkward/pull/1776#pullrequestreview-1144743439, which is an approval of merging the `docs` branch into `main` as-is, but with som... | [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup -------------------------------------------... | [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup -------------------------------------------... | diff --git a/docs-sphinx/_static/css/awkward.css b/docs-sphinx/_static/css/awkward.css
index e02d7571ce..280b0a7082 100644
--- a/docs-sphinx/_static/css/awkward.css
+++ b/docs-sphinx/_static/css/awkward.css
@@ -42,3 +42,8 @@ html[data-theme="dark"] .sd-card {
margin-left: auto;
margin-right: auto;
}
+
+.shield-b... |
napari__napari-5795 | Copy and paste multiple points doesn't work
I'm trying to copy and paste multiple points on Napari, but it doesn't work.
I have searched in _Points layer_ shortcuts menu, but copy and past commands missed.
How to fix?
Version:
**napari**: 0.4.17rc8
**Python**: 3.8.16 | packaged by conda-forge | (default, Fe... | [
{
"content": "import warnings\nfrom copy import deepcopy\nfrom typing import Any, Dict, List, Optional, Sequence, Tuple, Union\n\nimport numpy as np\nimport pandas as pd\nfrom pydantic import PositiveInt, validator\n\nfrom napari.layers.base._base_constants import Blending\nfrom napari.layers.utils._text_consta... | [
{
"content": "import warnings\nfrom copy import deepcopy\nfrom typing import Any, Dict, List, Optional, Sequence, Tuple, Union\n\nimport numpy as np\nimport pandas as pd\nfrom pydantic import PositiveInt, validator\n\nfrom napari.layers.base._base_constants import Blending\nfrom napari.layers.utils._text_consta... | diff --git a/napari/layers/utils/_tests/test_text_manager.py b/napari/layers/utils/_tests/test_text_manager.py
index 3091b4da8b7..eae26f31388 100644
--- a/napari/layers/utils/_tests/test_text_manager.py
+++ b/napari/layers/utils/_tests/test_text_manager.py
@@ -676,10 +676,14 @@ def test_refresh_with_derived_color():
... |
dotkom__onlineweb4-2141 | Payment deadlines in dashboard/attendee-list
## What kind of an issue is this?
- [ ] Bug report
- [x] Feature request
## What is the expected behaviour?
There should be a field in dashboard-event-attendees where you can see the payment deadline.
## What is the current behaviour?
<!-- if this is a bug re... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom collections import OrderedDict\nfrom datetime import datetime, timedelta\nfrom random import choice as random_choice\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import Group\nfrom django.contrib.contenttypes.fields import GenericRelation\nfr... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom collections import OrderedDict\nfrom datetime import datetime, timedelta\nfrom random import choice as random_choice\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import Group\nfrom django.contrib.contenttypes.fields import GenericRelation\nfr... | diff --git a/apps/events/models.py b/apps/events/models.py
index 3add6167d..71d779659 100644
--- a/apps/events/models.py
+++ b/apps/events/models.py
@@ -864,6 +864,15 @@ def delete(self):
super(Attendee, self).delete()
+ def get_payment_deadline(self):
+ # Importing here to prevent circular depen... |
certbot__certbot-2809 | Domain order not preserved in generated CSR
4d6a1ee7ff23b29d4416ee91610a7d8a58173292 introduced a change which causes the domain order passed to the client not to be preserved.
The previous implementation in `get_authorizations` would iterate over the original domain list, preserving the original order, whereas the ne... | [
{
"content": "\"\"\"Certbot client API.\"\"\"\nimport logging\nimport os\n\nfrom cryptography.hazmat.backends import default_backend\nfrom cryptography.hazmat.primitives.asymmetric import rsa\nimport OpenSSL\nimport zope.component\n\nfrom acme import client as acme_client\nfrom acme import jose\nfrom acme impor... | [
{
"content": "\"\"\"Certbot client API.\"\"\"\nimport logging\nimport os\n\nfrom cryptography.hazmat.backends import default_backend\nfrom cryptography.hazmat.primitives.asymmetric import rsa\nimport OpenSSL\nimport zope.component\n\nfrom acme import client as acme_client\nfrom acme import jose\nfrom acme impor... | diff --git a/certbot/client.py b/certbot/client.py
index 60e37a78731..6f41a3a0b6b 100644
--- a/certbot/client.py
+++ b/certbot/client.py
@@ -245,8 +245,9 @@ def obtain_certificate(self, domains):
domains,
self.config.allow_subset_of_names)
- domains = [a.body.identifier.value.... |
GeotrekCE__Geotrek-admin-4142 | [Sensitivity module] Deleted zones are still present in the open-air export
A clause is missing to exclude deleted sensitive areas in OpenAir API queryset.
assigned to my self.
[Sensitivity module] Deleted zones are still present in the open-air export
A clause is missing to exclude deleted sensitive areas in OpenAi... | [
{
"content": "import json\nimport logging\nfrom datetime import datetime\n\nfrom django.conf import settings\nfrom django.contrib.gis.db.models.functions import Transform\nfrom django.http import HttpResponse\nfrom django.utils.translation import gettext_lazy as _\nfrom django.views.generic import ListView\nfro... | [
{
"content": "import json\nimport logging\nfrom datetime import datetime\n\nfrom django.conf import settings\nfrom django.contrib.gis.db.models.functions import Transform\nfrom django.http import HttpResponse\nfrom django.utils.translation import gettext_lazy as _\nfrom django.views.generic import ListView\nfro... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index ca1a2c2b61..0116c3dbe5 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -8,6 +8,7 @@ CHANGELOG
**Improvements**
- ApidaeTrekParser now imports field `membreProprietaire` as the structure
+- Exclude deleted areas from OpenAir export (fixes #4140)
... |
aws__aws-sam-cli-2007 | Incorrect inline help in "sam local generate-event" command
<!-- Make sure we don't have an existing Issue that reports the bug you are seeing (both open and closed). -->
### Describe your idea/feature/enhancement
Using the CLI I had some problems with the inline help of the command "sam local generate-event". I ... | [
{
"content": "\"\"\"\nSets up the cli for generate-event\n\"\"\"\n\nimport click\n\nfrom samcli.cli.main import pass_context\nfrom samcli.commands.local.generate_event.event_generation import GenerateEventCommand\n\nHELP_TEXT = \"\"\"\nYou can use this command to generate sample payloads from different event so... | [
{
"content": "\"\"\"\nSets up the cli for generate-event\n\"\"\"\n\nimport click\n\nfrom samcli.cli.main import pass_context\nfrom samcli.commands.local.generate_event.event_generation import GenerateEventCommand\n\nHELP_TEXT = \"\"\"\nYou can use this command to generate sample payloads from different event so... | diff --git a/samcli/commands/local/generate_event/cli.py b/samcli/commands/local/generate_event/cli.py
index 2533d34715..6531da9f70 100644
--- a/samcli/commands/local/generate_event/cli.py
+++ b/samcli/commands/local/generate_event/cli.py
@@ -22,7 +22,7 @@
$ sam local generate-event s3 [put/delete] --bucket <bucket> -... |
pex-tool__pex-554 | Pex 1.4.6 builds a failing pex
pex 1.4.6 will allow you to build a pex against the [responses](https://github.com/getsentry/responses) library, but blows up when you try to actually import it.
This works fine outside of a pex environment and with pex 1.4.5.
```
~/sandbox $ . venv/bin/activate
(venv) ~/sandbox... | [
{
"content": "# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import absolute_import, print_function\n\nimport os\nimport pkgutil\nimport sys\nfrom distutils import sysconfig\nfrom site import USER_SITE\n\nimp... | [
{
"content": "# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import absolute_import, print_function\n\nimport os\nimport pkgutil\nimport sys\nfrom distutils import sysconfig\nfrom site import USER_SITE\n\nimp... | diff --git a/pex/pex.py b/pex/pex.py
index 9cd809af3..4337b212e 100644
--- a/pex/pex.py
+++ b/pex/pex.py
@@ -419,6 +419,9 @@ def demote_bootstrap(cls):
TRACER.log('Un-importing third party bootstrap dependency %s from %s'
% (mod, bootstrap_path))
sys.modules.pop(mod)
+ submo... |
freqtrade__freqtrade-3262 | missing db_url for show_trades
Currently
```
$ freqtrade show-trades
```
gives
```
...
2020-05-05 20:18:27,042 - freqtrade - ERROR - Fatal exception!
Traceback (most recent call last):
File "/home/user/freqtrade-wrk/github-hroff-1902/freqtrade/freqtrade/main.py", line 36, in main
return_code = args['fu... | [
{
"content": "import csv\nimport logging\nimport sys\nfrom collections import OrderedDict\nfrom pathlib import Path\nfrom typing import Any, Dict, List\n\nfrom colorama import init as colorama_init\nfrom colorama import Fore, Style\nimport rapidjson\nfrom tabulate import tabulate\n\nfrom freqtrade.configuration... | [
{
"content": "import csv\nimport logging\nimport sys\nfrom collections import OrderedDict\nfrom pathlib import Path\nfrom typing import Any, Dict, List\n\nfrom colorama import init as colorama_init\nfrom colorama import Fore, Style\nimport rapidjson\nfrom tabulate import tabulate\n\nfrom freqtrade.configuration... | diff --git a/freqtrade/commands/list_commands.py b/freqtrade/commands/list_commands.py
index 61d6f724472..e5131f9b2d9 100644
--- a/freqtrade/commands/list_commands.py
+++ b/freqtrade/commands/list_commands.py
@@ -206,6 +206,11 @@ def start_show_trades(args: Dict[str, Any]) -> None:
from freqtrade.persistence impor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.