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 ⌀ |
|---|---|---|---|---|
ibis-project__ibis-5304 | feat: add py.typed marker to allow packages using ibis to benefit from ibis's type annotations
### Is your feature request related to a problem?
I'm trying to run mypy against a package that uses Ibis, but I get some errors. For example:
```
bigframes/series.py:8: error: Skipping analyzing "ibis.expr.types": modul... | [
{
"content": "from __future__ import annotations\n\nimport abc\nimport collections.abc\nimport functools\nimport importlib.metadata\nimport keyword\nimport re\nimport sys\nimport urllib.parse\nfrom pathlib import Path\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n ClassVar,\n Iterabl... | [
{
"content": "from __future__ import annotations\n\nimport abc\nimport collections.abc\nimport functools\nimport importlib.metadata\nimport keyword\nimport re\nimport sys\nimport urllib.parse\nfrom pathlib import Path\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n ClassVar,\n Iterabl... | diff --git a/ibis/backends/base/__init__.py b/ibis/backends/base/__init__.py
index 8b5fc07692df..7c98b3269334 100644
--- a/ibis/backends/base/__init__.py
+++ b/ibis/backends/base/__init__.py
@@ -510,6 +510,23 @@ def list_tables(
The list of the table names that match the pattern `like`.
"""
+ ... |
django-oscar__django-oscar-1047 | Allow non-oscar dashboard application
After @maikhoepfel fixing of dashboard navigation, Oscar do not accept dashboard applications that are not in Oscar.
Example: If my project has a dashboard application for managing a blog (not part of Oscar), I'll get the following error:
```
ImproperlyConfigured: Please follow O... | [
{
"content": "import sys\nimport traceback\n\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.db.models import get_model\n\n\nclass AppNotFoundError(Exception):\n pass\n\n\nclass ClassNotFoundError(Exception):\n pass\n\n\ndef get_class(module_label, c... | [
{
"content": "import sys\nimport traceback\n\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.db.models import get_model\n\n\nclass AppNotFoundError(Exception):\n pass\n\n\nclass ClassNotFoundError(Exception):\n pass\n\n\ndef get_class(module_label, c... | diff --git a/oscar/core/loading.py b/oscar/core/loading.py
index 6129f7e09e0..6d7a08e859b 100644
--- a/oscar/core/loading.py
+++ b/oscar/core/loading.py
@@ -73,7 +73,11 @@ class can't be found in the overriding module, then we attempt to import it
# Module not in local app
imported_local_module = {}
... |
pre-commit__pre-commit-578 | nodeenv try to download non existing tar.gz prebuilt under Cygwin
Hi,
Strange issue: I suspect a recent change broke this as it used to work last week, on another Windows computer with Cygwin.
Bug reproduction: `pre-commit run` using e.g. https://github.com/Lucas-C/pre-commit-hooks-html v1.1.0
`pre-commit` exe... | [
{
"content": "from __future__ import unicode_literals\n\nimport contextlib\nimport os\nimport sys\n\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import Var\nfrom pre_commit.languages import helpers\nfrom pre_commit.util import clean_path_on_failure\nfrom pre_commit.xargs import xarg... | [
{
"content": "from __future__ import unicode_literals\n\nimport contextlib\nimport os\nimport sys\n\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import Var\nfrom pre_commit.languages import helpers\nfrom pre_commit.util import clean_path_on_failure\nfrom pre_commit.xargs import xarg... | diff --git a/pre_commit/languages/node.py b/pre_commit/languages/node.py
index 69378b068..58922672b 100644
--- a/pre_commit/languages/node.py
+++ b/pre_commit/languages/node.py
@@ -17,10 +17,11 @@
def get_env_patch(venv): # pragma: windows no cover
+ config = os.path.join(venv, 'bin') if sys.platform == 'cygwi... |
automl__auto-sklearn-567 | Something strange about the code in method load_ensemble
I have checked the code and find something strange in file backend, method load_ensemble.
line 387, sort result seems like this in the picture

pick the l... | [
{
"content": "import glob\nimport os\nimport tempfile\nimport time\nimport random\nimport lockfile\nimport numpy as np\nimport pickle\nimport shutil\nfrom autosklearn.util import logging_ as logging\n\n\n__all__ = [\n 'Backend'\n]\n\n\ndef create(temporary_directory,\n output_directory,\n ... | [
{
"content": "import glob\nimport os\nimport tempfile\nimport time\nimport random\nimport lockfile\nimport numpy as np\nimport pickle\nimport shutil\nfrom autosklearn.util import logging_ as logging\n\n\n__all__ = [\n 'Backend'\n]\n\n\ndef create(temporary_directory,\n output_directory,\n ... | diff --git a/autosklearn/util/backend.py b/autosklearn/util/backend.py
index 52ac678762..c59adbde5c 100644
--- a/autosklearn/util/backend.py
+++ b/autosklearn/util/backend.py
@@ -407,9 +407,10 @@ def save_ensemble(self, ensemble, idx, seed):
except Exception:
pass
- filepath = os.path.joi... |
mozmeao__snippets-service-818 | ASR Snippet Admin: Be able to search for a snippet by Snippet ID in top search bar on list view page
Currently the search bar only allows for searching keywords.
| [
{
"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 f075bab90..2e555d414 100644
--- a/snippets/base/admin/adminmodels.py
+++ b/snippets/base/admin/adminmodels.py
@@ -130,6 +130,9 @@ class ASRSnippetAdmin(admin.ModelAdmin):
)
search_fields = (
'name',
+ 'i... |
encode__starlette-1346 | Cannot define a custom HEAD handler in HTTPEndpoint
### Checklist
<!-- Please make sure you check all these items before submitting your bug report. -->
- [x] The bug is reproducible against the latest release and/or `master`.
- [x] There are no similar issues or pull requests to fix it yet.
### Describe the ... | [
{
"content": "import asyncio\nimport json\nimport typing\n\nfrom starlette import status\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.exceptions import HTTPException\nfrom starlette.requests import Request\nfrom starlette.responses import PlainTextResponse, Response\nfrom starlette.types... | [
{
"content": "import asyncio\nimport json\nimport typing\n\nfrom starlette import status\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.exceptions import HTTPException\nfrom starlette.requests import Request\nfrom starlette.responses import PlainTextResponse, Response\nfrom starlette.types... | diff --git a/starlette/endpoints.py b/starlette/endpoints.py
index 2504dd84d..e0b7be8de 100644
--- a/starlette/endpoints.py
+++ b/starlette/endpoints.py
@@ -23,7 +23,12 @@ def __await__(self) -> typing.Generator:
async def dispatch(self) -> None:
request = Request(self.scope, receive=self.receive)
- ... |
tensorflow__addons-1878 | Documentation: Focal loss example misleading
In the example of the focal loss (`tfa.losses.SigmoidFocalCrossEntropy`) the label and the prediction data seems to be swapped.
This is misleading as `sigmoid_focal_crossentropy()` expects `y_true, y_pred`, whereas the example presents `y_pred, y_true`.
https://github.c... | [
{
"content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | [
{
"content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | diff --git a/tensorflow_addons/losses/focal_loss.py b/tensorflow_addons/losses/focal_loss.py
index b42c3f241d..973bfccb1f 100644
--- a/tensorflow_addons/losses/focal_loss.py
+++ b/tensorflow_addons/losses/focal_loss.py
@@ -40,11 +40,11 @@ class SigmoidFocalCrossEntropy(LossFunctionWrapper):
```python
fl = tfa... |
pytorch__vision-3591 | This may be has extra "as"
https://github.com/pytorch/vision/blob/631ff9123edeedf044c4355ef99dc42a396feb5b/torchvision/models/detection/transform.py#L87
| [
{
"content": "import math\nimport torch\nfrom torch import nn, Tensor\nfrom torch.nn import functional as F\nimport torchvision\nfrom typing import List, Tuple, Dict, Optional\n\nfrom .image_list import ImageList\nfrom .roi_heads import paste_masks_in_image\n\n\n@torch.jit.unused\ndef _resize_image_and_masks_on... | [
{
"content": "import math\nimport torch\nfrom torch import nn, Tensor\nfrom torch.nn import functional as F\nimport torchvision\nfrom typing import List, Tuple, Dict, Optional\n\nfrom .image_list import ImageList\nfrom .roi_heads import paste_masks_in_image\n\n\n@torch.jit.unused\ndef _resize_image_and_masks_on... | diff --git a/torchvision/models/detection/transform.py b/torchvision/models/detection/transform.py
index 215005637eb..5e962f4bad9 100644
--- a/torchvision/models/detection/transform.py
+++ b/torchvision/models/detection/transform.py
@@ -84,7 +84,7 @@ def forward(self,
if targets is not None:
# mak... |
Qiskit__qiskit-7071 | QNSPSA produces irreproducible results
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Information
- **Qiskit Terra version**: qiskit-terra 0.17.0
- **Python version**: ... | [
{
"content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2021.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any ... | [
{
"content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2021.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any ... | diff --git a/qiskit/algorithms/optimizers/qnspsa.py b/qiskit/algorithms/optimizers/qnspsa.py
index 53031946ffc5..572758582ecc 100644
--- a/qiskit/algorithms/optimizers/qnspsa.py
+++ b/qiskit/algorithms/optimizers/qnspsa.py
@@ -44,6 +44,12 @@ class QNSPSA(SPSA):
increasing the number of ``resamplings``. This leads ... |
comic__grand-challenge.org-3075 | Additional metrics buttons are displayed even when there are no additional metrics
<img width="442" alt="Screenshot 2023-09-14 at 16 29 41" src="https://github.com/comic/grand-challenge.org/assets/12661555/aeef3926-ed8d-458c-9d86-7b266ef38301">
https://surgtoolloc23.grand-challenge.org/evaluation/final-testing-phase... | [
{
"content": "from datetime import datetime\n\nfrom dateutil.relativedelta import relativedelta\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.messages.views import SuccessMessageMixin\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db.models impo... | [
{
"content": "from datetime import datetime\n\nfrom dateutil.relativedelta import relativedelta\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.messages.views import SuccessMessageMixin\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db.models impo... | diff --git a/app/grandchallenge/evaluation/views/__init__.py b/app/grandchallenge/evaluation/views/__init__.py
index 4ebc39b52e..59c7f9a852 100644
--- a/app/grandchallenge/evaluation/views/__init__.py
+++ b/app/grandchallenge/evaluation/views/__init__.py
@@ -742,7 +742,7 @@ def get_context_data(self, *args, **kwargs):
... |
zestedesavoir__zds-site-3807 | [beta][v20] L'api des notifications renvoie que les notifs non lues
Serveur : Beta
Version : v20/6bb2f75
Système : Mac OS X
Navigateur : 52.0.2743.116 (64-bit)
---
1. Récupérez vos notifications depuis l'API
2. Constatez que le serveur renvoie uniquement les notifs non lues.
| [
{
"content": "# coding: utf-8\nfrom dry_rest_permissions.generics import DRYPermissions\nfrom rest_framework import filters\nfrom rest_framework.generics import ListAPIView\nfrom rest_framework.permissions import IsAuthenticated\nfrom rest_framework_extensions.cache.decorators import cache_response\nfrom rest_f... | [
{
"content": "# coding: utf-8\nfrom dry_rest_permissions.generics import DRYPermissions\nfrom rest_framework import filters\nfrom rest_framework.generics import ListAPIView\nfrom rest_framework.permissions import IsAuthenticated\nfrom rest_framework_extensions.cache.decorators import cache_response\nfrom rest_f... | diff --git a/zds/notification/api/tests.py b/zds/notification/api/tests.py
index 29b6a36b0f..580f92b204 100644
--- a/zds/notification/api/tests.py
+++ b/zds/notification/api/tests.py
@@ -10,6 +10,7 @@
from zds.member.api.tests import create_oauth2_client, authenticate_client
from zds.member.factories import ProfileFa... |
Lightning-AI__torchmetrics-1427 | Metric base class does not check for extra kwargs
## 🐛 Bug
The `Metric` base class does not check for extra kwargs [here](https://github.com/Lightning-AI/metrics/blob/bc057d495703aff5c4d8d671c54060e08a677142/src/torchmetrics/metric.py#L94-L120).
Users can currently do something like `torchmetrics.MeanMetric(foo=Tr... | [
{
"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 cb72712bde8..8659c9acb57 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed `update_count` and `update_called` from private to public methods ([#1370](https://github.com... |
sbi-dev__sbi-915 | links not working on getting started page
https://sbi-dev.github.io/sbi/tutorial/00_getting_started/
broken link: https://www.mackelab.org/sbi/tutorial/02_flexible_interface/
possible solution: links not updated to new website?
| [
{
"content": "# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed\n# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.\n\nfrom abc import ABC, abstractmethod\nfrom copy import deepcopy\nfrom datetime import datetime\nfrom pathlib import Path\nfrom... | [
{
"content": "# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed\n# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.\n\nfrom abc import ABC, abstractmethod\nfrom copy import deepcopy\nfrom datetime import datetime\nfrom pathlib import Path\nfrom... | diff --git a/codemeta.json b/codemeta.json
index f292f0305..186449028 100644
--- a/codemeta.json
+++ b/codemeta.json
@@ -56,7 +56,7 @@
],
"citation": "https://doi.org/10.21105/joss.02505",
"relatedLink": [
- "https://www.mackelab.org/sbi/"
+ "https://sbi-dev.github.io/sbi/"
],
"co... |
pwndbg__pwndbg-531 | GOT command returns wrong addresses
Running on latest dev version
Issue found running binary with PIE enabled, ASLR disabled, NO RELRO
Running the `got` command returns wrong addresses for the GOT.
I think it may have something to do with there only being two mapped regions for the binary, rather than 3 as usual. ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nReading, writing, and describing memory.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport os\nfrom builtins import bytes... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nReading, writing, and describing memory.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport os\nfrom builtins import bytes... | diff --git a/pwndbg/commands/got.py b/pwndbg/commands/got.py
index 92b1f438957..cef30791326 100644
--- a/pwndbg/commands/got.py
+++ b/pwndbg/commands/got.py
@@ -33,7 +33,7 @@ def got(name_filter=''):
return
if "PIE enabled" in pie_status:
- bin_text_base = pwndbg.memory.page_align(pwndbg.elf.entr... |
pydantic__pydantic-3216 | Throw descriptive exception for incorrectly defined validator fields.
### Discussed in https://github.com/samuelcolvin/pydantic/discussions/3129
<div type='discussions-op-text'>
<sup>Originally posted by **SunsetOrange** August 24, 2021</sup>
I had been trying to locate a bug in my code for an hour or so, which ... | [
{
"content": "import warnings\nfrom collections import ChainMap\nfrom functools import wraps\nfrom itertools import chain\nfrom types import FunctionType\nfrom typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, Type, Union, overload\n\nfrom .errors import ConfigError\nfrom .... | [
{
"content": "import warnings\nfrom collections import ChainMap\nfrom functools import wraps\nfrom itertools import chain\nfrom types import FunctionType\nfrom typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, Type, Union, overload\n\nfrom .errors import ConfigError\nfrom .... | diff --git a/changes/3215-SunsetOrange.md b/changes/3215-SunsetOrange.md
new file mode 100644
index 00000000000..dbcf23dfa12
--- /dev/null
+++ b/changes/3215-SunsetOrange.md
@@ -0,0 +1 @@
+Raise an explicit `ConfigError` when multiple fields are incorrectly set for a single validator
\ No newline at end of file
diff --... |
crytic__slither-400 | Slither misses some obvious dependency relations
```
pragma solidity ^0.4.24;
contract SlitherBug {
uint256 rID_;
bool public activated_ = false;
modifier isHuman() {
require(msg.sender == tx.origin, "sorry humans only");
_;
}
// Function not vulnerable to re-entrancy attack
... | [
{
"content": "\"\"\"\n Compute the data depenency between all the SSA variables\n\"\"\"\nfrom slither.core.declarations import (Contract, Enum, Function,\n SolidityFunction, SolidityVariable,\n SolidityVariableComposed, Structure)\nf... | [
{
"content": "\"\"\"\n Compute the data depenency between all the SSA variables\n\"\"\"\nfrom slither.core.declarations import (Contract, Enum, Function,\n SolidityFunction, SolidityVariable,\n SolidityVariableComposed, Structure)\nf... | diff --git a/slither/analyses/data_dependency/data_dependency.py b/slither/analyses/data_dependency/data_dependency.py
index e9f6f2c68d..288bb63b7c 100644
--- a/slither/analyses/data_dependency/data_dependency.py
+++ b/slither/analyses/data_dependency/data_dependency.py
@@ -114,8 +114,8 @@ def get_dependencies(variable... |
django-wiki__django-wiki-655 | 404 on initital user create with /wiki
Python Version: 3.5.2
Django version: 1.10
Wiki version: 0.2.4
Wiki URL's are configured to direct to /wiki as indicated in the installation instructions.
When a user goes to the wiki and creates an account, they are able to successfully, at which point they are directed t... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport inspect\nimport os\nimport sys\n\nfrom django.utils.html import strip_tags\nfrom django.utils.encoding import force_text\n\nfrom datetime import datetime\n\n#\n# django-wiki documentation bu... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport inspect\nimport os\nimport sys\n\nfrom django.utils.html import strip_tags\nfrom django.utils.encoding import force_text\n\nfrom datetime import datetime\n\n#\n# django-wiki documentation bu... | diff --git a/docs/conf.py b/docs/conf.py
index 775a2b52e..bf9ced40e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -213,7 +213,7 @@ def setup(app):
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file ... |
cupy__cupy-1181 | cupy.einsum('->', scalar) fails
numpy allows it.
```
>>> import cupy
>>> cupy.einsum('->', cupy.ones(()))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/kataoka/.pyenv/versions/anaconda3-4.2.0/envs/n/lib/python3.6/site-packages/cupy/linalg/einsum.py", line 271, in einsum
... | [
{
"content": "import collections\nimport re\nimport string\n\nimport numpy\nimport six\n\nimport cupy\n\n\ndef calc_single_view(ioperand, subscript):\n \"\"\"Calculates 'ii->i' by cupy.diagonal if needed.\n\n Args:\n ioperand (cupy.ndarray): Array to be calculated diagonal.\n subscript (str)... | [
{
"content": "import collections\nimport re\nimport string\n\nimport numpy\nimport six\n\nimport cupy\n\n\ndef calc_single_view(ioperand, subscript):\n \"\"\"Calculates 'ii->i' by cupy.diagonal if needed.\n\n Args:\n ioperand (cupy.ndarray): Array to be calculated diagonal.\n subscript (str)... | diff --git a/cupy/linalg/einsum.py b/cupy/linalg/einsum.py
index 5e7de5cda33..ba9a5426b6d 100644
--- a/cupy/linalg/einsum.py
+++ b/cupy/linalg/einsum.py
@@ -266,7 +266,7 @@ def einsum(*operands):
raise ValueError('einstein sum subscripts string contains a \'.\' that'
'is not part of a... |
scipy__scipy-13198 | affine_transform complains about output_shape when output array is provided
This works
``` python
>>> affine_transform(np.array([1., 2., 3.]), (0.5,), output_shape=(5,), order=1)
array([ 1. , 1.5, 2., 2.5, 3. ])
```
This does not.
``` python
>>> out = np.zeros(5)
>>> affine_transform(np.array([1.,2.,3.]), (0.5,), ... | [
{
"content": "# Copyright (C) 2003-2005 Peter J. Verveer\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the above copyright\n# notice, this list of c... | [
{
"content": "# Copyright (C) 2003-2005 Peter J. Verveer\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the above copyright\n# notice, this list of c... | diff --git a/scipy/ndimage/interpolation.py b/scipy/ndimage/interpolation.py
index 2e85cdfeb7dd..d4a6c3e91940 100644
--- a/scipy/ndimage/interpolation.py
+++ b/scipy/ndimage/interpolation.py
@@ -543,7 +543,10 @@ def affine_transform(input, matrix, offset=0.0, output_shape=None,
raise RuntimeError('spline order... |
mesonbuild__meson-9561 | Require parallel tools when depending on HDF5
I have an application that specifically requires the availability of `h5pcc` instead of `h5cc`: https://github.com/mesonbuild/meson/blob/39ceb677744e1f959a0db6406d51a26d78f0ab68/mesonbuild/dependencies/hdf5.py#L97-L99
In my case HDF5 is only build with parallel compatibi... | [
{
"content": "# Copyright 2013-2019 The Meson development 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 req... | [
{
"content": "# Copyright 2013-2019 The Meson development 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 req... | diff --git a/mesonbuild/dependencies/hdf5.py b/mesonbuild/dependencies/hdf5.py
index 9687b36933ce..78ef9d683a79 100644
--- a/mesonbuild/dependencies/hdf5.py
+++ b/mesonbuild/dependencies/hdf5.py
@@ -96,13 +96,13 @@ def __init__(self, name: str, environment: 'Environment', kwargs: T.Dict[str, T.
if language =... |
ibis-project__ibis-5261 | bug: order_by() with non-existent column does not error
### What happened?
I would expect order_by(DNE) to fail. But instead it silently gives me back the original unsorted table:
```python
import ibis
import pandas as pd
df = pd.DataFrame({"x": [3,1,2]})
t = ibis.memtable(df)
t.order_by("bogus")
┏━━━━━━━┓
... | [
{
"content": "from __future__ import annotations\n\nimport builtins\nimport enum\nimport operator\nfrom itertools import product, starmap\n\nfrom public import public\n\nimport ibis.common.exceptions as com\nimport ibis.expr.datatypes as dt\nimport ibis.expr.schema as sch\nimport ibis.expr.types as ir\nfrom ibi... | [
{
"content": "from __future__ import annotations\n\nimport builtins\nimport enum\nimport operator\nfrom itertools import product, starmap\n\nfrom public import public\n\nimport ibis.common.exceptions as com\nimport ibis.expr.datatypes as dt\nimport ibis.expr.schema as sch\nimport ibis.expr.types as ir\nfrom ibi... | diff --git a/ibis/expr/rules.py b/ibis/expr/rules.py
index d40700edfc40..61aeb30cd29b 100644
--- a/ibis/expr/rules.py
+++ b/ibis/expr/rules.py
@@ -134,11 +134,16 @@ def sort_key_from(table_ref, key, **kwargs):
else:
key, order = key, True
- key = one_of(
- (function_of(table_ref), column_from(... |
jupyterhub__zero-to-jupyterhub-k8s-793 | Should allow spawning single-user container with extra resources like nvidia.com/gpu
In our case, the GPU is a necessary resource, but the current version doesn't support requesting GPU or other non-built-in resources.
I made a patch to solve this issue, see details in my pr: #793, it was tested and running on our p... | [
{
"content": "import os\nimport glob\nfrom tornado.httpclient import AsyncHTTPClient\nfrom kubernetes import client\n\nfrom z2jh import get_config, get_secret, set_config_if_not_none\n\n# Configure JupyterHub to use the curl backend for making HTTP requests,\n# rather than the pure-python implementations. The d... | [
{
"content": "import os\nimport glob\nfrom tornado.httpclient import AsyncHTTPClient\nfrom kubernetes import client\n\nfrom z2jh import get_config, get_secret, set_config_if_not_none\n\n# Configure JupyterHub to use the curl backend for making HTTP requests,\n# rather than the pure-python implementations. The d... | diff --git a/images/hub/jupyterhub_config.py b/images/hub/jupyterhub_config.py
index 6f7cae23ea..400f7736e1 100644
--- a/images/hub/jupyterhub_config.py
+++ b/images/hub/jupyterhub_config.py
@@ -125,6 +125,8 @@
c.KubeSpawner.mem_guarantee = get_config('singleuser.memory.guarantee')
c.KubeSpawner.cpu_limit = get_confi... |
microsoft__Qcodes-2492 | Functionality-breaking typo in ATS9870 clock source
### Steps to reproduce
1. Under [instrument_drivers/AlazarTech/ATS9870.py](https://github.com/QCoDeS/Qcodes/blob/14bd3deb20f7d21639e463b77598aa2c1ba8edab/qcodes/instrument_drivers/AlazarTech/ATS9870.py) the clock_source parameter has a value mapping. It lists `EXTERN... | [
{
"content": "from typing import Any\n\nfrom qcodes.utils import validators\n\nfrom .ATS import AlazarTech_ATS\nfrom .utils import TraceParameter\n\n\nclass AlazarTech_ATS9870(AlazarTech_ATS):\n \"\"\"\n This class is the driver for the ATS9870 board\n it inherits from the ATS base class\n\n It crea... | [
{
"content": "from typing import Any\n\nfrom qcodes.utils import validators\n\nfrom .ATS import AlazarTech_ATS\nfrom .utils import TraceParameter\n\n\nclass AlazarTech_ATS9870(AlazarTech_ATS):\n \"\"\"\n This class is the driver for the ATS9870 board\n it inherits from the ATS base class\n\n It crea... | diff --git a/docs/examples/writing_drivers/Creating-Instrument-Drivers.ipynb b/docs/examples/writing_drivers/Creating-Instrument-Drivers.ipynb
index b563095b542..1ee9368322f 100644
--- a/docs/examples/writing_drivers/Creating-Instrument-Drivers.ipynb
+++ b/docs/examples/writing_drivers/Creating-Instrument-Drivers.ipynb... |
python-poetry__poetry-3660 | 1.1.3 regression. poetry exports wrong constraints
<!--
Hi there! Thank you for discovering and submitting an issue.
Before you submit this; let's make sure of a few things.
Please make sure the following boxes are ticked if they are correct.
If not, please try and fulfill these first.
-->
<!-- Checke... | [
{
"content": "import json\nimport logging\nimport os\nimport re\n\nfrom copy import deepcopy\nfrom hashlib import sha256\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\nfrom typing import Dict\nfrom typing import Iterable\nfrom typing import Iterator\nfrom typing import List\nfrom typing import Opt... | [
{
"content": "import json\nimport logging\nimport os\nimport re\n\nfrom copy import deepcopy\nfrom hashlib import sha256\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\nfrom typing import Dict\nfrom typing import Iterable\nfrom typing import Iterator\nfrom typing import List\nfrom typing import Opt... | diff --git a/poetry/packages/locker.py b/poetry/packages/locker.py
index 48d68e950ac..f06d36d6caf 100644
--- a/poetry/packages/locker.py
+++ b/poetry/packages/locker.py
@@ -269,9 +269,9 @@ def __walk_dependency_level(
if key not in nested_dependencies:
nested_dependencies[key] = requiremen... |
nvaccess__nvda-9814 | App module handler/system tests: "does app module exist" function throws attribute error if invoked from system test spy
Hi,
First of several major issues for system tests:
### Steps to reproduce:
1. Check out Python 3 staging branch.
2. Apply fixes such as basestring to str.
3. Run system tests (scons systemT... | [
{
"content": "# -*- coding: UTF-8 -*-\r\n#config/__init__.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#Copyright (C) 2006-2018 NV Access Limited, Aleksey Sadovoy, Peter Vágner, Rui Batista, Zahari Yurukov, Joseph Lee, Babbage B.V.\r\n#This file is covered by the GNU General Public License.\r\n#See the f... | [
{
"content": "# -*- coding: UTF-8 -*-\r\n#config/__init__.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#Copyright (C) 2006-2018 NV Access Limited, Aleksey Sadovoy, Peter Vágner, Rui Batista, Zahari Yurukov, Joseph Lee, Babbage B.V.\r\n#This file is covered by the GNU General Public License.\r\n#See the f... | diff --git a/source/config/__init__.py b/source/config/__init__.py
index 034c95facba..5b3dd533150 100644
--- a/source/config/__init__.py
+++ b/source/config/__init__.py
@@ -338,6 +338,9 @@ def addConfigDirsToPythonPackagePath(module, subdir=None):
if not subdir:
subdir = module.__name__
fullPath=os.path.join(g... |
PyGithub__PyGithub-963 | PaginatedList.totalCount is broken when there are 0 results
Self-contained test:
```
from github import Github
github = Github()
repos = github.search_repositories('shouldreturn0repos')
assert repos.totalCount == 0
```
The `totalCount` method has this code:
```
def totalCount(self):
if not s... | [
{
"content": "# -*- coding: utf-8 -*-\n\n############################ Copyrights and license ############################\n# #\n# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #\n# Copyright 2012 Zearin <... | [
{
"content": "# -*- coding: utf-8 -*-\n\n############################ Copyrights and license ############################\n# #\n# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #\n# Copyright 2012 Zearin <... | diff --git a/github/PaginatedList.py b/github/PaginatedList.py
index 586b4a8ed7..3de289f6fb 100644
--- a/github/PaginatedList.py
+++ b/github/PaginatedList.py
@@ -155,7 +155,12 @@ def totalCount(self):
headers=self.__headers
)
if 'link' not in headers:
- self.__... |
cal-itp__benefits-1611 | MultiValueDictKeyError: 'language'
Sentry Issue: (https://sentry.calitp.org/organizations/sentry/issues/69523/?referrer=github_integration)
```
KeyError: 'language'
File "django/utils/datastructures.py", line 84, in __getitem__
list_ = super().__getitem__(key)
MultiValueDictKeyError: 'language'
File "benefits... | [
{
"content": "\"\"\"\nThe core application: middleware definitions for request/response cycle.\n\"\"\"\nimport logging\n\nfrom django.conf import settings\nfrom django.http import HttpResponse\nfrom django.shortcuts import redirect\nfrom django.template.response import TemplateResponse\nfrom django.urls import ... | [
{
"content": "\"\"\"\nThe core application: middleware definitions for request/response cycle.\n\"\"\"\nimport logging\n\nfrom django.conf import settings\nfrom django.http import HttpResponse\nfrom django.shortcuts import redirect\nfrom django.template.response import TemplateResponse\nfrom django.urls import ... | diff --git a/benefits/core/middleware.py b/benefits/core/middleware.py
index 4be52dff79..73f59ea394 100644
--- a/benefits/core/middleware.py
+++ b/benefits/core/middleware.py
@@ -115,9 +115,12 @@ class ChangedLanguageEvent(MiddlewareMixin):
def process_view(self, request, view_func, view_args, view_kwargs):
... |
Mailu__Mailu-1885 | Postfix no longer starts correctly in kubernetes
## Environment & Versions
### Environment
- [ ] docker-compose
- [X] kubernetes
- [ ] docker swarm
### Versions
1.8
## Description
After installing mailu 1.8 via helm on Kubernetes, the `mailu-postfix` container runs but never reaches a healthy state and s... | [
{
"content": "#!/usr/bin/python3\n\nimport os\nimport glob\nimport shutil\nimport multiprocessing\nimport logging as log\nimport sys\n\nfrom podop import run_server\nfrom socrate import system, conf\n\nlog.basicConfig(stream=sys.stderr, level=os.environ.get(\"LOG_LEVEL\", \"WARNING\"))\n\ndef start_podop():\n... | [
{
"content": "#!/usr/bin/python3\n\nimport os\nimport glob\nimport shutil\nimport multiprocessing\nimport logging as log\nimport sys\n\nfrom podop import run_server\nfrom socrate import system, conf\n\nlog.basicConfig(stream=sys.stderr, level=os.environ.get(\"LOG_LEVEL\", \"WARNING\"))\n\ndef start_podop():\n... | diff --git a/core/postfix/start.py b/core/postfix/start.py
index 701efec39..7a2b57a1d 100755
--- a/core/postfix/start.py
+++ b/core/postfix/start.py
@@ -38,7 +38,11 @@ def is_valid_postconf_line(line):
os.environ["LMTP_ADDRESS"] = system.get_host_address_from_environment("LMTP", "imap:2525")
os.environ["OUTCLEAN"] = ... |
jazzband__pip-tools-1075 | Remove "(line X)" annotations from output
#### What's the problem this feature will solve?
I love the new source annotations in 4.5.0 from #1058. But the line number annotations cause unnecessary diff churn. For example on a project I'm working on, I added a couple requirements that are alphabetically early, and it ... | [
{
"content": "from __future__ import unicode_literals\n\nimport os\nfrom itertools import chain\n\nimport six\n\nfrom .click import unstyle\nfrom .logging import log\nfrom .utils import (\n UNSAFE_PACKAGES,\n comment,\n dedup,\n format_requirement,\n get_compile_command,\n key_from_ireq,\n)\n\... | [
{
"content": "from __future__ import unicode_literals\n\nimport os\nimport re\nfrom itertools import chain\n\nimport six\n\nfrom .click import unstyle\nfrom .logging import log\nfrom .utils import (\n UNSAFE_PACKAGES,\n comment,\n dedup,\n format_requirement,\n get_compile_command,\n key_from_... | diff --git a/README.rst b/README.rst
index 60a9e9b7f..7e9571660 100644
--- a/README.rst
+++ b/README.rst
@@ -114,7 +114,7 @@ Now, run ``pip-compile requirements.in``:
# pip-compile requirements.in
#
asgiref==3.2.3 # via django
- django==3.0.3 # via -r requirements.in (line 1)... |
huggingface__transformers-193 | pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py error
attributeError: 'BertForPreTraining' object has no attribute 'global_step'
| [
{
"content": "# coding=utf-8\n# Copyright 2018 The HugginFace Inc. 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#\... | [
{
"content": "# coding=utf-8\n# Copyright 2018 The HugginFace Inc. 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#\... | diff --git a/pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py b/pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py
index 120624bc1b49..1ff6c073e329 100755
--- a/pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py
+++ b/pytorch_pretrained_bert/convert_tf_checkpoint_to_pytorch.py
@@ -50,7 +50,... |
conan-io__conan-center-index-298 | [package] boost/1.71.0: test_package uses non-existent option to trigger boost_python test
### Package and Environment Details (include every applicable attribute)
* Package Name/Version: **boost/1.71.0**
* Operating System+version: **All**
* Compiler+version: **All**
* Docker image: **All**
* Conan vers... | [
{
"content": "from conans import ConanFile\nfrom conans import tools\nfrom conans.client.build.cppstd_flags import cppstd_flag\nfrom conans.model.version import Version\nfrom conans.errors import ConanException\n\nimport os\nimport sys\nimport shutil\n\ntry:\n from cStringIO import StringIO\nexcept ImportErr... | [
{
"content": "from conans import ConanFile\nfrom conans import tools\nfrom conans.client.build.cppstd_flags import cppstd_flag\nfrom conans.model.version import Version\nfrom conans.errors import ConanException\n\nimport os\nimport sys\nimport shutil\n\ntry:\n from cStringIO import StringIO\nexcept ImportErr... | diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py
index dd189902d0e7b..c0946aa10e778 100644
--- a/recipes/boost/all/conanfile.py
+++ b/recipes/boost/all/conanfile.py
@@ -30,7 +30,6 @@ class BoostConan(ConanFile):
description = "Boost provides free peer-reviewed portable C++ source librar... |
numba__numba-1852 | Numba nopython mode returns incorrect results
Python version: '3.5.1 |Continuum Analytics, Inc.| (default, Dec 7 2015, 11:16:01) \n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]'
Numba version: 0.25.0
I'm experiencing some errors with numba - below is an MRE.
This code (without jit)
``` python
from pylab import *
from num... | [
{
"content": "from __future__ import print_function\n\nfrom collections import namedtuple, defaultdict\nimport copy\nimport os\nimport sys\n\nimport numpy\n\nfrom llvmlite import ir as llvmir\nimport llvmlite.llvmpy.core as lc\nfrom llvmlite.llvmpy.core import Type, Constant, LLVMException\nimport llvmlite.bind... | [
{
"content": "from __future__ import print_function\n\nfrom collections import namedtuple, defaultdict\nimport copy\nimport os\nimport sys\n\nimport numpy\n\nfrom llvmlite import ir as llvmir\nimport llvmlite.llvmpy.core as lc\nfrom llvmlite.llvmpy.core import Type, Constant, LLVMException\nimport llvmlite.bind... | diff --git a/numba/targets/base.py b/numba/targets/base.py
index a92cfa29dec..fbbe7eaa4d7 100644
--- a/numba/targets/base.py
+++ b/numba/targets/base.py
@@ -791,7 +791,9 @@ def make_constant_array(self, builder, typ, ary):
# Handle data: reify the flattened array in "C" order as a
# global array of by... |
comic__grand-challenge.org-581 | CKEditor Image upload makes the GUI undismissable
The browser keeps the changed fields state after the image is uploaded, and for some reason we're unable to dismiss the gui.
| [
{
"content": "from django.conf import settings\nfrom django.conf.urls import include\nfrom django.contrib import admin\nfrom django.template.response import TemplateResponse\nfrom django.urls import re_path, path\nfrom django.views.generic import TemplateView, RedirectView\n\nfrom grandchallenge.core.views impo... | [
{
"content": "from django.conf import settings\nfrom django.conf.urls import include\nfrom django.contrib import admin\nfrom django.template.response import TemplateResponse\nfrom django.urls import re_path, path\nfrom django.views.generic import TemplateView, RedirectView\n\nfrom grandchallenge.core.views impo... | diff --git a/Pipfile b/Pipfile
index 405ee0d880..ba52c6cbdc 100644
--- a/Pipfile
+++ b/Pipfile
@@ -18,7 +18,7 @@ pyupgrade = "*"
"beautifulsoup4" = "*"
celery = "*"
redis = "*"
-django = "<2.1"
+django = "<2.2"
django-countries = "*"
django-crispy-forms = "*"
django-userena-ce = "*"
@@ -31,7 +31,7 @@ python-memca... |
onnx__sklearn-onnx-598 | saving model works with binary classifier, fails with multiclass classifier
I am using Sklearn's SVC for a classifier, with TfidfVectorizer as the feature embedding method. Following #478 I am using `skl2onnx` version 1.7.1. My code is here:
```
from sklearn.feature_extraction.text import TfidfVectorizer
from skl... | [
{
"content": "# Modified file from\n# https://github.com/onnx/onnx/blob/master/onnx/helper.py.\nimport collections\nimport numbers\n\nfrom onnx import (\n TensorProto, AttributeProto,\n NodeProto, GraphProto\n)\nfrom onnx.helper import ( # noqa\n make_tensor, make_model, make_graph, _to_bytes_or_false... | [
{
"content": "# Modified file from\n# https://github.com/onnx/onnx/blob/master/onnx/helper.py.\nimport collections\nimport numbers\n\nfrom onnx import (\n TensorProto, AttributeProto,\n NodeProto, GraphProto\n)\nfrom onnx.helper import ( # noqa\n make_tensor, make_model, make_graph, _to_bytes_or_false... | diff --git a/skl2onnx/proto/onnx_helper_modified.py b/skl2onnx/proto/onnx_helper_modified.py
index 57db40daa..793807ede 100644
--- a/skl2onnx/proto/onnx_helper_modified.py
+++ b/skl2onnx/proto/onnx_helper_modified.py
@@ -171,6 +171,10 @@ def make_attribute(
elif all(isinstance(v, GraphProto) for v in value):
... |
pytorch__text-76 | Consistency with sorting: `sort=True`
**Problem:**
```
train_iter, dev_iter, test_iter = data.BucketIterator.splits(
(train, dev, test),
batch_sizes=(32, 256, 256),
sort_key=lambda x: len(x.input),
sort=True,
device=-1) # Use CPU
```
If `sort=True` and `train=True... | [
{
"content": "import math\nimport random\nfrom contextlib import contextmanager\nfrom copy import deepcopy\n\nfrom .batch import Batch\nfrom .dataset import Dataset\n\n\nclass RandomShuffler(object):\n \"\"\"Use random functions while keeping track of the random state to make it\n reproducible and determi... | [
{
"content": "import math\nimport random\nfrom contextlib import contextmanager\nfrom copy import deepcopy\n\nfrom .batch import Batch\nfrom .dataset import Dataset\n\n\nclass RandomShuffler(object):\n \"\"\"Use random functions while keeping track of the random state to make it\n reproducible and determi... | diff --git a/torchtext/data/iterator.py b/torchtext/data/iterator.py
index adcd1b80e5..0af4ad9d12 100644
--- a/torchtext/data/iterator.py
+++ b/torchtext/data/iterator.py
@@ -110,10 +110,10 @@ def splits(cls, datasets, batch_sizes=None, **kwargs):
def data(self):
"""Return the examples in the dataset in... |
pytorch__pytorch-2200 | DataParallel tests are currently broken
https://github.com/pytorch/pytorch/pull/2121/commits/d69669efcfe4333c223f53249185c2e22f76ed73 has broken DataParallel tests. Now that device_ids are explicitly sent to parallel_apply, this assert https://github.com/pytorch/pytorch/blob/master/torch/nn/parallel/parallel_apply.py#... | [
{
"content": "import torch\nfrom ..modules import Module\nfrom .scatter_gather import scatter_kwargs, gather\nfrom .replicate import replicate\nfrom .parallel_apply import parallel_apply\n\n\nclass DataParallel(Module):\n \"\"\"Implements data parallelism at the module level.\n\n This container paralleliz... | [
{
"content": "import torch\nfrom ..modules import Module\nfrom .scatter_gather import scatter_kwargs, gather\nfrom .replicate import replicate\nfrom .parallel_apply import parallel_apply\n\n\nclass DataParallel(Module):\n \"\"\"Implements data parallelism at the module level.\n\n This container paralleliz... | diff --git a/torch/nn/parallel/data_parallel.py b/torch/nn/parallel/data_parallel.py
index fc983a38c1ff32..c4b95c576288a6 100644
--- a/torch/nn/parallel/data_parallel.py
+++ b/torch/nn/parallel/data_parallel.py
@@ -100,6 +100,7 @@ def data_parallel(module, inputs, device_ids=None, output_device=None, dim=0, mo
inp... |
ultrabug__py3status-1390 | Updating placeholder formats rejects placeholders containing periods
Hi. It is not possible to update placeholder formats for placeholders containing periods.
I ran into this in `nvidia_smi`. Here's a list of placeholders containing periods and/or underscores.
```shell
$ python nvidia_smi.py --list
[
{
... | [
{
"content": "# -*- coding: utf-8 -*-\nimport re\nimport sys\n\nfrom numbers import Number\n\nfrom py3status.composite import Composite\n\ntry:\n from urllib.parse import parse_qsl\nexcept ImportError:\n from urlparse import parse_qsl\n\n\npython2 = sys.version_info < (3, 0)\n\n\nclass Formatter:\n \"\... | [
{
"content": "# -*- coding: utf-8 -*-\nimport re\nimport sys\n\nfrom numbers import Number\n\nfrom py3status.composite import Composite\n\ntry:\n from urllib.parse import parse_qsl\nexcept ImportError:\n from urlparse import parse_qsl\n\n\npython2 = sys.version_info < (3, 0)\n\n\nclass Formatter:\n \"\... | diff --git a/py3status/formatter.py b/py3status/formatter.py
index 2a8da5c458..25be20b857 100644
--- a/py3status/formatter.py
+++ b/py3status/formatter.py
@@ -255,8 +255,8 @@ def get(self, get_params, block):
value = float(value)
if 'd' in self.format:
... |
django__channels-1468 | get_handler_name allow call to private methods
Hi there !
## Environment:
- python3.8
- channels 2.4.0
## Bug:
Not sure if it's really a bug or an intended behaviour. But it seem that the function [get_handler_name](https://github.com/django/channels/blob/42070bfe400048d7c8efe551d37f7ac0d26d8e7e/channels/consu... | [
{
"content": "import functools\n\nfrom asgiref.sync import async_to_sync\n\nfrom . import DEFAULT_CHANNEL_LAYER\nfrom .db import database_sync_to_async\nfrom .exceptions import StopConsumer\nfrom .layers import get_channel_layer\nfrom .utils import await_many_dispatch\n\n\ndef get_handler_name(message):\n \"... | [
{
"content": "import functools\n\nfrom asgiref.sync import async_to_sync\n\nfrom . import DEFAULT_CHANNEL_LAYER\nfrom .db import database_sync_to_async\nfrom .exceptions import StopConsumer\nfrom .layers import get_channel_layer\nfrom .utils import await_many_dispatch\n\n\ndef get_handler_name(message):\n \"... | diff --git a/channels/consumer.py b/channels/consumer.py
index 704c0383d..33af10c45 100644
--- a/channels/consumer.py
+++ b/channels/consumer.py
@@ -17,10 +17,11 @@ def get_handler_name(message):
# Check message looks OK
if "type" not in message:
raise ValueError("Incoming message has no 'type' attri... |
pypa__pip-9050 | In virtual environment populated with `flit install -s` (editable), `python3 -m pip freeze` raises `AssertionError` on MacOS
**Environment**
* pip version: 20.2.3
* Python version: 3.8
* OS: MacOS 10.15.7 and Ubuntu 20.04 (tested on two different machines)
I created the virtual environments with `python3 -m ven... | [
{
"content": "import logging\n\nfrom pip._internal.models.direct_url import (\n DIRECT_URL_METADATA_NAME,\n ArchiveInfo,\n DirectUrl,\n DirectUrlValidationError,\n DirInfo,\n VcsInfo,\n)\nfrom pip._internal.utils.typing import MYPY_CHECK_RUNNING\nfrom pip._internal.vcs import vcs\n\ntry:\n ... | [
{
"content": "import logging\n\nfrom pip._internal.models.direct_url import (\n DIRECT_URL_METADATA_NAME,\n ArchiveInfo,\n DirectUrl,\n DirectUrlValidationError,\n DirInfo,\n VcsInfo,\n)\nfrom pip._internal.utils.typing import MYPY_CHECK_RUNNING\nfrom pip._internal.vcs import vcs\n\ntry:\n ... | diff --git a/news/8996.bugfix.rst b/news/8996.bugfix.rst
new file mode 100644
index 00000000000..fa3528e7c47
--- /dev/null
+++ b/news/8996.bugfix.rst
@@ -0,0 +1,3 @@
+Do not fail in pip freeze when encountering a ``direct_url.json`` metadata file
+with editable=True. Render it as a non-editable ``file://`` URL until mo... |
numba__numba-777 | Dispatcher bug
``` python
from numba import jit
@jit
def foo(a, b):
return 1
# <class 'int'> <class 'float'>
# <class 'float'> <class 'int'>
# <class 'float'> <class 'float'>
# <class 'int'> <class 'int'>
foo(1, 0.1)
foo(0.1, 1)
foo(0.1, 0.1)
foo(1, 1)
```
```
Traceback (most recent call last):
File "test_di... | [
{
"content": "from __future__ import print_function, division, absolute_import\nimport contextlib\nimport functools\nimport inspect\nimport sys\n\nfrom numba import _dispatcher, compiler, utils\nfrom numba.typeconv.rules import default_type_manager\nfrom numba import typing\nfrom numba.typing.templates import r... | [
{
"content": "from __future__ import print_function, division, absolute_import\nimport contextlib\nimport functools\nimport inspect\nimport sys\n\nfrom numba import _dispatcher, compiler, utils\nfrom numba.typeconv.rules import default_type_manager\nfrom numba import typing\nfrom numba.typing.templates import r... | diff --git a/numba/_dispatcher.c b/numba/_dispatcher.c
index 960ce512429..e75ec15f8fc 100644
--- a/numba/_dispatcher.c
+++ b/numba/_dispatcher.c
@@ -360,6 +360,36 @@ call_cfunc(PyObject *cfunc, PyObject *args, PyObject *kws)
return fn(PyCFunction_GET_SELF(cfunc), args, kws);
}
+static
+PyObject*
+compile_and_in... |
optuna__optuna-4034 | enqueue, storage & parallelization
### Expected behavior
run the attached code, you will see the problem. this issue does not always happen, but often.
### Environment
- Optuna version: 3.9
- Python version:3.0
- OS: windows X64
- (Optional) Other libraries and their versions:
### Error messages, ... | [
{
"content": "from collections import defaultdict\nfrom contextlib import contextmanager\nimport copy\nfrom datetime import datetime\nimport json\nimport logging\nimport os\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Container\nfrom typing import Dict\nfrom typing import Generator\n... | [
{
"content": "from collections import defaultdict\nfrom contextlib import contextmanager\nimport copy\nfrom datetime import datetime\nimport json\nimport logging\nimport os\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Container\nfrom typing import Dict\nfrom typing import Generator\n... | diff --git a/docs/source/faq.rst b/docs/source/faq.rst
index 866af81b84..113957f786 100644
--- a/docs/source/faq.rst
+++ b/docs/source/faq.rst
@@ -522,8 +522,7 @@ For more information about 1., see APIReference_.
2. Multi-processing parallelization with single node
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... |
apple__coremltools-207 | Error reading protobuf spec. validator error: The .mlmodel supplied is of version 3, intended for a newer version of Xcode. This version of Xcode supports model version 2 or earlier.
Ported from https://github.com/apple/turicreate/issues/701
On Linux, loading a spec into an `MLModel` with any specification version w... | [
{
"content": "# Copyright (c) 2017, Apple Inc. All rights reserved.\n#\n# Use of this source code is governed by a BSD-3-clause license that can be\n# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause\n\nfrom copy import deepcopy as _deepcopy\nimport json as _json\nimport os as _o... | [
{
"content": "# Copyright (c) 2017, Apple Inc. All rights reserved.\n#\n# Use of this source code is governed by a BSD-3-clause license that can be\n# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause\n\nfrom copy import deepcopy as _deepcopy\nimport json as _json\nimport os as _o... | diff --git a/coremltools/models/model.py b/coremltools/models/model.py
index ebda8cd65..64999e36c 100644
--- a/coremltools/models/model.py
+++ b/coremltools/models/model.py
@@ -76,8 +76,14 @@ def _get_proxy_from_spec(filename):
if _has_custom_layer(spec):
# custom layers can't be supported directl... |
sopel-irc__sopel-1296 | Error loading ...: No module named 'pytest' (test_tools.py:159)
I finally saw an updated Sopel version in my pip this early morning PDT, but got a bunch of errors with its missing pytest module:
````
$ pip list --outdated
DEPRECATION: The default format will switch to columns in the future. You can use --format=(l... | [
{
"content": "# coding=utf-8\n\"\"\"This contains decorators and tools for creating callable plugin functions.\n\"\"\"\n# Copyright 2013, Ari Koivula, <ari@koivu.la>\n# Copyright © 2013, Elad Alfassa <elad@fedoraproject.org>\n# Copyright 2013, Lior Ramati <firerogue517@gmail.com>\n# Licensed under the Eiffel Fo... | [
{
"content": "# coding=utf-8\n\"\"\"This contains decorators and tools for creating callable plugin functions.\n\"\"\"\n# Copyright 2013, Ari Koivula, <ari@koivu.la>\n# Copyright © 2013, Elad Alfassa <elad@fedoraproject.org>\n# Copyright 2013, Lior Ramati <firerogue517@gmail.com>\n# Licensed under the Eiffel Fo... | diff --git a/sopel/module.py b/sopel/module.py
index 45d31e69c1..1e7f48f5b5 100644
--- a/sopel/module.py
+++ b/sopel/module.py
@@ -441,7 +441,11 @@ def __call__(self, func):
if not hasattr(func, "example"):
func.example = []
- if self.result:
+ import sys
+
+ # only inject t... |
fossasia__open-event-server-3403 | FOSSASIA Summit no longer on start page event though event is still running
Please ensure events that are still running are listed on start page until end of event, e.g. check https://eventyay.com
| [
{
"content": "import datetime\nimport os\nfrom collections import Counter\n\nimport binascii\nimport humanize\nimport pytz\nimport requests\nfrom flask import flash, abort\nfrom flask import url_for\nfrom flask.ext import login\nfrom sqlalchemy import desc, asc, or_\nfrom sqlalchemy.orm.exc import MultipleResul... | [
{
"content": "import datetime\nimport os\nfrom collections import Counter\n\nimport binascii\nimport humanize\nimport pytz\nimport requests\nfrom flask import flash, abort\nfrom flask import url_for\nfrom flask.ext import login\nfrom sqlalchemy import desc, asc, or_\nfrom sqlalchemy.orm.exc import MultipleResul... | diff --git a/app/helpers/data_getter.py b/app/helpers/data_getter.py
index 9b3e9398c6..1b0c6cd4ed 100644
--- a/app/helpers/data_getter.py
+++ b/app/helpers/data_getter.py
@@ -417,8 +417,7 @@ def get_all_published_events(include_private=False):
events = Event.query.filter(Event.state == 'Published')
... |
comic__grand-challenge.org-1575 | Images converted to tiff can get wrong image spacing.
Images that are converted to tif files can get incorrect image spacing during conversion. Problem was found with certain svs files, where openslide found certain mpp propreties (micron per pixel) but these were not used to set the tiff tags ResolutionX and Resolutio... | [
{
"content": "import os\nimport re\nfrom dataclasses import dataclass, field\nfrom pathlib import Path\nfrom tempfile import TemporaryFile\nfrom typing import Dict, List, Optional, Set\nfrom uuid import UUID, uuid4\n\nimport openslide\nimport pyvips\nimport tifffile\nfrom django.conf import settings\nfrom djang... | [
{
"content": "import os\nimport re\nfrom dataclasses import dataclass, field\nfrom pathlib import Path\nfrom tempfile import TemporaryFile\nfrom typing import Dict, List, Optional, Set\nfrom uuid import UUID, uuid4\n\nimport openslide\nimport pyvips\nimport tifffile\nfrom django.conf import settings\nfrom djang... | diff --git a/app/grandchallenge/cases/image_builders/tiff.py b/app/grandchallenge/cases/image_builders/tiff.py
index ad379f84c2..0510173f93 100644
--- a/app/grandchallenge/cases/image_builders/tiff.py
+++ b/app/grandchallenge/cases/image_builders/tiff.py
@@ -327,8 +327,14 @@ def _convert_to_tiff(*, path: Path, pk: UUID... |
oppia__oppia-8691 | Remove gulp from setup entirely.
To continue consolidating our setup process to a python stack, gulp needs to be removed. Currently gulp only provides a watch functionality that starts build processes if some directories are changed. Our dependency on npm already includes access to npm-watch, which can be used to repla... | [
{
"content": "# Copyright 2019 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the 'License');\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# ... | [
{
"content": "# Copyright 2019 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the 'License');\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# ... | diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index e34fa7be2380e..584936d310c1f 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -515,7 +515,6 @@
/core/templates/dev/head/pages/header_css_libs.html @jameesjohn @vojtechjelinek
/core/templates/dev/head/pages/header_js_libs.html @jameesjohn @vojtechje... |
pymedusa__Medusa-2877 | TypeError: sequence item 0: expected string or Unicode, int found
Latest dev
While doing a manual search
```
2017-06-10 20:09:09 ERROR SEARCHQUEUE-MANUAL-272644 :: [Torrentz2] :: [21ec574] Unknown exception while searching Torrentz2. Error: 'sequence item 0: expected string or Unicode, int found'
Traceback (... | [
{
"content": "# coding=utf-8\n\n\"\"\"Provider code for Generic Provider.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport re\n\nfrom base64 import b16encode, b32decode\nfrom collections import defaultdict\nfrom datetime import datetime, timedelta\nfrom itertools import chain\nfrom os.... | [
{
"content": "# coding=utf-8\n\n\"\"\"Provider code for Generic Provider.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport re\n\nfrom base64 import b16encode, b32decode\nfrom collections import defaultdict\nfrom datetime import datetime, timedelta\nfrom itertools import chain\nfrom os.... | diff --git a/medusa/providers/generic_provider.py b/medusa/providers/generic_provider.py
index fbd219c01d..bc12d1f19c 100644
--- a/medusa/providers/generic_provider.py
+++ b/medusa/providers/generic_provider.py
@@ -399,7 +399,7 @@ def find_search_results(self, show, episodes, search_mode, forced_search=False,
... |
pre-commit__pre-commit-96 | System hooks with spaces in entry are not runnable
It's pretty reasonable to have a system hook that looks like this:
```
- id: foo
name: foo
entry: python -m bar
language: system
```
Currently this fails:
```
$ pre-commit run foo --all-files
foo...................................................Failed... | [
{
"content": "ENVIRONMENT_DIR = None\n\n\ndef install_environment(repo_cmd_runner):\n \"\"\"Installation for system type is a noop.\"\"\"\n\n\ndef run_hook(repo_cmd_runner, hook, file_args):\n return repo_cmd_runner.run(\n ['xargs', hook['entry']] + hook['args'],\n # TODO: this is duplicated... | [
{
"content": "import shlex\n\n\nENVIRONMENT_DIR = None\n\n\ndef install_environment(repo_cmd_runner):\n \"\"\"Installation for system type is a noop.\"\"\"\n\n\ndef run_hook(repo_cmd_runner, hook, file_args):\n return repo_cmd_runner.run(\n ['xargs'] + shlex.split(hook['entry']) + hook['args'],\n ... | diff --git a/pre_commit/languages/system.py b/pre_commit/languages/system.py
index 18f2ca77c..eeea2c50e 100644
--- a/pre_commit/languages/system.py
+++ b/pre_commit/languages/system.py
@@ -1,3 +1,6 @@
+import shlex
+
+
ENVIRONMENT_DIR = None
@@ -7,7 +10,7 @@ def install_environment(repo_cmd_runner):
def run_hoo... |
getredash__redash-2070 | An unauthorized (read only) user can create queries
### Issue Summary
I created a user on the default group and set the data source capabilities to "Read only" on that group. Accessing as this brand new user, I really can't create a new query, but I can fork a existing one, and modify it as I want. I think this cou... | [
{
"content": "from itertools import chain\n\nimport sqlparse\nfrom flask import jsonify, request\nfrom flask_login import login_required\nfrom flask_restful import abort\nfrom funcy import distinct, take\nfrom sqlalchemy.orm.exc import StaleDataError\n\nfrom redash import models, settings\nfrom redash.handlers.... | [
{
"content": "from itertools import chain\n\nimport sqlparse\nfrom flask import jsonify, request\nfrom flask_login import login_required\nfrom flask_restful import abort\nfrom funcy import distinct, take\nfrom sqlalchemy.orm.exc import StaleDataError\n\nfrom redash import models, settings\nfrom redash.handlers.... | diff --git a/client/app/pages/queries/query.html b/client/app/pages/queries/query.html
index 1559356b73..4ad20ce34d 100644
--- a/client/app/pages/queries/query.html
+++ b/client/app/pages/queries/query.html
@@ -107,7 +107,7 @@ <h3>
<button class="btn btn-s btn-default" ng-click="togglePublished()" ng-i... |
conan-io__conan-7364 | graph --table=file.html does not show outdated packages
They were previously shown in colors. I guess adding a column "outdated" will resolve this issue.
| [
{
"content": "\ncontent = \"\"\"\n<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <title>Conan | {{ search.reference }}</title>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\"/>\n <link rel=\"stylesheet\" type=\"t... | [
{
"content": "\ncontent = \"\"\"\n<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <title>Conan | {{ search.reference }}</title>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\"/>\n <link rel=\"stylesheet\" type=\"t... | diff --git a/conans/assets/templates/search_table_html.py b/conans/assets/templates/search_table_html.py
index f8c59c6839b..6fca7ddf291 100644
--- a/conans/assets/templates/search_table_html.py
+++ b/conans/assets/templates/search_table_html.py
@@ -25,7 +25,7 @@
<table id="results" class="table table-striped... |
numba__numba-8600 | Numba event mechanism is recording seconds as microseconds?
<!--
Thanks for opening an issue! To help the Numba team handle your information
efficiently, please first ensure that there is no other issue present that
already describes the issue you have
(search at https://github.com/numba/numba/issues?&q=is%3Aissu... | [
{
"content": "\"\"\"\nThe ``numba.core.event`` module provides a simple event system for applications\nto register callbacks to listen to specific compiler events.\n\nThe following events are built in:\n\n- ``\"numba:compile\"`` is broadcast when a dispatcher is compiling. Events of\n this kind have ``data`` d... | [
{
"content": "\"\"\"\nThe ``numba.core.event`` module provides a simple event system for applications\nto register callbacks to listen to specific compiler events.\n\nThe following events are built in:\n\n- ``\"numba:compile\"`` is broadcast when a dispatcher is compiling. Events of\n this kind have ``data`` d... | diff --git a/numba/core/event.py b/numba/core/event.py
index e2a1b0bde10..80db62dcc03 100644
--- a/numba/core/event.py
+++ b/numba/core/event.py
@@ -461,11 +461,13 @@ def _prepare_chrome_trace_data(listener: RecordingListener):
for ts, rec in listener.buffer:
data = rec.data
cat = str(rec.kind)
+... |
huggingface__diffusers-3189 | Text to audio with default code produces an unplayable file
### Describe the bug
Great with the new Text to audio feature. However, when I use the default script, the resulting file doesn't contain any audio, there are no errors printed in the console:
The file properties looks ok:
;\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | [
{
"content": "# Copyright 2023 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | diff --git a/src/diffusers/pipelines/audioldm/pipeline_audioldm.py b/src/diffusers/pipelines/audioldm/pipeline_audioldm.py
index 86a8fd659046..c80e6ef99288 100644
--- a/src/diffusers/pipelines/audioldm/pipeline_audioldm.py
+++ b/src/diffusers/pipelines/audioldm/pipeline_audioldm.py
@@ -293,7 +293,7 @@ def mel_spectrogr... |
saleor__saleor-14630 | Bug: productBulkCreate issue with slug creation
### What are you trying to achieve?
Create products with `productBulkCreate` mutation, but their name consists only characters which can't be in slugs (for example "-").
Related PR #14378
### Steps to reproduce the problem
1. Send mutation:
```
mutation Bulk... | [
{
"content": "from collections import defaultdict\nfrom datetime import datetime\n\nimport graphene\nimport pytz\nfrom django.core.exceptions import ValidationError\nfrom django.core.files import File\nfrom django.db.models import F\nfrom django.utils.text import slugify\nfrom graphene.utils.str_converters impo... | [
{
"content": "from collections import defaultdict\nfrom datetime import datetime\n\nimport graphene\nimport pytz\nfrom django.core.exceptions import ValidationError\nfrom django.core.files import File\nfrom django.db.models import F\nfrom django.utils.text import slugify\nfrom graphene.utils.str_converters impo... | diff --git a/saleor/graphql/product/bulk_mutations/product_bulk_create.py b/saleor/graphql/product/bulk_mutations/product_bulk_create.py
index 3b3de509c97..77de5fc6ba0 100644
--- a/saleor/graphql/product/bulk_mutations/product_bulk_create.py
+++ b/saleor/graphql/product/bulk_mutations/product_bulk_create.py
@@ -210,6 +... |
piskvorky__gensim-1512 | ShardedCorpus skips the first value of a generator
#### Description
ShardedCorpus skips the first value of a generator. This is possibly caused by ShardedCorpus not using the fixed corpus that is returned from is_corpus method, but I haven't verified this yet.
#### Steps/Code/Corpus to Reproduce
```
from gensim... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Original author: Jan Hajic jr.\n# Copyright (C) 2015 Radim Rehurek and gensim team.\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\"\"\"\nThis module implements a corpus class that stores its data in separate fil... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Original author: Jan Hajic jr.\n# Copyright (C) 2015 Radim Rehurek and gensim team.\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\"\"\"\nThis module implements a corpus class that stores its data in separate fil... | diff --git a/gensim/corpora/sharded_corpus.py b/gensim/corpora/sharded_corpus.py
index e5904f2773..4d0fde4999 100644
--- a/gensim/corpora/sharded_corpus.py
+++ b/gensim/corpora/sharded_corpus.py
@@ -251,7 +251,8 @@ def __init__(self, output_prefix, corpus, dim=None,
def init_shards(self, output_prefix, corpus, sha... |
dmlc__dgl-4910 | [Dist] `get_partition_ids()` in dist partition pipeline returns unexpected values
## 🐛 Bug
<!-- A clear and concise description of what the bug is. -->
Report this on behalf of @Kh4L
Traceback (most recent call last):
File "/shared_workspace/mag240m/distpartitioning/data_proc_pipeline.py", line 68, in <modu... | [
{
"content": "import logging\nimport os\nimport numpy as np\nimport pyarrow\nimport torch\nimport copy\n\nfrom pyarrow import csv\nfrom gloo_wrapper import alltoallv_cpu\n\n\nclass DistLookupService:\n '''\n This is an implementation of a Distributed Lookup Service to provide the following\n services t... | [
{
"content": "import logging\nimport os\nimport numpy as np\nimport pyarrow\nimport torch\n\nfrom pyarrow import csv\nfrom gloo_wrapper import alltoallv_cpu\n\n\nclass DistLookupService:\n '''\n This is an implementation of a Distributed Lookup Service to provide the following\n services to its users. ... | diff --git a/tools/distpartitioning/dist_lookup.py b/tools/distpartitioning/dist_lookup.py
index 92fbc293df55..85d14a157af3 100644
--- a/tools/distpartitioning/dist_lookup.py
+++ b/tools/distpartitioning/dist_lookup.py
@@ -167,7 +167,7 @@ def get_partition_ids(self, global_nids):
continue
... |
getredash__redash-998 | Embed query description appearing larger than vizualization name
The query description is appearing larger then the visualization name:

| [
{
"content": "import json\n\nfrom funcy import project\nfrom flask import render_template, request\nfrom flask_login import login_required, current_user\nfrom flask_restful import abort\n\nfrom redash import models, settings\nfrom redash import serializers\nfrom redash.utils import json_dumps\nfrom redash.handl... | [
{
"content": "import json\n\nfrom funcy import project\nfrom flask import render_template, request\nfrom flask_login import login_required, current_user\nfrom flask_restful import abort\n\nfrom redash import models, settings\nfrom redash import serializers\nfrom redash.utils import json_dumps\nfrom redash.handl... | diff --git a/rd_ui/app/scripts/embed.js b/rd_ui/app/scripts/embed.js
index 5e6e3f1247..0632786d4f 100644
--- a/rd_ui/app/scripts/embed.js
+++ b/rd_ui/app/scripts/embed.js
@@ -43,12 +43,13 @@ angular.module('redash', [
}
])
.controller('EmbedCtrl', ['$scope', function ($scope) {} ])
- .controller('Embedded... |
mkdocs__mkdocs-3314 | v1.5.0 Attempts to Remove Files Twice, throws `ValueError`
I have a somewhat strange/niche site folder with an `index.html`, `index.md`, _and_ a `README.md`.
After upgrading to v1.5.0, `mkdocs build` throws a ValueError with the trace below.
`get_files` will attempt to remove a file multiple times if there are mu... | [
{
"content": "from __future__ import annotations\n\nimport enum\nimport fnmatch\nimport logging\nimport os\nimport posixpath\nimport shutil\nimport warnings\nfrom pathlib import PurePath\nfrom typing import TYPE_CHECKING, Callable, Iterable, Iterator, Sequence\nfrom urllib.parse import quote as urlquote\n\nimpo... | [
{
"content": "from __future__ import annotations\n\nimport enum\nimport fnmatch\nimport logging\nimport os\nimport posixpath\nimport shutil\nimport warnings\nfrom pathlib import PurePath\nfrom typing import TYPE_CHECKING, Callable, Iterable, Iterator, Sequence\nfrom urllib.parse import quote as urlquote\n\nimpo... | diff --git a/mkdocs/structure/files.py b/mkdocs/structure/files.py
index ce154437a3..ceab53f989 100644
--- a/mkdocs/structure/files.py
+++ b/mkdocs/structure/files.py
@@ -367,9 +367,15 @@ def get_files(config: MkDocsConfig) -> Files:
log.warning(
f"Excluding '{a.src_uri}' from the ... |
obspy__obspy-3077 | Clarify xcorr_3c docstring
### Documentation Link
https://docs.obspy.org/packages/autogen/obspy.signal.cross_correlation.xcorr_3c.html
### Problem
A new implementation of cross-correlation, i.e., `correlate`, is created in #1585 and `xcorr` is removed in #1979. But the documentation for `xcorr_3c` still refers to `... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# -------------------------------------------------------------------\n# Filename: cross_correlation.py\n# Author: Moritz Beyreuther, Tobias Megies, Tom Eulenfeld\n# Email: megies@geophysik.uni-muenchen.de\n#\n# Copyright (C) 2008-2019 Moritz Be... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# -------------------------------------------------------------------\n# Filename: cross_correlation.py\n# Author: Moritz Beyreuther, Tobias Megies, Tom Eulenfeld\n# Email: megies@geophysik.uni-muenchen.de\n#\n# Copyright (C) 2008-2019 Moritz Be... | diff --git a/obspy/signal/cross_correlation.py b/obspy/signal/cross_correlation.py
index 1e52bf7cce4..84bd8148883 100644
--- a/obspy/signal/cross_correlation.py
+++ b/obspy/signal/cross_correlation.py
@@ -310,7 +310,7 @@ def xcorr_3c(st1, st2, shift_len, components=["Z", "N", "E"],
separately, stacks them together... |
pwr-Solaar__Solaar-1387 | There is no option for MX Anywhere 3 and uknown battery
I manual installed Solaar 1.1.1rc2. After executing Solaar, there is no option available for MX Anywhere 3 and with unknown battery.

- Solaar vers... | [
{
"content": "import errno as _errno\n\nfrom logging import INFO as _INFO\nfrom logging import getLogger\nfrom typing import Optional\n\nimport hidapi as _hid\nimport solaar.configuration as _configuration\n\nfrom . import base as _base\nfrom . import descriptors as _descriptors\nfrom . import hidpp10 as _hidpp... | [
{
"content": "import errno as _errno\n\nfrom logging import INFO as _INFO\nfrom logging import getLogger\nfrom typing import Optional\n\nimport hidapi as _hid\nimport solaar.configuration as _configuration\n\nfrom . import base as _base\nfrom . import descriptors as _descriptors\nfrom . import hidpp10 as _hidpp... | diff --git a/lib/logitech_receiver/device.py b/lib/logitech_receiver/device.py
index 4e8c23faa3..c7c03261fd 100644
--- a/lib/logitech_receiver/device.py
+++ b/lib/logitech_receiver/device.py
@@ -397,9 +397,8 @@ def feature_request(self, feature, function=0x00, *params, no_reply=False):
def ping(self):
"... |
pantsbuild__pants-19019 | `AdhocProcessRequest` isn't replacing `$0` correctly
**Describe the bug**
From https://pantsbuild.slack.com/archives/C0D7TNJHL/p1684255827991839
```
file(
name="downloaded-jq",
source = http_source(
len = 3953824,
sha256 = "af986793a515d500ab2d35f8d2aecd656e764504b789b66d7e1a0b727a124c4... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport re\nfrom enum import Enum\n\nfrom pants.backend.adhoc.target_types import (\n AdhocToolDependenciesField,\n Adho... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport re\nfrom enum import Enum\n\nfrom pants.backend.adhoc.target_types import (\n AdhocToolDependenciesField,\n Adho... | diff --git a/src/python/pants/backend/shell/target_types.py b/src/python/pants/backend/shell/target_types.py
index 7b748b1420f..d4e2e186936 100644
--- a/src/python/pants/backend/shell/target_types.py
+++ b/src/python/pants/backend/shell/target_types.py
@@ -266,7 +266,15 @@ class ShellSourcesGeneratorTarget(TargetFilesG... |
databricks__koalas-957 | `datetime.datetime` is not recognized as the equivalent python type to `types.TimestampType()`
Actually, this isn't an issue. I was looking for a workaround for [this comment](https://github.com/databricks/koalas/pull/478#issuecomment-545888595), wrote the code below and got `ValueError`.
```python
import databrick... | [
{
"content": "#\n# Copyright (C) 2019 Databricks, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required... | [
{
"content": "#\n# Copyright (C) 2019 Databricks, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required... | diff --git a/databricks/koalas/tests/test_series.py b/databricks/koalas/tests/test_series.py
index 0343b641e7..cb73b27bd8 100644
--- a/databricks/koalas/tests/test_series.py
+++ b/databricks/koalas/tests/test_series.py
@@ -19,6 +19,7 @@
from distutils.version import LooseVersion
import inspect
from io import BytesIO... |
databricks__koalas-1020 | Error when using bitwise-and operator with compute.ops_on_diff_frames enabled
```python
import databricks.koalas as ks
from databricks.koalas.config import set_option
set_option('compute.ops_on_diff_frames', True)
left = ks.Series([0])
kser = ks.Series([1])
right = ks.Series([2])
# works
lmask = kser > l... | [
{
"content": "#\n# Copyright (C) 2019 Databricks, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required... | [
{
"content": "#\n# Copyright (C) 2019 Databricks, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required... | diff --git a/databricks/koalas/tests/test_ops_on_diff_frames.py b/databricks/koalas/tests/test_ops_on_diff_frames.py
index bd37fd0ba7..8bc3d5db8d 100644
--- a/databricks/koalas/tests/test_ops_on_diff_frames.py
+++ b/databricks/koalas/tests/test_ops_on_diff_frames.py
@@ -175,8 +175,8 @@ def test_arithmetic_chain(self):
... |
beetbox__beets-1980 | hook: Crash when using non-ASCII paths in command template
Using the config
```
hook:
hooks:
- event: album_imported
command: beet convert -ay path:{album.path}
```
and this command
```
beet import -a -L path:/path/to/lib/Ария
```
I get an UnicodeDecodeError from `hook.py` line 50.
| [
{
"content": "# This file is part of beets.\n# Copyright 2015, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limita... | [
{
"content": "# This file is part of beets.\n# Copyright 2015, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limita... | diff --git a/beetsplug/hook.py b/beetsplug/hook.py
index 81fb9a7f9e..2b0bf2b0a5 100644
--- a/beetsplug/hook.py
+++ b/beetsplug/hook.py
@@ -47,7 +47,9 @@ def hook_function(**kwargs):
self._log.error('invalid command "{0}"', command)
return
- formatted_command = ... |
kivy__python-for-android-1112 | Websocket error: SSL not available
Getting this error when attempting to open a secure websocket ('wss://') using websocket-client.
09-02 09:12:04.037 10328 10719 I python : [ERROR ] [MyApp] Websocket error: SSL not available.
09-02 09:12:04.037 10328 10719 I python : [INFO ] [MyApp] Websocket closed
Still happ... | [
{
"content": "from pythonforandroid.toolchain import Recipe\n\n# if android app crashes on start with \"ImportError: No module named websocket\"\n#\n# copy the 'websocket' directory into your app directory to force inclusion.\n#\n# see my example at https://github.com/debauchery1st/example_kivy_websocket-re... | [
{
"content": "from pythonforandroid.toolchain import Recipe\n\n# if android app crashes on start with \"ImportError: No module named websocket\"\n#\n# copy the 'websocket' directory into your app directory to force inclusion.\n#\n# see my example at https://github.com/debauchery1st/example_kivy_websocket-re... | diff --git a/pythonforandroid/recipes/websocket-client/__init__.py b/pythonforandroid/recipes/websocket-client/__init__.py
index aeb6b3b8a1..b0de3d0055 100644
--- a/pythonforandroid/recipes/websocket-client/__init__.py
+++ b/pythonforandroid/recipes/websocket-client/__init__.py
@@ -5,6 +5,12 @@
# copy the 'websock... |
opentensor__bittensor-36 | Docker and python files take different cmd line arguments
Presently, docker run of Bittensor takes different flags as cmd line arguments than the typical Python native application.
This is because the dockerized version "assumes" all the flags for running it in python, when in reality it should be taking the same ... | [
{
"content": "\"\"\"BERT Next Sentence Prediction Synapse\n\nThis file demonstrates a bittensor.Synapse trained for Next Sentence Prediction.\n\nExample:\n $ python examples/bert/main.py\n\n\"\"\"\n\nimport bittensor\nfrom bittensor.utils.model_utils import ModelToolbox\nfrom bittensor import bittensor_p... | [
{
"content": "\"\"\"BERT Next Sentence Prediction Synapse\n\nThis file demonstrates a bittensor.Synapse trained for Next Sentence Prediction.\n\nExample:\n $ python examples/bert/main.py\n\n\"\"\"\n\nimport bittensor\nfrom bittensor.utils.model_utils import ModelToolbox\nfrom bittensor import bittensor_p... | diff --git a/.dockerignore b/.dockerignore
index f8ca57f86a..4fc5feba26 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -11,6 +11,4 @@ __pycach__
**/env/*
**/runs/*
**/data/*
-**/.data/*
-**/*.txt
-
+**/.data/*
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 3ccb473f0a..cfeb1b73f5 100644
---... |
microsoft__lisa-2979 | [Log] typo in log
There's a typo in log: tocount -> to count

And I ask to improve the log. It's not a case missing `nvidia-smi`.
| [
{
"content": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Any, List\n\nfrom assertpy import assert_that\n\nfrom lisa import (\n LisaException,\n Logger,\n Node,\n SkippedException,\n TestCaseMetada... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport os\nimport re\nfrom pathlib import Path\nfrom typing import Any, List\n\nfrom assertpy import assert_that\n\nfrom lisa import (\n LisaException,\n Logger,\n Node,\n SkippedException,\n TestCaseMetada... | diff --git a/microsoft/testsuites/gpu/gpusuite.py b/microsoft/testsuites/gpu/gpusuite.py
index 08922fd31b..91c840b144 100644
--- a/microsoft/testsuites/gpu/gpusuite.py
+++ b/microsoft/testsuites/gpu/gpusuite.py
@@ -346,7 +346,7 @@ def _check_driver_installed(node: Node, log: Logger) -> None:
lspci_gpucount = g... |
celery__celery-4880 | The celery document has a mistake about crontab
## about crontab
the document in this link about crontab simple.
http://docs.celeryproject.org/en/master/userguide/periodic-tasks.html
**crontab(0, 0, day_of_month='2-30/3')**
Execute on every even numbered day.
shuld be
**crontab(0, 0, day_of_month='2-30/2')**... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Schedules define the intervals at which periodic tasks run.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport numbers\nimport re\nfrom bisect import bisect, bisect_left\nfrom collections import Iterable, namedtuple\nfrom datetime import dateti... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Schedules define the intervals at which periodic tasks run.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport numbers\nimport re\nfrom bisect import bisect, bisect_left\nfrom collections import Iterable, namedtuple\nfrom datetime import dateti... | diff --git a/celery/schedules.py b/celery/schedules.py
index dfdba5ab68d..336ae9d631a 100644
--- a/celery/schedules.py
+++ b/celery/schedules.py
@@ -361,7 +361,7 @@ class crontab(BaseSchedule):
- A (list of) integers from 1-31 that represents the days of the
month that execution should occur.
... |
saleor__saleor-14523 | Bug: productBulkCreate issue with slug creation
### What are you trying to achieve?
Create products with `productBulkCreate` mutation, but their name consists only characters which can't be in slugs (for example "-").
Related PR #14378
### Steps to reproduce the problem
1. Send mutation:
```
mutation Bulk... | [
{
"content": "from collections import defaultdict\nfrom datetime import datetime\n\nimport graphene\nimport pytz\nimport requests\nfrom django.conf import settings\nfrom django.core.exceptions import ValidationError\nfrom django.core.files import File\nfrom django.db.models import F\nfrom django.utils.text impo... | [
{
"content": "from collections import defaultdict\nfrom datetime import datetime\n\nimport graphene\nimport pytz\nimport requests\nfrom django.conf import settings\nfrom django.core.exceptions import ValidationError\nfrom django.core.files import File\nfrom django.db.models import F\nfrom django.utils.text impo... | diff --git a/saleor/graphql/product/bulk_mutations/product_bulk_create.py b/saleor/graphql/product/bulk_mutations/product_bulk_create.py
index 42dfc14db60..fc0b1b3ac9f 100644
--- a/saleor/graphql/product/bulk_mutations/product_bulk_create.py
+++ b/saleor/graphql/product/bulk_mutations/product_bulk_create.py
@@ -207,6 +... |
saleor__saleor-14628 | Bug: productBulkCreate issue with slug creation
### What are you trying to achieve?
Create products with `productBulkCreate` mutation, but their name consists only characters which can't be in slugs (for example "-").
Related PR #14378
### Steps to reproduce the problem
1. Send mutation:
```
mutation Bulk... | [
{
"content": "from collections import defaultdict\nfrom datetime import datetime\n\nimport graphene\nimport pytz\nimport requests\nfrom django.conf import settings\nfrom django.core.exceptions import ValidationError\nfrom django.core.files import File\nfrom django.db.models import F\nfrom django.utils.text impo... | [
{
"content": "from collections import defaultdict\nfrom datetime import datetime\n\nimport graphene\nimport pytz\nimport requests\nfrom django.conf import settings\nfrom django.core.exceptions import ValidationError\nfrom django.core.files import File\nfrom django.db.models import F\nfrom django.utils.text impo... | diff --git a/saleor/graphql/product/bulk_mutations/product_bulk_create.py b/saleor/graphql/product/bulk_mutations/product_bulk_create.py
index 70c8d5c13f5..daa3c304b16 100644
--- a/saleor/graphql/product/bulk_mutations/product_bulk_create.py
+++ b/saleor/graphql/product/bulk_mutations/product_bulk_create.py
@@ -211,6 +... |
plotly__dash-1384 | prevent_initial_call in callback throws exception [BUG]
Thank you so much for helping improve the quality of Dash!
We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.
**Describe your context**
Please provide us your environment so we can easily ... | [
{
"content": "import json\n\nfrom ._validate import validate_callback\n\n\nclass _Wildcard: # pylint: disable=too-few-public-methods\n def __init__(self, name):\n self._name = name\n\n def __str__(self):\n return self._name\n\n def __repr__(self):\n return \"<{}>\".format(self)\n\... | [
{
"content": "import json\n\nfrom ._validate import validate_callback\n\n\nclass _Wildcard: # pylint: disable=too-few-public-methods\n def __init__(self, name):\n self._name = name\n\n def __str__(self):\n return self._name\n\n def __repr__(self):\n return \"<{}>\".format(self)\n\... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b08439a695..7fbc913ce2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
All notable changes to `dash` will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).
+## [UNRELEASED]
+### Fixed
+- [#1384](https://github... |
cisagov__manage.get.gov-911 | Add "withdrawn" confirmation email
### Ticket Description
Now that we are using a finite-state-machine transition method for withdrawing domain applications, we can add an email confirmation in that method, as described in [this document](https://docs.google.com/document/d/1I4sx-z2pbxdehj2Skci_sFZQvV8gEKE-nLu1CxxvaG... | [
{
"content": "from __future__ import annotations\nfrom typing import Union\n\nimport logging\n\nfrom django.apps import apps\nfrom django.db import models\nfrom django_fsm import FSMField, transition # type: ignore\n\nfrom .utility.time_stamped_model import TimeStampedModel\nfrom ..utility.email import send_te... | [
{
"content": "from __future__ import annotations\nfrom typing import Union\n\nimport logging\n\nfrom django.apps import apps\nfrom django.db import models\nfrom django_fsm import FSMField, transition # type: ignore\n\nfrom .utility.time_stamped_model import TimeStampedModel\nfrom ..utility.email import send_te... | diff --git a/src/registrar/models/domain_application.py b/src/registrar/models/domain_application.py
index 67f1ee5d9..32657a49d 100644
--- a/src/registrar/models/domain_application.py
+++ b/src/registrar/models/domain_application.py
@@ -590,6 +590,11 @@ def approve(self):
@transition(field="status", source=[SUBMIT... |
python__mypy-4721 | Python 3.5.0 is not supported to run mypy
While in general we support running mypy with Python 3.4 and higher, 3.5.0 specifically is not supported (we just found this out rather painfully). This is because the 3.5.0 stdlib has a very old version of typing.py that does not support all the features mypy uses. Higher vers... | [
{
"content": "\"\"\"Mypy type checker command line tool.\"\"\"\n\nimport argparse\nimport configparser\nimport fnmatch\nimport os\nimport re\nimport sys\nimport time\n\nfrom typing import Any, Dict, List, Mapping, Optional, Sequence, Set, Tuple, Callable\n\nfrom mypy import build\nfrom mypy import defaults\nfro... | [
{
"content": "\"\"\"Mypy type checker command line tool.\"\"\"\n\nimport argparse\nimport configparser\nimport fnmatch\nimport os\nimport re\nimport sys\nimport time\n\nfrom typing import Any, Dict, List, Mapping, Optional, Sequence, Set, Tuple, Callable\n\nfrom mypy import build\nfrom mypy import defaults\nfro... | diff --git a/mypy/main.py b/mypy/main.py
index 421d3f437726..e31abe086a0c 100644
--- a/mypy/main.py
+++ b/mypy/main.py
@@ -51,6 +51,14 @@ def main(script_path: Optional[str], args: Optional[List[str]] = None) -> None:
args: Custom command-line arguments. If not given, sys.argv[1:] will
be used.
... |
vyperlang__vyper-808 | clamp has different behavior on checking the lowerbound and the upperbound
### What's your issue about?
`clamp` is compiled to following EVM bytecode:
```
o.extend(compile_to_assembly(code.args[2], withargs, break_dest, height + 3))
o.extend(['SWAP1', comp1, 'PC', 'JUMPI'])
o.extend(['DUP1', 'SWAP2', 'SWAP1', co... | [
{
"content": "from vyper.parser.parser import LLLnode\nfrom .opcodes import opcodes\nfrom vyper.utils import MemoryPositions\n\n\ndef num_to_bytearray(x):\n o = []\n while x > 0:\n o.insert(0, x % 256)\n x //= 256\n return o\n\n\nPUSH_OFFSET = 0x5f\nDUP_OFFSET = 0x7f\nSWAP_OFFSET = 0x8f\n... | [
{
"content": "from vyper.parser.parser import LLLnode\nfrom .opcodes import opcodes\nfrom vyper.utils import MemoryPositions\n\n\ndef num_to_bytearray(x):\n o = []\n while x > 0:\n o.insert(0, x % 256)\n x //= 256\n return o\n\n\nPUSH_OFFSET = 0x5f\nDUP_OFFSET = 0x7f\nSWAP_OFFSET = 0x8f\n... | diff --git a/vyper/compile_lll.py b/vyper/compile_lll.py
index 17726ddc46..8cbf989d7e 100644
--- a/vyper/compile_lll.py
+++ b/vyper/compile_lll.py
@@ -211,7 +211,8 @@ def compile_to_assembly(code, withargs=None, break_dest=None, height=0):
o.extend(compile_to_assembly(code.args[1], withargs, break_dest, height... |
ansible__ansible-22511 | Regression in Iptables module - throws TypeError: can only join an iterable with devel (2.3), worked with 2.2
<!---
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release, and master branch are affected too.
-->
##### ISSUE TYPE
<!--- Pick one below and delete the... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n#\n# (c) 2015, Linus Unnebäck <linus@folkdatorn.se>\n#\n# This file is part of Ansible\n#\n# This module 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) 2015, Linus Unnebäck <linus@folkdatorn.se>\n#\n# This file is part of Ansible\n#\n# This module 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/lib/ansible/modules/system/iptables.py b/lib/ansible/modules/system/iptables.py
index ce6e89c5436106..391fcd6d1ef79e 100644
--- a/lib/ansible/modules/system/iptables.py
+++ b/lib/ansible/modules/system/iptables.py
@@ -406,8 +406,6 @@ def construct_rule(params):
elif params['ctstate']:
append_... |
psychopy__psychopy-1969 | Segmentation fault caused by clearTextures()
## Problem
In PsychoPy3, when `stop()` was called to stop MovieStim3, Python crashed due to segmentation fault. I tried to use `faulthandler` to find the problem, it turned out to be `clearTextures()`. Below is the error message in the prompt:
```bash
Fatal Python err... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nA stimulus class for playing movies (mp4, divx, avi etc...) in PsychoPy.\nDemo using the experimental movie3 stim to play a video file. Path of video\nneeds to updated to point to a video you have. movie2 does /not/ require\navbin to be ins... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nA stimulus class for playing movies (mp4, divx, avi etc...) in PsychoPy.\nDemo using the experimental movie3 stim to play a video file. Path of video\nneeds to updated to point to a video you have. movie2 does /not/ require\navbin to be ins... | diff --git a/psychopy/visual/movie3.py b/psychopy/visual/movie3.py
index 7eacff0056..56504bba4e 100644
--- a/psychopy/visual/movie3.py
+++ b/psychopy/visual/movie3.py
@@ -257,11 +257,12 @@ def stop(self, log=True):
"""
if self.status != STOPPED:
self.status = STOPPED
+ self._un... |
saleor__saleor-14631 | Bug: productBulkCreate issue with slug creation
### What are you trying to achieve?
Create products with `productBulkCreate` mutation, but their name consists only characters which can't be in slugs (for example "-").
Related PR #14378
### Steps to reproduce the problem
1. Send mutation:
```
mutation Bulk... | [
{
"content": "from collections import defaultdict\nfrom datetime import datetime\n\nimport graphene\nimport pytz\nfrom django.core.exceptions import ValidationError\nfrom django.core.files import File\nfrom django.db.models import F\nfrom django.utils.text import slugify\nfrom graphene.utils.str_converters impo... | [
{
"content": "from collections import defaultdict\nfrom datetime import datetime\n\nimport graphene\nimport pytz\nfrom django.core.exceptions import ValidationError\nfrom django.core.files import File\nfrom django.db.models import F\nfrom django.utils.text import slugify\nfrom graphene.utils.str_converters impo... | diff --git a/saleor/graphql/product/bulk_mutations/product_bulk_create.py b/saleor/graphql/product/bulk_mutations/product_bulk_create.py
index 3b3de509c97..77de5fc6ba0 100644
--- a/saleor/graphql/product/bulk_mutations/product_bulk_create.py
+++ b/saleor/graphql/product/bulk_mutations/product_bulk_create.py
@@ -210,6 +... |
mathesar-foundation__mathesar-746 | Set up integration testing environment
## Problem
We need to setup an integration test environment for Mathesar, to test all user action scenarios.
## Proposed solution
Based on the discussions we've had previously (#89), the most suitable choice for us is [Playwright](https://playwright.dev/).
Integ tests requ... | [
{
"content": "\"\"\"\nThis script installs functions and types for Mathesar onto the configured DB.\n\"\"\"\nfrom config.settings import DATABASES\nfrom db import install\nimport sys\nimport getopt\n\n\ndef main():\n skip_confirm = False\n (opts, _) = getopt.getopt(sys.argv[1:], \":s\", [\"skip-confirm\"]... | [
{
"content": "\"\"\"\nThis script installs functions and types for Mathesar onto the configured DB.\n\"\"\"\nfrom config.settings import DATABASES\nfrom db import install\nimport sys\nimport getopt\n\n\ndef main():\n skip_confirm = False\n (opts, _) = getopt.getopt(sys.argv[1:], \":s\", [\"skip-confirm\"]... | diff --git a/.github/workflows/run-e2e-integ-tests.yml b/.github/workflows/run-e2e-integ-tests.yml
new file mode 100644
index 0000000000..54ddc59313
--- /dev/null
+++ b/.github/workflows/run-e2e-integ-tests.yml
@@ -0,0 +1,56 @@
+name: Run E2E integration tests
+on: [push, pull_request]
+
+jobs:
+ build:
+ runs-on: ... |
deepchecks__deepchecks-1098 | [FEAT][CV] Add a "per-class" option to property drift & heatmap comparison
In this per class option, the drift would be shown per class for the top drifted classes.
| [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nImage Property Drift Check\n**************************\nThis notebooks provides an overview for using and understanding the image property drift check.\n\n**Structure:**\n\n* `How Does the ImagePropertyDrift Check Work? <#how-does-the-imagepropertydrift-check-work>... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nImage Property Drift Check\n**************************\nThis notebooks provides an overview for using and understanding the image property drift check.\n\n**Structure:**\n\n* `How Does the ImagePropertyDrift Check Work? <#how-does-the-imagepropertydrift-check-work>... | diff --git a/docs/source/examples/vision/checks/distribution/source/plot_image_property_check.py b/docs/source/examples/vision/checks/distribution/source/plot_image_property_check.py
index 5e82cf3c6d..bdb1363020 100644
--- a/docs/source/examples/vision/checks/distribution/source/plot_image_property_check.py
+++ b/docs/... |
ansible-collections__amazon.aws-612 | ec2_vol passes null iops to boto when changing type w/ existing iops value
### Summary
When attempting to modify an existing io1 volume to io2 and supplying the existing iops value, the iops in req_obj is never set and boto rejects it due to the missing required parameter.
https://github.com/ansible-collections/a... | [
{
"content": "#!/usr/bin/python\n# Copyright: Ansible Project\n# GNU General Public License v3.0+\n# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: ec2_vol\nversion_added: ... | [
{
"content": "#!/usr/bin/python\n# Copyright: Ansible Project\n# GNU General Public License v3.0+\n# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: ec2_vol\nversion_added: ... | diff --git a/changelogs/fragments/606-ec2_vol-set-iops-even-if-unchanged-for-boto-req.yml b/changelogs/fragments/606-ec2_vol-set-iops-even-if-unchanged-for-boto-req.yml
new file mode 100644
index 00000000000..c3c1580d463
--- /dev/null
+++ b/changelogs/fragments/606-ec2_vol-set-iops-even-if-unchanged-for-boto-req.yml
@@... |
scikit-image__scikit-image-1903 | threshold_otsu raises exception when image is one color
Tested against current HEAD:
``` pycon
>>> import numpy as np
>>> from skimage.filters import threshold_otsu
>>> threshold_otsu(np.array([1,2,3]))
1
>>> threshold_otsu(np.array([1,1,1]))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
F... | [
{
"content": "__all__ = ['threshold_adaptive',\n 'threshold_otsu',\n 'threshold_yen',\n 'threshold_isodata',\n 'threshold_li', ]\n\nimport numpy as np\nfrom scipy import ndimage as ndi\nfrom ..exposure import histogram\nfrom .._shared.utils import assert_nD\nimport warnin... | [
{
"content": "__all__ = ['threshold_adaptive',\n 'threshold_otsu',\n 'threshold_yen',\n 'threshold_isodata',\n 'threshold_li', ]\n\nimport numpy as np\nfrom scipy import ndimage as ndi\nfrom ..exposure import histogram\nfrom .._shared.utils import assert_nD\nimport warnin... | diff --git a/skimage/filters/tests/test_thresholding.py b/skimage/filters/tests/test_thresholding.py
index 16682610eac..4c14b8b6940 100644
--- a/skimage/filters/tests/test_thresholding.py
+++ b/skimage/filters/tests/test_thresholding.py
@@ -1,5 +1,7 @@
import numpy as np
-from numpy.testing import assert_equal, assert... |
certbot__certbot-2248 | VersionConflict: ConfigArgParse 0.9.3
Hello,
I tried renewing our certificates today, and I got an error from letsencrypt-auto. The error message was:
VersionConflict: (ConfigArgParse 0.9.3 (/home/bogdanb/.local/share/letsencrypt/lib/python2.7/site-packages), Requirement.parse('ConfigArgParse>=0.10.0'))
Please see t... | [
{
"content": "import codecs\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\nfrom setuptools import find_packages\n\n# Workaround for http://bugs.python.org/issue8876, see\n# http://bugs.python.org/issue8876#msg208792\n# This can be removed when using Python 2.7.9 or later:\n# https://hg.pytho... | [
{
"content": "import codecs\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\nfrom setuptools import find_packages\n\n# Workaround for http://bugs.python.org/issue8876, see\n# http://bugs.python.org/issue8876#msg208792\n# This can be removed when using Python 2.7.9 or later:\n# https://hg.pytho... | diff --git a/setup.py b/setup.py
index 4d9cc7850b4..cc2bb449a3f 100644
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,10 @@ def read_file(filename, encoding='utf8'):
# Please update tox.ini when modifying dependency version requirements
install_requires = [
'acme=={0}'.format(version),
- 'ConfigArgParse>=0.10.0',... |
openshift__openshift-ansible-9895 | During upgrade openvswitch is being stopped even when we have openshift_use_openshift_sdn=false
#### Description
when we specify openshift_use_openshift_sdn=false in the hosts file it is supposed that other solution will manage the networking. During upgrade stop_services.yml stops openvswitch even when we have open... | [
{
"content": "\"\"\"\nAnsible action plugin to ensure inventory variables are set\nappropriately and no conflicting options have been provided.\n\"\"\"\nimport json\nimport re\n\nfrom ansible.plugins.action import ActionBase\nfrom ansible import errors\n# pylint: disable=import-error,no-name-in-module\nfrom ans... | [
{
"content": "\"\"\"\nAnsible action plugin to ensure inventory variables are set\nappropriately and no conflicting options have been provided.\n\"\"\"\nimport json\nimport re\n\nfrom ansible.plugins.action import ActionBase\nfrom ansible import errors\n# pylint: disable=import-error,no-name-in-module\nfrom ans... | diff --git a/roles/lib_utils/action_plugins/sanity_checks.py b/roles/lib_utils/action_plugins/sanity_checks.py
index a4820c02451..2b335cf6804 100644
--- a/roles/lib_utils/action_plugins/sanity_checks.py
+++ b/roles/lib_utils/action_plugins/sanity_checks.py
@@ -20,7 +20,8 @@
('openshift_use_nuage', F... |
networkx__networkx-4925 | Add destringizer example to read_gml docstring
IMO it would be a nice addition to add a simple example of the `destringizer` parameter to the `read_gml` docstring. See #4854 for inspiration.
| [
{
"content": "\"\"\"\nRead graphs in GML format.\n\n\"GML, the Graph Modelling Language, is our proposal for a portable\nfile format for graphs. GML's key features are portability, simple\nsyntax, extensibility and flexibility. A GML file consists of a\nhierarchical key-value lists. Graphs can be annotated with... | [
{
"content": "\"\"\"\nRead graphs in GML format.\n\n\"GML, the Graph Modelling Language, is our proposal for a portable\nfile format for graphs. GML's key features are portability, simple\nsyntax, extensibility and flexibility. A GML file consists of a\nhierarchical key-value lists. Graphs can be annotated with... | diff --git a/networkx/readwrite/gml.py b/networkx/readwrite/gml.py
index a2f5a0b50ec..153e6a0e2d1 100644
--- a/networkx/readwrite/gml.py
+++ b/networkx/readwrite/gml.py
@@ -163,8 +163,20 @@ def read_gml(path, label="label", destringizer=None):
--------
>>> G = nx.path_graph(4)
>>> nx.write_gml(G, "test.g... |
jazzband__django-axes-1036 | Would HTTP 429s be more appropriate?
I recently had a penetration tester question whether or not django-axes was working because it returned the same 403 code as an invalid password attempt.
I did verify it was working correctly, but I thought I would raise the issue for discussion on whether there would be merit to... | [
{
"content": "from django.conf import settings\nfrom django.utils.translation import gettext_lazy as _\n\n# disable plugin when set to False\nsettings.AXES_ENABLED = getattr(settings, \"AXES_ENABLED\", True)\n\n# see if the user has overridden the failure limit\nsettings.AXES_FAILURE_LIMIT = getattr(settings, \... | [
{
"content": "from django.conf import settings\nfrom django.utils.translation import gettext_lazy as _\n\n# disable plugin when set to False\nsettings.AXES_ENABLED = getattr(settings, \"AXES_ENABLED\", True)\n\n# see if the user has overridden the failure limit\nsettings.AXES_FAILURE_LIMIT = getattr(settings, \... | diff --git a/axes/conf.py b/axes/conf.py
index c3999e55..eea9b46b 100644
--- a/axes/conf.py
+++ b/axes/conf.py
@@ -141,7 +141,7 @@
settings.AXES_CLIENT_STR_CALLABLE = getattr(settings, "AXES_CLIENT_STR_CALLABLE", None)
# set the HTTP response code given by too many requests
-settings.AXES_HTTP_RESPONSE_CODE = getat... |
bokeh__bokeh-7188 | RangeSlider css_classes not being updated anymore
It seems in 0.12.7 the `css_classes` attribute of the RangeSlider is not being updated anymore by the callbacks. It was working in 0.12.6.
In the example below, both the text input and the slider starts with the `initial` class as expected. When the slider changes, bot... | [
{
"content": "''' Various kinds of layout components.\n\n'''\nfrom __future__ import absolute_import\n\nimport logging\nlogger = logging.getLogger(__name__)\n\nfrom ..core.enums import SizingMode\nfrom ..core.has_props import abstract\nfrom ..core.properties import Bool, Enum, Int, Instance, List, Seq, String\n... | [
{
"content": "''' Various kinds of layout components.\n\n'''\nfrom __future__ import absolute_import\n\nimport logging\nlogger = logging.getLogger(__name__)\n\nfrom ..core.enums import SizingMode\nfrom ..core.has_props import abstract\nfrom ..core.properties import Bool, Enum, Int, Instance, List, Seq, String\n... | diff --git a/bokeh/models/layouts.py b/bokeh/models/layouts.py
index 7db064caddb..003d8f238e3 100644
--- a/bokeh/models/layouts.py
+++ b/bokeh/models/layouts.py
@@ -58,10 +58,14 @@ class LayoutDOM(Model):
""")
- css_classes = Seq(String, help="""
+ # List in order for in-place changes to trigger changes,... |
google__clusterfuzz-189 | linting in CI works differently than locally
I'm pretty sure it is pylint 1.9.4.
See https://github.com/google/clusterfuzz/pull/185 for a discrepancy I noticed between running pylint locally and running it in CI.
When I upgraded my local copy of pylint to 1.9.4 I was able to discover the issue showing up in CI.
| [
{
"content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/src/local/butler/lint.py b/src/local/butler/lint.py
index 42d982807f..f4b73f4f1d 100644
--- a/src/local/butler/lint.py
+++ b/src/local/butler/lint.py
@@ -16,11 +16,15 @@
import os
import sys
+from local.butler import appengine
from local.butler import common
def execute(_):
"""Lint changed cod... |
bookwyrm-social__bookwyrm-1220 | Error 404 when trying to edit book
**Describe the bug**
When I'm on a book page and look at “Your Reviews”, and then try to edit the book, it says “Not Found”.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to a book page of a book you have reviewed
2. Click on “Your reviews”
3. Click on “Edit Book”
4... | [
{
"content": "\"\"\" url routing for the app and api \"\"\"\nfrom django.conf.urls.static import static\nfrom django.contrib import admin\nfrom django.urls import path, re_path\nfrom django.views.generic.base import TemplateView\n\nfrom bookwyrm import settings, views\nfrom bookwyrm.utils import regex\n\nUSER_P... | [
{
"content": "\"\"\" url routing for the app and api \"\"\"\nfrom django.conf.urls.static import static\nfrom django.contrib import admin\nfrom django.urls import path, re_path\nfrom django.views.generic.base import TemplateView\n\nfrom bookwyrm import settings, views\nfrom bookwyrm.utils import regex\n\nUSER_P... | diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html
index d721d4fd59..9a75cbe94f 100644
--- a/bookwyrm/templates/book/book.html
+++ b/bookwyrm/templates/book/book.html
@@ -47,7 +47,7 @@ <h1 class="title" itemprop="name">
{% if user_authenticated and can_edit_book %}
<d... |
readthedocs__readthedocs.org-3111 | Click twice in the 404 sustainability link doesn't work
## Steps to reproduce it
1. Go to https://readthedocs.org/humitos
2. You will see a 404 page with a sustainability link (https://readthedocs.org/sustainability/click/90/EdfO7Jed1YQr/)
3. Click on it
4. It goes to Sentry home page
5. Go back and click it aga... | [
{
"content": "\"\"\"Donation views\"\"\"\n# We use 'hash' heavily in the API here.\n# pylint: disable=redefined-builtin\n\nfrom __future__ import absolute_import\nimport logging\n\nfrom django.views.generic import TemplateView\nfrom django.core.urlresolvers import reverse\nfrom django.utils.translation import u... | [
{
"content": "\"\"\"Donation views\"\"\"\n# We use 'hash' heavily in the API here.\n# pylint: disable=redefined-builtin\n\nfrom __future__ import absolute_import\nimport logging\n\nfrom django.views.generic import TemplateView\nfrom django.core.urlresolvers import reverse\nfrom django.utils.translation import u... | diff --git a/readthedocs/donate/views.py b/readthedocs/donate/views.py
index b9fb5aaaf6c..b4860f1d0de 100644
--- a/readthedocs/donate/views.py
+++ b/readthedocs/donate/views.py
@@ -135,7 +135,6 @@ def click_proxy(request, promo_id, hash):
)
)
cache.incr(promo.cache_key(type=CLICKS, hash=h... |
ansible-collections__amazon.aws-606 | ec2_vol passes null iops to boto when changing type w/ existing iops value
### Summary
When attempting to modify an existing io1 volume to io2 and supplying the existing iops value, the iops in req_obj is never set and boto rejects it due to the missing required parameter.
https://github.com/ansible-collections/a... | [
{
"content": "#!/usr/bin/python\n# Copyright: Ansible Project\n# GNU General Public License v3.0+\n# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: ec2_vol\nversion_added: ... | [
{
"content": "#!/usr/bin/python\n# Copyright: Ansible Project\n# GNU General Public License v3.0+\n# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: ec2_vol\nversion_added: ... | diff --git a/changelogs/fragments/606-ec2_vol-set-iops-even-if-unchanged-for-boto-req.yml b/changelogs/fragments/606-ec2_vol-set-iops-even-if-unchanged-for-boto-req.yml
new file mode 100644
index 00000000000..c3c1580d463
--- /dev/null
+++ b/changelogs/fragments/606-ec2_vol-set-iops-even-if-unchanged-for-boto-req.yml
@@... |
pfnet__pytorch-pfn-extras-150 | Add test for `LogWriterSaveFunc`
Add tests check if the output of `LogWriterSaveFunc` follows the specified format.
| [
{
"content": "import json\n\nfrom pytorch_pfn_extras import reporting\nfrom pytorch_pfn_extras.training import extension\nfrom pytorch_pfn_extras.training import trigger as trigger_module\n\ntry:\n import pandas\n\n _pandas_available = True\nexcept ImportError:\n _pandas_available = False\n\n\nclass Lo... | [
{
"content": "import json\n\nfrom pytorch_pfn_extras import reporting\nfrom pytorch_pfn_extras.training import extension\nfrom pytorch_pfn_extras.training import trigger as trigger_module\n\ntry:\n import pandas\n\n _pandas_available = True\nexcept ImportError:\n _pandas_available = False\n\n\nclass Lo... | diff --git a/pytorch_pfn_extras/training/extensions/log_report.py b/pytorch_pfn_extras/training/extensions/log_report.py
index e73a0173e..0ca658a3f 100644
--- a/pytorch_pfn_extras/training/extensions/log_report.py
+++ b/pytorch_pfn_extras/training/extensions/log_report.py
@@ -26,8 +26,9 @@ def __call__(self, target, fi... |
chainer__chainer-5737 | Wrong usage of downsample_fb in ResNet
The output of model `chainer.links.ResNet50Layers` seems to be wrong in Chainer 5.0.0, in contrast to 4.4.0.
```
import chainer
import scipy.misc
model = chainer.links.ResNet50Layers()
img = scipy.misc.imread("/some/image.jpg")
prep = img.copy()
y=(prep.shape[0]-224)//2
... | [
{
"content": "import collections\nimport os\nimport sys\n\nimport numpy\ntry:\n from PIL import Image\n available = True\nexcept ImportError as e:\n available = False\n _import_error = e\n\nimport chainer\nfrom chainer.dataset.convert import concat_examples\nfrom chainer.dataset import download\nfro... | [
{
"content": "import collections\nimport os\nimport sys\n\nimport numpy\ntry:\n from PIL import Image\n available = True\nexcept ImportError as e:\n available = False\n _import_error = e\n\nimport chainer\nfrom chainer.dataset.convert import concat_examples\nfrom chainer.dataset import download\nfro... | diff --git a/chainer/links/model/vision/resnet.py b/chainer/links/model/vision/resnet.py
index 5fa28c430b57..4336009cd0a4 100644
--- a/chainer/links/model/vision/resnet.py
+++ b/chainer/links/model/vision/resnet.py
@@ -616,7 +616,7 @@ def __init__(self, in_channels, mid_channels, out_channels,
# In the origina... |
sbi-dev__sbi-1155 | Density Estimator batched sample mixes up samples from different posteriors
**Describe the bug**
Given a batched observation, i.e., x1 and x2, the sampling method mixes up samples from different distributions.
**To Reproduce**
```python
import torch
from sbi import analysis as analysis
from sbi import utils a... | [
{
"content": "# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed\n# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>\n\nfrom typing import Tuple\n\nimport torch\nfrom pyknos.nflows.flows import Flow\nfrom torch import Tensor, nn\n\nfrom sbi.neural_n... | [
{
"content": "# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed\n# under the Apache License Version 2.0, see <https://www.apache.org/licenses/>\n\nfrom typing import Tuple\n\nimport torch\nfrom pyknos.nflows.flows import Flow\nfrom torch import Tensor, nn\n\nfrom sbi.neural_n... | diff --git a/sbi/neural_nets/density_estimators/nflows_flow.py b/sbi/neural_nets/density_estimators/nflows_flow.py
index a1de5355c..8d6aaba55 100644
--- a/sbi/neural_nets/density_estimators/nflows_flow.py
+++ b/sbi/neural_nets/density_estimators/nflows_flow.py
@@ -135,12 +135,8 @@ def sample(self, sample_shape: Shape, ... |
AUTOMATIC1111__stable-diffusion-webui-7691 | [Bug]: OSError: cannot write mode I;16 as JPEG
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
I used `stable-diffusion-webui-depthmap-script` to generate depthmaps. They are supposed to be saved as 16-bit grayscale PNGs. How... | [
{
"content": "import datetime\r\nimport sys\r\nimport traceback\r\n\r\nimport pytz\r\nimport io\r\nimport math\r\nimport os\r\nfrom collections import namedtuple\r\nimport re\r\n\r\nimport numpy as np\r\nimport piexif\r\nimport piexif.helper\r\nfrom PIL import Image, ImageFont, ImageDraw, PngImagePlugin\r\nfrom... | [
{
"content": "import datetime\r\nimport sys\r\nimport traceback\r\n\r\nimport pytz\r\nimport io\r\nimport math\r\nimport os\r\nfrom collections import namedtuple\r\nimport re\r\n\r\nimport numpy as np\r\nimport piexif\r\nimport piexif.helper\r\nfrom PIL import Image, ImageFont, ImageDraw, PngImagePlugin\r\nfrom... | diff --git a/modules/images.py b/modules/images.py
index c2ca8849de8..b335502b4c6 100644
--- a/modules/images.py
+++ b/modules/images.py
@@ -553,6 +553,8 @@ def _atomically_save_image(image_to_save, filename_without_extension, extension)
elif extension.lower() in (".jpg", ".jpeg", ".webp"):
if im... |
docker__docker-py-1736 | exec_start does not return command output
I encountered this problem in my work and managed to write an isolated exposing test case attached to this issue.
This program works well on Linux Mint 18.3 and Docker version 17.05.0-ce, build 89658be
but fails on Centos 7.3 with Docker version 1.13.1, build b303bf6/1.13.1... | [
{
"content": "import errno\nimport os\nimport select\nimport struct\n\nimport six\n\ntry:\n from ..transport import NpipeSocket\nexcept ImportError:\n NpipeSocket = type(None)\n\n\nclass SocketError(Exception):\n pass\n\n\ndef read(socket, n=4096):\n \"\"\"\n Reads at most n bytes from socket\n ... | [
{
"content": "import errno\nimport os\nimport select\nimport struct\n\nimport six\n\ntry:\n from ..transport import NpipeSocket\nexcept ImportError:\n NpipeSocket = type(None)\n\n\nclass SocketError(Exception):\n pass\n\n\ndef read(socket, n=4096):\n \"\"\"\n Reads at most n bytes from socket\n ... | diff --git a/docker/utils/socket.py b/docker/utils/socket.py
index 54392d2b7..c3a5f90fc 100644
--- a/docker/utils/socket.py
+++ b/docker/utils/socket.py
@@ -59,7 +59,7 @@ def next_frame_size(socket):
try:
data = read_exactly(socket, 8)
except SocketError:
- return 0
+ return -1
_... |
open-telemetry__opentelemetry-python-391 | Missing ABC for Metric
[Missing ABC](https://github.com/open-telemetry/opentelemetry-python/blob/master/opentelemetry-api/src/opentelemetry/metrics/__init__.py#L90) for `Metric` seems strange to me.
I guess in the PR #311 and Issue #66 settle to add ABC for all interfaces.
Maybe it should look like:
```python
... | [
{
"content": "# Copyright 2019, 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 ... | [
{
"content": "# Copyright 2019, 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 ... | diff --git a/opentelemetry-api/src/opentelemetry/metrics/__init__.py b/opentelemetry-api/src/opentelemetry/metrics/__init__.py
index 947d57b976d..c6b339be13c 100644
--- a/opentelemetry-api/src/opentelemetry/metrics/__init__.py
+++ b/opentelemetry-api/src/opentelemetry/metrics/__init__.py
@@ -87,13 +87,14 @@ class Defau... |
data-for-change__anyway-164 | Move to postgres
That's the database of choice hasadna uses
<!---
@huboard:{"order":125.5,"milestone_order":81,"custom_state":""}
-->
| [
{
"content": "import os\n\n#\n# This is the configuration file of the application\n#\n# Please make sure you don't store here any secret information and use environment\n# variables\n#\n\n\nSQLALCHEMY_DATABASE_URI = os.environ.get('CLEARDB_DATABASE_URL')\nSQLALCHEMY_POOL_RECYCLE = 60\n\n\nSECRET_KEY = 'aiosdjsa... | [
{
"content": "import os\n\n#\n# This is the configuration file of the application\n#\n# Please make sure you don't store here any secret information and use environment\n# variables\n#\n\n\nSQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL')\nSQLALCHEMY_POOL_RECYCLE = 60\n\n\nSECRET_KEY = 'aiosdjsaodjoidji... | diff --git a/README.md b/README.md
index 925238673..947ae1827 100644
--- a/README.md
+++ b/README.md
@@ -51,8 +51,8 @@ Contributing
## Local First Run
1. Define connection string:
- * bash: `export CLEARDB_DATABASE_URL='sqlite:///local.db'`
- * windows shell: `set CLEARDB_DATABASE_URL="sqlite:///local.db"`
+ * b... |
conan-io__conan-2859 | UnboundLocalError when using VisualStudioBuildEnvironment
I keep getting the following python error when using `VisualStudioBuildEnvironment` with conan 1.3.1.
```python
env_build = VisualStudioBuildEnvironment(self)
UnboundLocalError: local variable 'flags' referenced before assignment
```
I think I found the pro... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n # Visual Studio cl options reference:\n # https://msdn.microsoft.com/en-us/library/610ecb4h.aspx\n # \"Options are specified by either a forward slash (/) or a dash (–).\"\n # Here we use \"-\" better than \"/\" that ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n # Visual Studio cl options reference:\n # https://msdn.microsoft.com/en-us/library/610ecb4h.aspx\n # \"Options are specified by either a forward slash (/) or a dash (–).\"\n # Here we use \"-\" better than \"/\" that ... | diff --git a/conans/client/build/compiler_flags.py b/conans/client/build/compiler_flags.py
index fd05f184525..9ec94021f9f 100644
--- a/conans/client/build/compiler_flags.py
+++ b/conans/client/build/compiler_flags.py
@@ -96,7 +96,7 @@ def build_type_flags(compiler, build_type, vs_toolset=None):
"R... |
ansible-collections__amazon.aws-614 | ec2_vol passes null iops to boto when changing type w/ existing iops value
### Summary
When attempting to modify an existing io1 volume to io2 and supplying the existing iops value, the iops in req_obj is never set and boto rejects it due to the missing required parameter.
https://github.com/ansible-collections/a... | [
{
"content": "#!/usr/bin/python\n# Copyright: Ansible Project\n# GNU General Public License v3.0+\n# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: ec2_vol\nversion_added: ... | [
{
"content": "#!/usr/bin/python\n# Copyright: Ansible Project\n# GNU General Public License v3.0+\n# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: ec2_vol\nversion_added: ... | diff --git a/changelogs/fragments/606-ec2_vol-set-iops-even-if-unchanged-for-boto-req.yml b/changelogs/fragments/606-ec2_vol-set-iops-even-if-unchanged-for-boto-req.yml
new file mode 100644
index 00000000000..c3c1580d463
--- /dev/null
+++ b/changelogs/fragments/606-ec2_vol-set-iops-even-if-unchanged-for-boto-req.yml
@@... |
PennyLaneAI__pennylane-3962 | Jitting qnode fails with ParametrizedEvolution
### Expected behavior
Running the function with and without `jax.jit` would produce the same results when passing a single float for time
### Actual behavior
It raises a `TracerArrayConversionError` with jitting
### Additional information
The error goes away if in lin... | [
{
"content": "# Copyright 2018-2023 Xanadu Quantum Technologies 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# Unle... | [
{
"content": "# Copyright 2018-2023 Xanadu Quantum Technologies 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# Unle... | diff --git a/pennylane/pulse/parametrized_evolution.py b/pennylane/pulse/parametrized_evolution.py
index a255ae77385..36d070ae2db 100644
--- a/pennylane/pulse/parametrized_evolution.py
+++ b/pennylane/pulse/parametrized_evolution.py
@@ -385,7 +385,9 @@ def __init__(
if t is None:
self.t = None
... |
wagtail__wagtail-822 | Unicode content in rich text causes error
Steps to reproduce:
1. Using the wagtail interface, create a new instance of a page derived model which has a rich text field
2. In the rich text field, include unicode characters such as: `©` or `’`
3. Publish the page
The page will be published fine, and probably rend... | [
{
"content": "from django.forms.widgets import Widget\nfrom django.utils.safestring import mark_safe\n\n\nclass WidgetWithScript(Widget):\n def render(self, name, value, attrs=None):\n widget = super(WidgetWithScript, self).render(name, value, attrs)\n\n final_attrs = self.build_attrs(attrs, na... | [
{
"content": "from __future__ import absolute_import, unicode_literals\n\nfrom django.forms.widgets import Widget\nfrom django.utils.safestring import mark_safe\n\n\nclass WidgetWithScript(Widget):\n def render(self, name, value, attrs=None):\n widget = super(WidgetWithScript, self).render(name, value... | diff --git a/wagtail/utils/widgets.py b/wagtail/utils/widgets.py
index 48070451d352..8ae51ce6b9f2 100644
--- a/wagtail/utils/widgets.py
+++ b/wagtail/utils/widgets.py
@@ -1,3 +1,5 @@
+from __future__ import absolute_import, unicode_literals
+
from django.forms.widgets import Widget
from django.utils.safestring import... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.