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 ⌀ |
|---|---|---|---|---|
cupy__cupy-6920 | `cupy.clip` behave differently from NumPy
### Description
The behavior is different from NumPy when
* only `a_max` or `a_min` is given
* `a_max` < `a_min`
### To Reproduce
CuPy:
```py
>>> import cupy as cp
>>> cp.clip(cp.arange(8), a_min=3, a_max=6)
array([3, 3, 3, 3, 4, 5, 6, 6])
>>> cp.clip(cp.arange(8), ... | [
{
"content": "import cupy\nimport cupyx.scipy.fft\n\nfrom cupy import _core\nfrom cupy._core import _routines_math as _math\nfrom cupy._core import fusion\nfrom cupy.lib import stride_tricks\n\nimport numpy\n\n\n_dot_kernel = _core.ReductionKernel(\n 'T x1, T x2',\n 'T y',\n 'x1 * x2',\n 'a + b',\n ... | [
{
"content": "import cupy\nimport cupyx.scipy.fft\n\nfrom cupy import _core\nfrom cupy._core import _routines_math as _math\nfrom cupy._core import fusion\nfrom cupy.lib import stride_tricks\n\nimport numpy\n\n\n_dot_kernel = _core.ReductionKernel(\n 'T x1, T x2',\n 'T y',\n 'x1 * x2',\n 'a + b',\n ... | diff --git a/cupy/_core/_routines_math.pyx b/cupy/_core/_routines_math.pyx
index 5203f104167..ef8f5c288f7 100644
--- a/cupy/_core/_routines_math.pyx
+++ b/cupy/_core/_routines_math.pyx
@@ -1114,7 +1114,7 @@ _clip = create_ufunc(
'cupy_clip',
('???->?', 'bbb->b', 'BBB->B', 'hhh->h', 'HHH->H', 'iii->i', 'III->I... |
psf__black-4339 | Cannot parse multiline f-string containing multiline string
<!--
Please make sure that the bug is not already fixed either in newer versions or the
current development version. To confirm this, you have three options:
1. Update Black's version if a newer release exists: `pip install -U black`
2. Use the online fo... | [
{
"content": "# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation.\n# All rights reserved.\n\n# mypy: allow-untyped-defs, allow-untyped-calls\n\n\"\"\"Tokenization help for Python programs.\n\ngenerate_tokens(readline) is a generator that breaks a stream of\ntext into Python tokens. I... | [
{
"content": "# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation.\n# All rights reserved.\n\n# mypy: allow-untyped-defs, allow-untyped-calls\n\n\"\"\"Tokenization help for Python programs.\n\ngenerate_tokens(readline) is a generator that breaks a stream of\ntext into Python tokens. I... | diff --git a/CHANGES.md b/CHANGES.md
index f56f40f250e..e3df420b5a0 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -26,6 +26,9 @@
<!-- Changes to the parser or to version autodetection -->
+- Fix regression where Black failed to parse a multiline f-string containing another
+ multiline string (#4339)
+
### Performa... |
GeotrekCE__Geotrek-admin-1326 | SEARCH_PATH for Geotrek DB user
Since Geotrek 0.28, tables and functions have be moved to different schemas, which is a very good point (https://github.com/makinacorpus/Geotrek/releases/tag/v0.28.0).
Schemas are not mentionned in triggers which is OK too, as Django is doing it in his connexions so it is not a problem ... | [
{
"content": "import re\nimport os\nimport logging\nimport traceback\nfrom functools import wraps\n\nfrom django.db import connection, models\nfrom django.conf import settings\nfrom django.db.models import get_app, get_models\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef debug_pg_notices(f):\n\n @wraps(... | [
{
"content": "import re\nimport os\nimport logging\nimport traceback\nfrom functools import wraps\n\nfrom django.db import connection, models\nfrom django.conf import settings\nfrom django.db.models import get_app, get_models\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef debug_pg_notices(f):\n\n @wraps(... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index e586b50d49..c4df76a624 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -10,6 +10,8 @@ CHANGELOG
* Fix regression for translations of tourism (fixes #1315)
* Various improvements on trek public template, by Camille Montchicourt
+* Set PostgreSQL ... |
TheAlgorithms__Python-6467 | Enter the logic for hash table
### Describe your change:
* [ ] Add an algorithm?
* [ ] Fix a bug or typo in an existing algorithm?
* [x] Documentation change?
### Checklist:
* [x] I have read [CONTRIBUTING.md](https://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md).
* [x] This pull request is... | [
{
"content": "#!/usr/bin/env python3\nfrom .hash_table import HashTable\nfrom .number_theory.prime_numbers import is_prime, next_prime\n\n\nclass DoubleHash(HashTable):\n \"\"\"\n Hash Table example with open addressing and Double Hash\n \"\"\"\n\n def __init__(self, *args, **kwargs):\n super... | [
{
"content": "#!/usr/bin/env python3\n\"\"\"\nDouble hashing is a collision resolving technique in Open Addressed Hash tables.\nDouble hashing uses the idea of applying a second hash function to key when a collision\noccurs. The advantage of Double hashing is that it is one of the best form of probing,\nproduc... | diff --git a/data_structures/hashing/double_hash.py b/data_structures/hashing/double_hash.py
index bd1355fca65d..453e0d13106d 100644
--- a/data_structures/hashing/double_hash.py
+++ b/data_structures/hashing/double_hash.py
@@ -1,4 +1,16 @@
#!/usr/bin/env python3
+"""
+Double hashing is a collision resolving technique ... |
psychopy__psychopy-5692 | Radio does not work in Slider component in 2023 versions (2023 ~ 2023.1.2)
When using the Slider componenet in 2023~ versions the the ‘radio’ does not work.
It does not show the ticks according to the presetted values, and when I click the radio button the experiment shuts down.
I think this is a bug as when I do... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"A class for getting numeric or categorical ratings, e.g., a 1-to-7 scale.\"\"\"\n\n# Part of the PsychoPy library\n# Copyright (C) 2015 Jonathan Peirce\n# Distributed under the terms of the GNU General Public License (GPL).\n\n\n\n\nimport co... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"A class for getting numeric or categorical ratings, e.g., a 1-to-7 scale.\"\"\"\n\n# Part of the PsychoPy library\n# Copyright (C) 2015 Jonathan Peirce\n# Distributed under the terms of the GNU General Public License (GPL).\n\n\n\n\nimport co... | diff --git a/psychopy/visual/slider.py b/psychopy/visual/slider.py
index 82bf911a00..2a2492f53f 100644
--- a/psychopy/visual/slider.py
+++ b/psychopy/visual/slider.py
@@ -180,7 +180,6 @@ def __init__(self,
self.ori = ori
self.flip = flip
- self.startValue = self.markerPos = startValue
... |
bentoml__BentoML-2525 | TF2 tutorial fails: 'TensorflowRunnable' has no attribute 'SUPPORT_NVIDIA_GPU'
**Describe the bug**
<!--- A clear and concise description of what the bug is. -->
This bug occurs when trying to serve a bento based on TensorflowRunnable in production mode, i.e.
`bentoml serve your-model:latest --production`
This ca... | [
{
"content": "from __future__ import annotations\n\nimport os\nimport pickle\nimport typing as t\nimport logging\nimport functools\nimport itertools\nfrom typing import TYPE_CHECKING\n\nimport bentoml\nfrom bentoml import Tag\nfrom bentoml import Runnable\nfrom bentoml.models import ModelContext\nfrom bentoml.e... | [
{
"content": "from __future__ import annotations\n\nimport os\nimport pickle\nimport typing as t\nimport logging\nimport functools\nimport itertools\nfrom typing import TYPE_CHECKING\n\nimport bentoml\nfrom bentoml import Tag\nfrom bentoml import Runnable\nfrom bentoml.models import ModelContext\nfrom bentoml.e... | diff --git a/bentoml/_internal/frameworks/keras.py b/bentoml/_internal/frameworks/keras.py
index 7ab52682fc5..9e692cefb96 100644
--- a/bentoml/_internal/frameworks/keras.py
+++ b/bentoml/_internal/frameworks/keras.py
@@ -259,8 +259,8 @@ def get_runnable(
)
class KerasRunnable(Runnable):
- SUPPORT_GPU... |
psychopy__psychopy-5691 | Radio does not work in Slider component in 2023 versions (2023 ~ 2023.1.2)
When using the Slider componenet in 2023~ versions the the ‘radio’ does not work.
It does not show the ticks according to the presetted values, and when I click the radio button the experiment shuts down.
I think this is a bug as when I do... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"A class for getting numeric or categorical ratings, e.g., a 1-to-7 scale.\"\"\"\n\n# Part of the PsychoPy library\n# Copyright (C) 2015 Jonathan Peirce\n# Distributed under the terms of the GNU General Public License (GPL).\n\n\n\n\nimport co... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"A class for getting numeric or categorical ratings, e.g., a 1-to-7 scale.\"\"\"\n\n# Part of the PsychoPy library\n# Copyright (C) 2015 Jonathan Peirce\n# Distributed under the terms of the GNU General Public License (GPL).\n\n\n\n\nimport co... | diff --git a/psychopy/visual/slider.py b/psychopy/visual/slider.py
index 82bf911a00..2a2492f53f 100644
--- a/psychopy/visual/slider.py
+++ b/psychopy/visual/slider.py
@@ -180,7 +180,6 @@ def __init__(self,
self.ori = ori
self.flip = flip
- self.startValue = self.markerPos = startValue
... |
celery__celery-3693 | Incorrect handling of tasks with keyword arguments
Probably the problem is this: https://github.com/celery/celery/pull/3658
## Checklist
- [x] I have included the output of ``celery -A proj report`` in the issue.
(if you are not able to do this, then at least specify the Celery
version affected).
... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Functional-style utilties.\"\"\"\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport inspect\nimport sys\n\nfrom functools import partial\nfrom itertools import chain, islice\n\nfrom kombu.utils.functional import (\n LRUCache, dictf... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Functional-style utilties.\"\"\"\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport inspect\nimport sys\n\nfrom functools import partial\nfrom itertools import chain, islice\n\nfrom kombu.utils.functional import (\n LRUCache, dictf... | diff --git a/celery/utils/functional.py b/celery/utils/functional.py
index 660ff22af54..b7ece350593 100644
--- a/celery/utils/functional.py
+++ b/celery/utils/functional.py
@@ -252,10 +252,10 @@ def _argsfromspec(spec, replace_defaults=True):
', '.join(positional),
', '.join('{0}={1}'.format(k, v) for... |
pydantic__pydantic-4142 | `create_model` docstring incorrect for custom-specified `Field`s
### Checks
* [x] I added a descriptive title to this issue
* [x] I have searched (google, github) for similar issues and couldn't find anything
* [x] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think this is a ... | [
{
"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/pydantic/main.py b/pydantic/main.py
index 0c20d9e69d5..e5454de189c 100644
--- a/pydantic/main.py
+++ b/pydantic/main.py
@@ -943,7 +943,9 @@ def create_model(
:param field_definitions: fields of the model (or extra fields if a base is supplied)
in the format `<name>=(<type>, <default default>)... |
great-expectations__great_expectations-5460 | Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`
| [
{
"content": "from typing import Any, Dict, List, Optional, Union\n\nfrom great_expectations.core.metric_domain_types import MetricDomainTypes\nfrom great_expectations.execution_engine import (\n SparkDFExecutionEngine,\n SqlAlchemyExecutionEngine,\n)\nfrom great_expectations.expectations.metrics.import_m... | [
{
"content": "from typing import Any, Dict, List, Optional, Union\n\nfrom great_expectations.core.metric_domain_types import MetricDomainTypes\nfrom great_expectations.execution_engine import (\n SparkDFExecutionEngine,\n SqlAlchemyExecutionEngine,\n)\nfrom great_expectations.expectations.metrics.import_m... | diff --git a/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_query_expectations.md b/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_query_expectations.md
new file mode 100644
index 000000000000..4c747ff5ebd7
--- /dev/null
+++ b/docs/guides/expectations/creating_cus... |
lnbits__lnbits-2074 | LNDRestWallet: catch http errors
This PR catches the errors in `lndrest.py` that can happen when for example the LND certificate has expired.
This can lead to stuck payments.
| [
{
"content": "import asyncio\nimport base64\nimport hashlib\nimport json\nfrom typing import AsyncGenerator, Dict, Optional\n\nimport httpx\nfrom loguru import logger\n\nfrom lnbits.nodes.lndrest import LndRestNode\nfrom lnbits.settings import settings\n\nfrom .base import (\n InvoiceResponse,\n PaymentRe... | [
{
"content": "import asyncio\nimport base64\nimport hashlib\nimport json\nfrom typing import AsyncGenerator, Dict, Optional\n\nimport httpx\nfrom loguru import logger\n\nfrom lnbits.nodes.lndrest import LndRestNode\nfrom lnbits.settings import settings\n\nfrom .base import (\n InvoiceResponse,\n PaymentRe... | diff --git a/lnbits/wallets/lndrest.py b/lnbits/wallets/lndrest.py
index 10be48edeb..757ec813fd 100644
--- a/lnbits/wallets/lndrest.py
+++ b/lnbits/wallets/lndrest.py
@@ -195,6 +195,12 @@ async def get_payment_status(self, checking_id: str) -> PaymentStatus:
if "message" in line["error"]
... |
mlflow__mlflow-11096 | [BUG] Failed to score model on payload. Error: 'Endpoint' object has no attribute 'get'
### Issues Policy acknowledgement
- [X] I have read and agree to submit bug reports in accordance with the [issues policy](https://www.github.com/mlflow/mlflow/blob/master/ISSUE_POLICY.md)
### Where did you encounter this bug?
L... | [
{
"content": "import logging\nimport os\nimport urllib.parse\n\nfrom mlflow.exceptions import MlflowException\nfrom mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE\nfrom mlflow.utils.openai_utils import REQUEST_URL_CHAT\n\n_logger = logging.getLogger(__name__)\n\n\n# TODO: improve this name\ndef sco... | [
{
"content": "import logging\nimport os\nimport urllib.parse\n\nfrom mlflow.exceptions import MlflowException\nfrom mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE\nfrom mlflow.utils.openai_utils import REQUEST_URL_CHAT\n\n_logger = logging.getLogger(__name__)\n\n\n# TODO: improve this name\ndef sco... | diff --git a/mlflow/metrics/genai/model_utils.py b/mlflow/metrics/genai/model_utils.py
index 8327351496a80..6ea4dce3b2973 100644
--- a/mlflow/metrics/genai/model_utils.py
+++ b/mlflow/metrics/genai/model_utils.py
@@ -114,11 +114,15 @@ def _call_openai_api(openai_uri, payload, eval_parameters):
def _call_deployment... |
borgbackup__borg-5212 | goodbye wheezy
the binaries for 1.0.x and 1.1.x are currently built using pyinstaller on debian 7 "wheezy" (64 and 32bit).
but, wheezy will run out of LTS support 2018-05-31 and this is a problem because we bundle python and libraries from the dist into the borg binary. https://wiki.debian.org/LTS
so, the plan cu... | [
{
"content": "# -*- encoding: utf-8 *-*\nimport os\nimport io\nimport re\nimport sys\nfrom collections import OrderedDict\nfrom datetime import datetime\nfrom glob import glob\n\nfrom distutils.command.build import build\nfrom distutils.core import Command\n\nimport textwrap\n\nimport setup_lz4\nimport setup_zs... | [
{
"content": "# -*- encoding: utf-8 *-*\nimport os\nimport io\nimport re\nimport sys\nfrom collections import OrderedDict\nfrom datetime import datetime\nfrom glob import glob\n\nfrom distutils.core import Command\n\nimport textwrap\n\nimport setup_lz4\nimport setup_zstd\nimport setup_b2\n\n# True: use the shar... | diff --git a/Vagrantfile b/Vagrantfile
index 918f499a7a..4025d5e639 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -7,13 +7,6 @@ $cpus = Integer(ENV.fetch('VMCPUS', '4')) # create VMs with that many cpus
$xdistn = Integer(ENV.fetch('XDISTN', '4')) # dispatch tests to that many pytest workers
$wmem = $xdistn * 256 #... |
jazzband__pip-tools-1802 | pip-sync errors when merging multiple requirements.txt files that point at the same editable install
pip-sync raises an `AttributeError: 'NoneType' object has no attribute 'specifier'` error when you try and run it with multiple requirements files that each include an editable install for the same package.
#### Envi... | [
{
"content": "from __future__ import annotations\n\nimport collections\nimport os\nimport sys\nimport tempfile\nfrom subprocess import run # nosec\nfrom typing import Deque, Iterable, Mapping, ValuesView\n\nimport click\nfrom pip._internal.commands.freeze import DEV_PKGS\nfrom pip._internal.req import InstallR... | [
{
"content": "from __future__ import annotations\n\nimport collections\nimport os\nimport sys\nimport tempfile\nfrom subprocess import run # nosec\nfrom typing import Deque, Iterable, Mapping, ValuesView\n\nimport click\nfrom pip._internal.commands.freeze import DEV_PKGS\nfrom pip._internal.req import InstallR... | diff --git a/piptools/sync.py b/piptools/sync.py
index 7a0048b3d..184d78a1b 100644
--- a/piptools/sync.py
+++ b/piptools/sync.py
@@ -104,7 +104,11 @@ def merge(
if existing_ireq:
# NOTE: We check equality here since we can assume that the
# requirements are all... |
mathesar-foundation__mathesar-1561 | Unexpected results when grouping by multiple columns
## Steps to reproduce
1. Use the Library Management schema
1. Go to "Items"
1. Group by "Acquisition Date" (year), then by "Acquisition Price".
1. Observe a group for `1903`, `$6.63` containing two records, with ids 2296 and 1393.
1. Expect both records in the g... | [
{
"content": "from enum import Enum\nimport json\nimport logging\nfrom sqlalchemy import select, func, and_, case, literal, cast, TEXT, extract\n\nfrom db.functions.operations.deserialize import get_db_function_subclass_by_id\nfrom db.records import exceptions as records_exceptions\nfrom db.records.operations i... | [
{
"content": "from enum import Enum\nimport json\nimport logging\nfrom sqlalchemy import select, func, and_, case, literal, cast, TEXT, extract\n\nfrom db.functions.operations.deserialize import get_db_function_subclass_by_id\nfrom db.records import exceptions as records_exceptions\nfrom db.records.operations i... | diff --git a/db/records/operations/group.py b/db/records/operations/group.py
index 1a609f9e81..f984a2f590 100644
--- a/db/records/operations/group.py
+++ b/db/records/operations/group.py
@@ -251,11 +251,17 @@ def get_group_augmented_records_pg_query(table, group_by):
def _get_distinct_group_select(table, grouping_... |
conan-io__conan-13531 | [bug] Xcode 14.2 with macos sdk 13.1 not working
### Environment details
* Operating System+version: MacOS 13.2
* Compiler+version: Xcode 14.2
* Conan version: 1.59.0
* Python version: 3.8
### Steps to reproduce
Setting macos sdk to 13.0 and building cmake on a default install of xcode 14.2 fails
### Logs
_No... | [
{
"content": "default_settings_yml = \"\"\"\\\n# This file was generated by Conan. Remove this comment if you edit this file or Conan\n# will destroy your changes.\nos:\n Windows:\n subsystem: [null, cygwin, msys, msys2, wsl]\n WindowsStore:\n version: [\"8.1\", \"10.0\"]\n WindowsCE:\n ... | [
{
"content": "default_settings_yml = \"\"\"\\\n# This file was generated by Conan. Remove this comment if you edit this file or Conan\n# will destroy your changes.\nos:\n Windows:\n subsystem: [null, cygwin, msys, msys2, wsl]\n WindowsStore:\n version: [\"8.1\", \"10.0\"]\n WindowsCE:\n ... | diff --git a/conans/client/conf/__init__.py b/conans/client/conf/__init__.py
index b96fb79a3c8..a9409e2ac41 100644
--- a/conans/client/conf/__init__.py
+++ b/conans/client/conf/__init__.py
@@ -36,7 +36,7 @@
"13.0", "13.1", "13.2", "13.4", "14.0", "14.2", "14.3", "14.5", "15.0", "15.2", "15.4", ... |
getmoto__moto-433 | CloudFormation's GetTemplate response is inaccurate
The GetTemplate function returns through `boto` the following format:
``` python
>>> import boto.cloudformation
>>> cf = boto.cloudformation.connect_to_region('us-east-1')
>>> cf.get_template('<my-stack-id>')
{u'GetTemplateResponse': {u'GetTemplateResult': {u'Templat... | [
{
"content": "from __future__ import unicode_literals\n\nimport json\nfrom six.moves.urllib.parse import urlparse\n\nfrom moto.core.responses import BaseResponse\nfrom moto.s3 import s3_backend\nfrom .models import cloudformation_backends\n\n\nclass CloudFormationResponse(BaseResponse):\n\n @property\n de... | [
{
"content": "from __future__ import unicode_literals\n\nimport json\nfrom six.moves.urllib.parse import urlparse\n\nfrom moto.core.responses import BaseResponse\nfrom moto.s3 import s3_backend\nfrom .models import cloudformation_backends\n\n\nclass CloudFormationResponse(BaseResponse):\n\n @property\n de... | diff --git a/moto/cloudformation/responses.py b/moto/cloudformation/responses.py
index 28db697cfc9c..c5196b2df5a9 100644
--- a/moto/cloudformation/responses.py
+++ b/moto/cloudformation/responses.py
@@ -86,9 +86,19 @@ def list_stack_resources(self):
def get_template(self):
name_or_stack_id = self.querys... |
pulp__pulpcore-4311 | Import-check may return error saying "director does not exist" when it actually just lack permissions
Endpoint /pulp/api/v3/importers/core/pulp/import-check/ returns error saying "Directory does not exist" when pulp user lack permissions to read said directory.
**To Reproduce**
Try importing content from a direct... | [
{
"content": "from gettext import gettext as _\nimport json\nimport os\nfrom drf_spectacular.utils import extend_schema\nfrom rest_framework.views import APIView\nfrom rest_framework.response import Response\n\nfrom pulpcore.app import settings\nfrom pulpcore.app.serializers import PulpImportCheckResponseSerial... | [
{
"content": "from gettext import gettext as _\nimport json\nimport os\nfrom drf_spectacular.utils import extend_schema\nfrom rest_framework.views import APIView\nfrom rest_framework.response import Response\n\nfrom pulpcore.app import settings\nfrom pulpcore.app.serializers import PulpImportCheckResponseSerial... | diff --git a/CHANGES/4294.bugfix b/CHANGES/4294.bugfix
new file mode 100644
index 0000000000..ce76075691
--- /dev/null
+++ b/CHANGES/4294.bugfix
@@ -0,0 +1 @@
+Fixed bug where incorrect error message presented in relation to content-import
diff --git a/pulpcore/app/views/importer.py b/pulpcore/app/views/importer.py
ind... |
pulp__pulpcore-4310 | Import-check may return error saying "director does not exist" when it actually just lack permissions
Endpoint /pulp/api/v3/importers/core/pulp/import-check/ returns error saying "Directory does not exist" when pulp user lack permissions to read said directory.
**To Reproduce**
Try importing content from a direct... | [
{
"content": "from gettext import gettext as _\nimport json\nimport os\nfrom drf_spectacular.utils import extend_schema\nfrom rest_framework.views import APIView\nfrom rest_framework.response import Response\n\nfrom pulpcore.app import settings\nfrom pulpcore.app.serializers import PulpImportCheckResponseSerial... | [
{
"content": "from gettext import gettext as _\nimport json\nimport os\nfrom drf_spectacular.utils import extend_schema\nfrom rest_framework.views import APIView\nfrom rest_framework.response import Response\n\nfrom pulpcore.app import settings\nfrom pulpcore.app.serializers import PulpImportCheckResponseSerial... | diff --git a/CHANGES/4294.bugfix b/CHANGES/4294.bugfix
new file mode 100644
index 0000000000..ce76075691
--- /dev/null
+++ b/CHANGES/4294.bugfix
@@ -0,0 +1 @@
+Fixed bug where incorrect error message presented in relation to content-import
diff --git a/pulpcore/app/views/importer.py b/pulpcore/app/views/importer.py
ind... |
ManimCommunity__manim-1923 | Command line help text is cut off
## Enhancement proposal
When running `manim --help`, the following output is returned:
```
Manim Community v0.9.0
Usage: manim [OPTIONS] COMMAND [ARGS]...
Animation engine for explanatory math videos
Options:
--version Show version and exit.
--help Show this ... | [
{
"content": "\"\"\"Manim's init subcommand.\n\nManim's init subcommand is accessed in the command-line interface via ``manim\ninit``. Here you can specify options, subcommands, and subgroups for the init\ngroup.\n\n\"\"\"\nfrom pathlib import Path\n\nimport click\n\nfrom ...constants import CONTEXT_SETTINGS, E... | [
{
"content": "\"\"\"Manim's init subcommand.\n\nManim's init subcommand is accessed in the command-line interface via ``manim\ninit``. Here you can specify options, subcommands, and subgroups for the init\ngroup.\n\n\"\"\"\nfrom pathlib import Path\n\nimport click\n\nfrom ...constants import CONTEXT_SETTINGS, E... | diff --git a/manim/cli/init/commands.py b/manim/cli/init/commands.py
index 6b0a4f5611..c118c056a6 100644
--- a/manim/cli/init/commands.py
+++ b/manim/cli/init/commands.py
@@ -16,13 +16,14 @@
@click.command(
context_settings=CONTEXT_SETTINGS,
epilog=EPILOG,
+ short_help="""Sets up a new project in current ... |
facebookresearch__xformers-57 | [bug] Failing triton dropout test
# 🐛 Bug
See https://app.circleci.com/pipelines/github/facebookresearch/xformers/212/workflows/8988c71c-84f5-4bd0-bd59-ac7d293c2370/jobs/398
Not sure why this happens just now, looking into that
## Command
can repro locally with ` pytest tests -k dropout -x -v `
| [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\n\n# CREDITS: This comes almost as-is from the Triton dropout tutorial\n# https://raw.githubuse... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\n\n# CREDITS: This comes almost as-is from the Triton dropout tutorial\n# https://raw.githubuse... | diff --git a/tests/test_triton_dropout.py b/tests/test_triton_dropout.py
index ce8cf94331..75971c9991 100644
--- a/tests/test_triton_dropout.py
+++ b/tests/test_triton_dropout.py
@@ -55,7 +55,7 @@ def test_dropout(shape, amp):
# Check that 0 means no dropout
y = dropout(x, p=0)
- assert torch... |
buildbot__buildbot-7555 | Flaky test test_userpass_wait
Hello,
I'm a NixOS maintainer, a distribution featuring buildbot as a package. Currently, buildbot is broken on NixOS because of some tests not passing, including ``test_userpass_wait`` and ``test_userpass_wait_bytes``. I've tried to investigate the root cause of this, but I'm not sure wh... | [
{
"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/schedulers/trysched.py b/master/buildbot/schedulers/trysched.py
index 6b497b9b82e0..d44ef1e78ada 100644
--- a/master/buildbot/schedulers/trysched.py
+++ b/master/buildbot/schedulers/trysched.py
@@ -370,11 +370,13 @@ def buildEvent(key, msg):
if key[-1] == 'finished':
... |
fossasia__open-event-server-940 | If nested fields are null, show null instead of their structure
Take for example Sessions API. If `track` is None (not set), it shows
``` json
"title": "string",
"track": {
"id": null,
"name": null
},
"video": "string"
```
It would be better if it shows
``` json
"title": "string",
"track": null... | [
{
"content": "from flask.ext.restplus import Resource, Namespace\nfrom sqlalchemy.orm.collections import InstrumentedList\n\nfrom open_event.models.session import Session as SessionModel\nfrom open_event.models.track import Track as TrackModel\nfrom open_event.models.microlocation import Microlocation as Microl... | [
{
"content": "from flask.ext.restplus import Resource, Namespace\nfrom sqlalchemy.orm.collections import InstrumentedList\n\nfrom open_event.models.session import Session as SessionModel\nfrom open_event.models.track import Track as TrackModel\nfrom open_event.models.microlocation import Microlocation as Microl... | diff --git a/open_event/api/sessions.py b/open_event/api/sessions.py
index 00ad8e1a06..763b7be1f0 100644
--- a/open_event/api/sessions.py
+++ b/open_event/api/sessions.py
@@ -41,10 +41,10 @@
'comments': fields.String(),
'start_time': fields.DateTime(required=True),
'end_time': fields.DateTime(required=Tr... |
graspologic-org__graspologic-420 | GraphMatch should inherit from BaseEstimator
| [
{
"content": "# Copyright 2019 NeuroData (http://neurodata.io)\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 2019 NeuroData (http://neurodata.io)\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/graspy/match/gmp.py b/graspy/match/gmp.py
index 073e508a4..a1c429887 100644
--- a/graspy/match/gmp.py
+++ b/graspy/match/gmp.py
@@ -16,12 +16,13 @@
import math
from scipy.optimize import linear_sum_assignment
from scipy.optimize import minimize_scalar
+from sklearn.base import BaseEstimator
from sklear... |
zalando__patroni-1664 | no_params for custom bootstrap method
**Please** add support the `no_params` parameter for the custom cluster bootstrap method.
> A special no_params parameter, if defined, restricts passing parameters to custom command.
In order not to wrap the restore command to a script.
Example:
```
bootstrap:
method:... | [
{
"content": "import logging\nimport os\nimport shlex\nimport tempfile\nimport time\n\nfrom patroni.dcs import RemoteMember\nfrom patroni.utils import deep_compare\nfrom six import string_types\n\nlogger = logging.getLogger(__name__)\n\n\nclass Bootstrap(object):\n\n def __init__(self, postgresql):\n ... | [
{
"content": "import logging\nimport os\nimport shlex\nimport tempfile\nimport time\n\nfrom patroni.dcs import RemoteMember\nfrom patroni.utils import deep_compare\nfrom six import string_types\n\nlogger = logging.getLogger(__name__)\n\n\nclass Bootstrap(object):\n\n def __init__(self, postgresql):\n ... | diff --git a/docs/replica_bootstrap.rst b/docs/replica_bootstrap.rst
index 97c1ccb21..49d442417 100644
--- a/docs/replica_bootstrap.rst
+++ b/docs/replica_bootstrap.rst
@@ -24,6 +24,7 @@ arguments to them, i.e. the name of the cluster and the path to the data directo
<custom_bootstrap_method_name>:
... |
sagemath__sage-36165 | Reducing Gamma(N) cusps does not always reduce
### Steps To Reproduce
In Sage-10.1:
sage: Gamma(7).reduce_cusp(Cusp(6,7))
6/7
sage: Gamma(7).reduce_cusp(Cusp(1,0))
Infinity
sage: Gamma(7).are_equivalent(Cusp(1,0), Cusp(6,7))
True
### Expected Behavior
Both 6/7 and 1/0 should reduce to Infinity = 1/... | [
{
"content": "r\"\"\"\nCongruence subgroup `\\Gamma(N)`\n\"\"\"\n\n#*****************************************************************************\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software F... | [
{
"content": "r\"\"\"\nCongruence subgroup `\\Gamma(N)`\n\"\"\"\n\n#*****************************************************************************\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software F... | diff --git a/src/sage/modular/arithgroup/congroup_gamma.py b/src/sage/modular/arithgroup/congroup_gamma.py
index bc1cbb6afd6..bba5868dab6 100644
--- a/src/sage/modular/arithgroup/congroup_gamma.py
+++ b/src/sage/modular/arithgroup/congroup_gamma.py
@@ -240,6 +240,12 @@ def reduce_cusp(self, c):
sage: G = G... |
pypa__pip-5280 | pip 10 is unable to install from non-editable VCS URLs
* Pip version: 10.0.0
* Python version: 3.5.4
* Operating system: Linux
### Description:
I'm trying to install a package from Git.
### What I've run:
```bash
$ pip3 install git+ssh://git@example.com/mypackage.git#egg=mypackage
```
```
Building w... | [
{
"content": "\"\"\"\nSupport for installing and building the \"wheel\" binary package format.\n\"\"\"\nfrom __future__ import absolute_import\n\nimport collections\nimport compileall\nimport copy\nimport csv\nimport hashlib\nimport logging\nimport os.path\nimport re\nimport shutil\nimport stat\nimport sys\nimp... | [
{
"content": "\"\"\"\nSupport for installing and building the \"wheel\" binary package format.\n\"\"\"\nfrom __future__ import absolute_import\n\nimport collections\nimport compileall\nimport copy\nimport csv\nimport hashlib\nimport logging\nimport os.path\nimport re\nimport shutil\nimport stat\nimport sys\nimp... | diff --git a/news/5251.bugfix b/news/5251.bugfix
new file mode 100644
index 00000000000..7bc1b10c71b
--- /dev/null
+++ b/news/5251.bugfix
@@ -0,0 +1 @@
+A crash when reinstalling from VCS requirements has been fixed.
diff --git a/src/pip/_internal/wheel.py b/src/pip/_internal/wheel.py
index 170e2bdc517..c71f17d2c8b 100... |
ytdl-org__youtube-dl-10971 | openload.co extractor not working
youtube-dl --get-url --verbose https://openload.co/embed/kUEfGclsU9o/
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--get-url', u'--verbose', u'https://openload.co/embed/kUEfGclsU9o/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals, division\n\nfrom .common import InfoExtractor\nfrom ..compat import (\n compat_chr,\n compat_ord,\n)\nfrom ..utils import (\n determine_ext,\n ExtractorError,\n)\n\n\nclass OpenloadIE(InfoExtractor):\n _VALID_URL = r'https?:/... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals, division\n\nfrom .common import InfoExtractor\nfrom ..compat import (\n compat_chr,\n compat_ord,\n)\nfrom ..utils import (\n determine_ext,\n ExtractorError,\n)\n\n\nclass OpenloadIE(InfoExtractor):\n _VALID_URL = r'https?:/... | diff --git a/youtube_dl/extractor/openload.py b/youtube_dl/extractor/openload.py
index 4f5175136bb..6cf7e4a77a4 100644
--- a/youtube_dl/extractor/openload.py
+++ b/youtube_dl/extractor/openload.py
@@ -70,10 +70,15 @@ def _real_extract(self, url):
r'<span[^>]*>([^<]+)</span>\s*<span[^>]*>[^<]+</span>\s*<spa... |
chainer__chainer-267 | Maybe there is a bug in chainer.optimizer.weight_decay(decay).
In the [optimizer.py](https://github.com/pfnet/chainer/blob/30807b4f9f40177f592099663b86a6bb3eb1f867/chainer/optimizer.py) file, `weight_decay` is implemented as following:
``` python
def weight_decay(self, decay):
for p, g, _ in self.tuples:
... | [
{
"content": "import math\n\nimport numpy\n\nfrom chainer import cuda\n\n\n# TODO(delta2323): Make it public function and move it to common directory.\n\n\ndef _sqnorm(x):\n if isinstance(x, cuda.GPUArray):\n with cuda.using_device(x):\n return float(cuda.gpuarray.dot(x, x).get())\n x = ... | [
{
"content": "import math\n\nimport numpy\n\nfrom chainer import cuda\n\n\n# TODO(delta2323): Make it public function and move it to common directory.\n\n\ndef _sqnorm(x):\n if isinstance(x, cuda.GPUArray):\n with cuda.using_device(x):\n return float(cuda.gpuarray.dot(x, x).get())\n x = ... | diff --git a/chainer/optimizer.py b/chainer/optimizer.py
index df6e2841bd6c..2025ddd723ce 100644
--- a/chainer/optimizer.py
+++ b/chainer/optimizer.py
@@ -175,10 +175,10 @@ def weight_decay(self, decay):
if isinstance(p, cuda.GPUArray):
with cuda.using_device(p):
cuda.... |
pantsbuild__pants-12269 | pants 2.5 dependency issues with cross-platform targets
I have a pants build with one target that tries to build a cross-platform pex file:
```
platforms = [
'linux-x86_64-cp-37-m',
'macosx-10.14-x86_64-cp-37-m'
]
```
That built fine on pants 2.4 (and still does) but started to fail when I ... | [
{
"content": "# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport dataclasses\nimport itertools\nimport logging\nfrom dataclasses import dataclass\nfrom typing import Iterable, Tuple\n... | [
{
"content": "# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport dataclasses\nimport itertools\nimport logging\nfrom dataclasses import dataclass\nfrom typing import Iterable, Tuple\n... | diff --git a/src/python/pants/backend/python/util_rules/pex_from_targets.py b/src/python/pants/backend/python/util_rules/pex_from_targets.py
index 2ca987de6fc..0e7de3a820d 100644
--- a/src/python/pants/backend/python/util_rules/pex_from_targets.py
+++ b/src/python/pants/backend/python/util_rules/pex_from_targets.py
@@ ... |
nilearn__nilearn-3631 | User warning when data is being upsampled when masked
<!--Provide a brief description what you would like changes and why.-->
The default beahaviour of maskers is to resample the data to the mask's affine, but when the data has a lower resolution than the mask, it upsamples the data, requiring more computation and mem... | [
{
"content": "\"\"\"Transformer used to apply basic transformations on MRI data.\"\"\"\n# Author: Gael Varoquaux, Alexandre Abraham\n# License: simplified BSD\n\nimport warnings\nfrom copy import copy as copy_object\nfrom functools import partial\n\nfrom joblib import Memory\nfrom nilearn import _utils, image, ... | [
{
"content": "\"\"\"Transformer used to apply basic transformations on MRI data.\"\"\"\n# Author: Gael Varoquaux, Alexandre Abraham\n# License: simplified BSD\n\nimport warnings\nfrom copy import copy as copy_object\nfrom functools import partial\n\nfrom joblib import Memory\nfrom nilearn import _utils, image, ... | diff --git a/doc/changes/latest.rst b/doc/changes/latest.rst
index c53cb02e2b..d51f4ab197 100644
--- a/doc/changes/latest.rst
+++ b/doc/changes/latest.rst
@@ -41,6 +41,8 @@ Enhancements
- Added special handling of ``param_grid`` and ``cv_params_`` for Decoder objects using models with built-in cross-validation (e.g.... |
carpentries__amy-1910 | Re-activate fields for pre/post surveys
We used to have the fields `instructors_pre` and `instructors_post` in the `workshops_event` table. The fields still exist but are hidden from view. We would like to put these fields back in the `Event` view. These fields will store the html link to view the pre/post survey re... | [
{
"content": "from datetime import datetime, timezone\nimport re\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import HTML, Button, Div, Field, Layout, Submit\nfrom django import forms\nfrom django.contrib.auth.models import Permission\nfrom django.contrib.sites.models import Site\nfro... | [
{
"content": "from datetime import datetime, timezone\nimport re\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import HTML, Button, Div, Field, Layout, Submit\nfrom django import forms\nfrom django.contrib.auth.models import Permission\nfrom django.contrib.sites.models import Site\nfro... | diff --git a/amy/templates/includes/event_details_table.html b/amy/templates/includes/event_details_table.html
index 6bb237bb7..37e029df2 100644
--- a/amy/templates/includes/event_details_table.html
+++ b/amy/templates/includes/event_details_table.html
@@ -19,6 +19,8 @@
<tr class="{% if not event.url %}table-danger{... |
facebookresearch__fairscale-406 | [fix] Assert with an understandable error message if there are not enough parameters in the model given the world size
## 🚀 Feature
Assert if shards are empty, explain what the issue is
## Motivation
Can happen in dummy tests and be confusing **https://github.com/facebookresearch/fairscale/issues/397**
## Pit... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom collections import OrderedDict\nimport copy\nfrom itertools import chain\nimport logging\... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom collections import OrderedDict\nimport copy\nfrom itertools import chain\nimport logging\... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e94372c4..4d73cb231 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## NEXT - TBD
+###... |
Textualize__textual-1427 | Support clearing columns via `DataTable.clear()`
Looks like this feature must have gotten lost in the shuffle, since the docstring mentions it but the function doesn't support it: https://github.com/Textualize/textual/blob/3aaa4d3ec1cfd1be86c781a34da09e6bc99e8eff/src/textual/widgets/_data_table.py#L315-L328
Happy to... | [
{
"content": "from __future__ import annotations\n\nfrom dataclasses import dataclass, field\nfrom itertools import chain, zip_longest\nfrom typing import ClassVar, Generic, Iterable, NamedTuple, TypeVar, cast\n\nfrom rich.console import RenderableType\nfrom rich.padding import Padding\nfrom rich.protocol impor... | [
{
"content": "from __future__ import annotations\n\nfrom dataclasses import dataclass, field\nfrom itertools import chain, zip_longest\nfrom typing import ClassVar, Generic, Iterable, NamedTuple, TypeVar, cast\n\nfrom rich.console import RenderableType\nfrom rich.padding import Padding\nfrom rich.protocol impor... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index aff340411f..d0e5349c9e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versionin... |
django-cms__django-cms-2668 | Server error 500 if no accept_language header is present
If a bot like the google bots who does not set the accept_language header is visiting the page without a language prefix and i18n is activated, following error is thrown:
NoReverseMatch: Reverse for 'pages-details-by-slug' with arguments '()' and keyword argumen... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom functools import update_wrapper\nimport pprint\nfrom cms.utils.compat.urls import urljoin\nfrom cms import constants\nfrom cms.exceptions import CMSDeprecationWarning\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom djan... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom functools import update_wrapper\nimport pprint\nfrom cms.utils.compat.urls import urljoin\nfrom cms import constants\nfrom cms.exceptions import CMSDeprecationWarning\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom djan... | diff --git a/cms/tests/i18n.py b/cms/tests/i18n.py
index 17e84616fb8..ef3fec41bc8 100644
--- a/cms/tests/i18n.py
+++ b/cms/tests/i18n.py
@@ -5,7 +5,7 @@
class TestLanguages(SettingsOverrideTestCase):
settings_overrides = {
- 'LANGUAGE_CODE': 'en-us',
+ 'LANGUAGE_CODE': 'en',
'LANGUAGES': ... |
inventree__InvenTree-5412 | Settings do not work in combination with api views
### Please verify that this bug has NOT been raised before.
- [X] I checked and didn't find a similar issue
### Describe the bug*
Using DRF views in plugins result in the following error if used in combination with settings mixin:
```
_pickle.PicklingError: ... | [
{
"content": "\"\"\"Plugin model definitions.\"\"\"\n\nimport inspect\nimport warnings\n\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.contrib.auth.models import User\nfrom django.db import models\nfrom django.utils.translation import gettext_lazy as _\n\nimport common.models\... | [
{
"content": "\"\"\"Plugin model definitions.\"\"\"\n\nimport inspect\nimport warnings\n\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.contrib.auth.models import User\nfrom django.db import models\nfrom django.utils.translation import gettext_lazy as _\n\nimport common.models\... | diff --git a/InvenTree/plugin/models.py b/InvenTree/plugin/models.py
index 8877997f9aca..beeb5134650d 100644
--- a/InvenTree/plugin/models.py
+++ b/InvenTree/plugin/models.py
@@ -103,6 +103,12 @@ def get_plugin_meta(name):
# Save plugin
self.plugin: InvenTreePlugin = plugin
+ def __getstate__(sel... |
plotly__plotly.py-958 | Not all dependecies are listed
Would it be possible to add pandas (and numpy) to the list of dependencies? They're both imported in various places but not listed. This occasionally causes problems for packages importing plotly, since `pip` may not install all dependencies.
Xref: https://github.com/deeptools/deepTool... | [
{
"content": "from __future__ import absolute_import\n\n# Require that numpy exists for figure_factory\nimport numpy\n\nfrom plotly.figure_factory._2d_density import create_2d_density\nfrom plotly.figure_factory._annotated_heatmap import create_annotated_heatmap\nfrom plotly.figure_factory._bullet import create... | [
{
"content": "from __future__ import absolute_import\n\nfrom plotly import optional_imports\n\n# Require that numpy exists for figure_factory\nimport numpy\n\nfrom plotly.figure_factory._2d_density import create_2d_density\nfrom plotly.figure_factory._annotated_heatmap import create_annotated_heatmap\nfrom plot... | diff --git a/plotly/figure_factory/__init__.py b/plotly/figure_factory/__init__.py
index 9bf00cbcf2a..a8be19872e1 100644
--- a/plotly/figure_factory/__init__.py
+++ b/plotly/figure_factory/__init__.py
@@ -1,5 +1,7 @@
from __future__ import absolute_import
+from plotly import optional_imports
+
# Require that numpy ... |
beetbox__beets-1473 | python-mpd is old and crusty, beets should start using python-mpd2
Assuming that at some point in time `beets` needs to run on Python 3 (which it does eventually, because Python 2 is being phased out), there will be an issue concerning `python-mpd`; `python-mpd` is not compatible with Python 3, nor is it really even ma... | [
{
"content": "#!/usr/bin/env python\n\n# This file is part of beets.\n# Copyright 2015, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in... | [
{
"content": "#!/usr/bin/env python\n\n# This file is part of beets.\n# Copyright 2015, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in... | diff --git a/docs/plugins/mpdstats.rst b/docs/plugins/mpdstats.rst
index a483b13bc4..1f74a0976d 100644
--- a/docs/plugins/mpdstats.rst
+++ b/docs/plugins/mpdstats.rst
@@ -14,12 +14,12 @@ habits from `MPD`_. It collects the following information about tracks:
Installing Dependencies
-----------------------
-This pl... |
pre-commit__pre-commit-785 | documention regarding adding new python based hooks needs improvement
Apparently we need some kind of how-to or mini tutorial on how to add a new hook to pre-commit as the basic documentation does not help someone without previous pre-commit knowledge.
I wanted to add support for `bashate`, a shell script linter wri... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nimport os.path\n\nfrom identify.identify import parse_shebang_from_file\n\n\nclass ExecutableNotFoundError(OSError):\n def to_output(self):\n return (1, self.args[0].encode('UTF-8'), b'')\n\n\ndef parse_fi... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import unicode_literals\n\nimport os.path\n\nfrom identify.identify import parse_shebang_from_file\n\n\nclass ExecutableNotFoundError(OSError):\n def to_output(self):\n return (1, self.args[0].encode('UTF-8'), b'')\n\n\ndef parse_fi... | diff --git a/pre_commit/parse_shebang.py b/pre_commit/parse_shebang.py
index 33326819e..5a2ba72fc 100644
--- a/pre_commit/parse_shebang.py
+++ b/pre_commit/parse_shebang.py
@@ -42,16 +42,21 @@ def find_executable(exe, _environ=None):
return None
-def normexe(orig_exe):
- if os.sep not in orig_exe:
- ... |
optuna__optuna-2712 | The objective range of Matplotlib contour plot has a different numerical range from Plotly backend
<!-- Please write a clear and concise description of what the bug is. -->
## Expected behavior
The range of objective in `optuna.visualization.matplotlib.plot_contour` should have a similar range to `optuna.visuali... | [
{
"content": "from collections import defaultdict\nfrom typing import Callable\nfrom typing import DefaultDict\nfrom typing import List\nfrom typing import Optional\nfrom typing import Tuple\nfrom typing import Union\n\nimport numpy as np\nfrom scipy.interpolate import griddata\n\nfrom optuna._experimental impo... | [
{
"content": "from collections import defaultdict\nfrom typing import Callable\nfrom typing import DefaultDict\nfrom typing import List\nfrom typing import Optional\nfrom typing import Tuple\nfrom typing import Union\n\nimport numpy as np\nfrom scipy.interpolate import griddata\n\nfrom optuna._experimental impo... | diff --git a/optuna/visualization/matplotlib/_contour.py b/optuna/visualization/matplotlib/_contour.py
index f2a7d2a165..3047dc6a7e 100644
--- a/optuna/visualization/matplotlib/_contour.py
+++ b/optuna/visualization/matplotlib/_contour.py
@@ -315,13 +315,13 @@ def _calculate_griddata(
else:
yi = n... |
getredash__redash-4894 | Admin shows n/a for started value in manager column
<!--
We use GitHub only for bug reports 🐛
Anything else should be posted to https://discuss.redash.io 👫
🚨For support, help & questions use https://discuss.redash.io/c/support
💡For feature requests & ideas use https://discuss.redash.io/c/feature-requests
... | [
{
"content": "import logging\nimport time\n\nfrom rq.timeouts import JobTimeoutException\n\nfrom redash import models, redis_connection, settings, statsd_client\nfrom redash.models.parameterized_query import (\n InvalidParameterError,\n QueryDetachedFromDataSourceError,\n)\nfrom redash.monitor import rq_j... | [
{
"content": "import logging\nimport time\n\nfrom rq.timeouts import JobTimeoutException\n\nfrom redash import models, redis_connection, settings, statsd_client\nfrom redash.models.parameterized_query import (\n InvalidParameterError,\n QueryDetachedFromDataSourceError,\n)\nfrom redash.monitor import rq_j... | diff --git a/redash/tasks/queries/maintenance.py b/redash/tasks/queries/maintenance.py
index 1336af4790..9c8dcd6985 100644
--- a/redash/tasks/queries/maintenance.py
+++ b/redash/tasks/queries/maintenance.py
@@ -81,6 +81,7 @@ def _apply_auto_limit(query_text, query):
def refresh_queries():
+ started_at = time.ti... |
AnalogJ__lexicon-106 | function update_record() in namesilo.py has wrong query parameter
origin: data['rdata'] = content
modified: data['rrvalue'] = content
| [
{
"content": "from __future__ import print_function\nfrom __future__ import absolute_import\nfrom .base import Provider as BaseProvider\nimport requests\nfrom xml.etree import ElementTree\n\ndef ProviderParser(subparser):\n subparser.add_argument(\"--auth-token\", help=\"specify key used authenticate\")\n\n\... | [
{
"content": "from __future__ import print_function\nfrom __future__ import absolute_import\nfrom .base import Provider as BaseProvider\nimport requests\nfrom xml.etree import ElementTree\n\ndef ProviderParser(subparser):\n subparser.add_argument(\"--auth-token\", help=\"specify key used authenticate\")\n\n\... | diff --git a/lexicon/providers/namesilo.py b/lexicon/providers/namesilo.py
index cb292fcb0..ece99ad2d 100644
--- a/lexicon/providers/namesilo.py
+++ b/lexicon/providers/namesilo.py
@@ -75,7 +75,7 @@ def update_record(self, identifier, type=None, name=None, content=None):
if name:
data['rrhost'] = ... |
cornellius-gp__gpytorch-1178 | Batched Multi-Output GP preconditioner doesn't compute noise model properly[Bug]
# 🐛 Bug
The noise checking to see if the diagonal is constant in the `init_cache` method for the preconditioner is incorrect for batched GPs. Specifically, [here](https://github.com/cornellius-gp/gpytorch/blob/1e19a641d301218936008f828... | [
{
"content": "#!/usr/bin/env python3\n\nimport warnings\n\nimport torch\n\nfrom .. import settings\nfrom ..utils import broadcasting, pivoted_cholesky\nfrom ..utils.warnings import NumericalWarning\nfrom .diag_lazy_tensor import DiagLazyTensor\nfrom .psd_sum_lazy_tensor import PsdSumLazyTensor\nfrom .root_lazy_... | [
{
"content": "#!/usr/bin/env python3\n\nimport warnings\n\nimport torch\n\nfrom .. import settings\nfrom ..utils import broadcasting, pivoted_cholesky\nfrom ..utils.warnings import NumericalWarning\nfrom .diag_lazy_tensor import DiagLazyTensor\nfrom .psd_sum_lazy_tensor import PsdSumLazyTensor\nfrom .root_lazy_... | diff --git a/gpytorch/lazy/added_diag_lazy_tensor.py b/gpytorch/lazy/added_diag_lazy_tensor.py
index 2dd3f8fd2..a120dd410 100644
--- a/gpytorch/lazy/added_diag_lazy_tensor.py
+++ b/gpytorch/lazy/added_diag_lazy_tensor.py
@@ -93,7 +93,10 @@ def precondition_closure(tensor):
def _init_cache(self):
*batch_sh... |
googleapis__google-cloud-python-6125 | Re-generate library using dlp/synth.py
This PR was created by autosynth.
| [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | diff --git a/dlp/synth.py b/dlp/synth.py
index 173de5daa8f5..e056abdde360 100644
--- a/dlp/synth.py
+++ b/dlp/synth.py
@@ -23,20 +23,17 @@
gapic = gcp.GAPICGenerator()
common = gcp.CommonTemplates()
-client_library_version = "0.7.0"
-
library = gapic.py_library(
"dlp", "v2", config_path="/google/privacy/dlp/a... |
scikit-hep__awkward-2111 | `fill_none` doesn't move through indexed types
### Version of Awkward Array
main
### Description and code to reproduce
The failure mode here is where we have a lazy carryd `RecordArray`, which then contains an option. Our existing logic returns early if it doesn't see an option, union, or record.
| [
{
"content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE\n\nimport numbers\n\nimport awkward as ak\n\nnp = ak._nplikes.NumpyMetadata.instance()\ncpu = ak._backends.NumpyBackend.instance()\n\n\ndef fill_none(array, value, axis=-1, *, highlevel=True, behavior=None):\n ... | [
{
"content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE\n\nimport numbers\n\nimport awkward as ak\n\nnp = ak._nplikes.NumpyMetadata.instance()\ncpu = ak._backends.NumpyBackend.instance()\n\n\ndef fill_none(array, value, axis=-1, *, highlevel=True, behavior=None):\n ... | diff --git a/src/awkward/operations/ak_fill_none.py b/src/awkward/operations/ak_fill_none.py
index b3360b2354..0ed49873a1 100644
--- a/src/awkward/operations/ak_fill_none.py
+++ b/src/awkward/operations/ak_fill_none.py
@@ -117,10 +117,10 @@ def action(layout, continuation, **kwargs):
def action(layout, depth, ... |
getmoto__moto-1810 | Decorating a class breaks staticmethods
If a test class is decorated `@moto.mock_s3`:
> moto/core/models.py:71: in wrapper
```python
result = func(*args, **kwargs)
```
causes the instance to be passed to `func` even if it's `@staticmethod` decorated.
I have not tested with the other mocks, but that seem... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nfrom __future__ import absolute_import\n\nfrom collections import defaultdict\nimport functools\nimport inspect\nimport re\nimport six\n\nfrom moto import settings\nimport responses\nfrom moto.packages.httpretty import HTTPretty\nfr... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\nfrom __future__ import absolute_import\n\nfrom collections import defaultdict\nimport functools\nimport inspect\nimport re\nimport six\n\nfrom moto import settings\nimport responses\nfrom moto.packages.httpretty import HTTPretty\nfr... | diff --git a/moto/core/models.py b/moto/core/models.py
index 92dc2a98096a..adc06a9c0701 100644
--- a/moto/core/models.py
+++ b/moto/core/models.py
@@ -89,6 +89,17 @@ def decorate_class(self, klass):
if inspect.ismethod(attr_value) and attr_value.__self__ is klass:
continue
+ #... |
comic__grand-challenge.org-786 | Partial update not working correctly because of custom validation
The validation rule in `app/grandchallenge/annotations/serializers.py:31` is breaking the partial update functionality.
If you try to do a partial update PATCH request to the endpoint, it will try to find the `annotation_set` attribute in the request da... | [
{
"content": "from rest_framework import serializers\n\nfrom .models import (\n ETDRSGridAnnotation,\n MeasurementAnnotation,\n BooleanClassificationAnnotation,\n PolygonAnnotationSet,\n SinglePolygonAnnotation,\n LandmarkAnnotationSet,\n SingleLandmarkAnnotation,\n)\nfrom .validators impor... | [
{
"content": "from rest_framework import serializers\n\nfrom .models import (\n ETDRSGridAnnotation,\n MeasurementAnnotation,\n BooleanClassificationAnnotation,\n PolygonAnnotationSet,\n SinglePolygonAnnotation,\n LandmarkAnnotationSet,\n SingleLandmarkAnnotation,\n)\nfrom .validators impor... | diff --git a/app/grandchallenge/annotations/serializers.py b/app/grandchallenge/annotations/serializers.py
index 4342255a79..d069226e1b 100644
--- a/app/grandchallenge/annotations/serializers.py
+++ b/app/grandchallenge/annotations/serializers.py
@@ -27,11 +27,14 @@ class Meta:
class AbstractSingleAnnotationSerializer... |
napari__napari-2413 | Points layer allows panning when in Add mode
## 🐛 Bug
When in the `Add Points` mode on a points layer panning is not prevented. This can make it tricky to label a point as you have to hold the mouse perfectly still.
:\n \"\"\"Select points.\n\n Clicking on a point will select that point. If holding shift while clicking\n that point will be added to or removed from the existing selection\n depending on wheth... | [
{
"content": "import numpy as np\n\nfrom ._points_utils import points_in_box\n\n\ndef select(layer, event):\n \"\"\"Select points.\n\n Clicking on a point will select that point. If holding shift while clicking\n that point will be added to or removed from the existing selection\n depending on wheth... | diff --git a/napari/layers/points/_points_mouse_bindings.py b/napari/layers/points/_points_mouse_bindings.py
index 6f4db0caa54..e2ba95edbb4 100644
--- a/napari/layers/points/_points_mouse_bindings.py
+++ b/napari/layers/points/_points_mouse_bindings.py
@@ -81,19 +81,20 @@ def select(layer, event):
layer._set_highl... |
urllib3__urllib3-1399 | Interrupted system call while profiling with plop
Using Python 2.7.12, requests 2.19.0, urllib3 1.23 and using [plop](https://github.com/bdarnell/plop) for profiling, I'm intermittently hitting this stack trace in long-running code:
```
File "/home/bmerry/work/sdp/env/local/lib/python2.7/site-packages/requests/sess... | [
{
"content": "import errno\nfrom functools import partial\nimport select\nimport sys\ntry:\n from time import monotonic\nexcept ImportError:\n from time import time as monotonic\n\n__all__ = [\"NoWayToWaitForSocketError\", \"wait_for_read\", \"wait_for_write\"]\n\n\nclass NoWayToWaitForSocketError(Excepti... | [
{
"content": "import errno\nfrom functools import partial\nimport select\nimport sys\ntry:\n from time import monotonic\nexcept ImportError:\n from time import time as monotonic\n\n__all__ = [\"NoWayToWaitForSocketError\", \"wait_for_read\", \"wait_for_write\"]\n\n\nclass NoWayToWaitForSocketError(Excepti... | diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 453277eb04..c2cb21bed2 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -259,5 +259,8 @@ In chronological order:
* Improve contribution guide
* Add ``HTTPResponse.geturl`` method to provide ``urllib2.urlopen().geturl()`` behavior
+* Bruce Merry <http... |
kedro-org__kedro-1881 | Catch error for issues with reading/writing data to object stores (e.g. S3)
The original Discord discussion https://discord.com/channels/778216384475693066/989568455512555540
# Context
> williamc — 06/23/2022
Let's say I just cloned my kedro project repo to another machine, and its datasets are versioned and confi... | [
{
"content": "\"\"\"This module provides a set of classes which underpin the data loading and\nsaving functionality provided by ``kedro.io``.\n\"\"\"\n\nimport abc\nimport copy\nimport logging\nimport re\nimport warnings\nfrom collections import namedtuple\nfrom datetime import datetime, timezone\nfrom functool... | [
{
"content": "\"\"\"This module provides a set of classes which underpin the data loading and\nsaving functionality provided by ``kedro.io``.\n\"\"\"\n\nimport abc\nimport copy\nimport logging\nimport re\nimport warnings\nfrom collections import namedtuple\nfrom datetime import datetime, timezone\nfrom functool... | diff --git a/RELEASE.md b/RELEASE.md
index b66aae9b76..bae2e311fb 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -15,6 +15,7 @@
## Bug fixes and other changes
* Fixed `kedro micropkg pull` for packages on PyPI.
* Fixed `format` in `save_args` for `SparkHiveDataSet`, previously it didn't allow you to save it as delta fo... |
django-cms__django-cms-3907 | Move the South requirement to an extra install in setup.py
With Django 1.7 removing the dependency on South. Perhaps it is time to move South to an extra require.
Like so:
```
setup(
author="Patrick Lauber",
author_email="digi@treepy.com",
name='django-cms',
version=cms.__version__,
description='A... | [
{
"content": "from setuptools import setup, find_packages\nimport os\nimport cms\n\n\nCLASSIFIERS = [\n 'Development Status :: 5 - Production/Stable',\n 'Environment :: Web Environment',\n 'Framework :: Django',\n 'Intended Audience :: Developers',\n 'License :: OSI Approved :: BSD License',\n ... | [
{
"content": "from setuptools import setup, find_packages\nimport os\nimport cms\n\n\nCLASSIFIERS = [\n 'Development Status :: 5 - Production/Stable',\n 'Environment :: Web Environment',\n 'Framework :: Django',\n 'Intended Audience :: Developers',\n 'License :: OSI Approved :: BSD License',\n ... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 74ca8826ef6..d48425c93ff 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -328,4 +328,5 @@ Please see Install/2.4 release notes *before* attempting to upgrade to version 2
- Remove django-mptt in favor of django-treebeard
- Remove compatibility with Django 1.4 / 1.5
... |
kivy__python-for-android-626 | Building python2 for armeabi fails due to unknown option "-single_module" (OS X)
This is not related to #622. I hotfixed this issue by setting:
``` python
self.storage_dir = '/tmp/python-for-android'
```
```
ben$ p4a apk --requirements=kivy,hostpython2 --package=org.test.test--name="test" --version=0.1 --bootstrap=sd... | [
{
"content": "\nfrom pythonforandroid.recipe import TargetPythonRecipe, Recipe\nfrom pythonforandroid.toolchain import shprint, current_directory, info\nfrom pythonforandroid.patching import (is_linux, is_darwin, is_api_gt,\n check_all, is_api_lt, is_ndk)\nfrom os.path impo... | [
{
"content": "\nfrom pythonforandroid.recipe import TargetPythonRecipe, Recipe\nfrom pythonforandroid.toolchain import shprint, current_directory, info\nfrom pythonforandroid.patching import (is_linux, is_darwin, is_api_gt,\n check_all, is_api_lt, is_ndk)\nfrom os.path impo... | diff --git a/pythonforandroid/recipes/python2/__init__.py b/pythonforandroid/recipes/python2/__init__.py
index 99ec0c689b..10eeda2519 100644
--- a/pythonforandroid/recipes/python2/__init__.py
+++ b/pythonforandroid/recipes/python2/__init__.py
@@ -31,8 +31,8 @@ class Python2Recipe(TargetPythonRecipe):
'p... |
python-poetry__poetry-7140 | Make config file relocation instructions more explicit
- [x] I have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repo and believe that this is not a duplicate.
## Issue
After upgrading from `1.1` to `1.2` I received the following message:
```
Configuration file exists at /Users/... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport os\nimport sys\n\nfrom pathlib import Path\n\nfrom platformdirs import user_cache_path\nfrom platformdirs import user_config_path\nfrom platformdirs import user_data_path\n\n\nlogger = logging.getLogger(__name__)\n\n_APP_NAME = \"pypoetr... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport os\nimport sys\n\nfrom pathlib import Path\n\nfrom platformdirs import user_cache_path\nfrom platformdirs import user_config_path\nfrom platformdirs import user_data_path\n\n\nlogger = logging.getLogger(__name__)\n\n_APP_NAME = \"pypoetr... | diff --git a/src/poetry/locations.py b/src/poetry/locations.py
index d60eff0735b..7d10f7d11d8 100644
--- a/src/poetry/locations.py
+++ b/src/poetry/locations.py
@@ -34,9 +34,12 @@
if any(file.exists() for file in (auth_toml, config_toml)):
logger.warning(
(
- "Configuration fil... |
rasterio__rasterio-1231 | Support C++11
Relates to https://github.com/sgillies/frs-wheel-builds/issues/25 and https://github.com/Toblerity/Fiona/issues/514
GDAL 2.3 will [require C++11](https://trac.osgeo.org/gdal/changeset/40984). Attempting to install Rasterio after this change fails with a bunch of warnings like:
```
/home/travis/gda... | [
{
"content": "#!/usr/bin/env python\n\n# Two environmental variables influence this script.\n#\n# GDAL_CONFIG: the path to a gdal-config program that points to GDAL headers,\n# libraries, and data files.\n#\n# PACKAGE_DATA: if defined, GDAL and PROJ4 data files will be copied into the\n# source or binary distri... | [
{
"content": "#!/usr/bin/env python\n\n# Two environmental variables influence this script.\n#\n# GDAL_CONFIG: the path to a gdal-config program that points to GDAL headers,\n# libraries, and data files.\n#\n# PACKAGE_DATA: if defined, GDAL and PROJ4 data files will be copied into the\n# source or binary distri... | diff --git a/setup.py b/setup.py
index f5799e05c..361b4503b 100755
--- a/setup.py
+++ b/setup.py
@@ -197,6 +197,20 @@ def run(self):
ext_options['extra_compile_args'] = ['-Wno-unused-parameter',
'-Wno-unused-function']
+
+# GDAL 2.3 and newer requires C++11
+if (gdal_maj... |
frappe__frappe-23418 | show traceback from setup wizard failure in UI somewhere
internal issue: 6197
When users can't see the traceback it's hard for anyone to debug. Right now traceback gets stored in log file. It should also be sent as response.
| [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# License: MIT. See LICENSE\n\nimport json\n\nimport frappe\nfrom frappe.geo.country_info import get_country_info\nfrom frappe.permissions import AUTOMATIC_ROLES\nfrom frappe.translate import get_messages_for_boot, send_translat... | [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# License: MIT. See LICENSE\n\nimport json\n\nimport frappe\nfrom frappe.geo.country_info import get_country_info\nfrom frappe.permissions import AUTOMATIC_ROLES\nfrom frappe.translate import get_messages_for_boot, send_translat... | diff --git a/frappe/desk/page/setup_wizard/setup_wizard.js b/frappe/desk/page/setup_wizard/setup_wizard.js
index 8d42b804cd6f..268d0a86bc5b 100644
--- a/frappe/desk/page/setup_wizard/setup_wizard.js
+++ b/frappe/desk/page/setup_wizard/setup_wizard.js
@@ -196,7 +196,7 @@ frappe.setup.SetupWizard = class SetupWizard exte... |
pallets__werkzeug-2074 | User agents not being detected
While using your utility to parse user agents for calls to my site, I have a few that don't get parsed correctly:
Version not getting parsed on the following user agents:
* `Mozilla/5.0 (Linux; Android 10; motorola edge) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.101 Mo... | [
{
"content": "import re\nimport typing as t\n\nif t.TYPE_CHECKING:\n from wsgiref.types import WSGIEnvironment\n\n\nclass UserAgentParser:\n \"\"\"A simple user agent parser. Used by the `UserAgent`.\"\"\"\n\n platform_rules: t.ClassVar[t.Iterable[t.Tuple[str, str]]] = (\n (\" cros \", \"chrome... | [
{
"content": "import re\nimport typing as t\n\nif t.TYPE_CHECKING:\n from wsgiref.types import WSGIEnvironment\n\n\nclass UserAgentParser:\n \"\"\"A simple user agent parser. Used by the `UserAgent`.\"\"\"\n\n platform_rules: t.ClassVar[t.Iterable[t.Tuple[str, str]]] = (\n (\" cros \", \"chrome... | diff --git a/CHANGES.rst b/CHANGES.rst
index 206bac26b..fd21b24bc 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -171,6 +171,7 @@ Unreleased
useful for handling a WebSocket upgrade request. :issue:`2052`
- URL matching assumes ``websocket=True`` mode for WebSocket upgrade
requests. :issue:`2052`
+- Update... |
pwndbg__pwndbg-782 | xinfo Exception
Hello!
I have the following problem:
```
pwndbg> p printf
$3 = {int (const char *, ...)} 0x7ffff7e33e10 <__printf>
pwndbg> xinfo 0x7ffff7e33e10
Extended information for virtual address 0x7ffff7e33e10:
Containing mapping:
0x7ffff7df4000 0x7ffff7f6c000 r-xp 178000 25000 /usr/lib... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nThis file declares types and methods useful for enumerating\nall of the address spaces and permissions of an ELF file in memory.\n\nThis is necessary for when access to /proc is restricted, or when\nworking on a BSD system which simply does n... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nThis file declares types and methods useful for enumerating\nall of the address spaces and permissions of an ELF file in memory.\n\nThis is necessary for when access to /proc is restricted, or when\nworking on a BSD system which simply does n... | diff --git a/pwndbg/elf.py b/pwndbg/elf.py
index 3a52704bf47..3563fba0fa5 100644
--- a/pwndbg/elf.py
+++ b/pwndbg/elf.py
@@ -149,8 +149,9 @@ def get_containing_segments(elf_filepath, elf_loadaddr, vaddr):
elf = get_elf_info_rebased(elf_filepath, elf_loadaddr)
segments = []
for seg in elf.segments:
- ... |
huggingface__text-generation-inference-201 | Request failed during generation: Server error: Expected is_sm90 || is_sm8x || is_sm75 to be true, but got false. (Could this error message be improved? If so, please report an enhancement request to PyTorch.)
Using the docker container ala these instructions:
https://github.com/huggingface/text-generation-inference... | [
{
"content": "import torch\n\nfrom loguru import logger\nfrom transformers import AutoConfig\nfrom transformers.models.auto import modeling_auto\nfrom typing import Optional\n\nfrom text_generation_server.models.model import Model\nfrom text_generation_server.models.causal_lm import CausalLM\nfrom text_generati... | [
{
"content": "import torch\n\nfrom loguru import logger\nfrom transformers import AutoConfig\nfrom transformers.models.auto import modeling_auto\nfrom typing import Optional\n\nfrom text_generation_server.models.model import Model\nfrom text_generation_server.models.causal_lm import CausalLM\nfrom text_generati... | diff --git a/server/text_generation_server/models/__init__.py b/server/text_generation_server/models/__init__.py
index 9c1ea3b064d..b0f87047e4b 100644
--- a/server/text_generation_server/models/__init__.py
+++ b/server/text_generation_server/models/__init__.py
@@ -24,7 +24,18 @@
FlashSantacoderSharded,
)
... |
comic__grand-challenge.org-1755 | CSV export fails on converting uuid to json
Problematic JSON structure in https://grand-challenge.org/api/v1/cases/images/redacted_uuid/?format=csv
```
{"pk":"redacted_uuid","name":"redacted.png","study":null,"files":[{"pk":"redacted_uuid","image":"redacted_uuid","file":"https://grand-challenge.org/media/images/...... | [
{
"content": "import json\n\nfrom rest_framework_csv.renderers import CSVRenderer\n\n\nclass PaginatedCSVRenderer(CSVRenderer):\n results_field = \"results\"\n\n def render(self, data, *args, **kwargs):\n if self.results_field in data:\n data = data[self.results_field]\n\n return ... | [
{
"content": "import json\n\nfrom rest_framework.settings import api_settings\nfrom rest_framework.utils.encoders import JSONEncoder\nfrom rest_framework_csv.renderers import CSVRenderer\n\n\nclass PaginatedCSVRenderer(CSVRenderer):\n results_field = \"results\"\n\n def render(self, data, *args, **kwargs)... | diff --git a/app/grandchallenge/core/renderers.py b/app/grandchallenge/core/renderers.py
index a4bc115d46..fd51766fc0 100644
--- a/app/grandchallenge/core/renderers.py
+++ b/app/grandchallenge/core/renderers.py
@@ -1,5 +1,7 @@
import json
+from rest_framework.settings import api_settings
+from rest_framework.utils.e... |
nilearn__nilearn-936 | Plots won't show up
Hi everyone,
using nilearn on OSX El Capitan, when executing the example scripts like plot_demo_glass_brain.py no plots will show up. PiP and iPython linked to the same folders, matplotlib alone does show plots. All dependencies are up-to-date and installed. Don't really know how to fix this.
| [
{
"content": "\"\"\"\nPlotting code for nilearn\n\"\"\"\n# Authors: Chris Filo Gorgolewski, Gael Varoquaux\n\n###############################################################################\n# Make sure that we don't get DISPLAY problems when running without X on\n# unices\ndef _set_mpl_backend():\n try:\n ... | [
{
"content": "\"\"\"\nPlotting code for nilearn\n\"\"\"\n# Authors: Chris Filo Gorgolewski, Gael Varoquaux\n\n###############################################################################\n# Make sure that we don't get DISPLAY problems when running without X on\n# unices\ndef _set_mpl_backend():\n try:\n ... | diff --git a/nilearn/plotting/__init__.py b/nilearn/plotting/__init__.py
index e7cafda82f..009d8ecfa3 100644
--- a/nilearn/plotting/__init__.py
+++ b/nilearn/plotting/__init__.py
@@ -11,8 +11,12 @@ def _set_mpl_backend():
# We are doing local imports here to avoid poluting our namespace
import matplot... |
modin-project__modin-1951 | Assignment "df.loc[row][col] = value" in DataFrame with one row throws exception
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**:
Ubuntu 20.04
- **Modin version** (`modin.__version__`):
0.7.3+166.g00f57f1.dirty
- **Python version**:
Python 3.8.2
- **Code we can us... | [
{
"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ... | [
{
"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ... | diff --git a/modin/engines/base/frame/partition_manager.py b/modin/engines/base/frame/partition_manager.py
index 9208b3b3741..f37400a5c2e 100644
--- a/modin/engines/base/frame/partition_manager.py
+++ b/modin/engines/base/frame/partition_manager.py
@@ -302,6 +302,10 @@ def concat(cls, axis, left_parts, right_parts):
... |
deepset-ai__haystack-3388 | schema generation seems to depend on dependencies/environment
**Describe the bug**
Depending on which python env one's running `python .github/utils/generate_json_schema.py` this might produce schemas with arg types in different orders.
See run https://github.com/deepset-ai/haystack/actions/runs/3195756209/jobs/521... | [
{
"content": "from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union\n\nimport sys\nimport json\nimport inspect\nimport logging\nfrom pathlib import Path\n\nimport pydantic.schema\nfrom pydantic import BaseConfig, BaseSettings, Required, SecretStr, create_model\nfrom pydantic.typing imp... | [
{
"content": "from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Type, Union\n\nimport sys\nimport json\nimport inspect\nimport logging\nfrom pathlib import Path\n\nimport pydantic.schema\nfrom pydantic import BaseConfig, BaseSettings, Required, SecretStr, create_model\nfrom pydantic.typing imp... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 2769a2969c..e7966a2dce 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -14,7 +14,6 @@ repos:
- id: check-shebang-scripts-are-executable # checks all shell scripts have executable permissions
- id: mixed-line-ending # ... |
fal-ai__dbt-fal-685 | Fal read only dbt *.yml files and ignore *.yaml
<!-- *** Make sure you have searched for an existing bug report for this issue *** -->
**Describe the bug**
In dbt models you can have schems in either .yml or yaml extentions
also see : https://www.w3schools.io/file/yaml-vs-yml/
**Your environment**
- OS: MacO... | [
{
"content": "import os\nfrom dataclasses import dataclass\nimport glob\nfrom pathlib import Path\nfrom typing import Any, List, Dict, Optional, Union, TYPE_CHECKING\n\nfrom dbt.contracts.project import Project as ProjectContract\nfrom dbt.config import RuntimeConfig, Project\nfrom dbt.config.utils import parse... | [
{
"content": "import os\nfrom dataclasses import dataclass\nimport glob\nfrom pathlib import Path\nfrom typing import Any, List, Dict, Optional, Union, TYPE_CHECKING\n\nfrom dbt.contracts.project import Project as ProjectContract\nfrom dbt.config import RuntimeConfig, Project\nfrom dbt.config.utils import parse... | diff --git a/src/faldbt/parse.py b/src/faldbt/parse.py
index 7cbdb20ec..4c38d4da2 100644
--- a/src/faldbt/parse.py
+++ b/src/faldbt/parse.py
@@ -194,7 +194,10 @@ def get_scripts_list(scripts_dir: str) -> List[str]:
def get_global_script_configs(source_dirs: List[Path]) -> Dict[str, List[str]]:
global_scripts = {"... |
pyca__cryptography-3584 | Deprecate Whirlpool and RIPEMD
| [
{
"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 abc\n\nimport six\n\nfrom cryptography... | [
{
"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 abc\n\nimport six\n\nfrom cryptography... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index a1fdea7eb1bf..822a8c8a6b97 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -27,6 +27,7 @@ Changelog
extensions only need to be rejected on certificate verification.
* The CommonCrypto backend has been removed.
* MultiBackend has been removed.
+* ``Whirlpool`` and ... |
adamchainz__django-mysql-607 | Importing ABC directly from collections was removed in Python 3.9
https://github.com/adamchainz/django-mysql/blob/bc4ff381d3a61af6dc448312205c2c19d9c5f97e/src/django_mysql/models/lookups.py#L126
| [
{
"content": "import collections\nimport json\n\nimport django\nfrom django.db.models import CharField, Lookup, Transform\nfrom django.db.models.lookups import (\n BuiltinLookup,\n Exact,\n GreaterThan,\n GreaterThanOrEqual,\n LessThan,\n LessThanOrEqual,\n)\n\nfrom django_mysql.models.functio... | [
{
"content": "import json\nfrom collections.abc import Sequence\n\nimport django\nfrom django.db.models import CharField, Lookup, Transform\nfrom django.db.models.lookups import (\n BuiltinLookup,\n Exact,\n GreaterThan,\n GreaterThanOrEqual,\n LessThan,\n LessThanOrEqual,\n)\n\nfrom django_my... | diff --git a/HISTORY.rst b/HISTORY.rst
index 8195be44..1ee7cca9 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -3,6 +3,11 @@
History
=======
+Pending
+-------
+
+* Prevent ``collections.abc.Sequence`` warning.
+
3.3.0 (2019-12-10)
------------------
diff --git a/src/django_mysql/models/lookups.py b/src/django_my... |
kserve__kserve-2878 | Stop Error When disabled_grpc=True
/kind bug
**What steps did you take and what happened:**
In our use case we don't use the grpc_server inside `ModelServer` thus we set `enable_grpc=False`. But when server stops it will still call stop from this unstarted server thus got the error below:
```
> await self._... | [
{
"content": "# Copyright 2022 The KServe 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 a... | [
{
"content": "# Copyright 2022 The KServe 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 a... | diff --git a/python/kserve/kserve/model_server.py b/python/kserve/kserve/model_server.py
index f99c3ad9337..985caf97afe 100644
--- a/python/kserve/kserve/model_server.py
+++ b/python/kserve/kserve/model_server.py
@@ -107,7 +107,10 @@ def __init__(self, http_port: int = args.http_port,
self.dataplane = DataPlan... |
alltheplaces__alltheplaces-3307 | Spider vetco is broken
During the global build at 2021-09-01-14-42-16, spider **vetco** failed with **0 features** and **24644 errors**.
Here's [the log](https://data.alltheplaces.xyz/runs/2021-09-01-14-42-16/logs/vetco.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-09-01-14-42-16/output/vetco.geojson) ... | [
{
"content": "# -*- coding: utf-8 -*-\nimport json\nimport re\n\nimport scrapy\n\nfrom locations.items import GeojsonPointItem\nfrom scrapy.selector import Selector\n\n\nclass VetcoSpider(scrapy.Spider):\n name = \"vetco\"\n item_attributes = {'brand': \"vetcoclinics\"}\n allowed_domains = [\"vetcoclin... | [
{
"content": "# -*- coding: utf-8 -*-\nimport json\nimport re\n\nimport scrapy\n\nfrom locations.items import GeojsonPointItem\nfrom scrapy.selector import Selector\n\n\nclass VetcoSpider(scrapy.Spider):\n name = \"vetco\"\n item_attributes = {'brand': \"vetcoclinics\"}\n allowed_domains = [\"vetcoclin... | diff --git a/locations/spiders/vetco_clinic.py b/locations/spiders/vetco_clinic.py
index bebc3964766..4f310ba34b5 100644
--- a/locations/spiders/vetco_clinic.py
+++ b/locations/spiders/vetco_clinic.py
@@ -38,7 +38,7 @@ def parse(self, response):
if clinics:
for stores in clinics:
... |
huggingface__trl-1185 | DataCollatorForCompletionOnlyLM instruction token masking fails if first occurence of instruction is marked differently
The current code in DataCollatorForCompletionOnlyLM assumes that the first deteced occurence of `instruction_template` comes before the first detected occurence of `response_template`. This is reasona... | [
{
"content": "# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | [
{
"content": "# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | diff --git a/tests/test_data_collator_completion_only.py b/tests/test_data_collator_completion_only.py
index c895a616e1..544230fe26 100644
--- a/tests/test_data_collator_completion_only.py
+++ b/tests/test_data_collator_completion_only.py
@@ -31,11 +31,14 @@ def test_data_collator_finds_response_template_llama2_tokeniz... |
kivy__kivy-6415 | If ScrollView doesn't have any child, 'to_local()' and 'to_parent()' don't work.
# Versions
* Python: 3.7.1
* OS: Linux Mint 18.2 Mate Edition 64bit
* Kivy: v2.0.0.dev0, git-8b53e56, 20190710
* Kivy installation method: `git clone` then `pipenv install -e .`
### Description
If `ScrollView` doesn't have any ... | [
{
"content": "'''\nScrollView\n==========\n\n.. versionadded:: 1.0.4\n\nThe :class:`ScrollView` widget provides a scrollable/pannable viewport that is\nclipped at the scrollview's bounding box.\n\n\nScrolling Behavior\n------------------\n\nThe ScrollView accepts only one child and applies a viewport/window to\... | [
{
"content": "'''\nScrollView\n==========\n\n.. versionadded:: 1.0.4\n\nThe :class:`ScrollView` widget provides a scrollable/pannable viewport that is\nclipped at the scrollview's bounding box.\n\n\nScrolling Behavior\n------------------\n\nThe ScrollView accepts only one child and applies a viewport/window to\... | diff --git a/kivy/tests/test_screen.py b/kivy/tests/test_screen.py
index 3cbf114142..46cc095c25 100644
--- a/kivy/tests/test_screen.py
+++ b/kivy/tests/test_screen.py
@@ -1,6 +1,6 @@
import pytest
-TRANSITION_CLASS_NAMES = (
+transition_cls_names = (
'ShaderTransition', 'SlideTransition', 'SwapTransition', 'Fad... |
conda-forge__conda-smithy-1232 | Linter crashes under certain conditions
<!--
Thanks for reporting your issue.
Please fill out the sections below.
-->
Issue:
The linter (version 3.6.8) crashes with:
```
File lint_recipe.py, line 485, in lintify
constraint = req.split(" ", 1)[1]
IndexError: list index out of range
```
This happens when... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom collections.abc import Sequence, Mapping\n\nstr_type = str\n\nimport copy\nfrom glob import glob\nimport io\nimport itertools\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\n\nimport github\n\nfrom conda_build.metadata import (\n ensure_valid... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom collections.abc import Sequence, Mapping\n\nstr_type = str\n\nimport copy\nfrom glob import glob\nimport io\nimport itertools\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\n\nimport github\n\nfrom conda_build.metadata import (\n ensure_valid... | diff --git a/conda_smithy/lint_recipe.py b/conda_smithy/lint_recipe.py
index 9078b79aa..a286bb778 100644
--- a/conda_smithy/lint_recipe.py
+++ b/conda_smithy/lint_recipe.py
@@ -462,12 +462,12 @@ def lintify(meta, recipe_dir=None, conda_forge=False):
filtered_host_reqs = [
req
... |
litestar-org__litestar-2530 | Bug: binary files can't be uploaded if logging is active without structlog installed
### Description
*This is a pro forma report, I will create a PR that fixes this*
### URL to code causing the issue
_No response_
### MCVE
```python
from typing import Annotated
from litestar import Litestar, post
... | [
{
"content": "from __future__ import annotations\n\nfrom dataclasses import dataclass, field\nfrom inspect import isawaitable\nfrom typing import TYPE_CHECKING, Any, Iterable\n\nfrom litestar.constants import (\n HTTP_RESPONSE_BODY,\n HTTP_RESPONSE_START,\n SCOPE_STATE_RESPONSE_COMPRESSED,\n)\nfrom lit... | [
{
"content": "from __future__ import annotations\n\nfrom dataclasses import dataclass, field\nfrom inspect import isawaitable\nfrom typing import TYPE_CHECKING, Any, Iterable\n\nfrom litestar.constants import (\n HTTP_RESPONSE_BODY,\n HTTP_RESPONSE_START,\n SCOPE_STATE_RESPONSE_COMPRESSED,\n)\nfrom lit... | diff --git a/litestar/middleware/logging.py b/litestar/middleware/logging.py
index 0779830e7b..b69f3c205a 100644
--- a/litestar/middleware/logging.py
+++ b/litestar/middleware/logging.py
@@ -161,7 +161,7 @@ def log_message(self, values: dict[str, Any]) -> None:
def _serialize_value(self, serializer: Serializer | N... |
aws-cloudformation__cfn-lint-934 | Parameter parsing doesn't match help text
$ cfn-lint --version
cfn-lint 0.13.1
The help documentation suggests that passing the template as the last parameter without a switch should be valid. However, it doesn't work correctly if you pass an option in the middle. For instance,
```
$ cfn-lint -i E3012 template.... | [
{
"content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w... | [
{
"content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w... | diff --git a/src/cfnlint/config.py b/src/cfnlint/config.py
index a40268a60f..5b16a23191 100644
--- a/src/cfnlint/config.py
+++ b/src/cfnlint/config.py
@@ -305,7 +305,16 @@ def __call__(self, parser, namespace, values, option_string=None):
items.append(value)
setattr(namespace, ... |
iterative__dvc-5425 | tests: exp executor teardown is flaky on windows
Looks like there is some race condition on windows that sometimes happens between cleaning up the test `tmp_dir` and cleaning up the experiments executor temp directory (which is placed in `tmp_dir/.dvc/tmp/...`). May be better to go back to running experiments in system... | [
{
"content": "import logging\nimport os\nimport sys\nfrom tempfile import TemporaryDirectory\nfrom typing import Optional\n\nfrom dvc.utils.fs import remove\n\nfrom .base import BaseExecutor\n\nlogger = logging.getLogger(__name__)\n\n\nclass BaseLocalExecutor(BaseExecutor):\n \"\"\"Base local machine executo... | [
{
"content": "import logging\nimport os\nfrom tempfile import TemporaryDirectory\nfrom typing import Optional\n\nfrom dvc.utils.fs import remove\n\nfrom .base import BaseExecutor\n\nlogger = logging.getLogger(__name__)\n\n\nclass BaseLocalExecutor(BaseExecutor):\n \"\"\"Base local machine executor.\"\"\"\n\n... | diff --git a/dvc/repo/experiments/executor/local.py b/dvc/repo/experiments/executor/local.py
index 52ac6acb78..f584799a0b 100644
--- a/dvc/repo/experiments/executor/local.py
+++ b/dvc/repo/experiments/executor/local.py
@@ -1,6 +1,5 @@
import logging
import os
-import sys
from tempfile import TemporaryDirectory
from... |
pantsbuild__pants-17459 | New default of `pull=True` on `docker_image` target breaks use of transitive base images
**Describe the bug**
(Sorry for the wordy title, couldn't think of a better way to put it)
In our repo, we have a "base" `Dockerfile` containing common build steps. It's a lightweight image, so we don't push it anywhere - ins... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom abc import ABC, abstractmethod\nfrom dataclasses import dataclass\nfrom typing import Callable, Cl... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport os\nimport re\nfrom abc import ABC, abstractmethod\nfrom dataclasses import dataclass\nfrom typing import Callable, Cl... | diff --git a/src/python/pants/backend/docker/goals/package_image_integration_test.py b/src/python/pants/backend/docker/goals/package_image_integration_test.py
index 7af35c1e3f2..7e5ac301070 100644
--- a/src/python/pants/backend/docker/goals/package_image_integration_test.py
+++ b/src/python/pants/backend/docker/goals/p... |
AUTOMATIC1111__stable-diffusion-webui-11631 | [Feature Request]: Support for GIF preview images
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What would your feature do ?
Right now preview images are either jpg or png, but now you can download Civitai previews in GIF format tha... | [
{
"content": "import os.path\r\nimport urllib.parse\r\nfrom pathlib import Path\r\n\r\nfrom modules import shared\r\nfrom modules.images import read_info_from_image, save_image_with_geninfo\r\nfrom modules.ui import up_down_symbol\r\nimport gradio as gr\r\nimport json\r\nimport html\r\n\r\nfrom modules.generati... | [
{
"content": "import os.path\r\nimport urllib.parse\r\nfrom pathlib import Path\r\n\r\nfrom modules import shared\r\nfrom modules.images import read_info_from_image, save_image_with_geninfo\r\nfrom modules.ui import up_down_symbol\r\nimport gradio as gr\r\nimport json\r\nimport html\r\n\r\nfrom modules.generati... | diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py
index a7d3bc792f9..1efd00b0353 100644
--- a/modules/ui_extra_networks.py
+++ b/modules/ui_extra_networks.py
@@ -30,8 +30,8 @@ def fetch_file(filename: str = ""):
raise ValueError(f"File cannot be fetched: {filename}. Must be in one of dir... |
scoutapp__scout_apm_python-419 | [2.9.0] UnicodeEncodeError raised on create_filtered_path
Hi,
so we still use Python2, and got an UnicodeErrorException in create_filtered_path, ligne 53:
```python
return path + "?" + urlencode(filtered_params)
```
filtered_params value:
```python
filtered_params = [[u'search', u'Clos du Chêne, Montévrai... | [
{
"content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport time\n\nfrom scout_apm.compat import datetime_to_timestamp, urlencode\nfrom scout_apm.core.config import scout_config\n\n# Originally derived from:\n# 1. Rails:\n# https://github.com/rail... | [
{
"content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport time\n\nfrom scout_apm.compat import datetime_to_timestamp, urlencode\nfrom scout_apm.core.config import scout_config\n\n# Originally derived from:\n# 1. Rails:\n# https://github.com/rail... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 179ece17..691370ad 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,11 @@
- Standardized a `language_version` key in Metadata
- Autocloses spans that are still running when Request completes
+### Fixed
+
+- Fix recording of path for unicode query parameters ... |
huggingface__diffusers-1932 | [Error] got an unexpected keyword argument `eta`
### Describe the bug
When I try to make a sampling using DDIM pipeline, an error occurs
```bash
python utils/ddim.py
0%| ... | [
{
"content": "# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | [
{
"content": "# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | diff --git a/src/diffusers/pipelines/ddim/pipeline_ddim.py b/src/diffusers/pipelines/ddim/pipeline_ddim.py
index 562093ed65ad..46d088ad19a0 100644
--- a/src/diffusers/pipelines/ddim/pipeline_ddim.py
+++ b/src/diffusers/pipelines/ddim/pipeline_ddim.py
@@ -16,6 +16,7 @@
import torch
+from ...schedulers import DDIMSc... |
cloudtools__troposphere-178 | Cloudwatch Alarm Threshold Type
The parameter type 'Threshold' within Cloudwatch Alarms is currently of type 'integer' whereas the AWS documentations notes this should be a String.
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-threshold
I am hitting a... | [
{
"content": "# Copyright (c) 2013, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, AWSProperty, Ref\nfrom .validators import integer, positive_integer, boolean\n\n\nclass MetricDimension(AWSProperty):\n props = {\n 'Name': (basest... | [
{
"content": "# Copyright (c) 2013, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, AWSProperty, Ref\nfrom .validators import positive_integer, boolean\n\n\nclass MetricDimension(AWSProperty):\n props = {\n 'Name': (basestring, Tru... | diff --git a/troposphere/cloudwatch.py b/troposphere/cloudwatch.py
index fdd9f9a01..e8dbeafe2 100644
--- a/troposphere/cloudwatch.py
+++ b/troposphere/cloudwatch.py
@@ -4,7 +4,7 @@
# See LICENSE file for full license.
from . import AWSObject, AWSProperty, Ref
-from .validators import integer, positive_integer, bool... |
learningequality__kolibri-4555 | Duplicate logging
<!--
Instructions:
* Fill out the sections below, replace …'s with information about your issue
* Use the 'preview' function above this text box to verify formatting before submitting
-->
### Observed behavior
<!--
Description of the behavior that was observed, including screenshots or oth... | [
{
"content": "import logging.config\nimport os\n\nfrom configobj import ConfigObj\nfrom configobj import flatten_errors\nfrom configobj import get_extra_values\nfrom validate import Validator\n\n\noption_spec = {\n \"Database\": {\n \"DATABASE_ENGINE\": {\n \"type\": \"option\",\n ... | [
{
"content": "import logging.config\nimport os\n\nfrom configobj import ConfigObj\nfrom configobj import flatten_errors\nfrom configobj import get_extra_values\nfrom validate import Validator\n\n\noption_spec = {\n \"Database\": {\n \"DATABASE_ENGINE\": {\n \"type\": \"option\",\n ... | diff --git a/kolibri/deployment/default/settings/base.py b/kolibri/deployment/default/settings/base.py
index 3b1702e0637..449ac5fff95 100644
--- a/kolibri/deployment/default/settings/base.py
+++ b/kolibri/deployment/default/settings/base.py
@@ -322,6 +322,7 @@
'kolibri': {
'handlers': ['console', ... |
CTPUG__wafer-312 | Schedule Editor does not clear extra fields on existing items
When replacing an existing item in the schedule editor, the notes, css_class and details fields are not replaced or cleared.
While this can be useful to leave css_class untouched, it is surprising behaviour and usually the wrong thing to do for notes and d... | [
{
"content": "from rest_framework import serializers\n\nfrom wafer.talks.models import Talk\nfrom wafer.pages.models import Page\nfrom wafer.schedule.models import ScheduleItem, Venue, Slot\n\n\nclass ScheduleItemSerializer(serializers.HyperlinkedModelSerializer):\n page = serializers.PrimaryKeyRelatedField(... | [
{
"content": "from rest_framework import serializers\n\nfrom wafer.talks.models import Talk\nfrom wafer.pages.models import Page\nfrom wafer.schedule.models import ScheduleItem, Venue, Slot\n\n\nclass ScheduleItemSerializer(serializers.HyperlinkedModelSerializer):\n page = serializers.PrimaryKeyRelatedField(... | diff --git a/wafer/schedule/serializers.py b/wafer/schedule/serializers.py
index 8b37c2a0..675c882d 100644
--- a/wafer/schedule/serializers.py
+++ b/wafer/schedule/serializers.py
@@ -34,6 +34,12 @@ def create(self, validated_data):
existing_schedule_item.talk = talk
existing_schedule_item.page... |
nvaccess__nvda-8710 | Update to Liblouis 3.7
Liblouis 3.7 is due for release next week. Here is what's new/relevant for us:
- Fix input/output positions for back-translation
- New Chinese Mandarin Braille Codes (Grade 1) and (Grade 2)
- Improvements to UEB
This list is not complete yet.
| [
{
"content": "#brailleTables.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n#Copyright (C) 2008-2017 NV Access Limited, Joseph Lee\r\n\r\n\"\"\"Manages information about available braille translation tabl... | [
{
"content": "#brailleTables.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n#Copyright (C) 2008-2017 NV Access Limited, Joseph Lee\r\n\r\n\"\"\"Manages information about available braille translation tabl... | diff --git a/include/liblouis b/include/liblouis
index 8923b3a3b8b..97ce1c67fcc 160000
--- a/include/liblouis
+++ b/include/liblouis
@@ -1 +1 @@
-Subproject commit 8923b3a3b8beb3021b7076465fcd7145fd9afcda
+Subproject commit 97ce1c67fccbd3668291b7e63c06161c095d49f2
diff --git a/nvdaHelper/liblouis/sconscript b/nvdaHelpe... |
DataBiosphere__toil-4506 | GPU support broken on SingleMachine?
This came up here: https://github.com/ComparativeGenomicsToolkit/cactus/issues/1062
The error is
```
File "/home/cactus/cactus_env/lib/python3.8/site-packages/toil/batchSystems/singleMachine.py", line 604, in _startChild
snapshot = accelerator_set.get_free_snapshot()
Attribut... | [
{
"content": "# Copyright (C) 2015-2021 Regents of the University of California\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-... | [
{
"content": "# Copyright (C) 2015-2021 Regents of the University of California\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-... | diff --git a/src/toil/batchSystems/singleMachine.py b/src/toil/batchSystems/singleMachine.py
index d7fadccbc2..6fa0fa6638 100644
--- a/src/toil/batchSystems/singleMachine.py
+++ b/src/toil/batchSystems/singleMachine.py
@@ -601,7 +601,7 @@ def _startChild(self, jobCommand, jobID, coreFractions, jobMemory, jobDisk, job_
... |
psychopy__psychopy-773 | Overlapping recordings problem
I am having a problem with mic.record and mic.stop - I am currently on psychopy 1.81.00, but I have had the same problem in earlier versions. I have written some code which records until the participant hits a key, or until a time-limit is reached. I am getting occasional truncated record... | [
{
"content": "# Part of the PsychoPy library\n# Copyright (C) 2014 Jonathan Peirce\n# Distributed under the terms of the GNU General Public License (GPL).\n\n# Author: Jeremy R. Gray, 2012\n\nfrom _base import *\nfrom os import path\nfrom psychopy.app.builder import components #for getInitVals()\n\nthisFolder =... | [
{
"content": "# Part of the PsychoPy library\n# Copyright (C) 2014 Jonathan Peirce\n# Distributed under the terms of the GNU General Public License (GPL).\n\n# Author: Jeremy R. Gray, 2012\n\nfrom _base import *\nfrom os import path\nfrom psychopy.app.builder import components #for getInitVals()\n\nthisFolder =... | diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst
index 8032455820..b8c3bec8de 100644
--- a/docs/source/changelog.rst
+++ b/docs/source/changelog.rst
@@ -20,6 +20,11 @@ Changelog
PsychoPy 1.81
------------------------------
+PsychoPy 1.81.04
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+* FIXED: builder: microp... |
cloud-custodian__cloud-custodian-3811 | gcp serverless runtime error on implicit boto dependency
reported in gitter, gcp functions should not need to depend on boto3, looks like some of the securityhub work caused an implicit dependency on boto3.
```
textPayload: "ModuleNotFoundError: No module named 'boto3'" - Getting this error for the cloud function t... | [
{
"content": "# Copyright 2019 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b... | [
{
"content": "# Copyright 2019 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b... | diff --git a/c7n/filters/securityhub.py b/c7n/filters/securityhub.py
index ff970001836..b37bf9a1559 100644
--- a/c7n/filters/securityhub.py
+++ b/c7n/filters/securityhub.py
@@ -16,7 +16,6 @@
from c7n.utils import local_session, type_schema
from .core import Filter
from c7n.manager import resources
-from c7n.resource... |
google__mobly-49 | sl4a_client attempts to close the same SL4A session twice
This causes a stacktrace to be printed every time the user exists sl4a_client.
>>> ^D
Traceback (most recent call last):
File "/usr/local/bin/sl4a_shell.py", line 8, in <module>
execfile(__file__)
File "/Users/angli/Developer/mobly/tools/sl4a_shel... | [
{
"content": "#!/usr/bin/env python3.4\n#\n# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | [
{
"content": "#!/usr/bin/env python3.4\n#\n# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | diff --git a/mobly/controllers/android_device.py b/mobly/controllers/android_device.py
index d8d139c3..af00375e 100644
--- a/mobly/controllers/android_device.py
+++ b/mobly/controllers/android_device.py
@@ -712,14 +712,11 @@ def _terminate_sl4a(self):
the session. Clear corresponding droids and dispatchers fro... |
modin-project__modin-3382 | JSON dispatcher data file split correction
Originated from https://github.com/modin-project/modin/pull/2607#discussion_r571989125.
| [
{
"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ... | [
{
"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ... | diff --git a/modin/engines/base/io/text/json_dispatcher.py b/modin/engines/base/io/text/json_dispatcher.py
index 9bf13201530..6f4e3a6174d 100644
--- a/modin/engines/base/io/text/json_dispatcher.py
+++ b/modin/engines/base/io/text/json_dispatcher.py
@@ -17,7 +17,6 @@
from io import BytesIO
import pandas
import numpy ... |
explosion__spaCy-3499 | Incorrect lemma from lemmatizer
**Right:**
`[w.lemma_ for w in nlp('funnier')]` -> `['funny']`
**Wrong:**
`[w.lemma_ for w in nlp('faster')]` ->`['faster']`
I think for word _faster_ lemma should be _fast_
| [
{
"content": "# coding: utf8\nfrom __future__ import unicode_literals\n\n\nADVERBS_IRREG = {\n \"best\": (\"well\",),\n \"better\": (\"well\",),\n \"deeper\": (\"deeply\",),\n \"farther\": (\"far\",),\n \"further\": (\"far\",),\n \"harder\": (\"hard\",),\n \"hardest\": (\"hard\",),\n}\n",
... | [
{
"content": "# coding: utf8\nfrom __future__ import unicode_literals\n\n\nADVERBS_IRREG = {\n \"best\": (\"well\",),\n \"better\": (\"well\",),\n \"closer\": (\"close\",),\n \"closest\": (\"close\",),\n \"deeper\": (\"deeply\",),\n \"earlier\": (\"early\",),\n \"earliest\": (\"early\",),\n... | diff --git a/spacy/lang/en/lemmatizer/_adverbs_irreg.py b/spacy/lang/en/lemmatizer/_adverbs_irreg.py
index 4f0b479b865..4499b2a1381 100644
--- a/spacy/lang/en/lemmatizer/_adverbs_irreg.py
+++ b/spacy/lang/en/lemmatizer/_adverbs_irreg.py
@@ -5,9 +5,27 @@
ADVERBS_IRREG = {
"best": ("well",),
"better": ("well",... |
xorbitsai__inference-398 | BUG: pytorch stream gen produces last token twice
### Describe the bug
```python
In [1]: from xinference.client import RESTfulClient
In [2]: uid = 'db10d45c-431e-11ee-97cf-fa163e74fa2d'
In [3]: client = RESTfulClient('http://127.0.0.1:13334')
In [4]: m = client.get_model(uid)
In [5]: for c in m.generate('... | [
{
"content": "# Copyright 2022-2023 XProbe Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | [
{
"content": "# Copyright 2022-2023 XProbe Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | diff --git a/xinference/model/llm/pytorch/utils.py b/xinference/model/llm/pytorch/utils.py
index 5b4e5b862b..56b2a4945f 100644
--- a/xinference/model/llm/pytorch/utils.py
+++ b/xinference/model/llm/pytorch/utils.py
@@ -282,15 +282,15 @@ def generate_stream(
break
# finish stream event, which contain... |
hedyorg__hedy-1739 | [BUG] Teacher's link copied incompletely
**Describe the bug**
Link for teachers only copies second half of the link (f.e. /hedy/l/123456)
| [
{
"content": "import json\n\nfrom website.auth import requires_login, is_teacher, current_user\nimport utils\nimport uuid\nfrom flask import g, request, jsonify, redirect\nfrom flask_helpers import render_template\nimport os\nimport hedyweb\nimport hedy_content\nTRANSLATIONS = hedyweb.Translations ()\nfrom conf... | [
{
"content": "import json\n\nfrom website.auth import requires_login, is_teacher, current_user\nimport utils\nimport uuid\nfrom flask import g, request, jsonify, redirect\nfrom flask_helpers import render_template\nimport os\nimport hedyweb\nimport hedy_content\nTRANSLATIONS = hedyweb.Translations ()\nfrom conf... | diff --git a/static/js/appbundle.js b/static/js/appbundle.js
index 2f846c5f05d..3a8af47a630 100644
--- a/static/js/appbundle.js
+++ b/static/js/appbundle.js
@@ -1,12 +1,12 @@
-var hedyApp=(()=>{var zd=Object.defineProperty,Nd=Object.defineProperties;var jd=Object.getOwnPropertyDescriptors;var br=Object.getOwnPropertySy... |
huggingface__optimum-217 | Add Support for DeBERTaV2
I would like to use DeBERTaV2 for sequence classification as a quantized model. Please let me know what needs to be done to open a PR to add this support!
| [
{
"content": "# Copyright 2021 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2... | [
{
"content": "# Copyright 2021 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2... | diff --git a/optimum/onnxruntime/utils.py b/optimum/onnxruntime/utils.py
index 6b1546dc79..744dea0b93 100644
--- a/optimum/onnxruntime/utils.py
+++ b/optimum/onnxruntime/utils.py
@@ -57,6 +57,8 @@ class ORTConfigManager:
"albert": ("num_attention_heads", "hidden_size", "bert"),
"camembert": ("num_atte... |
cloud-custodian__cloud-custodian-4197 | Certifi python module missing when deploying cloudtrail lambda functions
The following error happens when the lambda function is triggered
`[ERROR] Runtime.ImportModuleError: Unable to import module 'custodian_policy': No module named 'certifi'`
As a workaround, I had to add the *certifi* package to the policy fi... | [
{
"content": "# Copyright 2019 Microsoft Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | [
{
"content": "# Copyright 2019 Microsoft Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | diff --git a/c7n/actions/webhook.py b/c7n/actions/webhook.py
index 26c93522423..8a3d04f6cde 100644
--- a/c7n/actions/webhook.py
+++ b/c7n/actions/webhook.py
@@ -14,7 +14,11 @@
import json
-import certifi
+try:
+ import certifi
+except ImportError:
+ certifi = None
+
import jmespath
import urllib3
from six... |
pyqtgraph__pyqtgraph-963 | Can't select last image in image stack by drag and drop of slider
Minimum non-working example:
``` python
import numpy as np
import pyqtgraph as pg
a = np.random.rand(3,10,10)
a[2] = 0
pg.image(a)
```
Now, try to drag the slider to the last image (the "0" one). This won't work.
However, navigating there by using the... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nImageView.py - Widget for basic image dispay and analysis\nCopyright 2010 Luke Campagnola\nDistributed under MIT/X11 license. See license.txt for more infomation.\n\nWidget used for displaying 2D or 3D data. Features:\n - float or int (including 16-bit int) imag... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nImageView.py - Widget for basic image dispay and analysis\nCopyright 2010 Luke Campagnola\nDistributed under MIT/X11 license. See license.txt for more infomation.\n\nWidget used for displaying 2D or 3D data. Features:\n - float or int (including 16-bit int) imag... | diff --git a/pyqtgraph/imageview/ImageView.py b/pyqtgraph/imageview/ImageView.py
index 81463b7ab1..512d503b53 100644
--- a/pyqtgraph/imageview/ImageView.py
+++ b/pyqtgraph/imageview/ImageView.py
@@ -740,7 +740,7 @@ def timeIndex(self, slider):
return (0,0)
t = slider.value()
-
+
... |
ckan__ckan-3285 | LanguageError: IOError: [Errno 2] No translation file found for domain: 'ckan'
Hi,
We are noticing some 500 errors are being generated when /e or /n are being passed instead of /en
Passing other letters such as /a /b /c will trigger a 404
### CKAN Version if known (or site URL)
Ckan 2.3.X - 2.5.2+
### Please desc... | [
{
"content": "# encoding: utf-8\n\nimport os\n\nfrom babel import Locale\nfrom babel.core import (LOCALE_ALIASES,\n get_locale_identifier,\n UnknownLocaleError)\nfrom babel.support import Translations\nfrom paste.deploy.converters import aslist\nfrom pylons import i... | [
{
"content": "# encoding: utf-8\n\nimport os\n\nfrom babel import Locale\nfrom babel.core import (LOCALE_ALIASES,\n get_locale_identifier,\n UnknownLocaleError)\nfrom babel.support import Translations\nfrom paste.deploy.converters import aslist\nfrom pylons import i... | diff --git a/ckan/lib/i18n.py b/ckan/lib/i18n.py
index 5fb13e1cec5..1525b9547fa 100644
--- a/ckan/lib/i18n.py
+++ b/ckan/lib/i18n.py
@@ -27,8 +27,9 @@ def get_locales_from_config():
the config AND also the locals available subject to the config. '''
locales_offered = config.get('ckan.locales_offered', '').spl... |
huggingface__huggingface_hub-1925 | Make note that token from hugging face will not echo
### Describe the bug
I'm embarrassed to say I didn't realize at first that the program would not echo my token and pasted it a few times in the process. I've created a PR to add a little note stating that the token will not echo to the user as part of this issue. Th... | [
{
"content": "# Copyright 2020 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | [
{
"content": "# Copyright 2020 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | diff --git a/src/huggingface_hub/_login.py b/src/huggingface_hub/_login.py
index 576b8e67df..0bd7ae453f 100644
--- a/src/huggingface_hub/_login.py
+++ b/src/huggingface_hub/_login.py
@@ -186,7 +186,7 @@ def interpreter_login(new_session: bool = True, write_permission: bool = False)
print(" To login, `huggingfac... |
nautobot__nautobot-4721 | Unable to update device after deleting its device redundancy group if the device DRG priority is set
<!--
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
This form is only for reporting reproducible bugs. If you need assistance
with Nautobot installation, or if you have a general ... | [
{
"content": "import logging\n\nfrom cacheops import invalidate_obj\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db.models.signals import m2m_changed, post_save, pre_delete\nfrom django.db import transaction\nfrom django.dispatch import receiver\n\nfrom nautobot.core.signals import d... | [
{
"content": "import logging\n\nfrom cacheops import invalidate_obj\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db.models.signals import m2m_changed, post_save, pre_delete\nfrom django.db import transaction\nfrom django.dispatch import receiver\n\nfrom nautobot.core.signals import d... | diff --git a/changes/4718.fixed b/changes/4718.fixed
new file mode 100644
index 00000000000..6c2400a9e32
--- /dev/null
+++ b/changes/4718.fixed
@@ -0,0 +1 @@
+Fixed bug in which a device's device redundancy group priority was not being set to `None` when the device redundancy group was deleted.
diff --git a/nautobot/dc... |
python-telegram-bot__python-telegram-bot-155 | httplib exceptions
Running my bot continuously, I sometimes get rare exceptions. This traceback was with Python 2.7 and python-telegram-bot 3.2:
```
File "/home/rahiel/BismillahBot/bismillah.py", line 99, in send_quran
bot.sendMessage(chat_id=chat_id, text=text)
File "/home/rahiel/BismillahBot/venv/local/li... | [
{
"content": "#!/usr/bin/env python\n# pylint: disable=no-name-in-module,unused-import\n#\n# A library that provides a Python interface to the Telegram Bot API\n# Copyright (C) 2015-2016\n# Leandro Toledo de Souza <devs@python-telegram-bot.org>\n#\n# This program is free software: you can redistribute it and/or... | [
{
"content": "#!/usr/bin/env python\n# pylint: disable=no-name-in-module,unused-import\n#\n# A library that provides a Python interface to the Telegram Bot API\n# Copyright (C) 2015-2016\n# Leandro Toledo de Souza <devs@python-telegram-bot.org>\n#\n# This program is free software: you can redistribute it and/or... | diff --git a/telegram/utils/request.py b/telegram/utils/request.py
index 63059a704c0..e5493f00b2c 100644
--- a/telegram/utils/request.py
+++ b/telegram/utils/request.py
@@ -25,6 +25,13 @@
import socket
from ssl import SSLError
+try:
+ # python2
+ from httplib import HTTPException
+except ImportError:
+ # p... |
doccano__doccano-163 | Cannot use the same shortcut and label name in different projects
The issue is the following:
1. I create Project A.
2. Import some annotated data to the project - set of labels is automatically created as a result (let's say, Label 1, Label 2, Label 3)
3. I edit these labels - provide a shortcut and color
4. I c... | [
{
"content": "from django.contrib.auth import get_user_model\nfrom rest_framework import serializers\nfrom rest_polymorphic.serializers import PolymorphicSerializer\nfrom rest_framework.exceptions import ValidationError\n\n\nfrom .models import Label, Project, Document\nfrom .models import TextClassificationPro... | [
{
"content": "from django.contrib.auth import get_user_model\nfrom rest_framework import serializers\nfrom rest_polymorphic.serializers import PolymorphicSerializer\nfrom rest_framework.exceptions import ValidationError\n\n\nfrom .models import Label, Project, Document\nfrom .models import TextClassificationPro... | diff --git a/app/server/serializers.py b/app/server/serializers.py
index 5972dc3d00..78b57a7591 100644
--- a/app/server/serializers.py
+++ b/app/server/serializers.py
@@ -34,8 +34,11 @@ def validate(self, attrs):
raise ValidationError('Shortcut key may not have a suffix key.')
# Don't allow to s... |
pyca__cryptography-1988 | License Header Bug
https://github.com/pyca/cryptography/blob/master/src/cryptography/hazmat/backends/openssl/x509.py has the Apache license header when it should have the dual license header we use now.
| [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, so... | [
{
"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 datetime\nimport ipaddress\nfrom email... | diff --git a/src/cryptography/hazmat/backends/openssl/x509.py b/src/cryptography/hazmat/backends/openssl/x509.py
index c7d2d1542c68..f46dd1b7e140 100644
--- a/src/cryptography/hazmat/backends/openssl/x509.py
+++ b/src/cryptography/hazmat/backends/openssl/x509.py
@@ -1,15 +1,6 @@
-# Licensed under the Apache License, Ve... |
buildbot__buildbot-2346 | Log scroll bug
* [x] I have created a file in the `master/buildbot/newsfragment` directory (and read the `README.txt` in that directory)
| [
{
"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/changes/bitbucket.py b/master/buildbot/changes/bitbucket.py
index 9e2f31c8c871..746d85398472 100644
--- a/master/buildbot/changes/bitbucket.py
+++ b/master/buildbot/changes/bitbucket.py
@@ -102,7 +102,8 @@ def _processChanges(self, page):
if not self.branch or branch in self.br... |
xonsh__xonsh-1264 | xonfig broken on current master
```
$ xonfig
xonsh: To log full traceback to a file set: $XONSH_TRACEBACK_LOGFILE = <filename>
Traceback (most recent call last):
File "C:\Users\mel\Anaconda3\lib\site-packages\xonsh\proc.py", line 336, in wrapped_simple_command
r = f(args, i)
File "C:\Users\mel\Anaconda3\lib\sit... | [
{
"content": "\"\"\"The xonsh configuration (xonfig) utility.\"\"\"\nimport ast\nimport json\nimport shutil\nimport textwrap\nimport builtins\nimport functools\nimport itertools\nfrom pprint import pformat\nfrom argparse import ArgumentParser\nfrom contextlib import contextmanager\n\ntry:\n import ply\nexcep... | [
{
"content": "\"\"\"The xonsh configuration (xonfig) utility.\"\"\"\nimport ast\nimport json\nimport shutil\nimport textwrap\nimport builtins\nimport functools\nimport itertools\nfrom pprint import pformat\nfrom argparse import ArgumentParser\nfrom contextlib import contextmanager\n\ntry:\n import ply\nexcep... | diff --git a/xonsh/aliases.py b/xonsh/aliases.py
index e669438bc3..46eaba5aea 100644
--- a/xonsh/aliases.py
+++ b/xonsh/aliases.py
@@ -450,8 +450,8 @@ def which(args, stdin=None, stdout=None, stderr=None):
def xonfig(args, stdin=None):
"""Runs the xonsh configuration utility."""
- from xonsh.xonfig import ma... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.