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 ⌀ |
|---|---|---|---|---|
neptune-ai__neptune-client-899 | BUG: Inconsistency in `fetch_run_table` tag selector
Hi,
according to `fetch_run_table`'s documentation:
> Only experiments that have all specified tags will match this criterion.
Thus, the query aggregator for tags should be `AND`.
https://github.com/neptune-ai/neptune-client/blob/4b164bc470278edd160b7b9b5... | [
{
"content": "#\n# Copyright (c) 2020, Neptune Labs Sp. z o.o.\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": "#\n# Copyright (c) 2020, Neptune Labs Sp. z o.o.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3c596404d..3dacc0b04 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
## Fixes
- Fix computing of a multipart upload chunk size ([#897](https://github.com/neptune-ai/neptune-client/pull/897))
+- Matching all listed tags instead of any when calling `fetch_ru... |
svthalia__concrexit-2705 | V2 events API reports wrong participants number
### Describe the bug
On some event the amount of participants is not reported correctly on V2 version of the API.
### How to reproduce
Steps to reproduce the behaviour:
1. Go to https://thalia.nu/api/v2/events/1005/
2. Go to https://thalia.nu/events/1005/
3. Obser... | [
{
"content": "import uuid\n\nfrom django.conf import settings\nfrom django.core import validators\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.db import models, router\nfrom django.db.models import Count, Q\nfrom django.db.models.deletion import Collector\nfrom django.url... | [
{
"content": "import uuid\n\nfrom django.conf import settings\nfrom django.core import validators\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.db import models, router\nfrom django.db.models import Count, Q\nfrom django.db.models.deletion import Collector\nfrom django.url... | diff --git a/website/events/models/event.py b/website/events/models/event.py
index 06908f889..39e36cdbf 100644
--- a/website/events/models/event.py
+++ b/website/events/models/event.py
@@ -258,7 +258,7 @@ def has_fields(self):
participant_count = AggregateProperty(
Count(
"eventregistration",... |
google__mobly-311 | Exceptions in `setup_test` should leave the test in `ERROR` status
Regardless of the type of the exception, `setup_test` error should cause `ERROR` status.
This is different from a test method.
In a test method, an exception based on signals.TestFailure should cause the test to exit with `FAILED` status.
This is... | [
{
"content": "# 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# Unless required by applicab... | [
{
"content": "# 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# Unless required by applicab... | diff --git a/mobly/base_test.py b/mobly/base_test.py
index 5233aa5c..fde8faba 100644
--- a/mobly/base_test.py
+++ b/mobly/base_test.py
@@ -17,6 +17,7 @@
import functools
import inspect
import logging
+import sys
from mobly import logger
from mobly import records
@@ -316,7 +317,7 @@ def exec_one_test(self, test_n... |
Pyomo__pyomo-3017 | Pyomo AD fails with constant Expressions
## Summary
Pyomo AD raises an error when encountering `Expressions` with a constant value.
### Steps to reproduce the issue
```console
import pyomo.environ as pyo
from pyomo.core.expr.calculus.derivatives import Modes, differentiate
m = pyo.ConcreteModel()
m.x =... | [
{
"content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2008-2022\n# National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n... | [
{
"content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2008-2022\n# National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n... | diff --git a/pyomo/core/expr/calculus/diff_with_pyomo.py b/pyomo/core/expr/calculus/diff_with_pyomo.py
index 952e8ec6dd3..0e3ba3cc2b2 100644
--- a/pyomo/core/expr/calculus/diff_with_pyomo.py
+++ b/pyomo/core/expr/calculus/diff_with_pyomo.py
@@ -328,7 +328,7 @@ def _diff_GeneralExpression(node, val_dict, der_dict):
... |
sopel-irc__sopel-1280 | [url] meaning of `exclude` changed?
i used to have the following in my `sopel.cfg`:
``` ini
[url]
exclude =
exclusion_char = !
```
... and it worked fine up to (and including) 6.1.1. After an upgrade to 6.3.0, the bot was silent on `.title http://example.com/`, all of a sudden - the above`exclude` pattern wou... | [
{
"content": "# coding=utf-8\n\"\"\"Types for creating section definitions.\n\nA section definition consists of a subclass of ``StaticSection``, on which any\nnumber of subclasses of ``BaseValidated`` (a few common ones of which are\navailable in this module) are assigned as attributes. These descriptors define... | [
{
"content": "# coding=utf-8\n\"\"\"Types for creating section definitions.\n\nA section definition consists of a subclass of ``StaticSection``, on which any\nnumber of subclasses of ``BaseValidated`` (a few common ones of which are\navailable in this module) are assigned as attributes. These descriptors define... | diff --git a/sopel/config/types.py b/sopel/config/types.py
index 55d5167886..79b396e08f 100644
--- a/sopel/config/types.py
+++ b/sopel/config/types.py
@@ -222,7 +222,7 @@ def __init__(self, name, strip=True, default=None):
self.strip = strip
def parse(self, value):
- value = value.split(',')
+ ... |
Nitrate__Nitrate-381 | Mark Nitrate as not zip_safe
Add `zip_safe=False` to `setup.py` because Nitrate cannot run from a zip file directly.
| [
{
"content": "# -*- coding: utf-8 -*-\n\nimport sys\n\nfrom setuptools import setup, find_packages\n\n\nwith open('VERSION.txt', 'r') as f:\n pkg_version = f.read().strip()\n\n\ndef get_long_description():\n with open('README.rst', 'r') as f:\n return f.read()\n\n\ninstall_requires = [\n 'beauti... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport sys\n\nfrom setuptools import setup, find_packages\n\n\nwith open('VERSION.txt', 'r') as f:\n pkg_version = f.read().strip()\n\n\ndef get_long_description():\n with open('README.rst', 'r') as f:\n return f.read()\n\n\ninstall_requires = [\n 'beauti... | diff --git a/setup.py b/setup.py
index 65376dbb..187b670d 100644
--- a/setup.py
+++ b/setup.py
@@ -90,6 +90,7 @@ def get_long_description():
extras_require=extras_require,
packages=find_packages(),
include_package_data=True,
+ zip_safe=False,
classifiers=[
'Framework :: Django',
... |
urllib3__urllib3-987 | urllib3 fails to install on centos7 due to old setuptools not supporting <=, < environment markers.
Current urllib3 fails to install on centos7. This bug was most likely introduced after https://github.com/shazow/urllib3/commit/9f5454eac808a105307b2d363c99ce97e5109821.
centos7 ships a very old version of setuptools (0... | [
{
"content": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nimport os\nimport re\nimport codecs\n\nbase_path = os.path.dirname(__file__)\n\n# Get the version (borrowed from SQLAlchemy)\nwith open(os.path.join(base_path, 'urllib3', '__init__.py')) as fp:\n VERSION = re.compile(r\".*__version__ = '(... | [
{
"content": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nimport os\nimport re\nimport codecs\n\nbase_path = os.path.dirname(__file__)\n\n# Get the version (borrowed from SQLAlchemy)\nwith open(os.path.join(base_path, 'urllib3', '__init__.py')) as fp:\n VERSION = re.compile(r\".*__version__ = '(... | diff --git a/CHANGES.rst b/CHANGES.rst
index 0fd23a0456..29a579b892 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -5,7 +5,10 @@ dev (master)
------------
* urllib3 now respects Retry-After headers on 413, 429, and 503 responses when
- using the default retry logic.
+ using the default retry logic. (Pull #955)
+
+... |
bookwyrm-social__bookwyrm-3193 | Switching editions changes "shelved" date
**Describe the bug**
When switching editions of a book already on your "To Read" list, the "shelved" date is changed to today's date.
**To Reproduce**
Steps to reproduce the behavior:
1. Pick any book on your "To read" list with more than one edition
2. Pick another edit... | [
{
"content": "\"\"\" the good stuff! the books! \"\"\"\nfrom functools import reduce\nimport operator\n\nfrom django.contrib.auth.decorators import login_required\nfrom django.core.paginator import Paginator\nfrom django.db import transaction\nfrom django.db.models import Q\nfrom django.shortcuts import get_obj... | [
{
"content": "\"\"\" the good stuff! the books! \"\"\"\nfrom functools import reduce\nimport operator\n\nfrom django.contrib.auth.decorators import login_required\nfrom django.core.paginator import Paginator\nfrom django.db import transaction\nfrom django.db.models import Q\nfrom django.shortcuts import get_obj... | diff --git a/bookwyrm/views/books/editions.py b/bookwyrm/views/books/editions.py
index 54d1bd84c1..5202531f5d 100644
--- a/bookwyrm/views/books/editions.py
+++ b/bookwyrm/views/books/editions.py
@@ -93,6 +93,7 @@ def switch_edition(request):
user=shelfbook.user,
shelf=shelfbook.shelf,
... |
hpcaitech__ColossalAI-5060 | [tensor] fix some unittests
[tensor] fix some unittests
[tensor] fix some unittests
[BUG]: gemini 插件微调时,疑似不能正确加载模型权重
### 🐛 Describe the bug
# 环境
```
------------ Environment ------------
Colossal-AI version: 0.3.4
PyTorch version: 2.0.1
System CUDA version: 11.7
CUDA version required by PyTorch: 11.7
```
... | [
{
"content": "import argparse\nimport math\nimport os\nimport resource\nfrom contextlib import nullcontext\nfrom functools import partial\nfrom typing import Optional, Tuple\n\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\nfrom attn import SUPPORT_XFORMERS, replace_xformers\nfrom data_u... | [
{
"content": "import argparse\nimport math\nimport os\nimport resource\nfrom contextlib import nullcontext\nfrom functools import partial\nfrom typing import Optional, Tuple\n\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\nfrom attn import SUPPORT_XFORMERS, replace_xformers\nfrom data_u... | diff --git a/examples/language/llama2/finetune.py b/examples/language/llama2/finetune.py
index 33aa1d33e6ba..f7708b1a38ab 100644
--- a/examples/language/llama2/finetune.py
+++ b/examples/language/llama2/finetune.py
@@ -58,6 +58,7 @@ def tokenize_batch_for_finetune(batch, tokenizer: Optional[LlamaTokenizer] = Non
def... |
enthought__chaco-884 | ImportError: cannot import name 'BaseTool' from 'chaco.api'
**Problem Description**
ImportError: cannot import name 'BaseTool' from 'chaco.api' when running chaco/examples/demo/canvas/mptools.py
**Reproduction Steps:**
python chaco/examples/demo/canvas/mptools.py
**OS, Python version:** [MacOS, python3.11, python3.8 ... | [
{
"content": "\"\"\"\nA collection of Chaco tools that respond to a multi-pointer interface.\n\"\"\"\nfrom numpy import asarray, dot, sqrt\n\n# Enthought library imports\nfrom traits.api import (\n Delegate,\n Dict,\n Enum,\n Instance,\n Int,\n Property,\n Tuple,\n CArray,\n)\n\n# Chaco ... | [
{
"content": "\"\"\"\nA collection of Chaco tools that respond to a multi-pointer interface.\n\"\"\"\nfrom numpy import asarray, dot, sqrt\n\n# Enthought library imports\nfrom traits.api import (\n Delegate,\n Dict,\n Enum,\n Instance,\n Int,\n Property,\n Tuple,\n CArray,\n)\n\nfrom ena... | diff --git a/examples/demo/canvas/mptools.py b/examples/demo/canvas/mptools.py
index 77e13a22a..c8f4866e5 100644
--- a/examples/demo/canvas/mptools.py
+++ b/examples/demo/canvas/mptools.py
@@ -15,8 +15,9 @@
CArray,
)
+from enable.api import BaseTool
+
# Chaco imports
-from chaco.api import BaseTool
from chaco... |
getredash__redash-3008 | GA Data Source throws an error when no rows returned
### Issue Summary
Google Analytics Data Source throws `Error running query: 'rows'` when the query result is empty.
I have a pretty simple query with dimensions and filters, like:
```json
{
"ids": "ga:177xxxxxx",
"start_date": "2018-10-08",
"end_date... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport logging\nfrom base64 import b64decode\nfrom datetime import datetime\nfrom urlparse import parse_qs, urlparse\n\nfrom redash.query_runner import *\nfrom redash.utils import json_dumps, json_loads\n\nlogger = logging.getLogger(__name__)\n\ntry:\n from oauth2clie... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport logging\nfrom base64 import b64decode\nfrom datetime import datetime\nfrom urlparse import parse_qs, urlparse\n\nfrom redash.query_runner import *\nfrom redash.utils import json_dumps, json_loads\n\nlogger = logging.getLogger(__name__)\n\ntry:\n from oauth2clie... | diff --git a/redash/query_runner/google_analytics.py b/redash/query_runner/google_analytics.py
index e8b70eb01f..71be522015 100644
--- a/redash/query_runner/google_analytics.py
+++ b/redash/query_runner/google_analytics.py
@@ -43,7 +43,7 @@ def parse_ga_response(response):
})
rows = []
- for r in res... |
docker__docker-py-1167 | Feature Request: docker.from_env(version='auto')
Feature request to add auto api version support for `docker.from_env()` similar to `docker.Client(version='auto')`?
I noticed that one of the suggestions from #402 for the `version='auto'` option was now available for `docker.Client()` but doesn't work for `docker.from_... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | diff --git a/docker/client.py b/docker/client.py
index 758675369..dc28ac46c 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -114,7 +114,8 @@ def __init__(self, base_url=None, version=None,
@classmethod
def from_env(cls, **kwargs):
- return cls(**kwargs_from_env(**kwargs))
+ version = k... |
mathesar-foundation__mathesar-1707 | Explorations should not auto-save
New Explorations are currently persistent, any change made immediately saves the exploration. This behaviour is not preferred since we'd like the user to be able to run and discard queries.
[Mail thread containing related discussion](https://groups.google.com/a/mathesar.org/g/mathes... | [
{
"content": "from django.shortcuts import render, redirect, get_object_or_404\n\nfrom mathesar.models.base import Database, Schema, Table\nfrom mathesar.api.serializers.databases import DatabaseSerializer, TypeSerializer\nfrom mathesar.api.serializers.schemas import SchemaSerializer\nfrom mathesar.api.serializ... | [
{
"content": "from django.shortcuts import render, redirect, get_object_or_404\n\nfrom mathesar.models.base import Database, Schema, Table\nfrom mathesar.api.serializers.databases import DatabaseSerializer, TypeSerializer\nfrom mathesar.api.serializers.schemas import SchemaSerializer\nfrom mathesar.api.serializ... | diff --git a/mathesar/views.py b/mathesar/views.py
index 753441223b..8b45f7f1a9 100644
--- a/mathesar/views.py
+++ b/mathesar/views.py
@@ -42,7 +42,7 @@ def get_queries_list(request, schema):
if schema is None:
return []
query_serializer = QuerySerializer(
- UIQuery.objects.all(),
+ UIQ... |
aws-powertools__powertools-lambda-python-984 | Logger: log_event does not serialize classes
**What were you trying to accomplish?**
I was trying to log the received S3 event. Please note that i am using the data classes present in this library for reading the event
```python
@event_source(data_class=S3Event)
@log.inject_lambda_context(
log_event=True
)
... | [
{
"content": "import functools\nimport inspect\nimport logging\nimport os\nimport random\nimport sys\nfrom typing import IO, Any, Callable, Dict, Iterable, Optional, TypeVar, Union\n\nimport jmespath\n\nfrom ..shared import constants\nfrom ..shared.functions import resolve_env_var_choice, resolve_truthy_env_var... | [
{
"content": "import functools\nimport inspect\nimport logging\nimport os\nimport random\nimport sys\nfrom typing import IO, Any, Callable, Dict, Iterable, Optional, TypeVar, Union\n\nimport jmespath\n\nfrom ..shared import constants\nfrom ..shared.functions import resolve_env_var_choice, resolve_truthy_env_var... | diff --git a/aws_lambda_powertools/logging/logger.py b/aws_lambda_powertools/logging/logger.py
index 938742fb0a3..49321181b48 100644
--- a/aws_lambda_powertools/logging/logger.py
+++ b/aws_lambda_powertools/logging/logger.py
@@ -349,7 +349,7 @@ def decorate(event, context, **kwargs):
if log_event:
... |
googleapis__google-auth-library-python-671 | Use extra for asyncio dependencies
Hello! The latest release for this library pulls in aiohttp and its dependencies unconditionally, which adds non-trivial burden to projects that don’t need it. Would you consider using a packaging extra so that people can opt-in?
TODO: undo pin of 'aiohttp' once 'aioresponses' relea... | [
{
"content": "import synthtool as s\nfrom synthtool import gcp\n\ncommon = gcp.CommonTemplates()\n\n# ----------------------------------------------------------------------------\n# Add templated files\n# ----------------------------------------------------------------------------\ntemplated_files = common.py_l... | [
{
"content": "import synthtool as s\nfrom synthtool import gcp\n\ncommon = gcp.CommonTemplates()\n\n# ----------------------------------------------------------------------------\n# Add templated files\n# ----------------------------------------------------------------------------\ntemplated_files = common.py_l... | diff --git a/.gitignore b/.gitignore
index f01e60ec0..1f0b7e3c7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,6 +30,7 @@ scripts/local_test_setup
tests/data/key.json
tests/data/key.p12
tests/data/user-key.json
+system_tests/data/
# PyCharm configuration:
.idea
diff --git a/.kokoro/build.sh b/.kokoro/build.sh
i... |
pypa__cibuildwheel-977 | on windows, setup_py_python_requires attempts to open utf-8 setup.py as Windows-1252 and fails
### Description
This [setup.py file](https://github.com/fgregg/fastcluster/blob/master/setup.py) is valid utf-8, and has a few non-ascii characters. In a windows build, `setup_py_python_requires` appears to be opening this... | [
{
"content": "import ast\nimport sys\nfrom configparser import ConfigParser\nfrom pathlib import Path\nfrom typing import Any, Optional\n\nimport tomli\n\nif sys.version_info < (3, 8):\n Constant = ast.Str\n\n def get_constant(x: ast.Str) -> str:\n return x.s\n\nelse:\n Constant = ast.Constant\n... | [
{
"content": "import ast\nimport sys\nfrom configparser import ConfigParser\nfrom pathlib import Path\nfrom typing import Any, Optional\n\nimport tomli\n\nif sys.version_info < (3, 8):\n Constant = ast.Str\n\n def get_constant(x: ast.Str) -> str:\n return x.s\n\nelse:\n Constant = ast.Constant\n... | diff --git a/cibuildwheel/projectfiles.py b/cibuildwheel/projectfiles.py
index c4f63c176..fece392f8 100644
--- a/cibuildwheel/projectfiles.py
+++ b/cibuildwheel/projectfiles.py
@@ -70,7 +70,7 @@ def get_requires_python_str(package_dir: Path) -> Optional[str]:
pass
try:
- with (package_dir / "setu... |
Lightning-AI__pytorch-lightning-799 | Optional dependencies are required for deprecated logging module
🐛 Bug
There is a backwards compatibility issues coming from PR #767. Notably, if a user doesn't have any of the extra logging dependencies then they'll be an import error.
### To Reproduce
1. Remove all logging dependencies from your environment... | [
{
"content": "\"\"\"\n.. warning:: `logging` package has been renamed to `loggers` since v0.6.1 and will be removed in v0.8.0\n\"\"\"\n\nimport warnings\n\nwarnings.warn(\"`logging` package has been renamed to `loggers` since v0.6.1\"\n \" and will be removed in v0.8.0\", DeprecationWarning)\n\nfro... | [
{
"content": "\"\"\"\n.. warning:: `logging` package has been renamed to `loggers` since v0.6.1 and will be removed in v0.8.0\n\"\"\"\n\nimport warnings\n\nwarnings.warn(\"`logging` package has been renamed to `loggers` since v0.6.1\"\n \" and will be removed in v0.8.0\", DeprecationWarning)\n\nfro... | diff --git a/pytorch_lightning/logging/__init__.py b/pytorch_lightning/logging/__init__.py
index 93515eb1eff31..ecd4c3b01e9f4 100644
--- a/pytorch_lightning/logging/__init__.py
+++ b/pytorch_lightning/logging/__init__.py
@@ -8,6 +8,3 @@
" and will be removed in v0.8.0", DeprecationWarning)
from pytorc... |
pymeasure__pymeasure-852 | How to include Channels in API documentation
In #819 I encountered the question, how to include the Channel best into the documentation.
It does not seem right, to put the channel in the same level as the instruments of that manufacturer.
Any ideas?
| [
{
"content": "#\n# This file is part of the PyMeasure package.\n#\n# Copyright (c) 2013-2023 PyMeasure Developers\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restr... | [
{
"content": "#\n# This file is part of the PyMeasure package.\n#\n# Copyright (c) 2013-2023 PyMeasure Developers\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restr... | diff --git a/docs/dev/adding_instruments/channels.rst b/docs/dev/adding_instruments/channels.rst
index dda8dea9d8..55873e202c 100644
--- a/docs/dev/adding_instruments/channels.rst
+++ b/docs/dev/adding_instruments/channels.rst
@@ -25,6 +25,17 @@ All the channel communication is routed through the instrument's methods (... |
voxel51__fiftyone-1179 | [BUG] Cannot open desktop App with fiftyone==0.12.0 source install
On a source install of `fiftyone==0.12.0`, the desktop App cannot be opened:
```shell
fiftyone app launch --desktop
```
```
Usage Error: Couldn't find a script named "start-app"
```
The `start-app` script in the last release was
https://gi... | [
{
"content": "\"\"\"\nFiftyOne Services.\n\n| Copyright 2017-2021, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\nimport logging\nimport multiprocessing\nimport os\nimport re\nimport subprocess\nimport sys\n\nfrom packaging.version import Version\nimport psutil\nimport requests\nfrom retryin... | [
{
"content": "\"\"\"\nFiftyOne Services.\n\n| Copyright 2017-2021, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\nimport logging\nimport multiprocessing\nimport os\nimport re\nimport subprocess\nimport sys\n\nfrom packaging.version import Version\nimport psutil\nimport requests\nfrom retryin... | diff --git a/app/package.json b/app/package.json
index b9960a8bdaf..4e209df7539 100644
--- a/app/package.json
+++ b/app/package.json
@@ -6,10 +6,11 @@
"private": true,
"main": "index.js",
"scripts": {
+ "build": "yarn workspace @fiftyone/app build",
"dev": "yarn workspace @fiftyone/app de... |
apache__tvm-12178 | Exercise TVM under minimal configuration in CI
We have seen a couple bugs due to microTVM being presumed-ON in config.cmake. Namely, you get python errors importing TVM right now when USE_MICRO is OFF. We should have a regression test that verifies basic functionality with everything (or nearly everything) OFF.
Cont... | [
{
"content": "#!/usr/bin/env python3\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache Lic... | [
{
"content": "#!/usr/bin/env python3\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache Lic... | diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8dc03ee0f40e..a6be494a3a53 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -794,3 +794,5 @@ find_and_set_linker(${USE_ALTERNATIVE_LINKER})
if(${SUMMARIZE})
print_summary()
endif()
+
+dump_options_to_file("${TVM_ALL_OPTIONS}")
diff --git a/Jenkinsfile b/Jenkins... |
apache__airflow-11723 | All task logging goes to the log for try_number 1
**Apache Airflow version**: 2.0.0a1
**What happened**:
When a task fails on the first try, the log output for additional tries go to the log for the first attempt.
**What you expected to happen**:
The logs should go to the correct log file. For the default con... | [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | diff --git a/airflow/cli/commands/task_command.py b/airflow/cli/commands/task_command.py
index 145d78b917b1d..6d48907aa6d70 100644
--- a/airflow/cli/commands/task_command.py
+++ b/airflow/cli/commands/task_command.py
@@ -171,6 +171,7 @@ def task_run(args, dag=None):
task = dag.get_task(task_id=args.task_id)
... |
python-telegram-bot__python-telegram-bot-377 | Execfile does not exist in py3k
<!--
Thanks for reporting issues of python-telegram-bot!
To make it easier for us to help you please enter detailed information below.
Please note, we only support the latest version of python-telegram-bot and
master branch. Please make sure to upgrade & recreate the issue on the latest... | [
{
"content": "#!/usr/bin/env python\n\"\"\"The setup and build script for the python-telegram-bot library.\"\"\"\n\nimport codecs\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef requirements():\n \"\"\"Build the requirements list for this project\"\"\"\n requirements_list = []\n\n with... | [
{
"content": "#!/usr/bin/env python\n\"\"\"The setup and build script for the python-telegram-bot library.\"\"\"\n\nimport codecs\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef requirements():\n \"\"\"Build the requirements list for this project\"\"\"\n requirements_list = []\n\n with... | diff --git a/setup.py b/setup.py
index 3b114c51d88..bd57d845bcd 100644
--- a/setup.py
+++ b/setup.py
@@ -16,6 +16,13 @@ def requirements():
return requirements_list
+
+def execfile(fn):
+ with open(fn) as f:
+ code = compile(f.read(), fn, 'exec')
+ exec(code)
+
+
with codecs.open('README.rst'... |
jschneier__django-storages-1087 | SFTPStorage: keep trying to connect when timeout (in a loop)
I was implementing saving a file in SFTP and, when testing time out, it was never launched.
I have debugged and it goes into a loop trying to connect.
Specifically:
- https://github.com/jschneier/django-storages/blob/master/storages/backends/sftpstorag... | [
{
"content": "# SFTP storage backend for Django.\n# Author: Brent Tubbs <brent.tubbs@gmail.com>\n# License: MIT\n#\n# Modeled on the FTP storage by Rafal Jonca <jonca.rafal@gmail.com>\n\nimport getpass\nimport io\nimport os\nimport posixpath\nimport stat\nfrom datetime import datetime\nfrom urllib.parse import ... | [
{
"content": "# SFTP storage backend for Django.\n# Author: Brent Tubbs <brent.tubbs@gmail.com>\n# License: MIT\n#\n# Modeled on the FTP storage by Rafal Jonca <jonca.rafal@gmail.com>\n\nimport getpass\nimport io\nimport os\nimport posixpath\nimport stat\nfrom datetime import datetime\nfrom urllib.parse import ... | diff --git a/storages/backends/sftpstorage.py b/storages/backends/sftpstorage.py
index 529daf278..643685c88 100644
--- a/storages/backends/sftpstorage.py
+++ b/storages/backends/sftpstorage.py
@@ -150,7 +150,7 @@ def exists(self, name):
try:
self.sftp.stat(self._remote_path(name))
ret... |
vyperlang__vyper-3340 | Bug: compiler dislikes `x not in [a, b]` in 0.3.8, whereas it was fine in 0.3.7
### Version Information
* vyper Version (output of `vyper --version`): 0.3.8
* OS: osx
* Python Version (output of `python --version`): 3.10.4
### What's your issue about?
<img width="705" alt="image" src="https://user-images.git... | [
{
"content": "from typing import Dict\n\nfrom vyper.semantics.analysis.base import VarInfo\nfrom vyper.semantics.types import AddressT, BytesT, VyperType\nfrom vyper.semantics.types.shortcuts import BYTES32_T, UINT256_T\n\n\n# common properties for environment variables\nclass _EnvType(VyperType):\n def __eq... | [
{
"content": "from typing import Dict\n\nfrom vyper.semantics.analysis.base import VarInfo\nfrom vyper.semantics.types import AddressT, BytesT, VyperType\nfrom vyper.semantics.types.shortcuts import BYTES32_T, UINT256_T\n\n\n# common properties for environment variables\nclass _EnvType(VyperType):\n def __eq... | diff --git a/vyper/semantics/environment.py b/vyper/semantics/environment.py
index 0f915a2161..ad68f1103e 100644
--- a/vyper/semantics/environment.py
+++ b/vyper/semantics/environment.py
@@ -57,12 +57,7 @@ def get_constant_vars() -> Dict:
return result
-# Not sure this is necessary, but add an ad-hoc type for ... |
ansible__ansible-modules-extras-1291 | pam_limits - documentation is not updated
`limit_type` choices are `hard`, `soft` in the [documentation](http://docs.ansible.com/ansible/pam_limits_module.html) but in the [code](https://github.com/ansible/ansible-modules-extras/blob/devel/system/pam_limits.py#L95) `-` is supported.
pam_limits - documentation is not ... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2014, Sebastien Rohaut <sebastien.rohaut@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Softw... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2014, Sebastien Rohaut <sebastien.rohaut@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Softw... | diff --git a/system/pam_limits.py b/system/pam_limits.py
index eb04021c3e0..4003f76d3f8 100644
--- a/system/pam_limits.py
+++ b/system/pam_limits.py
@@ -40,7 +40,7 @@
description:
- Limit type, see C(man limits) for an explanation
required: true
- choices: [ "hard", "soft" ]
+ choices: [ "hard", ... |
microsoft__botbuilder-python-2050 | botbuidler support for regex== 2022 and above
Description:
I'm currently working on building a chatbot using Azure Bot Builder SDK in conjunction with OpenAI. In my project, I'm relying on the OpenAIEmbedding class from the langchain package, which utilizes Tiktoken. However, I've run into an issue due to dependenc... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport os\nfrom setuptools import setup\n\nREQUIRES = [\n \"regex<=2019.08.19\",\n \"emoji==1.7.0\",\n \"recognizers-text-date-time>=1.0.2a1\",\n \"recognizers-text-number-with-unit>=1.0.2... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport os\nfrom setuptools import setup\n\nREQUIRES = [\n \"regex>=2022.1.18\",\n \"emoji==1.7.0\",\n \"recognizers-text-date-time>=1.0.2a1\",\n \"recognizers-text-number-with-unit>=1.0.2a... | diff --git a/libraries/botbuilder-dialogs/setup.py b/libraries/botbuilder-dialogs/setup.py
index 6e97715a5..574f8bbe7 100644
--- a/libraries/botbuilder-dialogs/setup.py
+++ b/libraries/botbuilder-dialogs/setup.py
@@ -5,7 +5,7 @@
from setuptools import setup
REQUIRES = [
- "regex<=2019.08.19",
+ "regex>=2022.1... |
coala__coala-4980 | Compatibility.py: Add comment explaining JSONDecodeError is missing in Python 3.4
difficulty/newcomer
Opened via [gitter](https://gitter.im/coala/coala/?at=59098da68fcce56b205cd7e0) by @jayvdb
| [
{
"content": "import json\ntry:\n JSONDecodeError = json.decoder.JSONDecodeError\nexcept AttributeError: # pragma Python 3.5,3.6: no cover\n JSONDecodeError = ValueError\n",
"path": "coalib/misc/Compatibility.py"
}
] | [
{
"content": "import json\ntry:\n # JSONDecodeError class is available since Python 3.5.x.\n JSONDecodeError = json.decoder.JSONDecodeError\nexcept AttributeError: # pragma Python 3.5,3.6: no cover\n JSONDecodeError = ValueError\n",
"path": "coalib/misc/Compatibility.py"
}
] | diff --git a/coalib/misc/Compatibility.py b/coalib/misc/Compatibility.py
index f81e818544..f0e63d63b3 100644
--- a/coalib/misc/Compatibility.py
+++ b/coalib/misc/Compatibility.py
@@ -1,5 +1,6 @@
import json
try:
+ # JSONDecodeError class is available since Python 3.5.x.
JSONDecodeError = json.decoder.JSONDeco... |
open-telemetry__opentelemetry-python-2962 | Fix dead link
There is a dead link in the CHANGELOG, [here](https://github.com/open-telemetry/opentelemetry-python/blob/main/CHANGELOG.md?plain=1#L13).
| [
{
"content": "#!/usr/bin/env python3\n\nimport argparse\nimport os\nimport re\nimport shlex\nimport shutil\nimport subprocess\nimport sys\nfrom configparser import ConfigParser\nfrom datetime import datetime\nfrom inspect import cleandoc\nfrom itertools import chain\nfrom os.path import basename\nfrom pathlib i... | [
{
"content": "#!/usr/bin/env python3\n\nimport argparse\nimport os\nimport re\nimport shlex\nimport shutil\nimport subprocess\nimport sys\nfrom configparser import ConfigParser\nfrom datetime import datetime\nfrom inspect import cleandoc\nfrom itertools import chain\nfrom os.path import basename\nfrom pathlib i... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ea4f873b37d..6d3b1d2fedb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semant... |
open-mmlab__mmcv-1834 | Support None in DictAction
Some times there are needs to override some key in the config to be `None`, e.g., the load_from is assigned to some string and you want to override it through `--cfg-options load_from=None`, it will pass a string of None rather than the real `None` value to the config and make checkpoint load... | [
{
"content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport ast\nimport copy\nimport os\nimport os.path as osp\nimport platform\nimport shutil\nimport sys\nimport tempfile\nimport types\nimport uuid\nimport warnings\nfrom argparse import Action, ArgumentParser\nfrom collections import abc\nfrom import... | [
{
"content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport ast\nimport copy\nimport os\nimport os.path as osp\nimport platform\nimport shutil\nimport sys\nimport tempfile\nimport types\nimport uuid\nimport warnings\nfrom argparse import Action, ArgumentParser\nfrom collections import abc\nfrom import... | diff --git a/mmcv/utils/config.py b/mmcv/utils/config.py
index 4f96372ae4..473bd1e165 100644
--- a/mmcv/utils/config.py
+++ b/mmcv/utils/config.py
@@ -638,6 +638,8 @@ def _parse_int_float_bool(val):
pass
if val.lower() in ['true', 'false']:
return True if val.lower() == 'true' else Fa... |
django-helpdesk__django-helpdesk-645 | systems_settings url should only be available to staff users
currently, the template starts to render before it fails if the user is not logged in.
| [
{
"content": "\"\"\"\ndjango-helpdesk - A Django powered ticket tracker for small enterprise.\n\n(c) Copyright 2008 Jutda. All Rights Reserved. See LICENSE for details.\n\nurls.py - Mapping of URL's to our various views. Note we always used NAMED\n views for simplicity in linking later on.\n\"\"\"\n\nf... | [
{
"content": "\"\"\"\ndjango-helpdesk - A Django powered ticket tracker for small enterprise.\n\n(c) Copyright 2008 Jutda. All Rights Reserved. See LICENSE for details.\n\nurls.py - Mapping of URL's to our various views. Note we always used NAMED\n views for simplicity in linking later on.\n\"\"\"\n\nf... | diff --git a/helpdesk/urls.py b/helpdesk/urls.py
index 969d8dd1d..02d1ff1d0 100644
--- a/helpdesk/urls.py
+++ b/helpdesk/urls.py
@@ -222,6 +222,6 @@ def get_context_data(self, **kwargs):
name='help_context'),
url(r'^system_settings/$',
- DirectTemplateView.as_view(template_name='helpdesk/system_s... |
pre-commit__pre-commit-67 | TypeError while instantiating LoggingHandler (2.6)
I assume this is new-style vs old-style classes being grumpy?
```
>>> from pre_commit.logging_handler import LoggingHandler
>>> LoggingHandler(True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../py_env/lib/python2.6/site-packages... | [
{
"content": "\nfrom __future__ import print_function\n\nimport logging\n\nfrom pre_commit import color\n\n\nLOG_LEVEL_COLORS = {\n 'DEBUG': '',\n 'INFO': '',\n 'WARNING': color.YELLOW,\n 'ERROR': color.RED,\n}\n\n\nclass LoggingHandler(logging.Handler):\n def __init__(self, use_color):\n ... | [
{
"content": "\nfrom __future__ import print_function\n\nimport logging\n\nfrom pre_commit import color\n\n\nLOG_LEVEL_COLORS = {\n 'DEBUG': '',\n 'INFO': '',\n 'WARNING': color.YELLOW,\n 'ERROR': color.RED,\n}\n\n\nclass LoggingHandler(logging.Handler):\n def __init__(self, use_color):\n ... | diff --git a/pre_commit/logging_handler.py b/pre_commit/logging_handler.py
index 11736d1b5..70b61e730 100644
--- a/pre_commit/logging_handler.py
+++ b/pre_commit/logging_handler.py
@@ -16,7 +16,7 @@
class LoggingHandler(logging.Handler):
def __init__(self, use_color):
- super(LoggingHandler, self).__init... |
opendatacube__datacube-core-747 | Dataset `__eq__` fails when other object is not a Dataset
### Expected behaviour
```python
ds, *_ = dc.find_datasets(..)
assert (ds == "33") is False
```
### Actual behaviour
Error is raised inside `__eq__` operator.
```
---------------------------------------------------------------------------
Attr... | [
{
"content": "# coding=utf-8\n\"\"\"\nCore classes used across modules.\n\"\"\"\nimport logging\nimport math\nimport warnings\nfrom collections import OrderedDict\nfrom datetime import datetime\nfrom pathlib import Path\nfrom uuid import UUID\n\nfrom affine import Affine\nfrom typing import Optional, List, Mapp... | [
{
"content": "# coding=utf-8\n\"\"\"\nCore classes used across modules.\n\"\"\"\nimport logging\nimport math\nimport warnings\nfrom collections import OrderedDict\nfrom datetime import datetime\nfrom pathlib import Path\nfrom uuid import UUID\n\nfrom affine import Affine\nfrom typing import Optional, List, Mapp... | diff --git a/datacube/model/__init__.py b/datacube/model/__init__.py
index a9c93b2971..ef7c588308 100644
--- a/datacube/model/__init__.py
+++ b/datacube/model/__init__.py
@@ -285,7 +285,9 @@ def xytuple(obj):
return None
def __eq__(self, other) -> bool:
- return self.id == other.id
+ if is... |
joke2k__faker-318 | Access to the Generator.random
It would be nice if one could gain access to the Generator.random variable so that one could save/set the state. I realize I can pass in the seed, but one currently has no way of gathering what the seed/state is if using the automatically generated seed. I don't want to use a fixed seed... | [
{
"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\n\nimport re\nimport random\n\n\n_re_token = re.compile(r'\\{\\{(\\s?)(\\w+)(\\s?)\\}\\}')\nrandom = random.Random()\n\n\nclass Generator(object):\n\n __config = {}\n\n def __init__(self, **config):\n self.providers = []\n ... | [
{
"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\n\nimport re\nimport random\n\n\n_re_token = re.compile(r'\\{\\{(\\s?)(\\w+)(\\s?)\\}\\}')\nrandom = random.Random()\n\n\nclass Generator(object):\n\n __config = {}\n\n def __init__(self, **config):\n self.providers = []\n ... | diff --git a/README.rst b/README.rst
index 4dc04a86fb..0941dbdaa7 100644
--- a/README.rst
+++ b/README.rst
@@ -263,13 +263,26 @@ How to use with factory-boy
title = factory.LazyAttribute(lambda x: faker.sentence(nb_words=4))
author_name = factory.LazyAttribute(lambda x: faker.name())
+Accessing the ... |
scikit-image__scikit-image-1430 | measure.label is documented under morphology.label
In the [measure API reference](http://scikit-image.org/docs/stable/api/skimage.measure.html) label is not documented, but it is [documented under morphology module](http://scikit-image.org/docs/stable/api/skimage.morphology.html#label) (which is depreciated).
| [
{
"content": "from ._find_contours import find_contours\nfrom ._marching_cubes import (marching_cubes, mesh_surface_area,\n correct_mesh_orientation)\nfrom ._regionprops import regionprops, perimeter\nfrom ._structural_similarity import structural_similarity\nfrom ._polygon import a... | [
{
"content": "from ._find_contours import find_contours\nfrom ._marching_cubes import (marching_cubes, mesh_surface_area,\n correct_mesh_orientation)\nfrom ._regionprops import regionprops, perimeter\nfrom ._structural_similarity import structural_similarity\nfrom ._polygon import a... | diff --git a/skimage/measure/__init__.py b/skimage/measure/__init__.py
index e2a4a51aef4..9731d6da6fc 100755
--- a/skimage/measure/__init__.py
+++ b/skimage/measure/__init__.py
@@ -9,7 +9,7 @@
from .profile import profile_line
from .fit import LineModel, CircleModel, EllipseModel, ransac
from .block import block_red... |
opendatacube__datacube-core-652 | `unary_union` does not detect failures
In this function:
https://github.com/opendatacube/datacube-core/blob/0ab135ef9986bee0ea476ced76fad7b9c2f47328/datacube/utils/geometry/_base.py#L692-L695
https://github.com/opendatacube/datacube-core/blob/0ab135ef9986bee0ea476ced76fad7b9c2f47328/datacube/utils/geometry/_base.... | [
{
"content": "import functools\nimport math\nfrom collections import namedtuple, OrderedDict\nfrom typing import Tuple, Callable\n\nimport cachetools\nimport numpy\nfrom affine import Affine\nfrom osgeo import ogr, osr\n\nfrom .tools import roi_normalise, roi_shape\n\nCoordinate = namedtuple('Coordinate', ('val... | [
{
"content": "import functools\nimport math\nfrom collections import namedtuple, OrderedDict\nfrom typing import Tuple, Callable\n\nimport cachetools\nimport numpy\nfrom affine import Affine\nfrom osgeo import ogr, osr\n\nfrom .tools import roi_normalise, roi_shape\n\nCoordinate = namedtuple('Coordinate', ('val... | diff --git a/datacube/utils/geometry/_base.py b/datacube/utils/geometry/_base.py
index 79611d46cc..b9ec36a6e3 100644
--- a/datacube/utils/geometry/_base.py
+++ b/datacube/utils/geometry/_base.py
@@ -303,6 +303,8 @@ def _get_coordinates(geom):
def _make_geom_from_ogr(geom, crs):
+ if geom is None:
+ retur... |
frappe__frappe-15915 | no_copy option not available in customize form field
<!--
Welcome to the Frappe Framework issue tracker! Before creating an issue, please heed the following:
1. This tracker should only be used to report bugs and request features / enhancements to Frappe
- For questions and general support, use https://stackov... | [
{
"content": "# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See LICENSE\n\n\"\"\"\n\tCustomize Form is a Single DocType used to mask the Property Setter\n\tThus providing a better UI from user perspective\n\"\"\"\nimport json\nimport frappe\nimport frappe.translate\nfrom f... | [
{
"content": "# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See LICENSE\n\n\"\"\"\n\tCustomize Form is a Single DocType used to mask the Property Setter\n\tThus providing a better UI from user perspective\n\"\"\"\nimport json\nimport frappe\nimport frappe.translate\nfrom f... | diff --git a/frappe/custom/doctype/customize_form/customize_form.py b/frappe/custom/doctype/customize_form/customize_form.py
index 92a540447fd1..f1b6ab40edb1 100644
--- a/frappe/custom/doctype/customize_form/customize_form.py
+++ b/frappe/custom/doctype/customize_form/customize_form.py
@@ -540,6 +540,7 @@ def reset_cus... |
dask__distributed-367 | OverflowError when sending large sparse arrays
I don't yet have a small reproducible example, but I can make this happen every time I try to collect many large sparse arrays. I do have a notebook that will produce it though, and can make that available. The traceback:
```
Traceback (most recent call last):
File "/ho... | [
{
"content": "\"\"\"\nThe distributed message protocol consists of the following parts:\n\n1. The length of the header, stored as a uint32\n2. The header, stored as msgpack.\n If there are no fields in the header then we skip it entirely.\n3. The payload, stored as possibly compressed msgpack\n4. A senti... | [
{
"content": "\"\"\"\nThe distributed message protocol consists of the following parts:\n\n1. The length of the header, stored as a uint32\n2. The header, stored as msgpack.\n If there are no fields in the header then we skip it entirely.\n3. The payload, stored as possibly compressed msgpack\n4. A senti... | diff --git a/distributed/protocol.py b/distributed/protocol.py
index ca67ddbdd4f..21d1584f968 100644
--- a/distributed/protocol.py
+++ b/distributed/protocol.py
@@ -123,6 +123,8 @@ def maybe_compress(payload, compression=default_compression, min_size=1e4,
return None, payload
if len(payload) < min_size:
... |
piskvorky__gensim-2869 | Investigate and fix Keras problem under Python 3.8
One of our unit tests fails on Travis under Py3.8.
```
=================================== FAILURES ===================================
_____________ TestKerasWord2VecWrapper.testEmbeddingLayerCosineSim _____________
self = <gensim.test.test_keras_integration... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2014 Radim Rehurek <radimrehurek@seznam.cz>\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\"\"\"\nRun with::\n\n python ./setup.py install\n\"\"\"\n\nimport distutils.cmd\nimport distutils.log\ni... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2014 Radim Rehurek <radimrehurek@seznam.cz>\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\"\"\"\nRun with::\n\n python ./setup.py install\n\"\"\"\n\nimport distutils.cmd\nimport distutils.log\ni... | diff --git a/gensim/test/test_keras_integration.py b/gensim/test/test_keras_integration.py
index bad0bb8b95..cc7af1892d 100644
--- a/gensim/test/test_keras_integration.py
+++ b/gensim/test/test_keras_integration.py
@@ -59,7 +59,7 @@ def testEmbeddingLayerCosineSim(self):
embedding_b = embedding_layer(input_b)
... |
pallets__click-2544 | zsh completion requires pressing tab twice
```
❯ black --<TAB>
# Nothing will happen
❯ black --<TAB>
unsorted
--code Format the code passed in as a string.
...
# work after second time
```
Expected:
```
❯ black --<TAB>
unsorted
--code Format the code passed... | [
{
"content": "import os\nimport re\nimport typing as t\nfrom gettext import gettext as _\n\nfrom .core import Argument\nfrom .core import BaseCommand\nfrom .core import Context\nfrom .core import MultiCommand\nfrom .core import Option\nfrom .core import Parameter\nfrom .core import ParameterSource\nfrom .parser... | [
{
"content": "import os\nimport re\nimport typing as t\nfrom gettext import gettext as _\n\nfrom .core import Argument\nfrom .core import BaseCommand\nfrom .core import Context\nfrom .core import MultiCommand\nfrom .core import Option\nfrom .core import Parameter\nfrom .core import ParameterSource\nfrom .parser... | diff --git a/CHANGES.rst b/CHANGES.rst
index 76c234f6b..674e44901 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -17,6 +17,7 @@ Unreleased
- Improve responsiveness of ``click.clear()``. :issue:`2284`
- Improve command name detection when using Shiv or PEX. :issue:`2332`
- Avoid showing empty lines if command he... |
dotkom__onlineweb4-2553 | Cant delete mails through REST API endpoints
The endpoint to remove mails are fucked :)
| [
{
"content": "from django.contrib.auth.models import Group\nfrom rest_framework import mixins, status, viewsets\nfrom rest_framework.decorators import action\nfrom rest_framework.permissions import AllowAny, IsAuthenticated\nfrom rest_framework.response import Response\n\nfrom apps.authentication.models import ... | [
{
"content": "from django.contrib.auth.models import Group\nfrom rest_framework import mixins, status, viewsets\nfrom rest_framework.decorators import action\nfrom rest_framework.permissions import AllowAny, IsAuthenticated\nfrom rest_framework.response import Response\n\nfrom apps.authentication.models import ... | diff --git a/apps/authentication/api/views.py b/apps/authentication/api/views.py
index fc27a3be1..59aab50a3 100644
--- a/apps/authentication/api/views.py
+++ b/apps/authentication/api/views.py
@@ -105,6 +105,7 @@ def destroy(self, request, *args, **kwargs):
},
status=status.HTTP_400_BA... |
pypa__pipenv-930 | Pipfile is not terminated by a newline
The Pipfile created by pipenv doesn't contain a trailing newline
##### Describe you environment
1. Mac OS Sierra (10.12.6)
1. Python version: I use pyenv, and I've tried this on 2.7.13 and 3.6.3. I doubt this is related to the Python version, but if you can't reproduce let ... | [
{
"content": "# -*- coding: utf-8 -*-\nimport os\nimport hashlib\nimport tempfile\nimport sys\nimport shutil\nimport logging\n\nimport click\nimport crayons\nimport delegator\nimport pip\nimport parse\nimport requirements\nimport fuzzywuzzy.process\nimport requests\nimport six\n\nlogging.basicConfig(level=loggi... | [
{
"content": "# -*- coding: utf-8 -*-\nimport os\nimport hashlib\nimport tempfile\nimport sys\nimport shutil\nimport logging\n\nimport click\nimport crayons\nimport delegator\nimport pip\nimport parse\nimport requirements\nimport fuzzywuzzy.process\nimport requests\nimport six\n\nlogging.basicConfig(level=loggi... | diff --git a/pipenv/utils.py b/pipenv/utils.py
index bb118b7cc1..bf99cdd578 100644
--- a/pipenv/utils.py
+++ b/pipenv/utils.py
@@ -290,7 +290,9 @@ def cleanup_toml(tml):
# Insert a newline after the heading.
if after:
new_toml.append('')
-
+
+ # adding new line at the end of the TO... |
benoitc__gunicorn-1806 | I get error in this package AttributeError: 'NoneType' object has no attribute 'add_extra_file'
hi every one ..
when i try to deploy keras model into google cloud i get this error ...
```py
File "/home/falahgs07/keras/env/lib/python3.5/site-packages/gunicorn/workers/base.py", line 126, in init_process
self.lo... | [
{
"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nfrom datetime import datetime\nimport os\nfrom random import randint\nimport signal\nfrom ssl import SSLError\nimport sys\nimport time\nimport traceback\n\nfrom guni... | [
{
"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nfrom datetime import datetime\nimport os\nfrom random import randint\nimport signal\nfrom ssl import SSLError\nimport sys\nimport time\nimport traceback\n\nfrom guni... | diff --git a/docs/source/news.rst b/docs/source/news.rst
index 3d90aead2..8f61b9c87 100644
--- a/docs/source/news.rst
+++ b/docs/source/news.rst
@@ -2,6 +2,13 @@
Changelog
=========
+19.x / not released
+===================
+
+- fix: prevent raising :exc:`AttributeError` when ``--reload`` is not passed
+ in case o... |
frappe__frappe-16129 | no_copy option not available in customize form field
<!--
Welcome to the Frappe Framework issue tracker! Before creating an issue, please heed the following:
1. This tracker should only be used to report bugs and request features / enhancements to Frappe
- For questions and general support, use https://stackov... | [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\nfrom __future__ import unicode_literals\n\"\"\"\n\tCustomize Form is a Single DocType used to mask the Property Setter\n\tThus providing a better UI from user perspective\n\"\"\"\nimport json\ni... | [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\nfrom __future__ import unicode_literals\n\"\"\"\n\tCustomize Form is a Single DocType used to mask the Property Setter\n\tThus providing a better UI from user perspective\n\"\"\"\nimport json\ni... | diff --git a/frappe/custom/doctype/customize_form/customize_form.py b/frappe/custom/doctype/customize_form/customize_form.py
index 53626a75217b..faa8e74c2feb 100644
--- a/frappe/custom/doctype/customize_form/customize_form.py
+++ b/frappe/custom/doctype/customize_form/customize_form.py
@@ -533,6 +533,7 @@ def reset_cus... |
carltongibson__django-filter-568 | Import of rest_framework backend can fail
In the DRF docs, they give an example which looks like:
```
import django_filters
# ...
class ProductFilter(django_filters.rest_framework.FilterSet):
# ...
```
This does not work, however, with the way the `django_filters/__init__.py` is set up. Using this exam... | [
{
"content": "# flake8: noqa\nfrom __future__ import absolute_import\nfrom .constants import STRICTNESS\nfrom .filterset import FilterSet\nfrom .filters import *\n\n__version__ = '1.0.0'\n\n\ndef parse_version(version):\n '''\n '0.1.2-dev' -> (0, 1, 2, 'dev')\n '0.1.2' -> (0, 1, 2)\n '''\n v = ve... | [
{
"content": "# flake8: noqa\nfrom __future__ import absolute_import\nfrom .constants import STRICTNESS\nfrom .filterset import FilterSet\nfrom .filters import *\n\n# We make the `rest_framework` module available without an additional import.\n# If DRF is not installed we simply set None.\ntry:\n from . im... | diff --git a/django_filters/__init__.py b/django_filters/__init__.py
index 6f2400721..b9f928131 100644
--- a/django_filters/__init__.py
+++ b/django_filters/__init__.py
@@ -4,6 +4,13 @@
from .filterset import FilterSet
from .filters import *
+# We make the `rest_framework` module available without an additional imp... |
ivy-llc__ivy-13273 | unravel_index
| [
{
"content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@to_ivy_arrays_and_back\ndef diagonal(a, offset=0, axis1=0, axis2=1):\n return ivy.diagonal(a, offset=offset, axis1=axis1, axis2=axis2)\n\n\n@to_ivy_arrays_and_back\ndef diag(v, k=0... | [
{
"content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@to_ivy_arrays_and_back\ndef diagonal(a, offset=0, axis1=0, axis2=1):\n return ivy.diagonal(a, offset=offset, axis1=axis1, axis2=axis2)\n\n\n@to_ivy_arrays_and_back\ndef diag(v, k=0... | diff --git a/ivy/functional/frontends/jax/numpy/indexing.py b/ivy/functional/frontends/jax/numpy/indexing.py
index 10df7c6e7d956..0594d21259f97 100644
--- a/ivy/functional/frontends/jax/numpy/indexing.py
+++ b/ivy/functional/frontends/jax/numpy/indexing.py
@@ -44,3 +44,10 @@ def triu_indices_from(arr, k=0):
def tril... |
deeppavlov__DeepPavlov-76 | What is "'Chainer' object has no attribute 'infer'
2018-03-04 14:09:23,638 (util.py:64 WorkerThread2) ERROR - TeleBot: "AttributeError occurred, args=("'Chainer' object has no attribute 'infer'",)
Traceback (most recent call last):
File "/Users/developer/DeepPavlov/lib/python3.6/site-packages/telebot/util.py", line... | [
{
"content": "\"\"\"\nCopyright 2017 Neural Networks and Deep Learning lab, MIPT\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUn... | [
{
"content": "\"\"\"\nCopyright 2017 Neural Networks and Deep Learning lab, MIPT\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUn... | diff --git a/telegram_utils/telegram_ui.py b/telegram_utils/telegram_ui.py
index 3841847438..1606180af6 100644
--- a/telegram_utils/telegram_ui.py
+++ b/telegram_utils/telegram_ui.py
@@ -45,7 +45,7 @@ def handle_inference(message):
chat_id = message.chat.id
context = message.text
- pred = mod... |
microsoft__botbuilder-python-2057 | 4.14.6 CloudAdapter fails to send Typing Activity in Teams
## Version
botbuilder-core 4.14.6
botbuilder-integration-aiohttp 4.14.6
botbuilder-schema 4.14.6
## Describe the bug
I am unable to send typing indicators with the `ShowTypingMiddleware` middlew... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nfrom abc import ABC\nfrom asyncio import sleep\nfrom copy import Error\nfrom http import HTTPStatus\nfrom typing import Awaitable, Callable, List, Union\nfrom uuid import uuid4\n\nfrom botbuilder.core... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nfrom abc import ABC\nfrom asyncio import sleep\nfrom copy import Error\nfrom http import HTTPStatus\nfrom typing import Awaitable, Callable, List, Union\nfrom uuid import uuid4\n\nfrom botbuilder.core... | diff --git a/libraries/botbuilder-core/botbuilder/core/cloud_adapter_base.py b/libraries/botbuilder-core/botbuilder/core/cloud_adapter_base.py
index c5eda9589..7e996c90c 100644
--- a/libraries/botbuilder-core/botbuilder/core/cloud_adapter_base.py
+++ b/libraries/botbuilder-core/botbuilder/core/cloud_adapter_base.py
@@ ... |
sunpy__sunpy-1365 | JSOC download skips first file in Results object
| [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, absolute_import\n\nimport os\nimport time\nimport urlparse\nimport warnings\n\nimport requests\nimport numpy as np\nimport astropy.units as u\nimport astropy.time\nimport astropy.table\n\nfrom sunpy import config\nfrom sunpy.time impo... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import print_function, absolute_import\n\nimport os\nimport time\nimport urlparse\nimport warnings\n\nimport requests\nimport numpy as np\nimport astropy.units as u\nimport astropy.time\nimport astropy.table\n\nfrom sunpy import config\nfrom sunpy.time impo... | diff --git a/sunpy/net/jsoc/jsoc.py b/sunpy/net/jsoc/jsoc.py
index 494e2f3e311..0c39fbf6414 100644
--- a/sunpy/net/jsoc/jsoc.py
+++ b/sunpy/net/jsoc/jsoc.py
@@ -423,8 +423,8 @@ def get_request(self, requestIDs, path=None, overwrite=False, progress=True,
else:
#Make Results think it has finished.
... |
open-telemetry__opentelemetry-python-contrib-1515 | Add readthedocs documentation for remoulade instrumentation
Part of [1491](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1491)
| [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/docs/instrumentation/remoulade/remoulade.rst b/docs/instrumentation/remoulade/remoulade.rst
new file mode 100644
index 0000000000..bc5a7da42c
--- /dev/null
+++ b/docs/instrumentation/remoulade/remoulade.rst
@@ -0,0 +1,7 @@
+.. include:: ../../../instrumentation/opentelemetry-instrumentation-remoulade/READM... |
frappe__frappe-23585 | Route History shouldn‘t be editable
Editing or adding a new Route History:


… shouldn’t be possible, not even for th... | [
{
"content": "# Copyright (c) 2022, Frappe Technologies and contributors\n# License: MIT. See LICENSE\n\nimport frappe\nfrom frappe.deferred_insert import deferred_insert as _deferred_insert\nfrom frappe.model.document import Document\n\n\nclass RouteHistory(Document):\n\t# begin: auto-generated types\n\t# This... | [
{
"content": "# Copyright (c) 2022, Frappe Technologies and contributors\n# License: MIT. See LICENSE\n\nimport frappe\nfrom frappe.deferred_insert import deferred_insert as _deferred_insert\nfrom frappe.model.document import Document\n\n\nclass RouteHistory(Document):\n\t# begin: auto-generated types\n\t# This... | diff --git a/frappe/desk/doctype/route_history/route_history.json b/frappe/desk/doctype/route_history/route_history.json
index a5d73fc360d2..0b96277431da 100644
--- a/frappe/desk/doctype/route_history/route_history.json
+++ b/frappe/desk/doctype/route_history/route_history.json
@@ -1,5 +1,6 @@
{
"actions": [],
+ "al... |
akvo__akvo-rsr-2158 | Improve IATI export
## Test plan
Before starting with testing, make sure to perform two one-time actions:
- The `iati_export` cron job is running (done on Test and UAT)
- See running cron jobs by running: `manage.py crontab show`;
- The `perform_iati_checks` management command has been run (done on Test and UAT).
-... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module. \n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\nimport re... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module. \n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\nimport re... | diff --git a/akvo/rsr/feeds.py b/akvo/rsr/feeds.py
index bc7e5802c2..4d95fde643 100644
--- a/akvo/rsr/feeds.py
+++ b/akvo/rsr/feeds.py
@@ -227,7 +227,7 @@ def description(self, obj):
def items(self, obj):
# Limited to 25 items to prevent gateway timeouts.
- return obj.published_projects().all_upd... |
kubeflow__pipelines-5054 | TypeErro occurs in gcp/automl/create_dataset_for_tables component
### What steps did you take:
[A clear and concise description of what the bug is.]
[gcp/automl/create_dataset_for_tables component](https://github.com/kubeflow/pipelines/tree/master/components/gcp/automl/create_dataset_for_tables)'s `create_time` out... | [
{
"content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/components/gcp/automl/create_dataset_for_tables/component.py b/components/gcp/automl/create_dataset_for_tables/component.py
index 9239e780b15..968a8ad55d0 100644
--- a/components/gcp/automl/create_dataset_for_tables/component.py
+++ b/components/gcp/automl/create_dataset_for_tables/component.py
@@ -51,7 +5... |
streamlink__streamlink-4628 | plugins.twitcasting: Writes JSON into video files when it shouldn't
### Checklist
- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the... | [
{
"content": "\"\"\"\n$description Global live broadcasting and live broadcast archiving social platform.\n$url twitcasting.tv\n$type live\n\"\"\"\n\nimport hashlib\nimport logging\nimport re\n\nfrom streamlink.buffers import RingBuffer\nfrom streamlink.plugin import Plugin, PluginArgument, PluginArguments, Plu... | [
{
"content": "\"\"\"\n$description Global live broadcasting and live broadcast archiving social platform.\n$url twitcasting.tv\n$type live\n\"\"\"\n\nimport hashlib\nimport logging\nimport re\n\nfrom streamlink.buffers import RingBuffer\nfrom streamlink.plugin import Plugin, PluginArgument, PluginArguments, Plu... | diff --git a/src/streamlink/plugins/twitcasting.py b/src/streamlink/plugins/twitcasting.py
index e2f8fb097e9..206845d4062 100644
--- a/src/streamlink/plugins/twitcasting.py
+++ b/src/streamlink/plugins/twitcasting.py
@@ -104,7 +104,7 @@ def on_close(self, *args, **kwargs):
def on_data(self, wsapp, data, data_typ... |
huggingface__diffusers-6012 | logging.remove_handler() has a faulty assertion, doesn't allow registered handlers to be removed
### Describe the bug
in `utils/logging.py` there the function remove_handler seems to have a faulty assertion in it.
```py
def add_handler(handler: logging.Handler) -> None:
"""adds a handler to the HuggingFace ... | [
{
"content": "# coding=utf-8\n# Copyright 2023 Optuna, Hugging Face\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# Un... | [
{
"content": "# coding=utf-8\n# Copyright 2023 Optuna, Hugging Face\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# Un... | diff --git a/src/diffusers/utils/logging.py b/src/diffusers/utils/logging.py
index 6050f314c008..7945db333cab 100644
--- a/src/diffusers/utils/logging.py
+++ b/src/diffusers/utils/logging.py
@@ -213,7 +213,7 @@ def remove_handler(handler: logging.Handler) -> None:
_configure_library_root_logger()
- assert h... |
e2nIEE__pandapower-2106 | [bug] Pandapower interferes with matplotlib savefig
### Bug report checklis
- [X] Searched the [issues page](https://github.com/e2nIEE/pandapower/issues) for similar reports
- [X] Read the relevant sections of the [documentation](https://pandapower.readthedocs.io/en/latest/about.html)
- [X] Browse the [tutorials](ht... | [
{
"content": "from pandapower.plotting.collections import *\nfrom pandapower.plotting.colormaps import *\nfrom pandapower.plotting.generic_geodata import *\nfrom pandapower.plotting.powerflow_results import *\nfrom pandapower.plotting.simple_plot import *\nfrom pandapower.plotting.plotly import *\nfrom pandapow... | [
{
"content": "from pandapower.plotting.collections import *\nfrom pandapower.plotting.colormaps import *\nfrom pandapower.plotting.generic_geodata import *\nfrom pandapower.plotting.powerflow_results import *\nfrom pandapower.plotting.simple_plot import *\nfrom pandapower.plotting.plotly import *\nfrom pandapow... | diff --git a/pandapower/plotting/__init__.py b/pandapower/plotting/__init__.py
index 8b71f2bea..11a5090a4 100644
--- a/pandapower/plotting/__init__.py
+++ b/pandapower/plotting/__init__.py
@@ -16,7 +16,7 @@
class GC(GraphicsContextBase):
def __init__(self):
super().__init__()
- sel... |
gammapy__gammapy-3099 | Error in executing `FluxPoints.to_sed_type()`
**Gammapy version**
Present dev
**Bug description**
Calling `FluxPoints.to_sed_type()` returns an error
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<... | [
{
"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport logging\nimport numpy as np\nfrom astropy import units as u\nfrom astropy.io.registry import IORegistryError\nfrom astropy.table import Table, vstack\nfrom gammapy.datasets import Datasets\nfrom gammapy.modeling.models import ... | [
{
"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport logging\nimport numpy as np\nfrom astropy import units as u\nfrom astropy.io.registry import IORegistryError\nfrom astropy.table import Table, vstack\nfrom gammapy.datasets import Datasets\nfrom gammapy.modeling.models import ... | diff --git a/gammapy/estimators/flux_point.py b/gammapy/estimators/flux_point.py
index 62d1e45e36..685957d4bc 100644
--- a/gammapy/estimators/flux_point.py
+++ b/gammapy/estimators/flux_point.py
@@ -435,7 +435,7 @@ def _dnde_from_flux(flux, model, e_ref, e_min, e_max, pwl_approx):
amplitude=dnde_model,... |
xorbitsai__inference-386 | QUESTION: Upper bound for the max_token argument
I noticed that there is an upper bound of 2048 tokens placed on the max_token argument in [xinference/core/restful_api.py](https://github.com/xorbitsai/inference/blob/67a06b40ef4ec36448e504fd23526043719211bc/xinference/core/restful_api.py#L39-L41)
https://github.com/x... | [
{
"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/core/restful_api.py b/xinference/core/restful_api.py
index e2231d53f1..61908cc603 100644
--- a/xinference/core/restful_api.py
+++ b/xinference/core/restful_api.py
@@ -37,7 +37,7 @@
logger = logging.getLogger(__name__)
max_tokens_field = Field(
- default=128, ge=1, le=2048, description="Th... |
Textualize__rich-211 | [BUG] Deprecation warning due to invalid escape sequences
**Describe the bug**
Deprecation warnings are raised due to invalid escape sequences. This can be fixed by using raw strings or escaping the literals. pyupgrade also helps in automatic conversion : https://github.com/asottile/pyupgrade/
**To Reproduce**
... | [
{
"content": "import re\nfrom typing import Iterable, List, NamedTuple, Optional, Tuple, Union\n\nfrom .errors import MarkupError\nfrom .style import Style\nfrom .text import Span, Text\nfrom ._emoji_replace import _emoji_replace\n\n\nRE_TAGS = re.compile(\n r\"\"\"\n(\\\\\\[)|\n\\[([a-z#\\/].*?)\\]\n\"\"\",... | [
{
"content": "import re\nfrom typing import Iterable, List, NamedTuple, Optional, Tuple, Union\n\nfrom .errors import MarkupError\nfrom .style import Style\nfrom .text import Span, Text\nfrom ._emoji_replace import _emoji_replace\n\n\nRE_TAGS = re.compile(\n r\"\"\"\n(\\\\\\[)|\n\\[([a-z#\\/].*?)\\]\n\"\"\",... | diff --git a/rich/markup.py b/rich/markup.py
index fb6f45c61..9af1cd9dd 100644
--- a/rich/markup.py
+++ b/rich/markup.py
@@ -47,7 +47,7 @@ def escape(markup: str) -> str:
Returns:
str: Markup with square brackets escaped.
"""
- return markup.replace("[", "\[")
+ return markup.replace("[", r"\["... |
pytorch__ignite-2852 | [CI] Doc test is failing
We have somehow doctest ci job failing right now. The failure happens with the following code snippet from our docs:
- https://pytorch.org/ignite/generated/ignite.contrib.metrics.PrecisionRecallCurve.html
```
**********************************************************************
File ".... | [
{
"content": "from typing import Any, Callable, cast, Tuple, Union\n\nimport torch\n\nimport ignite.distributed as idist\nfrom ignite.exceptions import NotComputableError\nfrom ignite.metrics import EpochMetric\n\n\ndef precision_recall_curve_compute_fn(y_preds: torch.Tensor, y_targets: torch.Tensor) -> Tuple[A... | [
{
"content": "from typing import Any, Callable, cast, Tuple, Union\n\nimport torch\n\nimport ignite.distributed as idist\nfrom ignite.exceptions import NotComputableError\nfrom ignite.metrics import EpochMetric\n\n\ndef precision_recall_curve_compute_fn(y_preds: torch.Tensor, y_targets: torch.Tensor) -> Tuple[A... | diff --git a/ignite/contrib/metrics/precision_recall_curve.py b/ignite/contrib/metrics/precision_recall_curve.py
index 3126c27ea2ba..d45a31fe5032 100644
--- a/ignite/contrib/metrics/precision_recall_curve.py
+++ b/ignite/contrib/metrics/precision_recall_curve.py
@@ -65,9 +65,9 @@ def sigmoid_output_transform(output):
... |
python-pillow__Pillow-1686 | Repeated looping over image stack shows last frame in place of first frame
When looping through the frames in an animation or TIFF stack with `ImageSequence.Iterator`, the frame pointer is not reset for the first frame. Consequently, if the loop is run through a second time the final frame is shown again instead of the... | [
{
"content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# sequence support classes\n#\n# history:\n# 1997-02-20 fl Created\n#\n# Copyright (c) 1997 by Secret Labs AB.\n# Copyright (c) 1997 by Fredrik Lundh.\n#\n# See the README file for information on usage and redistribution.\n#\n\n##\n\n\nclass Iterato... | [
{
"content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# sequence support classes\n#\n# history:\n# 1997-02-20 fl Created\n#\n# Copyright (c) 1997 by Secret Labs AB.\n# Copyright (c) 1997 by Fredrik Lundh.\n#\n# See the README file for information on usage and redistribution.\n#\n\n##\n\n\nclass Iterato... | diff --git a/PIL/ImageSequence.py b/PIL/ImageSequence.py
index 256bcbedb35..a979b8865a3 100644
--- a/PIL/ImageSequence.py
+++ b/PIL/ImageSequence.py
@@ -35,8 +35,7 @@ def __init__(self, im):
def __getitem__(self, ix):
try:
- if ix:
- self.im.seek(ix)
+ self.im.seek(i... |
OpenMined__PySyft-2278 | Splitting up serde broke serialization for multipointers
**Describe the bug**
```
@staticmethod
def simplify(tensor: "MultiPointerTensor") -> tuple:
"""
This function takes the attributes of a MultiPointerTensor and saves them in a tuple
Args:
tensor (MultiPointerTenso... | [
{
"content": "import torch\nfrom typing import List\nfrom typing import Union\n\nimport syft as sy\nfrom syft.frameworks.torch.tensors.interpreters.abstract import AbstractTensor\nfrom syft.frameworks.torch.tensors.interpreters import AdditiveSharingTensor\nfrom syft.workers import BaseWorker\nfrom syft.framewo... | [
{
"content": "import torch\nfrom typing import List\nfrom typing import Union\n\nimport syft as sy\nfrom syft.frameworks.torch.tensors.interpreters.abstract import AbstractTensor\nfrom syft.frameworks.torch.tensors.interpreters import AdditiveSharingTensor\nfrom syft.workers import BaseWorker\nfrom syft.framewo... | diff --git a/Makefile b/Makefile
index 7c24dc74d6e..d13f7ae12ec 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@ test: venv
(. venv/bin/activate; \
python setup.py install; \
venv/bin/coverage run setup.py test;\
- venv/bin/coverage report -m --fail-under 100;\
+ venv/bin/coverage report -m --fail-under... |
learningequality__kolibri-1464 | hide not-recent learners on 'coach - recent activity' tab
See similar issue for channels: https://github.com/learningequality/kolibri/pull/1406
Now we need to do the same thing for when you drill deeper and reach the learners list. For example here, we're showing all learners regardless of whether or not they've had... | [
{
"content": "from dateutil.parser import parse\n\nfrom django.db.models import Case, Count, F, IntegerField, Sum, Value as V, When\nfrom django.db.models.functions import Coalesce\nfrom kolibri.auth.models import FacilityUser\nfrom kolibri.content.models import ContentNode\nfrom kolibri.logger.models import Co... | [
{
"content": "from dateutil.parser import parse\n\nfrom django.db.models import Case, Count, F, IntegerField, Sum, Value as V, When\nfrom django.db.models.functions import Coalesce\nfrom kolibri.auth.models import FacilityUser\nfrom kolibri.content.models import ContentNode\nfrom kolibri.logger.models import Co... | diff --git a/kolibri/plugins/coach/assets/src/reportConstants.js b/kolibri/plugins/coach/assets/src/reportConstants.js
index 0cb82afeefe..69f55344c94 100644
--- a/kolibri/plugins/coach/assets/src/reportConstants.js
+++ b/kolibri/plugins/coach/assets/src/reportConstants.js
@@ -24,6 +24,7 @@ const TableColumns = {
EXE... |
googleapis__google-cloud-python-5375 | Updated SubscriberClient docs
`subscribe_experimental` was promoted to `subscribe` but the docs for the `SubscriberClient` still suggested using `subscribe_experimental`
| [
{
"content": "# Copyright 2017, Google LLC All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | [
{
"content": "# Copyright 2017, Google LLC All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | diff --git a/pubsub/google/cloud/pubsub_v1/subscriber/client.py b/pubsub/google/cloud/pubsub_v1/subscriber/client.py
index b567ed6cb9f2..c4906bbbeb21 100644
--- a/pubsub/google/cloud/pubsub_v1/subscriber/client.py
+++ b/pubsub/google/cloud/pubsub_v1/subscriber/client.py
@@ -135,7 +135,7 @@ def callback(message):
... |
liqd__a4-product-655 | Error 500 when trying to edit landing page
I need to add a partner to the landing page on beteiligung.in productive soon. Currently, I can’t edit the page (500 error).
https://www.beteiligung.in/admin/pages/3/edit/
Could you look into it?
| [
{
"content": "\"\"\"Django settings for Beteiligung.in.\"\"\"\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nimport os\n\nfrom django.utils.translation import ugettext_lazy as _\n\nCONFIG_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nPROJECT_DIR = os.path.dirnam... | [
{
"content": "\"\"\"Django settings for Beteiligung.in.\"\"\"\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nimport os\n\nfrom django.utils.translation import ugettext_lazy as _\n\nCONFIG_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nPROJECT_DIR = os.path.dirnam... | diff --git a/liqd_product/config/settings/base.py b/liqd_product/config/settings/base.py
index 83ee5957d..42e41e75f 100644
--- a/liqd_product/config/settings/base.py
+++ b/liqd_product/config/settings/base.py
@@ -444,3 +444,9 @@
# The default language is used for emails and strings
# that are stored translated to the... |
bids-standard__pybids-467 | Improved reprs for SQLAlchemy model objects
This should help provide more useful exception messages for obscure SQLAlchemy error conditions. And just be generally more readable in a REPL.
Related to #465.
Including a .json sidecar for events.tsv files causes a SQLAlchemy Tag conflict
We have an fMRIPrep user experie... | [
{
"content": "from sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.ext.associationproxy import association_proxy\nfrom sqlalchemy.orm.collections import attribute_mapped_collection\nfrom sqlalchemy import (Column, Integer, String, Boolean, ForeignKey, Table)\nfrom sqlalchemy.orm import recon... | [
{
"content": "from sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.ext.associationproxy import association_proxy\nfrom sqlalchemy.orm.collections import attribute_mapped_collection\nfrom sqlalchemy import (Column, Integer, String, Boolean, ForeignKey, Table)\nfrom sqlalchemy.orm import recon... | diff --git a/bids/layout/models.py b/bids/layout/models.py
index 41f49596e..997e7a63d 100644
--- a/bids/layout/models.py
+++ b/bids/layout/models.py
@@ -491,6 +491,10 @@ def __init__(self, file, entity, value, dtype=None):
self._dtype = dtype
self._init_on_load()
+
+ def __repr__(self):
+ ... |
uccser__cs-unplugged-537 | Center navbar menu text on mobile devices

Always display curriculum areas for learning outcomes on a new line
This prevents a confusing interface, like so:
 should define their dependencies as extra.
Currently this is only done as test requires but actual users won't have enforced minimum requirements.
Once this is done a user can simpl... | [
{
"content": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\n\n\ndef read(*paths):\n \"\"\"\n Build a file path from paths and return the contents.\n \"\"\"\n with open(os.path.join(*paths), 'r') as f:\n return... | [
{
"content": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\n\n\ndef read(*paths):\n \"\"\"\n Build a file path from paths and return the contents.\n \"\"\"\n with open(os.path.join(*paths), 'r') as f:\n return... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4ac200cd..3e967fc7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,15 @@ This release is not backwards compatible. For easy migration best upgrade first
* Add support for Django REST framework 3.10.
* Add code from ErrorDetail into the JSON:API error object
+... |
pydantic__pydantic-3197 | <Model>.schema() method handles Enum and IntEnum default field resolution differently
### 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 s... | [
{
"content": "import re\nimport warnings\nfrom collections import defaultdict\nfrom datetime import date, datetime, time, timedelta\nfrom decimal import Decimal\nfrom enum import Enum\nfrom ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network\nfrom pathlib import Pat... | [
{
"content": "import re\nimport warnings\nfrom collections import defaultdict\nfrom datetime import date, datetime, time, timedelta\nfrom decimal import Decimal\nfrom enum import Enum\nfrom ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network\nfrom pathlib import Pat... | diff --git a/changes/3190-joaommartins.md b/changes/3190-joaommartins.md
new file mode 100644
index 00000000000..74af4f13a4e
--- /dev/null
+++ b/changes/3190-joaommartins.md
@@ -0,0 +1 @@
+Always use `Enum` value as default in generated JSON schema.
\ No newline at end of file
diff --git a/pydantic/schema.py b/pydantic... |
instadeepai__Mava-626 | [TEST] Jax Datasets
### What do you want to test?
Jax dataset components
### Outline of test structure
* Unit tests
* Test components and hooks
### Definition of done
Passing checks, cover all hooks, edge cases considered
### Mandatory checklist before making a PR
* [ ] The success criteria laid down in “... | [
{
"content": "# python3\n# Copyright 2021 InstaDeep Ltd. 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": "# python3\n# Copyright 2021 InstaDeep Ltd. 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/mava/components/jax/building/datasets.py b/mava/components/jax/building/datasets.py
index e60804f18..f5d038a84 100644
--- a/mava/components/jax/building/datasets.py
+++ b/mava/components/jax/building/datasets.py
@@ -98,7 +98,7 @@ def on_building_trainer_dataset(self, builder: SystemBuilder) -> None:
... |
conan-io__conan-4324 | tools.environment_append raises if tries to unset variable which was never set
after #4224, I may use the following code, for instance, to ensure variable is not set:
```
with environment_append({'CONAN_BASH_PATH': None}):
pass
```
however, it raises if `CONAN_BASH_PATH` is not set (prior to the environment_ap... | [
{
"content": "import os\nimport sys\nfrom contextlib import contextmanager\n\nfrom conans.client.run_environment import RunEnvironment\nfrom conans.client.tools.files import _path_equals, which\nfrom conans.errors import ConanException\n\n\n@contextmanager\ndef pythonpath(conanfile):\n python_path = conanfil... | [
{
"content": "import os\nimport sys\nfrom contextlib import contextmanager\n\nfrom conans.client.run_environment import RunEnvironment\nfrom conans.client.tools.files import _path_equals, which\nfrom conans.errors import ConanException\n\n\n@contextmanager\ndef pythonpath(conanfile):\n python_path = conanfil... | diff --git a/conans/client/tools/env.py b/conans/client/tools/env.py
index 079f549fd12..2584065ddbb 100644
--- a/conans/client/tools/env.py
+++ b/conans/client/tools/env.py
@@ -54,7 +54,7 @@ def environment_append(env_vars):
old_env = dict(os.environ)
os.environ.update(env_vars)
for var in un... |
translate__pootle-4882 | Make `pootle webpack` not require system checks
`pootle webpack` fails if eg the db is not set up/correctly. It would be helpful if it didnt
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport os\nos.... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport os\nos.... | diff --git a/pootle/apps/pootle_app/management/commands/webpack.py b/pootle/apps/pootle_app/management/commands/webpack.py
index fc5d602f8f8..1f6ce4b774c 100644
--- a/pootle/apps/pootle_app/management/commands/webpack.py
+++ b/pootle/apps/pootle_app/management/commands/webpack.py
@@ -19,6 +19,7 @@
class Command(Base... |
encode__django-rest-framework-1836 | Adding the `DjangoFilterBackend` filter changes queryset ordering.
Tried posting on StackOverflow with no reply (http://stackoverflow.com/questions/21848095/adding-filtering-changes-ordering) => decided to open bug here
I have a ModelViewSet that I want to add filtering to. My simple model looks like
```
class Articl... | [
{
"content": "\"\"\"\nProvides generic filtering backends that can be used to filter the results\nreturned by list views.\n\"\"\"\nfrom __future__ import unicode_literals\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.db import models\nfrom django.utils import six\nfrom rest_framework.com... | [
{
"content": "\"\"\"\nProvides generic filtering backends that can be used to filter the results\nreturned by list views.\n\"\"\"\nfrom __future__ import unicode_literals\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.db import models\nfrom django.utils import six\nfrom rest_framework.com... | diff --git a/rest_framework/filters.py b/rest_framework/filters.py
index e20800130d..c580f9351b 100644
--- a/rest_framework/filters.py
+++ b/rest_framework/filters.py
@@ -56,7 +56,6 @@ class AutoFilterSet(self.default_filter_set):
class Meta:
model = queryset.model
... |
codespell-project__codespell-3015 | ruff is causing PR checks to fail
PR checks are failing on "Run make check" due to this error:
```
ruff .
Error: codespell_lib/_codespell.py:194:17: PLE1300 Unsupported format character '}'
make: *** [Makefile:42: ruff] Error 1
Error: Process completed with exit code 2.
```
Recently, the ruff version increas... | [
{
"content": "#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; version 2 of the License.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARR... | [
{
"content": "#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; version 2 of the License.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARR... | diff --git a/codespell_lib/_codespell.py b/codespell_lib/_codespell.py
index 1fe8c6306c..e7d2236b78 100644
--- a/codespell_lib/_codespell.py
+++ b/codespell_lib/_codespell.py
@@ -190,10 +190,7 @@ def __str__(self) -> str:
keys.sort()
return "\n".join(
- [
- "{0}{1:{width}}"... |
urllib3__urllib3-1912 | Add additional documentation for HTTPSConnection parameters
I'm not sure if this is intentional or not, but the reference doc for connection objects ( https://urllib3.readthedocs.io/en/latest/reference/index.html#urllib3.connection.VerifiedHTTPSConnection ) seems a little bit spare on details about the parameters accep... | [
{
"content": "from __future__ import absolute_import\nimport re\nimport datetime\nimport logging\nimport os\nimport socket\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport warnings\nfrom .packages import six\nfrom .packages.six.moves.http_client import HTTPConnection as _HTTPConnection... | [
{
"content": "from __future__ import absolute_import\nimport re\nimport datetime\nimport logging\nimport os\nimport socket\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport warnings\nfrom .packages import six\nfrom .packages.six.moves.http_client import HTTPConnection as _HTTPConnection... | diff --git a/docs/advanced-usage.rst b/docs/advanced-usage.rst
index e36287a064..1a9b007b43 100644
--- a/docs/advanced-usage.rst
+++ b/docs/advanced-usage.rst
@@ -172,6 +172,45 @@ verified with that bundle will succeed. It's recommended to use a separate
:class:`~poolmanager.PoolManager` to make requests to URLs that ... |
keras-team__keras-1158 | problem with K.common._FLOATX
I tried to run:
```
a = K.random_normal((100, 200))
```
and I got the error:
```
/home/eders/python/Theano/theano/sandbox/rng_mrg.pyc in get_substream_rstates(self, n_streams, dtype, inc_rstate)
1167
1168 """
-> 1169 assert isinstance(dtype, str)
1170 a... | [
{
"content": "import numpy as np\n\n# the type of float to use throughout the session.\n_FLOATX = 'float32'\n_EPSILON = 10e-8\n\n\ndef epsilon():\n return _EPSILON\n\n\ndef set_epsilon(e):\n global _EPSILON\n _EPSILON = e\n\n\ndef floatx():\n return _FLOATX\n\n\ndef set_floatx(floatx):\n global _... | [
{
"content": "import numpy as np\n\n# the type of float to use throughout the session.\n_FLOATX = 'float32'\n_EPSILON = 10e-8\n\n\ndef epsilon():\n return _EPSILON\n\n\ndef set_epsilon(e):\n global _EPSILON\n _EPSILON = e\n\n\ndef floatx():\n return _FLOATX\n\n\ndef set_floatx(floatx):\n global _... | diff --git a/keras/backend/common.py b/keras/backend/common.py
index 1a84aaf37c41..86284713e297 100644
--- a/keras/backend/common.py
+++ b/keras/backend/common.py
@@ -22,6 +22,8 @@ def set_floatx(floatx):
global _FLOATX
if floatx not in {'float32', 'float64'}:
raise Exception('Unknown floatx type: ' ... |
apache__airflow-23674 | PythonSensor is not considering mode='reschedule', instead marking task UP_FOR_RETRY
### Apache Airflow version
2.3.0 (latest released)
### What happened
A PythonSensor that works on versions <2.3.0 in mode reschedule is now marking the task as `UP_FOR_RETRY` instead.
Log says:
```
[2022-05-02, 15:48:23 UTC] {p... | [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | diff --git a/airflow/sensors/base.py b/airflow/sensors/base.py
index 5cbe009c82b95..590b48f04bc73 100644
--- a/airflow/sensors/base.py
+++ b/airflow/sensors/base.py
@@ -339,6 +339,10 @@ def reschedule(self):
"""Define mode rescheduled sensors."""
return self.mode == 'reschedule'
+ @classmethod
+ ... |
vispy__vispy-2592 | What's the status of GLFW?
I see there's a `glfw` backend, but in `setup.py` it is neither listed as a dependency nor defined as an extra. Is that an oversight or deliberately?
I'm packaging `vispy` for Fedora and with [glfw](https://pypi.org/project/glfw/) added as a dependency, I'm seeing `glfw` listed in the outp... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\"\"\"Vispy setup script.\n\nSteps to do a new release:\n\nPreparations:\n * Test on Windows, Linux, Mac\n * Make release notes\n * U... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\"\"\"Vispy setup script.\n\nSteps to do a new release:\n\nPreparations:\n * Test on Windows, Linux, Mac\n * Make release notes\n * U... | diff --git a/setup.py b/setup.py
index 65cd9febc..2b49960d9 100644
--- a/setup.py
+++ b/setup.py
@@ -106,6 +106,7 @@ def set_builtin(name, value):
'pyside': ['PySide'],
'pyside2': ['PySide2'],
'pyside6': ['PySide6'],
+ 'glfw': ['glfw'],
'sdl2': ['PySDL2'],
'wx': ['wxP... |
cocotb__cocotb-1470 | Documentation building: "WARNING: duplicate label"
With ``sphinx.ext.autosectionlabel`` (in use since https://github.com/cocotb/cocotb/commit/862012b3c01f90ea1fb715c206b4eb785119f964), we got quite some new "duplicate label" warnings.
To fix some of those warnings, we could set ``autosectionlabel_prefix_document = T... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# cocotb documentation build configuration file\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport datetime\nimport os\... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# cocotb documentation build configuration file\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport datetime\nimport os\... | diff --git a/documentation/source/building.rst b/documentation/source/building.rst
index 763b1c270d..5c5bbcb1a8 100644
--- a/documentation/source/building.rst
+++ b/documentation/source/building.rst
@@ -53,7 +53,7 @@ and
.. make:var:: WAVES
Set this to 1 to enable wave traces dump for the Aldec Riviera-PRO an... |
pymedusa__Medusa-9273 | IPT Provider error
Hello, it has been like a month since I am having this problem.
Medusa is unable to use IPTorrents to search and download, it always worked perfect until one day. I have double check the cookie values and they are an exact match.
Anyone can help me? here's the log with the error
2021-02-09 16:18... | [
{
"content": "# coding=utf-8\n\n\"\"\"Provider code for IPTorrents.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport re\n\nfrom medusa import tv\nfrom medusa.bs4_parser import BS4Parser\nfrom medusa.helper.common import convert_size\nfrom medusa.logger.adapters.style import BraceAdapte... | [
{
"content": "# coding=utf-8\n\n\"\"\"Provider code for IPTorrents.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport re\n\nfrom medusa import tv\nfrom medusa.bs4_parser import BS4Parser\nfrom medusa.helper.common import convert_size\nfrom medusa.logger.adapters.style import BraceAdapte... | diff --git a/medusa/providers/torrent/html/iptorrents.py b/medusa/providers/torrent/html/iptorrents.py
index 9f16a540b3..1751ea6783 100644
--- a/medusa/providers/torrent/html/iptorrents.py
+++ b/medusa/providers/torrent/html/iptorrents.py
@@ -42,6 +42,7 @@ def __init__(self):
self.cookies = ''
self.re... |
RedHatInsights__insights-core-2085 | Dmesg combiner always succeeds
The [Dmesg combiner has only optional dependencies](https://github.com/RedHatInsights/insights-core/blob/master/insights/combiners/dmesg.py#L51), which means it always succeeds. This is an anti-pattern.
| [
{
"content": "\"\"\"\nDmesg\n=====\n\nCombiner for Dmesg information. It uses the results of the following parsers (if they are present):\n:class:`insights.parsers.dmesg.DmesgLineList`,\n:class:`insights.parsers.dmesg_log.DmesgLog`\n\nTypical output of the ``/var/log/dmesg`` file is::\n\n[ 0.000000] Initiali... | [
{
"content": "\"\"\"\nDmesg\n=====\n\nCombiner for Dmesg information. It uses the results of the following parsers (if they are present):\n:class:`insights.parsers.dmesg.DmesgLineList`,\n:class:`insights.parsers.dmesg_log.DmesgLog`\n\nTypical output of the ``/var/log/dmesg`` file is::\n\n[ 0.000000] Initiali... | diff --git a/insights/combiners/dmesg.py b/insights/combiners/dmesg.py
index 671a26cb5d..8424bb552f 100644
--- a/insights/combiners/dmesg.py
+++ b/insights/combiners/dmesg.py
@@ -48,7 +48,7 @@
from insights.parsers.dmesg_log import DmesgLog
-@combiner(optional=[DmesgLineList, DmesgLog])
+@combiner([DmesgLineList, ... |
geopandas__geopandas-2398 | Drop Python 3.7
We should consider dropping support for Python 3.7. We are roughly following numpy model (#1457) and numpy itself is 3.8+ now. Same applies to pyproj, which requires 3.8 (and causes some macOS CI failures because of some conda issues).
I forgot about Python versions when doing #2358 and bumped only ... | [
{
"content": "#!/usr/bin/env/python\n\"\"\"Installation script\n\n\"\"\"\n\nimport os\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nimport versioneer\n\nLONG_DESCRIPTION = \"\"\"GeoPandas is a project to add support for geographic data to\n`pandas`_ obje... | [
{
"content": "#!/usr/bin/env/python\n\"\"\"Installation script\n\n\"\"\"\n\nimport os\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nimport versioneer\n\nLONG_DESCRIPTION = \"\"\"GeoPandas is a project to add support for geographic data to\n`pandas`_ obje... | diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 6e5e99e9c4..2a0da2bc23 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -17,8 +17,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-python@v2
+... |
ibis-project__ibis-7498 | bug: sqlite BLOB datatype not handled
### What happened?
I'm converting some old databases that had binary output as columns, and I am unable to work with these tables in ibis. I created this failing test to show the problem:
```
from __future__ import annotations
import sqlite3
import pandas as pd
import ... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nimport sqlalchemy as sa\nimport sqlalchemy.types as sat\nimport toolz\nfrom sqlalchemy.ext.compiler import compiles\n\nimport ibis.expr.datatypes as dt\nfrom ibis.backends.base.sql.alchemy.geospatial import geospatial_suppor... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nimport sqlalchemy as sa\nimport sqlalchemy.types as sat\nimport toolz\nfrom sqlalchemy.ext.compiler import compiles\n\nimport ibis.expr.datatypes as dt\nfrom ibis.backends.base.sql.alchemy.geospatial import geospatial_suppor... | diff --git a/ibis/backends/base/sql/alchemy/datatypes.py b/ibis/backends/base/sql/alchemy/datatypes.py
index 84e16ca49dfc..214a80956259 100644
--- a/ibis/backends/base/sql/alchemy/datatypes.py
+++ b/ibis/backends/base/sql/alchemy/datatypes.py
@@ -142,6 +142,7 @@ class Unknown(sa.Text):
sat.BOOLEAN: dt.Boolean,
... |
elastic__apm-agent-python-1064 | Add support for Django 3.2
Django 3.2 is slated for a release in April. Running the test suite, a few problems came up:
- [ ] App label needs to be a valid Python identifier, ours is not (renaming it from `elasticapm.contrib.django` to `elasticapm` should suffice)
Several test failures:
- [ ] `test_broken_500_... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | diff --git a/.ci/.jenkins_framework.yml b/.ci/.jenkins_framework.yml
index 95ba9afd9..db375c5bc 100644
--- a/.ci/.jenkins_framework.yml
+++ b/.ci/.jenkins_framework.yml
@@ -5,6 +5,7 @@ FRAMEWORK:
- django-1.11
- django-2.0
- django-3.1
+ - django-3.2
- flask-0.12
- flask-1.1
- opentracing-newest
diff... |
elastic__apm-agent-python-1436 | [ci] tests.config.tests.test_config_all_upper_case failing
It appears that the `tests.config.tests.test_config_all_upper_case` test is failing [across a number of different platforms on the master branch](https://apm-ci.elastic.co/job/apm-agent-python/job/apm-agent-python-mbp/job/master/593/testReport/):
<img width="6... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c... | diff --git a/elasticapm/conf/__init__.py b/elasticapm/conf/__init__.py
index 65de90dca..660539b6e 100644
--- a/elasticapm/conf/__init__.py
+++ b/elasticapm/conf/__init__.py
@@ -594,7 +594,7 @@ class Config(_ConfigBase):
type=int,
)
exit_span_min_duration = _ConfigValue(
- "exit_span_min_durati... |
conda__conda-build-570 | AppVeyor: AttributeError: 'module' object has no attribute 'get_pid_list
https://ci.appveyor.com/project/mpi4py/mpi4py/build/2.0.0a0-17/job/965h1pw9k7476768#L1187
conda info:
https://ci.appveyor.com/project/mpi4py/mpi4py/build/2.0.0a0-17/job/965h1pw9k7476768#L1076
Please note a few lines above I ran:
`C:\Anaconda\Scr... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport sys\nimport shutil\nfrom os.path import dirname, isdir, isfile, join, exists\n\nimport conda.config as cc\nfrom conda.compat import iteritems\n\nfrom conda_build.config import config\nfrom conda_build import envi... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport sys\nimport shutil\nfrom os.path import dirname, isdir, isfile, join, exists\n\nimport conda.config as cc\nfrom conda.compat import iteritems\n\nfrom conda_build.config import config\nfrom conda_build import envi... | diff --git a/conda_build/windows.py b/conda_build/windows.py
index 31621b82da..74592b709a 100644
--- a/conda_build/windows.py
+++ b/conda_build/windows.py
@@ -89,7 +89,7 @@ def msvc_env_cmd():
def kill_processes():
if psutil is None:
return
- for n in psutil.get_pid_list():
+ for n in psutil.pids()... |
ibis-project__ibis-3630 | bug(duckdb): duckdb backend should add in CAST for some bind parameters
DuckDB casts bind parameters `?` to strings which leads to binder errors with some queries
If we have a small tpch dataset:
```python
import duckdb
con = duckdb.connect("tpch.ddb")
con.execute("CALL dbgen(sf=0.1)")
import ibis
con = ib... | [
{
"content": "import collections\nimport operator\n\nimport numpy as np\nimport sqlalchemy as sa\n\nimport ibis.expr.datatypes as dt\nimport ibis.expr.operations as ops\nfrom ibis.backends.base.sql.alchemy import to_sqla_type, unary\n\nfrom ..base.sql.alchemy.registry import _geospatial_functions, _table_column... | [
{
"content": "import collections\nimport operator\n\nimport numpy as np\nimport sqlalchemy as sa\n\nimport ibis.expr.datatypes as dt\nimport ibis.expr.operations as ops\nfrom ibis.backends.base.sql.alchemy import to_sqla_type, unary\n\nfrom ..base.sql.alchemy.registry import _geospatial_functions, _table_column... | diff --git a/ibis/backends/duckdb/registry.py b/ibis/backends/duckdb/registry.py
index d6b5f4032785..a3cbbaf4edbb 100644
--- a/ibis/backends/duckdb/registry.py
+++ b/ibis/backends/duckdb/registry.py
@@ -99,7 +99,7 @@ def _literal(_, expr):
f"`{type(value).__name__}` isn't yet supported with the duckdb "
... |
ansible__molecule-3446 | remnants of ansible-lint in molecule docs
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Do not report bugs before reproducing them with the code of the main branch! -->
<!--- Please also check https://molecule.readthedocs.io/en/latest/faq.html --->
<!--- Please use https://groups.goo... | [
{
"content": "# Copyright (c) 2015-2018 Cisco Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# right... | [
{
"content": "# Copyright (c) 2015-2018 Cisco Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# right... | diff --git a/docs/configuration.rst b/docs/configuration.rst
index dfa22f6c87..511a3e8344 100644
--- a/docs/configuration.rst
+++ b/docs/configuration.rst
@@ -14,7 +14,8 @@ In order to help Ansible find used modules and roles, molecule will perform
a prerun set of actions. These involve installing dependencies from
`... |
scipy__scipy-9996 | lsq_linear hangs/infinite loop with 'trf' method
<!--
Thank you for taking the time to report a SciPy issue.
Please describe the issue in detail, and for bug reports
fill in the fields below. You can delete the sections that
don't apply to your issue. You can view the final output
by clicking the preview button ... | [
{
"content": "\"\"\"Functions used by least-squares algorithms.\"\"\"\nfrom __future__ import division, print_function, absolute_import\n\nfrom math import copysign\n\nimport numpy as np\nfrom numpy.linalg import norm\n\nfrom scipy.linalg import cho_factor, cho_solve, LinAlgError\nfrom scipy.sparse import isspa... | [
{
"content": "\"\"\"Functions used by least-squares algorithms.\"\"\"\nfrom __future__ import division, print_function, absolute_import\n\nfrom math import copysign\n\nimport numpy as np\nfrom numpy.linalg import norm\n\nfrom scipy.linalg import cho_factor, cho_solve, LinAlgError\nfrom scipy.sparse import isspa... | diff --git a/scipy/optimize/_lsq/common.py b/scipy/optimize/_lsq/common.py
index 65444646ef4e..3bde207034a0 100644
--- a/scipy/optimize/_lsq/common.py
+++ b/scipy/optimize/_lsq/common.py
@@ -319,7 +319,7 @@ def minimize_quadratic_1d(a, b, lb, ub, c=0):
if lb < extremum < ub:
t.append(extremum)
... |
iterative__dvc-562 | dvc repro --force does not work
It looks like the flag was just ignored.
| [
{
"content": "import os\nimport stat\nimport networkx as nx\n\nimport dvc.cloud.base as cloud\n\nfrom dvc.logger import Logger\nfrom dvc.exceptions import DvcException\nfrom dvc.stage import Stage, Output\nfrom dvc.config import Config\nfrom dvc.state import State\nfrom dvc.lock import Lock\nfrom dvc.scm import... | [
{
"content": "import os\nimport stat\nimport networkx as nx\n\nimport dvc.cloud.base as cloud\n\nfrom dvc.logger import Logger\nfrom dvc.exceptions import DvcException\nfrom dvc.stage import Stage, Output\nfrom dvc.config import Config\nfrom dvc.state import State\nfrom dvc.lock import Lock\nfrom dvc.scm import... | diff --git a/.appveyor.yml b/.appveyor.yml
index ec4f0c6e3e..c00ffffaed 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -41,14 +41,11 @@ environment:
# PYTHON_ARCH: "64"
install:
- - cinst graphviz
- cinst wget
- cinst awscli
- cinst gsutil
- cinst openssl.light
- - wget --no-check-certificate ... |
pypa__pip-10583 | `vendoring` is broken, due to a cyclic dependency during license fetching
Well, the lack of maintainance of the license fetching logic in `vendoring` has come to bite us. :)
`flit` recently established a cyclic dependency, by depending on `tomli`: see https://github.com/takluyver/flit/issues/451 and https://flit.rea... | [
{
"content": "\"\"\"Automation using nox.\n\"\"\"\n\nimport glob\nimport os\nimport shutil\nimport sys\nfrom pathlib import Path\nfrom typing import Iterator, List, Tuple\n\nimport nox\n\n# fmt: off\nsys.path.append(\".\")\nfrom tools import release # isort:skip # noqa\nsys.path.pop()\n# fmt: on\n\nnox.option... | [
{
"content": "\"\"\"Automation using nox.\n\"\"\"\n\nimport glob\nimport os\nimport shutil\nimport sys\nfrom pathlib import Path\nfrom typing import Iterator, List, Tuple\n\nimport nox\n\n# fmt: off\nsys.path.append(\".\")\nfrom tools import release # isort:skip # noqa\nsys.path.pop()\n# fmt: on\n\nnox.option... | diff --git a/noxfile.py b/noxfile.py
index df42af8b8f5..5b5a66d5307 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -171,7 +171,7 @@ def lint(session: nox.Session) -> None:
@nox.session
def vendoring(session: nox.Session) -> None:
- session.install("vendoring~=1.0.0")
+ session.install("vendoring~=1.2.0")
... |
iterative__dvc-4826 | Unexpected error on `dvc diff`
## Bug Report
When running `dvc diff staging`, I got a KeyError, here is the traceback:
```
Traceback (most recent call last):
File "/home/ubuntu/.local/share/virtualenvs/speech-api-EI_ft4iY/lib/python3.7/site-packages/dvc/main.py", line 76, in main
ret = cmd.run()
File "/ho... | [
{
"content": "import logging\nimport os\n\nfrom dvc.repo import locked\nfrom dvc.tree.local import LocalTree\nfrom dvc.tree.repo import RepoTree\n\nlogger = logging.getLogger(__name__)\n\n\n@locked\ndef diff(self, a_rev=\"HEAD\", b_rev=None):\n \"\"\"\n By default, it compares the workspace with the last ... | [
{
"content": "import logging\nimport os\n\nfrom dvc.repo import locked\nfrom dvc.tree.local import LocalTree\nfrom dvc.tree.repo import RepoTree\n\nlogger = logging.getLogger(__name__)\n\n\n@locked\ndef diff(self, a_rev=\"HEAD\", b_rev=None):\n \"\"\"\n By default, it compares the workspace with the last ... | diff --git a/dvc/repo/diff.py b/dvc/repo/diff.py
index cb5857a60b..ba7a4c44ca 100644
--- a/dvc/repo/diff.py
+++ b/dvc/repo/diff.py
@@ -122,5 +122,5 @@ def _filter_missing(repo, paths):
metadata = repo_tree.metadata(path)
if metadata.is_dvc:
out = metadata.outs[0]
- if out.statu... |
python-poetry__poetry-3743 | Poetry install -q (and update -q) produce messages
<!-- Checked checkbox should look like this: [x] -->
- [x] I am on the [latest](https://github.com/python-poetry/poetry/releases/latest) Poetry version.
- [x] I have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repo and believe that t... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import division\n\nimport itertools\nimport os\nimport threading\n\nfrom concurrent.futures import ThreadPoolExecutor\nfrom concurrent.futures import wait\nfrom pathlib import Path\nfrom subprocess import CalledProcessError\nfrom typing import TYPE_CHECKING... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import division\n\nimport itertools\nimport os\nimport threading\n\nfrom concurrent.futures import ThreadPoolExecutor\nfrom concurrent.futures import wait\nfrom pathlib import Path\nfrom subprocess import CalledProcessError\nfrom typing import TYPE_CHECKING... | diff --git a/poetry/installation/executor.py b/poetry/installation/executor.py
index 520487d2536..ea2940e1fbd 100644
--- a/poetry/installation/executor.py
+++ b/poetry/installation/executor.py
@@ -700,7 +700,4 @@ def _download_archive(self, operation: Union[Install, Update], link: Link) -> Pa
return archive
... |
zigpy__zha-device-handlers-2902 | [Device Support Request] TS0601 _TZE204_yjjdcqsq temperature/humidity sensor
### Problem description
The TS0601 _TZE204_yjjdcqsq temperature/humidity sensor does not show any entities in current HA.
https://www.amazon.de/-/en/dp/B0BWJHHK89
There's an almost same id (_TZE200_yjjdcqsq, note 200 vs 204) in the re... | [
{
"content": "\"\"\"Tuya temp and humidity sensors.\"\"\"\n\nfrom typing import Any, Dict\n\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomDevice\nfrom zigpy.zcl.clusters.general import Basic, Groups, Ota, Scenes, Time\nfrom zigpy.zcl.clusters.measurement import (\n RelativeHumidity,\n So... | [
{
"content": "\"\"\"Tuya temp and humidity sensors.\"\"\"\n\nfrom typing import Any, Dict\n\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomDevice\nfrom zigpy.zcl.clusters.general import Basic, Groups, Ota, Scenes, Time\nfrom zigpy.zcl.clusters.measurement import (\n RelativeHumidity,\n So... | diff --git a/zhaquirks/tuya/ts0601_sensor.py b/zhaquirks/tuya/ts0601_sensor.py
index aaed2ba083..54bd978535 100644
--- a/zhaquirks/tuya/ts0601_sensor.py
+++ b/zhaquirks/tuya/ts0601_sensor.py
@@ -250,6 +250,7 @@ class TuyaTempHumiditySensorVar04(CustomDevice):
MODELS_INFO: [
("_TZE200_yjjdcqsq", "T... |
ckan__ckan-6125 | Remove remaining Python 2 code in core
This should be done in separate pull requests to make reviews easier
- [x] Remove `requirements.py2.*` files and update documentation to remove py2 mentions
- [x] Remove py2 specific code. Look for `if six.PY2:` and remove what's inside!
- [x] Remove py3 checks. Look for `six... | [
{
"content": "# encoding: utf-8\n\nimport os\nimport os.path\n\nfrom pkg_resources import parse_version\n\n# Avoid problem releasing to pypi from vagrant\nif os.environ.get('USER', '') == 'vagrant':\n del os.link\n\ntry:\n from setuptools import (setup, find_packages,\n __versio... | [
{
"content": "# encoding: utf-8\n\nimport os\nimport os.path\n\nfrom pkg_resources import parse_version\n\n# Avoid problem releasing to pypi from vagrant\nif os.environ.get('USER', '') == 'vagrant':\n del os.link\n\ntry:\n from setuptools import (setup, find_packages,\n __versio... | diff --git a/doc/maintaining/installing/install-from-package.rst b/doc/maintaining/installing/install-from-package.rst
index a7a66272646..0976f4f673c 100644
--- a/doc/maintaining/installing/install-from-package.rst
+++ b/doc/maintaining/installing/install-from-package.rst
@@ -56,16 +56,6 @@ CKAN:
sudo apt instal... |
cocotb__cocotb-999 | Profiling bug
When i enable the profiling i got the following traceback:
```make COCOTB_ENABLE_PROFILING=true
...
Traceback (most recent call last):
File "/home/ademski/Documents/satellogic/hdlteam/cocotb/cocotb/__init__.py", line 41, in <module>
from cocotb.scheduler import Scheduler
File "/home/ademsk... | [
{
"content": "#!/usr/bin/env python\n\n# Copyright (c) 2013, 2018 Potential Ventures Ltd\n# Copyright (c) 2013 SolarFlare Communications Inc\n# All rights reserved.\n# \n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are... | [
{
"content": "#!/usr/bin/env python\n\n# Copyright (c) 2013, 2018 Potential Ventures Ltd\n# Copyright (c) 2013 SolarFlare Communications Inc\n# All rights reserved.\n# \n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are... | diff --git a/cocotb/scheduler.py b/cocotb/scheduler.py
index d43c174018..de207cbec2 100755
--- a/cocotb/scheduler.py
+++ b/cocotb/scheduler.py
@@ -48,7 +48,7 @@
# Debug mode controlled by environment variables
if "COCOTB_ENABLE_PROFILING" in os.environ:
- import cProfile, StringIO, pstats
+ import cProfile, p... |
encode__starlette-1553 | Route naming introspection always return "method" for method endpoints
Discussion was done at https://gitter.im/encode/community. Bug was confirmed by @Kludex.
## Description
methods don't get detected on `is_function`, then we assume that `<object>.__class__.__name__ ` will give the right name (my_method on the e... | [
{
"content": "import asyncio\nimport contextlib\nimport functools\nimport inspect\nimport re\nimport sys\nimport traceback\nimport types\nimport typing\nimport warnings\nfrom enum import Enum\n\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.convertors import CONVERTOR_TYPES, Convertor\nfro... | [
{
"content": "import asyncio\nimport contextlib\nimport functools\nimport inspect\nimport re\nimport sys\nimport traceback\nimport types\nimport typing\nimport warnings\nfrom enum import Enum\n\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.convertors import CONVERTOR_TYPES, Convertor\nfro... | diff --git a/starlette/routing.py b/starlette/routing.py
index 0388304c9..ea6ec2117 100644
--- a/starlette/routing.py
+++ b/starlette/routing.py
@@ -84,7 +84,7 @@ async def app(scope: Scope, receive: Receive, send: Send) -> None:
def get_name(endpoint: typing.Callable) -> str:
- if inspect.isfunction(endpoint) ... |
pydantic__pydantic-3473 | pydantic.utils.to_camel() is actually to_pascal()
### Checks
* [ y ] I added a descriptive title to this issue
* [ y ] I have searched (google, github) for similar issues and couldn't find anything
* [ y ] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think this is a bug
# ... | [
{
"content": "import warnings\nimport weakref\nfrom collections import OrderedDict, defaultdict, deque\nfrom copy import deepcopy\nfrom itertools import islice, zip_longest\nfrom types import BuiltinFunctionType, CodeType, FunctionType, GeneratorType, LambdaType, ModuleType\nfrom typing import (\n TYPE_CHECK... | [
{
"content": "import warnings\nimport weakref\nfrom collections import OrderedDict, defaultdict, deque\nfrom copy import deepcopy\nfrom itertools import islice, zip_longest\nfrom types import BuiltinFunctionType, CodeType, FunctionType, GeneratorType, LambdaType, ModuleType\nfrom typing import (\n TYPE_CHECK... | diff --git a/changes/3463-schlerp.md b/changes/3463-schlerp.md
new file mode 100644
index 00000000000..bb1fb75d3e4
--- /dev/null
+++ b/changes/3463-schlerp.md
@@ -0,0 +1 @@
+created new function `to_lower_camel()` for "non pascal case" camel case.
diff --git a/docs/usage/model_config.md b/docs/usage/model_config.md
ind... |
pyodide__pyodide-4554 | `OSError: [Errno 9] Bad file descriptor` when trying to load `.npy` files, works with `.npz` file format
## 🐛 Bug
NumPy is unable to load arrays from `.npy` binaries, but it can read from compressed `.npz` archives.
### To Reproduce
I noticed this error when compiling PyWavelets (`pywt`) from source via the E... | [
{
"content": "\"\"\"\nVarious common utilities for testing.\n\"\"\"\n\nimport contextlib\nimport os\nimport pathlib\nimport re\nimport sys\nfrom collections.abc import Sequence\n\nimport pytest\n\nROOT_PATH = pathlib.Path(__file__).parents[0].resolve()\nDIST_PATH = ROOT_PATH / \"dist\"\n\nsys.path.append(str(RO... | [
{
"content": "\"\"\"\nVarious common utilities for testing.\n\"\"\"\n\nimport contextlib\nimport os\nimport pathlib\nimport re\nimport sys\nfrom collections.abc import Sequence\n\nimport pytest\n\nROOT_PATH = pathlib.Path(__file__).parents[0].resolve()\nDIST_PATH = ROOT_PATH / \"dist\"\n\nsys.path.append(str(RO... | diff --git a/conftest.py b/conftest.py
index bda0bcbb4d8..fb1cb42996a 100644
--- a/conftest.py
+++ b/conftest.py
@@ -54,6 +54,9 @@
only_node = pytest.mark.xfail_browsers(
chrome="node only", firefox="node only", safari="node only"
)
+only_chrome = pytest.mark.xfail_browsers(
+ node="chrome only", firefox="chr... |
mozilla__bugbug-331 | Figure out what to do with http_service on CI
We have two options:
- build the http_service with fake models and don't push it on CI. Build it with real models and push it after training;
- build the http_service without models and let it download models at runtime.
| [
{
"content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport logging\nimport os\nimport sys\n\nfrom bugbug.models.component... | [
{
"content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport logging\nimport os\nimport sys\n\nfrom bugbug.models.component... | diff --git a/.taskcluster.yml b/.taskcluster.yml
index 8eede7e15a..6caaaefb5a 100644
--- a/.taskcluster.yml
+++ b/.taskcluster.yml
@@ -153,14 +153,14 @@ tasks:
capabilities:
privileged: true
maxRunTime: 10800
- image: mozilla/taskboot:0.1.0
+ image: mozilla/taskboot:... |
unionai-oss__pandera-1591 | Error Importing Pandera with Polars extra
**Describe the bug**
I get an error when importing pandera after installing the latest 0.19.0b2 version with the polars extra in a clean environment. I can import it successfully if I install without the polars extra.
- [x] I have checked that this issue has not already bee... | [
{
"content": "\"\"\"Configuration for external packages.\"\"\"\n\nimport os\n\nis_spark_local_ip_dirty = False\nis_pyarrow_ignore_timezone_dirty = False\n\ntry:\n # try importing pyspark to see if it exists. This is important because the\n # pandera.typing module defines a Series type that inherits from\n... | [
{
"content": "\"\"\"Configuration for external packages.\"\"\"\n\nimport os\n\nis_spark_local_ip_dirty = False\nis_pyarrow_ignore_timezone_dirty = False\n\ntry:\n # try importing pyspark to see if it exists. This is important because the\n # pandera.typing module defines a Series type that inherits from\n... | diff --git a/pandera/external_config.py b/pandera/external_config.py
index bd81a8d39..0e076e70e 100644
--- a/pandera/external_config.py
+++ b/pandera/external_config.py
@@ -21,6 +21,8 @@
os.environ["PYARROW_IGNORE_TIMEZONE"] = "1"
import pyspark.pandas
+except (ImportError, ModuleNotFoundError):
+ pa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.