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 ⌀ |
|---|---|---|---|---|
paperless-ngx__paperless-ngx-2820 | [BUG] Unable to edit permissions as super user on documents owned by other users
Issue:
1. Create a super user
2. Create another user
3. Add docs while logged in as the super user (owner=super user)
4. Using bulk edit (or i assume just editing details works too), set owner to the other user.
Observed Behavior:
Curre... | [
{
"content": "import itertools\nimport json\nimport logging\nimport os\nimport re\nimport tempfile\nimport urllib\nimport uuid\nimport zipfile\nfrom datetime import datetime\nfrom pathlib import Path\nfrom time import mktime\nfrom unicodedata import normalize\nfrom urllib.parse import quote\n\nimport pathvalida... | [
{
"content": "import itertools\nimport json\nimport logging\nimport os\nimport re\nimport tempfile\nimport urllib\nimport uuid\nimport zipfile\nfrom datetime import datetime\nfrom pathlib import Path\nfrom time import mktime\nfrom unicodedata import normalize\nfrom urllib.parse import quote\n\nimport pathvalida... | diff --git a/src-ui/cypress/fixtures/ui_settings/settings.json b/src-ui/cypress/fixtures/ui_settings/settings.json
index bc86255fc09..f552054df4d 100644
--- a/src-ui/cypress/fixtures/ui_settings/settings.json
+++ b/src-ui/cypress/fixtures/ui_settings/settings.json
@@ -1,6 +1,9 @@
{
- "user_id": 1,
- "username": ... |
OpenMined__PySyft-5312 | Change get_root_data_path to use HOME dir
## Description
We probably need to change `get_root_data_path` in utils to use some kind of HOME dir thats cross platform.
The `Path` class in `pathlib` library includes a `Path.home` so hopefully that works on all 3 platforms.
The goal is that when Syft Examples are used ... | [
{
"content": "# stdlib\nimport os\nfrom pathlib import Path\nfrom secrets import randbelow\nfrom typing import Any\nfrom typing import List\nfrom typing import Optional\nfrom typing import Union\n\n# third party\nfrom forbiddenfruit import curse\nfrom nacl.signing import SigningKey\nfrom nacl.signing import Ver... | [
{
"content": "# stdlib\nimport os\nfrom pathlib import Path\nfrom secrets import randbelow\nfrom typing import Any\nfrom typing import List\nfrom typing import Optional\nfrom typing import Union\n\n# third party\nfrom forbiddenfruit import curse\nfrom nacl.signing import SigningKey\nfrom nacl.signing import Ver... | diff --git a/src/syft/util.py b/src/syft/util.py
index ef359cc31b5..b23982887a5 100644
--- a/src/syft/util.py
+++ b/src/syft/util.py
@@ -589,10 +589,10 @@ def inherit_tags(
def get_root_data_path() -> Path:
# get the PySyft / data directory to share datasets between notebooks
- here = Path(os.path.dirname(os... |
EleutherAI__gpt-neox-1138 | Add a Contributor Guide
We should document some of our contributor guidelines (pre-commit, tests, etc) now that we have them.
A good one to model after: https://github.com/microsoft/DeepSpeed/blob/master/CONTRIBUTING.md
| [
{
"content": "# Copyright (c) 2024, EleutherAI\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 appl... | [
{
"content": "# Copyright (c) 2024, EleutherAI\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 appl... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e9ca3920d..0eaf9b13c 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -16,10 +16,10 @@ repos:
args: [--fix=lf]
- id: requirements-txt-fixer
- id: trailing-whitespace
- - repo: https://gitlab.c... |
translate__pootle-6679 | Add defaults for new project creation
when you create a new project it should probably set some defaults, in particular
- fs_type = localfs
- fs_url = settings.POOTLE_TRANSLATION_DIRECTORY + project.code
ref #6633
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport os\nimp... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport os\nimp... | diff --git a/pootle/apps/pootle_project/models.py b/pootle/apps/pootle_project/models.py
index efcb3e4c314..813246de5b6 100644
--- a/pootle/apps/pootle_project/models.py
+++ b/pootle/apps/pootle_project/models.py
@@ -66,6 +66,12 @@ def create(self, *args, **kwargs):
project = super(ProjectManager, self).create... |
explosion__spaCy-3004 | Initialization in text
In `evaluate `method from
https://github.com/explosion/spacy/blob/master/examples/training/train_textcat.py
tp, fp, fn, and tn (true positives etc) are initialized to 1e-8 (see below)
```
tp = 1e-8 # True positives
fp = 1e-8 # False positives
fn = 1e-8 # False negative
tn = 1e-8... | [
{
"content": "#!/usr/bin/env python\n# coding: utf8\n\"\"\"Train a convolutional neural network text classifier on the\nIMDB dataset, using the TextCategorizer component. The dataset will be loaded\nautomatically via Thinc's built-in dataset loader. The model is added to\nspacy.pipeline, and predictions are ava... | [
{
"content": "#!/usr/bin/env python\n# coding: utf8\n\"\"\"Train a convolutional neural network text classifier on the\nIMDB dataset, using the TextCategorizer component. The dataset will be loaded\nautomatically via Thinc's built-in dataset loader. The model is added to\nspacy.pipeline, and predictions are ava... | diff --git a/.github/contributors/gavrieltal.md b/.github/contributors/gavrieltal.md
new file mode 100644
index 00000000000..16ed3813182
--- /dev/null
+++ b/.github/contributors/gavrieltal.md
@@ -0,0 +1,106 @@
+# spaCy contributor agreement
+
+This spaCy Contributor Agreement (**"SCA"**) is based on the
+[Oracle Contri... |
praw-dev__praw-1934 | reddit.subreddit.mod.removal_reasons isn't indexed in display order
### Describe the Bug
reddit.subreddit.mod.removal_reasons isn't indexed in display order
### Desired Result
reddit.subreddit.mod.removal_reasons should be indexed in display order
### Relevant Logs
_No response_
### Code to reproduce the bug
_No... | [
{
"content": "\"\"\"Provide the Removal Reason class.\"\"\"\nfrom typing import TYPE_CHECKING, Any, Dict, Iterator, List, Optional, Union\nfrom warnings import warn\n\nfrom ...const import API_PATH\nfrom ...exceptions import ClientException\nfrom ...util import _deprecate_args, cachedproperty\nfrom .base import... | [
{
"content": "\"\"\"Provide the Removal Reason class.\"\"\"\nfrom typing import TYPE_CHECKING, Any, Dict, Iterator, List, Optional, Union\nfrom warnings import warn\n\nfrom ...const import API_PATH\nfrom ...exceptions import ClientException\nfrom ...util import _deprecate_args, cachedproperty\nfrom .base import... | diff --git a/praw/models/reddit/removal_reasons.py b/praw/models/reddit/removal_reasons.py
index cfd558063..e4ecf2f52 100644
--- a/praw/models/reddit/removal_reasons.py
+++ b/praw/models/reddit/removal_reasons.py
@@ -150,8 +150,10 @@ def _removal_reason_list(self) -> List[RemovalReason]:
API_PATH["removal_... |
watchdogpolska__small_eod-494 | udostępnienie id w API dla tags i documentType
Id dla tags i documetType, jest niezbędne dla zbudowania listy tych elementów w reakcie.
| [
{
"content": "from uuid import uuid4\nfrom django.conf import settings\nfrom rest_framework import serializers\nfrom .models import Letter, DocumentType\nfrom ..generic.serializers import UserLogModelSerializer\nfrom ..cases.models import Case\nfrom ..institutions.models import Institution\nfrom ..channels.mode... | [
{
"content": "from uuid import uuid4\nfrom django.conf import settings\nfrom rest_framework import serializers\nfrom .models import Letter, DocumentType\nfrom ..generic.serializers import UserLogModelSerializer\nfrom ..cases.models import Case\nfrom ..institutions.models import Institution\nfrom ..channels.mode... | diff --git a/backend-project/small_eod/cases/tests/test_serializers.py b/backend-project/small_eod/cases/tests/test_serializers.py
index 301326f8f..5a0bd3031 100644
--- a/backend-project/small_eod/cases/tests/test_serializers.py
+++ b/backend-project/small_eod/cases/tests/test_serializers.py
@@ -1,15 +1,23 @@
from dja... |
scikit-hep__awkward-3034 | ak.flatten on dask_awkward BitMaskedArray triggers awkward error
### Version of Awkward Array
2.6.1
### Description and code to reproduce
This only occurs with dask_awkward input arrays, but it triggers an error within awkward (let me know if I should re-file in dask_awkward instead)
File submitted for another is... | [
{
"content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward/blob/main/LICENSE\n\nfrom __future__ import annotations\n\nimport copy\nimport json\nimport math\nfrom collections.abc import Mapping, MutableMapping, Sequence\n\nimport awkward as ak\nfrom awkward._backends.backend import Backend\n... | [
{
"content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward/blob/main/LICENSE\n\nfrom __future__ import annotations\n\nimport copy\nimport json\nimport math\nfrom collections.abc import Mapping, MutableMapping, Sequence\n\nimport awkward as ak\nfrom awkward._backends.backend import Backend\n... | diff --git a/src/awkward/contents/bitmaskedarray.py b/src/awkward/contents/bitmaskedarray.py
index c8709255ab..64fa969494 100644
--- a/src/awkward/contents/bitmaskedarray.py
+++ b/src/awkward/contents/bitmaskedarray.py
@@ -570,7 +570,7 @@ def project(self, mask=None):
return self.to_ByteMaskedArray().project(m... |
opsdroid__opsdroid-1328 | Hello skill not working
Hi,
I have setup opsdroid in windows 10
Versions:
Opsdroid 0.17.0
Python 3.8.1
Configuration.yaml:
[configuration.txt](https://github.com/opsdroid/opsdroid/files/3991251/configuration.txt)
Right after launching opsdroid with start command: when i type "hi" in the windows cli... | [
{
"content": "\"\"\"A connector which allows websocket connections.\"\"\"\nimport logging\nimport json\nimport uuid\nfrom datetime import datetime\n\nimport aiohttp\nimport aiohttp.web\nfrom aiohttp import WSCloseCode\n\nfrom opsdroid.connector import Connector, register_event\nfrom opsdroid.events import Messa... | [
{
"content": "\"\"\"A connector which allows websocket connections.\"\"\"\nimport logging\nimport json\nimport uuid\nfrom datetime import datetime\n\nimport aiohttp\nimport aiohttp.web\nfrom aiohttp import WSCloseCode\n\nfrom opsdroid.connector import Connector, register_event\nfrom opsdroid.events import Messa... | diff --git a/opsdroid/connector/websocket/__init__.py b/opsdroid/connector/websocket/__init__.py
index 261411dfa..c99783cda 100644
--- a/opsdroid/connector/websocket/__init__.py
+++ b/opsdroid/connector/websocket/__init__.py
@@ -97,7 +97,7 @@ async def websocket_handler(self, request):
self.active_connections[... |
matrix-org__synapse-13531 | Faster joins: prevent enabling it with workers
Currently if you enable faster-joins with worker processes, you're going to get horrible cache-coherency issues. We should stop people shooting themselves in the foot like this with a check on the config setting.
| [
{
"content": "# Copyright 2016 OpenMarket Ltd\n# Copyright 2020 The Matrix.org Foundation C.I.C.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/... | [
{
"content": "# Copyright 2016 OpenMarket Ltd\n# Copyright 2020 The Matrix.org Foundation C.I.C.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/... | diff --git a/changelog.d/13531.misc b/changelog.d/13531.misc
new file mode 100644
index 000000000000..986122d3d089
--- /dev/null
+++ b/changelog.d/13531.misc
@@ -0,0 +1 @@
+Faster room joins: Refuse to start when faster joins is enabled on a deployment with workers, since worker configurations are not currently support... |
yt-project__yt-3532 | BUG: wrong axis labels representation in SlicePlot for spherical data
### Bug report
**Bug summary**
There's an inconsistency in math representation (or lack thereof) of axis labels when performing SlicePlot along the "r" direction for spherical data.
**Code for reproduction**
```python
import yt
ds = y... | [
{
"content": "import numpy as np\n\nfrom yt.utilities.lib.pixelization_routines import pixelize_aitoff, pixelize_cylinder\n\nfrom .coordinate_handler import CoordinateHandler, _get_coord_fields, _unknown_coord\n\n\nclass SphericalCoordinateHandler(CoordinateHandler):\n name = \"spherical\"\n\n def __init_... | [
{
"content": "import numpy as np\n\nfrom yt.utilities.lib.pixelization_routines import pixelize_aitoff, pixelize_cylinder\n\nfrom .coordinate_handler import CoordinateHandler, _get_coord_fields, _unknown_coord\n\n\nclass SphericalCoordinateHandler(CoordinateHandler):\n name = \"spherical\"\n\n def __init_... | diff --git a/yt/geometry/coordinates/spherical_coordinates.py b/yt/geometry/coordinates/spherical_coordinates.py
index e5c11e687e7..9bf16b36358 100644
--- a/yt/geometry/coordinates/spherical_coordinates.py
+++ b/yt/geometry/coordinates/spherical_coordinates.py
@@ -260,7 +260,7 @@ def image_axis_name(self):
# n... |
ckan__ckan-2563 | Include the main.debug.css
Hi, I'm new to CKAN in my organization and turned debug to true for development and encountered the `AttributeError: 'module' object has no attribute 'css/main.debug.css'` error. It took me a while to figure out that I had to compile the less to get it.
Wouldn't it be easier to include this ... | [
{
"content": "''' The application's Globals object '''\n\nimport logging\nimport time\nfrom threading import Lock\nimport re\n\nfrom paste.deploy.converters import asbool\nfrom pylons import config\n\nimport ckan\nimport ckan.model as model\nimport ckan.logic as logic\n\n\nlog = logging.getLogger(__name__)\n\n\... | [
{
"content": "''' The application's Globals object '''\n\nimport logging\nimport time\nfrom threading import Lock\nimport re\n\nfrom paste.deploy.converters import asbool\nfrom pylons import config\n\nimport ckan\nimport ckan.model as model\nimport ckan.logic as logic\n\n\nlog = logging.getLogger(__name__)\n\n\... | diff --git a/bin/less b/bin/less
index 452dcc81e15..f097555657f 100755
--- a/bin/less
+++ b/bin/less
@@ -15,10 +15,6 @@ function compile(event, filename) {
var start = Date.now(),
filename = 'main.css';
- if (debug) {
- filename = 'main.debug.css';
- }
-
exec('`npm bin`/lessc ' + __dirname + '/../ck... |
PlasmaPy__PlasmaPy-596 | Add more comprehensive testing
Would you consider adding more jobs to the test matrices? E.g. test against more numpy versions you support, or astropy versions.
Also, preferably also against the dev versions of these to issues like #587 would surface much earlier, still in the development cycle.
astropy.units.core.U... | [
{
"content": "\"\"\"Test helper utilities.\"\"\"\nimport functools\nimport pytest\nimport inspect\nimport collections\nfrom typing import Any, Callable, Dict\nimport numpy as np\nimport astropy.units as u\nimport astropy.constants as const\nimport colorama\nimport astropy.tests.helper as astrohelper\n\n# These ... | [
{
"content": "\"\"\"Test helper utilities.\"\"\"\nimport functools\nimport pytest\nimport inspect\nimport collections\nfrom typing import Any, Callable, Dict\nimport numpy as np\nimport astropy.units as u\nimport astropy.constants as const\nimport colorama\nimport astropy.tests.helper as astrohelper\n\n# These ... | diff --git a/.travis.yml b/.travis.yml
index 260b3188f5..6c0b1c4782 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,8 +13,8 @@ env:
- NUMPY_VERSION='stable'
- ASTROPY_VERSION='stable'
- MAIN_CMD='python setup.py'
- - CONDA_DEPENDENCIES='Cython astropy scipy h5py matplotlib mpmath pyt... |
jazzband__django-debug-toolbar-1415 | Request with invalid json content type fails with a JSONDecodeError when using the history panel
Similar to https://github.com/jazzband/django-debug-toolbar/issues/1330
If an API request is made with _invalid_ json and the content type application/json, the history panel raises an error and the whole API request fai... | [
{
"content": "import json\nfrom collections import OrderedDict\n\nfrom django.http.request import RawPostDataException\nfrom django.template.loader import render_to_string\nfrom django.templatetags.static import static\nfrom django.urls import path\nfrom django.utils import timezone\nfrom django.utils.translati... | [
{
"content": "import json\nfrom collections import OrderedDict\n\nfrom django.http.request import RawPostDataException\nfrom django.template.loader import render_to_string\nfrom django.templatetags.static import static\nfrom django.urls import path\nfrom django.utils import timezone\nfrom django.utils.translati... | diff --git a/debug_toolbar/panels/history/panel.py b/debug_toolbar/panels/history/panel.py
index 047c7be30..e80d8c93a 100644
--- a/debug_toolbar/panels/history/panel.py
+++ b/debug_toolbar/panels/history/panel.py
@@ -49,7 +49,10 @@ def generate_stats(self, request, response):
and request.body
... |
gammapy__gammapy-5136 | Plot of a SpectralModel with the sed type `flux'
**Gammapy version**
The dev version (I have not tested older versions)
**Bug description**
Using the Spectral analysis tutorial, the script works any issue. I have superposed the SpectralModel on the TS scan plot with the sed_type `e2dnde':

+ final_result: Dict[str... |
OpenNMT__OpenNMT-tf-696 | Crash when training TransformerBaseRelative model
When training a TransformerBaseRelative model using the following command:
```
onmt-main --model_type TransformerBaseRelative --config config.yml --auto_config train --with_eval
```
I receive the following error:
```
Traceback (most recent call last):
File "C:\... | [
{
"content": "\"\"\"Define layers related to the Google's Transformer model.\"\"\"\n\nimport tensorflow as tf\nimport numpy as np\n\nfrom opennmt.layers import common\nfrom opennmt.utils import misc\n\n\ndef _lower_triangle_mask(sequence_length, maximum_length=None, dtype=tf.bool):\n batch_size = tf.shape(sequ... | [
{
"content": "\"\"\"Define layers related to the Google's Transformer model.\"\"\"\n\nimport tensorflow as tf\nimport numpy as np\n\nfrom opennmt.layers import common\nfrom opennmt.utils import misc\n\n\ndef _lower_triangle_mask(sequence_length, maximum_length=None, dtype=tf.bool):\n batch_size = tf.shape(sequ... | diff --git a/opennmt/layers/transformer.py b/opennmt/layers/transformer.py
index cc3e23b4c..d20bfb450 100644
--- a/opennmt/layers/transformer.py
+++ b/opennmt/layers/transformer.py
@@ -272,8 +272,8 @@ def _compute_kv(x):
keys_length,
self.maximum_relative_position,
with_cache=bool(cache... |
pytest-dev__pytest-django-1047 | RemovedInDjango51Warning: assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual()
**Background**
In Django 4.2, `assertQuerysetEqual()` is deprecated in favor of `assertQuerySetEqual()`, see release notes: https://docs.djangoproject.com/en/4.2/releases/4.2/#id1
**Steps to reproduce**
```
from py... | [
{
"content": "\"\"\"\nDynamically load all Django assertion cases and expose them for importing.\n\"\"\"\nfrom functools import wraps\nfrom typing import Any, Callable, Optional, Sequence, Set, Type, Union\n\nfrom django.test import (\n LiveServerTestCase, SimpleTestCase, TestCase, TransactionTestCase,\n)\n\... | [
{
"content": "\"\"\"\nDynamically load all Django assertion cases and expose them for importing.\n\"\"\"\nfrom functools import wraps\nfrom typing import Any, Callable, Optional, Sequence, Set, Type, Union\n\nfrom django.test import (\n LiveServerTestCase, SimpleTestCase, TestCase, TransactionTestCase,\n)\n\... | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 85e505c1..765fdf73 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -66,14 +66,14 @@ jobs:
matrix:
include:
- name: linting,docs
- python: '3.10'
+ python: '3.11'
a... |
ansible-collections__community.vmware-1335 | community.vmware.vmware_cfg_backup: Failed to write backup file
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
Wh... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2017, IBM Corp\n# Author(s): Andreas Nafpliotis <nafpliot@de.ibm.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2017, IBM Corp\n# Author(s): Andreas Nafpliotis <nafpliot@de.ibm.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__... | diff --git a/changelogs/fragments/1270-vmware_cfg_backup-failed_to_write_backup_file.yaml b/changelogs/fragments/1270-vmware_cfg_backup-failed_to_write_backup_file.yaml
new file mode 100644
index 0000000000..95e644d6ea
--- /dev/null
+++ b/changelogs/fragments/1270-vmware_cfg_backup-failed_to_write_backup_file.yaml
@@ -... |
pymodbus-dev__pymodbus-722 | sync modbus tcp crashed when server breaks connection (in HomeAssistant)
<!--
Please use the Pymodbus gitter channel at https://gitter.im/pymodbus_dev/Lobby or Stack Overflow(tag [pymodbus](https://stackoverflow.com/questions/tagged/pymodbus) for
support questions.
Before opening a new issue, make sure you do the ... | [
{
"content": "import socket\nimport select\nimport serial\nimport time\nimport ssl\nimport sys\nfrom functools import partial\nfrom pymodbus.constants import Defaults\nfrom pymodbus.utilities import hexlify_packets, ModbusTransactionState\nfrom pymodbus.factory import ClientDecoder\nfrom pymodbus.exceptions imp... | [
{
"content": "import socket\nimport select\nimport serial\nimport time\nimport ssl\nimport sys\nfrom functools import partial\nfrom pymodbus.constants import Defaults\nfrom pymodbus.utilities import hexlify_packets, ModbusTransactionState\nfrom pymodbus.factory import ClientDecoder\nfrom pymodbus.exceptions imp... | diff --git a/pymodbus/client/sync.py b/pymodbus/client/sync.py
index 571ba0f4f..cde8a0bf1 100644
--- a/pymodbus/client/sync.py
+++ b/pymodbus/client/sync.py
@@ -290,7 +290,11 @@ def _recv(self, size):
time_ = time.time()
end = time_ + timeout
while recv_size > 0:
- ready = select.s... |
ivy-llc__ivy-14859 | bitwise_right_shift
| [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.torch as torch_frontend\nimport ivy.functional.frontends.torch.nn.functional as torch_frontend_nn\nfrom ivy.functional.frontends.numpy.creation_routines.from_existing_data import (\n array as np_frontend_array,\n)\nfrom ivy.func_w... | [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.torch as torch_frontend\nimport ivy.functional.frontends.torch.nn.functional as torch_frontend_nn\nfrom ivy.functional.frontends.numpy.creation_routines.from_existing_data import (\n array as np_frontend_array,\n)\nfrom ivy.func_w... | diff --git a/ivy/functional/frontends/torch/tensor.py b/ivy/functional/frontends/torch/tensor.py
index 5a0c0cdef19fb..2f58a91deef63 100644
--- a/ivy/functional/frontends/torch/tensor.py
+++ b/ivy/functional/frontends/torch/tensor.py
@@ -1132,6 +1132,12 @@ def tolist(self):
def topk(self, k, dim=None, largest=True,... |
lutris__lutris-3623 | 0.5.9 Gamescope should default to fullscreen
Currently it defaults to a Gamescope window when the game is launched.
The Gamescope documentation states that the argument `-f` needs to be passed for the window to start in fullscreen
| [
{
"content": "\"\"\"Transform runner parameters to data usable for runtime execution\"\"\"\nimport os\nimport shlex\nimport stat\n\nfrom lutris.util import system\nfrom lutris.util.linux import LINUX_SYSTEM\nfrom lutris.util.log import logger\n\n\ndef get_mangohud_conf(system_config):\n \"\"\"Return correct ... | [
{
"content": "\"\"\"Transform runner parameters to data usable for runtime execution\"\"\"\nimport os\nimport shlex\nimport stat\n\nfrom lutris.util import system\nfrom lutris.util.linux import LINUX_SYSTEM\nfrom lutris.util.log import logger\n\n\ndef get_mangohud_conf(system_config):\n \"\"\"Return correct ... | diff --git a/lutris/runner_interpreter.py b/lutris/runner_interpreter.py
index 28db161937..2245a87529 100644
--- a/lutris/runner_interpreter.py
+++ b/lutris/runner_interpreter.py
@@ -107,7 +107,7 @@ def get_launch_parameters(runner, gameplay_info):
def get_gamescope_args(launch_arguments, system_config):
"""Ins... |
OpenNMT__OpenNMT-tf-421 | Problem in sharing embeddings
I noticed that when I use DualTransformer with sharing parameters between Encoders and also setting sharing level to 'ALL', two sets of embeddings are created with these prefixes:
> **transformer//w_embs**
> **transformer/shared_embeddings/w_embs**
However, it should be one for ever... | [
{
"content": "\"\"\"Define generic inputters.\"\"\"\n\nimport abc\nimport six\n\nimport tensorflow as tf\n\nfrom opennmt.layers.reducer import ConcatReducer, JoinReducer\nfrom opennmt.utils import compat\nfrom opennmt.utils.data import inference_pipeline, training_pipeline\nfrom opennmt.utils.misc import extrac... | [
{
"content": "\"\"\"Define generic inputters.\"\"\"\n\nimport abc\nimport six\n\nimport tensorflow as tf\n\nfrom opennmt.layers.reducer import ConcatReducer, JoinReducer\nfrom opennmt.utils import compat\nfrom opennmt.utils.data import inference_pipeline, training_pipeline\nfrom opennmt.utils.misc import extrac... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0828c79ac..3654516fe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@ OpenNMT-tf follows [semantic versioning 2.0.0](https://semver.org/). The API cov
### Fixes and improvements
* Fix usage of `--checkpoint_path` during training
+* Fix embedding sharing w... |
pyqtgraph__pyqtgraph-241 | arrow key navigation in table widget
Hi. Good job with pyqtgraph!. I like it!.
According to the manual of pyqt: "You can navigate the cells in the table by clicking on a cell with the mouse, or by using the arrow keys. Because QTableView enables tabKeyNavigation by default, you can also hit Tab and Backtab to move from... | [
{
"content": "# -*- coding: utf-8 -*-\nimport numpy as np\nfrom ..Qt import QtGui, QtCore\nfrom ..python2_3 import asUnicode, basestring\nfrom .. import metaarray\n\n\n__all__ = ['TableWidget']\n\n\ndef _defersort(fn):\n def defersort(self, *args, **kwds):\n # may be called recursively; only the first... | [
{
"content": "# -*- coding: utf-8 -*-\nimport numpy as np\nfrom ..Qt import QtGui, QtCore\nfrom ..python2_3 import asUnicode, basestring\nfrom .. import metaarray\n\n\n__all__ = ['TableWidget']\n\n\ndef _defersort(fn):\n def defersort(self, *args, **kwds):\n # may be called recursively; only the first... | diff --git a/pyqtgraph/widgets/TableWidget.py b/pyqtgraph/widgets/TableWidget.py
index 9b9dcc49dc..57852864e5 100644
--- a/pyqtgraph/widgets/TableWidget.py
+++ b/pyqtgraph/widgets/TableWidget.py
@@ -353,11 +353,11 @@ def contextMenuEvent(self, ev):
self.contextMenu.popup(ev.globalPos())
def keyP... |
privacyidea__privacyidea-3092 | Change data message to notification message
Currently the push notification is sent as data message.
Check, if it is sensible to send the message as notification type.
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# 2019-02-12 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n#\n#\n# This program is free software: you can redistribute it and/or\n# modify it under the terms of the GNU Affero General Public\n# License, version 3, as published by the Free Software Foun... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# 2019-02-12 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n#\n#\n# This program is free software: you can redistribute it and/or\n# modify it under the terms of the GNU Affero General Public\n# License, version 3, as published by the Free Software Foun... | diff --git a/privacyidea/lib/smsprovider/FirebaseProvider.py b/privacyidea/lib/smsprovider/FirebaseProvider.py
index dbb65bc5ed..bc4f2a06aa 100644
--- a/privacyidea/lib/smsprovider/FirebaseProvider.py
+++ b/privacyidea/lib/smsprovider/FirebaseProvider.py
@@ -124,6 +124,10 @@ def submit_message(self, firebase_token, dat... |
mampfes__hacs_waste_collection_schedule-596 | Error with Service Provider Stadtreinigung Leipzig / stadtreinigung-leipzig.de
Hi everyone,
Since 03.01.2023 (this is where I noticed it), WCS can no longer retrieve data from Stadtwerke Leipzig.
The following error is displayed:
fetch failed for source Stadtreinigung Leipzig: Traceback (most recent call last): Fi... | [
{
"content": "import json\nimport logging\n\nimport requests\nfrom waste_collection_schedule import Collection # type: ignore[attr-defined]\nfrom waste_collection_schedule.service.ICS import ICS\n\n_LOGGER = logging.getLogger(__name__)\n\nTITLE = \"Stadtreinigung Leipzig\"\nDESCRIPTION = \"Source for Stadtrein... | [
{
"content": "import json\nimport logging\n\nimport requests\nfrom waste_collection_schedule import Collection # type: ignore[attr-defined]\nfrom waste_collection_schedule.service.ICS import ICS\n\n_LOGGER = logging.getLogger(__name__)\n\nTITLE = \"Stadtreinigung Leipzig\"\nDESCRIPTION = \"Source for Stadtrein... | diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtreinigung_leipzig_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtreinigung_leipzig_de.py
index 44d364682..f5f1bc146 100644
--- a/custom_components/waste_collection_schedule/waste_col... |
pytorch__ignite-2316 | StateParamScheduler raises KeyError when save_history=true and multiple parameters are scheduled
## 🐛 Bug description
When scheduling multiple parameters on an engine, a `KeyError` exception is raised when `save_history=True`
To reproduce the bug:
```python
engine = Engine(lambda e, b: None)
exp_state_pa... | [
{
"content": "import numbers\nfrom bisect import bisect_right\nfrom typing import Any, List, Sequence, Tuple, Union\n\nfrom ignite.engine import CallableEventWithFilter, Engine, Events, EventsList\nfrom ignite.handlers import BaseParamScheduler\n\n\nclass StateParamScheduler(BaseParamScheduler):\n \"\"\"An a... | [
{
"content": "import numbers\nfrom bisect import bisect_right\nfrom typing import Any, List, Sequence, Tuple, Union\n\nfrom ignite.engine import CallableEventWithFilter, Engine, Events, EventsList\nfrom ignite.handlers import BaseParamScheduler\n\n\nclass StateParamScheduler(BaseParamScheduler):\n \"\"\"An a... | diff --git a/ignite/handlers/state_param_scheduler.py b/ignite/handlers/state_param_scheduler.py
index 496daf96f3d2..38e198a2ff7c 100644
--- a/ignite/handlers/state_param_scheduler.py
+++ b/ignite/handlers/state_param_scheduler.py
@@ -52,7 +52,7 @@ def attach(
if self.save_history:
if not hasattr(... |
ansible__ansible-modules-core-4564 | git module SHA version not work for clone
In documentation:
```
What version of the repository to check out. This can be the full 40-character SHA-1 hash, the literal string HEAD, a branch name, or a tag name.
```
But it not work for clone, because `git clone` not support this.
So in this case better note about this... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software ... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software ... | diff --git a/source_control/git.py b/source_control/git.py
index c8757023398..56addd883c1 100644
--- a/source_control/git.py
+++ b/source_control/git.py
@@ -46,8 +46,9 @@
default: "HEAD"
description:
- What version of the repository to check out. This can be the
- full 40-ch... |
fonttools__fonttools-1818 | [BUG] Alignment issue with CBLC/EBLC index format 3
According to the spec CBLC/EBLC IndexSubtables using index format 3 need to be 32-bit aligned [1]. However, due to a bug in calculating if padding is required near line 482 of `E_B_L_C_.py` the resulting compiled table will always be 16-bit aligned. See the code for a... | [
{
"content": "from fontTools.misc.py23 import *\nfrom fontTools.misc import sstruct\nfrom . import DefaultTable\nfrom fontTools.misc.textTools import safeEval\nfrom .BitmapGlyphMetrics import BigGlyphMetrics, bigGlyphMetricsFormat, SmallGlyphMetrics, smallGlyphMetricsFormat\nimport struct\nimport itertools\nfro... | [
{
"content": "from fontTools.misc.py23 import *\nfrom fontTools.misc import sstruct\nfrom . import DefaultTable\nfrom fontTools.misc.textTools import safeEval\nfrom .BitmapGlyphMetrics import BigGlyphMetrics, bigGlyphMetricsFormat, SmallGlyphMetrics, smallGlyphMetricsFormat\nimport struct\nimport itertools\nfro... | diff --git a/Lib/fontTools/ttLib/tables/E_B_L_C_.py b/Lib/fontTools/ttLib/tables/E_B_L_C_.py
index 224042d110..f71ae95e60 100644
--- a/Lib/fontTools/ttLib/tables/E_B_L_C_.py
+++ b/Lib/fontTools/ttLib/tables/E_B_L_C_.py
@@ -482,7 +482,7 @@ def compile(self, ttFont):
dataList = [EblcIndexSubTable.compile(self, ttFont... |
MongoEngine__mongoengine-2472 | Manually setting Sequence Field in DynamicDocument increments the counter
Dynamic Document __setattr__ checks existance of the field with hasattr that calls __get__ of sequencefield that runs generate that increments the counter.
This works as expected with Document.
For example this increments the counter:
`... | [
{
"content": "import copy\n\nimport numbers\nfrom functools import partial\n\nfrom bson import DBRef, ObjectId, SON, json_util\nimport pymongo\n\nfrom mongoengine import signals\nfrom mongoengine.base.common import get_document\nfrom mongoengine.base.datastructures import (\n BaseDict,\n BaseList,\n Em... | [
{
"content": "import copy\n\nimport numbers\nfrom functools import partial\n\nfrom bson import DBRef, ObjectId, SON, json_util\nimport pymongo\n\nfrom mongoengine import signals\nfrom mongoengine.base.common import get_document\nfrom mongoengine.base.datastructures import (\n BaseDict,\n BaseList,\n Em... | diff --git a/mongoengine/base/document.py b/mongoengine/base/document.py
index f64b578be..344095625 100644
--- a/mongoengine/base/document.py
+++ b/mongoengine/base/document.py
@@ -156,7 +156,7 @@ def __setattr__(self, name, value):
# Handle dynamic data only if an initialised dynamic document
if self... |
freedomofpress__securedrop-2475 | Session expiring do not display a localized logout message.
# Bug
## Description
Like #2391, if a source has their session expire, they will not be shown a localized message when they log out.
## Steps to Reproduce
Set session expire to 30 seconds. Log in. Set locale to not-english. Wait 30 seconds. Refresh... | [
{
"content": "from datetime import datetime, timedelta\nfrom flask import (Flask, render_template, flash, Markup, request, g, session,\n url_for, redirect)\nfrom flask_babel import gettext\nfrom flask_assets import Environment\nfrom flask_wtf.csrf import CSRFProtect\nfrom jinja2 import evalcon... | [
{
"content": "from datetime import datetime, timedelta\nfrom flask import (Flask, render_template, flash, Markup, request, g, session,\n url_for, redirect)\nfrom flask_babel import gettext\nfrom flask_assets import Environment\nfrom flask_wtf.csrf import CSRFProtect\nfrom jinja2 import evalcon... | diff --git a/securedrop/source_app/__init__.py b/securedrop/source_app/__init__.py
index 840ccd8189..af7db933f8 100644
--- a/securedrop/source_app/__init__.py
+++ b/securedrop/source_app/__init__.py
@@ -79,8 +79,11 @@ def setup_g():
g.locales = i18n.get_locale2name()
if 'expires' in session and date... |
cornellius-gp__gpytorch-1087 | Problem with batch Hadamard Multitask GP regression (likely a bug in GPyTorch)
Hi I was trying to build a batch hadamard multitask GP regression model following this:
https://gpytorch.readthedocs.io/en/latest/examples/03_Multitask_Exact_GPs/Hadamard_Multitask_GP_Regression.html
Here is my code:
import math... | [
{
"content": "#!/usr/bin/env python3\n\nimport torch\n\nfrom ..constraints import Positive\nfrom ..lazy import DiagLazyTensor, InterpolatedLazyTensor, PsdSumLazyTensor, RootLazyTensor\nfrom .kernel import Kernel\n\n\nclass IndexKernel(Kernel):\n r\"\"\"\n A kernel for discrete indices. Kernel is defined b... | [
{
"content": "#!/usr/bin/env python3\n\nimport torch\n\nfrom ..constraints import Positive\nfrom ..lazy import DiagLazyTensor, InterpolatedLazyTensor, PsdSumLazyTensor, RootLazyTensor\nfrom .kernel import Kernel\n\n\nclass IndexKernel(Kernel):\n r\"\"\"\n A kernel for discrete indices. Kernel is defined b... | diff --git a/gpytorch/kernels/index_kernel.py b/gpytorch/kernels/index_kernel.py
index 87ceba85f..72c66a83f 100644
--- a/gpytorch/kernels/index_kernel.py
+++ b/gpytorch/kernels/index_kernel.py
@@ -80,9 +80,10 @@ def covar_matrix(self):
def forward(self, i1, i2, **params):
covar_matrix = self._eval_covar... |
mars-project__mars-1667 | [BUG] Run DataFrame jobs hangs in distributed mode
<!--
Thank you for your contribution!
Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue.
-->
**Describe the bug**
Run the below code, client hangs when execute the last line.
``` Python
In [41]: df1 = pd.... | [
{
"content": "# Copyright 1999-2020 Alibaba Group Holding 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\n#\n# Unless... | [
{
"content": "# Copyright 1999-2020 Alibaba Group Holding 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\n#\n# Unless... | diff --git a/mars/deploy/local/tests/test_cluster.py b/mars/deploy/local/tests/test_cluster.py
index 5cb3c931c5..f0f2a1026d 100644
--- a/mars/deploy/local/tests/test_cluster.py
+++ b/mars/deploy/local/tests/test_cluster.py
@@ -601,9 +601,17 @@ def wrapped(*arg, **kwargs):
r4 = df.groupby('c2').transform(ex... |
HypothesisWorks__hypothesis-2965 | [Bug?] `.filter` ignored on `just` strategy
Hi,
I hope this has not been reported before. I checked the issues and read the [changelog] ~but could not find anything related~ and this seems to be related to issue https://github.com/HypothesisWorks/hypothesis/issues/2036.
[changelog]: https://hypothesis.readthedocs.i... | [
{
"content": "# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Most of this work is copyright (C) 2013-2021 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full list of people who ma... | [
{
"content": "# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Most of this work is copyright (C) 2013-2021 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full list of people who ma... | diff --git a/hypothesis-python/RELEASE.rst b/hypothesis-python/RELEASE.rst
new file mode 100644
index 0000000000..f050115f1b
--- /dev/null
+++ b/hypothesis-python/RELEASE.rst
@@ -0,0 +1,6 @@
+RELEASE_TYPE: patch
+
+This patch fixes :issue:`2964`, where ``.map()`` and ``.filter()`` methods
+were omitted from the ``repr(... |
vyperlang__vyper-2037 | VIP: Use uint256 for public array getters
## Simple Summary
When an array is declared public, the generated getter should accept `uint256` instead of `int128` in order to handle the lookups.
## Motivation
We do not allow array lookups with negative numbers, so the use of `int128` is unintuitive.
## Specificatio... | [
{
"content": "from typing import Optional\n\nfrom vyper import ast as vy_ast\nfrom vyper.exceptions import (\n EventDeclarationException,\n FunctionDeclarationException,\n InvalidType,\n StructureException,\n VariableDeclarationException,\n)\nfrom vyper.parser.constants import Constants\nfrom vyp... | [
{
"content": "from typing import Optional\n\nfrom vyper import ast as vy_ast\nfrom vyper.exceptions import (\n EventDeclarationException,\n FunctionDeclarationException,\n InvalidType,\n StructureException,\n VariableDeclarationException,\n)\nfrom vyper.parser.constants import Constants\nfrom vyp... | diff --git a/vyper/parser/global_context.py b/vyper/parser/global_context.py
index 9fb089e1c1..dfc6c4bb13 100644
--- a/vyper/parser/global_context.py
+++ b/vyper/parser/global_context.py
@@ -197,7 +197,7 @@ def _mk_getter_helper(cls, typ, depth=0):
o = []
for funname, head, tail, base in cls._... |
speechbrain__speechbrain-161 | Error when yaml contains `!ref` reference to object created by `!new:` without parameters
**Summary of the issue:**
The `!ref` system works fine when `!new:` objects are created with parameters (since they can use an alias) but doesn't work when `!new:` objects are created without parameters (since the reference sys... | [
{
"content": "\"\"\"This library gathers utilities for extended yaml loading\n\nAuthors: Peter Plantinga 2020, Aku Rouhe 2020\n\"\"\"\n\nimport re\nimport ast\nimport yaml\nimport copy\nimport pydoc\nimport inspect\nimport functools\nimport ruamel.yaml\nimport operator as op\nfrom io import StringIO\nfrom types... | [
{
"content": "\"\"\"This library gathers utilities for extended yaml loading\n\nAuthors: Peter Plantinga 2020, Aku Rouhe 2020\n\"\"\"\n\nimport re\nimport ast\nimport yaml\nimport copy\nimport pydoc\nimport inspect\nimport functools\nimport ruamel.yaml\nimport operator as op\nfrom io import StringIO\nfrom types... | diff --git a/recipes/TIMIT/ASR_CTC/hyperparams/augment_CRDNN.yaml b/recipes/TIMIT/ASR_CTC/hyperparams/augment_CRDNN.yaml
index 8b88082763..131b088a60 100644
--- a/recipes/TIMIT/ASR_CTC/hyperparams/augment_CRDNN.yaml
+++ b/recipes/TIMIT/ASR_CTC/hyperparams/augment_CRDNN.yaml
@@ -30,7 +30,7 @@ n_fft: 400
n_mels: 40
#... |
pyro-ppl__numpyro-1441 | issues when numpyro.enable_validation(is_validate=True)
Hi
I identified a strange behavior:
I estimate a VectorAutoRegression model and when I use numpyro.enable_validation(is_validate=True), (which I had in the code
for some versions of the model with a MultivariateTruncated) , the resuts of any simple version of... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\n# The implementation follows the design in PyTorch: torch.distributions.constraints.py\n#\n# Copyright (c) 2016- Facebook, Inc (Adam Paszke)\n# Copyright (c) 2014- Facebook, Inc (S... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\n# The implementation follows the design in PyTorch: torch.distributions.constraints.py\n#\n# Copyright (c) 2016- Facebook, Inc (Adam Paszke)\n# Copyright (c) 2014- Facebook, Inc (S... | diff --git a/numpyro/distributions/constraints.py b/numpyro/distributions/constraints.py
index d9fa378af..f933dc6c8 100644
--- a/numpyro/distributions/constraints.py
+++ b/numpyro/distributions/constraints.py
@@ -115,7 +115,8 @@ def __call__(self, x):
)
positive_diagonal = jnp.all(jnp.diagonal(x, axis... |
napari__napari-1297 | Shift click for selecting shapes doesn't work
## 🐛 Bug
Using shift click to select multiple shapes now raises an error:
```python
Traceback (most recent call last):
File "/Users/yamauc0000/Documents/napari/.venv/lib/python3.7/site-packages/vispy/app/backends/_qt.py", line 447, in mousePressEvent
modifie... | [
{
"content": "import numpy as np\nfrom copy import copy\nfrom ._shapes_constants import Mode\nfrom ._shapes_models import Rectangle, Ellipse, Line, Path, Polygon\nfrom ._shapes_utils import point_to_lines\n\n\ndef highlight(layer, event):\n \"\"\"Highlight hovered shapes.\"\"\"\n layer._set_highlight()\n\... | [
{
"content": "import numpy as np\nfrom copy import copy\nfrom ._shapes_constants import Mode\nfrom ._shapes_models import Rectangle, Ellipse, Line, Path, Polygon\nfrom ._shapes_utils import point_to_lines\n\n\ndef highlight(layer, event):\n \"\"\"Highlight hovered shapes.\"\"\"\n layer._set_highlight()\n\... | diff --git a/docs/release/release_0_3_2.md b/docs/release/release_0_3_2.md
index d25c30a88e3..dbc195bce15 100644
--- a/docs/release/release_0_3_2.md
+++ b/docs/release/release_0_3_2.md
@@ -34,6 +34,7 @@ https://github.com/napari/napari
- Fix missing docstring `create_dask_cache` (#1266)
- Fix adding points with new p... |
mirumee__ariadne-824 | Use `execute_sync` in `graphql_sync`
`graphql_sync` should use `execute_sync` instead of `execute`.
I run my code in a synchronous context, but a resolver was identified as asynchronous due to the fact that GraphQL core does a simple `hasattr(value, "__await__")` check instead of using `inspect.isawaitable`. This ca... | [
{
"content": "from asyncio import ensure_future\nfrom inspect import isawaitable\nfrom typing import (\n Any,\n AsyncGenerator,\n Awaitable,\n Collection,\n List,\n Optional,\n Sequence,\n Type,\n cast,\n)\n\nfrom graphql import (\n DocumentNode,\n ExecutionContext,\n Executi... | [
{
"content": "from asyncio import ensure_future\nfrom inspect import isawaitable\nfrom typing import (\n Any,\n AsyncGenerator,\n Awaitable,\n Collection,\n List,\n Optional,\n Sequence,\n Type,\n cast,\n)\n\nfrom graphql import (\n DocumentNode,\n ExecutionContext,\n Executi... | diff --git a/ariadne/graphql.py b/ariadne/graphql.py
index 8b5726167..d5fca517e 100644
--- a/ariadne/graphql.py
+++ b/ariadne/graphql.py
@@ -20,6 +20,7 @@
GraphQLSchema,
TypeInfo,
execute,
+ execute_sync,
parse,
subscribe as _subscribe,
)
@@ -179,7 +180,7 @@ def graphql_sync(
... |
conda__conda-7607 | activate and powerline don't play nice together
I am using [powerline](https://github.com/powerline/powerline) to display the current anaconda environment in my shell. However, when I use `source active MY_ENV ` it doesn't realize that I am already using `powerline` to display the anaconda environment and it appends t... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2012 Anaconda, Inc\n# SPDX-License-Identifier: BSD-3-Clause\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom errno import ENOENT\nfrom glob import glob\nimport os\nfrom os.path import abspath, basename, dirname, ex... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2012 Anaconda, Inc\n# SPDX-License-Identifier: BSD-3-Clause\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom errno import ENOENT\nfrom glob import glob\nimport os\nfrom os.path import abspath, basename, dirname, ex... | diff --git a/conda/activate.py b/conda/activate.py
index fa9a7d50e85..112b6cb921e 100644
--- a/conda/activate.py
+++ b/conda/activate.py
@@ -613,6 +613,9 @@ def __init__(self, arguments=None):
def _update_prompt(self, set_vars, conda_prompt_modifier):
ps1 = self.environ.get('PS1', '')
+ if 'POWER... |
google__turbinia-1017 | Cron.py unicode decode error
It looks like input evidence caused a unicode error for cron. I think this would only be raised when receiving unreadable input but filing this if we want to catch this exception differently/look into it further
```
Traceback (most recent call last):
File "/usr/local/lib/python3.8/d... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2021 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2021 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U... | diff --git a/turbinia/workers/cron.py b/turbinia/workers/cron.py
index 8dfe290b0..28ce5fbaf 100644
--- a/turbinia/workers/cron.py
+++ b/turbinia/workers/cron.py
@@ -51,7 +51,14 @@ def run(self, evidence, result):
# Read the input file
with open(evidence.local_path, 'r') as input_file:
- crontab = input... |
googleapis__google-auth-library-python-1436 | OAuth2 RefreshError while refreshing access token in Docker
Google Sheets and Drive API connections suddenly stopped working two days ago. No code or credentials have changed. OAuth2 token refreshes work fine locally. However, when running within Docker, with access to same credentials file and tokens, I receive the fo... | [
{
"content": "# Copyright 2016 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 2016 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/google/oauth2/credentials.py b/google/oauth2/credentials.py
index 7e2173ebe..a5c93ecc2 100644
--- a/google/oauth2/credentials.py
+++ b/google/oauth2/credentials.py
@@ -180,7 +180,7 @@ def __setstate__(self, d):
self._rapt_token = d.get("_rapt_token")
self._enable_reauth_refresh = d.get("_... |
mars-project__mars-3129 | [BUG] ImportError: cannot import name 'elliprc' from 'mars.tensor.special.ellip_func_integrals'
<!--
Thank you for your contribution!
Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue.
-->
**Describe the bug**
A clear and concise description of what the bu... | [
{
"content": "# Copyright 1999-2021 Alibaba Group Holding 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\n#\n# Unless... | [
{
"content": "# Copyright 1999-2021 Alibaba Group Holding 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\n#\n# Unless... | diff --git a/mars/tensor/special/__init__.py b/mars/tensor/special/__init__.py
index 9d983aaeea..e228446024 100644
--- a/mars/tensor/special/__init__.py
+++ b/mars/tensor/special/__init__.py
@@ -151,3 +151,7 @@
)
except ImportError: # pragma: no cover
pass
+
+_names_to_del = [_name for _name, _val in global... |
ansible__ansible-17457 | Ansible fails to create retry files with [Errno 2] No such file or directory: ''
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
retry files
##### ANSIBLE VERSION
```
ansible 2.1.1.0
config file =
configured module search path = Default w/o overrides
```
##### CONFIGURATION
none
##### OS / ENVIRONMENT
Ubunt... | [
{
"content": "# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the Licen... | [
{
"content": "# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the Licen... | diff --git a/lib/ansible/executor/playbook_executor.py b/lib/ansible/executor/playbook_executor.py
index 058230d8441f7e..cb0dd1ca3d6d00 100644
--- a/lib/ansible/executor/playbook_executor.py
+++ b/lib/ansible/executor/playbook_executor.py
@@ -186,7 +186,7 @@ def run(self):
if C.RETRY_FILES_... |
translate__pootle-4890 | User contributions for their top language don't work
User contributions for their top language always displays _No contributions in the last 30 days_ in their profile page.
This is likely related to some recent changes on how contributions are retrieved.
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport datetim... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport datetim... | diff --git a/pootle/apps/accounts/models.py b/pootle/apps/accounts/models.py
index f4089acf71b..2d0e4bacf2f 100644
--- a/pootle/apps/accounts/models.py
+++ b/pootle/apps/accounts/models.py
@@ -424,8 +424,8 @@ def top_language(self, days=30):
if language is not None:
language_scorers = self.top_sco... |
ytdl-org__youtube-dl-29236 | [tvthek.orf.at] DASH-formats only download the MPD-file
<!--
######################################################################
WARNING!
IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################
-->
## Checklist... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..compat import compat_str\nfrom ..utils import (\n clean_html,\n determine_ext,\n float_or_none,\n HEADRequest,\n int_or_none,\n orderedSet,\n remove_end,\n str... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..compat import compat_str\nfrom ..utils import (\n clean_html,\n determine_ext,\n float_or_none,\n HEADRequest,\n int_or_none,\n orderedSet,\n remove_end,\n str... | diff --git a/youtube_dl/extractor/orf.py b/youtube_dl/extractor/orf.py
index ed8a9a84147..8d537d7ae71 100644
--- a/youtube_dl/extractor/orf.py
+++ b/youtube_dl/extractor/orf.py
@@ -98,6 +98,9 @@ def _real_extract(self, url):
elif ext == 'f4m':
formats.extend(self._extract_f4m_forma... |
plotly__dash-2194 | [BUG] Order of Inputs, Outputs and States in long_callbacks causing problems
An issue I had was [described as a potential bug on community.plotly](https://community.plotly.com/t/issues-switching-from-callback-to-long-callback/66882/4) and it was recommended I share here.
The following code runs properly:
```
imp... | [
{
"content": "import collections\nfrom functools import wraps\n\nimport flask\n\nfrom .dependencies import (\n handle_callback_args,\n handle_grouped_callback_args,\n Output,\n)\nfrom .exceptions import (\n PreventUpdate,\n WildcardInLongCallback,\n DuplicateCallback,\n MissingLongCallbackM... | [
{
"content": "import collections\nfrom functools import wraps\n\nimport flask\n\nfrom .dependencies import (\n handle_callback_args,\n handle_grouped_callback_args,\n Output,\n)\nfrom .exceptions import (\n PreventUpdate,\n WildcardInLongCallback,\n DuplicateCallback,\n MissingLongCallbackM... | diff --git a/dash/_callback.py b/dash/_callback.py
index b23f14c6c3..da09369389 100644
--- a/dash/_callback.py
+++ b/dash/_callback.py
@@ -362,7 +362,7 @@ def add_context(*args, **kwargs):
job = callback_manager.call_job_fn(
cache_key,
job_fn,
- ... |
gratipay__gratipay.com-3155 | `make test` leaves asset artifacts on filesystem
```
[gratipay] $ git status
# On branch update-test-deps
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# www/assets/gratipay.css
# www/assets/gratipay.js
nothing added to commit but untracked files present (use "git a... | [
{
"content": "\"\"\"Wireup\n\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport fnmatch\nimport os\nfrom tempfile import mkstemp\n\nimport aspen\nfrom aspen.testing.client import Client\nfrom babel.core import Locale\nfrom babel.messages.pofile import read_po\nfr... | [
{
"content": "\"\"\"Wireup\n\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport atexit\nimport fnmatch\nimport os\nfrom tempfile import mkstemp\n\nimport aspen\nfrom aspen.testing.client import Client\nfrom babel.core import Locale\nfrom babel.messages.pofile imp... | diff --git a/gratipay/testing/__init__.py b/gratipay/testing/__init__.py
index 1973c96f36..744096b61d 100644
--- a/gratipay/testing/__init__.py
+++ b/gratipay/testing/__init__.py
@@ -2,7 +2,6 @@
"""
from __future__ import absolute_import, division, print_function, unicode_literals
-import atexit
import itertools
... |
napari__napari-1197 | view_image with axis_labels doesn't resize labels
## 🐛 Bug
Just noticed that calling `napari.view_image` with `axis_labels` doesn't immediately "resize" the labels to fit long text. will fix later, just didn't want to forget.
| [
{
"content": "\"\"\"\nCustom Qt widgets that serve as native objects that the public-facing elements\nwrap.\n\"\"\"\nimport time\n\n# set vispy to use same backend as qtpy\nfrom ..utils.io import imsave\n\nfrom .qt_about import QtAbout\nfrom .qt_plugin_report import QtPluginErrReporter\nfrom .qt_plugin_sorter i... | [
{
"content": "\"\"\"\nCustom Qt widgets that serve as native objects that the public-facing elements\nwrap.\n\"\"\"\nimport time\n\n# set vispy to use same backend as qtpy\nfrom ..utils.io import imsave\n\nfrom .qt_about import QtAbout\nfrom .qt_plugin_report import QtPluginErrReporter\nfrom .qt_plugin_sorter i... | diff --git a/napari/_qt/qt_main_window.py b/napari/_qt/qt_main_window.py
index 20b88c863ff..78885986463 100644
--- a/napari/_qt/qt_main_window.py
+++ b/napari/_qt/qt_main_window.py
@@ -409,6 +409,8 @@ def show(self):
"""Resize, show, and bring forward the window."""
self._qt_window.resize(self._qt_win... |
pyinstaller__pyinstaller-4539 | VSVersionInfo argument to EXE instead of a path
In previous versions (3.4) it was possible to pass a VSVersionInfo object as the version argument to EXE. In 3.5 this raises an exception. It seems to be the following code in api.py on line 426 which expects the argument to be a path.
```Python
if self.versrsrc:
if... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2019, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING.... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2019, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING.... | diff --git a/PyInstaller/building/api.py b/PyInstaller/building/api.py
index 2c6daca003..e83ce7d20d 100644
--- a/PyInstaller/building/api.py
+++ b/PyInstaller/building/api.py
@@ -424,7 +424,8 @@ def __init__(self, *args, **kwargs):
"", "OPTION"))
if self.versrsrc:
- ... |
InstaPy__InstaPy-3070 | set_user_interact liking leads to "element not found, skipping this user" error
<!-- Is this a Feature Request ? Please, check out our Wiki first https://github.com/timgrossmann/InstaPy/wiki -->
## Expected Behavior
The script goes through liking by tag, interacting with/following each user whose photo it likes by ta... | [
{
"content": "\"\"\" Common utilities \"\"\"\nimport random\nimport time\nimport datetime\nimport re\nimport signal\nimport os\nfrom sys import exit as clean_exit\nfrom platform import system\nfrom subprocess import call\nimport csv\nimport sqlite3\nimport json\nfrom contextlib import contextmanager\nimport req... | [
{
"content": "\"\"\" Common utilities \"\"\"\nimport random\nimport time\nimport datetime\nimport re\nimport signal\nimport os\nfrom sys import exit as clean_exit\nfrom platform import system\nfrom subprocess import call\nimport csv\nimport sqlite3\nimport json\nfrom contextlib import contextmanager\nimport req... | diff --git a/instapy/util.py b/instapy/util.py
index d6751ad51..086dc5ac4 100644
--- a/instapy/util.py
+++ b/instapy/util.py
@@ -685,7 +685,7 @@ def username_url_to_username(username_url):
def get_number_of_posts(browser):
"""Get the number of posts from the profile screen"""
- num_of_posts_txt = browser.fin... |
google__pytype-1353 | Do not parse default values as types
See python/typeshed#9501.
| [
{
"content": "\"\"\"Parse a pyi file using typed_ast.\"\"\"\n\nimport dataclasses\nimport hashlib\nimport sys\nfrom typing import Any, List, Optional, Tuple, Union\n\nfrom pytype.ast import debug\nfrom pytype.pyi import classdef\nfrom pytype.pyi import conditions\nfrom pytype.pyi import definitions\nfrom pytype... | [
{
"content": "\"\"\"Parse a pyi file using typed_ast.\"\"\"\n\nimport dataclasses\nimport hashlib\nimport sys\nfrom typing import Any, List, Optional, Tuple, Union\n\nfrom pytype.ast import debug\nfrom pytype.pyi import classdef\nfrom pytype.pyi import conditions\nfrom pytype.pyi import definitions\nfrom pytype... | diff --git a/pytype/pyi/parser.py b/pytype/pyi/parser.py
index 590912906..6c3b21c09 100644
--- a/pytype/pyi/parser.py
+++ b/pytype/pyi/parser.py
@@ -129,6 +129,16 @@ def _attribute_to_name(node: ast3.Attribute) -> ast3.Name:
class AnnotationVisitor(visitor.BaseVisitor):
"""Converts typed_ast annotations to pytd."""... |
dask__dask-6475 | write_parquet using partition_on breaking on GCS
**What happened**:
Saving a partitioned dask dataframe on google cloud storage raises the following error
```shell
/usr/local/lib/python3.7/site-packages/dask/dataframe/io/parquet/arrow.py in _write_partitioned()
246 )
247 prefix = fs.sep... | [
{
"content": "from functools import partial\nfrom collections import defaultdict\nimport json\nimport warnings\nfrom distutils.version import LooseVersion\n\nimport pandas as pd\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nfrom ....utils import getargspec\nfrom ..utils import _get_pyarrow_dtypes, _meta_... | [
{
"content": "from functools import partial\nfrom collections import defaultdict\nimport json\nimport warnings\nfrom distutils.version import LooseVersion\n\nimport pandas as pd\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nfrom ....utils import getargspec\nfrom ..utils import _get_pyarrow_dtypes, _meta_... | diff --git a/dask/dataframe/io/parquet/arrow.py b/dask/dataframe/io/parquet/arrow.py
index 36bc4e7a4c4..e801c90e738 100644
--- a/dask/dataframe/io/parquet/arrow.py
+++ b/dask/dataframe/io/parquet/arrow.py
@@ -72,7 +72,7 @@ def _write_partitioned(
subgroup, preserve_index=preserve_index, schema=subschema, s... |
spack__spack-7509 | mac osx issues?
It's my first time really trying spack. I'm on mac
```
uname -a
Darwin loki 16.7.0 Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64 x86_64
```
First of all cloning the repo and running the seup_env.sh file does not seem to work on mac, I have to manu... | [
{
"content": "##############################################################################\n# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ... | [
{
"content": "##############################################################################\n# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ... | diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py
index 8e3304da8588d8..c3f51ef0c48fa4 100644
--- a/var/spack/repos/builtin/packages/hwloc/package.py
+++ b/var/spack/repos/builtin/packages/hwloc/package.py
@@ -77,7 +77,7 @@ class Hwloc(AutotoolsPackage):
... |
netbox-community__netbox-14806 | Quick search breaks available IPs search results
### Deployment Type
Self-hosted
### NetBox Version
3.7.0
### Python Version
3.10
### Steps to Reproduce
View prefix and use "quick search" to filter ip addresses
### Expected Behavior
Available IPs should not change. I would argue that available IPs should not s... | [
{
"content": "from django.contrib.contenttypes.models import ContentType\nfrom django.db.models import Prefetch\nfrom django.db.models.expressions import RawSQL\nfrom django.shortcuts import get_object_or_404, redirect, render\nfrom django.urls import reverse\nfrom django.utils.translation import gettext as _\n... | [
{
"content": "from django.contrib.contenttypes.models import ContentType\nfrom django.db.models import Prefetch\nfrom django.db.models.expressions import RawSQL\nfrom django.shortcuts import get_object_or_404, redirect, render\nfrom django.urls import reverse\nfrom django.utils.translation import gettext as _\n... | diff --git a/netbox/ipam/views.py b/netbox/ipam/views.py
index 1598f03211c..5ff6d232329 100644
--- a/netbox/ipam/views.py
+++ b/netbox/ipam/views.py
@@ -604,7 +604,7 @@ def get_children(self, request, parent):
return parent.get_child_ips().restrict(request.user, 'view').prefetch_related('vrf', 'tenant', 'tenan... |
encode__django-rest-framework-5440 | Inconsistent time serialization
## 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 should be directed to the ... | [
{
"content": "\"\"\"\nHelper classes for parsers.\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport datetime\nimport decimal\nimport json\nimport uuid\n\nfrom django.db.models.query import QuerySet\nfrom django.utils import six, timezone\nfrom django.utils.encoding import force_text\nfrom django.utils.... | [
{
"content": "\"\"\"\nHelper classes for parsers.\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport datetime\nimport decimal\nimport json\nimport uuid\n\nfrom django.db.models.query import QuerySet\nfrom django.utils import six, timezone\nfrom django.utils.encoding import force_text\nfrom django.utils.... | diff --git a/rest_framework/utils/encoders.py b/rest_framework/utils/encoders.py
index 8896e4f2c6..33dbb1bb41 100644
--- a/rest_framework/utils/encoders.py
+++ b/rest_framework/utils/encoders.py
@@ -37,8 +37,6 @@ def default(self, obj):
if timezone and timezone.is_aware(obj):
raise ValueEr... |
ray-project__ray-10547 | [dask-on-ray] Set task name to Dask key at task submission time.
<!--Please include [tune], [rllib], [autoscaler] etc. in the issue title if relevant-->
### Describe your feature request
To provide better dashboard, metrics, and debugging UX, we should set the task name to the Dask key. The Dask-Ray scheduler [us... | [
{
"content": "import atexit\nfrom collections import defaultdict\nfrom multiprocessing.pool import ThreadPool\nimport threading\n\nimport ray\n\nfrom dask.core import istask, ishashable, _execute_task\nfrom dask.local import get_async, apply_sync\nfrom dask.system import CPU_COUNT\nfrom dask.threaded import pac... | [
{
"content": "import atexit\nfrom collections import defaultdict\nfrom multiprocessing.pool import ThreadPool\nimport threading\n\nimport ray\n\nfrom dask.core import istask, ishashable, _execute_task\nfrom dask.local import get_async, apply_sync\nfrom dask.system import CPU_COUNT\nfrom dask.threaded import pac... | diff --git a/python/ray/experimental/dask/scheduler.py b/python/ray/experimental/dask/scheduler.py
index b15164525743..6d948cf25dd3 100644
--- a/python/ray/experimental/dask/scheduler.py
+++ b/python/ray/experimental/dask/scheduler.py
@@ -196,7 +196,8 @@ def _rayify_task(task, key, deps):
# Ray properly tracks... |
azavea__raster-vision-550 | Add Changelog
We need a changelog in the docs that we can update for every PR that adds a fix or a feature.
| [
{
"content": "from pallets_sphinx_themes import ProjectLink, get_version\n\n# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/s... | [
{
"content": "from pallets_sphinx_themes import ProjectLink, get_version\n\n# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/s... | diff --git a/docs/changelog.rst b/docs/changelog.rst
new file mode 100644
index 000000000..11c29debd
--- /dev/null
+++ b/docs/changelog.rst
@@ -0,0 +1,15 @@
+CHANGELOG
+=========
+
+Raster Vision 0.8
+-----------------
+
+Raster Vision 0.8.1
+~~~~~~~~~~~~~~~~~~~
+
+Bug Fixes
+^^^^^^^^^
+- Allow multiploygon for chip cl... |
mozmeao__snippets-service-780 | Set snippet to `Draft` when `Save as New`
| [
{
"content": "import re\n\nfrom django.contrib import admin\nfrom django.db.models import TextField, Q\nfrom django.template.loader import get_template\nfrom django.utils.safestring import mark_safe\n\nfrom reversion.admin import VersionAdmin\nfrom django_ace import AceWidget\nfrom django_statsd.clients import ... | [
{
"content": "import re\n\nfrom django.contrib import admin\nfrom django.db.models import TextField, Q\nfrom django.template.loader import get_template\nfrom django.utils.safestring import mark_safe\n\nfrom reversion.admin import VersionAdmin\nfrom django_ace import AceWidget\nfrom django_statsd.clients import ... | diff --git a/snippets/base/admin/adminmodels.py b/snippets/base/admin/adminmodels.py
index 8db295824..21416312d 100644
--- a/snippets/base/admin/adminmodels.py
+++ b/snippets/base/admin/adminmodels.py
@@ -202,6 +202,14 @@ def preview_url(self, obj):
'''
return mark_safe(text)
+ def change_view(se... |
urllib3__urllib3-3264 | How to implement a "watcher" thread as suggested by the documentation?
The documentation of the [`timeout`](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html#module-urllib3.util.timeout) module says:
> If your goal is to cut off any request after a set amount of wall clock time, consider having a ... | [
{
"content": "from __future__ import annotations\n\nimport time\nimport typing\nfrom enum import Enum\nfrom socket import getdefaulttimeout\n\nfrom ..exceptions import TimeoutStateError\n\nif typing.TYPE_CHECKING:\n from typing import Final\n\n\nclass _TYPE_DEFAULT(Enum):\n # This value should never be pa... | [
{
"content": "from __future__ import annotations\n\nimport time\nimport typing\nfrom enum import Enum\nfrom socket import getdefaulttimeout\n\nfrom ..exceptions import TimeoutStateError\n\nif typing.TYPE_CHECKING:\n from typing import Final\n\n\nclass _TYPE_DEFAULT(Enum):\n # This value should never be pa... | diff --git a/src/urllib3/util/timeout.py b/src/urllib3/util/timeout.py
index f044625c35..4bb1be11d9 100644
--- a/src/urllib3/util/timeout.py
+++ b/src/urllib3/util/timeout.py
@@ -101,10 +101,6 @@ class Timeout:
the case; if a server streams one byte every fifteen seconds, a timeout
of 20 seconds will ... |
pytorch__text-403 | Try to get the vocab of NestedField but only get '[]'
# Here is the dataset
train1.csv: "3","EBay gets into rentals","EBay plans to buy the apartment and home rental service Rent.com for \$415 million, adding to its already exhaustive breadth of offerings."
test1.csv: "3","EBay gets into rentals","EBay plans to buy... | [
{
"content": "# coding: utf8\nfrom collections import Counter, OrderedDict\nfrom itertools import chain\nimport six\nimport torch\nfrom tqdm import tqdm\n\nfrom .dataset import Dataset\nfrom .pipeline import Pipeline\nfrom .utils import get_tokenizer\nfrom ..vocab import Vocab, SubwordVocab\n\n\nclass RawField(... | [
{
"content": "# coding: utf8\nfrom collections import Counter, OrderedDict\nfrom itertools import chain\nimport six\nimport torch\nfrom tqdm import tqdm\n\nfrom .dataset import Dataset\nfrom .pipeline import Pipeline\nfrom .utils import get_tokenizer\nfrom ..vocab import Vocab, SubwordVocab\n\n\nclass RawField(... | diff --git a/test/data/test_field.py b/test/data/test_field.py
index 1407ad1b4b..660a57ffae 100644
--- a/test/data/test_field.py
+++ b/test/data/test_field.py
@@ -514,6 +514,9 @@ def test_build_vocab_from_dataset(self):
for c in expected:
assert c in CHARS.vocab.stoi
+ expected_freqs = Co... |
MongoEngine__mongoengine-2195 | Add alias argument in query_counter
The context_managers.query_counter constructor currently does not accept any arguments.
In my case, I define custom aliases and do not use the default one. When instantiating a query_counter, it calls get_db with no arguments which means that it tries to get the default alias, and... | [
{
"content": "from contextlib import contextmanager\n\nfrom pymongo.write_concern import WriteConcern\nfrom six import iteritems\n\nfrom mongoengine.common import _import_class\nfrom mongoengine.connection import DEFAULT_CONNECTION_NAME, get_db\nfrom mongoengine.pymongo_support import count_documents\n\n__all__... | [
{
"content": "from contextlib import contextmanager\n\nfrom pymongo.write_concern import WriteConcern\nfrom six import iteritems\n\nfrom mongoengine.common import _import_class\nfrom mongoengine.connection import DEFAULT_CONNECTION_NAME, get_db\nfrom mongoengine.pymongo_support import count_documents\n\n__all__... | diff --git a/mongoengine/context_managers.py b/mongoengine/context_managers.py
index d8dfeaac4..5920b724d 100644
--- a/mongoengine/context_managers.py
+++ b/mongoengine/context_managers.py
@@ -182,10 +182,10 @@ class query_counter(object):
- Some queries are ignored by default by the counter (killcursors, db.syste... |
AlexsLemonade__refinebio-1747 | API Stats include timestamp of last broken cache
### Context
Our database has a 10 minute cache.
### Problem or idea
It'd be nifty to be able to look at the stats endpoint response and figure out when it was last busted.
### Solution or next step
Include that timestamp.
| [
{
"content": "from datetime import timedelta, datetime\nimport requests\nimport nomad\nfrom typing import Dict\nfrom itertools import groupby\nfrom re import match\nfrom django.conf import settings\nfrom django.views.decorators.cache import cache_page\nfrom django.db.models import Count, Prefetch, DateTimeField... | [
{
"content": "from datetime import timedelta, datetime\nimport requests\nimport nomad\nfrom typing import Dict\nfrom itertools import groupby\nfrom re import match\nfrom django.conf import settings\nfrom django.views.decorators.cache import cache_page\nfrom django.db.models import Count, Prefetch, DateTimeField... | diff --git a/api/data_refinery_api/views.py b/api/data_refinery_api/views.py
index 044c74b76..21a730170 100644
--- a/api/data_refinery_api/views.py
+++ b/api/data_refinery_api/views.py
@@ -922,6 +922,7 @@ def get(self, request, version, format=None):
@classmethod
def calculate_stats(cls, range_param):
... |
pyqtgraph__pyqtgraph-1809 | Int conversion issues when showing plot grid
In '0.11.1.dev0' (and 0.11.1), the following code will issue an error:
```python
import pyqtgraph as pg
from warnings import simplefilter
simplefilter('error', DeprecationWarning)
pw = pg.PlotWindow()
pi = pw.plotItem
pi.showGrid(True, True, alpha=0.5)
# File "... | [
{
"content": "# -*- coding: utf-8 -*-\nimport importlib\nimport os\nimport warnings\nimport weakref\n\nimport numpy as np\n\nfrom ..AxisItem import AxisItem\nfrom ..ButtonItem import ButtonItem\nfrom ..GraphicsWidget import GraphicsWidget\nfrom ..InfiniteLine import InfiniteLine\nfrom ..LabelItem import LabelIt... | [
{
"content": "# -*- coding: utf-8 -*-\nimport importlib\nimport os\nimport warnings\nimport weakref\n\nimport numpy as np\n\nfrom ..AxisItem import AxisItem\nfrom ..ButtonItem import ButtonItem\nfrom ..GraphicsWidget import GraphicsWidget\nfrom ..InfiniteLine import InfiniteLine\nfrom ..LabelItem import LabelIt... | diff --git a/pyqtgraph/graphicsItems/PlotItem/PlotItem.py b/pyqtgraph/graphicsItems/PlotItem/PlotItem.py
index d13d194c22..8ecf9be754 100644
--- a/pyqtgraph/graphicsItems/PlotItem/PlotItem.py
+++ b/pyqtgraph/graphicsItems/PlotItem/PlotItem.py
@@ -373,8 +373,8 @@ def showGrid(self, x=None, y=None, alpha=None):
... |
getmoto__moto-2289 | DynamoDB query validation fails queries with leading newlines
This query:
```
q = """
SET
Metadata.subscription.event_history = list_append(
if_not_exists(Metadata.subscription.event_history, :empty_list),
:new_event_tuple),
UpdatedOn = :times... | [
{
"content": "from __future__ import unicode_literals\nimport json\nimport six\nimport re\n\nfrom moto.core.responses import BaseResponse\nfrom moto.core.utils import camelcase_to_underscores, amzn_request_id\nfrom .exceptions import InvalidIndexNameError\nfrom .models import dynamodb_backends, dynamo_json_dump... | [
{
"content": "from __future__ import unicode_literals\nimport json\nimport six\nimport re\n\nfrom moto.core.responses import BaseResponse\nfrom moto.core.utils import camelcase_to_underscores, amzn_request_id\nfrom .exceptions import InvalidIndexNameError\nfrom .models import dynamodb_backends, dynamo_json_dump... | diff --git a/moto/dynamodb2/responses.py b/moto/dynamodb2/responses.py
index 5dde432d5ead..e345d8861708 100644
--- a/moto/dynamodb2/responses.py
+++ b/moto/dynamodb2/responses.py
@@ -626,7 +626,7 @@ def update_item(self):
name = self.body['TableName']
key = self.body['Key']
return_values = se... |
pypi__warehouse-12439 | Updating the organization account name triggers an error
When the organization account name is updated, the update triggers an SQLAlchemy error.
To recreate the error-
- Click on 'Your organizations'
- Click on 'Manage' for a specific organization
- Click on 'Settings'
- Scroll to the bottom of the page and click on... | [
{
"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/warehouse/organizations/services.py b/warehouse/organizations/services.py
index 3b9326ce6e4d..20f0f83de51a 100644
--- a/warehouse/organizations/services.py
+++ b/warehouse/organizations/services.py
@@ -135,8 +135,19 @@ def add_catalog_entry(self, organization_id):
organization_id=organization.... |
kartoza__prj.app-766 | Duplicated Unapproved Certifying Orgs
There have been duplicate entries for some organizations showing up on the Unapproved Certifying Organisations page
[http://changelog.qgis.org/en/qgis/pending-certifyingorganisation/list/](url)
For example, there were duplicate CampToCamp and CampToCamp SA organizations.
Del... | [
{
"content": "# coding=utf-8\nfrom base.models import Project\nfrom django.contrib import messages\nfrom django.core.mail import send_mail\nfrom django.core.urlresolvers import reverse\nfrom django.shortcuts import get_object_or_404\nfrom django.db.models import Q\nfrom django.http import HttpResponse\nfrom dja... | [
{
"content": "# coding=utf-8\nfrom base.models import Project\nfrom django.contrib import messages\nfrom django.core.mail import send_mail\nfrom django.core.urlresolvers import reverse\nfrom django.shortcuts import get_object_or_404\nfrom django.db.models import Q\nfrom django.http import HttpResponse\nfrom dja... | diff --git a/django_project/certification/views/certifying_organisation.py b/django_project/certification/views/certifying_organisation.py
index 6dde2c9e6..e64e3fe1f 100644
--- a/django_project/certification/views/certifying_organisation.py
+++ b/django_project/certification/views/certifying_organisation.py
@@ -680,7 +... |
aio-libs__aiohttp-3442 | ContextVar support?
## Long story short
I am trying to check ContextVar integration with aiohttp. https://docs.python.org/3/library/contextvars.html#asyncio-support
ContextVar seems not deals well with aiohttp server... Am I doing something wrong?
## Expected behaviour
ContextVar should be different for each r... | [
{
"content": "import asyncio\nimport asyncio.streams\nimport traceback\nimport warnings\nfrom collections import deque\nfrom contextlib import suppress\nfrom html import escape as html_escape\nfrom logging import Logger\nfrom typing import (TYPE_CHECKING, Any, Awaitable, Callable, Optional, Type,\n ... | [
{
"content": "import asyncio\nimport asyncio.streams\nimport traceback\nimport warnings\nfrom collections import deque\nfrom contextlib import suppress\nfrom html import escape as html_escape\nfrom logging import Logger\nfrom typing import (TYPE_CHECKING, Any, Awaitable, Callable, Optional, Type,\n ... | diff --git a/CHANGES/3406.feature b/CHANGES/3406.feature
new file mode 100644
index 00000000000..c6ce99a386a
--- /dev/null
+++ b/CHANGES/3406.feature
@@ -0,0 +1 @@
+Create a task per request handling.
diff --git a/aiohttp/web_protocol.py b/aiohttp/web_protocol.py
index a47919f6738..0919f86277d 100644
--- a/aiohttp/web_... |
voicepaw__so-vits-svc-fork-250 | Crash when training cluster model
**Describe the bug**
Crash when training cluster model.
**To Reproduce**
conda activate so-vits-svc-fork
cd xxx
svc train-cluster
**Additional context**
Crash log:
Loading features from dataset\44k\yyy train_cluster.py:24
Training clusters: 100... | [
{
"content": "from __future__ import annotations\n\nfrom logging import getLogger\nfrom pathlib import Path\nfrom typing import Any\n\nimport numpy as np\nimport torch\nfrom cm_time import timer\nfrom joblib import Parallel, delayed\nfrom sklearn.cluster import KMeans, MiniBatchKMeans\nfrom tqdm_joblib import t... | [
{
"content": "from __future__ import annotations\n\nfrom logging import getLogger\nfrom pathlib import Path\nfrom typing import Any\n\nimport numpy as np\nimport torch\nfrom cm_time import timer\nfrom joblib import Parallel, delayed\nfrom sklearn.cluster import KMeans, MiniBatchKMeans\nfrom tqdm_joblib import t... | diff --git a/src/so_vits_svc_fork/cluster/train_cluster.py b/src/so_vits_svc_fork/cluster/train_cluster.py
index 4e7e5974..fe961eb6 100644
--- a/src/so_vits_svc_fork/cluster/train_cluster.py
+++ b/src/so_vits_svc_fork/cluster/train_cluster.py
@@ -24,8 +24,10 @@ def train_cluster(
LOG.info(f"Loading features from {... |
paperless-ngx__paperless-ngx-4773 | [BUG] /api/remote_version/ returns version 0.0.0
### Description
After upgrading to v2.0.1, the endpoint /api/remote_version/ does not return the expected version code (2.0.1).
The issue has also been reported by other users (see https://github.com/astubenbord/paperless-mobile/issues/314).
### Steps to reproduce
... | [
{
"content": "import itertools\nimport json\nimport logging\nimport os\nimport re\nimport tempfile\nimport urllib\nimport zipfile\nfrom datetime import datetime\nfrom pathlib import Path\nfrom time import mktime\nfrom unicodedata import normalize\nfrom urllib.parse import quote\n\nimport pathvalidate\nfrom djan... | [
{
"content": "import itertools\nimport json\nimport logging\nimport os\nimport re\nimport tempfile\nimport urllib\nimport zipfile\nfrom datetime import datetime\nfrom pathlib import Path\nfrom time import mktime\nfrom unicodedata import normalize\nfrom urllib.parse import quote\n\nimport pathvalidate\nfrom djan... | diff --git a/src/documents/views.py b/src/documents/views.py
index 386f8740441..92d37adf5bc 100644
--- a/src/documents/views.py
+++ b/src/documents/views.py
@@ -1158,8 +1158,8 @@ def get(self, request, format=None):
current_version = packaging_version.parse(version.__full_version_str__)
try:
... |
open-telemetry__opentelemetry-python-1545 | Jaeger Propagator not handling missing carrier
Python 3.8 / Flask injector 0.17b0
**Steps to reproduce**
If jaeger is the text map and you do not send a carrier header then the parser fails when it tries to parse the carrier header.
```python
if context is None:
context = get_current()
... | [
{
"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 97c15396cb5..9bed862e52f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,7 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v0.17b0...HEAD)
-=====... |
pytorch__vision-4966 | QuantizableMobileNetV3 Can not load pretrained model
### 🐛 Describe the bug
```python
import torchvision
quantized = torchvision.models.quantization.mobilenet_v3_large(pretrained=True)
```
It will occur
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/conda/lib/pytho... | [
{
"content": "from typing import Any, List, Optional\n\nimport torch\nfrom torch import nn, Tensor\nfrom torch.quantization import QuantStub, DeQuantStub, fuse_modules\n\nfrom ..._internally_replaced_utils import load_state_dict_from_url\nfrom ...ops.misc import ConvNormActivation, SqueezeExcitation\nfrom ..mob... | [
{
"content": "from typing import Any, List, Optional\n\nimport torch\nfrom torch import nn, Tensor\nfrom torch.quantization import QuantStub, DeQuantStub, fuse_modules\n\nfrom ..._internally_replaced_utils import load_state_dict_from_url\nfrom ...ops.misc import ConvNormActivation, SqueezeExcitation\nfrom ..mob... | diff --git a/torchvision/models/quantization/mobilenetv3.py b/torchvision/models/quantization/mobilenetv3.py
index 948b72ead7d..6eaa9114d74 100644
--- a/torchvision/models/quantization/mobilenetv3.py
+++ b/torchvision/models/quantization/mobilenetv3.py
@@ -43,7 +43,7 @@ def _load_from_state_dict(
):
versi... |
cloudtools__troposphere-1595 | wafv2.py IPSet - Error with Addresses property
First of all, thanks to everyone who maintains this repo - Troposphere is a Great tool!
In the master branch, I came across a problem with wafv2.py when creating an IPSet. It generates the Addresses property with the IPAddresses property which includes a list of CIDR... | [
{
"content": "# Copyright (c) 2012-2019, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, AWSProperty, Tags\nfrom .validators import boolean, integer\n\n\nVALID_TRANSFORMATION_TYPES = (\n 'CMD_LINE', 'COMPRESS_WHITE_SPACE', 'HTML_ENTITY_DE... | [
{
"content": "# Copyright (c) 2012-2019, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, AWSProperty, Tags\nfrom .validators import boolean, integer\n\n\nVALID_TRANSFORMATION_TYPES = (\n 'CMD_LINE', 'COMPRESS_WHITE_SPACE', 'HTML_ENTITY_DE... | diff --git a/troposphere/wafv2.py b/troposphere/wafv2.py
index 5635a948c..a494681f1 100644
--- a/troposphere/wafv2.py
+++ b/troposphere/wafv2.py
@@ -410,17 +410,11 @@ class WebACL(AWSObject):
}
-class IPAddresses(AWSProperty):
- props = {
- 'IPAddresses': ([basestring], False)
- }
-
-
class IPSet... |
modin-project__modin-4937 | ``Series.pop()`` doesn`t work correctly at MODIN_STORAGE_FORMAT=omnisci
When I run:
```
import modin.pandas as pd
from modin.pandas.test.utils import test_data_values
import modin.config as cfg
cfg.StorageFormat.put('omnisci')
data = test_data_values[0]
modin_series = pd.Series(data[next(iter(data.keys()))])
... | [
{
"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ... | [
{
"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ... | diff --git a/modin/experimental/core/execution/native/implementations/hdk_on_native/test/test_dataframe.py b/modin/experimental/core/execution/native/implementations/hdk_on_native/test/test_dataframe.py
index f75038fa049..561d3a89117 100644
--- a/modin/experimental/core/execution/native/implementations/hdk_on_native/te... |
bids-standard__pybids-95 | BIDSLayout.get_nearest_helper() does not anticipate absent 'type' entity
Happens with openfmri ds000002 due to contained derivatives:
```
File "/home/mih/.local/lib/python2.7/site-packages/bids/grabbids/bids_layout.py", line 45, in get_metadata
potentialJSONs = self.get_nearest_helper(path, '.json', **kwargs... | [
{
"content": "import os\nimport json\nimport collections\n\nfrom io import open\n\nfrom os.path import dirname\nfrom os.path import abspath\nfrom os.path import join as pathjoin\n\nfrom .bids_validator import BIDSValidator\nfrom grabbit import Layout\n\n__all__ = ['BIDSLayout']\n\n\nclass BIDSLayout(Layout):\n\... | [
{
"content": "import os\nimport json\nimport collections\n\nfrom io import open\n\nfrom os.path import dirname\nfrom os.path import abspath\nfrom os.path import join as pathjoin\n\nfrom .bids_validator import BIDSValidator\nfrom grabbit import Layout\n\n__all__ = ['BIDSLayout']\n\n\nclass BIDSLayout(Layout):\n\... | diff --git a/bids/grabbids/bids_layout.py b/bids/grabbids/bids_layout.py
index b2b277301..64f0dc373 100644
--- a/bids/grabbids/bids_layout.py
+++ b/bids/grabbids/bids_layout.py
@@ -62,7 +62,11 @@ def _get_nearest_helper(self, path, extension, type=None, **kwargs):
"BIDS project." % path)
if ... |
larq__larq-446 | CaseOptimizer should throw if optimizer matches no variable
### Feature motivation
We are changing the default behaviour of Bop in #442. If users are not careful this could lead to hard to debug errors when no variable matches any optimizer.
### Feature description
We should throw if one optimizer in used by `Case... | [
{
"content": "\"\"\"Neural networks with extremely low-precision weights and activations, such as\nBinarized Neural Networks (BNNs), usually contain a mix of low-precision weights (e.g.\n1-bit) and higher-precision weights (e.g. 8-bit, 16-bit, or 32-bit). Examples of this\ninclude the first and last layers of ... | [
{
"content": "\"\"\"Neural networks with extremely low-precision weights and activations, such as\nBinarized Neural Networks (BNNs), usually contain a mix of low-precision weights (e.g.\n1-bit) and higher-precision weights (e.g. 8-bit, 16-bit, or 32-bit). Examples of this\ninclude the first and last layers of ... | diff --git a/larq/optimizers.py b/larq/optimizers.py
index 461887a9..33058428 100644
--- a/larq/optimizers.py
+++ b/larq/optimizers.py
@@ -210,6 +210,13 @@ def _compute_var_opt_mapping(self, grads_and_vars):
f"No `default_optimizer` provided to train variable `{var}`."
)
... |
pyqtgraph__pyqtgraph-1660 | pip installation of pyqtgraph 0.12.0 does not bundle colors/maps directory
<!-- In the following, please describe your issue in detail! -->
<!-- If some of the sections do not apply, just remove them. -->
### Short description
<!-- This should summarize the issue. -->
In a pip install of pyqtgraph 0.12.0, the c... | [
{
"content": "# -*- coding: utf-8 -*-\nDESCRIPTION = \"\"\"\\\nPyQtGraph is a pure-python graphics and GUI library built on PyQt5/PySide2 and\nnumpy. \n\nIt is intended for use in mathematics / scientific / engineering applications.\nDespite being written entirely in python, the library is very fast due to its\... | [
{
"content": "# -*- coding: utf-8 -*-\nDESCRIPTION = \"\"\"\\\nPyQtGraph is a pure-python graphics and GUI library built on PyQt5/PySide2 and\nnumpy. \n\nIt is intended for use in mathematics / scientific / engineering applications.\nDespite being written entirely in python, the library is very fast due to its\... | diff --git a/setup.py b/setup.py
index 8f328f9a58..6656bb970b 100644
--- a/setup.py
+++ b/setup.py
@@ -140,6 +140,7 @@ def run(self):
package_dir={'pyqtgraph.examples': 'examples'}, ## install examples along with the rest of the source
package_data={'pyqtgraph.examples': ['optics/*.gz', 'relativity/presets/*... |
acl-org__acl-anthology-433 | Create shortened volume links
@mjpost https://aclweb.org/anthology/volumes/sem-2012-the-first-joint-conference-on-lexical-and-computational-semantics-volume-1-proceedings-of-the-main-conference-and-the-shared-task-and-volume-2-proceedings-of-the-sixth-international-workshop-on-semantic-evaluation-semeval-2012/
The U... | [
{
"content": "#!/usr/bin/env python3\n# -*- 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# ... | [
{
"content": "#!/usr/bin/env python3\n# -*- 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# ... | diff --git a/bin/create_hugo_pages.py b/bin/create_hugo_pages.py
index 272347b6f0..846a044c51 100755
--- a/bin/create_hugo_pages.py
+++ b/bin/create_hugo_pages.py
@@ -113,7 +113,12 @@ def create_volumes(srcdir, clean=False):
{
"anthology_id": anthology_id,
"tit... |
mit-ll-responsible-ai__hydra-zen-115 | hydra_partial=True and hydra_recursive=False should be permitted
Thanks to #110 we don't need to rely on recursive instantiation to implement `hydra_partial=True` anymore. I.e. we can get rid of:
https://github.com/mit-ll-responsible-ai/hydra-zen/blob/5f48f4b0c408a8a25ed8d5c2aa66b2316e9d8118/src/hydra_zen/structure... | [
{
"content": "# Copyright (c) 2021 Massachusetts Institute of Technology\n# SPDX-License-Identifier: MIT\nimport inspect\nimport warnings\nfrom collections import defaultdict\nfrom dataclasses import Field, dataclass, field, fields, is_dataclass, make_dataclass\nfrom functools import wraps\nfrom itertools impor... | [
{
"content": "# Copyright (c) 2021 Massachusetts Institute of Technology\n# SPDX-License-Identifier: MIT\nimport inspect\nimport warnings\nfrom collections import defaultdict\nfrom dataclasses import Field, dataclass, field, fields, is_dataclass, make_dataclass\nfrom functools import wraps\nfrom itertools impor... | diff --git a/src/hydra_zen/structured_configs/_implementations.py b/src/hydra_zen/structured_configs/_implementations.py
index 5bddae309..0b06ce47b 100644
--- a/src/hydra_zen/structured_configs/_implementations.py
+++ b/src/hydra_zen/structured_configs/_implementations.py
@@ -681,12 +681,6 @@ def builds(
if any(no... |
huggingface__text-generation-inference-13 | Causal LM modifies the input when returning text
One of the issues if that Causal LM returns the entire `input + generated_text`. And `input` is actually `tokenizer.decoder(tokenizer.encode(input))`. The issue comes when that process is lossy, and causes weird behaviours such as this https://huggingface.co/bigscience/b... | [
{
"content": "import torch\n\nfrom dataclasses import dataclass\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\nfrom typing import Optional, Tuple, List, Type\n\nfrom text_generation.models import Model\nfrom text_generation.models.types import GeneratedText\nfrom text_generation.pb import genera... | [
{
"content": "import torch\n\nfrom dataclasses import dataclass\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\nfrom typing import Optional, Tuple, List, Type\n\nfrom text_generation.models import Model\nfrom text_generation.models.types import GeneratedText\nfrom text_generation.pb import genera... | diff --git a/server/text_generation/models/causal_lm.py b/server/text_generation/models/causal_lm.py
index 3ad362191ec..b352eb6bb5c 100644
--- a/server/text_generation/models/causal_lm.py
+++ b/server/text_generation/models/causal_lm.py
@@ -354,7 +354,8 @@ def generate_token(
if stop:
# De... |
wemake-services__wemake-django-template-699 | Default site URL announced by docker should not be trusted
Docker on start announces `Starting development server at http://0.0.0.0:8000/`. It is wrong and it is available under http://127.0.0.1:8000/. This should be reflected somewhere in documentation.
| [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThis file contains all the settings that defines the development server.\n\nSECURITY WARNING: don't run with debug turned on in production!\n\"\"\"\n\nimport logging\nfrom typing import List\n\nfrom server.settings.components.common import INSTALLED_APPS, MIDDLEW... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThis file contains all the settings that defines the development server.\n\nSECURITY WARNING: don't run with debug turned on in production!\n\"\"\"\n\nimport logging\nfrom typing import List\n\nfrom server.settings.components.common import INSTALLED_APPS, MIDDLEW... | diff --git a/{{cookiecutter.project_name}}/server/settings/environments/development.py b/{{cookiecutter.project_name}}/server/settings/environments/development.py
index 1f90555f5..c119dc1fe 100644
--- a/{{cookiecutter.project_name}}/server/settings/environments/development.py
+++ b/{{cookiecutter.project_name}}/server/... |
deepset-ai__haystack-582 | Whitespace removal during preprocessing
When splitting documents into passages based on wordcount and respecting sentence boundary we are missing a whitespace between sentences.
| [
{
"content": "import logging\nimport re\nfrom copy import deepcopy\nfrom functools import partial, reduce\nfrom itertools import chain\nfrom typing import List, Optional, Generator, Set\n\nimport nltk\nfrom more_itertools import windowed\n\nfrom haystack.preprocessor.base import BasePreProcessor\n\nlogger = log... | [
{
"content": "import logging\nimport re\nfrom copy import deepcopy\nfrom functools import partial, reduce\nfrom itertools import chain\nfrom typing import List, Optional, Generator, Set\n\nimport nltk\nfrom more_itertools import windowed\n\nfrom haystack.preprocessor.base import BasePreProcessor\n\nlogger = log... | diff --git a/haystack/preprocessor/preprocessor.py b/haystack/preprocessor/preprocessor.py
index 8b5fa8e0d3..a782276664 100644
--- a/haystack/preprocessor/preprocessor.py
+++ b/haystack/preprocessor/preprocessor.py
@@ -100,8 +100,10 @@ def split(self, document: dict) -> List[dict]:
text_splits.appe... |
pre-commit__pre-commit-2029 | `check-useless-excludes` meta hook doesn't seem to work well with broken symlinks
Repro steps
1. Add a submodule
2. Add a symlink to somewhere inside this submodule
3. Use `check-symlinks`
4. Deinit submodule (to simulate the case when people clone without `--recursive`)
4. Notice that it now complains about the s... | [
{
"content": "import argparse\nimport re\nfrom typing import Optional\nfrom typing import Sequence\n\nfrom cfgv import apply_defaults\n\nimport pre_commit.constants as C\nfrom pre_commit import git\nfrom pre_commit.clientlib import load_config\nfrom pre_commit.clientlib import MANIFEST_HOOK_DICT\nfrom pre_commi... | [
{
"content": "import argparse\nimport re\nfrom typing import Optional\nfrom typing import Sequence\n\nfrom cfgv import apply_defaults\n\nimport pre_commit.constants as C\nfrom pre_commit import git\nfrom pre_commit.clientlib import load_config\nfrom pre_commit.clientlib import MANIFEST_HOOK_DICT\nfrom pre_commi... | diff --git a/pre_commit/meta_hooks/check_useless_excludes.py b/pre_commit/meta_hooks/check_useless_excludes.py
index 12be03f8a..61165973f 100644
--- a/pre_commit/meta_hooks/check_useless_excludes.py
+++ b/pre_commit/meta_hooks/check_useless_excludes.py
@@ -43,6 +43,9 @@ def check_useless_excludes(config_file: str) -> i... |
bridgecrewio__checkov-4819 | Custom policy not checking Bicep file
**Describe the issue**
I'm currently testing Checkov for use with Bicep and ARM templates. Checks for the built in policies work fine for both ARM & Bicep so far. But I'm seeing some problems when I create a simple custom policy and scanning Bicep.
It's only PoC at present, so ... | [
{
"content": "from __future__ import annotations\n\nimport logging\nfrom typing import Dict, Any, List, Optional, Type, TYPE_CHECKING\n\nfrom checkov.common.checks_infra.solvers import (\n EqualsAttributeSolver,\n NotEqualsAttributeSolver,\n RegexMatchAttributeSolver,\n NotRegexMatchAttributeSolver,... | [
{
"content": "from __future__ import annotations\n\nimport logging\nfrom typing import Dict, Any, List, Optional, Type, TYPE_CHECKING\n\nfrom checkov.common.checks_infra.solvers import (\n EqualsAttributeSolver,\n NotEqualsAttributeSolver,\n RegexMatchAttributeSolver,\n NotRegexMatchAttributeSolver,... | diff --git a/checkov/common/checks_infra/checks_parser.py b/checkov/common/checks_infra/checks_parser.py
index 3792516fca..95fb23780e 100644
--- a/checkov/common/checks_infra/checks_parser.py
+++ b/checkov/common/checks_infra/checks_parser.py
@@ -228,6 +228,9 @@ def _parse_raw_check(self, raw_check: Dict[str, Any], res... |
cal-itp__benefits-1770 | Parameterize database path and deletion
## Background
Currently, the `bin/init.sh` script deletes and then recreates (via Django's `manage.py` helpers) the Sqlite database file every time it is called. This happens both during local development and in the Azure app service -- `bin/init.sh` is called during the [app ... | [
{
"content": "\"\"\"\nDjango settings for benefits project.\n\"\"\"\nimport os\nfrom benefits import sentry\n\n\ndef _filter_empty(ls):\n return [s for s in ls if s]\n\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file... | [
{
"content": "\"\"\"\nDjango settings for benefits project.\n\"\"\"\nimport os\n\nfrom benefits import sentry\n\n\ndef _filter_empty(ls):\n return [s for s in ls if s]\n\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__fi... | diff --git a/benefits/settings.py b/benefits/settings.py
index 0d274c0930..fbd9e7e014 100644
--- a/benefits/settings.py
+++ b/benefits/settings.py
@@ -2,6 +2,7 @@
Django settings for benefits project.
"""
import os
+
from benefits import sentry
@@ -147,10 +148,11 @@ def _filter_empty(ls):
WSGI_APPLICATION = ... |
chainer__chainer-7760 | Refactor utility link in optimizer_hooks unit tests
`chainer_tests/optimizer_hooks_tests` uses similar dummy links, which can be refactored to reduce repetition.
| [
{
"content": "import chainer\nfrom chainer import backend\n\n\nclass GradientHardClipping(object):\n\n \"\"\"Optimizer/UpdateRule hook function for gradient clipping.\n\n This hook function clips all gradient arrays to be within a lower and upper\n bound.\n\n Args:\n lower_bound (float): The ... | [
{
"content": "import chainer\nfrom chainer import backend\n\n\nclass GradientHardClipping(object):\n\n \"\"\"Optimizer/UpdateRule hook function for gradient clipping.\n\n This hook function clips all gradient arrays to be within a lower and upper\n bound.\n\n Args:\n lower_bound (float): The ... | diff --git a/chainer/optimizer_hooks/gradient_hard_clipping.py b/chainer/optimizer_hooks/gradient_hard_clipping.py
index ba120eb9f87a..893fe979e736 100644
--- a/chainer/optimizer_hooks/gradient_hard_clipping.py
+++ b/chainer/optimizer_hooks/gradient_hard_clipping.py
@@ -52,7 +52,7 @@ def __call__(self, rule, param):
... |
django-oscar__django-oscar-2174 | Error on "incentive" step of the offer wizard
When creating offer through the offer wizard and on the second step, "Incentive", select "range" and "type" but do not fill in "value" it gives next exception:
```python
Traceback (most recent call last):
File "/Users/a1/projects/djangooscar/env3/lib/python3.5/site-p... | [
{
"content": "import itertools\nimport operator\nimport os\nimport re\nfrom decimal import Decimal as D\nfrom decimal import ROUND_DOWN\n\nfrom django.conf import settings\nfrom django.core import exceptions\nfrom django.core.urlresolvers import reverse\nfrom django.db import models\nfrom django.db.models.query... | [
{
"content": "import itertools\nimport operator\nimport os\nimport re\nfrom decimal import Decimal as D\nfrom decimal import ROUND_DOWN\n\nfrom django.conf import settings\nfrom django.core import exceptions\nfrom django.core.urlresolvers import reverse\nfrom django.db import models\nfrom django.db.models.query... | diff --git a/src/oscar/apps/offer/abstract_models.py b/src/oscar/apps/offer/abstract_models.py
index 4b56ec82ad3..a53aefd082f 100644
--- a/src/oscar/apps/offer/abstract_models.py
+++ b/src/oscar/apps/offer/abstract_models.py
@@ -512,6 +512,9 @@ def clean_percentage(self):
if not self.range:
raise ... |
shuup__shuup-212 | Pages availability is confusing and missing date pickers
I created a page and set it `Visible in menu`. The "from" and "to" fields don't have date pickers and I thought they would be optional anyway, seems logical to me as saving works without filling them.
My page didn't appear in shop side. I then went back and manu... | [
{
"content": "# -*- coding: utf-8 -*-\n# This file is part of Shoop.\n#\n# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.\n#\n# This source code is licensed under the AGPLv3 license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom bootstrap3.renderers import FormRenderer... | [
{
"content": "# -*- coding: utf-8 -*-\n# This file is part of Shoop.\n#\n# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.\n#\n# This source code is licensed under the AGPLv3 license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom bootstrap3.renderers import FormRenderer... | diff --git a/shoop/admin/gulp_bits/js-packages.js b/shoop/admin/gulp_bits/js-packages.js
index be1e1a02a4..b13e7a050d 100644
--- a/shoop/admin/gulp_bits/js-packages.js
+++ b/shoop/admin/gulp_bits/js-packages.js
@@ -27,7 +27,8 @@ module.exports = {
"js/content-blocks.js",
"js/remarkable-field.j... |
wagtail__wagtail-11487 | Copying a page with a generated unique field raises a ValidationError
### Issue Summary
I have a Page model, that has a unique UUID field in it. When I'm trying to copy such a page, I receive a ValidationError saying "this Uuid already exists".
To be specific, at first, it's getting copied as a draft just fine... | [
{
"content": "import logging\nimport uuid\n\nfrom django.core.exceptions import PermissionDenied\nfrom modelcluster.models import get_all_child_relations\n\nfrom wagtail.log_actions import log\nfrom wagtail.models.copying import _copy, _copy_m2m_relations\nfrom wagtail.models.i18n import TranslatableMixin\nfrom... | [
{
"content": "import logging\nimport uuid\n\nfrom django.core.exceptions import PermissionDenied\nfrom modelcluster.models import get_all_child_relations\n\nfrom wagtail.log_actions import log\nfrom wagtail.models.copying import _copy, _copy_m2m_relations\nfrom wagtail.models.i18n import TranslatableMixin\nfrom... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 3a2af9d33f41..8f81f0dd5eaa 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -80,6 +80,7 @@ Changelog
* Fix: Ensure the panel anchor button sizes meet accessibility guidelines for minimum dimensions (Nandini Arora)
* Fix: Raise a 404 for bulk actions for models which... |
aio-libs__aiohttp-3819 | TooManyRedirects is not properly exposed publicly
## Description
https://github.com/aio-libs/aiohttp/commit/544716cf93b3856e485c8e993de60d9911c002cb (#2943) added `TooManyRedirects` and added it as `aiohttp.TooManyRedirects` [in the documentation](https://docs.aiohttp.org/en/latest/client_reference.html#aiohttp.TooM... | [
{
"content": "__version__ = '4.0.0a0'\n\nfrom typing import Tuple # noqa\n\nfrom . import hdrs\nfrom .client import (\n BaseConnector,\n ClientConnectionError,\n ClientConnectorCertificateError,\n ClientConnectorError,\n ClientConnectorSSLError,\n ClientError,\n ClientHttpProxyError,\n ... | [
{
"content": "__version__ = '4.0.0a0'\n\nfrom typing import Tuple # noqa\n\nfrom . import hdrs\nfrom .client import (\n BaseConnector,\n ClientConnectionError,\n ClientConnectorCertificateError,\n ClientConnectorError,\n ClientConnectorSSLError,\n ClientError,\n ClientHttpProxyError,\n ... | diff --git a/CHANGES/3818.bugfix b/CHANGES/3818.bugfix
new file mode 100644
index 00000000000..4c130def923
--- /dev/null
+++ b/CHANGES/3818.bugfix
@@ -0,0 +1 @@
+Properly expose TooManyRedirects publicly as documented.
diff --git a/aiohttp/__init__.py b/aiohttp/__init__.py
index 52ece7895ce..829bd57384a 100644
--- a/ai... |
vyperlang__vyper-2877 | accessing codesize on struct member throws AttributeError: 'Attribute' object has no attribute 'id'
### Version Information
* vyper Version (output of `vyper --version`): 0.3.3
* OS: osx
* Python Version (output of `python --version`): Python 3.8.2
### What's your issue about?
Please include information like... | [
{
"content": "import decimal\nimport math\n\nfrom vyper import ast as vy_ast\nfrom vyper.address_space import DATA, IMMUTABLES, MEMORY, STORAGE\nfrom vyper.codegen import external_call, self_call\nfrom vyper.codegen.core import (\n clamp,\n clamp_basetype,\n ensure_in_memory,\n get_dyn_array_count,\... | [
{
"content": "import decimal\nimport math\n\nfrom vyper import ast as vy_ast\nfrom vyper.address_space import DATA, IMMUTABLES, MEMORY, STORAGE\nfrom vyper.codegen import external_call, self_call\nfrom vyper.codegen.core import (\n clamp,\n clamp_basetype,\n ensure_in_memory,\n get_dyn_array_count,\... | diff --git a/tests/parser/syntax/test_code_size.py b/tests/parser/syntax/test_code_size.py
index 40a478a732..6105154812 100644
--- a/tests/parser/syntax/test_code_size.py
+++ b/tests/parser/syntax/test_code_size.py
@@ -32,6 +32,15 @@ def foo() -> uint256:
def foo() -> uint256:
return self.codesize
""",
+ ... |
wemake-services__wemake-python-styleguide-2343 | WPS472 only detecting one pure variable assignment
### What's wrong
WPS472 detects `name, *_ = get_address()`.
When it comes to slightly more complex value assignments, it does not work:
1. `names[0], *_ = get_address()`
2. `self.name, *_ = get_address()`
3. `(name, street), *_ = get_address()`
Also when ex... | [
{
"content": "import ast\nfrom typing import List, Union\n\nfrom wemake_python_styleguide.logic import nodes\nfrom wemake_python_styleguide.logic.naming import access\n\n_VarDefinition = Union[ast.AST, ast.expr]\n_LocalVariable = Union[ast.Name, ast.ExceptHandler]\n\n\ndef get_variable_name(node: _LocalVariable... | [
{
"content": "import ast\nfrom typing import List, Union\n\nfrom wemake_python_styleguide.logic import nodes\nfrom wemake_python_styleguide.logic.naming import access\n\n_VarDefinition = Union[ast.AST, ast.expr]\n_LocalVariable = Union[ast.Name, ast.ExceptHandler]\n\n\ndef get_variable_name(node: _LocalVariable... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18a9a8d76..0a94351c3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,7 @@ Semantic versioning in our case means:
### Bugfixes
- Fixes crash on `'Literal["raise"]'` annotation #2341
+- Fixes `WPS471` was not detected on complex assignment targets #2301
##... |
Lightning-AI__torchmetrics-1303 | SpearmanCorrCoef has unnecessary explicit dtype check
## 🐛 Bug
If you're running a model with `torch.cuda.amp.autocast` to `bf16`, you may have model outputs in `bf16` and labels in `fp32`, and then run `metric.compute()` outside of the autocast. Everything works completely fine for most (perhaps all other?) metrics,... | [
{
"content": "# Copyright The PyTorch 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 ... | [
{
"content": "# Copyright The PyTorch 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 ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 53afc6761e4..b95c4d551d2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -46,6 +46,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed precision problems when `structural_similarity_index_measure` was used with autocast ([#1291](h... |
spyder-ide__spyder-21481 | Unchecking Display variables and attributes in outline does not work
<!--- **PLEASE READ:** When submitting here, please ensure you've completed the following checklist and checked the boxes to confirm. Issue reports without it may be closed. Thanks! --->
### Issue Report Checklist
* [x] Searched the [issues page... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"Outline explorer widgets.\"\"\"\n\n# Standard library imports\nimport bisect\nimport logging\nimport os.path as osp\nimport uuid\n\n... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"Outline explorer widgets.\"\"\"\n\n# Standard library imports\nimport bisect\nimport logging\nimport os.path as osp\nimport uuid\n\n... | diff --git a/spyder/plugins/outlineexplorer/tests/test_widgets.py b/spyder/plugins/outlineexplorer/tests/test_widgets.py
index 54ab7d741d3..637fe6c5df4 100644
--- a/spyder/plugins/outlineexplorer/tests/test_widgets.py
+++ b/spyder/plugins/outlineexplorer/tests/test_widgets.py
@@ -217,6 +217,37 @@ def test_go_to_last_it... |
mesonbuild__meson-9023 | `subprojects purge` should not follow symbolic links
**Describe the bug**
`meson subprojects purge` currently follows symbolic links. That is, if `subprojects/foo` is a symbolic link to `/home/reimu/git/foo`, then `meson subprojects purge` will offer to delete the actual `/home/reimu/git/foo` directory instead of the ... | [
{
"content": "import os, subprocess\nimport argparse\nimport asyncio\nimport threading\nimport copy\nimport shutil\nfrom concurrent.futures.thread import ThreadPoolExecutor\nfrom pathlib import Path\nimport typing as T\n\nfrom . import mlog\nfrom .mesonlib import quiet_git, GitException, Popen_safe, MesonExcept... | [
{
"content": "import os, subprocess\nimport argparse\nimport asyncio\nimport threading\nimport copy\nimport shutil\nfrom concurrent.futures.thread import ThreadPoolExecutor\nfrom pathlib import Path\nimport typing as T\n\nfrom . import mlog\nfrom .mesonlib import quiet_git, GitException, Popen_safe, MesonExcept... | diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py
index 269f0feba9df..ea42b2433028 100755
--- a/mesonbuild/msubprojects.py
+++ b/mesonbuild/msubprojects.py
@@ -430,7 +430,10 @@ def purge(self) -> bool:
except FileNotFoundError:
pass
- subproject_source_dir = Pat... |
OBOFoundry__OBOFoundry.github.io-1980 | OBO prefix map should include prefixes of obsolete ontologies
I think OBO prefix map should contain prefixes of obsolete ontologies. Sometimes, like [here](https://github.com/OBOFoundry/OBOFoundry.github.io/pull/1974/files) one ontology is merged into another, with identifiers and all - it would still be useful to be a... | [
{
"content": "#!/usr/bin/env python3\n\nimport csv\nimport sys\nfrom argparse import ArgumentParser\n\nimport yaml\n\n\ndef main(args):\n \"\"\"\n Takes ontologies.yml file and makes a triple file with SHACL prefixes.\n\n For example, for uberon it will generate:\n\n [ sh:prefix \"UBERON\" ; sh:... | [
{
"content": "#!/usr/bin/env python3\n\nimport csv\nimport sys\nfrom argparse import ArgumentParser\n\nimport yaml\n\n\ndef main(args):\n \"\"\"\n Takes ontologies.yml file and makes a triple file with SHACL prefixes.\n\n For example, for uberon it will generate:\n\n [ sh:prefix \"UBERON\" ; sh:... | diff --git a/util/make-shacl-prefixes.py b/util/make-shacl-prefixes.py
index 9edb30eb3..312cfff5b 100755
--- a/util/make-shacl-prefixes.py
+++ b/util/make-shacl-prefixes.py
@@ -43,8 +43,9 @@ def main(args):
print(" sh:declare")
sep = ""
for ont in data["ontologies"]:
- if ont.get("is_obsolete", Fa... |
microsoft__Qcodes-443 | hdf5 formatter crashed for simple dataset
A minimal example:
```
import qcodes
import qcodes.tests.data_mocks
from qcodes.data.hdf5_format import HDF5Format
qcodes.DataSet.default_formatter = HDF5Format()
alldata=qcodes.tests.data_mocks.DataSet2D()
alldata.metadata={'a': ['hi', 'there'] }
alldata.write(... | [
{
"content": "import numpy as np\nimport logging\nimport h5py\nimport os\n\nfrom .data_array import DataArray\nfrom .format import Formatter\n\n\nclass HDF5Format(Formatter):\n \"\"\"\n HDF5 formatter for saving qcodes datasets.\n\n Capable of storing (write) and recovering (read) qcodes datasets.\n ... | [
{
"content": "import numpy as np\nimport logging\nimport h5py\nimport os\n\nfrom .data_array import DataArray\nfrom .format import Formatter\n\n\nclass HDF5Format(Formatter):\n \"\"\"\n HDF5 formatter for saving qcodes datasets.\n\n Capable of storing (write) and recovering (read) qcodes datasets.\n ... | diff --git a/qcodes/data/hdf5_format.py b/qcodes/data/hdf5_format.py
index b11ef93414f..4ccd31fc367 100644
--- a/qcodes/data/hdf5_format.py
+++ b/qcodes/data/hdf5_format.py
@@ -280,6 +280,7 @@ def write_dict_to_hdf5(self, data_dict, entry_point):
elif isinstance(item[0], str):
... |
tobymao__sqlglot-3522 | Support for X-prefixed Hex Strings in Databricks
```python
import sqlglot
print(
sqlglot.parse_one(
"SELECT X'1A2F'",
dialect="databricks",
).sql("databricks")
)
```
Docs: https://docs.databricks.com/en/sql/language-manual/data-types/binary-type.html
| [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.dialects.dialect import (\n binary_from_function,\n build_formatted_time,\n is_parse_json,\n pivot_column_names,\n rename_func,\n trim_sql,\n unit_to_str,\n)\nfrom sql... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.dialects.dialect import (\n binary_from_function,\n build_formatted_time,\n is_parse_json,\n pivot_column_names,\n rename_func,\n trim_sql,\n unit_to_str,\n)\nfrom sql... | diff --git a/sqlglot/dialects/databricks.py b/sqlglot/dialects/databricks.py
index 6a39939ce1..deddb6e138 100644
--- a/sqlglot/dialects/databricks.py
+++ b/sqlglot/dialects/databricks.py
@@ -88,6 +88,3 @@ def generatedasidentitycolumnconstraint_sql(
) -> str:
expression.set("this", True) # trigge... |
ivy-llc__ivy-19512 | f
numpy.random.f function
| [
{
"content": "# local\nimport ivy\nfrom ivy.functional.frontends.numpy.func_wrapper import (\n to_ivy_arrays_and_back,\n from_zero_dim_arrays_to_scalar,\n)\n\n\n@to_ivy_arrays_and_back\n@from_zero_dim_arrays_to_scalar\ndef random_sample(size=None):\n return ivy.random_uniform(low=0.0, high=1.0, shape=s... | [
{
"content": "# local\nimport ivy\nfrom ivy.functional.frontends.numpy.func_wrapper import (\n to_ivy_arrays_and_back,\n from_zero_dim_arrays_to_scalar,\n)\n\n\n@to_ivy_arrays_and_back\n@from_zero_dim_arrays_to_scalar\ndef random_sample(size=None):\n return ivy.random_uniform(low=0.0, high=1.0, shape=s... | diff --git a/ivy/functional/frontends/numpy/random/functions.py b/ivy/functional/frontends/numpy/random/functions.py
index 16217f59e3ebb..55598ad7c4b91 100644
--- a/ivy/functional/frontends/numpy/random/functions.py
+++ b/ivy/functional/frontends/numpy/random/functions.py
@@ -185,6 +185,17 @@ def gumbel(loc=0.0, scale=... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.