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 ⌀ |
|---|---|---|---|---|
interactions-py__interactions.py-1670 | [BUG] AuditLogEventType 192 missing
### Library Version
stable
### Describe the Bug
Seeing the following error in bot logs:
Class `AuditLogEventType` received an invalid and unexpected value `192`, a new enum item will be created to represent this value. Please update interactions.py or report this issue on GitHub... | [
{
"content": "from enum import Enum, EnumMeta, IntEnum, IntFlag\nfrom functools import reduce\nfrom operator import or_\nfrom typing import Iterator, Tuple, TypeVar, Type, Optional\n\nfrom interactions.client.const import get_logger\n\n__all__ = (\n \"ActivityFlag\",\n \"ActivityType\",\n \"Application... | [
{
"content": "from enum import Enum, EnumMeta, IntEnum, IntFlag\nfrom functools import reduce\nfrom operator import or_\nfrom typing import Iterator, Tuple, TypeVar, Type, Optional\n\nfrom interactions.client.const import get_logger\n\n__all__ = (\n \"ActivityFlag\",\n \"ActivityType\",\n \"Application... | diff --git a/interactions/models/discord/enums.py b/interactions/models/discord/enums.py
index f2c28cf1b..ca5330c85 100644
--- a/interactions/models/discord/enums.py
+++ b/interactions/models/discord/enums.py
@@ -1017,6 +1017,12 @@ class AuditLogEventType(CursedIntEnum):
BLOCKED_PHISHING_LINK = 180
SERVER_GUI... |
borgbackup__borg-8135 | upgrade cython and msgpack
is borg also affected?
https://github.com/msgpack/msgpack-python/pull/583/files
https://github.com/msgpack/msgpack-python/issues/579#issuecomment-1972893890
https://github.com/msgpack/msgpack-python/releases/tag/v1.0.8
https://github.com/cython/cython/issues/5724
| [
{
"content": "from .datastruct import StableDict\nfrom ..constants import * # NOQA\n\n# wrapping msgpack ---------------------------------------------------------------------------------------------------\n#\n# due to the breaking api changes in upstream msgpack (from 0.x to 1.0), we wrapped it the way we need... | [
{
"content": "from .datastruct import StableDict\nfrom ..constants import * # NOQA\n\n# wrapping msgpack ---------------------------------------------------------------------------------------------------\n#\n# due to the breaking api changes in upstream msgpack (from 0.x to 1.0), we wrapped it the way we need... | diff --git a/pyproject.toml b/pyproject.toml
index 0b99e2cceb..4adc8899ac 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -34,7 +34,7 @@ dependencies = [
# Please note:
# using any other msgpack version is not supported by borg development and
# any feedback related to issues caused by this will be i... |
pydantic__pydantic-1527 | Same NameEmail field instances are not equal
# Bug
Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
```
pydantic version: 1.5.1
pydantic compiled: True
install path: /Users/***/.local/share/virtualenvs/tempenv-42b2286175873/lib/python3... | [
{
"content": "import re\nfrom ipaddress import (\n IPv4Address,\n IPv4Interface,\n IPv4Network,\n IPv6Address,\n IPv6Interface,\n IPv6Network,\n _BaseAddress,\n _BaseNetwork,\n)\nfrom typing import TYPE_CHECKING, Any, Dict, Generator, Optional, Pattern, Set, Tuple, Type, Union, cast, no_... | [
{
"content": "import re\nfrom ipaddress import (\n IPv4Address,\n IPv4Interface,\n IPv4Network,\n IPv6Address,\n IPv6Interface,\n IPv6Network,\n _BaseAddress,\n _BaseNetwork,\n)\nfrom typing import TYPE_CHECKING, Any, Dict, Generator, Optional, Pattern, Set, Tuple, Type, Union, cast, no_... | diff --git a/changes/1514-stephen-bunn.md b/changes/1514-stephen-bunn.md
new file mode 100644
index 00000000000..47f99d1cf5b
--- /dev/null
+++ b/changes/1514-stephen-bunn.md
@@ -0,0 +1 @@
+Add `NameEmail.__eq__` so duplicate `NameEmail` instances are evaluated as equal.
\ No newline at end of file
diff --git a/pydantic... |
localstack__localstack-536 | Fix Java Lambda Handler Static Imports
By mistake - autoimport functionality wrong static methods has been imported. This fix the issues reported by in #534
It is unrelated to the JavaFX as that has been imported by mistake. Will prepare another PR with a bit more tests don't understand how it could have passed the... | [
{
"content": "import os\nimport localstack_client.config\n\n# LocalStack version\nVERSION = '0.8.4'\n\n# default AWS region\nif 'DEFAULT_REGION' not in os.environ:\n os.environ['DEFAULT_REGION'] = 'us-east-1'\nDEFAULT_REGION = os.environ['DEFAULT_REGION']\n\n# constant to represent the \"local\" region, i.e.... | [
{
"content": "import os\nimport localstack_client.config\n\n# LocalStack version\nVERSION = '0.8.4'\n\n# default AWS region\nif 'DEFAULT_REGION' not in os.environ:\n os.environ['DEFAULT_REGION'] = 'us-east-1'\nDEFAULT_REGION = os.environ['DEFAULT_REGION']\n\n# constant to represent the \"local\" region, i.e.... | diff --git a/localstack/constants.py b/localstack/constants.py
index 5d5ba25d78feb..e6aa6823d6035 100644
--- a/localstack/constants.py
+++ b/localstack/constants.py
@@ -30,7 +30,7 @@
LOCALHOST = 'localhost'
# version of the Maven dependency with Java utility code
-LOCALSTACK_MAVEN_VERSION = '0.1.9'
+LOCALSTACK_MAVE... |
open-telemetry__opentelemetry-python-3459 | CI failing spellcheck
CI is failing for this typo of "enhance": https://github.com/open-telemetry/opentelemetry-python/blob/7f8c75d4de1a53beec59eed21cf95d2aa6428969/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py#L418
See failed run https://github.com/open-telemetry/opentelemetry-python/actions/ru... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py
index e2abcbefa1f..33c5147a599 100644
--- a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py
+++ b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration... |
getmoto__moto-241 | Routes: Uncomment VPC Peering Connection test dependent on Boto > 2.32.1
One of the tests for routes is for a route to VPC Peering Connection, which will be supported in Boto 2.32.2, though that version is not yet packaged and released.
Once a new https://github.com/boto/boto version is released, then `test_routes_vpc... | [
{
"content": "from __future__ import unicode_literals\nfrom jinja2 import Template\n\nfrom moto.core.responses import BaseResponse\nfrom moto.ec2.models import ec2_backend\nfrom moto.ec2.utils import route_table_ids_from_querystring, filters_from_querystring, optional_from_querystring\n\n\nclass RouteTables(Bas... | [
{
"content": "from __future__ import unicode_literals\nfrom jinja2 import Template\n\nfrom moto.core.responses import BaseResponse\nfrom moto.ec2.models import ec2_backend\nfrom moto.ec2.utils import route_table_ids_from_querystring, filters_from_querystring, optional_from_querystring\n\n\nclass RouteTables(Bas... | diff --git a/.travis.yml b/.travis.yml
index 1cd1a5c07a6b..282b9803a381 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,6 +4,7 @@ python:
- 2.7
env:
matrix:
+ - BOTO_VERSION=2.34.0
- BOTO_VERSION=2.32.1
- BOTO_VERSION=2.25.0
- BOTO_VERSION=2.7
diff --git a/moto/ec2/responses/route_ta... |
coala__coala-2795 | Make exception tracebacks default
Instead of asking the user to run coala with `-L DEBUG`
| [
{
"content": "import traceback\n\nfrom pyprint.ColorPrinter import ColorPrinter\n\nfrom coalib.output.printers.LOG_LEVEL import LOG_LEVEL, LOG_LEVEL_COLORS\nfrom coalib.processes.communication.LogMessage import LogMessage\n\n\nclass LogPrinter:\n \"\"\"\n The LogPrinter class allows to print log messages ... | [
{
"content": "import traceback\n\nfrom pyprint.ColorPrinter import ColorPrinter\n\nfrom coalib.output.printers.LOG_LEVEL import LOG_LEVEL, LOG_LEVEL_COLORS\nfrom coalib.processes.communication.LogMessage import LogMessage\n\n\nclass LogPrinter:\n \"\"\"\n The LogPrinter class allows to print log messages ... | diff --git a/coalib/output/printers/LogPrinter.py b/coalib/output/printers/LogPrinter.py
index 0dd33d590f..d320e473e0 100644
--- a/coalib/output/printers/LogPrinter.py
+++ b/coalib/output/printers/LogPrinter.py
@@ -115,7 +115,7 @@ def log_exception(self,
self.log(log_level, message, timestamp=timestamp, **kw... |
benoitc__gunicorn-1648 | Make "failed to find application" a bit more informative
When issuing `gunicorn myapp:app` and obtaining result `failed to find application myapp`, it would be better if it was clear whether there was a problem with `myapp` or with `app`.
| [
{
"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 __future__ import print_function\n\nimport email.utils\nimport fcntl\nimport io\nimport os\nimport pkg_resources\nimport pwd\nimport random\nimport socket\nimpo... | [
{
"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 __future__ import print_function\n\nimport email.utils\nimport fcntl\nimport io\nimport os\nimport pkg_resources\nimport pwd\nimport random\nimport socket\nimpo... | diff --git a/gunicorn/util.py b/gunicorn/util.py
index 8aa441d0c..df93e8751 100644
--- a/gunicorn/util.py
+++ b/gunicorn/util.py
@@ -363,7 +363,7 @@ def import_app(module):
except NameError:
if is_debug:
traceback.print_exception(*sys.exc_info())
- raise AppImportError("Failed to find ... |
onnx__onnx-3855 | [CI] Check backend tests have been generated
### Problem
It's currently easy to merge a PR with missing or out-of-date backend test files.
CI can find issues if those files are present, particularly for functions, where the expanded graph can fail the checker or shape inference, exposing bugs in the body definition... | [
{
"content": "# SPDX-License-Identifier: Apache-2.0\n\nimport collections.abc # type: ignore\nimport numbers\n\nimport google.protobuf.message\nfrom onnx import TensorProto, SparseTensorProto, AttributeProto, ValueInfoProto, \\\n TensorShapeProto, NodeProto, ModelProto, GraphProto, OperatorSetIdProto, \\\n ... | [
{
"content": "# SPDX-License-Identifier: Apache-2.0\n\nimport collections.abc # type: ignore\nimport numbers\n\nimport google.protobuf.message\nfrom onnx import TensorProto, SparseTensorProto, AttributeProto, ValueInfoProto, \\\n TensorShapeProto, NodeProto, ModelProto, GraphProto, OperatorSetIdProto, \\\n ... | null |
great-expectations__great_expectations-1949 | "$" character in user's response to a CLI prompt is mistakenly interpreted as a variable to substitute
**Describe the bug**
"$" character in user's response to a CLI prompt is mistakenly interpreted as a variable to substitute
\nfrom great_expectations.exceptions import MissingConfigVariableError\nfrom gr... | [
{
"content": "import copy\nimport inspect\nimport logging\nimport os\nimport re\nfrom collections import OrderedDict\n\nfrom great_expectations.data_context.types.base import (\n DataContextConfig,\n DataContextConfigSchema,\n)\nfrom great_expectations.exceptions import MissingConfigVariableError\nfrom gr... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index 96d119f76f16..95df67e915e8 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -7,6 +7,8 @@ Changelog
Develop
-----------------
+* [BUGFIX] Skip config substitution if key is "password"
+
0.12.4
-----------------
* [FEATURE] Add PagerdutyAlertAct... |
arviz-devs__arviz-683 | to_netcdf fails with error writing PyMC3 trace containing pm.Data as observed
**Describe the bug**
If one creates a model that has an observed RV, and the observations for that RV are a `pm.Data` object, and one tries to invoke `to_netcdf()` on the resulting arviz `InferenceData` object, you get an error in `ensure_dt... | [
{
"content": "\"\"\"PyMC3-specific conversion code.\"\"\"\nimport numpy as np\nimport xarray as xr\n\nfrom .inference_data import InferenceData\nfrom .base import requires, dict_to_dataset, generate_dims_coords, make_attrs\n\n\nclass PyMC3Converter:\n \"\"\"Encapsulate PyMC3 specific logic.\"\"\"\n\n def ... | [
{
"content": "\"\"\"PyMC3-specific conversion code.\"\"\"\nimport numpy as np\nimport xarray as xr\n\nfrom .inference_data import InferenceData\nfrom .base import requires, dict_to_dataset, generate_dims_coords, make_attrs\n\n\nclass PyMC3Converter:\n \"\"\"Encapsulate PyMC3 specific logic.\"\"\"\n\n def ... | diff --git a/arviz/data/io_pymc3.py b/arviz/data/io_pymc3.py
index 5e90412c9b..5a7c55233e 100644
--- a/arviz/data/io_pymc3.py
+++ b/arviz/data/io_pymc3.py
@@ -114,6 +114,8 @@ def observed_data_to_xarray(self):
dims = self.dims
observed_data = {}
for name, vals in observations.items():
+ ... |
saulpw__visidata-491 | [Bug] [v2.-4dev] dup-rows/-deep does not copy rows
I found that if I try and do a `dup-rows-deep` with a DirSheet I get the following error with no rows in the sheet (columns are correct and as expected).
This only appears to happen with a DirSheet, I just tried with a TextSheet which works as expected.
```
Trac... | [
{
"content": "import os\nimport os.path\nimport sys\nimport pathlib\nfrom urllib.parse import urlparse, urlunparse\n\nfrom visidata import *\n\noption('encoding', 'utf-8', 'encoding passed to codecs.open', replay=True)\noption('encoding_errors', 'surrogateescape', 'encoding_errors passed to codecs.open', replay... | [
{
"content": "import os\nimport os.path\nimport sys\nimport pathlib\nfrom urllib.parse import urlparse, urlunparse\n\nfrom visidata import *\n\noption('encoding', 'utf-8', 'encoding passed to codecs.open', replay=True)\noption('encoding_errors', 'surrogateescape', 'encoding_errors passed to codecs.open', replay... | diff --git a/visidata/path.py b/visidata/path.py
index b8e42acc8..3d6b0adf9 100644
--- a/visidata/path.py
+++ b/visidata/path.py
@@ -74,7 +74,10 @@ def __getattr__(self, k):
if hasattr(self.__dict__, k):
r = getattr(self.__dict__, k)
else:
- r = getattr(self._path, k)
+ ... |
getsentry__sentry-python-1093 | threading.setDaemon has been deprecated in favor of setting daemon attribute directly in Python 3.10
Ref : https://github.com/python/cpython/pull/25174
https://github.com/getsentry/sentry-python/blob/927903e3b354a42e427d91129c399d64d480a6b9/sentry_sdk/worker.py#L69
| [
{
"content": "import os\nimport threading\n\nfrom time import sleep, time\nfrom sentry_sdk._compat import check_thread_support\nfrom sentry_sdk._queue import Queue, Full\nfrom sentry_sdk.utils import logger\nfrom sentry_sdk.consts import DEFAULT_QUEUE_SIZE\n\nfrom sentry_sdk._types import MYPY\n\nif MYPY:\n ... | [
{
"content": "import os\nimport threading\n\nfrom time import sleep, time\nfrom sentry_sdk._compat import check_thread_support\nfrom sentry_sdk._queue import Queue, Full\nfrom sentry_sdk.utils import logger\nfrom sentry_sdk.consts import DEFAULT_QUEUE_SIZE\n\nfrom sentry_sdk._types import MYPY\n\nif MYPY:\n ... | diff --git a/sentry_sdk/worker.py b/sentry_sdk/worker.py
index a8e2fe1ce6..9d36cdfa22 100644
--- a/sentry_sdk/worker.py
+++ b/sentry_sdk/worker.py
@@ -66,7 +66,7 @@ def start(self):
self._thread = threading.Thread(
target=self._target, name="raven-sentry.BackgroundWorker"
... |
beeware__toga-1011 | Not specifying an `on_select` callback for Table leads to a TypeError
**Describe the bug**
If you leave out a `on_select` callable on `Table` and click a row, you get a traceback in the terminal:
```python
Traceback (most recent call last):
File "C:\\Users\\brcan\\Desktop\\snippets\\.venv\\lib\\site-packages\\tog... | [
{
"content": "from travertino.size import at_least\n\nfrom toga_winforms.libs import WinForms\n\nfrom .base import Widget\n\n\nclass Table(Widget):\n def create(self):\n self._container = self\n self.native = WinForms.ListView()\n self.native.View = WinForms.View.Details\n self._c... | [
{
"content": "from travertino.size import at_least\n\nfrom toga_winforms.libs import WinForms\n\nfrom .base import Widget\n\n\nclass Table(Widget):\n def create(self):\n self._container = self\n self.native = WinForms.ListView()\n self.native.View = WinForms.View.Details\n self._c... | diff --git a/src/winforms/toga_winforms/widgets/table.py b/src/winforms/toga_winforms/widgets/table.py
index 2ecb6f9a75..c208c2f409 100644
--- a/src/winforms/toga_winforms/widgets/table.py
+++ b/src/winforms/toga_winforms/widgets/table.py
@@ -70,7 +70,7 @@ def _native_item_selection_changed(self, sender, e):
#... |
pwr-Solaar__Solaar-919 | Add support for Fn swap for K400 Plus
K400 Touch seems to be supported but not K400 Plus, it might be a simple device recognition problem.
```
$ solaar --version
solaar 0.9.2
$ solaar show 3
3: Wireless Touch Keyboard K400 Plus
Codename : K400 Plus
Kind : keyboard
Wireless PID : ... | [
{
"content": "# -*- python-mode -*-\n# -*- coding: UTF-8 -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the... | [
{
"content": "# -*- python-mode -*-\n# -*- coding: UTF-8 -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the... | diff --git a/lib/logitech_receiver/settings_templates.py b/lib/logitech_receiver/settings_templates.py
index 6379dab574..27e453912c 100644
--- a/lib/logitech_receiver/settings_templates.py
+++ b/lib/logitech_receiver/settings_templates.py
@@ -676,4 +676,6 @@ def check_feature_settings(device, already_known):
def check... |
ansible__ansible-18698 | Git module fails to add hostkey to known_hosts and doesn't notice it
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
ansible.module_utils.known_hosts
##### ANSIBLE VERSION
```
ansible 2.1.3.0
config file =
configured module search path = Default w/o overrides
```
##### OS / ENVIRONMENT
Ubu... | [
{
"content": "# This code is part of Ansible, but is an independent component.\n# This particular file snippet, and this file snippet only, is BSD licensed.\n# Modules you write using this snippet, which is embedded dynamically by Ansible\n# still belong to the author of the module, and may assign their own lic... | [
{
"content": "# This code is part of Ansible, but is an independent component.\n# This particular file snippet, and this file snippet only, is BSD licensed.\n# Modules you write using this snippet, which is embedded dynamically by Ansible\n# still belong to the author of the module, and may assign their own lic... | diff --git a/lib/ansible/module_utils/known_hosts.py b/lib/ansible/module_utils/known_hosts.py
index 09d08b20ef332d..de074551f8619c 100644
--- a/lib/ansible/module_utils/known_hosts.py
+++ b/lib/ansible/module_utils/known_hosts.py
@@ -187,6 +187,9 @@ def add_host_key(module, fqdn, key_type="rsa", create_dir=False):
... |
ibis-project__ibis-2884 | BUG: File pseudo-backends failing for missing pandas option
The next code is failing in master since #2833:
```python
>>> import ibis
>>> con = ibis.csv.connect('/home/mgarcia/src/ibis/ci/ibis-testing-data/')
>>> expr = con.table('functional_alltypes')['double_col'] * 2
>>> print(expr.execute())
OptionError: "N... | [
{
"content": "from pathlib import Path\n\nimport ibis.expr.types as ir\nfrom ibis.backends.base import BaseBackend, Client, Database\nfrom ibis.backends.pandas.core import execute_and_reset\n\n\nclass FileClient(Client):\n def __init__(self, backend, root):\n self.backend = backend\n self.exten... | [
{
"content": "from pathlib import Path\n\nimport ibis\nimport ibis.expr.types as ir\nfrom ibis.backends.base import BaseBackend, Client, Database\nfrom ibis.backends.pandas.core import execute_and_reset\n\n# Load options of pandas backend\nibis.pandas\n\n\nclass FileClient(Client):\n def __init__(self, backe... | diff --git a/ibis/backends/base/file/__init__.py b/ibis/backends/base/file/__init__.py
index 4f303d2b2d3c..8d60166bd615 100644
--- a/ibis/backends/base/file/__init__.py
+++ b/ibis/backends/base/file/__init__.py
@@ -1,9 +1,13 @@
from pathlib import Path
+import ibis
import ibis.expr.types as ir
from ibis.backends.b... |
bookwyrm-social__bookwyrm-175 | nginx configuration
| [
{
"content": "''' fedireads settings and configuration '''\nimport os\n\nfrom environs import Env\n\nenv = Env()\n\n# celery\nCELERY_BROKER = env('CELERY_BROKER')\nCELERY_RESULT_BACKEND = env('CELERY_RESULT_BACKEND')\nCELERY_ACCEPT_CONTENT = ['application/json']\nCELERY_TASK_SERIALIZER = 'json'\nCELERY_RESULT_S... | [
{
"content": "''' fedireads settings and configuration '''\nimport os\n\nfrom environs import Env\n\nenv = Env()\n\n# celery\nCELERY_BROKER = env('CELERY_BROKER')\nCELERY_RESULT_BACKEND = env('CELERY_RESULT_BACKEND')\nCELERY_ACCEPT_CONTENT = ['application/json']\nCELERY_TASK_SERIALIZER = 'json'\nCELERY_RESULT_S... | diff --git a/Dockerfile b/Dockerfile
index f6dbb74029..705427dbeb 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,9 +1,10 @@
FROM python:3
ENV PYTHONUNBUFFERED 1
RUN mkdir /app
+RUN mkdir /app/static
+RUN mkdir /app/images
WORKDIR /app
COPY requirements.txt /app/
RUN pip install -r requirements.txt
COPY ./fedire... |
keras-team__keras-19190 | `ValueError`: `ngrams` when loading a model with a `TextVectorization` layer
### Describe a bug
Loading a model that contains a `TextVectorization` layer with `ngram` set to a tuple results in a `ValueError`.
### Code to Reproduce
```python
import numpy as np
import tensorflow as tf
from tensorflow import k... | [
{
"content": "import numpy as np\n\nfrom keras import backend\nfrom keras.api_export import keras_export\nfrom keras.layers.layer import Layer\nfrom keras.layers.preprocessing.index_lookup import listify_tensors\nfrom keras.layers.preprocessing.string_lookup import StringLookup\nfrom keras.saving import seriali... | [
{
"content": "import numpy as np\n\nfrom keras import backend\nfrom keras.api_export import keras_export\nfrom keras.layers.layer import Layer\nfrom keras.layers.preprocessing.index_lookup import listify_tensors\nfrom keras.layers.preprocessing.string_lookup import StringLookup\nfrom keras.saving import seriali... | diff --git a/keras/layers/preprocessing/text_vectorization.py b/keras/layers/preprocessing/text_vectorization.py
index 2e1fa4633a36..c40715f6c4a3 100644
--- a/keras/layers/preprocessing/text_vectorization.py
+++ b/keras/layers/preprocessing/text_vectorization.py
@@ -492,6 +492,10 @@ def from_config(cls, config):
... |
LMFDB__lmfdb-1068 | j-invariant search for elliptic curve over number field broken
Reported through feedback page:
Start at http://www.lmfdb.org/EllipticCurve/2.0.3.1/
Enter 0 or 1 for the j-invariant and search again, crash.
When fixed reply to fnajman@math.hr
| [
{
"content": "# -*- encoding: utf-8 -*-\n\nimport re\nSPACES_RE = re.compile(r'\\d\\s+\\d')\nLIST_RE = re.compile(r'^(\\d+|(\\d+-(\\d+)?))(,(\\d+|(\\d+-(\\d+)?)))*$')\nBRACKETED_POSINT_RE = re.compile(r'^\\[\\]|\\[\\d+(,\\d+)*\\]$')\nQQ_RE = re.compile(r'^-?\\d+(/\\d+)?$')\nLIST_POSINT_RE = re.compile(r'^(\\d+)... | [
{
"content": "# -*- encoding: utf-8 -*-\n\nimport re\nSPACES_RE = re.compile(r'\\d\\s+\\d')\nLIST_RE = re.compile(r'^(\\d+|(\\d+-(\\d+)?))(,(\\d+|(\\d+-(\\d+)?)))*$')\nBRACKETED_POSINT_RE = re.compile(r'^\\[\\]|\\[\\d+(,\\d+)*\\]$')\nQQ_RE = re.compile(r'^-?\\d+(/\\d+)?$')\nLIST_POSINT_RE = re.compile(r'^(\\d+)... | diff --git a/lmfdb/search_parsing.py b/lmfdb/search_parsing.py
index 4344bade4a..0e1603f3e9 100644
--- a/lmfdb/search_parsing.py
+++ b/lmfdb/search_parsing.py
@@ -14,7 +14,7 @@
FLOAT_RE = re.compile(r'((\b\d+([.]\d*)?)|([.]\d+))(e[-+]?\d+)?')
from flask import flash, redirect, url_for, request
-from sage.all import... |
cleanlab__cleanlab-404 | color_sentence fails in tutorial notebook
<!-- Briefly summarize the issue. -->
In the notebook, `display_issues` highlights all token issues with a call to `color_sentence`:
https://github.com/cleanlab/cleanlab/blob/1a239922fe195d2a6104d6dc3552d53da16380ce/docs/source/tutorials/token_classification.ipynb?short_p... | [
{
"content": "import re\nimport string\nimport numpy as np\nfrom termcolor import colored\nfrom typing import List, Optional, Callable, Tuple\n\n\ndef get_sentence(words: List[str]) -> str:\n \"\"\"\n Get sentence formed by a list of words with minor processing for readability\n\n Parameters\n -----... | [
{
"content": "import re\nimport string\nimport numpy as np\nfrom termcolor import colored\nfrom typing import List, Optional, Callable, Tuple\n\n\ndef get_sentence(words: List[str]) -> str:\n \"\"\"\n Get sentence formed by a list of words with minor processing for readability\n\n Parameters\n -----... | diff --git a/cleanlab/internal/token_classification_utils.py b/cleanlab/internal/token_classification_utils.py
index 0c2605ddcb..94a2f23ab5 100644
--- a/cleanlab/internal/token_classification_utils.py
+++ b/cleanlab/internal/token_classification_utils.py
@@ -173,7 +173,7 @@ def color_sentence(sentence: str, word: str) ... |
xonsh__xonsh-567 | "module" object has no attribute '__xonsh_shell__'
0c132528 broke xonsh for me.
```
xonsh
Traceback (most recent call last):
File "/home/gil/miniconda3/bin/xonsh", line 9, in <module>
load_entry_point('xonsh==0.2.3', 'console_scripts', 'xonsh')()
File "/home/gil/miniconda3/lib/python3.4/site-packages/xonsh/... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"The xonsh built-ins.\n\nNote that this module is named 'built_ins' so as not to be confused with the\nspecial Python builtins module.\n\"\"\"\nimport os\nimport re\nimport sys\nimport time\nimport shlex\nimport atexit\nimport signal\nimport inspect\nimport builtins\n... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"The xonsh built-ins.\n\nNote that this module is named 'built_ins' so as not to be confused with the\nspecial Python builtins module.\n\"\"\"\nimport os\nimport re\nimport sys\nimport time\nimport shlex\nimport atexit\nimport signal\nimport inspect\nimport builtins\n... | diff --git a/xonsh/built_ins.py b/xonsh/built_ins.py
index 524defb23d..0bd1a39322 100644
--- a/xonsh/built_ins.py
+++ b/xonsh/built_ins.py
@@ -615,7 +615,10 @@ def run_subproc(cmds, captured=True):
})
if ENV.get('XONSH_INTERACTIVE') and not ENV.get('XONSH_STORE_STDOUT'):
# set title here to get c... |
keras-team__keras-7634 | Tokenizer failed with unicode text
Tokenizer failed with unicode text
d = [u'ali veli kırk dokuz elli',u'ali veli kırk dokuz elli veli kırk dokuz']
tokenizer.fit_on_texts(d)
TypeError Traceback (most recent call last)
<ipython-input-181-b9cd26967244> in <module>()
----> 1 token... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Utilities for text input preprocessing.\n\nMay benefit from a fast Cython rewrite.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport string\nimport sys\nimport warnings\nfrom collections import OrderedDict\nfrom hashlib import... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Utilities for text input preprocessing.\n\nMay benefit from a fast Cython rewrite.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport string\nimport sys\nimport warnings\nfrom collections import OrderedDict\nfrom hashlib import... | diff --git a/keras/preprocessing/text.py b/keras/preprocessing/text.py
index 220bbc48ed81..2ba1657e7190 100644
--- a/keras/preprocessing/text.py
+++ b/keras/preprocessing/text.py
@@ -38,7 +38,13 @@ def text_to_word_sequence(text,
"""
if lower:
text = text.lower()
- text = text.translate(maketrans(... |
comic__grand-challenge.org-2344 | 'NoneType' object has no attribute 'values'
Sentry issue https://sentry.io/organizations/grand-challenge/issues/3127690895/?project=303639&query=is%3Aunresolved
```
slugs = {slug for viewport in mapping.values() for slug in viewport}
```
Added in https://github.com/comic/grand-challenge.org/pull/2322
| [
{
"content": "from django import forms\r\n\r\nfrom grandchallenge.components.models import ComponentInterface\r\nfrom grandchallenge.core.forms import SaveFormInitMixin\r\nfrom grandchallenge.core.widgets import JSONEditorWidget\r\nfrom grandchallenge.hanging_protocols.models import (\r\n HANGING_PROTOCOL_SC... | [
{
"content": "from django import forms\r\n\r\nfrom grandchallenge.components.models import ComponentInterface\r\nfrom grandchallenge.core.forms import SaveFormInitMixin\r\nfrom grandchallenge.core.widgets import JSONEditorWidget\r\nfrom grandchallenge.hanging_protocols.models import (\r\n HANGING_PROTOCOL_SC... | diff --git a/app/grandchallenge/hanging_protocols/forms.py b/app/grandchallenge/hanging_protocols/forms.py
index e9323ca10b..a6a3e1bf85 100644
--- a/app/grandchallenge/hanging_protocols/forms.py
+++ b/app/grandchallenge/hanging_protocols/forms.py
@@ -28,7 +28,7 @@ class Meta:
class ViewContentMixin:
def clean... |
mindsdb__mindsdb-337 | Add consistency check for model data object in the CI tests
We should take a snapshot of a "correct" model data object (as returned by `get_model_data()`) for the CI testing dataset and always compare the json-parsed outputs of `get_model_data` with it.
Might be a bit tedious to alter every time when we run `get_mod... | [
{
"content": "__title__ = 'MindsDB'\n__package_name__ = 'mindsdb'\n__version__ = '1.7.11'\n__description__ = \"MindsDB's goal is to make it very simple for developers to use the power of artificial neural networks in their projects.\"\n__email__ = \"jorge@mindsdb.com\"\n__author__ = 'MindsDB Inc'\n__github__ = ... | [
{
"content": "__title__ = 'MindsDB'\n__package_name__ = 'mindsdb'\n__version__ = '1.7.12'\n__description__ = \"MindsDB's goal is to make it very simple for developers to use the power of artificial neural networks in their projects.\"\n__email__ = \"jorge@mindsdb.com\"\n__author__ = 'MindsDB Inc'\n__github__ = ... | diff --git a/mindsdb/__about__.py b/mindsdb/__about__.py
index 498274d8507..a3f015c2f69 100755
--- a/mindsdb/__about__.py
+++ b/mindsdb/__about__.py
@@ -1,6 +1,6 @@
__title__ = 'MindsDB'
__package_name__ = 'mindsdb'
-__version__ = '1.7.11'
+__version__ = '1.7.12'
__description__ = "MindsDB's goal is to make it very ... |
spotify__luigi-1222 | gcs._DeleteOnCloseFile().close() cannot be called more than once
The issue is that [`close()`](https://github.com/spotify/luigi/blob/master/luigi/contrib/gcs.py#L371-L373) does not to check to see if the file exists before trying to delete, so an exception is raised if the file doesn't exist.
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2015 Twitter 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# Unl... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2015 Twitter 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# Unl... | diff --git a/luigi/contrib/gcs.py b/luigi/contrib/gcs.py
index f30976aac9..6d9b337b2f 100644
--- a/luigi/contrib/gcs.py
+++ b/luigi/contrib/gcs.py
@@ -370,7 +370,12 @@ def download(self, path, chunksize=None):
class _DeleteOnCloseFile(io.FileIO):
def close(self):
super(_DeleteOnCloseFile, self).close()
-... |
matrix-org__synapse-12358 | `Linearizer` can get stuck due to cancellation
Once a `Linearizer` task acquires the lock, it does a 0-duration sleep to reset the call stack:
https://github.com/matrix-org/synapse/blob/605d161d7d585847fd1bb98d14d5281daeac8e86/synapse/util/async_helpers.py#L466
In the rare event that the task is cancelled while sle... | [
{
"content": "# Copyright 2014-2016 OpenMarket Ltd\n# Copyright 2018 New Vector Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICE... | [
{
"content": "# Copyright 2014-2016 OpenMarket Ltd\n# Copyright 2018 New Vector Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICE... | diff --git a/changelog.d/12358.misc b/changelog.d/12358.misc
new file mode 100644
index 000000000000..fcacbcba5cf7
--- /dev/null
+++ b/changelog.d/12358.misc
@@ -0,0 +1 @@
+Fix a long-standing bug where `Linearizer`s could get stuck if a cancellation were to happen at the wrong time.
diff --git a/synapse/util/async_hel... |
getnikola__nikola-3511 | Incorrect time zone guessing on macOS
On macOS Big Sur 11.2, we guess the full path to the zoneinfo file (instead of just the zone name).
```
$ nikola init
…
Time zone [private/var/db/timezone/tz/2021a.1.0/zoneinfo/Europe/Warsaw]:
```
| [
{
"content": "\"\"\"Unix support for tzlocal.\"\"\"\nimport os\nimport re\n\nimport dateutil.tz\n\n_cache_tz = None\n\n\ndef _try_tz_from_env():\n tzenv = os.environ.get(\"TZ\")\n if tzenv and tzenv[0] == \":\":\n tzenv = tzenv[1:]\n try:\n if tzenv:\n dateutil.tz.gettz(tzenv)\... | [
{
"content": "\"\"\"Unix support for tzlocal.\"\"\"\nimport os\nimport re\n\nimport dateutil.tz\n\n_cache_tz = None\n\n\ndef _try_tz_from_env():\n tzenv = os.environ.get(\"TZ\")\n if tzenv and tzenv[0] == \":\":\n tzenv = tzenv[1:]\n try:\n if tzenv:\n dateutil.tz.gettz(tzenv)\... | diff --git a/CHANGES.txt b/CHANGES.txt
index 047f823ac0..ed10388def 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -15,6 +15,7 @@ New in v8.1.2
Features
--------
+* Fix time zone guessing logic in ``nikola init`` (Issue #3510)
* Support for multiple authors per post — comma-separated, enabled by
``MULTIPLE_AUTHO... |
open-mmlab__mmpose-796 | Questions about different versions of mmpose
When I run a cell
# Visualize Skeleton vis_frames = vis_skeleton(vid_path, anno, gym_categories[anno['label']]) vid = mpy.ImageSequenceClip(vis_frames, fps=24) vid.ipython_display()
in mmaction2/demo/visualize_heatmap_volume.ipynb, it raise an 'devided by zero' error, I ca... | [
{
"content": "import math\nimport os\nimport warnings\n\nimport cv2\nimport mmcv\nimport numpy as np\nimport trimesh\nfrom matplotlib import pyplot as plt\nfrom mmcv.visualization.color import color_val\n\ntry:\n os.environ['PYOPENGL_PLATFORM'] = 'osmesa'\n import pyrender\n has_pyrender = True\nexcept... | [
{
"content": "import math\nimport os\nimport warnings\n\nimport cv2\nimport mmcv\nimport numpy as np\nimport trimesh\nfrom matplotlib import pyplot as plt\nfrom mmcv.visualization.color import color_val\n\ntry:\n os.environ['PYOPENGL_PLATFORM'] = 'osmesa'\n import pyrender\n has_pyrender = True\nexcept... | diff --git a/mmpose/core/visualization/image.py b/mmpose/core/visualization/image.py
index 9af1c01a4f..9f0ef24976 100644
--- a/mmpose/core/visualization/image.py
+++ b/mmpose/core/visualization/image.py
@@ -50,7 +50,8 @@ def imshow_bboxes(img,
"""
# adapt to mmcv.imshow_bboxes input format
- bboxes = np.... |
Textualize__textual-3430 | [FEAT] Add `Input.clear` method
Following discussions in #3427, it would make sense to add a `Input.clear` method.
I'm happy to a submit a PR, if it helps.
| [
{
"content": "from __future__ import annotations\n\nimport re\nfrom dataclasses import dataclass\nfrom typing import ClassVar, Iterable\n\nfrom rich.cells import cell_len, get_character_cell_size\nfrom rich.console import Console, ConsoleOptions, RenderableType, RenderResult\nfrom rich.highlighter import Highli... | [
{
"content": "from __future__ import annotations\n\nimport re\nfrom dataclasses import dataclass\nfrom typing import ClassVar, Iterable\n\nfrom rich.cells import cell_len, get_character_cell_size\nfrom rich.console import Console, ConsoleOptions, RenderableType, RenderResult\nfrom rich.highlighter import Highli... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 41d543fc87..a52f8df41d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Added
- `OutOfBounds` exception to be raised by `Pilot` https://github.com/Textualize/textual/pull/3360
+- A... |
django-oscar__django-oscar-1565 | Zero weight baskets should still be chargable
Re https://groups.google.com/forum/#!msg/django-oscar/_VbrAmSikY8/a3rV9sBFI1AJ
We should still allow a weight band to catch zero price baskets.
| [
{
"content": "# -*- coding: utf-8 -*-\nfrom decimal import Decimal as D\n\nfrom django.db import models\nfrom django.utils.encoding import python_2_unicode_compatible\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.core.validators import MinValueValidator\n\nfrom oscar.core import prices, ... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom decimal import Decimal as D\n\nfrom django.db import models\nfrom django.utils.encoding import python_2_unicode_compatible\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.core.validators import MinValueValidator\n\nfrom oscar.core import prices, ... | diff --git a/docs/source/releases/v1.1.rst b/docs/source/releases/v1.1.rst
index 6b916343714..cb97da9e7f8 100644
--- a/docs/source/releases/v1.1.rst
+++ b/docs/source/releases/v1.1.rst
@@ -21,6 +21,7 @@ Table of contents:
Compatibility
-------------
+
.. _new_in_1.1:
What's new in Oscar 1.1?
@@ -31,6 +32,8 @@ W... |
numba__numba-2397 | UNKNOWN_CUDA_ERROR depends on magic print statement in CUDASIM
Unfortunately I found a strange bug on Numba 0.30.1. Somehow commenting out the print statement on line 47 results in UNKNOWN_CUDA_ERROR even if it is preceded and followed by the same statement, but it runs perfectly when including the print. A similar cra... | [
{
"content": "from __future__ import print_function, absolute_import, division\n\nfrom functools import reduce\nimport operator\n\nfrom llvmlite.llvmpy.core import Type\nimport llvmlite.llvmpy.core as lc\nimport llvmlite.binding as ll\n\nfrom numba.targets.imputils import Registry\nfrom numba import cgutils\nfr... | [
{
"content": "from __future__ import print_function, absolute_import, division\n\nfrom functools import reduce\nimport operator\n\nfrom llvmlite.llvmpy.core import Type\nimport llvmlite.llvmpy.core as lc\nimport llvmlite.binding as ll\n\nfrom numba.targets.imputils import Registry\nfrom numba import cgutils\nfr... | diff --git a/numba/cuda/cudaimpl.py b/numba/cuda/cudaimpl.py
index 1fff8dec045..aa5b6ce8ba7 100644
--- a/numba/cuda/cudaimpl.py
+++ b/numba/cuda/cudaimpl.py
@@ -371,6 +371,8 @@ def _generic_array(context, builder, shape, dtype, symbol_name, addrspace,
# Create global variable in the requested address-space
... |
biolab__orange3-5295 | File widget confuses numerical and categorical data
<!--
Thanks for taking the time to report a bug!
If you're raising an issue about an add-on (i.e., installed via Options > Add-ons), raise an issue in the relevant add-on's issue tracker instead. See: https://github.com/biolab?q=orange3
To fix the bug, we need to ... | [
{
"content": "import re\nimport warnings\nfrom collections.abc import Iterable\n\nfrom datetime import datetime, timedelta, timezone\nfrom numbers import Number, Real, Integral\nfrom math import isnan, floor\nfrom pickle import PickleError\n\nimport numpy as np\nimport scipy.sparse as sp\n\nfrom Orange.data imp... | [
{
"content": "import re\nimport warnings\nfrom collections.abc import Iterable\n\nfrom datetime import datetime, timedelta, timezone\nfrom numbers import Number, Real, Integral\nfrom math import isnan, floor\nfrom pickle import PickleError\n\nimport numpy as np\nimport scipy.sparse as sp\n\nfrom Orange.data imp... | diff --git a/Orange/data/tests/test_io_util.py b/Orange/data/tests/test_io_util.py
new file mode 100644
index 00000000000..683132da8c5
--- /dev/null
+++ b/Orange/data/tests/test_io_util.py
@@ -0,0 +1,14 @@
+import unittest
+
+from Orange.data import ContinuousVariable, guess_data_type
+
+
+class TestIoUtil(unittest.Tes... |
great-expectations__great_expectations-4471 | Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`
| [
{
"content": "from .attributes import Attributes # isort:skip\nfrom .builder import Builder # isort:skip\n\nfrom .domain import ( # isort:skip\n Domain,\n SemanticDomainTypes,\n InferredSemanticDomainType,\n)\nfrom .parameter_container import ( # isort:skip\n DOMAIN_KWARGS_PARAMETER_FULLY_QUALIF... | [
{
"content": "from .attributes import Attributes # isort:skip\nfrom .builder import Builder # isort:skip\n\nfrom .domain import ( # isort:skip\n Domain,\n SemanticDomainTypes,\n InferredSemanticDomainType,\n)\nfrom .parameter_container import ( # isort:skip\n DOMAIN_KWARGS_PARAMETER_FULLY_QUALIF... | diff --git a/great_expectations/rule_based_profiler/types/__init__.py b/great_expectations/rule_based_profiler/types/__init__.py
index 097b9f8844df..44c03a1b7519 100644
--- a/great_expectations/rule_based_profiler/types/__init__.py
+++ b/great_expectations/rule_based_profiler/types/__init__.py
@@ -9,6 +9,8 @@
from .pa... |
zalando__patroni-2185 | Rest API somtimes stops responding when switching certificates
Switching REST API certificates while there is a concurrent API request active results in the following error:
2022-01-25 14:14:37,739 ERROR: Failed to reload config_file=postgres0.yml
Traceback (most recent call last):
File "/home/ants/w... | [
{
"content": "import base64\nimport hmac\nimport json\nimport logging\nimport time\nimport traceback\nimport dateutil.parser\nimport datetime\nimport os\nimport six\nimport socket\nimport sys\n\nfrom ipaddress import ip_address, ip_network as _ip_network\nfrom six.moves.BaseHTTPServer import BaseHTTPRequestHand... | [
{
"content": "import base64\nimport hmac\nimport json\nimport logging\nimport time\nimport traceback\nimport dateutil.parser\nimport datetime\nimport os\nimport six\nimport socket\nimport sys\n\nfrom ipaddress import ip_address, ip_network as _ip_network\nfrom six.moves.BaseHTTPServer import BaseHTTPRequestHand... | diff --git a/patroni/api.py b/patroni/api.py
index 505852a9c..07db06ae5 100644
--- a/patroni/api.py
+++ b/patroni/api.py
@@ -768,6 +768,8 @@ def __initialize(self, listen, ssl_options):
reloading_config = self.__listen is not None # changing config in runtime
if reloading_config:
self.sh... |
cocotb__cocotb-1581 | "Running tests with cocotb ... from Unknown"
In e.g. https://asciinema.org/a/316949, we can see the line
```
0.00ns INFO cocotb __init__.py:144 in _initialise_testbench Running tests with cocotb v1.4.0.dev0 from Unknown
```
@themperek suggested using ``__file__`` in https://github.com/cocotb/cocotb/blob/09eff... | [
{
"content": "# Copyright (c) 2013 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 met:\n# * Redistributions of... | [
{
"content": "# Copyright (c) 2013 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 met:\n# * Redistributions of... | diff --git a/cocotb/__init__.py b/cocotb/__init__.py
index e2678eeaa1..7f0ec22fce 100644
--- a/cocotb/__init__.py
+++ b/cocotb/__init__.py
@@ -136,12 +136,8 @@ def _initialise_testbench(root_name):
if memcheck_port is not None:
mem_debug(int(memcheck_port))
- exec_path = os.getenv('COCOTB_PY_DIR')
- ... |
cltk__cltk-399 | Compile Poeti d’Italia for CLTK
http://www.mqdq.it/mqdq/poetiditalia/indice_autori_alfa.jsp?scelta=AZ&path=metri_opere
| [
{
"content": "\"\"\"Latin language corpora available for download or loading locally.\nAll remote corpora hosted by github on the cltk organization account, eg:\n'http://github.com/cltk' + name\n\"\"\"\n\nLATIN_CORPORA = [\n {'encoding': 'utf-8',\n 'markup': 'tei_xml',\n 'location': 'remote',\n '... | [
{
"content": "\"\"\"Latin language corpora available for download or loading locally.\nAll remote corpora hosted by github on the cltk organization account, eg:\n'http://github.com/cltk' + name\n\"\"\"\n\nLATIN_CORPORA = [\n {'encoding': 'utf-8',\n 'markup': 'tei_xml',\n 'location': 'remote',\n '... | diff --git a/cltk/corpus/latin/corpora.py b/cltk/corpus/latin/corpora.py
index 2f1b431c8..96f83e40f 100644
--- a/cltk/corpus/latin/corpora.py
+++ b/cltk/corpus/latin/corpora.py
@@ -88,5 +88,9 @@
{'location': 'remote',
'type': 'text',
'name': 'latin_text_corpus_grammaticorum_latinorum',
- 'origin':... |
xonsh__xonsh-2697 | _which.py uses python 2.x style next statement
_which.py uses python 2.x style syntax next() statement which causes an error when _which.which() is called on python 3.x
https://github.com/xonsh/xonsh/blob/17450e8a465cb3e0c69071ae5bc44ce51fd09008/xonsh/xoreutils/_which.py#L264
This currently does not cause any exce... | [
{
"content": "#!/usr/bin/env python\n# Copyright (c) 2002-2007 ActiveState Software Inc.\n\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# witho... | [
{
"content": "#!/usr/bin/env python\n# Copyright (c) 2002-2007 ActiveState Software Inc.\n\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# witho... | diff --git a/news/2696-which-next-statement.rst b/news/2696-which-next-statement.rst
new file mode 100644
index 0000000000..cc70c16f23
--- /dev/null
+++ b/news/2696-which-next-statement.rst
@@ -0,0 +1,13 @@
+**Added:** None
+
+**Changed:** None
+
+**Deprecated:** None
+
+**Removed:** None
+
+**Fixed:**
+
+* update xore... |
ManimCommunity__manim-1053 | Broken source links on the stable version of the documentation
## Description of bug / unexpected behavior
Source links on the stable version of documentation does not work. It links to something like this: https://github.com/ManimCommunity/manim/blob/stable/manim/mobject/changing.py which is a 404 error.
## Expected... | [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup -------------------------------------------... | [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup -------------------------------------------... | diff --git a/docs/source/conf.py b/docs/source/conf.py
index 6cf5010236..63cfe71468 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -115,7 +115,7 @@ def linkcode_resolve(domain, info):
return None
filename = info["module"].replace(".", "/")
version = os.getenv("READTHEDOCS_VERSION", "ma... |
DataDog__dd-trace-py-1268 | ddtrace not working with new aiobotocore library
### Which version of dd-trace-py are you using?
0.34.0
### Which version of the libraries are you using?
```
aiobotocore==0.12.0
aiohttp==3.6.2
aioitertools==0.5.1
async-timeout==3.0.1
attrs==19.3.0
botocore==1.15.15
chardet==3.0.4
ddtrace==0.34.0
docut... | [
{
"content": "import asyncio\nfrom ddtrace.vendor import wrapt\nfrom ddtrace import config\nimport aiobotocore.client\n\nfrom aiobotocore.endpoint import ClientResponseContentProxy\n\nfrom ...constants import ANALYTICS_SAMPLE_RATE_KEY, SPAN_MEASURED_KEY\nfrom ...pin import Pin\nfrom ...ext import SpanTypes, htt... | [
{
"content": "import asyncio\nfrom ddtrace.vendor import wrapt\nfrom ddtrace import config\nimport aiobotocore.client\n\ntry:\n from aiobotocore.endpoint import ClientResponseContentProxy\nexcept ImportError:\n # aiobotocore>=0.11.0\n from aiobotocore._endpoint_helpers import ClientResponseContentProxy... | diff --git a/ddtrace/contrib/aiobotocore/patch.py b/ddtrace/contrib/aiobotocore/patch.py
index fd35b26a048..cc3637ef04d 100644
--- a/ddtrace/contrib/aiobotocore/patch.py
+++ b/ddtrace/contrib/aiobotocore/patch.py
@@ -3,7 +3,11 @@
from ddtrace import config
import aiobotocore.client
-from aiobotocore.endpoint import... |
quantumlib__Cirq-606 | Engine measurements are bytes but simulator measurements are bools
This causes code that works with the simulator to fail when given engine results. We should make these consistent.
Example code that works with simulator results but not engine results:
```python
a = np.zeros([repetition_count], dtype=np.bool)
a... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/cirq/google/programs.py b/cirq/google/programs.py
index 6a1aee02598..b115d1b47aa 100644
--- a/cirq/google/programs.py
+++ b/cirq/google/programs.py
@@ -131,7 +131,7 @@ def unpack_results(
total_bits = repetitions * bits_per_rep
byte_arr = np.frombuffer(data, dtype='uint8').reshape((len(data), 1... |
dynaconf__dynaconf-457 | Allow core_loaders to be case insensitive.
**Describe the bug**
When using the `core_loaders` attribute with the value `["yaml"]` Dynaconf fails reading settings from the respective YML configuration file.
**To Reproduce**
1. Go into an empty dir.
2. Setup environment.
* Python 3.9
* `pip install dy... | [
{
"content": "import os\n\nfrom dynaconf import constants as ct\nfrom dynaconf import default_settings\nfrom dynaconf.loaders import ini_loader\nfrom dynaconf.loaders import json_loader\nfrom dynaconf.loaders import py_loader\nfrom dynaconf.loaders import toml_loader\nfrom dynaconf.loaders import yaml_loader\nf... | [
{
"content": "import os\n\nfrom dynaconf import constants as ct\nfrom dynaconf import default_settings\nfrom dynaconf.loaders import ini_loader\nfrom dynaconf.loaders import json_loader\nfrom dynaconf.loaders import py_loader\nfrom dynaconf.loaders import toml_loader\nfrom dynaconf.loaders import yaml_loader\nf... | diff --git a/dynaconf/loaders/__init__.py b/dynaconf/loaders/__init__.py
index 30f1d42af..617b7c9d0 100644
--- a/dynaconf/loaders/__init__.py
+++ b/dynaconf/loaders/__init__.py
@@ -94,7 +94,9 @@ def settings_loader(
# a bare python module name w/o extension
modules_names.append(item)
- en... |
pypa__pipenv-1448 | documentation links broken
Shocked at the version number jumps `pipenv` has made lately, I updated and `pip --envs` guided me to what I wanted (locating `venvs` *with* a project);
```
$ pipenv --envs
The following environment variables can be set, to do various things:
- PIPENV_SHELL_FANCY
- PIPENV_VENV_IN_P... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport logging\nimport os\nimport sys\n\nimport click\nimport click_completion\nimport crayons\nimport delegator\nfrom click_didyoumean import DYMCommandCollection\n\nfrom .__version__ import __version__\n\nfrom . import environments\nfrom .environments import *\n\nxyzzy... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport logging\nimport os\nimport sys\n\nimport click\nimport click_completion\nimport crayons\nimport delegator\nfrom click_didyoumean import DYMCommandCollection\n\nfrom .__version__ import __version__\n\nfrom . import environments\nfrom .environments import *\n\nxyzzy... | diff --git a/pipenv/cli.py b/pipenv/cli.py
index b19801d98a..9aaf728c7a 100644
--- a/pipenv/cli.py
+++ b/pipenv/cli.py
@@ -108,7 +108,7 @@ def cli(
click.echo(' - {0}'.format(crayons.normal(key, bold=True)))
click.echo('\nYou can learn more at:\n {0}'.format(
- crayons.green('h... |
mlflow__mlflow-8521 | [BUG] No 'run_uuid' handling while validating user permissions
### Issues Policy acknowledgement
- [X] I have read and agree to submit bug reports in accordance with the [issues policy](https://www.github.com/mlflow/mlflow/blob/master/ISSUE_POLICY.md)
### Willingness to contribute
Yes. I would be willing to contribu... | [
{
"content": "\"\"\"\nUsage\n-----\n\n.. code-block:: bash\n\n mlflow server --app-name basic-auth\n\"\"\"\n\nimport logging\nimport uuid\nimport os\nfrom pathlib import Path\nfrom typing import Callable\n\nfrom flask import Flask, request, make_response, Response, flash, render_template_string\n\nfrom mlflo... | [
{
"content": "\"\"\"\nUsage\n-----\n\n.. code-block:: bash\n\n mlflow server --app-name basic-auth\n\"\"\"\n\nimport logging\nimport uuid\nimport os\nfrom pathlib import Path\nfrom typing import Callable\n\nfrom flask import Flask, request, make_response, Response, flash, render_template_string\n\nfrom mlflo... | diff --git a/mlflow/server/auth/__init__.py b/mlflow/server/auth/__init__.py
index 716b4b0ffc620..380a1af496bcb 100644
--- a/mlflow/server/auth/__init__.py
+++ b/mlflow/server/auth/__init__.py
@@ -160,6 +160,9 @@ def _get_request_param(param: str) -> str:
)
if param not in args:
+ # Special handl... |
pre-commit__pre-commit-1262 | Slightly broken links in output
`pre-commit autoupdate` outputs repository links:
```
Updating https://github.com/psf/black...already up to date.
Updating https://github.com/prettier/prettier...already up to date.
```
In iTerm2 on a Mac using Fish Shell—and probably lots of other setups as well—you can click t... | [
{
"content": "from __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport collections\nimport os.path\nimport re\n\nimport six\nfrom aspy.yaml import ordered_dump\nfrom aspy.yaml import ordered_load\n\nimport pre_commit.constants as C\nfrom pre_commit import git\nfrom pre_commit imp... | [
{
"content": "from __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport collections\nimport os.path\nimport re\n\nimport six\nfrom aspy.yaml import ordered_dump\nfrom aspy.yaml import ordered_load\n\nimport pre_commit.constants as C\nfrom pre_commit import git\nfrom pre_commit imp... | diff --git a/pre_commit/commands/autoupdate.py b/pre_commit/commands/autoupdate.py
index eea5be7ca..5e804c146 100644
--- a/pre_commit/commands/autoupdate.py
+++ b/pre_commit/commands/autoupdate.py
@@ -136,7 +136,7 @@ def autoupdate(config_file, store, tags_only, freeze, repos=()):
rev_infos.append(None)
... |
evennia__evennia-1399 | Command "evennia migrate --database=second_database" fails with TypeError
#### Brief summary of issue / Description of requested feature:
When attempting to set up Evennia with a second database, running the migration fails with an exception:
```
File "/home/user/.virtualenvs/multi_db/local/lib/python2.7/site-pack... | [
{
"content": "#!/usr/bin/env python\n\"\"\"\nEVENNIA SERVER LAUNCHER SCRIPT\n\nThis is the start point for running Evennia.\n\nSets the appropriate environmental variables and launches the server\nand portal through the evennia_runner. Run without arguments to get a\nmenu. Run the script with the -h flag to see... | [
{
"content": "#!/usr/bin/env python\n\"\"\"\nEVENNIA SERVER LAUNCHER SCRIPT\n\nThis is the start point for running Evennia.\n\nSets the appropriate environmental variables and launches the server\nand portal through the evennia_runner. Run without arguments to get a\nmenu. Run the script with the -h flag to see... | diff --git a/evennia/server/evennia_launcher.py b/evennia/server/evennia_launcher.py
index ab284de904b..c9b436de0a2 100644
--- a/evennia/server/evennia_launcher.py
+++ b/evennia/server/evennia_launcher.py
@@ -1326,7 +1326,7 @@ def main():
arg, value = [p.strip() for p in arg.split("=", 1)]
... |
vega__altair-989 | scatter-matrix example don't fit into screen
https://altair-viz.github.io/gallery/scatter_matrix.html#scatter-matrix

```python
#...
).properties(
width=150, # suggested instead of 250
height=150 ... | [
{
"content": "\"\"\"\nScatter Matrix\n--------------\nAn example of using a RepeatChart to construct a multi-panel scatter plot\nwith linked panning and zooming.\n\"\"\"\n# category: scatter plots\nimport altair as alt\nfrom vega_datasets import data\n\nalt.Chart(data.cars.url).mark_circle().encode(\n alt.X(... | [
{
"content": "\"\"\"\nScatter Matrix\n--------------\nAn example of using a RepeatChart to construct a multi-panel scatter plot\nwith linked panning and zooming.\n\"\"\"\n# category: scatter plots\nimport altair as alt\nfrom vega_datasets import data\n\nalt.Chart(data.cars.url).mark_circle().encode(\n alt.X(... | diff --git a/altair/vegalite/v2/examples/scatter_matrix.py b/altair/vegalite/v2/examples/scatter_matrix.py
index f17d626fe..5cd1c23b7 100644
--- a/altair/vegalite/v2/examples/scatter_matrix.py
+++ b/altair/vegalite/v2/examples/scatter_matrix.py
@@ -13,8 +13,8 @@
alt.Y(alt.repeat("row"), type='quantitative'),
... |
django-compressor__django-compressor-1019 | FutureWarning: GzipFile
Using Python 3.9 and received this FutureWarning
`/usr/local/lib/python3.9/site-packages/compressor/storage.py:73: FutureWarning: GzipFile was opened for writing, but this will change in future Python releases. Specify the mode argument for opening it for writing.
`
https://github.com/dj... | [
{
"content": "import gzip\nimport os\nfrom datetime import datetime\nimport time\n\nfrom django.core.files.storage import FileSystemStorage, get_storage_class\nfrom django.utils.functional import LazyObject, SimpleLazyObject\n\nfrom compressor.conf import settings\n\n\nclass CompressorFileStorage(FileSystemStor... | [
{
"content": "import gzip\nimport os\nfrom datetime import datetime\nimport time\n\nfrom django.core.files.storage import FileSystemStorage, get_storage_class\nfrom django.utils.functional import LazyObject, SimpleLazyObject\n\nfrom compressor.conf import settings\n\n\nclass CompressorFileStorage(FileSystemStor... | diff --git a/compressor/storage.py b/compressor/storage.py
index ddf1ce4dc..c5164c0fd 100644
--- a/compressor/storage.py
+++ b/compressor/storage.py
@@ -57,7 +57,7 @@ def save(self, filename, content):
compressed_path = '%s.gz' % orig_path
with open(orig_path, 'rb') as f_in, open(compressed_path, 'w... |
scalableminds__webknossos-libs-47 | Tiled cubing doesn't convert last slice
Tiled cubing doesn't convert last slice
| [
{
"content": "import time\nimport wkw\nimport numpy as np\nimport logging\nfrom glob import iglob\nfrom collections import namedtuple\nfrom multiprocessing import cpu_count, Lock\nfrom concurrent.futures import ProcessPoolExecutor\nfrom os import path\nfrom platform import python_version\nfrom math import floor... | [
{
"content": "import time\nimport wkw\nimport numpy as np\nimport logging\nfrom glob import iglob\nfrom collections import namedtuple\nfrom multiprocessing import cpu_count, Lock\nfrom concurrent.futures import ProcessPoolExecutor\nfrom os import path\nfrom platform import python_version\nfrom math import floor... | diff --git a/tests/test_utils.py b/tests/test_utils.py
index a4dee93cf..df30b7ade 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -18,3 +18,12 @@ def test_get_regular_chunks():
assert len(target) == 6
assert list(target[0]) == list(range(0, 8))
assert list(target[-1]) == list(range(40, 48))... |
vyperlang__vyper-3174 | Disallow `++a` unary operations
## Simple Summary
Disallow the (pre-increment) `++a` expression in Vyper for all signed and unsigned types.
```vy
x: uint256 = 0
y: uint256 = 0
# throws
y = x++
# does currently not throw
y = ++x
```
## Motivation
Currently, the (post-increment) expression `a++` thro... | [
{
"content": "import ast as python_ast\nimport tokenize\nfrom decimal import Decimal\nfrom typing import Optional, cast\n\nimport asttokens\n\nfrom vyper.exceptions import CompilerPanic, SyntaxException\nfrom vyper.typing import ModificationOffsets\n\n\nclass AnnotatingVisitor(python_ast.NodeTransformer):\n ... | [
{
"content": "import ast as python_ast\nimport tokenize\nfrom decimal import Decimal\nfrom typing import Optional, cast\n\nimport asttokens\n\nfrom vyper.exceptions import CompilerPanic, SyntaxException\nfrom vyper.typing import ModificationOffsets\n\n\nclass AnnotatingVisitor(python_ast.NodeTransformer):\n ... | diff --git a/tests/parser/exceptions/test_syntax_exception.py b/tests/parser/exceptions/test_syntax_exception.py
index a831650b32..46c98670e3 100644
--- a/tests/parser/exceptions/test_syntax_exception.py
+++ b/tests/parser/exceptions/test_syntax_exception.py
@@ -74,6 +74,11 @@ def foo():
"""
a: internal(uint256)
... |
streamlink__streamlink-1351 | Kanal7 Defective again
Only 2 months later they have changed the design.
Not opening with latest 0.9.0 Release:
[cli][info] Found matching plugin kanal7 for URL http://www.kanal7.com/canli-izle
error: No playable streams found on this URL: http://www.kanal7.com/canli-izle
| [
{
"content": "from __future__ import print_function\nimport re\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import http\nfrom streamlink.plugin.api import useragents\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream import HLSStream\n\n\nclass Kanal7(Plugin):\n url_re... | [
{
"content": "from __future__ import print_function\nimport re\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import http\nfrom streamlink.plugin.api import useragents\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream import HLSStream\n\n\nclass Kanal7(Plugin):\n url_re... | diff --git a/src/streamlink/plugins/kanal7.py b/src/streamlink/plugins/kanal7.py
index d6677a74a2c..2f9cc2d949d 100644
--- a/src/streamlink/plugins/kanal7.py
+++ b/src/streamlink/plugins/kanal7.py
@@ -11,7 +11,7 @@
class Kanal7(Plugin):
url_re = re.compile(r"https?://(?:www.)?kanal7.com/canli-izle")
iframe_r... |
mitmproxy__mitmproxy-1681 | OpenSSL.crypto.Error: [('asn1 encoding routines', 'ASN1_mbstring_ncopy', 'string too long')]
##### Steps to reproduce the problem:
1. ???
2.
```
[1026/094737:ERROR:ssl_client_socket_openssl.cc(1149)] handshake failed; returned -1, SSL error code 1, net_error -100
Traceback (most recent call last):
File "c:\users\us... | [
{
"content": "import os\nimport ssl\nimport time\nimport datetime\nimport ipaddress\n\nimport sys\nfrom pyasn1.type import univ, constraint, char, namedtype, tag\nfrom pyasn1.codec.der.decoder import decode\nfrom pyasn1.error import PyAsn1Error\nimport OpenSSL\n\nfrom mitmproxy.types import serializable\n\n# De... | [
{
"content": "import os\nimport ssl\nimport time\nimport datetime\nimport ipaddress\n\nimport sys\nfrom pyasn1.type import univ, constraint, char, namedtype, tag\nfrom pyasn1.codec.der.decoder import decode\nfrom pyasn1.error import PyAsn1Error\nimport OpenSSL\n\nfrom mitmproxy.types import serializable\n\n# De... | diff --git a/mitmproxy/certs.py b/mitmproxy/certs.py
index 83db4e6e30..4e4eb4d196 100644
--- a/mitmproxy/certs.py
+++ b/mitmproxy/certs.py
@@ -102,7 +102,7 @@ def dummy_cert(privkey, cacert, commonname, sans):
cert.gmtime_adj_notBefore(-3600 * 48)
cert.gmtime_adj_notAfter(DEFAULT_EXP)
cert.set_issuer(cac... |
cupy__cupy-1717 | `cupy.nextafter` is wrong on a=0
`test_nextafter_combination` is failing.
`{'dtype_b': <type 'numpy.float32'>, 'dtype_a': <type 'numpy.bool_'>}`
```
x = array([[1.1754944e-38, 1.0000001e+00, 1.1754944e-38],
[1.0000001e+00, 1.1754944e-38, 1.0000000e+00]], dtype=float32)
y = array([[1.4012... | [
{
"content": "from cupy import core\nfrom cupy.math import ufunc\n\n\nsignbit = core.create_ufunc(\n 'cupy_signbit',\n ('e->?', 'f->?', 'd->?'),\n 'out0 = signbit(in0)',\n doc='''Tests elementwise if the sign bit is set (i.e. less than zero).\n\n .. seealso:: :data:`numpy.signbit`\n\n ''')\n\n... | [
{
"content": "from cupy import core\nfrom cupy.math import ufunc\n\n\nsignbit = core.create_ufunc(\n 'cupy_signbit',\n ('e->?', 'f->?', 'd->?'),\n 'out0 = signbit(in0)',\n doc='''Tests elementwise if the sign bit is set (i.e. less than zero).\n\n .. seealso:: :data:`numpy.signbit`\n\n ''')\n\n... | diff --git a/cupy/math/floating.py b/cupy/math/floating.py
index 98754909488..218585dca5d 100644
--- a/cupy/math/floating.py
+++ b/cupy/math/floating.py
@@ -50,6 +50,11 @@
'nextafter', 2, 'cupy_nextafter',
'''Computes the nearest neighbor float values towards the second argument.
+ .. note::
+ For... |
inducer__relate-613 | Assertion failure in InlineMultiQuestion
Just got this traceback:
```
Traceback:
File "/home/andreas/my-relate-env3/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
35. response = get_response(request)
File "/home/andreas/my-relate-env3/lib/python3.6/site-packages/django/... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import division\n\n__copyright__ = \"Copyright (C) 2015 Andreas Kloeckner, Dong Zhuang\"\n\n__license__ = \"\"\"\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Soft... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import division\n\n__copyright__ = \"Copyright (C) 2015 Andreas Kloeckner, Dong Zhuang\"\n\n__license__ = \"\"\"\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Soft... | diff --git a/course/page/inline.py b/course/page/inline.py
index b519ce93d..8a6b95821 100644
--- a/course/page/inline.py
+++ b/course/page/inline.py
@@ -355,7 +355,7 @@ def get_correct_answer_text(self, page_context):
if unspec_correct_answer_text is not None:
break
- assert unspe... |
tensorflow__tfx-1082 | just a few typos fixed
That Python version check can be removed in a few days when Colab drops Python 2 support.
| [
{
"content": "# Lint as: python2, python3\n# Copyright 2019 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/lice... | [
{
"content": "# Lint as: python2, python3\n# Copyright 2019 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/lice... | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 46e32fdf4c..f69a9337f8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -28,8 +28,9 @@ https://opensource.google.com/conduct/).
# Contributing Guidelines
## Running Unit Tests
-We recommend using virtualenv and Python 3.5 and above for development. You can
-... |
openshift__openshift-ansible-2607 | Task "Label nodes" fails: sequence item 1: expected string or Unicode, bool found
The tasks "Label nodes" fails with
```
TASK [openshift_manage_node : Label nodes] *************************************
task path: /usr/share/openshift-ansible/roles/openshift_manage_node/tasks/main.yml:35
fatal: [master1.example.com]: F... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# vim: expandtab:tabstop=4:shiftwidth=4\n\"\"\"\nCustom filters for use in openshift-ansible\n\"\"\"\n\nfrom ansible import errors\nfrom collections import Mapping\nfrom distutils.util import strtobool\nfrom distutils.version import LooseVersion\nfrom op... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# vim: expandtab:tabstop=4:shiftwidth=4\n\"\"\"\nCustom filters for use in openshift-ansible\n\"\"\"\n\nfrom ansible import errors\nfrom collections import Mapping\nfrom distutils.util import strtobool\nfrom distutils.version import LooseVersion\nfrom op... | diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py
index 5358a244e92..3541d54711c 100644
--- a/filter_plugins/oo_filters.py
+++ b/filter_plugins/oo_filters.py
@@ -236,7 +236,7 @@ def oo_combine_dict(data, in_joiner='=', out_joiner=' '):
if not isinstance(data, dict):
raise er... |
jazzband__pip-tools-2038 | Allow http(s) as constraint file
<!--- Describe the changes here. --->
Alternative to #2038.
In my opinion, this is probably overshooting.
##### Contributor checklist
- [ ] Included tests for the changes.
- [ ] PR title is short, clear, and ready to be included in the user-facing changelog.
##### Mainta... | [
{
"content": "from __future__ import annotations\n\nfrom typing import Any, Literal\n\nimport click\nfrom pip._internal.commands import create_command\nfrom pip._internal.utils.misc import redact_auth_from_url\n\nfrom piptools.locations import CACHE_DIR, DEFAULT_CONFIG_FILE_NAMES\nfrom piptools.utils import UNS... | [
{
"content": "from __future__ import annotations\n\nfrom typing import Any, Literal\n\nimport click\nfrom pip._internal.commands import create_command\nfrom pip._internal.utils.misc import redact_auth_from_url\n\nfrom piptools.locations import CACHE_DIR, DEFAULT_CONFIG_FILE_NAMES\nfrom piptools.utils import UNS... | diff --git a/piptools/scripts/options.py b/piptools/scripts/options.py
index ab456fcef..98fbbf7a1 100644
--- a/piptools/scripts/options.py
+++ b/piptools/scripts/options.py
@@ -343,14 +343,6 @@ def _get_default_option(option_name: str) -> Any:
constraint = click.option(
"-c",
"--constraint",
- type=click.... |
pytorch__pytorch-1403 | support ~ operator on ByteTensor
Currently not supported.
See: https://discuss.pytorch.org/t/how-do-use-logical-not-on-bytetensor/2074
| [
{
"content": "import torch\nfrom . import _tensor_str\nfrom ._utils import _type, _cuda, _range, _rebuild_tensor\nimport sys\n\n\nclass _TensorBase(object):\n #: bool: True if this is a CUDA tensor\n is_cuda = False\n is_sparse = False\n\n def new(self, *args, **kwargs):\n \"\"\"Constructs a ... | [
{
"content": "import torch\nfrom . import _tensor_str\nfrom ._utils import _type, _cuda, _range, _rebuild_tensor\nimport sys\n\n\nclass _TensorBase(object):\n #: bool: True if this is a CUDA tensor\n is_cuda = False\n is_sparse = False\n\n def new(self, *args, **kwargs):\n \"\"\"Constructs a ... | diff --git a/test/test_torch.py b/test/test_torch.py
index e5416b07e38b50..7e506feea3ca86 100644
--- a/test/test_torch.py
+++ b/test/test_torch.py
@@ -3129,6 +3129,10 @@ def test_logical_ops(self):
else:
self.assertFalse(x[idx] ^ y[idx])
+ invert_result = ~x
+ for idx in it... |
alltheplaces__alltheplaces-2874 | Spider tgifridays is broken
During the global build at 2021-05-26-14-42-23, spider **tgifridays** failed with **0 features** and **0 errors**.
Here's [the log](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/logs/tgifridays.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/tgif... | [
{
"content": "# -*- coding: utf-8 -*-\nimport datetime\nimport re\nimport json\n\nimport scrapy\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nDAY_MAPPING = {\n 'Monday': 'Mo',\n 'Tuesday': 'Tu',\n 'Wednesday': 'We',\n 'Thursday': 'Th',\n 'Friday': 'F... | [
{
"content": "# -*- coding: utf-8 -*-\nimport datetime\nimport re\nimport json\n\nimport scrapy\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nDAY_MAPPING = {\n 'Monday': 'Mo',\n 'Tuesday': 'Tu',\n 'Wednesday': 'We',\n 'Thursday': 'Th',\n 'Friday': 'F... | diff --git a/locations/spiders/tgifridays.py b/locations/spiders/tgifridays.py
index 38749732aea..e18ce6e6543 100644
--- a/locations/spiders/tgifridays.py
+++ b/locations/spiders/tgifridays.py
@@ -32,9 +32,9 @@ def parse_hours(self, hours):
opening_hours = OpeningHours()
for hour in hours:
- ... |
google-deepmind__dm-haiku-21 | Automatically test float64 compatibility on CPU and GPU
We should add the equivalent of this test:
https://github.com/deepmind/dm-haiku/blob/4bcbec9f874c847075ad666c7f3621c8c524af3b/haiku/_src/integration/bfloat16_test.py#L31
...except using float64. This involves enabling `--jax_enable_x64` for the test & fixing o... | [
{
"content": "# Lint as: python3\n# Copyright 2019 DeepMind Technologies Limited. 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.apach... | [
{
"content": "# Lint as: python3\n# Copyright 2019 DeepMind Technologies Limited. 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.apach... | diff --git a/haiku/_src/base.py b/haiku/_src/base.py
index 79f63fad2..1768e85b9 100644
--- a/haiku/_src/base.py
+++ b/haiku/_src/base.py
@@ -443,7 +443,7 @@ def transform(f, *, apply_rng=False) -> Transformed:
out = apply(params, rng, *a, **k)
Note that the ``rng`` argument is typically not required for `ap... |
microsoft__playwright-python-2216 | [BUG] NameError: name 'Page' is not defined (bad use of typing.cast() in playwright)
<!-- ⚠️⚠️ Do not delete this template ⚠️⚠️ -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Playwright release to see if your issue has already been fixed -->
<!-- 💡 Provide enoug... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | diff --git a/playwright/_impl/_frame.py b/playwright/_impl/_frame.py
index 2cfbb7240..2ce4372b6 100644
--- a/playwright/_impl/_frame.py
+++ b/playwright/_impl/_frame.py
@@ -156,7 +156,7 @@ def _setup_navigation_waiter(self, wait_name: str, timeout: float = None) -> Wai
waiter.reject_on_event(
self... |
ivy-llc__ivy-18003 | fft2
| [
{
"content": "# global\nimport ivy\nfrom ivy.functional.frontends.scipy.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n# fft\n@to_ivy_arrays_and_back\ndef fft(x, n=None, axis=-1, norm=\"backward\", overwrite_x=False):\n return ivy.fft(x, axis, norm=norm, n=n)\n\n\n# ifft\n@to_ivy_arrays_and_back\... | [
{
"content": "# global\nimport ivy\nfrom ivy.functional.frontends.scipy.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n# fft\n@to_ivy_arrays_and_back\ndef fft(x, n=None, axis=-1, norm=\"backward\", overwrite_x=False):\n return ivy.fft(x, axis, norm=norm, n=n)\n\n\n# ifft\n@to_ivy_arrays_and_back\... | diff --git a/ivy/functional/frontends/scipy/fft/fft.py b/ivy/functional/frontends/scipy/fft/fft.py
index b4b4679a5de71..f68359e9da62f 100644
--- a/ivy/functional/frontends/scipy/fft/fft.py
+++ b/ivy/functional/frontends/scipy/fft/fft.py
@@ -28,3 +28,8 @@ def dct(x, type=2, n=None, axis=-1, norm=None, overwrite_x=False,... |
Parsl__parsl-1305 | Fix IndexError when using CondorProvider with strategy enabled
```
2019-09-20 15:32:16.535 parsl.dataflow.flow_control:142 [ERROR] Flow control callback threw an exception - logging and proceeding anyway
Traceback (most recent call last):
File "/afs/crc.nd.edu/user/a/awoodard/.local/lib/python3.6/site-packages/pa... | [
{
"content": "import logging\nimport os\nimport re\nimport time\nimport typeguard\n\nfrom parsl.channels import LocalChannel\nfrom parsl.utils import RepresentationMixin\nfrom parsl.launchers import SingleNodeLauncher\nfrom parsl.providers.condor.template import template_string\nfrom parsl.providers.cluster_pro... | [
{
"content": "import logging\nimport os\nimport re\nimport time\nimport typeguard\n\nfrom parsl.channels import LocalChannel\nfrom parsl.utils import RepresentationMixin\nfrom parsl.launchers import SingleNodeLauncher\nfrom parsl.providers.condor.template import template_string\nfrom parsl.providers.cluster_pro... | diff --git a/parsl/providers/condor/condor.py b/parsl/providers/condor/condor.py
index d9b438b43e..be5c5a650c 100644
--- a/parsl/providers/condor/condor.py
+++ b/parsl/providers/condor/condor.py
@@ -143,8 +143,8 @@ def _status(self):
34524643.0 1
"""
- for line in stdout.strip().split('\n'):
... |
kartoza__prj.app-1146 | Download issue certificate link is broken
I get a 500 error when trying to download issued certificates from a course. Example link https://changelog.qgis.org/en/qgis/certifyingorganisation/spatial-thoughts/course/qgis_custimizing-qgis-with-python_2020-02-15-2020-02-15/download_zip/
<img width="1440" alt="download_e... | [
{
"content": "# coding=utf-8\n\nimport base64\nimport datetime\nfrom io import BytesIO\nimport os\nimport zipfile\nfrom PIL import Image\nimport re\nfrom decimal import Decimal\nfrom django.contrib import messages\nfrom django.core.mail import send_mail\nfrom django.http import (\n Http404, HttpResponse, Htt... | [
{
"content": "# coding=utf-8\n\nimport base64\nimport datetime\nfrom io import BytesIO\nimport os\nimport zipfile\nfrom PIL import Image\nimport re\nfrom decimal import Decimal\nfrom django.contrib import messages\nfrom django.core.mail import send_mail\nfrom django.http import (\n Http404, HttpResponse, Htt... | diff --git a/django_project/certification/views/certificate.py b/django_project/certification/views/certificate.py
index 65e73e626..8f11d3f3d 100644
--- a/django_project/certification/views/certificate.py
+++ b/django_project/certification/views/certificate.py
@@ -477,7 +477,7 @@ def download_certificates_zip(request, ... |
speechbrain__speechbrain-340 | Transformer Decoder
Hi,
I just found that the last step in the transformer decoder is incorrect.
https://github.com/speechbrain/speechbrain/blob/master/speechbrain/lobes/models/transformer/Transformer.py#L482
https://github.com/speechbrain/speechbrain/blob/master/speechbrain/lobes/models/transformer/Transforme... | [
{
"content": "\"\"\"Transformer implementaion in the SpeechBrain sytle\n\nAuthors\n* Jianyuan Zhong 2020\n\"\"\"\n\nimport torch\nimport math\nimport torch.nn as nn\nimport speechbrain as sb\nfrom typing import Optional\n\n\nclass TransformerInterface(nn.Module):\n \"\"\"This is an interface for transformer ... | [
{
"content": "\"\"\"Transformer implementaion in the SpeechBrain sytle\n\nAuthors\n* Jianyuan Zhong 2020\n\"\"\"\n\nimport torch\nimport math\nimport torch.nn as nn\nimport speechbrain as sb\nfrom typing import Optional\n\n\nclass TransformerInterface(nn.Module):\n \"\"\"This is an interface for transformer ... | diff --git a/speechbrain/lobes/models/transformer/Transformer.py b/speechbrain/lobes/models/transformer/Transformer.py
index 7044b319a6..666e43060b 100644
--- a/speechbrain/lobes/models/transformer/Transformer.py
+++ b/speechbrain/lobes/models/transformer/Transformer.py
@@ -479,11 +479,11 @@ def forward(
tgt =... |
aio-libs__aiohttp-7786 | RuntimeError: await wasn't used with future
### Describe the bug
This is a strange one, as it's not something that has ever happened to me, but one of my users reported as an reoccurring issue. There's no real repro steps. It seems like it's something wrong with my code, but I can't pin-point exactly what it is, and... | [
{
"content": "\"\"\"HTTP Client for asyncio.\"\"\"\n\nimport asyncio\nimport base64\nimport hashlib\nimport json\nimport os\nimport sys\nimport traceback\nimport warnings\nfrom contextlib import suppress\nfrom types import SimpleNamespace, TracebackType\nfrom typing import (\n TYPE_CHECKING,\n Any,\n A... | [
{
"content": "\"\"\"HTTP Client for asyncio.\"\"\"\n\nimport asyncio\nimport base64\nimport hashlib\nimport json\nimport os\nimport sys\nimport traceback\nimport warnings\nfrom contextlib import suppress\nfrom types import SimpleNamespace, TracebackType\nfrom typing import (\n TYPE_CHECKING,\n Any,\n A... | diff --git a/CHANGES/7785.bugfix b/CHANGES/7785.bugfix
new file mode 100644
index 00000000000..c24a5594c2f
--- /dev/null
+++ b/CHANGES/7785.bugfix
@@ -0,0 +1 @@
+Fixed a rare `RuntimeError: await wasn't used with future` exception -- by :user:`stalkerg`
diff --git a/aiohttp/client.py b/aiohttp/client.py
index 93e9b34c6... |
Mailu__Mailu-2982 | Use official clamav docker image for Mailu clamav image
With https://github.com/Cisco-Talos/clamav having official docker support https://hub.docker.com/r/clamav/clamav it might be worth considering referring or preferring that container in the future?
| [
{
"content": "#!/usr/bin/env python3\n\nimport os\nimport logging as logger\nimport sys\nfrom socrate import system\n\nsystem.set_env(log_filters=r'SelfCheck: Database status OK\\.$')\n\n# Bootstrap the database if clamav is running for the first time\nif not os.path.isfile(\"/data/main.cvd\"):\n logger.info... | [
{
"content": null,
"path": "optional/clamav/start.py"
}
] | diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml
index 10c248d72..9c2ff02d5 100644
--- a/.github/workflows/build_test_deploy.yml
+++ b/.github/workflows/build_test_deploy.yml
@@ -474,7 +474,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- target: ["... |
mirumee__ariadne-183 | Move documentation to separate repo and host it on gh-pages
Sphinx has served us well, but we fell its too limiting for what we have planned for Ariadne.
We've decided to migrate the site to the [Docusaurus](https://docusaurus.io) and keep it on separate repo.
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup ------------------------------... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup ------------------------------... | diff --git a/README.md b/README.md
index 1b80531e3..cf896fa4c 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-
+[](https://ariadnegraphql.org)
-[;\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/L... | [
{
"content": "#!/usr/bin/env python3\n# Copyright 2020 The Kubeflow Pipleines 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/L... | diff --git a/backend/Dockerfile b/backend/Dockerfile
index c780a365d3f..02de07b98bc 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -35,7 +35,7 @@ RUN set -e; \
pipeline_py="${pipeline_yaml%.yaml}"; \
mv "$pipeline_py" "${pipeline_py}.tmp"; \
echo 'import kfp; kfp.components.defau... |
keras-team__keras-core-616 | TensorFlow CuDnn GPU Test Failure - GRU & LSTM
When I run
Open Terminal in Colab Pro with GPU:
```
git clone https://github.com/keras-team/keras-core.git
cd keras-core
# Updating TensorFlow in Colab to 2.13 version.
pip install -U tensorflow
# Run with TF backend for RNN (LSTM / Gru)
KERAS_BACKEND=tensorflow... | [
{
"content": "import platform\nimport warnings\n\nfrom keras_core import backend\nfrom keras_core import metrics as metrics_module\nfrom keras_core import ops\nfrom keras_core import optimizers\nfrom keras_core.saving import serialization_lib\nfrom keras_core.trainers.compile_utils import CompileLoss\nfrom kera... | [
{
"content": "import platform\nimport warnings\n\nfrom keras_core import backend\nfrom keras_core import metrics as metrics_module\nfrom keras_core import ops\nfrom keras_core import optimizers\nfrom keras_core.saving import serialization_lib\nfrom keras_core.trainers.compile_utils import CompileLoss\nfrom kera... | diff --git a/keras_core/trainers/trainer.py b/keras_core/trainers/trainer.py
index 6ec53fe6e..a7183949c 100644
--- a/keras_core/trainers/trainer.py
+++ b/keras_core/trainers/trainer.py
@@ -100,7 +100,14 @@ def jit_compile(self):
@jit_compile.setter
def jit_compile(self, value):
- self._jit_compile = ... |
nilearn__nilearn-4325 | [BUG] `save_glm_to_bids` fails when the model is constructed with 'non-serializable' parameters
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Operating system
- [X] Linux
- [ ] Mac
- [ ] Windows
### Operating system version
For example one of the following:
- L... | [
{
"content": "\"\"\"Functions for generating BIDS-compliant GLM outputs.\"\"\"\n\nimport json\nimport os\nimport warnings\n\nimport numpy as np\n\nfrom nilearn import __version__\n\n\ndef _clean_contrast_name(contrast_name):\n \"\"\"Remove prohibited characters from name and convert to camelCase.\n\n .. v... | [
{
"content": "\"\"\"Functions for generating BIDS-compliant GLM outputs.\"\"\"\n\nimport json\nimport os\nimport warnings\n\nimport numpy as np\n\nfrom nilearn import __version__\n\n\ndef _clean_contrast_name(contrast_name):\n \"\"\"Remove prohibited characters from name and convert to camelCase.\n\n .. v... | diff --git a/doc/changes/latest.rst b/doc/changes/latest.rst
index 54ccbdbe38..8a3b0e45c4 100644
--- a/doc/changes/latest.rst
+++ b/doc/changes/latest.rst
@@ -18,6 +18,9 @@ Fixes
- :bdg-dark:`Code` Masker reports tables do not overlap with report image (:gh:`4308` by `Rémi Gau`_).
- :bdg-dark:`Code` Fix color bar h... |
kivy__kivy-6344 | Screen already managed by another ScreenManager (kivy users)
as reported on kivy-users, the showcase demo crashes when using any of the ShaderTransitions.
## <bountysource-plugin>
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/9558285-screen-already-managed-by-another-screenmanag... | [
{
"content": "'''Screen Manager\n==============\n\n.. image:: images/screenmanager.gif\n :align: right\n\n.. versionadded:: 1.4.0\n\nThe screen manager is a widget dedicated to managing multiple screens for your\napplication. The default :class:`ScreenManager` displays only one\n:class:`Screen` at a time and... | [
{
"content": "'''Screen Manager\n==============\n\n.. image:: images/screenmanager.gif\n :align: right\n\n.. versionadded:: 1.4.0\n\nThe screen manager is a widget dedicated to managing multiple screens for your\napplication. The default :class:`ScreenManager` displays only one\n:class:`Screen` at a time and... | diff --git a/kivy/uix/screenmanager.py b/kivy/uix/screenmanager.py
index 49952f81e5..538bf35c54 100644
--- a/kivy/uix/screenmanager.py
+++ b/kivy/uix/screenmanager.py
@@ -497,7 +497,6 @@ def _remove_out_canvas(self, *args):
def add_screen(self, screen):
self.screen_in.pos = self.screen_out.pos
se... |
mne-tools__mne-python-9296 | BUG: next epochs when data not preloaded throws error
Issue only on dev
```python
import mne
from mne import io
from mne.datasets import sample
data_path = sample.data_path()
raw_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif'
event_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Some utility functions.\"\"\"\n# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>\n#\n# License: BSD (3-clause)\n\nfrom collections import OrderedDict\nfrom copy import deepcopy\nimport logging\nimport json\n\nimport numpy as np\n\nfrom .check import _check_... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Some utility functions.\"\"\"\n# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>\n#\n# License: BSD (3-clause)\n\nfrom collections import OrderedDict\nfrom copy import deepcopy\nimport logging\nimport json\n\nimport numpy as np\n\nfrom .check import _check_... | diff --git a/mne/tests/test_epochs.py b/mne/tests/test_epochs.py
index 1187b758264..445c05c931a 100644
--- a/mne/tests/test_epochs.py
+++ b/mne/tests/test_epochs.py
@@ -1780,6 +1780,27 @@ def test_iter_evoked():
assert_array_equal(x, y)
+@pytest.mark.parametrize('preload', (True, False))
+def test_iter_epo... |
rasterio__rasterio-748 | rio warp --like does not consider dtype
The rio warp help text says
```
--like PATH Raster dataset to use as a template for
obtaining affine transform (bounds and
resolution), crs, data type, and driver used
... | [
{
"content": "import logging\nfrom math import ceil\nimport warnings\n\nimport click\nfrom cligj import files_inout_arg, format_opt\n\nfrom .helpers import resolve_inout\nfrom . import options\nimport rasterio\nfrom rasterio import crs\nfrom rasterio.env import Env\nfrom rasterio.errors import CRSError\nfrom ra... | [
{
"content": "import logging\nfrom math import ceil\nimport warnings\n\nimport click\nfrom cligj import files_inout_arg, format_opt\n\nfrom .helpers import resolve_inout\nfrom . import options\nimport rasterio\nfrom rasterio import crs\nfrom rasterio.env import Env\nfrom rasterio.errors import CRSError\nfrom ra... | diff --git a/rasterio/rio/warp.py b/rasterio/rio/warp.py
index 874d5e5b6..ec39b6076 100644
--- a/rasterio/rio/warp.py
+++ b/rasterio/rio/warp.py
@@ -48,7 +48,11 @@ def x_dst_bounds_handler(ctx, param, value):
@files_inout_arg
@options.output_opt
@format_opt
-@options.like_file_opt
+@click.option(
+ '--like',
+ ... |
rasterio__rasterio-1192 | query params in https url is not working
Hi
I wanted to use rasterio with a https url that has query-params, for example: https://.....?a=a&b=b
First I wanted to see if gdal supports that kind of url and gdal does, so I looked for the code in rasterio that is responsible for cutting the url,
It can be found he... | [
{
"content": "\"\"\"Implementation of Apache VFS schemes and URLs.\"\"\"\n\nimport os\n\nfrom rasterio.compat import urlparse\n\n\n# NB: As not to propagate fallacies of distributed computing, Rasterio\n# does not support HTTP or FTP URLs via GDAL's vsicurl handler. Only\n# the following local filesystem scheme... | [
{
"content": "\"\"\"Implementation of Apache VFS schemes and URLs.\"\"\"\n\nimport os\n\nfrom rasterio.compat import urlparse\n\n\n# NB: As not to propagate fallacies of distributed computing, Rasterio\n# does not support HTTP or FTP URLs via GDAL's vsicurl handler. Only\n# the following local filesystem scheme... | diff --git a/CHANGES.txt b/CHANGES.txt
index 5f919cfbc..c4dc5490d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,10 @@ Changes
Next
----
+New features:
+
+- ``rasterio.open()`` now accepts URLs with GET parameters (#1121).
+
Bug fixes:
- Pad boundless read VRTs so we don't overflow due to rounding (#1184... |
weni-ai__bothub-engine-238 | Updates incorrect order
<img width="1060" alt="screen shot 2018-10-10 at 10 44 30 am" src="https://user-images.githubusercontent.com/8301135/46740768-fcd92b00-cc79-11e8-9d12-c19a2feb7768.png">
| [
{
"content": "from rest_framework.viewsets import GenericViewSet\nfrom rest_framework import mixins\nfrom rest_framework import permissions\nfrom rest_framework.decorators import detail_route\nfrom rest_framework.response import Response\nfrom rest_framework.exceptions import APIException\nfrom rest_framework.e... | [
{
"content": "from rest_framework.viewsets import GenericViewSet\nfrom rest_framework import mixins\nfrom rest_framework import permissions\nfrom rest_framework.decorators import detail_route\nfrom rest_framework.response import Response\nfrom rest_framework.exceptions import APIException\nfrom rest_framework.e... | diff --git a/bothub/api/v1/views.py b/bothub/api/v1/views.py
index 95deb2cc..18538fd0 100644
--- a/bothub/api/v1/views.py
+++ b/bothub/api/v1/views.py
@@ -989,7 +989,7 @@ class RepositoryUpdatesViewSet(
mixins.ListModelMixin,
GenericViewSet):
queryset = RepositoryUpdate.objects.filter(
- train... |
saulpw__visidata-625 | [help keystrokes] Help keystrokes has longnames for about 20 commands
**Small description**
Keystrokes in HelpSheet display commands not keystrokes for about 20 commands.
**Expected result**
Keystroke values
**Actual result with screenshot**
sheet longname keystrokes
TableSheet go-next-selected next-selecte... | [
{
"content": "from visidata import *\n\n\nclass HelpSheet(MetaSheet):\n 'Show all commands available to the source sheet.'\n rowtype = 'commands'\n precious = False\n _ordering = [('sheet', False), ('longname', False)]\n\n columns = [\n ColumnAttr('sheet'),\n ColumnAttr('longname'),... | [
{
"content": "from visidata import *\n\n\nclass HelpSheet(MetaSheet):\n 'Show all commands available to the source sheet.'\n rowtype = 'commands'\n precious = False\n _ordering = [('sheet', False), ('longname', False)]\n\n columns = [\n ColumnAttr('sheet'),\n ColumnAttr('longname'),... | diff --git a/visidata/help.py b/visidata/help.py
index 5314e250f..536dc040e 100644
--- a/visidata/help.py
+++ b/visidata/help.py
@@ -36,7 +36,7 @@ def iterload(self):
self.revbinds = {} # [longname] -> keystrokes
itbindings = vd.bindkeys.iterall()
for (keystrokes, _), longname in itbindings:... |
scrapy__scrapy-475 | Ability to not send specific headers in HTTP requests
Some web servers behave differently when they are receive or don't receive specific headers.
For example FeedBurner (http://feeds.feedburner.com/someblog) sends out XML RSS feeds **only is you do not set the "Referer" header.**
The idea would be to use the `header... | [
{
"content": "from w3lib.http import headers_dict_to_raw\nfrom scrapy.utils.datatypes import CaselessDict\n\n\nclass Headers(CaselessDict):\n \"\"\"Case insensitive http headers dictionary\"\"\"\n\n def __init__(self, seq=None, encoding='utf-8'):\n self.encoding = encoding\n super(Headers, s... | [
{
"content": "from w3lib.http import headers_dict_to_raw\nfrom scrapy.utils.datatypes import CaselessDict\n\n\nclass Headers(CaselessDict):\n \"\"\"Case insensitive http headers dictionary\"\"\"\n\n def __init__(self, seq=None, encoding='utf-8'):\n self.encoding = encoding\n super(Headers, s... | diff --git a/scrapy/http/headers.py b/scrapy/http/headers.py
index cffe7aab8c9..35ceadeebb9 100644
--- a/scrapy/http/headers.py
+++ b/scrapy/http/headers.py
@@ -17,7 +17,9 @@ def normkey(self, key):
def normvalue(self, value):
"""Headers must not be unicode"""
- if not hasattr(value, '__iter__'):... |
Theano__Theano-3369 | Add a 'name' argument to '.copy' method of Theano variables.
See the discussion in https://github.com/mila-udem/blocks/issues/784.
| [
{
"content": "import copy\nimport traceback as tb\nimport warnings\n\nimport numpy\nfrom six.moves import xrange\n\nimport theano\nfrom theano.compat import PY3\nfrom theano.scalar import ComplexError, IntegerDivisionError\nfrom theano.gof import Constant, Variable\nfrom theano.gof.utils import hashtype\nfrom t... | [
{
"content": "import copy\nimport traceback as tb\nimport warnings\n\nimport numpy\nfrom six.moves import xrange\n\nimport theano\nfrom theano.compat import PY3\nfrom theano.scalar import ComplexError, IntegerDivisionError\nfrom theano.gof import Constant, Variable\nfrom theano.gof.utils import hashtype\nfrom t... | diff --git a/theano/tensor/tests/test_var.py b/theano/tensor/tests/test_var.py
index 6829e28ec4b..19056fcdad8 100644
--- a/theano/tensor/tests/test_var.py
+++ b/theano/tensor/tests/test_var.py
@@ -1,4 +1,5 @@
import numpy as np
+from numpy.testing import assert_equal, assert_string_equal
import theano
import thean... |
arviz-devs__arviz-2332 | arviz not compatible with pre-releases
**Describe the bug**
> import arviz as az
> /opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/arviz/init.py:34: in
> from .plots import *
> /opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/arviz/plots/init.py:2: in
> from .autocorrplot i... | [
{
"content": "# pylint: disable=invalid-name,too-many-lines\n\"\"\"Density estimation functions for ArviZ.\"\"\"\nimport warnings\n\nimport numpy as np\nfrom scipy.fftpack import fft\nfrom scipy.optimize import brentq\nfrom scipy.signal import convolve, convolve2d, gaussian # pylint: disable=no-name-in-module\... | [
{
"content": "# pylint: disable=invalid-name,too-many-lines\n\"\"\"Density estimation functions for ArviZ.\"\"\"\nimport warnings\n\nimport numpy as np\nfrom scipy.fftpack import fft\nfrom scipy.optimize import brentq\nfrom scipy.signal import convolve, convolve2d\nfrom scipy.signal.windows import gaussian\nfro... | diff --git a/arviz/stats/density_utils.py b/arviz/stats/density_utils.py
index ac0bb79acd..47b30db3a8 100644
--- a/arviz/stats/density_utils.py
+++ b/arviz/stats/density_utils.py
@@ -5,7 +5,8 @@
import numpy as np
from scipy.fftpack import fft
from scipy.optimize import brentq
-from scipy.signal import convolve, con... |
pulp__pulpcore-3013 | django-admin dump-permissions command fails
`
django-admin dump-permissions --settings=pulpcore.app.settings
Traceback (most recent call last):
File "/var/lib/pulp/pulpvenv/bin/django-admin", line 8, in <module>
sys.exit(execute_from_command_line())
File "/var/lib/pulp/pulpvenv/lib64/python3.8/site-packag... | [
{
"content": "from gettext import gettext as _\nfrom functools import lru_cache\nimport json\nimport sys\n\nfrom django.db import connection\nfrom django.core.management import BaseCommand, CommandError\nfrom django.contrib.contenttypes.models import ContentType\n\nfrom pulpcore.app.util import get_url\n\n\nSEP... | [
{
"content": "from gettext import gettext as _\nfrom functools import lru_cache\nimport json\nimport sys\n\nfrom django.db import connection\nfrom django.core.management import BaseCommand, CommandError\nfrom django.contrib.contenttypes.models import ContentType\n\nfrom pulpcore.app.util import get_url\n\n\nSEP... | diff --git a/CHANGES/3011.bugfix b/CHANGES/3011.bugfix
new file mode 100644
index 0000000000..7ba10eae60
--- /dev/null
+++ b/CHANGES/3011.bugfix
@@ -0,0 +1 @@
+Fixed variable referenced before assignment error in ``django-admin dump-permissions``.
diff --git a/pulpcore/app/management/commands/dump-permissions.py b/pulp... |
ivy-llc__ivy-18290 | linear
#15051
| [
{
"content": "# local\nimport ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@to_ivy_arrays_and_back\n@with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\ndef cosine_similarity(x1, x2... | [
{
"content": "# local\nimport ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@to_ivy_arrays_and_back\n@with_supported_dtypes({\"2.5.0 and below\": (\"float32\", \"float64\")}, \"paddle\")\ndef cosine_similarity(x1, x2... | diff --git a/ivy/functional/frontends/paddle/nn/functional/common.py b/ivy/functional/frontends/paddle/nn/functional/common.py
index 4f08740b9f909..9685a1ff3759f 100644
--- a/ivy/functional/frontends/paddle/nn/functional/common.py
+++ b/ivy/functional/frontends/paddle/nn/functional/common.py
@@ -85,3 +85,10 @@ def zero... |
searx__searx-3208 | Suggestions doesn't look right
<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARX -->
**Version of Searx, commit number if you are using on master branch and stipulate if you forked Searx**
Commit f231d79a5ddd2ff211e401fe6ea2250325df116f
**How did you install Searx?**
Using the official Nginx... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n\"\"\"\n Yahoo (Web)\n\"\"\"\n\nfrom urllib.parse import (\n unquote,\n urlencode,\n)\nfrom lxml import html\n\nfrom searx.utils import (\n eval_xpath_getindex,\n eval_xpath_list,\n extract_text,\n match_language,\n)\n\n# about\nabout... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n\"\"\"\n Yahoo (Web)\n\"\"\"\n\nfrom urllib.parse import (\n unquote,\n urlencode,\n)\nfrom lxml import html\n\nfrom searx.utils import (\n eval_xpath_getindex,\n eval_xpath_list,\n extract_text,\n match_language,\n)\n\n# about\nabout... | diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py
index 71f9322580..591dd50186 100644
--- a/searx/engines/yahoo.py
+++ b/searx/engines/yahoo.py
@@ -143,7 +143,7 @@ def response(resp):
'title': title,
'content': content})
- for suggestion in eval_xpath_li... |
OpenMined__PySyft-3442 | Move() on same machine
Dear all,
I was not sure whether to classify this as a "bug" or "new feature", please move it in case this is wrong.
Is the behavior of the move() method intended to throw an error, when trying to move an object to a virtual worker that already possesses the object?
In case this happens, a o... | [
{
"content": "from typing import List, Union\n\nimport syft\nfrom syft.generic.frameworks.hook.hook_args import one\nfrom syft.generic.frameworks.hook.hook_args import register_type_rule\nfrom syft.generic.frameworks.hook.hook_args import register_forward_func\nfrom syft.generic.frameworks.hook.hook_args import... | [
{
"content": "from typing import List, Union\n\nimport syft\nfrom syft.generic.frameworks.hook.hook_args import one\nfrom syft.generic.frameworks.hook.hook_args import register_type_rule\nfrom syft.generic.frameworks.hook.hook_args import register_forward_func\nfrom syft.generic.frameworks.hook.hook_args import... | diff --git a/syft/generic/pointers/pointer_tensor.py b/syft/generic/pointers/pointer_tensor.py
index ccf7539714c..78ba6f14a5d 100644
--- a/syft/generic/pointers/pointer_tensor.py
+++ b/syft/generic/pointers/pointer_tensor.py
@@ -274,6 +274,9 @@ def move(self, destination: AbstractWorker, requires_grad: bool = False):
... |
buildbot__buildbot-1447 | gerritchangesource: add gerritprojects option.
It adds the 'gerritprojects' to GerritChangeSource and
GerritEventLogPoller so that it can be set a list of
projects which events should be handled. By default
events of any project is handled.
| [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | diff --git a/master/buildbot/steps/source/git.py b/master/buildbot/steps/source/git.py
index 97801956f9e7..48748ae1a1d7 100644
--- a/master/buildbot/steps/source/git.py
+++ b/master/buildbot/steps/source/git.py
@@ -577,6 +577,9 @@ def checkWithPathExists(exists):
d = self.runCommand(cmd)
def... |
sopel-irc__sopel-2371 | config: FilenameAttribute doesn't handle quotes well
### Description
If the value of a `FilenameAttribute` set in the config file is quoted, it silently creates a mess.
### Reproduction steps
1. Set `core.logdir = "/path/to/logs"`
2. Run Sopel
3. Sopel quietly creates a silly directory tree inside `$HOMEDIR`:
`... | [
{
"content": "\"\"\"Types for creating section definitions.\n\nA section definition consists of a subclass of :class:`StaticSection`, on which\nany number of subclasses of :class:`BaseValidated` (a few common ones of which\nare available in this module) are assigned as attributes. These descriptors\ndefine how ... | [
{
"content": "\"\"\"Types for creating section definitions.\n\nA section definition consists of a subclass of :class:`StaticSection`, on which\nany number of subclasses of :class:`BaseValidated` (a few common ones of which\nare available in this module) are assigned as attributes. These descriptors\ndefine how ... | diff --git a/sopel/config/types.py b/sopel/config/types.py
index b70add4e6..de8100380 100644
--- a/sopel/config/types.py
+++ b/sopel/config/types.py
@@ -697,6 +697,11 @@ def _parse(self, value, settings, section):
if not value:
return self.parse(value)
+ if value.startswith('"') and value... |
pretix__pretix-926 | Widget code generator compatibility mode required
Currently, it is required to check the checkbox for compatibility mode, because the form field definition doesn't include `required=False`. Therefore I cannot access the not compatibility widget code.
https://github.com/pretix/pretix/blob/ab67eea36e77104c9577a8be907... | [
{
"content": "from django import forms\nfrom django.conf import settings\nfrom django.contrib.auth.hashers import check_password\nfrom django.core.exceptions import ValidationError\nfrom django.core.validators import RegexValidator\nfrom django.db.models import Q\nfrom django.forms import formset_factory\nfrom ... | [
{
"content": "from django import forms\nfrom django.conf import settings\nfrom django.contrib.auth.hashers import check_password\nfrom django.core.exceptions import ValidationError\nfrom django.core.validators import RegexValidator\nfrom django.db.models import Q\nfrom django.forms import formset_factory\nfrom ... | diff --git a/src/pretix/control/forms/event.py b/src/pretix/control/forms/event.py
index 245e25fbd39..fd664faea80 100644
--- a/src/pretix/control/forms/event.py
+++ b/src/pretix/control/forms/event.py
@@ -984,6 +984,7 @@ class WidgetCodeForm(forms.Form):
)
compatibility_mode = forms.BooleanField(
lab... |
huggingface__optimum-1428 | Running ORT stable diffusion downloads openvino_model.xml
### System Info
```shell
optimum main
transformers main
diffusers 0.20
huggingface-hub 0.16.4
```
### Who can help?
/
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the ... | [
{
"content": "# Copyright 2023 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2... | [
{
"content": "# Copyright 2023 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2... | diff --git a/optimum/onnxruntime/modeling_diffusion.py b/optimum/onnxruntime/modeling_diffusion.py
index 123bcdbd92..bc0d17a93a 100644
--- a/optimum/onnxruntime/modeling_diffusion.py
+++ b/optimum/onnxruntime/modeling_diffusion.py
@@ -315,7 +315,7 @@ def _from_pretrained(
use_auth_token=use_auth_token,... |
encode__httpx-2667 | httpx 0.24 documentation issue for netrc support
Thanks to @alexprengere for raising this issue...
### Discussed in https://github.com/encode/httpx/discussions/2665
<div type='discussions-op-text'>
<sup>Originally posted by **alexprengere** April 18, 2023</sup>
From the docs: https://www.python-httpx.org/adv... | [
{
"content": "import hashlib\nimport netrc\nimport os\nimport re\nimport time\nimport typing\nfrom base64 import b64encode\nfrom urllib.request import parse_http_list\n\nfrom ._exceptions import ProtocolError\nfrom ._models import Request, Response\nfrom ._utils import to_bytes, to_str, unquote\n\nif typing.TYP... | [
{
"content": "import hashlib\nimport netrc\nimport os\nimport re\nimport time\nimport typing\nfrom base64 import b64encode\nfrom urllib.request import parse_http_list\n\nfrom ._exceptions import ProtocolError\nfrom ._models import Request, Response\nfrom ._utils import to_bytes, to_str, unquote\n\nif typing.TYP... | diff --git a/httpx/_auth.py b/httpx/_auth.py
index e67e0c15c4..1d7385d573 100644
--- a/httpx/_auth.py
+++ b/httpx/_auth.py
@@ -147,7 +147,7 @@ class NetRCAuth(Auth):
Use a 'netrc' file to lookup basic auth credentials based on the url host.
"""
- def __init__(self, file: typing.Optional[str]):
+ def _... |
tournesol-app__tournesol-244 | Set up end-to-end tests
| [
{
"content": "\"\"\"\nDjango settings for settings project.\n\nGenerated by 'django-admin startproject' using Django 3.2.4.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/3.2/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/... | [
{
"content": "\"\"\"\nDjango settings for settings project.\n\nGenerated by 'django-admin startproject' using Django 3.2.4.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/3.2/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/... | diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
new file mode 100644
index 0000000000..c361f656c9
--- /dev/null
+++ b/.github/workflows/e2e.yml
@@ -0,0 +1,41 @@
+name: Run end-to-end tests
+
+on:
+ push:
+ branches:
+ - 'main'
+ pull_request:
+ # Allows to run this workflow manually from t... |
lhotse-speech__lhotse-240 | Cut concatenate doesn't consider the first sample in each batch
Found in #234
| [
{
"content": "from typing import Optional, Sequence\n\nfrom lhotse import CutSet\nfrom lhotse.cut import AnyCut\nfrom lhotse.utils import Seconds\n\n\nclass CutConcatenate:\n \"\"\"\n A transform on batch of cuts (``CutSet``) that concatenates the cuts to minimize the total amount of padding;\n e.g. in... | [
{
"content": "from typing import Optional, Sequence\n\nfrom lhotse import CutSet\nfrom lhotse.cut import AnyCut\nfrom lhotse.utils import Seconds\n\n\nclass CutConcatenate:\n \"\"\"\n A transform on batch of cuts (``CutSet``) that concatenates the cuts to minimize the total amount of padding;\n e.g. in... | diff --git a/lhotse/dataset/cut_transforms/concatenate.py b/lhotse/dataset/cut_transforms/concatenate.py
index 5f162cea2..c28fa1b03 100644
--- a/lhotse/dataset/cut_transforms/concatenate.py
+++ b/lhotse/dataset/cut_transforms/concatenate.py
@@ -62,7 +62,7 @@ def concat_cuts(
return CutSet.from_cuts(cuts)
... |
open-mmlab__mmocr-221 | Make default ingnored class to -100 in SDMGRLoss
In most cases, class 0 should not be ignored.
ref https://github.com/open-mmlab/mmocr/blob/main/mmocr/models/kie/losses/sdmgr_loss.py#L17
| [
{
"content": "import torch\nfrom torch import nn\n\nfrom mmdet.models.builder import LOSSES\nfrom mmdet.models.losses import accuracy\n\n\n@LOSSES.register_module()\nclass SDMGRLoss(nn.Module):\n \"\"\"The implementation the loss of key information extraction proposed in\n the paper: Spatial Dual-Modality... | [
{
"content": "import torch\nfrom torch import nn\n\nfrom mmdet.models.builder import LOSSES\nfrom mmdet.models.losses import accuracy\n\n\n@LOSSES.register_module()\nclass SDMGRLoss(nn.Module):\n \"\"\"The implementation the loss of key information extraction proposed in\n the paper: Spatial Dual-Modality... | diff --git a/configs/kie/sdmgr/README.md b/configs/kie/sdmgr/README.md
index d0de5641d..4d041f0bc 100644
--- a/configs/kie/sdmgr/README.md
+++ b/configs/kie/sdmgr/README.md
@@ -21,5 +21,5 @@
| Method | Modality | Macro F1-Score | ... |
secdev__scapy-4403 | Scapy overides platform
Scapy exports the platform name, and could override the platform module. This is likely the issue: https://github.com/secdev/scapy/blob/b0506a1e22321eba41d5c21d26bba418de04bc8f/scapy/consts.py#L10
Here are the example:
```shell
python issue.py
<class 'str'>
<class 'module'>
```
```... | [
{
"content": "# SPDX-License-Identifier: GPL-2.0-only\n# This file is part of Scapy\n# See https://scapy.net/ for more information\n# Copyright (C) Philippe Biondi <phil@secdev.org>\n\n\"\"\"\nThis file contains constants\n\"\"\"\n\nfrom sys import byteorder, platform, maxsize\nimport platform as platform_lib\n... | [
{
"content": "# SPDX-License-Identifier: GPL-2.0-only\n# This file is part of Scapy\n# See https://scapy.net/ for more information\n# Copyright (C) Philippe Biondi <phil@secdev.org>\n\n\"\"\"\nThis file contains constants\n\"\"\"\n\nfrom sys import byteorder, platform, maxsize\nimport platform as platform_lib\n... | diff --git a/scapy/consts.py b/scapy/consts.py
index ecff481ed29..ed8ce90c723 100644
--- a/scapy/consts.py
+++ b/scapy/consts.py
@@ -10,6 +10,20 @@
from sys import byteorder, platform, maxsize
import platform as platform_lib
+__all__ = [
+ "LINUX",
+ "OPENBSD",
+ "FREEBSD",
+ "NETBSD",
+ "DARWIN",
+ ... |
scalableminds__webknossos-libs-796 | auto-detect conversion should allow --pad
the --pad option is available for convert_image_stack (I think?) but not for the auto-detect converter. Thus, it is not available for the wk-worker
| [
{
"content": "import logging\nfrom argparse import ArgumentParser, Namespace\nfrom os import path, sep\nfrom pathlib import Path\nfrom typing import Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, cast\n\nfrom webknossos.dataset.properties import LayerViewConfiguration\n\nfrom ._internal.image_reader... | [
{
"content": "import logging\nfrom argparse import ArgumentParser, Namespace\nfrom os import path, sep\nfrom pathlib import Path\nfrom typing import Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, cast\n\nfrom webknossos.dataset.properties import LayerViewConfiguration\n\nfrom ._internal.image_reader... | diff --git a/wkcuber/Changelog.md b/wkcuber/Changelog.md
index 815a4be1f..75ed8bb70 100644
--- a/wkcuber/Changelog.md
+++ b/wkcuber/Changelog.md
@@ -12,6 +12,7 @@ For upgrade instructions, please check the respective *Breaking Changes* section
### Breaking Changes
### Added
+- The modules `wkcuber` and `wkcuber.con... |
python-discord__bot-747 | Pagniation breaks when skipping to last page
Using the ⏭️ reaction to skip to the last page causes an exception.

The prime suspect appears to be this line:
https://github.com/python-discord/bot/blob/7... | [
{
"content": "import asyncio\nimport logging\nfrom typing import Iterable, List, Optional, Tuple\n\nfrom discord import Embed, Member, Message, Reaction\nfrom discord.abc import User\nfrom discord.ext.commands import Context, Paginator\n\nfrom bot import constants\n\nFIRST_EMOJI = \"\\u23EE\" # [:track_previo... | [
{
"content": "import asyncio\nimport logging\nfrom typing import Iterable, List, Optional, Tuple\n\nfrom discord import Embed, Member, Message, Reaction\nfrom discord.abc import User\nfrom discord.ext.commands import Context, Paginator\n\nfrom bot import constants\n\nFIRST_EMOJI = \"\\u23EE\" # [:track_previo... | diff --git a/bot/pagination.py b/bot/pagination.py
index 35870c0401..e82763912d 100644
--- a/bot/pagination.py
+++ b/bot/pagination.py
@@ -410,7 +410,7 @@ def check_event(reaction_: Reaction, member: Member) -> bool:
log.debug("Got last page reaction, but we're on the last page - ignoring")
... |
buildbot__buildbot-5302 | gitpoller: failed with exit code 128: fatal: bad object
```
buildbot_1 | 2019-12-16 14:43:59+0000 [-] trying to poll branch refs/heads/5.3 of https://github.com/aliceinwire/linux-patches
buildbot_1 | Traceback (most recent call last):
buildbot_1 | File "/usr/lib/... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | diff --git a/master/buildbot/changes/gitpoller.py b/master/buildbot/changes/gitpoller.py
index 84b34cf1a476..a0fd133655c2 100644
--- a/master/buildbot/changes/gitpoller.py
+++ b/master/buildbot/changes/gitpoller.py
@@ -302,7 +302,8 @@ def _process_changes(self, newRev, branch):
return
# get the ... |
OpenNMT__OpenNMT-tf-834 | Mixed Precision error training with RNN models
I am getting an error when running Sequence to Sequence models with mixed precision.
Models I have encountered this issue with:
- NMTSmallV1
- NMTBigV1
The models will work fine if I remove the option _--mixed_precision_
I can also run a Transformer model fine w... | [
{
"content": "\"\"\"Base class and functions for dynamic decoders.\"\"\"\n\nimport abc\n\nimport tensorflow as tf\n\nfrom opennmt import constants\nfrom opennmt.inputters import text_inputter\nfrom opennmt.layers import common\nfrom opennmt.utils import decoding\nfrom opennmt.utils import misc\n\n\ndef get_samp... | [
{
"content": "\"\"\"Base class and functions for dynamic decoders.\"\"\"\n\nimport abc\n\nimport tensorflow as tf\n\nfrom opennmt import constants\nfrom opennmt.inputters import text_inputter\nfrom opennmt.layers import common\nfrom opennmt.utils import decoding\nfrom opennmt.utils import misc\n\n\ndef get_samp... | diff --git a/opennmt/decoders/decoder.py b/opennmt/decoders/decoder.py
index 48f203ac5..8a0131321 100644
--- a/opennmt/decoders/decoder.py
+++ b/opennmt/decoders/decoder.py
@@ -341,7 +341,7 @@ def _body(step, state, inputs, outputs_ta, attention_ta):
step = tf.constant(0, dtype=tf.int32)
outputs_ta ... |
getredash__redash-1084 | Duplicate alerts
### Issue Summary
Alerts are duplicated when listing them in the UI. Maybe related to https://github.com/getredash/redash/issues/986?
### Steps to Reproduce
1. Create a user who belongs to multiple groups
2. Create an alert
Screenshot: http://puu.sh/oMLK5/9cfc8c6134.png (only 2 records are present in... | [
{
"content": "import json\nfrom flask_login import UserMixin, AnonymousUserMixin\nimport hashlib\nimport logging\nimport os\nimport threading\nimport time\nimport datetime\nimport itertools\nfrom funcy import project\n\nimport peewee\nfrom passlib.apps import custom_app_context as pwd_context\nfrom playhouse.gf... | [
{
"content": "import json\nfrom flask_login import UserMixin, AnonymousUserMixin\nimport hashlib\nimport logging\nimport os\nimport threading\nimport time\nimport datetime\nimport itertools\nfrom funcy import project\n\nimport peewee\nfrom passlib.apps import custom_app_context as pwd_context\nfrom playhouse.gf... | diff --git a/redash/models.py b/redash/models.py
index 8eb346521c..9d1aa06fa6 100644
--- a/redash/models.py
+++ b/redash/models.py
@@ -755,7 +755,8 @@ def all(cls, groups):
.join(DataSourceGroup, on=(Query.data_source==DataSourceGroup.data_source))\
.where(DataSourceGroup.group << groups)\
... |
pyodide__pyodide-4404 | "ERROR: build script failed" but "Succeeded building package"
## 🐛 Bug
<!-- A clear and concise description of what the bug is. -->
`pyodide build-recipes libgmp --install` fails (but that's a separate issue).
It correctly shows "ERROR: build script failed".
But then it proceeds with "Succeeded building package ... | [
{
"content": "#!/usr/bin/env python3\n\n\"\"\"\nBuilds a Pyodide package.\n\"\"\"\n\nimport argparse\nimport cgi\nimport fnmatch\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport textwrap\nimport urllib\nfrom collections.abc import Iterator\nfrom contextlib import contextmanager\nfro... | [
{
"content": "#!/usr/bin/env python3\n\n\"\"\"\nBuilds a Pyodide package.\n\"\"\"\n\nimport argparse\nimport cgi\nimport fnmatch\nimport json\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport textwrap\nimport urllib\nfrom collections.abc import Iterator\nfrom contextlib import contextmanager\nfro... | diff --git a/pyodide-build/pyodide_build/buildpkg.py b/pyodide-build/pyodide_build/buildpkg.py
index 6eb4d1b6aa4..e68af35a512 100755
--- a/pyodide-build/pyodide_build/buildpkg.py
+++ b/pyodide-build/pyodide_build/buildpkg.py
@@ -860,9 +860,12 @@ def build_package(
continue_=continue_,
)
- exc... |
dotkom__onlineweb4-724 | Committee positions in dashboard looks ugly as shit
| [
{
"content": "# -*- coding: utf-8 -*-\n\nimport datetime\nimport socket\nimport urllib\nimport hashlib\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import AbstractUser\nfrom django.db import models\nfrom django.utils.translation import ugettext as _\nfrom django.utils import timezone\nfr... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport datetime\nimport socket\nimport urllib\nimport hashlib\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import AbstractUser\nfrom django.db import models\nfrom django.utils.translation import ugettext as _\nfrom django.utils import timezone\nfr... | diff --git a/apps/authentication/models.py b/apps/authentication/models.py
index 965ebd40b..be645ab23 100644
--- a/apps/authentication/models.py
+++ b/apps/authentication/models.py
@@ -276,7 +276,7 @@ def __unicode__(self):
class Meta:
verbose_name = _(u'posisjon')
verbose_name_plural = _(u'posis... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.