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 ⌀ |
|---|---|---|---|---|
matrix-org__synapse-4592 | Support /sync?set_presence=unavailable
as per https://github.com/matrix-org/matrix-doc/pull/780
r0.4.0 TODO
* [ ] https://github.com/matrix-org/synapse/issues/3772 - "unavailable" presence status for /sync
* [ ] declare support for it in `/versions`
| [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2015, 2016 OpenMarket 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/LICENSE-2.0... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2015, 2016 OpenMarket 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/LICENSE-2.0... | diff --git a/changelog.d/4592.feature b/changelog.d/4592.feature
new file mode 100644
index 000000000000..112005ded4af
--- /dev/null
+++ b/changelog.d/4592.feature
@@ -0,0 +1,2 @@
+Allow the "unavailable" presence status for /sync.
+This change makes Synapse compliant with r0.4.0 of the Client-Server specification.
dif... |
scipy__scipy-13467 | Meaning of `tol` argument in `scipy.optimize.minimize` is not explained in docs
The `scipy.optimize.minimize` method offers an interface to several minimizers. It defines a `tol` argument, for which the docs say:
```
Tolerance for termination. For detailed control, use solver-specific options.
```
https://github.... | [
{
"content": "\"\"\"\nUnified interfaces to minimization algorithms.\n\nFunctions\n---------\n- minimize : minimization of a function of several variables.\n- minimize_scalar : minimization of a function of one variable.\n\"\"\"\n\n__all__ = ['minimize', 'minimize_scalar']\n\n\nfrom warnings import warn\n\nimpo... | [
{
"content": "\"\"\"\nUnified interfaces to minimization algorithms.\n\nFunctions\n---------\n- minimize : minimization of a function of several variables.\n- minimize_scalar : minimization of a function of one variable.\n\"\"\"\n\n__all__ = ['minimize', 'minimize_scalar']\n\n\nfrom warnings import warn\n\nimpo... | diff --git a/scipy/optimize/_minimize.py b/scipy/optimize/_minimize.py
index cd0f257fce97..a8c5f1da5a07 100644
--- a/scipy/optimize/_minimize.py
+++ b/scipy/optimize/_minimize.py
@@ -177,7 +177,9 @@ def minimize(fun, x0, args=(), method=None, jac=None, hess=None,
be zero whereas inequality means that it is to ... |
napari__napari-5854 | [main] Keyboard shortcuts text is low contrast.
## 🐛 Bug
The Action descriptions for Keyboard shortcuts are low contrast and hard to read:
<img width="1232" alt="image" src="https://github.com/napari/napari/assets/76622105/7ffe5f04-cc14-4b43-bb29-767ddc886e31">
<img width="1232" alt="image" src="https://github.co... | [
{
"content": "import contextlib\nimport re\nfrom collections import OrderedDict\n\nfrom qtpy.QtCore import QEvent, QPoint, Qt, Signal\nfrom qtpy.QtGui import QKeySequence\nfrom qtpy.QtWidgets import (\n QAbstractItemView,\n QComboBox,\n QHBoxLayout,\n QItemDelegate,\n QKeySequenceEdit,\n QLabe... | [
{
"content": "import contextlib\nimport re\nfrom collections import OrderedDict\n\nfrom qtpy.QtCore import QEvent, QPoint, Qt, Signal\nfrom qtpy.QtGui import QKeySequence\nfrom qtpy.QtWidgets import (\n QAbstractItemView,\n QComboBox,\n QHBoxLayout,\n QItemDelegate,\n QKeySequenceEdit,\n QLabe... | diff --git a/napari/_qt/widgets/qt_keyboard_settings.py b/napari/_qt/widgets/qt_keyboard_settings.py
index c4f21569add..1686dda4925 100644
--- a/napari/_qt/widgets/qt_keyboard_settings.py
+++ b/napari/_qt/widgets/qt_keyboard_settings.py
@@ -230,7 +230,7 @@ def _set_table(self, layer_str: str = ''):
sho... |
autorope__donkeycar-273 | Support WIFI network that does not have internet access
REF: https://github.com/wroscoe/donkey/blob/dev/donkeycar/util/web.py
The system determines its IP address using a ping to 8.8.8.8
This approach fails when the WIFI network does not have internet access.
| [
{
"content": "import socket\n\ndef get_ip_address():\n ip = ([l for l in ([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith(\"127.\")][:1],\n [[(s.connect(('8.8.8.8', 53)), s.getsockname()[0], s.close()) for s in\n [socke... | [
{
"content": "import socket\n\ndef get_ip_address():\n try:\n ip = ([l for l in ([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith(\"127.\")][:1],\n [[(s.connect(('8.8.8.8', 53)), s.getsockname()[0], s.close()) for s in\n ... | diff --git a/donkeycar/util/web.py b/donkeycar/util/web.py
index f9d94ed1d..5ef654104 100644
--- a/donkeycar/util/web.py
+++ b/donkeycar/util/web.py
@@ -1,7 +1,10 @@
import socket
def get_ip_address():
- ip = ([l for l in ([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127."... |
conda__conda-6221 | Add flag to build environment.yml without build strings
https://gitter.im/conda/conda?at=59ef54ebe44c43700a70e9a4
https://twitter.com/drvinceknight/status/922837449092542464?ref_src=twsrc%5Etfw
> Due to hashes of packages being introduced in `envinronment.yml` I'm getting all sorts of issues with building envs from... | [
{
"content": "from __future__ import absolute_import, print_function\n\nimport os\nfrom collections import OrderedDict\nfrom conda.base.context import context\nfrom conda.cli import common # TODO: this should never have to import form conda.cli\nfrom conda.core.linked_data import linked\nfrom copy import copy\... | [
{
"content": "from __future__ import absolute_import, print_function\n\nimport os\nfrom collections import OrderedDict\nfrom conda.base.context import context\nfrom conda.cli import common # TODO: this should never have to import form conda.cli\nfrom conda.core.linked_data import linked\nfrom copy import copy\... | diff --git a/conda_env/env.py b/conda_env/env.py
index 3cef78ec8e7..e51a78477c7 100644
--- a/conda_env/env.py
+++ b/conda_env/env.py
@@ -48,9 +48,9 @@ def from_environment(name, prefix, no_builds=False, ignore_channels=False):
pip_pkgs = sorted(installed - conda_pkgs)
if no_builds:
- dependencies = [... |
googleapis__google-cloud-python-8568 | Firestore: Field path keys are not expanded for dicts used as cursors.
Copied from @torresalmonte's issue at https://github.com/firebase/firebase-admin-python/issues/281
```
l050ZZ1bAsBddd7hE1GD => {'wordcount': {'page3': 130, 'page2': 120, 'page1': 100}, 'availability_date': DatetimeWithNanoseconds(2019, 3, 4, 6, ... | [
{
"content": "# Copyright 2017 Google LLC All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | [
{
"content": "# Copyright 2017 Google LLC All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | diff --git a/firestore/google/cloud/firestore_v1/query.py b/firestore/google/cloud/firestore_v1/query.py
index 4aa3d2f22804..6f4c498c0725 100644
--- a/firestore/google/cloud/firestore_v1/query.py
+++ b/firestore/google/cloud/firestore_v1/query.py
@@ -666,7 +666,12 @@ def _normalize_cursor(self, cursor, orders):
... |
pypa__pip-3037 | installing from a wheel puts platform files into purelib, ignoring WHEEL Root-Is-Pure: False
When installing a package with C extensions, the platform specific shared libraries should be placed in the 'platform library' install path install_platlib. On 64 bit linux, this would be /usr/lib64/python2.7/<...>
pip 7.0.3 ... | [
{
"content": "\"\"\"Locations where we look for configs, install stuff, etc\"\"\"\nfrom __future__ import absolute_import\n\nimport getpass\nimport os\nimport os.path\nimport site\nimport sys\n\nfrom distutils import sysconfig\nfrom distutils.command.install import install, SCHEME_KEYS # noqa\n\nfrom pip.compa... | [
{
"content": "\"\"\"Locations where we look for configs, install stuff, etc\"\"\"\nfrom __future__ import absolute_import\n\nimport getpass\nimport os\nimport os.path\nimport site\nimport sys\nimport tempfile\n\nfrom distutils import sysconfig\nfrom distutils.command.install import install, SCHEME_KEYS\n\nfrom ... | diff --git a/pip/locations.py b/pip/locations.py
index dfbc6da2791..a1a5b4923e1 100644
--- a/pip/locations.py
+++ b/pip/locations.py
@@ -237,8 +237,12 @@ def distutils_scheme(dist_name, user=False, home=None, root=None,
for key in SCHEME_KEYS:
scheme[key] = getattr(i, 'install_' + key)
- if i.install... |
pypi__warehouse-12792 | Improve Alembic story
Fixes #10053.
Adds `alembic.ini`.
Runs `black` and `isort` after generating migrations.
| [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/tests/unit/test_db.py b/tests/unit/test_db.py
index ab4fc4558e19..63837634fafc 100644
--- a/tests/unit/test_db.py
+++ b/tests/unit/test_db.py
@@ -82,7 +82,10 @@ def handler(config):
def test_configure_alembic(monkeypatch):
- config_obj = pretend.stub(set_main_option=pretend.call_recorder(lambda *a:... |
open-telemetry__opentelemetry-python-3240 | Export ExponentialBucketHistogramAggregation in opentelemetry.sdk.metrics.view
**Is your feature request related to a problem?**
We want to use the Exponential Histograms features publicly released in version [1.17.0](https://github.com/open-telemetry/opentelemetry-python/blob/main/CHANGELOG.md#version-1170038b0-2023-... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 377303abf8b..1474ce01bac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
... |
localstack__localstack-2332 | s3.upload returns `Location: http://localhost:4566`
# Bug report
# Detailed description
The `AWS.s3.upload()` (official SDK - https://github.com/aws/aws-sdk-js) returns an object with the `Location` key that points to 4566 instead of 4572 (LocalStack S3 port).
## Expected behavior
The `Location` should poin... | [
{
"content": "import re\nimport os\nimport sys\nimport json\nimport logging\nfrom requests.models import Response\nfrom localstack import config\nfrom localstack.constants import HEADER_LOCALSTACK_TARGET, HEADER_LOCALSTACK_EDGE_URL, LOCALSTACK_ROOT_FOLDER\nfrom localstack.utils.common import run, is_root, TMP_T... | [
{
"content": "import re\nimport os\nimport sys\nimport json\nimport logging\nfrom requests.models import Response\nfrom localstack import config\nfrom localstack.constants import HEADER_LOCALSTACK_TARGET, HEADER_LOCALSTACK_EDGE_URL, LOCALSTACK_ROOT_FOLDER\nfrom localstack.utils.common import run, is_root, TMP_T... | diff --git a/localstack/services/edge.py b/localstack/services/edge.py
index ed38db6ddf230..8a1219cd22ffc 100644
--- a/localstack/services/edge.py
+++ b/localstack/services/edge.py
@@ -38,6 +38,10 @@ def forward_request(self, method, path, data, headers):
# detect S3 presigned URLs
if 'AWSAcce... |
open-telemetry__opentelemetry-python-2764 | Schema URL is null for some messages and "" for others
While working on the getting started guide, I notice the console exporter will sometimes output empty string and sometimes `null` for schema URL:
```json
{
"resource_metrics": [
{
"resource": {
"attributes": {
"telemetry.sdk.l... | [
{
"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/util/instrumentation.py b/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py
index 55d7c6277ba..085d3fd874f 100644
--- a/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py
+++ b/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py... |
ray-project__ray-6849 | [tune] Feature request: tune.sample_from does not support callable objects.
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Linux Ubuntu 16.04
- **Ray installed from (source or binary)**: binary
- **Ray version**: 0.7.2
- **Python version**: 3.2
- **Exact command to reproduce... | [
{
"content": "import copy\nimport logging\nimport numpy\nimport random\nimport types\n\nfrom ray.tune import TuneError\nfrom ray.tune.sample import sample_from\n\nlogger = logging.getLogger(__name__)\n\n\ndef generate_variants(unresolved_spec):\n \"\"\"Generates variants from a spec (dict) with unresolved va... | [
{
"content": "import copy\nimport logging\nimport numpy\nimport random\n\nfrom ray.tune import TuneError\nfrom ray.tune.sample import sample_from\n\nlogger = logging.getLogger(__name__)\n\n\ndef generate_variants(unresolved_spec):\n \"\"\"Generates variants from a spec (dict) with unresolved values.\n\n T... | diff --git a/python/ray/tune/suggest/variant_generator.py b/python/ray/tune/suggest/variant_generator.py
index 6e70925367972..e772ffb4933c0 100644
--- a/python/ray/tune/suggest/variant_generator.py
+++ b/python/ray/tune/suggest/variant_generator.py
@@ -2,7 +2,6 @@
import logging
import numpy
import random
-import ty... |
django-wiki__django-wiki-1106 | Typo in testproject/settings/customauthuser.py
There is a typo in https://github.com/django-wiki/django-wiki/blob/db7456725dcbc4809e4a3f9c6c354626700b7eff/testproject/testproject/settings/customauthuser.py#L14
**$ pip list**
```
Package Version Location
------------------- ---------- ------------... | [
{
"content": "import os # noqa @UnusedImport\n\nfrom .base import * # noqa @UnusedWildImport\n\nDATABASES = {\n \"default\": {\n # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.\n \"ENGINE\": \"django.db.backends.sqlite3\",\n # Or path to database file if using sqlite3.\n ... | [
{
"content": "import os # noqa @UnusedImport\nimport sys\n\nfrom .base import * # noqa @UnusedWildImport\nfrom .dev import *\n\n# Append testdata path\n\nsys.path.append(os.path.join(os.path.dirname(os.path.dirname(PROJECT_DIR)), \"tests\"))\n\nDATABASES = {\n \"default\": {\n # Add 'postgresql_psyc... | diff --git a/testproject/testproject/settings/customauthuser.py b/testproject/testproject/settings/customauthuser.py
index 80e1a4c7e..0ecc3acc0 100644
--- a/testproject/testproject/settings/customauthuser.py
+++ b/testproject/testproject/settings/customauthuser.py
@@ -1,6 +1,12 @@
import os # noqa @UnusedImport
+impo... |
microsoft__playwright-python-593 | Async API - asyncio error
After updating to the 1.9.2 version, for **Async API** I get the following error:
Exception ignored in: <function BaseSubprocessTransport.__del__ at 0x0000000002E1E9D0>
Traceback (most recent call last):
File "C:\Users\Matthew\AppData\Local\Programs\Python\Python39\lib\asyncio\base_subp... | [
{
"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/_transport.py b/playwright/_impl/_transport.py
index 2113cd5d9..4dd37337d 100644
--- a/playwright/_impl/_transport.py
+++ b/playwright/_impl/_transport.py
@@ -48,12 +48,13 @@ def stop(self) -> None:
async def wait_until_stopped(self) -> None:
await self._stopped_future
+ ... |
mirumee__ariadne-1098 | Query filter with default `null` filter causes error
**GraphQL Schema:**
```gql
Query {
"""Get sensors with filtering"""
sensors(filters: SensorFilters = null): [Sensor!]!
}
```
**Expected Behavior:**
Schema is built with no errors. This happens in Ariadne 0.13.0.
**Actual Behavior:**
In Ari... | [
{
"content": "import enum\nfrom typing import (\n Any,\n Dict,\n Generator,\n List,\n Mapping,\n Optional,\n Tuple,\n Type,\n TypeVar,\n Union,\n cast,\n)\nfrom functools import reduce, singledispatch\nimport operator\n\nfrom graphql.type import GraphQLEnumType, GraphQLNamedType... | [
{
"content": "import enum\nfrom typing import (\n Any,\n Dict,\n Generator,\n List,\n Mapping,\n Optional,\n Tuple,\n Type,\n TypeVar,\n Union,\n cast,\n)\nfrom functools import reduce, singledispatch\nimport operator\n\nfrom graphql.type import GraphQLEnumType, GraphQLNamedType... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f44f302c6..5934b6b6f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,15 +2,16 @@
## 0.20 (UNRELEASED)
+- Dropped support for Python 3.7.
+- Added `OpenTelemetry` and `opentelemetry_extension` extension, importable form `ariadne.tracing.opentelemetry`.
- Added `que... |
cobbler__cobbler-2998 | netcfg/get_nameservers in the boot prompt is split and joined with commas after each character
### Describe the bug
netcfg/get_nameservers is not interpolated properly
### Steps to reproduce
1. for instance use `--kopts` on Ubuntu/Debian to set the DNS as follows: `netcfg/get_nameservers=1.9.168.0.1`
2. the ... | [
{
"content": "\"\"\"\nBuilds bootable CD images that have PXE-equivalent behavior\nfor all Cobbler distros/profiles/systems currently in memory.\n\nCopyright 2006-2009, Red Hat, Inc and Others\nMichael DeHaan <michael.dehaan AT gmail>\n\nThis program is free software; you can redistribute it and/or modify\nit u... | [
{
"content": "\"\"\"\nBuilds bootable CD images that have PXE-equivalent behavior\nfor all Cobbler distros/profiles/systems currently in memory.\n\nCopyright 2006-2009, Red Hat, Inc and Others\nMichael DeHaan <michael.dehaan AT gmail>\n\nThis program is free software; you can redistribute it and/or modify\nit u... | diff --git a/cobbler/action_buildiso.py b/cobbler/action_buildiso.py
index f0cd317e7f..1ca08e6482 100644
--- a/cobbler/action_buildiso.py
+++ b/cobbler/action_buildiso.py
@@ -397,7 +397,10 @@ def generate_netboot_iso(self,imagesdir,isolinuxdir,profiles=None,systems=None,e
else:
... |
oppia__oppia-15025 | Topic prerequisite skill checking is broken and prevents topic being published
**Describe the bug**
In a topic, chapters with prerequisite skills outside the topic make the topic unpublishable, because "this skill was not taught in any chapter before it". This behaviour is wrong because the validation error should o... | [
{
"content": "# Copyright 2018 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | [
{
"content": "# Copyright 2018 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | diff --git a/core/controllers/story_editor.py b/core/controllers/story_editor.py
index 190ebc3a0f32f..6ce3963ca287d 100644
--- a/core/controllers/story_editor.py
+++ b/core/controllers/story_editor.py
@@ -81,10 +81,6 @@ def get(self, story_id):
topic_id = story.corresponding_topic_id
topic = topic_fet... |
scverse__scanpy-134 | filter_genes_dispersion(adata, n_top_genes=x) retrieves fewer genes if zero-expression genes exist
I was trying to get top 1000 variable genes in 1.3M dataset, but every time I ended up with zero genes after the `sc.pp.filter_genes_dispersion(adata, n_top_genes=1000)` call.
The reason is that `sc.pp.filter_genes_dis... | [
{
"content": "\"\"\"Simple Preprocessing Functions\n\nCompositions of these functions are found in sc.preprocess.recipes.\n\"\"\"\n\nimport numpy as np\nimport scipy as sp\nimport warnings\nfrom scipy.sparse import issparse\nfrom sklearn.utils import sparsefuncs\nfrom pandas.api.types import is_categorical_dtyp... | [
{
"content": "\"\"\"Simple Preprocessing Functions\n\nCompositions of these functions are found in sc.preprocess.recipes.\n\"\"\"\n\nimport numpy as np\nimport scipy as sp\nimport warnings\nfrom scipy.sparse import issparse\nfrom sklearn.utils import sparsefuncs\nfrom pandas.api.types import is_categorical_dtyp... | diff --git a/scanpy/preprocessing/simple.py b/scanpy/preprocessing/simple.py
index b9e9b7d290..78e8f981f2 100644
--- a/scanpy/preprocessing/simple.py
+++ b/scanpy/preprocessing/simple.py
@@ -349,6 +349,7 @@ def filter_genes_dispersion(data,
raise ValueError('`flavor` needs to be "seurat" or "cell_ranger"')
... |
chainer__chainer-464 | `divmod` doesn't work for `cupy.ndarray`
```
>>> u=cupy.array(1)
>>> divmod(u, 3)
/tmp/tmpDpvsv8/kern.cu(273): error: identifier "out1" is undefined
1 error detected in the compilation of "/tmp/tmpxft_00003ba3_00000000-6_kern.cpp1.ii".
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "cu... | [
{
"content": "import string\n\nimport numpy\nimport six\n\nimport cupy\nfrom cupy import carray\nfrom cupy import cuda\nfrom cupy import util\n\n\nsix_range = six.moves.range\nsix_zip = six.moves.zip\n\n\ndef _get_simple_elementwise_kernel(\n params, operation, name, preamble,\n loop_prep='', afte... | [
{
"content": "import string\n\nimport numpy\nimport six\n\nimport cupy\nfrom cupy import carray\nfrom cupy import cuda\nfrom cupy import util\n\n\nsix_range = six.moves.range\nsix_zip = six.moves.zip\n\n\ndef _get_simple_elementwise_kernel(\n params, operation, name, preamble,\n loop_prep='', afte... | diff --git a/cupy/elementwise.py b/cupy/elementwise.py
index addbb3e684b8..9b1e48ecd1a0 100644
--- a/cupy/elementwise.py
+++ b/cupy/elementwise.py
@@ -712,8 +712,24 @@ def create_ufunc(name, ops, routine=None, preamble='', doc=''):
'if (in1) out0 = in0')
+_divmod_float = '''
+ out0_type a = _floor_divide(in... |
pytorch__vision-3298 | How to install torchvision to use video_reader backend?
I simply installed torchvision from conda (as advertised on pytorch.org). But `torchvision.set_video_backend('video_reader')` prints `video_reader video backend is not available. Please compile torchvision from source and try again`. This should be mentioned in ht... | [
{
"content": "import warnings\nimport os\n\nfrom .extension import _HAS_OPS\n\nfrom torchvision import models\nfrom torchvision import datasets\nfrom torchvision import ops\nfrom torchvision import transforms\nfrom torchvision import utils\nfrom torchvision import io\n\nimport torch\n\ntry:\n from .version i... | [
{
"content": "import warnings\nimport os\n\nfrom .extension import _HAS_OPS\n\nfrom torchvision import models\nfrom torchvision import datasets\nfrom torchvision import ops\nfrom torchvision import transforms\nfrom torchvision import utils\nfrom torchvision import io\n\nimport torch\n\ntry:\n from .version i... | diff --git a/torchvision/__init__.py b/torchvision/__init__.py
index 28349cbb78a..1dcc07bde6c 100644
--- a/torchvision/__init__.py
+++ b/torchvision/__init__.py
@@ -64,6 +64,10 @@ def set_video_backend(backend):
The :mod:`video_reader` package includes a native C++ implementation on
top of FFM... |
enthought__chaco-678 | Remove chaco.chaco_version file
https://github.com/enthought/chaco/blob/fdd858aa6dbc76addb50d011fb81e879ce8e0355/chaco/chaco_version.py
We now create `chaco._version` file when installing the package (in `setup.py`) so we don't need this additional `chaco.chaco_version` file anymore.
| [
{
"content": "# ------------------------------------------------------------------------------\n# Copyright (c) 2005, Enthought, Inc.\n# All rights reserved.\n#\n# This software is provided without warranty under the terms of the BSD\n# license included in LICENSE.txt and may be redistributed only\n# under the ... | [
{
"content": null,
"path": "chaco/chaco_version.py"
}
] | diff --git a/chaco/chaco_version.py b/chaco/chaco_version.py
deleted file mode 100644
index 768b15dbd..000000000
--- a/chaco/chaco_version.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# ------------------------------------------------------------------------------
-# Copyright (c) 2005, Enthought, Inc.
-# All rights reserved.
-#... |
mozilla__pontoon-2803 | Tooltip on rejected string authors says "Not reviewed yet"
Instead, it should say "Approved by {user}", same as it does for approved strings.
| [
{
"content": "import logging\nimport re\n\nfrom collections import defaultdict\nfrom datetime import datetime\nfrom urllib.parse import urlparse\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.auth.models im... | [
{
"content": "import logging\nimport re\n\nfrom collections import defaultdict\nfrom datetime import datetime\nfrom urllib.parse import urlparse\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.auth.models im... | diff --git a/pontoon/base/views.py b/pontoon/base/views.py
index 809e1f302c..e488aeba3c 100755
--- a/pontoon/base/views.py
+++ b/pontoon/base/views.py
@@ -427,7 +427,7 @@ def get_translation_history(request):
"date": t.date.strftime("%b %d, %Y %H:%M"),
"date_iso": t.date.isoformat(),
... |
wagtail__wagtail-4800 | Draftail editor allows to link to root page rendering page non-functional
### Issue Summary
The following has come to my attention as a user has been complaining about a non-functional editing interface for a seemingly random sub-page. The Draftail rich text editor allows to link to the root page of the installatio... | [
{
"content": "import re\nfrom html.parser import HTMLParser\n\nfrom wagtail.admin.rich_text.converters.contentstate_models import (\n Block, ContentState, Entity, EntityRange, InlineStyleRange)\nfrom wagtail.admin.rich_text.converters.html_ruleset import HTMLRuleset\nfrom wagtail.core.models import Page\nfro... | [
{
"content": "import re\nfrom html.parser import HTMLParser\n\nfrom wagtail.admin.rich_text.converters.contentstate_models import (\n Block, ContentState, Entity, EntityRange, InlineStyleRange)\nfrom wagtail.admin.rich_text.converters.html_ruleset import HTMLRuleset\nfrom wagtail.core.models import Page\nfro... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 567746c014f8..5d074d38e6a1 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -21,6 +21,8 @@ Changelog
* Fix: Tag input field no longer treats 'б' on Russian keyboards as a comma (Michael Borisov)
* Fix: Disabled autocomplete dropdowns on date/time chooser fields (Jan... |
facebookresearch__fairscale-86 | [feat] OSS: Support nvidia's LARC
## 🚀 Feature
Make it possible to support LARC with OSS
## Motivation
LARC is a must have for large batch jobs, right now OSS will break on LARC because of the closure() being passed
## Pitch
Should be doable to gracefully handle optimizers with do not support closures in step... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport copy\nfrom itertools import chain\nimport logging\nfrom typing import TYPE_CHECKING, An... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport copy\nfrom itertools import chain\nimport logging\nfrom typing import TYPE_CHECKING, An... | diff --git a/fairscale/optim/oss.py b/fairscale/optim/oss.py
index ff4cd1520..7fb2c598a 100644
--- a/fairscale/optim/oss.py
+++ b/fairscale/optim/oss.py
@@ -103,8 +103,11 @@ def step(self, closure: Optional[Callable[[], float]] = None, **kwargs: Any) ->
# Sync oss param_groups attributes in case they've been u... |
dbt-labs__dbt-core-8050 | [CT-2804] Exclude `click==8.1.4` from dependencies
## Problem
When `click==8.1.4` was released, our code quality workflows using `mypy` began failing. An issue has been created on the [click repository](https://github.com/pallets/click/issues/2558).
## Solution
The solution is to exclude, for the time being, `cli... | [
{
"content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif sys.version_info < (3, 8):\n print(\"Error: dbt does not support this version of Python.\")\n print(\"Please upgrade to Python 3.8 or higher.\")\n sys.exit(1)\n\n\nfrom setuptools import setup\n\ntry:\n from setuptools import find_name... | [
{
"content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif sys.version_info < (3, 8):\n print(\"Error: dbt does not support this version of Python.\")\n print(\"Please upgrade to Python 3.8 or higher.\")\n sys.exit(1)\n\n\nfrom setuptools import setup\n\ntry:\n from setuptools import find_name... | diff --git a/.changes/unreleased/Dependencies-20230707-104052.yaml b/.changes/unreleased/Dependencies-20230707-104052.yaml
new file mode 100644
index 00000000000..adf4f413b88
--- /dev/null
+++ b/.changes/unreleased/Dependencies-20230707-104052.yaml
@@ -0,0 +1,6 @@
+kind: Dependencies
+body: Pin click>=8.1.1,<8.1.4
+tim... |
open-mmlab__mmdetection-7516 | SimOTAAssigner does not support half precision training
Thanks for your error report and we appreciate it a lot.
**Checklist**
1. I have searched related issues but cannot get the expected help.
2. I have read the [FAQ documentation](https://mmdetection.readthedocs.io/en/latest/faq.html) but cannot get the expec... | [
{
"content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport warnings\n\nimport torch\nimport torch.nn.functional as F\n\nfrom ..builder import BBOX_ASSIGNERS\nfrom ..iou_calculators import bbox_overlaps\nfrom .assign_result import AssignResult\nfrom .base_assigner import BaseAssigner\n\n\n@BBOX_ASSIGN... | [
{
"content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport warnings\n\nimport torch\nimport torch.nn.functional as F\n\nfrom ..builder import BBOX_ASSIGNERS\nfrom ..iou_calculators import bbox_overlaps\nfrom .assign_result import AssignResult\nfrom .base_assigner import BaseAssigner\n\n\n@BBOX_ASSIGN... | diff --git a/mmdet/core/bbox/assigners/sim_ota_assigner.py b/mmdet/core/bbox/assigners/sim_ota_assigner.py
index 263abfcd8ff..79b3b719e93 100644
--- a/mmdet/core/bbox/assigners/sim_ota_assigner.py
+++ b/mmdet/core/bbox/assigners/sim_ota_assigner.py
@@ -157,9 +157,12 @@ def _assign(self,
num_v... |
acl-org__acl-anthology-238 | Authors with only one name
PR #233 tries adding a name variant with only a last name and there are some technical issues there, but there is also the more basic issue of:
- Should the XML distinguish between an author with only a first name vs. an author with only a last name? I'm unsure whether this is a real disti... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2019 Marcel Bollmann <marcel@bollmann.me>\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/l... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2019 Marcel Bollmann <marcel@bollmann.me>\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/l... | diff --git a/bin/anthology/people.py b/bin/anthology/people.py
index 1ad28b3919..64735f8f09 100644
--- a/bin/anthology/people.py
+++ b/bin/anthology/people.py
@@ -115,6 +115,7 @@ def load_variant_list(self, directory):
_ = self.papers[canonical] # insert empty entry for canonical if not present
... |
biopython__biopython-1583 | Unable to bgzip fastq file with bgzf.py
### Setup
I am reporting a problem with Biopython version, Python version, and operating
system as follows:
```python
import sys; print(sys.version)
3.5.5 | packaged by conda-forge | (default, Feb 13 2018, 05:02:37)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)]
import platf... | [
{
"content": "#!/usr/bin/env python\n# Copyright 2010-2015 by Peter Cock.\n# All rights reserved.\n# This code is part of the Biopython distribution and governed by its\n# license. Please see the LICENSE file that should have been included\n# as part of this package.\nr\"\"\"Read and write BGZF compressed file... | [
{
"content": "#!/usr/bin/env python\n# Copyright 2010-2015 by Peter Cock.\n# All rights reserved.\n# This code is part of the Biopython distribution and governed by its\n# license. Please see the LICENSE file that should have been included\n# as part of this package.\nr\"\"\"Read and write BGZF compressed file... | diff --git a/Bio/bgzf.py b/Bio/bgzf.py
index 10df6e6cbc8..be16e4fb7b8 100755
--- a/Bio/bgzf.py
+++ b/Bio/bgzf.py
@@ -860,10 +860,19 @@ def __exit__(self, type, value, traceback):
print("See also the tool bgzip that comes with samtools")
sys.exit(0)
+ # Ensure we have binary mode handles
+ # (l... |
ansible__ansible-modules-core-3987 | apt_key fails to fetch GPG key sometimes
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
apt_key
##### ANSIBLE VERSION
<!--- Paste verbatim output from “ansible --version” between quotes below -->
```
ansible 2.1.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>\n# (c) 2012, Jayson Vantuyl <jayson@aggressive.ly>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General P... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>\n# (c) 2012, Jayson Vantuyl <jayson@aggressive.ly>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General P... | diff --git a/packaging/os/apt_key.py b/packaging/os/apt_key.py
index bc8cb80b5c8..09679853f8f 100644
--- a/packaging/os/apt_key.py
+++ b/packaging/os/apt_key.py
@@ -171,7 +171,14 @@ def import_key(module, keyring, keyserver, key_id):
cmd = "apt-key --keyring %s adv --keyserver %s --recv %s" % (keyring, keyserv... |
wright-group__WrightTools-82 | link to github on sphinx docs
| [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# WrightTools documentation build configuration file, created by\n# sphinx-quickstart on Tue Jul 18 13:01:20 2017.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configurat... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# WrightTools documentation build configuration file, created by\n# sphinx-quickstart on Tue Jul 18 13:01:20 2017.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configurat... | diff --git a/docs/conf.py b/docs/conf.py
index fad6fffe5..c0be8ca44 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -100,6 +100,15 @@
#
# html_theme_options = {}
+# HTML context adapted from http://docs.readthedocs.io/en/latest/vcs.html
+html_context = {
+ "display_github": True, # Integrate GitHub
+ "github_... |
OpenNMT__OpenNMT-tf-974 | Parallel text inputter fails with compressed text files
Hello,
When trying to train a NMT model using GZIP compressed text files (see [this doc](https://opennmt.net/OpenNMT-tf/data.html#compressed-data)) with **OpenNMT-tf 2.29.0**, the following exception is raised: `RuntimeError: Parallel datasets do not have the s... | [
{
"content": "\"\"\"Various utility functions to use throughout the project.\"\"\"\n\nimport collections\nimport copy\nimport functools\nimport heapq\nimport io\nimport os\nimport sys\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom opennmt.utils import compat\n\n_CHECKPOINT_VARIABLE_SUFFIX = \".ATTRIBUTE... | [
{
"content": "\"\"\"Various utility functions to use throughout the project.\"\"\"\n\nimport collections\nimport copy\nimport functools\nimport gzip\nimport heapq\nimport io\nimport os\nimport sys\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom opennmt.utils import compat\n\n_CHECKPOINT_VARIABLE_SUFFIX =... | diff --git a/opennmt/tests/misc_test.py b/opennmt/tests/misc_test.py
index 3fd5feffb..5797132f1 100644
--- a/opennmt/tests/misc_test.py
+++ b/opennmt/tests/misc_test.py
@@ -1,4 +1,6 @@
+import gzip
import itertools
+import os
import numpy as np
import tensorflow as tf
@@ -181,6 +183,16 @@ def testRelativeConfig(se... |
encode__uvicorn-495 | Failing `socket_info.getpeername()` with uvloop against a UDS.
When running against a unix domain socket, we seem to occassionaly get an OSError when looking up the remote address. This appears to only occur with `uvloop`.
```
ERROR: Exception in callback HttpToolsProtocol.connection_made(<_SelectorSoc...e, bufs... | [
{
"content": "import socket\n\n\ndef get_remote_addr(transport):\n socket_info = transport.get_extra_info(\"socket\")\n if socket_info is not None:\n info = socket_info.getpeername()\n family = socket_info.family\n if family in (socket.AF_INET, socket.AF_INET6):\n return (s... | [
{
"content": "import socket\n\n\ndef get_remote_addr(transport):\n socket_info = transport.get_extra_info(\"socket\")\n if socket_info is not None:\n try:\n info = socket_info.getpeername()\n except OSError:\n # This case appears to inconsistently occur with uvloop\n ... | diff --git a/uvicorn/protocols/utils.py b/uvicorn/protocols/utils.py
index 0d217eb5e..c9347277d 100644
--- a/uvicorn/protocols/utils.py
+++ b/uvicorn/protocols/utils.py
@@ -4,8 +4,16 @@
def get_remote_addr(transport):
socket_info = transport.get_extra_info("socket")
if socket_info is not None:
- info ... |
freqtrade__freqtrade-5818 | Freqtrade closes trade below candlestick low price
<!--
Have you searched for similar issues before posting it?
If you have discovered a bug in the bot, please [search our issue tracker](https://github.com/freqtrade/freqtrade/issues?q=is%3Aissue).
If it hasn't been reported, please create a new issue.
Please ... | [
{
"content": "# pragma pylint: disable=missing-docstring, W0212, too-many-arguments\n\n\"\"\"\nThis module contains the backtesting logic\n\"\"\"\nimport logging\nfrom collections import defaultdict\nfrom copy import deepcopy\nfrom datetime import datetime, timedelta, timezone\nfrom typing import Any, Dict, Lis... | [
{
"content": "# pragma pylint: disable=missing-docstring, W0212, too-many-arguments\n\n\"\"\"\nThis module contains the backtesting logic\n\"\"\"\nimport logging\nfrom collections import defaultdict\nfrom copy import deepcopy\nfrom datetime import datetime, timedelta, timezone\nfrom typing import Any, Dict, Lis... | diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py
index 8328d61d336..82c072867b8 100644
--- a/freqtrade/optimize/backtesting.py
+++ b/freqtrade/optimize/backtesting.py
@@ -312,7 +312,9 @@ def _get_close_rate(self, sell_row: Tuple, trade: LocalTrade, sell: SellCheckTup
... |
openstates__openstates-scrapers-2245 | MD failing since at least 2018-04-01
MD has been failing since 2018-04-01
Based on automated runs it appears that MD has not run successfully in 7 days (2018-04-01).
```
23:46:47 INFO scrapelib: GET - http://mgaleg.maryland.gov/webmga/frmMain.aspx?id=SB636&stab=01&pid=billpage&tab=subject3&ys=2018rs
23:46:48 INFO ... | [
{
"content": "import re\nimport datetime\n\nimport lxml.html\nfrom pupa.scrape import Scraper, Bill, VoteEvent\n\nfrom pupa.utils.generic import convert_pdf\n\nCHAMBERS = {\n 'upper': ('SB', 'SJ'),\n 'lower': ('HB', 'HJ'),\n}\n\nclassifiers = {\n r'Committee Amendment .+? Adopted': 'amendment-passage',... | [
{
"content": "import re\nimport datetime\n\nimport lxml.html\nfrom pupa.scrape import Scraper, Bill, VoteEvent\n\nfrom pupa.utils.generic import convert_pdf\n\nCHAMBERS = {\n 'upper': ('SB', 'SJ'),\n 'lower': ('HB', 'HJ'),\n}\n\nclassifiers = {\n r'Committee Amendment .+? Adopted': 'amendment-passage',... | diff --git a/openstates/md/bills.py b/openstates/md/bills.py
index 7271b39fec..2ab194ad2d 100644
--- a/openstates/md/bills.py
+++ b/openstates/md/bills.py
@@ -228,7 +228,8 @@ def parse_vote_pdf(self, vote_url, bill):
consent_calendar_bills = re.split(r'\s{2,}', lines[page_index-1].strip())
ass... |
pypa__cibuildwheel-1324 | Stderr on docker run at the top
Currently, stdout is captured and placed in the error. But stderr is not, so it's displayed inline. `CalledProcessError` does support stderr too, so should we do the same thing with stderr? (Not sure I'm a big fan of separating stderr and stdout, sometimes they might be best in the origi... | [
{
"content": "from __future__ import annotations\n\nimport io\nimport json\nimport os\nimport platform\nimport shlex\nimport shutil\nimport subprocess\nimport sys\nimport uuid\nfrom pathlib import Path, PurePath, PurePosixPath\nfrom types import TracebackType\nfrom typing import IO, Dict, Sequence, cast\n\nfrom... | [
{
"content": "from __future__ import annotations\n\nimport io\nimport json\nimport os\nimport platform\nimport shlex\nimport shutil\nimport subprocess\nimport sys\nimport uuid\nfrom pathlib import Path, PurePath, PurePosixPath\nfrom types import TracebackType\nfrom typing import IO, Dict, Sequence, cast\n\nfrom... | diff --git a/cibuildwheel/oci_container.py b/cibuildwheel/oci_container.py
index c0c0cc9d6..036f1723c 100644
--- a/cibuildwheel/oci_container.py
+++ b/cibuildwheel/oci_container.py
@@ -303,9 +303,11 @@ def call(
return_code = int(return_code_str)
# add the last line to output, without ... |
googleapis__google-cloud-python-259 | datastore: default to empty dataset
When working with datasets, the Datastore backend will normalize any empty datasets to the dataset of the calling application. This should be preferred to prepending "s~" to dataset ids as that is not always a valid operation.
datastore: default to empty dataset
When working with da... | [
{
"content": "\"\"\"Create / interact with gcloud datastore keys.\"\"\"\n\nimport copy\nfrom itertools import izip\n\nfrom gcloud.datastore import datastore_v1_pb2 as datastore_pb\nfrom gcloud.datastore.dataset import Dataset\n\n\nclass Key(object):\n \"\"\"An immutable representation of a datastore Key.\n\n... | [
{
"content": "\"\"\"Create / interact with gcloud datastore keys.\"\"\"\n\nimport copy\nfrom itertools import izip\n\nfrom gcloud.datastore import datastore_v1_pb2 as datastore_pb\nfrom gcloud.datastore.dataset import Dataset\n\n\nclass Key(object):\n \"\"\"An immutable representation of a datastore Key.\n\n... | diff --git a/gcloud/datastore/key.py b/gcloud/datastore/key.py
index ccc89c2360c9..997b4dab35b9 100644
--- a/gcloud/datastore/key.py
+++ b/gcloud/datastore/key.py
@@ -95,13 +95,8 @@ def to_protobuf(self):
# but we shouldn't throw a cryptic error if one isn't provided
# in the initializer.
if ... |
ocadotechnology__codeforlife-portal-782 | Speak to legal team about updating our T&Cs for GDPR
| [
{
"content": "# -*- coding: utf-8 -*-\n# Code for Life\n#\n# Copyright (C) 2018, Ocado Innovation Limited\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as\n# published by the Free Software Foundation, either version 3 of... | [
{
"content": "# -*- coding: utf-8 -*-\n# Code for Life\n#\n# Copyright (C) 2018, Ocado Innovation Limited\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as\n# published by the Free Software Foundation, either version 3 of... | diff --git a/portal/admin.py b/portal/admin.py
index b1533d0a30..434b9250cb 100644
--- a/portal/admin.py
+++ b/portal/admin.py
@@ -68,14 +68,14 @@ class TeacherAdmin(admin.ModelAdmin):
class UserProfileAdmin(admin.ModelAdmin):
- search_fields = ['user__first_name', 'user__last_name', 'new_username', 'user__date... |
readthedocs__readthedocs.org-7710 | `ModuleNotFoundError: No module named 'six'` on build
## Details
I tried building my docs for my project, yet this fails with a ModuleNotFoundError
[My conf file](https://github.com/Arthurdw/dblstats/blob/v0.1.6/docs/source/conf.py)
[Build url](https://readthedocs.org/projects/dblstats/builds/12441143/)
## Ex... | [
{
"content": "\"\"\"An abstraction over virtualenv and Conda environments.\"\"\"\n\nimport copy\nimport codecs\nimport hashlib\nimport itertools\nimport json\nimport logging\nimport os\nimport shutil\nimport yaml\n\nfrom django.conf import settings\n\nfrom readthedocs.builds.constants import EXTERNAL\nfrom read... | [
{
"content": "\"\"\"An abstraction over virtualenv and Conda environments.\"\"\"\n\nimport copy\nimport codecs\nimport hashlib\nimport itertools\nimport json\nimport logging\nimport os\nimport shutil\nimport yaml\n\nfrom django.conf import settings\n\nfrom readthedocs.builds.constants import EXTERNAL\nfrom read... | diff --git a/readthedocs/doc_builder/python_environments.py b/readthedocs/doc_builder/python_environments.py
index c6fa5590352..82273c8235e 100644
--- a/readthedocs/doc_builder/python_environments.py
+++ b/readthedocs/doc_builder/python_environments.py
@@ -367,6 +367,7 @@ def install_core_requirements(self):
... |
kivy__kivy-1848 | interactive.py illegally lists instance methods in __slots__
Trying to compile the docs with Python 3 sphinx, I get:
```
Traceback (most recent call last):
File "autobuild.py", line 58, in <module>
import kivy.interactive
File "/Users/valrus/.envs/kivy/lib/python3.3/site-packages/kivy/interactive.py", line... | [
{
"content": "'''\nInteractive launcher\n====================\n\n.. versionadded:: 1.3.0\n\nThe :class:`InteractiveLauncher` provides a user-friendly python shell\ninterface to an :class:`App` so that it can be prototyped and debugged\ninteractively.\n\n.. note::\n\n The Kivy API intends for some functions t... | [
{
"content": "'''\nInteractive launcher\n====================\n\n.. versionadded:: 1.3.0\n\nThe :class:`InteractiveLauncher` provides a user-friendly python shell\ninterface to an :class:`App` so that it can be prototyped and debugged\ninteractively.\n\n.. note::\n\n The Kivy API intends for some functions t... | diff --git a/doc/autobuild.py b/doc/autobuild.py
index 362816dcd7..932877fc06 100644
--- a/doc/autobuild.py
+++ b/doc/autobuild.py
@@ -160,7 +160,7 @@ def writefile(filename, data):
def extract_summary_line(doc):
if doc is None:
- return
+ return ""
for line in doc.split('\n'):
line ... |
iterative__dvc-7687 | push/pull: globs that match no targets should fail
When using `--glob` with `push` or `pull`, a glob that matches no targets will instead act on all targets. In other words, `dvc push/pull --glob 'nomatches*'` will be the same as `dvc push/pull/repro` without any target argument.
```
$ mkdir repo
$ mkdir dvcremote... | [
{
"content": "\"\"\"Helpers for other modules.\"\"\"\n\nimport hashlib\nimport json\nimport logging\nimport math\nimport os\nimport re\nimport stat\nimport sys\nimport time\nfrom typing import Dict, List, Optional, Tuple\n\nimport colorama\n\nlogger = logging.getLogger(__name__)\n\nLOCAL_CHUNK_SIZE = 2**20 # 1... | [
{
"content": "\"\"\"Helpers for other modules.\"\"\"\n\nimport hashlib\nimport json\nimport logging\nimport math\nimport os\nimport re\nimport stat\nimport sys\nimport time\nfrom typing import Dict, List, Optional, Tuple\n\nimport colorama\n\nlogger = logging.getLogger(__name__)\n\nLOCAL_CHUNK_SIZE = 2**20 # 1... | diff --git a/dvc/utils/__init__.py b/dvc/utils/__init__.py
index 81157ed997..05e3545f6b 100644
--- a/dvc/utils/__init__.py
+++ b/dvc/utils/__init__.py
@@ -476,17 +476,25 @@ def is_exec(mode):
def glob_targets(targets, glob=True, recursive=True):
+ from ..exceptions import DvcException
+
if not glob:
... |
yt-project__yt-3637 | BUG: incorrect LaTeX typesetting in ylabel for fractions
### Bug report
**Bug summary**
Just noticed this in some image reference used for testing:
<img width="117" alt="Screenshot 2021-11-01 at 09 29 15" src="https://user-images.githubusercontent.com/14075922/139643882-f6d9b966-7b86-4fe9-bc6c-34f2a18d155c.png">... | [
{
"content": "import base64\nimport builtins\nimport os\nimport sys\nimport textwrap\nfrom collections import defaultdict\nfrom functools import wraps\n\nimport numpy as np\nfrom matplotlib.cm import get_cmap\nfrom matplotlib.font_manager import FontProperties\nfrom more_itertools.more import always_iterable\n\... | [
{
"content": "import base64\nimport builtins\nimport os\nimport sys\nimport textwrap\nfrom collections import defaultdict\nfrom functools import wraps\n\nimport numpy as np\nfrom matplotlib.cm import get_cmap\nfrom matplotlib.font_manager import FontProperties\nfrom more_itertools.more import always_iterable\n\... | diff --git a/answer-store b/answer-store
index 64303a06913..073b4d3e4f3 160000
--- a/answer-store
+++ b/answer-store
@@ -1 +1 @@
-Subproject commit 64303a0691388c8c1ad8142144a40de6fc4881b7
+Subproject commit 073b4d3e4f3894f64ddd97c9e21214059e73f700
diff --git a/yt/visualization/plot_container.py b/yt/visualization/plot... |
conda__conda-build-4914 | fatal: transport 'file' not allowed
### Checklist
- [X] I added a descriptive title
- [X] I searched open reports and couldn't find a duplicate
### What happened?
I have a recipe which involves a git repo with submodules:
```
source:
# use git because no tarball including submodules is available
git_... | [
{
"content": "# Copyright (C) 2014 Anaconda, Inc\n# SPDX-License-Identifier: BSD-3-Clause\nfrom __future__ import annotations\n\nimport locale\nimport os\nimport re\nimport shutil\nimport sys\nimport tempfile\nimport time\nfrom os.path import abspath, basename, exists, expanduser, isdir, isfile, join, normpath\... | [
{
"content": "# Copyright (C) 2014 Anaconda, Inc\n# SPDX-License-Identifier: BSD-3-Clause\nfrom __future__ import annotations\n\nimport locale\nimport os\nimport re\nimport shutil\nimport sys\nimport tempfile\nimport time\nfrom os.path import abspath, basename, exists, expanduser, isdir, isfile, join, normpath\... | diff --git a/conda_build/source.py b/conda_build/source.py
index dc90054744..c8d21a4c2e 100644
--- a/conda_build/source.py
+++ b/conda_build/source.py
@@ -400,7 +400,15 @@ def git_mirror_checkout_recursive(
# Now that all relative-URL-specified submodules are locally mirrored to
# relatively the same ... |
encode__django-rest-framework-6711 | Check each throttle class before returning a 429 response
## Checklist
- [x] I have verified that that issue exists against the `master` branch of Django REST framework.
- [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [x] This is not a usage question. (Those ... | [
{
"content": "\"\"\"\nProvides an APIView class that is the base of all views in REST framework.\n\"\"\"\nfrom django.conf import settings\nfrom django.core.exceptions import PermissionDenied\nfrom django.db import connection, models, transaction\nfrom django.http import Http404\nfrom django.http.response impor... | [
{
"content": "\"\"\"\nProvides an APIView class that is the base of all views in REST framework.\n\"\"\"\nfrom django.conf import settings\nfrom django.core.exceptions import PermissionDenied\nfrom django.db import connection, models, transaction\nfrom django.http import Http404\nfrom django.http.response impor... | diff --git a/rest_framework/views.py b/rest_framework/views.py
index 6ef7021d4a..832f172330 100644
--- a/rest_framework/views.py
+++ b/rest_framework/views.py
@@ -350,9 +350,13 @@ def check_throttles(self, request):
Check if request should be throttled.
Raises an appropriate exception if the request i... |
searx__searx-233 | Requests does not follow on an HTTP 301
We had already an issue when kickass redirected from https to http I seem to remember. Or it was on another engine. And the request wasn't followed so we had an empty response with status_code 301 in the engine.
Anyway, that is still the case in kickass if we try to perform a se... | [
{
"content": "## Kickass Torrent (Videos, Music, Files)\n#\n# @website https://kickass.so\n# @provide-api no (nothing found)\n#\n# @using-api no\n# @results HTML (using search portal)\n# @stable yes (HTML can change)\n# @parse url, title, content, seed, leech, magnetlink\n\nfrom urlparse im... | [
{
"content": "## Kickass Torrent (Videos, Music, Files)\n#\n# @website https://kickass.so\n# @provide-api no (nothing found)\n#\n# @using-api no\n# @results HTML (using search portal)\n# @stable yes (HTML can change)\n# @parse url, title, content, seed, leech, magnetlink\n\nfrom urlparse im... | diff --git a/searx/engines/kickass.py b/searx/engines/kickass.py
index 8b89e1f478..4e5a643505 100644
--- a/searx/engines/kickass.py
+++ b/searx/engines/kickass.py
@@ -20,7 +20,7 @@
paging = True
# search-url
-url = 'https://kickass.so/'
+url = 'https://kickass.to/'
search_url = url + 'search/{search_term}/{pageno}... |
Lightning-AI__torchmetrics-2503 | BootStrapper.update/forward don't process kwargs
## 🐛 Bug
Both `BootStrapper.update` and `BootStrapper.forward` fail when called with keyword arguments. This is because a dictionary is converted to a list with `list(d)` which produces a list of keys instead of a list of values
### To Reproduce
Defining a Boot... | [
{
"content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | [
{
"content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 820f242e754..87a4d4270bd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -36,6 +36,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed axis names with Precision-Recall curve ([#2462](https://github.com/Lightning-AI/torchmetrics/pu... |
googleapis__google-auth-library-python-914 | Normalize nox / docs builds
## `docgen`
` `noxfile.py` contains a `docgen` session which, when run, delete's / overwrites some files in the `docs/reference` tree:
```bash
$ nox -re docgen
nox > Running session docgen
nox > Re-using existing virtual environment at .nox/docgen.
nox > pip install flask freezegun... | [
{
"content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/noxfile.py b/noxfile.py
index efb367e83..8c22b7a77 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -115,23 +115,6 @@ def cover(session):
session.run("coverage", "report", "--show-missing", "--fail-under=100")
-@nox.session(python="3.7")
-def docgen(session):
- session.env["SPHINX_APIDOC_OPTIONS"] =... |
bridgecrewio__checkov-2372 | crash introduce by https://github.com/bridgecrewio/checkov/pull/2356
**Describe the issue**
```
checkov -d test1/
```
**Examples**
test1/job.tf
```hcl
resource "aws_batch_job_definition" "foobar" {
name = "foobar"
type = "container"
container_properties = file("${path... | [
{
"content": "import json\nfrom checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck\n\n\nclass BatchJobIsNotPrivileged(BaseResourceCheck):\n def __init__(self):\n name = \"Batch job does not define a privi... | [
{
"content": "import json\nfrom checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck\n\n\nclass BatchJobIsNotPrivileged(BaseResourceCheck):\n def __init__(self):\n name = \"Batch job does not define a privi... | diff --git a/checkov/terraform/checks/resource/aws/BatchJobIsNotPrivileged.py b/checkov/terraform/checks/resource/aws/BatchJobIsNotPrivileged.py
index a1588a2fbe..2ee180307d 100644
--- a/checkov/terraform/checks/resource/aws/BatchJobIsNotPrivileged.py
+++ b/checkov/terraform/checks/resource/aws/BatchJobIsNotPrivileged.... |
iterative__dvc-1734 | logger: colorama is not outputting colors correctly on windows
version: `0.30.1`

| [
{
"content": "\"\"\"Manages logger for dvc repo.\"\"\"\n\nfrom __future__ import unicode_literals\n\nfrom dvc.exceptions import DvcException\nfrom dvc.utils.compat import str\nfrom dvc.progress import progress_aware\n\nimport re\nimport sys\nimport logging\nimport traceback\n\nfrom contextlib import contextmana... | [
{
"content": "\"\"\"Manages logger for dvc repo.\"\"\"\n\nfrom __future__ import unicode_literals\n\nfrom dvc.exceptions import DvcException\nfrom dvc.utils.compat import str\nfrom dvc.progress import progress_aware\n\nimport re\nimport sys\nimport logging\nimport traceback\n\nfrom contextlib import contextmana... | diff --git a/dvc/logger.py b/dvc/logger.py
index 69e16e1dc3..1352e3d0af 100644
--- a/dvc/logger.py
+++ b/dvc/logger.py
@@ -203,16 +203,16 @@ def colorize(message, color=None):
)
-def _init_colorama():
- colorama.init()
-
-
def set_default_level():
"""Sets default log level."""
logger.setLevel(log... |
cal-itp__benefits-2056 | Add custom properties for UTM code information
We are proposing to use UTM codes in query strings for various Benefits outreach campaigns. Read more about UTM codes in this article from Hubspot: https://blog.hubspot.com/marketing/what-are-utm-tracking-codes-ht
We need to implement these properties into the Amplitude... | [
{
"content": "\"\"\"\nThe core application: analytics implementation.\n\"\"\"\n\nimport itertools\nimport json\nimport logging\nimport re\nimport time\nimport uuid\n\nfrom django.conf import settings\nimport requests\n\nfrom benefits import VERSION\nfrom benefits.core.models import EligibilityType\nfrom . impor... | [
{
"content": "\"\"\"\nThe core application: analytics implementation.\n\"\"\"\n\nimport itertools\nimport json\nimport logging\nimport re\nimport time\nimport uuid\n\nfrom django.conf import settings\nimport requests\n\nfrom benefits import VERSION\nfrom benefits.core.models import EligibilityType\nfrom . impor... | diff --git a/benefits/core/analytics.py b/benefits/core/analytics.py
index d998571a4b..51dc4ae09a 100644
--- a/benefits/core/analytics.py
+++ b/benefits/core/analytics.py
@@ -92,6 +92,18 @@ class ViewedPageEvent(Event):
def __init__(self, request):
super().__init__(request, "viewed page")
+ # Add... |
fedora-infra__bodhi-2524 | Cannot edit an update that doesn't have bugs using the CLI without providing --bugs
While testing the second 3.9.0 beta today, I found that I was unable to edit an existing update using the CLI when ```--bugs``` was not supplied:
```
bodhi updates edit --staging --type bugfix FEDORA-2018-a06c4c8780 ... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright © 2014-2018 Red Hat, Inc. and others.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either ve... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright © 2014-2018 Red Hat, Inc. and others.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either ve... | diff --git a/bodhi/client/__init__.py b/bodhi/client/__init__.py
index 09d453c3c2..c67308ee07 100644
--- a/bodhi/client/__init__.py
+++ b/bodhi/client/__init__.py
@@ -422,9 +422,10 @@ def edit(user, password, url, debug, **kwargs):
kwargs['edited'] = title
# Convert list of 'Bug' instances in DB to ... |
rasterio__rasterio-2790 | Calculation of raster bounds is incorrect for rotated rasters
## Expected behavior and actual behavior.
Expected: Rasterio computes correct raster bounds using functions like ~`ds.bounds~` and `rasterio.transform.array_bounds` (edit: the first one does work properly - the maths is implemented differently).
Actual... | [
{
"content": "\"\"\"Geospatial transforms\"\"\"\n\nfrom contextlib import ExitStack\nfrom functools import partial\nimport math\nimport numpy as np\nimport warnings\n\nfrom affine import Affine\n\nfrom rasterio.env import env_ctx_if_needed\nfrom rasterio._transform import (\n _transform_from_gcps,\n RPCTr... | [
{
"content": "\"\"\"Geospatial transforms\"\"\"\n\nfrom contextlib import ExitStack\nfrom functools import partial\nimport math\nimport numpy as np\nimport warnings\n\nfrom affine import Affine\n\nfrom rasterio.env import env_ctx_if_needed\nfrom rasterio._transform import (\n _transform_from_gcps,\n RPCTr... | diff --git a/rasterio/transform.py b/rasterio/transform.py
index 758f1f06f..0d1a97972 100644
--- a/rasterio/transform.py
+++ b/rasterio/transform.py
@@ -196,9 +196,19 @@ def array_bounds(height, width, transform):
its height, width, and an affine transform.
"""
- w, n = transform.xoff, transform.yoff
- ... |
xorbitsai__inference-351 | FEAT: support WizardMath v1.0
### Is your feature request related to a problem? Please describe
https://huggingface.co/WizardLM/WizardMath-13B-V1.0
| [
{
"content": "# Copyright 2022-2023 XProbe Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | [
{
"content": "# Copyright 2022-2023 XProbe Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | diff --git a/doc/source/models/builtin/index.rst b/doc/source/models/builtin/index.rst
index 22e4c87124..aa180b45fd 100644
--- a/doc/source/models/builtin/index.rst
+++ b/doc/source/models/builtin/index.rst
@@ -34,6 +34,7 @@ Chat & Instruction-following Models
- :ref:`Vicuna v1.5 <models_builtin_vicuna_v1_5>`
- :ref:... |
dmlc__dgl-946 | [Bug] DGLSubGraph.map_to_subgraph_nid error in v0.3
Hello,
The method map_to_subgraph_nid from DGLSubGraph seems to malfunction.
The following example code:
`import dgl`
`g=dgl.DGLGraph()`
`g.add_nodes(10)`
`h=g.subgraph([0,1,2,5,8])`
`h.map_to_subgraph_nid([0,8,2])`
produces the following error chain:... | [
{
"content": "\"\"\"Class for subgraph data structure.\"\"\"\nfrom __future__ import absolute_import\n\nfrom .frame import Frame, FrameRef\nfrom .graph import DGLGraph\nfrom . import utils\nfrom .base import DGLError\nfrom .graph_index import map_to_subgraph_nid\n\nclass DGLSubGraph(DGLGraph):\n \"\"\"The su... | [
{
"content": "\"\"\"Class for subgraph data structure.\"\"\"\nfrom __future__ import absolute_import\n\nfrom .frame import Frame, FrameRef\nfrom .graph import DGLGraph\nfrom . import utils\nfrom .base import DGLError\nfrom .graph_index import map_to_subgraph_nid\n\nclass DGLSubGraph(DGLGraph):\n \"\"\"The su... | diff --git a/python/dgl/subgraph.py b/python/dgl/subgraph.py
index df839523e643..bf3b702305a6 100644
--- a/python/dgl/subgraph.py
+++ b/python/dgl/subgraph.py
@@ -46,6 +46,7 @@ def __init__(self, parent, sgi, shared=False):
self._parent = parent
self._parent_nid = sgi.induced_nodes
self._pare... |
pypa__pip-5138 | Badly formatted help string of --upgrade-strategy option
* Pip version: 10.0.0b1 (it's nice to see this one on tracks! Congrats!)
* Python version: 3.6.4
* Operating system: Linux
### Description:
The `%(default)` place holder isn't properly replaced with `"only-if-needed"`.
### What I've run:
```
pytho... | [
{
"content": "from __future__ import absolute_import\n\nimport errno\nimport logging\nimport operator\nimport os\nimport shutil\nfrom optparse import SUPPRESS_HELP\n\nfrom pip._internal import cmdoptions\nfrom pip._internal.basecommand import RequirementCommand\nfrom pip._internal.cache import WheelCache\nfrom ... | [
{
"content": "from __future__ import absolute_import\n\nimport errno\nimport logging\nimport operator\nimport os\nimport shutil\nfrom optparse import SUPPRESS_HELP\n\nfrom pip._internal import cmdoptions\nfrom pip._internal.basecommand import RequirementCommand\nfrom pip._internal.cache import WheelCache\nfrom ... | diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py
index 62b59715c06..bedaa4bc3cd 100644
--- a/src/pip/_internal/commands/install.py
+++ b/src/pip/_internal/commands/install.py
@@ -124,7 +124,7 @@ def __init__(self, *args, **kw):
default='only-if-needed',
... |
SCons__scons-3108 | Build failed with MSVC_BATCH and spaces in path
When target dir path has spaces and MSVC_BATCH set to true - cl.exe failed.
Actually it is cl.exe "feature" - Target dir needs to end with slash, not backslash.
In SCons code msvc_output_flag function return '/Fo${TARGET.dir}' + os.sep
Should be '/Fo${TARGET.dir}/'
... | [
{
"content": "\"\"\"engine.SCons.Tool.msvc\n\nTool-specific initialization for Microsoft Visual C/C++.\n\nThere normally shouldn't be any need to import this module directly.\nIt will usually be imported through the generic SCons.Tool.Tool()\nselection method.\n\n\"\"\"\n\n#\n# __COPYRIGHT__\n#\n# Permission is... | [
{
"content": "\"\"\"engine.SCons.Tool.msvc\n\nTool-specific initialization for Microsoft Visual C/C++.\n\nThere normally shouldn't be any need to import this module directly.\nIt will usually be imported through the generic SCons.Tool.Tool()\nselection method.\n\n\"\"\"\n\n#\n# __COPYRIGHT__\n#\n# Permission is... | diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 919ad46007..d13fdecec9 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -32,6 +32,8 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE
From William Deegan:
- Remove long deprecated SCons.Options code and tests. This removes BoolOption,Enum... |
feast-dev__feast-2325 | Apply is incorrectly reporting tables to add as tables to delete
## Expected Behavior
```
feast apply
Deploying infrastructure for ...
```
## Current Behavior
```
feast apply
Removing infrastructure for ...
```
## Steps to reproduce
Add a feature view and run feast apply.
### Specifications
- Ve... | [
{
"content": "import importlib\nimport json\nimport os\nimport random\nimport re\nimport sys\nfrom importlib.abc import Loader\nfrom importlib.machinery import ModuleSpec\nfrom pathlib import Path\nfrom typing import List, Set, Union\n\nimport click\nfrom click.exceptions import BadParameter\n\nfrom feast.diff.... | [
{
"content": "import importlib\nimport json\nimport os\nimport random\nimport re\nimport sys\nfrom importlib.abc import Loader\nfrom importlib.machinery import ModuleSpec\nfrom pathlib import Path\nfrom typing import List, Set, Union\n\nimport click\nfrom click.exceptions import BadParameter\n\nfrom feast.diff.... | diff --git a/sdk/python/feast/repo_operations.py b/sdk/python/feast/repo_operations.py
index 3b0f528e094..cba04a99425 100644
--- a/sdk/python/feast/repo_operations.py
+++ b/sdk/python/feast/repo_operations.py
@@ -209,8 +209,8 @@ def apply_total_with_repo_instance(
(
all_to_apply,
all_to_delete,
-... |
chainer__chainer-6057 | Occasional test failure in `TestWalkerAlias`
Occasionally, the result of `xp.random.uniform(0, 1, shape).astype(thr_dtype)` becomes `1.0`, and `self.threshold[index]` raises an `IndexError`.
https://ci.appveyor.com/project/pfnet/chainer/builds/21769400/job/96weerl928ipapc6
| [
{
"content": "import numpy\n\nimport chainer\nfrom chainer import backend\nfrom chainer.backends import cuda\n\n\nclass WalkerAlias(object):\n \"\"\"Implementation of Walker's alias method.\n\n This method generates a random sample from given probabilities\n :math:`p_1, \\\\dots, p_n` in :math:`O(1)` t... | [
{
"content": "import numpy\n\nimport chainer\nfrom chainer import backend\nfrom chainer.backends import cuda\n\n\nclass WalkerAlias(object):\n \"\"\"Implementation of Walker's alias method.\n\n This method generates a random sample from given probabilities\n :math:`p_1, \\\\dots, p_n` in :math:`O(1)` t... | diff --git a/chainer/utils/walker_alias.py b/chainer/utils/walker_alias.py
index 27c7bba73e52..f4277b096e70 100644
--- a/chainer/utils/walker_alias.py
+++ b/chainer/utils/walker_alias.py
@@ -104,12 +104,11 @@ def sample(self, shape):
def sample_xp(self, xp, shape):
thr_dtype = self.threshold.dtype
- ... |
getnikola__nikola-2685 | Posts with paths not relative to cwd put their cache in unusual places
If posts use absolute paths, or paths that refer to parent directories (eg. when provided by custom scanners), the cache ends up appearing in weird places, eg. alongside the source files.
| [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2017 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2017 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi... | diff --git a/CHANGES.txt b/CHANGES.txt
index 30c39335ab..3c1df8e648 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -18,6 +18,8 @@ Features
Bugfixes
--------
+* Prevent writing cache files outside of the cache folder
+ (Issue #2684)
* Fix mimetype guessing in auto mode (Issue #2645)
* Fix filters.html5lib_xmllike ... |
certbot__certbot-6838 | Invalid OCSP response for /etc/letsencrypt/live/.../cert.pem: param thisUpdate is in the future..
If you're having trouble using Certbot and aren't sure you've found a bug or
request for a new feature, please first try asking for help at
https://community.letsencrypt.org/. There is a much larger community there of
p... | [
{
"content": "\"\"\"Tools for checking certificate revocation.\"\"\"\nimport logging\nimport re\nfrom datetime import datetime, timedelta\nfrom subprocess import Popen, PIPE\n\ntry:\n # Only cryptography>=2.5 has ocsp module\n # and signature_hash_algorithm attribute in OCSPResponse class\n from crypto... | [
{
"content": "\"\"\"Tools for checking certificate revocation.\"\"\"\nimport logging\nimport re\nfrom datetime import datetime, timedelta\nfrom subprocess import Popen, PIPE\n\ntry:\n # Only cryptography>=2.5 has ocsp module\n # and signature_hash_algorithm attribute in OCSPResponse class\n from crypto... | diff --git a/certbot/ocsp.py b/certbot/ocsp.py
index 6f4c0b0fbaa..bc63c40f94c 100644
--- a/certbot/ocsp.py
+++ b/certbot/ocsp.py
@@ -200,7 +200,7 @@ def _check_ocsp_response(response_ocsp, request_ocsp, issuer_cert):
# for OpenSSL, so we do not do it here.
# See OpenSSL implementation as a reference:
... |
googleapis__python-bigquery-768 | Expand range for 'google-{api-core,cloud-core,resumable-media}' to allow 2.x versions
| [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | diff --git a/setup.py b/setup.py
index fcb1dd966..71958ccf9 100644
--- a/setup.py
+++ b/setup.py
@@ -30,10 +30,10 @@
release_status = "Development Status :: 5 - Production/Stable"
dependencies = [
"grpcio >= 1.38.1, < 2.0dev", # https://github.com/googleapis/python-bigquery/issues/695
- "google-api-core[grpc... |
bentoml__BentoML-4456 | bug: Pulling latest version from Remote Yatai Store does not work on Windows - Path Error
### Describe the bug
I pushed a working model to our local Yatai server. However, I can not pull it again, as the latest model is not found on remote Bento store.
If I add the version code manually the Bento is found but, I ge... | [
{
"content": "from __future__ import annotations\n\nimport tarfile\nimport tempfile\nimport threading\nimport typing as t\nimport warnings\nfrom concurrent.futures import ThreadPoolExecutor\nfrom pathlib import Path\nfrom tempfile import NamedTemporaryFile\n\nimport fs\nimport requests\nfrom rich.live import Li... | [
{
"content": "from __future__ import annotations\n\nimport tarfile\nimport tempfile\nimport threading\nimport typing as t\nimport warnings\nfrom concurrent.futures import ThreadPoolExecutor\nfrom pathlib import Path\nfrom tempfile import NamedTemporaryFile\n\nimport fs\nimport requests\nfrom rich.live import Li... | diff --git a/src/bentoml/_internal/cloud/bentocloud.py b/src/bentoml/_internal/cloud/bentocloud.py
index 0cdd38034cf..b1aac7b9e6d 100644
--- a/src/bentoml/_internal/cloud/bentocloud.py
+++ b/src/bentoml/_internal/cloud/bentocloud.py
@@ -544,7 +544,7 @@ def pull_model(model_tag: Tag):
co... |
pymedusa__Medusa-5293 | [APP SUBMITTED]: ProtocolError: (u'api.broadcasthe.net/', 502, 'Bad Gateway', <httplib.HTTPMessage instance at 0x4f89db20>)
### INFO
**Python Version**: `2.7.9 (default, Sep 17 2016, 20:26:04) [GCC 4.9.2]`
**Operating System**: `Linux-4.9.35-v7+-armv7l-with-debian-8.0`
**Locale**: `UTF-8`
**Branch**: [develop](../tree... | [
{
"content": "# coding=utf-8\n\n\"\"\"Provider code for BTN.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport socket\nimport time\n\nimport jsonrpclib\n\nfrom medusa import (\n app,\n scene_exceptions,\n tv,\n)\nfrom medusa.common import cpu_presets\nfrom medusa.helper.common ... | [
{
"content": "# coding=utf-8\n\n\"\"\"Provider code for BTN.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport socket\nimport time\n\nimport jsonrpclib\n\nfrom medusa import (\n app,\n scene_exceptions,\n tv,\n)\nfrom medusa.common import cpu_presets\nfrom medusa.helper.common ... | diff --git a/medusa/providers/torrent/json/btn.py b/medusa/providers/torrent/json/btn.py
index 3d6f5fbfed..be3b4ea8d6 100644
--- a/medusa/providers/torrent/json/btn.py
+++ b/medusa/providers/torrent/json/btn.py
@@ -280,7 +280,7 @@ def _api_call(self, params=None, results_per_page=300, offset=0):
log.wa... |
blakeblackshear__frigate-5586 | FFprobe "Copy" Button
### Describe the problem you are having
In 0.12, FFProbe is available directly on the System page for each camera, which is fantastic. The problem is if you use the "Copy" button, instead of actually copying the raw JSON, it copies an encoded-string version of the JSON, which is really hard to r... | [
{
"content": "import base64\nfrom datetime import datetime, timedelta, timezone\nimport copy\nimport glob\nimport logging\nimport json\nimport os\nimport subprocess as sp\nimport pytz\nimport time\nimport traceback\n\nfrom functools import reduce\nfrom pathlib import Path\nfrom tzlocal import get_localzone_name... | [
{
"content": "import base64\nfrom datetime import datetime, timedelta, timezone\nimport copy\nimport glob\nimport logging\nimport json\nimport os\nimport subprocess as sp\nimport pytz\nimport time\nimport traceback\n\nfrom functools import reduce\nfrom pathlib import Path\nfrom tzlocal import get_localzone_name... | diff --git a/frigate/http.py b/frigate/http.py
index a5f9834eb9..1649ab55ea 100644
--- a/frigate/http.py
+++ b/frigate/http.py
@@ -1296,12 +1296,12 @@ def ffprobe():
output.append(
{
"return_code": ffprobe.returncode,
- "stderr": json.loads(ffprobe.stderr.decode("un... |
spotify__luigi-3081 | Throwing warning for deprecated `disable_window_seconds`
Currently the `disable_window` function https://github.com/spotify/luigi/blob/92fe69e022989ebac6a5197fb8396042851e0497/luigi/task.py#L216 returns a reference to `disable_window_seconds` https://github.com/spotify/luigi/blob/92fe69e022989ebac6a5197fb8396042851e04... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#... | diff --git a/luigi/task.py b/luigi/task.py
index e21631af37..117ce82c03 100644
--- a/luigi/task.py
+++ b/luigi/task.py
@@ -218,12 +218,12 @@ def disable_window(self):
Override this positive integer to have different ``disable_window`` at task level.
Check :ref:`scheduler-config`
"""
- ... |
aio-libs__aiohttp-5407 | Can't read response content after checking response.ok
🐞 **Describe the bug**
For failed requests, ClientResponse is "released" after calling to `resposne.ok` and therefore can't read `response.text()` after checking `response.ok`
💡 **To Reproduce**
```python
async with session.get("url-returning-400+") as resp... | [
{
"content": "import asyncio\nimport codecs\nimport functools\nimport io\nimport re\nimport sys\nimport traceback\nimport warnings\nfrom hashlib import md5, sha1, sha256\nfrom http.cookies import CookieError, Morsel, SimpleCookie\nfrom types import MappingProxyType, TracebackType\nfrom typing import (\n TYPE... | [
{
"content": "import asyncio\nimport codecs\nimport functools\nimport io\nimport re\nimport sys\nimport traceback\nimport warnings\nfrom hashlib import md5, sha1, sha256\nfrom http.cookies import CookieError, Morsel, SimpleCookie\nfrom types import MappingProxyType, TracebackType\nfrom typing import (\n TYPE... | diff --git a/CHANGES/5403.bugfix b/CHANGES/5403.bugfix
new file mode 100644
index 00000000000..40cc5a22294
--- /dev/null
+++ b/CHANGES/5403.bugfix
@@ -0,0 +1 @@
+Stop automatically releasing the ``ClientResponse`` object on calls to the ``ok`` property for the failed requests.
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTO... |
Lightning-AI__torchmetrics-1607 | RuntimeError: value cannot be converted to type int without overflow
## 🐛 Bug
I'm having an error while trying to calculate mAP for my Faster-RCNN object detection model with custom dataset in pytorch while testing.
### To Reproduce
**Error message:**
```
Traceback (most recent call last):
File "c:\Users\... | [
{
"content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | [
{
"content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 99f5c06e413..b74f8e97721 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -115,6 +115,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed corner case for `PearsonCorrCoef` when running in ddp mode but only on single device ([#1587]... |
qutebrowser__qutebrowser-2242 | q<Fn> tries to record macro
I'm not sure if this is solved in #2113, but currently when doing `q<Fn>` I get `Recording macro ''...`
cc @blyxxyz
| [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | diff --git a/qutebrowser/keyinput/modeparsers.py b/qutebrowser/keyinput/modeparsers.py
index 25793785210..db540b58eb6 100644
--- a/qutebrowser/keyinput/modeparsers.py
+++ b/qutebrowser/keyinput/modeparsers.py
@@ -294,12 +294,12 @@ def handle(self, e):
if super().handle(e):
return True
- i... |
nautobot__nautobot-5641 | Cloning objects with special characters in a clone_field
<!--
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
This form is only for reporting reproducible bugs. If you need assistance
with Nautobot installation, or if you have a general question, please start a
discussion ins... | [
{
"content": "import datetime\nfrom io import BytesIO\n\nfrom django.contrib import messages\nfrom django.core.exceptions import FieldError, ValidationError\nfrom django.db.models import ForeignKey\nfrom django.utils.html import format_html, format_html_join\nfrom django.utils.safestring import mark_safe\nfrom ... | [
{
"content": "import datetime\nfrom io import BytesIO\nimport urllib.parse\n\nfrom django.contrib import messages\nfrom django.core.exceptions import FieldError, ValidationError\nfrom django.db.models import ForeignKey\nfrom django.utils.html import format_html, format_html_join\nfrom django.utils.safestring im... | diff --git a/changes/5640.fixed b/changes/5640.fixed
new file mode 100644
index 00000000000..68be6d39200
--- /dev/null
+++ b/changes/5640.fixed
@@ -0,0 +1 @@
+Fixed bug in generating the URL parameters for cloning objects.
diff --git a/nautobot/core/tests/test_views_utils.py b/nautobot/core/tests/test_views_utils.py
in... |
Nitrate__Nitrate-649 | Upgrade db image to newer version
Upgrade following images:
- MySQL 8.0.20
- PostgreSQL 12.2
- MariaDB 10.4.12
| [
{
"content": "#!/usr/bin/env python3\n#\n# Nitrate is a test case management system.\n# Copyright (C) 2019 Nitrate Team\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 vers... | [
{
"content": "#!/usr/bin/env python3\n#\n# Nitrate is a test case management system.\n# Copyright (C) 2019 Nitrate Team\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 vers... | diff --git a/README.rst b/README.rst
index b9acb049..da244c90 100644
--- a/README.rst
+++ b/README.rst
@@ -52,9 +52,9 @@ Nitrate works with:
What's more, Nitrate is tested with the following database versions:
-* MariaDB: ``10.2.21``.
-* MySQL: ``5.7``.
-* PostgreSQL: ``10.6``.
+* MariaDB: ``10.4.12``.
+* MySQL: `... |
dask__dask-6573 | Wrong path when reading empty csv file
```python
import dask.dataframe as dd
for k, content in enumerate(["0, 1, 2", "3, 4, 5", "6, 7, 8"]):
with open(str(k) + ".csv", "w") as file:
file.write(content)
print(dd.read_csv("*.csv", include_path_column=True, names=["A", "B", "C"],).compute())
print... | [
{
"content": "from collections.abc import Mapping\nfrom io import BytesIO\nfrom warnings import warn, catch_warnings, simplefilter\n\ntry:\n import psutil\nexcept ImportError:\n psutil = None\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import (\n is_integer_dtype,\n is_float_dt... | [
{
"content": "from os.path import basename\nfrom collections.abc import Mapping\nfrom io import BytesIO\nfrom warnings import warn, catch_warnings, simplefilter\n\ntry:\n import psutil\nexcept ImportError:\n psutil = None\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import (\n is_i... | diff --git a/dask/dataframe/io/csv.py b/dask/dataframe/io/csv.py
index 769e50b9a3b..9c6b4e805a1 100644
--- a/dask/dataframe/io/csv.py
+++ b/dask/dataframe/io/csv.py
@@ -1,3 +1,4 @@
+from os.path import basename
from collections.abc import Mapping
from io import BytesIO
from warnings import warn, catch_warnings, simp... |
adamchainz__django-mysql-88 | ORDER BY FIELD(name, val, val, val...)
As suggested by @danielroseman.
As of Django 1.8, `order_by` can take expressions - https://docs.djangoproject.com/en/1.8/ref/models/querysets/#order-by , thus the `FIELD` function ( https://mariadb.com/kb/en/mariadb/field/ ) should be implemented, which can be used for getting r... | [
{
"content": "from django.db.models import CharField, IntegerField, TextField\n\nfrom django_mysql.shims.expressions import Func, Value\n\n\nclass SingleArgFunc(Func):\n\n output_field_class = None\n\n def __init__(self, expression):\n super(SingleArgFunc, self).__init__(expression)\n if sel... | [
{
"content": "from django.db.models import CharField, IntegerField, TextField\n\nfrom django_mysql.shims.expressions import Func, Value\n\n\nclass SingleArgFunc(Func):\n\n output_field_class = None\n\n def __init__(self, expression):\n super(SingleArgFunc, self).__init__(expression)\n if sel... | diff --git a/django_mysql/models/functions.py b/django_mysql/models/functions.py
index 4e000c93..a35ccce1 100644
--- a/django_mysql/models/functions.py
+++ b/django_mysql/models/functions.py
@@ -91,6 +91,32 @@ def __init__(self, *expressions, **kwargs):
output_field=output_field)... |
keras-team__keras-8801 | [BUG] CSVLogger fails if training stops in the first epoch
`callbacks.py: CSVLogger: on_epoch_end` - the `self.keys` dict is `None` when `model.stop_training = True` and the first epoch have not been completed yet. This results in `TypeError: 'NoneType' object is not iterable`.
Short example:
```python
from keras.... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import print_function\n\nimport os\nimport csv\nimport six\n\nimport numpy as np\nimport time\nimport json\nimport warnings\n\nfrom collections import deque\nfrom collections import OrderedDict\nfrom collections import Iterable\nfrom .utils.g... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import print_function\n\nimport os\nimport csv\nimport six\n\nimport numpy as np\nimport time\nimport json\nimport warnings\n\nfrom collections import deque\nfrom collections import OrderedDict\nfrom collections import Iterable\nfrom .utils.g... | diff --git a/keras/callbacks.py b/keras/callbacks.py
index d86c26ce0f28..55d640e2a84d 100644
--- a/keras/callbacks.py
+++ b/keras/callbacks.py
@@ -965,13 +965,14 @@ def handle_value(k):
else:
return k
+ if self.keys is None:
+ self.keys = sorted(logs.keys())
+
... |
platformsh__platformsh-docs-2105 | :arrow_up: Update MeiliSearch
### What needs to be documented?
We should update MeiliSearch to version 0.25. This means we have to change how we manage API keys. It does mean we can create more keys for monitoring and the like.
### Additional context
[Blog post on version](https://blog.meilisearch.com/whats-ne... | [
{
"content": "import os\nimport glob\nimport json\nimport meilisearch\nfrom platformshconfig import Config\n\nclass Search:\n def __init__(self):\n self.default = {\n \"host\": \"http://127.0.0.1\",\n \"key\": None,\n \"port\": 7700\n }\n\n self.scrape_di... | [
{
"content": "import os\nimport glob\nimport json\nimport meilisearch\nfrom platformshconfig import Config\n\nclass Search:\n def __init__(self):\n self.default = {\n \"host\": \"http://127.0.0.1\",\n \"key\": None,\n \"port\": 7700\n }\n\n self.scrape_di... | diff --git a/docs/config/_default/params.yaml b/docs/config/_default/params.yaml
index 86701251d6..5100783f5f 100644
--- a/docs/config/_default/params.yaml
+++ b/docs/config/_default/params.yaml
@@ -1,6 +1,6 @@
# Basics
-version: "1.0.0"
+version: "1.0.1"
description: Platform.sh User Documentation
author: Platfor... |
horovod__horovod-3194 | Unit test fails on test-cpu-gloo-py3_8-tfhead-keras_none-torchhead-mxnethead-pyspark3_1_2
Recently lots of torch collectives related unit tests are failing under this config.
For example: https://github.com/horovod/horovod/runs/3510886664
```
[1]<stdout>:test_torch.py::TorchTests::test_horovod_allgather_grad FAILE... | [
{
"content": "# Copyright 2019 Uber Technologies, Inc. All Rights Reserved.\n# Modifications copyright Microsoft\n# Modifications copyright (C) 2020, NVIDIA CORPORATION. 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... | [
{
"content": "# Copyright 2019 Uber Technologies, Inc. All Rights Reserved.\n# Modifications copyright Microsoft\n# Modifications copyright (C) 2020, NVIDIA CORPORATION. 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... | diff --git a/setup.py b/setup.py
index 4d4ff499c4..51ab6b39e2 100644
--- a/setup.py
+++ b/setup.py
@@ -124,7 +124,8 @@ def build_extensions(self):
'pyspark>=3.0.0;python_version>="3.8"']
# Pin h5py: https://github.com/h5py/h5py/issues/1732
spark_require_list = ['h5py<3', 'numpy', 'petastorm>=... |
apache__airflow-37402 | Airflow Helm chart fails to deploy with ArgoCD
### Official Helm Chart version
1.12.0 (latest released)
### Apache Airflow version
latest
### Kubernetes Version
1.29
### Helm Chart configuration
No parameters with the simple ArgoCD deployment (5.51.x).
### Docker Image customizations
no
### What happened
Arg... | [
{
"content": "#!/usr/bin/env python3\n\n\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache... | [
{
"content": "#!/usr/bin/env python3\n\n\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache... | diff --git a/dev/breeze/src/airflow_breeze/utils/reproducible.py b/dev/breeze/src/airflow_breeze/utils/reproducible.py
index 660e01b0a666e..cf4005d9ddd10 100644
--- a/dev/breeze/src/airflow_breeze/utils/reproducible.py
+++ b/dev/breeze/src/airflow_breeze/utils/reproducible.py
@@ -137,6 +137,8 @@ def reset(tarinfo):
... |
mkdocs__mkdocs-1294 | Permission denied when copying a template from a read-only path
There are two things uncommon about my setup that cause the error.
1. I have installed mkdocs using [Nix](https://nixos.org/nix/). Long story short, all the mkdocs files (the ones in `lib/python2.7/site-packages/mkdocs`) have mode 0444 (that is, read-on... | [
{
"content": "# coding: utf-8\n\n\"\"\"\nStandalone file utils.\n\nNothing in this module should have an knowledge of config or the layout\nand structure of the site and pages in the site.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport markdown\nimport os\nimport pkg_resources\nimp... | [
{
"content": "# coding: utf-8\n\n\"\"\"\nStandalone file utils.\n\nNothing in this module should have an knowledge of config or the layout\nand structure of the site and pages in the site.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport markdown\nimport os\nimport pkg_resources\nimp... | diff --git a/mkdocs/tests/utils/utils_tests.py b/mkdocs/tests/utils/utils_tests.py
index 5ffe24fdd5..fec697f777 100644
--- a/mkdocs/tests/utils/utils_tests.py
+++ b/mkdocs/tests/utils/utils_tests.py
@@ -6,6 +6,9 @@
import mock
import os
import unittest
+import tempfile
+import shutil
+import stat
from mkdocs impo... |
aws-cloudformation__cfn-lint-2017 | E7003 Errors when using Fn::Transform inside a Mapping
*cfn-lint version: 0.49.2*
*Description of issue.*
#2006 tightened what is considered valid for use in a Mapping. This causes it to reject what otherwise appears to be a valid use of `Fn::Transform` as the body of a Mapping.
For example, this snippet is val... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport re\nimport six\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\nfrom cfnlint.helpers import REGEX_ALPHANUMERIC\n\n\nclass KeyName(CloudF... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport re\nimport six\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\nfrom cfnlint.helpers import REGEX_ALPHANUMERIC\n\n\nclass KeyName(CloudF... | diff --git a/src/cfnlint/rules/mappings/KeyName.py b/src/cfnlint/rules/mappings/KeyName.py
index 4b674abac2..ea75240ea6 100644
--- a/src/cfnlint/rules/mappings/KeyName.py
+++ b/src/cfnlint/rules/mappings/KeyName.py
@@ -35,7 +35,7 @@ def check_key(self, key, path):
if not isinstance(key, six.string_types):
... |
Azure__azure-cli-extensions-5674 | Image Copy '--target-subscription' Argument Ignored
### Related command
<!--- Please provide the related command with az {command} if you can, so that we can quickly route to the related team for help. --->
```bash
az image copy --source-resource-group <source_rg_name> \
--source-object-name <source_image_n... | [
{
"content": "# --------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for license information.\n# -------------------------------------------... | [
{
"content": "# --------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for license information.\n# -------------------------------------------... | diff --git a/src/image-copy/azext_imagecopy/custom.py b/src/image-copy/azext_imagecopy/custom.py
index 62f7c74083d..bd45e43da10 100644
--- a/src/image-copy/azext_imagecopy/custom.py
+++ b/src/image-copy/azext_imagecopy/custom.py
@@ -33,8 +33,9 @@ def imagecopy(cmd, source_resource_group_name, source_object_name, target... |
Flexget__Flexget-3477 | <urlopen error [Errno 2] No such file or directory with # in filename
<!---
Before opening an issue, verify:
- Is this a feature request? Post it on https://feathub.com/Flexget/Flexget
- Is this an issue with webui? Make an issue over on https://github.com/Flexget/webui
- Did you recently upgrade? Look at the Ch... | [
{
"content": "import os\nimport time\n\nfrom loguru import logger\n\nfrom flexget import plugin\nfrom flexget.event import event\nfrom flexget.utils.pathscrub import pathscrub\nfrom flexget.utils.tools import parse_timedelta\n\nlogger = logger.bind(name='convert_magnet')\n\n\nclass ConvertMagnet:\n \"\"\"Con... | [
{
"content": "import os\nimport time\nfrom urllib.parse import quote\n\nfrom loguru import logger\n\nfrom flexget import plugin\nfrom flexget.event import event\nfrom flexget.utils.pathscrub import pathscrub\nfrom flexget.utils.tools import parse_timedelta\n\nlogger = logger.bind(name='convert_magnet')\n\n\ncla... | diff --git a/flexget/components/bittorrent/convert_magnet.py b/flexget/components/bittorrent/convert_magnet.py
index f8b76511b0..eb6434cb17 100644
--- a/flexget/components/bittorrent/convert_magnet.py
+++ b/flexget/components/bittorrent/convert_magnet.py
@@ -1,5 +1,6 @@
import os
import time
+from urllib.parse import... |
docker__docker-py-1959 | getting timeout after streaming logs for some time
This is very likely an engine issue, first I would like to open here.
It looks like there is a change in behavior. When streaming logs with 1.10 I get timeout:
```
Traceback (most recent call last):
File "/usr/lib64/python3.5/threading.py", line 914, in _bootstrap_... | [
{
"content": "import json\nimport struct\nimport urllib\nfrom functools import partial\n\nimport requests\nimport requests.exceptions\nimport websocket\n\nfrom .. import auth\nfrom ..constants import (DEFAULT_NUM_POOLS, DEFAULT_NUM_POOLS_SSH,\n DEFAULT_MAX_POOL_SIZE, DEFAULT_TIMEOUT_SECO... | [
{
"content": "import json\nimport struct\nimport urllib\nfrom functools import partial\n\nimport requests\nimport requests.exceptions\nimport websocket\n\nfrom .. import auth\nfrom ..constants import (DEFAULT_NUM_POOLS, DEFAULT_NUM_POOLS_SSH,\n DEFAULT_MAX_POOL_SIZE, DEFAULT_TIMEOUT_SECO... | diff --git a/docker/api/client.py b/docker/api/client.py
index f0cb39b86..2667922d9 100644
--- a/docker/api/client.py
+++ b/docker/api/client.py
@@ -397,6 +397,12 @@ def _multiplexed_response_stream_helper(self, response):
def _stream_raw_result(self, response, chunk_size=1, decode=True):
''' Stream resul... |
litestar-org__litestar-2214 | Bug: Fix issues with py-redis >=4.5.0
### Description
We currently pin redis to version `4.4.4` because any version above that causes test failues. I was not able to determine the reason for this test failures, but this will cause issues for users who wish to use the newer versions of the library (version 5.0.0 is alr... | [
{
"content": "from __future__ import annotations\n\nimport asyncio\nfrom asyncio import CancelledError, Queue, Task, create_task\nfrom contextlib import AbstractAsyncContextManager, asynccontextmanager, suppress\nfrom functools import partial\nfrom typing import TYPE_CHECKING, AsyncGenerator, Awaitable, Callabl... | [
{
"content": "from __future__ import annotations\n\nimport asyncio\nfrom asyncio import CancelledError, Queue, Task, create_task\nfrom contextlib import AbstractAsyncContextManager, asynccontextmanager, suppress\nfrom functools import partial\nfrom typing import TYPE_CHECKING, AsyncGenerator, Awaitable, Callabl... | diff --git a/litestar/channels/plugin.py b/litestar/channels/plugin.py
index 4548c43bdf..7daa861657 100644
--- a/litestar/channels/plugin.py
+++ b/litestar/channels/plugin.py
@@ -333,8 +333,6 @@ async def _on_shutdown(self) -> None:
]
)
- await self._backend.on_shutdown()
-
if se... |
learningequality__kolibri-8076 | Catch ValueError during network discovery for when JSON parsing fails
<!--
Instructions:
* Fill out the sections below, replace …'s with information about your issue
* Use the 'preview' function above this text box to verify formatting before submitting
-->
### Observed behavior
<!--
Description of the behav... | [
{
"content": "import logging\n\nimport requests\nfrom six.moves.urllib.parse import urljoin\n\nfrom . import errors\nfrom .urls import get_normalized_url_variations\n\nlogger = logging.getLogger(__name__)\n\n\nclass NetworkClient(object):\n DEFAULT_TIMEOUT_IN_SECS = 5\n\n def __init__(self, base_url=None,... | [
{
"content": "import logging\n\nimport requests\nfrom six.moves.urllib.parse import urljoin\n\nfrom . import errors\nfrom .urls import get_normalized_url_variations\n\nlogger = logging.getLogger(__name__)\n\n\nclass NetworkClient(object):\n DEFAULT_TIMEOUT_IN_SECS = 5\n\n def __init__(self, base_url=None,... | diff --git a/kolibri/core/discovery/utils/network/client.py b/kolibri/core/discovery/utils/network/client.py
index 431e6dac037..727906f5729 100644
--- a/kolibri/core/discovery/utils/network/client.py
+++ b/kolibri/core/discovery/utils/network/client.py
@@ -55,6 +55,10 @@ def _attempt_connections(self, urls):
... |
fonttools__fonttools-3096 | Running ttx with -s (split tables) option fails on url safe source filenames that contain '%' character
When attempting to run the ttx command with the `-s` (Split tables) option on font filenames that have been made url safe fails with an unhandled exception.
This is caused by the source filenames containing the '%'... | [
{
"content": "from fontTools.config import Config\nfrom fontTools.misc import xmlWriter\nfrom fontTools.misc.configTools import AbstractConfig\nfrom fontTools.misc.textTools import Tag, byteord, tostr\nfrom fontTools.misc.loggingTools import deprecateArgument\nfrom fontTools.ttLib import TTLibError\nfrom fontTo... | [
{
"content": "from fontTools.config import Config\nfrom fontTools.misc import xmlWriter\nfrom fontTools.misc.configTools import AbstractConfig\nfrom fontTools.misc.textTools import Tag, byteord, tostr\nfrom fontTools.misc.loggingTools import deprecateArgument\nfrom fontTools.ttLib import TTLibError\nfrom fontTo... | diff --git a/Lib/fontTools/ttLib/ttFont.py b/Lib/fontTools/ttLib/ttFont.py
index cc1da3856f..1bece8e5e4 100644
--- a/Lib/fontTools/ttLib/ttFont.py
+++ b/Lib/fontTools/ttLib/ttFont.py
@@ -323,12 +323,11 @@ def _saveXML(
writer.newline()
else:
path, ext = os.path.splitext(writer.filenam... |
numba__numba-672 | Wrong type coercion on input arguments
If the following snippet, it looks like first calling the function with int arguments then coerces any further float arguments to int:
```
>>> @jit(nopython=True)
... def mpow(a, b):
... return math.pow(a, b)
...
>>>
>>> mpow(0, 1)
0.0
>>> mpow(0, 0.666)
1.0
>>> mpow(0, 1.6... | [
{
"content": "from __future__ import print_function, absolute_import\nfrom . import _typeconv\n\n\nclass TypeManager(object):\n def __init__(self):\n self._ptr = _typeconv.new_type_manager()\n\n def select_overload(self, sig, overloads):\n sig = [t._code for t in sig]\n overloads = [[... | [
{
"content": "from __future__ import print_function, absolute_import\nfrom . import _typeconv\n\n\nclass TypeManager(object):\n def __init__(self):\n self._ptr = _typeconv.new_type_manager()\n\n def select_overload(self, sig, overloads, allow_unsafe):\n sig = [t._code for t in sig]\n ... | diff --git a/numba/_dispatcher.c b/numba/_dispatcher.c
index 317d2a20816..b80d6f0b4ec 100644
--- a/numba/_dispatcher.c
+++ b/numba/_dispatcher.c
@@ -419,7 +419,10 @@ Dispatcher_call(DispatcherObject *self, PyObject *args, PyObject *kws)
if (tys[i] == -1) goto CLEANUP;
}
- cfunc = dispatcher_resolve(s... |
spack__spack-11940 | Spack doesn't print stack traces on SystemExit
Spack fails to give a stacktrace for some kinds of errors, even with the `--debug` flag. For example:
```
$ spack --debug install --hello
==> Error: unrecognized arguments: --hello
```
| [
{
"content": "# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\n\"\"\"This is the implementation of the Spack command line executable.\n\nIn a normal Spack ins... | [
{
"content": "# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\n\"\"\"This is the implementation of the Spack command line executable.\n\nIn a normal Spack ins... | diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py
index 9c84c2fb197f60..05c17067f94181 100644
--- a/lib/spack/spack/main.py
+++ b/lib/spack/spack/main.py
@@ -16,6 +16,7 @@
import inspect
import pstats
import argparse
+import traceback
from six import StringIO
import llnl.util.tty as tty
@@ -705,10 +... |
strawberry-graphql__strawberry-1463 | Error validating return types when using a Generic in Union
There seems to be an issue with types.
Generics worked fine and dandy until I've tried to use them in a Union.
```python
@strawberry.type
class FaultyType:
code_sent: bool
result: Union[Pet, ErrorNode[Codes]]
```
Here returning an ErrorNode i... | [
{
"content": "from __future__ import annotations\n\nimport dataclasses\nfrom typing import (\n TYPE_CHECKING,\n List,\n Mapping,\n Optional,\n Sequence,\n Type,\n TypeVar,\n Union,\n)\n\nfrom strawberry.type import StrawberryType, StrawberryTypeVar\nfrom strawberry.utils.typing import is... | [
{
"content": "from __future__ import annotations\n\nimport dataclasses\nfrom typing import (\n TYPE_CHECKING,\n List,\n Mapping,\n Optional,\n Sequence,\n Type,\n TypeVar,\n Union,\n)\n\nfrom strawberry.type import StrawberryType, StrawberryTypeVar\nfrom strawberry.utils.typing import is... | diff --git a/RELEASE.md b/RELEASE.md
new file mode 100644
index 0000000000..75e0a8704a
--- /dev/null
+++ b/RELEASE.md
@@ -0,0 +1,4 @@
+Release type: patch
+
+This release fixes an issue that prevented using enums as
+arguments for generic types inside unions.
diff --git a/strawberry/types/types.py b/strawberry/types/ty... |
pypa__setuptools-1332 | Py_DEBUG and WITH_PYMALLOC warnings [Windows]
Hi,
I'm on Windows 7 x64, running the latest Python 3.6.5 (64-bit), with setuptools 39.0.1. Each time a setuptools internal function is invoked (for example by running zc.buildout's [bootstrap.py](https://github.com/buildout/buildout/blob/master/bootstrap/bootstrap.py)) ... | [
{
"content": "# This file originally from pip:\n# https://github.com/pypa/pip/blob/8f4f15a5a95d7d5b511ceaee9ed261176c181970/src/pip/_internal/pep425tags.py\n\"\"\"Generate and work with PEP 425 Compatibility Tags.\"\"\"\nfrom __future__ import absolute_import\n\nimport distutils.util\nimport platform\nimport re... | [
{
"content": "# This file originally from pip:\n# https://github.com/pypa/pip/blob/8f4f15a5a95d7d5b511ceaee9ed261176c181970/src/pip/_internal/pep425tags.py\n\"\"\"Generate and work with PEP 425 Compatibility Tags.\"\"\"\nfrom __future__ import absolute_import\n\nimport distutils.util\nfrom distutils import log\... | diff --git a/setuptools/pep425tags.py b/setuptools/pep425tags.py
index dfe55d587a..3bdd3285a5 100644
--- a/setuptools/pep425tags.py
+++ b/setuptools/pep425tags.py
@@ -4,6 +4,7 @@
from __future__ import absolute_import
import distutils.util
+from distutils import log
import platform
import re
import sys
@@ -69,8 ... |
scipy__scipy-7048 | Docs for find_peaks_cwt are incorrect
Docs for scipy.signal.find_peaks_cwt state that the default for `gap_thresh` is 2, but the code says (https://github.com/scipy/scipy/blob/master/scipy/signal/_peak_finding.py#L509)
```
if gap_thresh is None:
gap_thresh = np.ceil(widths[0])
```
Thanks
| [
{
"content": "\"\"\"\nFunctions for identifying peaks in signals.\n\"\"\"\nfrom __future__ import division, print_function, absolute_import\n\nimport numpy as np\n\nfrom scipy._lib.six import xrange\nfrom scipy.signal.wavelets import cwt, ricker\nfrom scipy.stats import scoreatpercentile\n\n\n__all__ = ['argrel... | [
{
"content": "\"\"\"\nFunctions for identifying peaks in signals.\n\"\"\"\nfrom __future__ import division, print_function, absolute_import\n\nimport numpy as np\n\nfrom scipy._lib.six import xrange\nfrom scipy.signal.wavelets import cwt, ricker\nfrom scipy.stats import scoreatpercentile\n\n\n__all__ = ['argrel... | diff --git a/scipy/signal/_peak_finding.py b/scipy/signal/_peak_finding.py
index 5348e15ffed7..18690f21594d 100644
--- a/scipy/signal/_peak_finding.py
+++ b/scipy/signal/_peak_finding.py
@@ -448,7 +448,7 @@ def find_peaks_cwt(vector, widths, wavelet=None, max_distances=None,
If a relative maximum is not found ... |
Qiskit__qiskit-4613 | numpy>=1.17,<=1.18
Some tests are failing recently:
<img width="1035" alt="Screen Shot 2020-06-22 at 12 46 22 PM" src="https://user-images.githubusercontent.com/766693/85316568-f4934480-b48a-11ea-8fc1-5624c8d16d18.png">
<img width="1024" alt="Screen Shot 2020-06-22 at 12 46 46 PM" src="https://user-images.githubuserc... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2020.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licen... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2020.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licen... | diff --git a/qiskit/pulse/pulse_lib/sample_pulse.py b/qiskit/pulse/pulse_lib/sample_pulse.py
index eb4ff639f274..da0de86c7c05 100644
--- a/qiskit/pulse/pulse_lib/sample_pulse.py
+++ b/qiskit/pulse/pulse_lib/sample_pulse.py
@@ -84,8 +84,8 @@ def _clip(self, samples: np.ndarray, epsilon: float = 1e-7) -> np.ndarray:
... |
django-compressor__django-compressor-726 | TemplateDoesNotExist is raised when using native Jinja2 support in Django 1.8
Django 1.8 has native Jinja2 template support built-in. Therefore, I am not using Jingo, Coffin or django-jinja. In using the native Jinja2 template support option, however, there seems to be some pretty significant underlying differences in ... | [
{
"content": "from __future__ import unicode_literals\nimport os\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.template.utils import InvalidTemplateEngineError\n\nfrom appconf import AppConf\n\n\nclass CompressorConf(AppConf):\n # Main switch\n ENA... | [
{
"content": "from __future__ import unicode_literals\nimport os\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.template.utils import InvalidTemplateEngineError\n\nfrom appconf import AppConf\n\n\nclass CompressorConf(AppConf):\n # Main switch\n ENA... | diff --git a/compressor/conf.py b/compressor/conf.py
index c9dd95364..533825705 100644
--- a/compressor/conf.py
+++ b/compressor/conf.py
@@ -73,13 +73,10 @@ class CompressorConf(AppConf):
# Returns the Jinja2 environment to use in offline compression.
def JINJA2_GET_ENVIRONMENT():
- alias = 'Jinja2'
... |
python-poetry__poetry-1346 | poetry search fails with ValueError: Unable to parse ".000001".
<!--
Hi there! Thank you for discovering and submitting an issue.
Before you submit this; let's make sure of a few things.
Please make sure the following boxes are ticked if they are correct.
If not, please try and fulfill these first.
-->
... | [
{
"content": "import logging\nimport os\nimport tarfile\nimport zipfile\n\nimport pkginfo\n\nfrom bz2 import BZ2File\nfrom collections import defaultdict\nfrom gzip import GzipFile\nfrom typing import Dict\nfrom typing import List\nfrom typing import Union\n\ntry:\n import urllib.parse as urlparse\nexcept Im... | [
{
"content": "import logging\nimport os\nimport tarfile\nimport zipfile\n\nimport pkginfo\n\nfrom bz2 import BZ2File\nfrom collections import defaultdict\nfrom gzip import GzipFile\nfrom typing import Dict\nfrom typing import List\nfrom typing import Union\n\ntry:\n import urllib.parse as urlparse\nexcept Im... | diff --git a/poetry/repositories/pypi_repository.py b/poetry/repositories/pypi_repository.py
index 7fa356fc061..d8802ab39f1 100644
--- a/poetry/repositories/pypi_repository.py
+++ b/poetry/repositories/pypi_repository.py
@@ -221,9 +221,17 @@ def search(self, query, mode=0):
hits = client.search(search, "or")
... |
readthedocs__readthedocs.org-11361 | Addons: don't return current translation and include source language in `projects.translations` field
Currently, `project.translations` is returning all the translations from `main_project`. I realized that we don't always want this. This is only useful when browsing the _source_ language of the documentation. However,... | [
{
"content": "\"\"\"Views for hosting features.\"\"\"\n\nfrom functools import lru_cache\n\nimport packaging\nimport structlog\nfrom django.conf import settings\nfrom django.contrib.auth.models import AnonymousUser\nfrom django.http import Http404, JsonResponse\nfrom rest_framework.renderers import JSONRenderer... | [
{
"content": "\"\"\"Views for hosting features.\"\"\"\n\nfrom functools import lru_cache\n\nimport packaging\nimport structlog\nfrom django.conf import settings\nfrom django.contrib.auth.models import AnonymousUser\nfrom django.http import Http404, JsonResponse\nfrom rest_framework.renderers import JSONRenderer... | diff --git a/readthedocs/proxito/tests/test_hosting.py b/readthedocs/proxito/tests/test_hosting.py
index 06d6abd35f3..09cafa8eee4 100644
--- a/readthedocs/proxito/tests/test_hosting.py
+++ b/readthedocs/proxito/tests/test_hosting.py
@@ -300,6 +300,7 @@ def test_flyout_translations(self):
)
assert r.st... |
pypa__setuptools-2381 | pip install -e fails on version 50: command class <class 'setuptools.command.egg_info.egg_info'> must subclass Command
```
> pip install -e .
ERROR: Command errored out with exit status 1:
command: /Users/jaykarimi/.pyenv/versions/3.6.5/envs/ci-debug/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.a... | [
{
"content": "import sys\nimport os\nimport re\nimport importlib\nimport warnings\n\n\nis_pypy = '__pypy__' in sys.builtin_module_names\n\n\ndef warn_distutils_present():\n if 'distutils' not in sys.modules:\n return\n if is_pypy and sys.version_info < (3, 7):\n # PyPy for 3.6 unconditionall... | [
{
"content": "import sys\nimport os\nimport re\nimport importlib\nimport warnings\n\n\nis_pypy = '__pypy__' in sys.builtin_module_names\n\n\ndef warn_distutils_present():\n if 'distutils' not in sys.modules:\n return\n if is_pypy and sys.version_info < (3, 7):\n # PyPy for 3.6 unconditionall... | diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py
index 504c4ac0d8..c31edfed17 100644
--- a/_distutils_hack/__init__.py
+++ b/_distutils_hack/__init__.py
@@ -92,9 +92,22 @@ def spec_for_pip(self):
Ensure stdlib distutils when running under pip.
See pypa/pip#8761 for rationale.
... |
dask__dask-4181 | ShareDict seems to cause issues with HighLevelGraphs in optimize_atop
Following up on https://github.com/dask/dask/issues/4038#issuecomment-434338006, this script:
```python
from dask.sharedict import ShareDict
import numpy as np
def foo(A):
return A[None, ...]
A = da.ones(shape=(10, 20, 4), chunks=... | [
{
"content": "import itertools\nimport numbers\n\nimport numpy as np\nimport toolz\n\nfrom .. import base, core, sharedict, utils\nfrom ..compatibility import apply, Mapping\nfrom ..delayed import to_task_dask\nfrom ..optimization import SubgraphCallable\n\n\ndef subs(task, substitution):\n \"\"\" Create a n... | [
{
"content": "import itertools\nimport numbers\n\nimport numpy as np\nimport toolz\n\nfrom .. import base, core, sharedict, utils\nfrom ..compatibility import apply, Mapping\nfrom ..delayed import to_task_dask\nfrom ..optimization import SubgraphCallable\n\n\ndef subs(task, substitution):\n \"\"\" Create a n... | diff --git a/dask/array/tests/test_atop.py b/dask/array/tests/test_atop.py
index d0f2c316cb5..117a15b9c69 100644
--- a/dask/array/tests/test_atop.py
+++ b/dask/array/tests/test_atop.py
@@ -380,3 +380,28 @@ def f(data, x):
dtype=A.dtype)
assert_eq(A, B)
+
+
+def test_gh_4176():
+ def foo(A):
+... |
huggingface__accelerate-308 | DeepSpeed integration doesn't seem to work with generated config
I have used `accelerate config` to generate config that uses deepspeed
Config:
```
compute_environment: LOCAL_MACHINE
deepspeed_config:
gradient_accumulation_steps: 1
offload_optimizer_device: NONE
zero_stage: 3
distributed_type: DEEPSPEED... | [
{
"content": "# Copyright 2021 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | [
{
"content": "# Copyright 2021 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | diff --git a/src/accelerate/accelerator.py b/src/accelerate/accelerator.py
index 6e0742e0282..e18686e1265 100644
--- a/src/accelerate/accelerator.py
+++ b/src/accelerate/accelerator.py
@@ -284,9 +284,10 @@ def use_fp16(self):
@property
def mixed_precision(self):
if self.distributed_type == Distribute... |
spotify__luigi-893 | RemoteFileSystem uses wrong path separator
The RemoteFileSystem uses the client path separators instead of the remote system path separators.
That means that when trying to write to a Linux RemoteTarget from a Windows Client, the path will be broken (backslashes instead of slashes as path separators, leading to wrong... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#... | diff --git a/luigi/contrib/ssh.py b/luigi/contrib/ssh.py
index 66aa3632e6..85fc2067e7 100644
--- a/luigi/contrib/ssh.py
+++ b/luigi/contrib/ssh.py
@@ -40,6 +40,7 @@
import os
import random
import subprocess
+import posixpath
import luigi
import luigi.format
@@ -173,7 +174,7 @@ def _scp(self, src, dest):
d... |
scikit-hep__awkward-1998 | Remove unused `num` kernels
### Version of Awkward Array
main
### Description and code to reproduce
...
| [
{
"content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE\n\n\nimport copy\nimport datetime\nimport json\nimport os\nimport shutil\nimport time\nfrom collections import OrderedDict\nfrom itertools import product\n\nimport yaml\nfrom numpy import uint8 # noqa: F401 (u... | [
{
"content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE\n\n\nimport copy\nimport datetime\nimport json\nimport os\nimport shutil\nimport time\nfrom collections import OrderedDict\nfrom itertools import product\n\nimport yaml\nfrom numpy import uint8 # noqa: F401 (u... | diff --git a/awkward-cpp/src/cpu-kernels/awkward_ListArray_num.cpp b/awkward-cpp/src/cpu-kernels/awkward_ListArray_num.cpp
deleted file mode 100644
index ac15989cd8..0000000000
--- a/awkward-cpp/src/cpu-kernels/awkward_ListArray_num.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// BSD 3-Clause License; see https://github.com/sci... |
mindsdb__mindsdb-712 | KeyError: 'mongodb' on start
Starting Mindsdb(python -m mindsdb) version 2.8.1 throws:
```
Failed to start mongodb API with exception 'mongodb'
Traceback (most recent call last):
File "/home/zoran/MyProjects/mindsdb-examples/mdb/lib/python3.7/site-packages/mindsdb/__main__.py", line 83, in <module>
p = ctx... | [
{
"content": "import atexit\nimport traceback\nimport sys\nimport os\n\nimport torch.multiprocessing as mp\n\nfrom mindsdb_native.config import CONFIG\n\nfrom mindsdb.utilities.config import Config\nfrom mindsdb.interfaces.native.mindsdb import MindsdbNative\nfrom mindsdb.interfaces.custom.custom_models import ... | [
{
"content": "import atexit\nimport traceback\nimport sys\nimport os\n\nimport torch.multiprocessing as mp\n\nfrom mindsdb_native.config import CONFIG\n\nfrom mindsdb.utilities.config import Config\nfrom mindsdb.interfaces.native.mindsdb import MindsdbNative\nfrom mindsdb.interfaces.custom.custom_models import ... | diff --git a/mindsdb/__main__.py b/mindsdb/__main__.py
index 7cc382132da..d70a58c04f7 100644
--- a/mindsdb/__main__.py
+++ b/mindsdb/__main__.py
@@ -40,14 +40,20 @@ def close_api_gracefully(p_arr):
config = Config(config_path)
if args.api is None:
- api_arr = [api for api in config['api']]
+ a... |
microsoft__Qcodes-717 | Snapshot(update=True) issues with several instruments
Such as
```python
zi = ZIUHFLI('ZIUHFLI', 'dev2235') # 192.168.15.106
zi.snapshot(update=True)
Traceback (most recent call last):
File "<ipython-input-35-693c5f25bf16>", line 1, in <module>
zi.snapshot(update=True)
File "c:\users\jens\qcodes\q... | [
{
"content": "\"\"\"Instrument base class.\"\"\"\nimport logging\nimport numpy as np\nimport time\nimport warnings\nimport weakref\nfrom typing import Sequence\n\nfrom qcodes.utils.metadata import Metadatable\nfrom qcodes.utils.helpers import DelegateAttributes, strip_attrs, full_class\nfrom qcodes.utils.valida... | [
{
"content": "\"\"\"Instrument base class.\"\"\"\nimport logging\nimport numpy as np\nimport time\nimport warnings\nimport weakref\nfrom typing import Sequence\n\nfrom qcodes.utils.metadata import Metadatable\nfrom qcodes.utils.helpers import DelegateAttributes, strip_attrs, full_class\nfrom qcodes.utils.valida... | diff --git a/qcodes/instrument/base.py b/qcodes/instrument/base.py
index a5c9b77a060..77434bd4b96 100644
--- a/qcodes/instrument/base.py
+++ b/qcodes/instrument/base.py
@@ -161,7 +161,11 @@ def snapshot_base(self, update: bool=False,
update = update
if params_to_skip_update and name in params_... |
digitalfabrik__integreat-cms-823 | Do not serve `node_modules` under `/static`
### Motivation
<!-- A clear and concise description of what the motivation for the new feature is, and what problem it is solving. -->
It's a bit overkill to serve the complete `node_modules` directory under `/static` just to make our npm dependencies work as expected.
#... | [
{
"content": "\"\"\"\nDjango settings for ``integreat-cms``.\n\nThis file only contains the options which deviate from the default values.\nFor the full list of settings and their values, see :doc:`django:ref/settings`.\n\nFor production use, the following settings can be set with environment variables (use the... | [
{
"content": "\"\"\"\nDjango settings for ``integreat-cms``.\n\nThis file only contains the options which deviate from the default values.\nFor the full list of settings and their values, see :doc:`django:ref/settings`.\n\nFor production use, the following settings can be set with environment variables (use the... | diff --git a/src/backend/settings.py b/src/backend/settings.py
index 53a3e00e62..0edcc9ff47 100644
--- a/src/backend/settings.py
+++ b/src/backend/settings.py
@@ -612,12 +612,6 @@
#: (see :setting:`django:STATIC_URL` and :doc:`Managing static files <django:howto/static-files/index>`)
STATIC_URL = "/static/"
-#: Thi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.