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 ⌀ |
|---|---|---|---|---|
nilearn__nilearn-553 | signal.clean with standardize=False
The behavior of signal.clean with standardize=False is different whether one includes or not confounds. If confounds to remove, the input signal and the confounds are standardized even though standardize=False.
The standard choice for scaling signals within ROIs (e.g. MarsBaR, Conn)... | [
{
"content": "\"\"\"\nPreprocessing functions for time series.\n\nAll functions in this module should take X matrices with samples x\nfeatures\n\"\"\"\n# Authors: Alexandre Abraham, Gael Varoquaux, Philippe Gervais\n# License: simplified BSD\n\nimport distutils.version\nimport warnings\n\nimport numpy as np\nim... | [
{
"content": "\"\"\"\nPreprocessing functions for time series.\n\nAll functions in this module should take X matrices with samples x\nfeatures\n\"\"\"\n# Authors: Alexandre Abraham, Gael Varoquaux, Philippe Gervais\n# License: simplified BSD\n\nimport distutils.version\nimport warnings\n\nimport numpy as np\nim... | diff --git a/nilearn/signal.py b/nilearn/signal.py
index e77f8913b9..6b2713c3a1 100644
--- a/nilearn/signal.py
+++ b/nilearn/signal.py
@@ -408,14 +408,9 @@ def clean(signals, detrend=True, standardize=True, confounds=None,
(list, tuple, _basestring, np.ndarray, type(None))):
raise TypeEr... |
vllm-project__vllm-2028 | Specify `--load-format pt` for Mixtral
As explained [here](https://huggingface.co/mistralai/Mixtral-8x7B-v0.1/discussions/3), HF pushed some changes to the official repo to make it compatible with `transformers==4.36.0.dev0`. Need to double check that this does not break vLLM integration (in particular, we don't want t... | [
{
"content": "from typing import Optional, Union\nimport os\n\nimport torch\nfrom transformers import PretrainedConfig\n\nfrom vllm.logger import init_logger\nfrom vllm.transformers_utils.config import get_config\nfrom vllm.utils import get_cpu_memory, is_hip\n\nlogger = init_logger(__name__)\n\n_GB = 1 << 30\n... | [
{
"content": "from typing import Optional, Union\nimport os\n\nimport torch\nfrom transformers import PretrainedConfig\n\nfrom vllm.logger import init_logger\nfrom vllm.transformers_utils.config import get_config\nfrom vllm.utils import get_cpu_memory, is_hip\n\nlogger = init_logger(__name__)\n\n_GB = 1 << 30\n... | diff --git a/vllm/config.py b/vllm/config.py
index a2739e5f7d4..6bafa73c7a9 100644
--- a/vllm/config.py
+++ b/vllm/config.py
@@ -119,6 +119,16 @@ def _verify_load_format(self) -> None:
# Force ROCm to load from pt weights if nothing specific is set
if load_format == "auto":
lo... |
holoviz__holoviews-2088 | Unable to plot empty Image or Raster
```python
hv.Image([])
```
This is possible with a lot of other `holoviews` plot objects.
| [
{
"content": "from operator import itemgetter\nimport numpy as np\nimport colorsys\nimport param\n\nfrom ..core import util\nfrom ..core.data import ImageInterface\nfrom ..core import Dimension, Element2D, Overlay, Dataset\nfrom ..core.boundingregion import BoundingRegion, BoundingBox\nfrom ..core.sheetcoords i... | [
{
"content": "from operator import itemgetter\nimport numpy as np\nimport colorsys\nimport param\n\nfrom ..core import util\nfrom ..core.data import ImageInterface\nfrom ..core import Dimension, Element2D, Overlay, Dataset\nfrom ..core.boundingregion import BoundingRegion, BoundingBox\nfrom ..core.sheetcoords i... | diff --git a/holoviews/element/raster.py b/holoviews/element/raster.py
index ca7e5378f4..36522d6a23 100644
--- a/holoviews/element/raster.py
+++ b/holoviews/element/raster.py
@@ -230,7 +230,10 @@ class Image(Dataset, Raster, SheetCoordinateSystem):
def __init__(self, data, kdims=None, vdims=None, bounds=None, exte... |
pypa__setuptools-3309 | package_data not doing recursive glob calls
Even though glob supports it, glob support for recursive ** searching is not enabled when specifying package_data. This is not clear in the documentation.
https://github.com/pypa/setuptools/blob/a94ccbf404a79d56f9b171024dee361de9a948da/setuptools/command/build_py.py#L106
... | [
{
"content": "from glob import glob\nfrom distutils.util import convert_path\nimport distutils.command.build_py as orig\nimport os\nimport fnmatch\nimport textwrap\nimport io\nimport distutils.errors\nimport itertools\nimport stat\nfrom setuptools.extern.more_itertools import unique_everseen\n\n\ndef make_writa... | [
{
"content": "from functools import partial\nfrom glob import glob\nfrom distutils.util import convert_path\nimport distutils.command.build_py as orig\nimport os\nimport fnmatch\nimport textwrap\nimport io\nimport distutils.errors\nimport itertools\nimport stat\nfrom setuptools.extern.more_itertools import uniq... | diff --git a/changelog.d/1806.change.rst b/changelog.d/1806.change.rst
new file mode 100644
index 0000000000..100b689967
--- /dev/null
+++ b/changelog.d/1806.change.rst
@@ -0,0 +1 @@
+Allowed recursive globs (`**`) in `package_data`. -- by :user:`nullableVoidPtr`
diff --git a/setuptools/command/build_py.py b/setuptools... |
bokeh__bokeh-8466 | "CustomJS for Selections" Example in Docs Broken
In the latest version of the docs, it appears [this example]( https://bokeh.pydata.org/en/latest/docs/user_guide/interaction/callbacks.html#customjs-for-selections ) is broken. This is also true of the example in the Bokeh 1.0.0 docs. Selecting points in the plot on the ... | [
{
"content": "from random import random\n\nfrom bokeh.layouts import row\nfrom bokeh.models import CustomJS, ColumnDataSource\nfrom bokeh.plotting import figure, output_file, show\n\noutput_file(\"callback.html\")\n\nx = [random() for x in range(500)]\ny = [random() for y in range(500)]\n\ns1 = ColumnDataSource... | [
{
"content": "from random import random\n\nfrom bokeh.layouts import row\nfrom bokeh.models import CustomJS, ColumnDataSource\nfrom bokeh.plotting import figure, output_file, show\n\noutput_file(\"callback.html\")\n\nx = [random() for x in range(500)]\ny = [random() for y in range(500)]\n\ns1 = ColumnDataSource... | diff --git a/sphinx/source/docs/user_guide/examples/interaction_callbacks_for_selections.py b/sphinx/source/docs/user_guide/examples/interaction_callbacks_for_selections.py
index 4fc2f8d85c9..da51bc80f80 100644
--- a/sphinx/source/docs/user_guide/examples/interaction_callbacks_for_selections.py
+++ b/sphinx/source/docs... |
openai__gym-1950 | Missing attrs in LazyFrames: dtype, shape
This is my own fault.. I managed to push the wrong branch in #1906
| [
{
"content": "from collections import deque\nimport numpy as np\n\nfrom gym.spaces import Box\nfrom gym import Wrapper\n\n\nclass LazyFrames(object):\n r\"\"\"Ensures common frames are only stored once to optimize memory use.\n\n To further reduce the memory use, it is optionally to turn on lz4 to\n co... | [
{
"content": "from collections import deque\nimport numpy as np\n\nfrom gym.spaces import Box\nfrom gym import Wrapper\n\n\nclass LazyFrames(object):\n r\"\"\"Ensures common frames are only stored once to optimize memory use.\n\n To further reduce the memory use, it is optionally to turn on lz4 to\n co... | diff --git a/gym/wrappers/frame_stack.py b/gym/wrappers/frame_stack.py
index 30ca76c909c..324b1d442bf 100644
--- a/gym/wrappers/frame_stack.py
+++ b/gym/wrappers/frame_stack.py
@@ -22,11 +22,11 @@ class LazyFrames(object):
__slots__ = ('frame_shape', 'dtype', 'shape', 'lz4_compress', '_frames')
def __init__... |
ultralytics__yolov5-1942 | wrong batch size after --resume on multiple GPUs
## 🐛 Bug
After running a training session on multiple GPUs, batch_size is read wrongly from opt.yaml causing an error.
## To Reproduce (REQUIRED)
Run this line:
```
python -m torch.distributed.launch --nproc_per_node 2 train.py --batch-size 30 --data coco128.yam... | [
{
"content": "import argparse\nimport logging\nimport math\nimport os\nimport random\nimport time\nfrom pathlib import Path\nfrom threading import Thread\n\nimport numpy as np\nimport torch.distributed as dist\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport torch.opt... | [
{
"content": "import argparse\nimport logging\nimport math\nimport os\nimport random\nimport time\nfrom pathlib import Path\nfrom threading import Thread\n\nimport numpy as np\nimport torch.distributed as dist\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport torch.opt... | diff --git a/train.py b/train.py
index 459c81c6130d..9aff01a42c08 100644
--- a/train.py
+++ b/train.py
@@ -477,7 +477,7 @@ def train(hyp, opt, device, tb_writer=None, wandb=None):
apriori = opt.global_rank, opt.local_rank
with open(Path(ckpt).parent.parent / 'opt.yaml') as f:
opt = argpar... |
qtile__qtile-3922 | Error when attempting to set a new wallpaper inside a custom lazy function
### The issue:
qtile installed from pacman, 0.21.0
relevant logs:
```bash
2022-08-20 03:12:47,410 ERROR libqtile base.py:cmd_function():L214 Exception calling "<function download_wallpaper at 0x7f38fc933490>":
Traceback (most recent call ... | [
{
"content": "# Copyright (c) 2009-2010 Aldo Cortesi\n# Copyright (c) 2010 matt\n# Copyright (c) 2010, 2012, 2014 dequis\n# Copyright (c) 2010 Philip Kranz\n# Copyright (c) 2010-2011 Paul Colomiets\n# Copyright (c) 2011 osebelin\n# Copyright (c) 2011 Mounier Florian\n# Copyright (c) 2011 Kenji_Takahashi\n# Copy... | [
{
"content": "# Copyright (c) 2009-2010 Aldo Cortesi\n# Copyright (c) 2010 matt\n# Copyright (c) 2010, 2012, 2014 dequis\n# Copyright (c) 2010 Philip Kranz\n# Copyright (c) 2010-2011 Paul Colomiets\n# Copyright (c) 2011 osebelin\n# Copyright (c) 2011 Mounier Florian\n# Copyright (c) 2011 Kenji_Takahashi\n# Copy... | diff --git a/libqtile/backend/x11/xcbq.py b/libqtile/backend/x11/xcbq.py
index 6e5ceb5a8e..574251a5b4 100644
--- a/libqtile/backend/x11/xcbq.py
+++ b/libqtile/backend/x11/xcbq.py
@@ -698,9 +698,13 @@ def paint(self, screen, image_path, mode=None):
width = max((win.x + win.width for win in root_windows))
... |
kartoza__prj.app-873 | No way to see approval requests for new projects
When a new project is registered, there is no convenient link for an admin to see. Maybe we should just approve it by default.....
| [
{
"content": "# coding=utf-8\nimport logging\nfrom django import forms\nfrom django.contrib.auth.models import User\nfrom django.forms import inlineformset_factory\nfrom django.utils.translation import ugettext_lazy as _\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import (\n Layout,... | [
{
"content": "# coding=utf-8\nimport logging\nfrom django import forms\nfrom django.contrib.auth.models import User\nfrom django.forms import inlineformset_factory\nfrom django.utils.translation import ugettext_lazy as _\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import (\n Layout,... | diff --git a/django_project/base/forms.py b/django_project/base/forms.py
index a9fb44823..b3932a949 100644
--- a/django_project/base/forms.py
+++ b/django_project/base/forms.py
@@ -147,6 +147,7 @@ def __init__(self, *args, **kwargs):
def save(self, commit=True):
instance = super(ProjectForm, self).save(... |
conan-io__conan-center-index-7436 | [request] imguizmo/1.83
### Package Details
* Package Name/Version: **imguizmo/1.83**
* Changelog: **https://github.com/CedricGuillemet/ImGuizmo/releases/tag/1.83**
The above mentioned version is newly released by the upstream project and not yet available as a recipe. Please add this version.
| [
{
"content": "import os\nimport glob\nfrom conans import ConanFile, CMake, tools\n\n\nclass ImGuizmoConan(ConanFile):\n name = \"imguizmo\"\n url = \"https://github.com/conan-io/conan-center-index\"\n homepage = \"https://github.com/CedricGuillemet/ImGuizmo\"\n description = \"Immediate mode 3D gizm... | [
{
"content": "import os\nimport glob\nfrom conans import ConanFile, CMake, tools\n\n\nclass ImGuizmoConan(ConanFile):\n name = \"imguizmo\"\n url = \"https://github.com/conan-io/conan-center-index\"\n homepage = \"https://github.com/CedricGuillemet/ImGuizmo\"\n description = \"Immediate mode 3D gizm... | diff --git a/recipes/imguizmo/all/conandata.yml b/recipes/imguizmo/all/conandata.yml
index 4a5b51cef7d8c..cf9bcdbb64f82 100644
--- a/recipes/imguizmo/all/conandata.yml
+++ b/recipes/imguizmo/all/conandata.yml
@@ -1,4 +1,7 @@
sources:
+ "1.83":
+ url: "https://github.com/CedricGuillemet/ImGuizmo/archive/refs/tags/1... |
django-import-export__django-import-export-1780 | Importing an xlsx file with no headers shows a blank screen
**Describe the bug**
If you import a file with no headers via the Admin Console then there is no error message to the user, instead a blank confirm screen is shown and the import has no effect.
It would perhaps be better to show a valid warning message a... | [
{
"content": "import logging\nimport warnings\n\nimport django\nfrom django.conf import settings\nfrom django.contrib import admin, messages\nfrom django.contrib.admin.models import ADDITION, CHANGE, DELETION, LogEntry\nfrom django.contrib.auth import get_permission_codename\nfrom django.contrib.contenttypes.mo... | [
{
"content": "import logging\nimport warnings\n\nimport django\nfrom django.conf import settings\nfrom django.contrib import admin, messages\nfrom django.contrib.admin.models import ADDITION, CHANGE, DELETION, LogEntry\nfrom django.contrib.auth import get_permission_codename\nfrom django.contrib.contenttypes.mo... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index 3ac5e9d77..7f42d3b5f 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -5,6 +5,11 @@ Changelog
Version 4 introduces breaking changes. Please refer to :doc:`release notes<release_notes>`.
+4.0.0-rc.2 (unreleased)
+-----------------------
+
+-... |
scikit-image__scikit-image-1762 | Infinite loop in exposure.equalize_adapthist()
The `equalize_adapthist()` function can hang, caused by the following:
When using a very small clip_limit parameter (e.g. 0.001) on a grayscale image with low contrast, the function `clip_histogram()` in `_adapthist.py` hangs in an infinite loop because the `n_excess` var... | [
{
"content": "\"\"\"\nAdapted code from \"Contrast Limited Adaptive Histogram Equalization\" by Karel\nZuiderveld <karel@cv.ruu.nl>, Graphics Gems IV, Academic Press, 1994.\n\nhttp://tog.acm.org/resources/GraphicsGems/gems.html#gemsvi\n\nThe Graphics Gems code is copyright-protected. In other words, you cannot... | [
{
"content": "\"\"\"\nAdapted code from \"Contrast Limited Adaptive Histogram Equalization\" by Karel\nZuiderveld <karel@cv.ruu.nl>, Graphics Gems IV, Academic Press, 1994.\n\nhttp://tog.acm.org/resources/GraphicsGems/gems.html#gemsvi\n\nThe Graphics Gems code is copyright-protected. In other words, you cannot... | diff --git a/skimage/exposure/_adapthist.py b/skimage/exposure/_adapthist.py
index 757dafffcb1..62ce2ecdbf6 100644
--- a/skimage/exposure/_adapthist.py
+++ b/skimage/exposure/_adapthist.py
@@ -244,6 +244,8 @@ def clip_histogram(hist, clip_limit):
n_excess -= mid.size * clip_limit - mid.sum()
hist[mid_mask] = ... |
vas3k__vas3k.club-264 | На странице профиля в блоке "последние комментарии" видны комменты к удаленным(скрытым) постам
Замечено, если откомментировать пост, который позже скрыли, то в блоке "последние комментарии" этот коммент все равно остается.
Предполагаю, что нужно всего лишь поправить фильтр запроса на комментарии, добавив проверку н... | [
{
"content": "from datetime import datetime, timedelta\n\nfrom django.conf import settings\nfrom django.contrib.postgres.search import SearchQuery\nfrom django.db.models import Count\nfrom django.http import Http404\nfrom django.shortcuts import render, redirect, get_object_or_404\nfrom django_q.tasks import as... | [
{
"content": "from datetime import datetime, timedelta\n\nfrom django.conf import settings\nfrom django.contrib.postgres.search import SearchQuery\nfrom django.db.models import Count\nfrom django.http import Http404\nfrom django.shortcuts import render, redirect, get_object_or_404\nfrom django_q.tasks import as... | diff --git a/users/views.py b/users/views.py
index 49193878c..24998d7e1 100644
--- a/users/views.py
+++ b/users/views.py
@@ -85,7 +85,7 @@ def profile(request, user_slug):
active_tags = {t.tag_id for t in UserTag.objects.filter(user=user).all()}
achievements = UserAchievement.objects.filter(user=user).select_... |
aws-cloudformation__cfn-lint-2226 | construct_yaml_map leading to TypeError: unhashable type: 'dict_node'
*cfn-lint version: 0.58.1*
*Unhandled `TypeError: unhashable type: 'dict_node'` thrown from construct_yaml_map.*
Please provide as much information as possible:
Utilising some slightly edited form of the example eks-nodegroup cfn, [see here fo... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport fileinput\nimport logging\nimport sys\nimport six\nfrom yaml.composer import Composer\nfrom yaml.reader import Reader\nfrom yaml.scanner import Scanner\nfrom yaml.resolver imp... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport fileinput\nimport logging\nimport sys\nimport six\nfrom yaml.composer import Composer\nfrom yaml.reader import Reader\nfrom yaml.scanner import Scanner\nfrom yaml.resolver imp... | diff --git a/src/cfnlint/decode/cfn_yaml.py b/src/cfnlint/decode/cfn_yaml.py
index ba1ab79c74..aa7db6dce3 100644
--- a/src/cfnlint/decode/cfn_yaml.py
+++ b/src/cfnlint/decode/cfn_yaml.py
@@ -103,7 +103,21 @@ def construct_yaml_map(self, node):
),
]
... |
iterative__dvc-6017 | metrics diff --show-md master: 'NoneType' object is not subscriptable
# Bug Report
Within master branch:
```sh
dvc metrics diff --show-md master
ERROR: unexpected error - 'NoneType' object is not subscriptable
Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
`... | [
{
"content": "import logging\nimport os\nimport typing\n\nfrom dvc.exceptions import OutputNotFoundError\nfrom dvc.path_info import PathInfo\nfrom dvc.utils import relpath\n\nfrom ._metadata import Metadata\nfrom .base import BaseFileSystem\n\nif typing.TYPE_CHECKING:\n from dvc.output.base import BaseOutput... | [
{
"content": "import logging\nimport os\nimport typing\n\nfrom dvc.exceptions import OutputNotFoundError\nfrom dvc.path_info import PathInfo\nfrom dvc.utils import relpath\n\nfrom ._metadata import Metadata\nfrom .base import BaseFileSystem\n\nif typing.TYPE_CHECKING:\n from dvc.output.base import BaseOutput... | diff --git a/dvc/fs/dvc.py b/dvc/fs/dvc.py
index b3b5b6a15a..8a52385533 100644
--- a/dvc/fs/dvc.py
+++ b/dvc/fs/dvc.py
@@ -68,13 +68,17 @@ def open( # type: ignore
raise IsADirectoryError
out = outs[0]
+
+ if not out.hash_info:
+ raise FileNotFoundError
+
if out.chang... |
scikit-hep__pyhf-235 | loosen numpy requirements for non-extra installs
# Description
we are pretty restrictive in the numpy version range due to trying to conform to TF's valid range, but TF is only one of the backends. If just installing `pip install pyhf` we should not force users to a speciic range unless we require the APIs
`numpy... | [
{
"content": "from setuptools import setup, find_packages\nsetup(\n name = 'pyhf',\n version = '0.0.15',\n description = '(partial) pure python histfactory implementation',\n url = '',\n author = 'Lukas Heinrich',\n author_email = 'lukas.heinrich@cern.ch',\n packages = find_packages(),\n include_package... | [
{
"content": "from setuptools import setup, find_packages\nsetup(\n name = 'pyhf',\n version = '0.0.15',\n description = '(partial) pure python histfactory implementation',\n url = '',\n author = 'Lukas Heinrich',\n author_email = 'lukas.heinrich@cern.ch',\n packages = find_packages(),\n include_package... | diff --git a/.travis.yml b/.travis.yml
index 8a12bf5b02..9309d7a1b5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,7 +6,8 @@ python:
- '3.6'
install:
- pip install --upgrade pip
-- pip install -U -q -e .[develop,tensorflow,mxnet,torch]
+- pip install -U -q -e .[tensorflow,torch,mxnet,develop]
+- pip install "num... |
wagtail__wagtail-1218 | wagtailfrontendcache throws an error when a root page is created without a site
On a new install of wagtail w/ wagtailfrontendcache enabled, I go through the following steps:
1. Go to the admin
2. Delete the default "welcome" page from the database
3. Create a new root page
After I create the new root page, I get the ... | [
{
"content": "import logging\n\nfrom django.conf import settings\nfrom django.utils.module_loading import import_string\nfrom django.core.exceptions import ImproperlyConfigured\n\n\nlogger = logging.getLogger('wagtail.frontendcache')\n\n\nclass InvalidFrontendCacheBackendError(ImproperlyConfigured):\n pass\n... | [
{
"content": "import logging\n\nfrom django.conf import settings\nfrom django.utils.module_loading import import_string\nfrom django.core.exceptions import ImproperlyConfigured\n\n\nlogger = logging.getLogger('wagtail.frontendcache')\n\n\nclass InvalidFrontendCacheBackendError(ImproperlyConfigured):\n pass\n... | diff --git a/wagtail/contrib/wagtailfrontendcache/tests.py b/wagtail/contrib/wagtailfrontendcache/tests.py
index 30aaf37a48b5..52751c74053e 100644
--- a/wagtail/contrib/wagtailfrontendcache/tests.py
+++ b/wagtail/contrib/wagtailfrontendcache/tests.py
@@ -1,8 +1,11 @@
from django.test import TestCase
from django.test.... |
pyinstaller__pyinstaller-8049 | Binary built with PyInstaller doesn't recognize Python source file encoding in case the file doesn't have .py extension
<!--
Welcome to the PyInstaller issue tracker! Before creating an issue, please heed the following:
1. This tracker should only be used to report bugs and request features / enhancements to PyInst... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2023, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2023, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens... | diff --git a/PyInstaller/building/utils.py b/PyInstaller/building/utils.py
index b1b23eb498..9c405b1d99 100644
--- a/PyInstaller/building/utils.py
+++ b/PyInstaller/building/utils.py
@@ -523,6 +523,15 @@ def get_code_object(modname, filename):
with open(filename, 'rb') as f:
source = f.rea... |
yt-dlp__yt-dlp-2535 | Big memory consumption spike
### Checklist
- [X] I'm reporting a bug unrelated to a specific site
- [X] I've verified that I'm running yt-dlp version **2022.01.21**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
- [X] I've checked that all provided URLs are alive and playable in a browser
- [X] I've... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\nimport urllib.parse\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n determine_ext,\n ExtractorError,\n int_or_none,\n parse_qs,\n smuggle_url,\n unescapeHTML,\n unsmuggle_url,\n)\n\n\nclass Gl... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\nimport urllib.parse\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n determine_ext,\n ExtractorError,\n int_or_none,\n parse_qs,\n smuggle_url,\n unescapeHTML,\n unsmuggle_url,\n)\n\n\nclass Gl... | diff --git a/yt_dlp/extractor/glomex.py b/yt_dlp/extractor/glomex.py
index 1d387bdfd996..a6477faabf95 100644
--- a/yt_dlp/extractor/glomex.py
+++ b/yt_dlp/extractor/glomex.py
@@ -198,8 +198,13 @@ def _extract_urls(cls, webpage, origin_url):
)+</script>
)''' % {'quot_re': r'["\']', 'url_re': VALID_... |
ESMCI__cime-3200 | If stream filename is full path use it to set filepath
Related to issue #1903
./create_newcase --case ../../cases/QPC6_c201_userSSTtest --compset QPC6 --res f09_f09_mg17 --project UMAI0021 --run-unsupported
cd ../../cases/QPC6_c201_userSSTtest/
./case.setup
./xmlchange DOCN_MODE="sst_aquapfile"
./xmlchange DOCN... | [
{
"content": "\"\"\"Class for generating component namelists.\"\"\"\n\n# Typically ignore this.\n# pylint: disable=invalid-name\n\n# Disable these because this is our standard setup\n# pylint: disable=wildcard-import,unused-wildcard-import\n\nimport datetime\nimport re\nimport hashlib\n\nfrom CIME.XML.standard_... | [
{
"content": "\"\"\"Class for generating component namelists.\"\"\"\n\n# Typically ignore this.\n# pylint: disable=invalid-name\n\n# Disable these because this is our standard setup\n# pylint: disable=wildcard-import,unused-wildcard-import\n\nimport datetime\nimport re\nimport hashlib\n\nfrom CIME.XML.standard_... | diff --git a/scripts/lib/CIME/nmlgen.py b/scripts/lib/CIME/nmlgen.py
index aa4cc222a30..737cb1595a7 100644
--- a/scripts/lib/CIME/nmlgen.py
+++ b/scripts/lib/CIME/nmlgen.py
@@ -474,7 +474,9 @@ def create_stream_file_and_update_shr_strdata_nml(self, config, #pylint:disable=
for i, filename in enumerate(doma... |
dotkom__onlineweb4-612 | Gravatar default images do not load correctly
| [
{
"content": "from django import template\nfrom django.conf import settings\nimport urllib, hashlib\n \nregister = template.Library()\n\n@register.assignment_tag(takes_context=True)\ndef gravatar_url(context, user, size):\n default = \"%s%s_%s.png\" % (context['request'].META['HTTP_HOST'],\n ... | [
{
"content": "from django import template\nfrom django.conf import settings\nimport urllib, hashlib\n \nregister = template.Library()\n\n@register.assignment_tag(takes_context=True)\ndef gravatar_url(context, user, size):\n\n prefix = \"https://\" if context['request'].is_secure() else \"http://\"\n defau... | diff --git a/apps/authentication/templatetags/gravatar_url_resolver.py b/apps/authentication/templatetags/gravatar_url_resolver.py
index 255d2cfe8..e0bbe75f6 100644
--- a/apps/authentication/templatetags/gravatar_url_resolver.py
+++ b/apps/authentication/templatetags/gravatar_url_resolver.py
@@ -6,8 +6,11 @@
@regist... |
scrapy__scrapy-4775 | Document link extractor usage outside CrawlSpider rules
https://docs.scrapy.org/en/latest/topics/link-extractors.html mentions that link extractors may be used outside `CrawlSpider`, but it does not go into detail on how to do that.
Also, there are broken references to `scrapy.link.Link`, we should provide reference... | [
{
"content": "\"\"\"\nThis module defines the Link object used in Link extractors.\n\nFor actual link extractors implementation see scrapy.linkextractors, or\nits documentation in: docs/topics/link-extractors.rst\n\"\"\"\n\n\nclass Link:\n \"\"\"Link objects represent an extracted link by the LinkExtractor.\... | [
{
"content": "\"\"\"\nThis module defines the Link object used in Link extractors.\n\nFor actual link extractors implementation see scrapy.linkextractors, or\nits documentation in: docs/topics/link-extractors.rst\n\"\"\"\n\n\nclass Link:\n \"\"\"Link objects represent an extracted link by the LinkExtractor.\... | diff --git a/docs/index.rst b/docs/index.rst
index 11aa5c9bef5..da264fb3417 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -78,7 +78,6 @@ Basic concepts
topics/settings
topics/exceptions
-
:doc:`topics/commands`
Learn about the command-line tool used to manage your Scrapy project.
diff --git a/do... |
ansible-collections__community.vmware-376 | vmware_cluster: Stop eating exceptions
##### SUMMARY
vmware_cluster ignores a `vim.fault.DuplicateName` which is never a good idea:
https://github.com/ansible-collections/vmware/blob/aee551dc1d1f8a57f58f2da47bef7678b2461973/plugins/modules/vmware_cluster.py#L414-L416
##### ISSUE TYPE
- Bug Report
##### COMPO... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2015, Joseph Callen <jcallen () csc.com>\n# Copyright: (c) 2018, Ansible Project\n#\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, prin... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2015, Joseph Callen <jcallen () csc.com>\n# Copyright: (c) 2018, Ansible Project\n#\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, prin... | diff --git a/plugins/modules/vmware_cluster.py b/plugins/modules/vmware_cluster.py
index df0fbe9968..c0613d30bf 100644
--- a/plugins/modules/vmware_cluster.py
+++ b/plugins/modules/vmware_cluster.py
@@ -411,9 +411,6 @@ def state_create_cluster(self):
if not self.module.check_mode:
self.dat... |
facebookresearch__hydra-2189 | [Feature Request] Partial object instantiation does not fail with missings
# 🚀 Feature Request
If a config group has a missing value, it cannot be partially instantiated. I would like that instead of throwing an exception, a partial object is returned where that missing value is a required argument of the partial o... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\nimport copy\nimport functools\nfrom enum import Enum\nfrom textwrap import dedent\nfrom typing import Any, Callable, Dict, List, Sequence, Tuple, Union\n\nfrom omegaconf import OmegaConf, SCMode\nfrom omegaconf._utils import... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\nimport copy\nimport functools\nfrom enum import Enum\nfrom textwrap import dedent\nfrom typing import Any, Callable, Dict, List, Sequence, Tuple, Union\n\nfrom omegaconf import OmegaConf, SCMode\nfrom omegaconf._utils import... | diff --git a/hydra/_internal/instantiate/_instantiate2.py b/hydra/_internal/instantiate/_instantiate2.py
index eff8781371d..0406bfd3313 100644
--- a/hydra/_internal/instantiate/_instantiate2.py
+++ b/hydra/_internal/instantiate/_instantiate2.py
@@ -324,8 +324,12 @@ def instantiate_node(
if _is_target(node):
... |
mathesar-foundation__mathesar-3271 | Add openAPI Specification for /database_roles/ endpoint
Generate spec for `database_roles` endpoint
| [
{
"content": "def custom_preprocessing_hook(endpoints):\n filtered = []\n for (path, path_regex, method, callback) in endpoints:\n # Remove all but DRF API endpoints\n if path.startswith(\"/api/db/v0/databases/\") or path.startswith(\"/api/db/v0/data_files/\") or path.startswith(\"/api/db/v0... | [
{
"content": "def custom_preprocessing_hook(endpoints):\n prefixes = [\n \"/api/db/v0/databases/\",\n \"/api/db/v0/data_files/\",\n \"/api/db/v0/schemas/\",\n \"/api/db/v0/tables/\",\n \"/api/db/v0/links/\",\n \"/api/db/v0/queries/\",\n \"/api/ui/v0/databases/... | diff --git a/config/settings/openapi.py b/config/settings/openapi.py
index 1095acbd77..85a1cd0ca5 100644
--- a/config/settings/openapi.py
+++ b/config/settings/openapi.py
@@ -1,9 +1,16 @@
def custom_preprocessing_hook(endpoints):
- filtered = []
- for (path, path_regex, method, callback) in endpoints:
- #... |
canonical__snapcraft-4526 | regression: remote-build fails OpenSSL error
### Bug Description
Using `snapcraft 8.0.1` when issuing `remote-build` of a snap it fails with the following error:
```
series_classic16 (main) > snapcraft remote-build
Traceback (most recent call last):
File "/snap/snapcraft/10279/bin/snapcraft", line 5, in <mo... | [
{
"content": "# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-\n#\n# Copyright 2023 Canonical Ltd.\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 3 as\n# published by the Free Software Foundation.\n#\n# This prog... | [
{
"content": "# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-\n#\n# Copyright 2023 Canonical Ltd.\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 3 as\n# published by the Free Software Foundation.\n#\n# This prog... | diff --git a/snapcraft/remote/git.py b/snapcraft/remote/git.py
index 9b2223a3c7..afc5cd5167 100644
--- a/snapcraft/remote/git.py
+++ b/snapcraft/remote/git.py
@@ -24,7 +24,24 @@
from pathlib import Path
from typing import Optional
-import pygit2
+# Cannot catch the pygit2 error here raised by the global use of
+# p... |
canonical__snapcraft-4535 | Fails to parse erroenous build output and freezes indefinitely
### Bug Description
There are libreoffice snap builds for amd64 [1] and arm64 which are stuck.
Afaict snapcraft crashed while parsing the build output.
[1] https://launchpad.net/~libreoffice/df-libreoffice/+snap/libreoffice-fresh/+build/2350372
... | [
{
"content": "# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-\n#\n# Copyright 2023 Canonical Ltd.\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 3 as\n# published by the Free Software Foundation.\n#\n# This prog... | [
{
"content": "# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-\n#\n# Copyright 2023 Canonical Ltd.\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 3 as\n# published by the Free Software Foundation.\n#\n# This prog... | diff --git a/.github/workflows/spread-scheduled.yaml b/.github/workflows/spread-scheduled.yaml
index 9092d51865..70e333cf54 100644
--- a/.github/workflows/spread-scheduled.yaml
+++ b/.github/workflows/spread-scheduled.yaml
@@ -56,6 +56,10 @@ jobs:
needs: [snap-build]
strategy:
fail-fast: false
+ m... |
qutebrowser__qutebrowser-1592 | Make C-w behave like in readline
Hi, I'm used to `C-w` deleting up to the next whitespace.
For example, if your command is : `:open -t http://google.com`, Hitting `C-w` should remove the whole http://google.com part, however it only removes up to the first `.`.
Usually the readline binding to remove up to the next wo... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | diff --git a/qutebrowser/misc/readline.py b/qutebrowser/misc/readline.py
index cb0ffd99685..e527a9abef9 100644
--- a/qutebrowser/misc/readline.py
+++ b/qutebrowser/misc/readline.py
@@ -158,7 +158,23 @@ def rl_unix_word_rubout(self):
widget = self._widget()
if widget is None:
return
- ... |
opendatacube__datacube-core-1252 | Error message for missing file is confusing
### Expected behaviour
```bash
> datacube dataset add /no/such/file.yaml
ERROR: no such file "/no/such/file.yaml"
```
### Actual behaviour
```
ERROR No supported metadata docs found for dataset /no/such/file.yaml
```
### Steps to reproduce the behaviour
``... | [
{
"content": "# This file is part of the Open Data Cube, see https://opendatacube.org for more information\n#\n# Copyright (c) 2015-2020 ODC Contributors\n# SPDX-License-Identifier: Apache-2.0\n\"\"\"\nCommon methods for UI code.\n\"\"\"\nfrom pathlib import Path\nfrom typing import Union, Optional\n\nfrom tool... | [
{
"content": "# This file is part of the Open Data Cube, see https://opendatacube.org for more information\n#\n# Copyright (c) 2015-2020 ODC Contributors\n# SPDX-License-Identifier: Apache-2.0\n\"\"\"\nCommon methods for UI code.\n\"\"\"\nfrom pathlib import Path\nfrom typing import Union, Optional\n\nfrom tool... | diff --git a/datacube/ui/common.py b/datacube/ui/common.py
index cf70b8fef5..e6e48123a6 100644
--- a/datacube/ui/common.py
+++ b/datacube/ui/common.py
@@ -42,7 +42,10 @@ def get_metadata_path(possible_path: Union[str, Path]) -> str:
if found:
return str(found)
- raise ValueError('No metadata ... |
crytic__slither-530 | Suicidal detector fails on external functions
If the [example](https://github.com/crytic/slither/wiki/Detector-Documentation#suicidal) function for the suicidal detector is changed from `public` to `external` the issue is no longer flagged.
```
pragma solidity ^0.5.0;
contract Suicidal{
function kill() extern... | [
{
"content": "\"\"\"\nModule detecting suicidal contract\n\nA suicidal contract is an unprotected function that calls selfdestruct\n\"\"\"\n\nfrom slither.detectors.abstract_detector import AbstractDetector, DetectorClassification\n\n\nclass Suicidal(AbstractDetector):\n \"\"\"\n Unprotected function dete... | [
{
"content": "\"\"\"\nModule detecting suicidal contract\n\nA suicidal contract is an unprotected function that calls selfdestruct\n\"\"\"\n\nfrom slither.detectors.abstract_detector import AbstractDetector, DetectorClassification\n\n\nclass Suicidal(AbstractDetector):\n \"\"\"\n Unprotected function dete... | diff --git a/slither/detectors/functions/suicidal.py b/slither/detectors/functions/suicidal.py
index a3599fcad8..999e217051 100644
--- a/slither/detectors/functions/suicidal.py
+++ b/slither/detectors/functions/suicidal.py
@@ -46,7 +46,7 @@ def detect_suicidal_func(func):
if func.is_constructor:
r... |
Parsl__parsl-1323 | Sporadic globus staging error
I get the below error sporadically on my laptop - I haven't seen it before today, but I've been ramping up my globus testing recently so I can't tell if it is a recent error or not.
```
$ python parsl/tests/test_staging/test_implicit_staging_globus.py --debug
2019-07-30 11:20:54 pars... | [
{
"content": "import logging\nimport json\nimport globus_sdk\nimport os\nimport parsl\nimport typeguard\n\nfrom functools import partial\nfrom typing import Optional\nfrom parsl.app.app import python_app\nfrom parsl.utils import RepresentationMixin\nfrom parsl.data_provider.staging import Staging\n\nlogger = lo... | [
{
"content": "import logging\nimport json\nimport globus_sdk\nimport os\nimport parsl\nimport typeguard\n\nfrom functools import partial\nfrom typing import Optional\nfrom parsl.app.app import python_app\nfrom parsl.utils import RepresentationMixin\nfrom parsl.data_provider.staging import Staging\n\nlogger = lo... | diff --git a/parsl/data_provider/globus.py b/parsl/data_provider/globus.py
index 8183c80b3b..9847a6741c 100644
--- a/parsl/data_provider/globus.py
+++ b/parsl/data_provider/globus.py
@@ -98,7 +98,11 @@ def transfer_file(cls, src_ep, dst_ep, src_path, dst_path):
task = tc.get_task(task['task_id'])
... |
mdn__kuma-6178 | ClientError (Throttling) in request_cdn_cache_invalidation()
https://sentry.prod.mozaws.net/operations/mdn-prod/issues/6766908/
```
ClientError: An error occurred (Throttling) when calling the CreateInvalidation operation (reached max retries: 4): Rate exceeded
(1 additional frame(s) were not displayed)
...
File "ne... | [
{
"content": "\n\nimport json\nimport time\n\nimport boto3\nfrom celery import task\nfrom django.conf import settings\nfrom django.utils.module_loading import import_string\n\nfrom kuma.core.utils import chunked\nfrom kuma.wiki.models import Document\n\nfrom .v1.views import document_api_data, get_content_based... | [
{
"content": "\n\nimport json\nimport time\n\nimport boto3\nfrom botocore.exceptions import ClientError\nfrom celery import task\nfrom django.conf import settings\nfrom django.utils.module_loading import import_string\nfrom redo import retriable\n\nfrom kuma.core.utils import chunked\nfrom kuma.wiki.models impo... | diff --git a/kuma/api/tasks.py b/kuma/api/tasks.py
index c3d30c9e657..aac5245bd94 100644
--- a/kuma/api/tasks.py
+++ b/kuma/api/tasks.py
@@ -4,9 +4,11 @@
import time
import boto3
+from botocore.exceptions import ClientError
from celery import task
from django.conf import settings
from django.utils.module_loading... |
OpenMined__PySyft-3684 | Update Polynomial operations for non same size polynomials.
## Description
Fix poly_mul_mod operations for two non-same size polynomial arguments.
polynomial operations are done with wrong orientation.
## How to Reproduce
1. Apply `poly_mul_mod` with two non-same size polynomials.
2. The result is incorrect.
| [
{
"content": "import numpy as np\nfrom numpy.polynomial import polynomial as poly\n\nfrom syft.frameworks.torch.he.fv.ciphertext import CipherText\n\n\ndef multiply_mod(operand1, operand2, modulus):\n return (operand1 * operand2) % modulus\n\n\ndef negate_mod(operand, modulus):\n \"\"\"returns (-1 * opera... | [
{
"content": "import numpy as np\nfrom numpy.polynomial import polynomial as poly\n\nfrom syft.frameworks.torch.he.fv.ciphertext import CipherText\n\n\ndef multiply_mod(operand1, operand2, modulus):\n return (operand1 * operand2) % modulus\n\n\ndef negate_mod(operand, modulus):\n \"\"\"returns (-1 * opera... | diff --git a/syft/frameworks/torch/he/fv/util/operations.py b/syft/frameworks/torch/he/fv/util/operations.py
index 2c5052bd020..e468cda510b 100644
--- a/syft/frameworks/torch/he/fv/util/operations.py
+++ b/syft/frameworks/torch/he/fv/util/operations.py
@@ -66,6 +66,15 @@ def poly_add_mod(op1, op2, modulus):
def poly_m... |
ESMCI__cime-1535 | B1850 compset can no longer be created off of cime master
The PR with hash lbbbfc2
Merge pull request #1517 from jedwards4b/set_value_valid
is causing B1850 compsets to not work out of the box
The output is as follows:
Compset longname is 1850_CAM60_CLM50%BGC_CICE_POP2%ECO_MOSART_CISM2%NOEVOLVE_WW3_BGC%BDRD
... | [
{
"content": "\"\"\"\nCommon interface to XML files which follow the grids format,\nThis is not an abstract class - but inherits from the abstact class GenericXML\n\"\"\"\n\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.XML.files import Files\nfrom CIME.XML.generic_xml import GenericXML\n\nlogger = lo... | [
{
"content": "\"\"\"\nCommon interface to XML files which follow the grids format,\nThis is not an abstract class - but inherits from the abstact class GenericXML\n\"\"\"\n\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.XML.files import Files\nfrom CIME.XML.generic_xml import GenericXML\n\nlogger = lo... | diff --git a/config/cesm/config_grids.xml b/config/cesm/config_grids.xml
index c21a9308bc9..02552ded16c 100644
--- a/config/cesm/config_grids.xml
+++ b/config/cesm/config_grids.xml
@@ -8,11 +8,11 @@
=========================================
The notation for the grid longname is
a%name_l%name_oi%name_... |
ephios-dev__ephios-1058 | Strict Transport Security (HSTS) duration ist too short
**Describe the bug**
Using tools like Mozilla Observatory to check the security of an Ephios instance it comes the error that HSTS is implemented incorrectly, because the specified duration is too short (max-age parameter). This is defined in the settings.py with... | [
{
"content": "import copy\nimport datetime\nimport os\nfrom datetime import timedelta\nfrom email.utils import getaddresses\nfrom pathlib import Path\n\nimport environ\nfrom cryptography.hazmat.primitives import serialization\nfrom django.contrib.messages import constants\nfrom django.utils.translation import g... | [
{
"content": "import copy\nimport datetime\nimport os\nfrom datetime import timedelta\nfrom email.utils import getaddresses\nfrom pathlib import Path\n\nimport environ\nfrom cryptography.hazmat.primitives import serialization\nfrom django.contrib.messages import constants\nfrom django.utils.translation import g... | diff --git a/docs/admin/configuration/index.rst b/docs/admin/configuration/index.rst
index b26cd37ad..3997714fa 100644
--- a/docs/admin/configuration/index.rst
+++ b/docs/admin/configuration/index.rst
@@ -76,6 +76,22 @@ The following variables are available (plugins and some niche features might req
Path to the pr... |
webkom__lego-1279 | EmailAddress case sensitivity
When creating a email address for a user (for gsuite sync) that includes capital letters, the user will be suspended. All input should be lowercased, since that is ehat google is doing.
| [
{
"content": "from django.core.exceptions import ValidationError\nfrom django.core.validators import EmailValidator, RegexValidator\n\nfrom lego.utils.validators import ReservedNameValidator\n\n\ndef validate_email_address(email_address):\n\n if email_address.is_assigned():\n raise ValidationError('Th... | [
{
"content": "from django.core.exceptions import ValidationError\nfrom django.core.validators import EmailValidator, RegexValidator\n\nfrom lego.utils.validators import ReservedNameValidator\n\n\ndef validate_email_address(email_address):\n if email_address.email != email_address.email.lower():\n rais... | diff --git a/lego/apps/email/fields.py b/lego/apps/email/fields.py
index 18c0ef121..f17cb33e6 100644
--- a/lego/apps/email/fields.py
+++ b/lego/apps/email/fields.py
@@ -20,6 +20,7 @@ def to_internal_value(self, data):
Create email if not exists.
"""
try:
+ data = data.lower()
... |
statsmodels__statsmodels-1769 | Contrast Results after t_test summary broken for 1 parameter
Check what ndim we should have in result of t_test, f_test, ...
f_test returns a single value as ndim=2
pvalues for t_test doesn't have the same ndim, shape as the tvalues
```
>>> import numpy as np
>>> import statsmodels.api as sm
>>> nobs=100
>>> x = 1 + n... | [
{
"content": "from statsmodels.compat.python import range\nimport numpy as np\nfrom scipy.stats import f as fdist\nfrom scipy.stats import t as student_t\nfrom scipy import stats\nfrom statsmodels.tools.tools import clean0, fullrank\nfrom statsmodels.compat.numpy import np_matrix_rank\n\n\n#TODO: should this be... | [
{
"content": "from statsmodels.compat.python import range\nimport numpy as np\nfrom scipy.stats import f as fdist\nfrom scipy.stats import t as student_t\nfrom scipy import stats\nfrom statsmodels.tools.tools import clean0, fullrank\nfrom statsmodels.compat.numpy import np_matrix_rank\n\n\n#TODO: should this be... | diff --git a/statsmodels/base/tests/test_generic_methods.py b/statsmodels/base/tests/test_generic_methods.py
index c2d1fac312a..82da0e7552e 100644
--- a/statsmodels/base/tests/test_generic_methods.py
+++ b/statsmodels/base/tests/test_generic_methods.py
@@ -66,6 +66,10 @@ def test_ttest_tvalues(self):
# move th... |
GoogleCloudPlatform__PerfKitBenchmarker-563 | Project id not respected when deleting disk in Cloudstack
I forgot to pass project_id as an agrugment when deleting volume.
| [
{
"content": "# Copyright 2014 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless r... | [
{
"content": "# Copyright 2014 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless r... | diff --git a/perfkitbenchmarker/cloudstack/cloudstack_disk.py b/perfkitbenchmarker/cloudstack/cloudstack_disk.py
index 9ac726260a..3c250ea071 100644
--- a/perfkitbenchmarker/cloudstack/cloudstack_disk.py
+++ b/perfkitbenchmarker/cloudstack/cloudstack_disk.py
@@ -50,7 +50,7 @@ def __init__(self, disk_spec, name, zone_id... |
conda__conda-8342 | LookupError: unknown encoding: 65001 caused by pull/8289
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda pac... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2012 Anaconda, Inc\n# SPDX-License-Identifier: BSD-3-Clause\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom errno import ENOENT\nfrom glob import glob\nimport os\nfrom os.path import abspath, basename, dirname, ex... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2012 Anaconda, Inc\n# SPDX-License-Identifier: BSD-3-Clause\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom errno import ENOENT\nfrom glob import glob\nimport os\nfrom os.path import abspath, basename, dirname, ex... | diff --git a/conda/activate.py b/conda/activate.py
index 0c9eb46d8cb..bd3b07d3298 100644
--- a/conda/activate.py
+++ b/conda/activate.py
@@ -530,8 +530,7 @@ def ensure_binary(value):
encoding = 'utf-8'
if on_win:
import ctypes
- acp = ctypes.cdll.kernel32.GetACP()
- encoding = str(acp)
... |
dask__dask-2290 | Keyerror when slicing dating
This looks similar to #2211 but I'm not sure. I've attached a zip with sample data and code that reproduces it. If you uncomment line 25 it works for some reason.
```
import dask.bag
import pandas as pd
import re
from datetime import datetime
schema_dict = {
'timestamp': 'datetim... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport math\nfrom operator import getitem\nimport uuid\n\nimport numpy as np\nimport pandas as pd\nfrom toolz import merge\n\nfrom .methods import drop_columns\nfrom .core import DataFrame, Series, _Frame, _concat, map_partitions\... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport math\nfrom operator import getitem\nimport uuid\n\nimport numpy as np\nimport pandas as pd\nfrom toolz import merge\n\nfrom .methods import drop_columns\nfrom .core import DataFrame, Series, _Frame, _concat, map_partitions\... | diff --git a/dask/dataframe/shuffle.py b/dask/dataframe/shuffle.py
index e501a820625..8293341a12f 100644
--- a/dask/dataframe/shuffle.py
+++ b/dask/dataframe/shuffle.py
@@ -79,7 +79,10 @@ def set_index(df, index, npartitions=None, shuffle=None, compute=False,
if (mins == sorted(mins) and maxes == sorted(maxes)... |
certbot__certbot-4931 | Certbot fails to retrieve domains of previous certificate when SAN is a critical extension
## My operating system is (include version):
CentOS 6 and CentOS 7
## I installed Certbot with (certbot-auto, OS package manager, pip, etc):
For CentOS6 (certbot-auto): https://certbot.eff.org/all-instructions/#centos-6-non... | [
{
"content": "\"\"\"Crypto utilities.\"\"\"\nimport binascii\nimport contextlib\nimport logging\nimport re\nimport socket\nimport sys\n\nimport OpenSSL\n\nfrom acme import errors\n\n\nlogger = logging.getLogger(__name__)\n\n# TLSSNI01 certificate serving and probing is not affected by SSL\n# vulnerabilities: pr... | [
{
"content": "\"\"\"Crypto utilities.\"\"\"\nimport binascii\nimport contextlib\nimport logging\nimport re\nimport socket\nimport sys\n\nimport OpenSSL\n\nfrom acme import errors\n\n\nlogger = logging.getLogger(__name__)\n\n# TLSSNI01 certificate serving and probing is not affected by SSL\n# vulnerabilities: pr... | diff --git a/acme/acme/crypto_util.py b/acme/acme/crypto_util.py
index 84b70e4a699..de15284c039 100644
--- a/acme/acme/crypto_util.py
+++ b/acme/acme/crypto_util.py
@@ -218,7 +218,7 @@ def _pyopenssl_cert_or_req_san(cert_or_req):
text = func(OpenSSL.crypto.FILETYPE_TEXT, cert_or_req).decode("utf-8")
# WARNING... |
Qiskit__qiskit-4721 | circuit -> schedule raises exception
<!-- ⚠️ 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**: master
- **Python version**:
- **Operating system**:
### What is the current behavior?
```... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2019.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licen... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2019.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licen... | diff --git a/qiskit/compiler/schedule.py b/qiskit/compiler/schedule.py
index 0300bcd9ed71..e641a945b050 100644
--- a/qiskit/compiler/schedule.py
+++ b/qiskit/compiler/schedule.py
@@ -65,7 +65,11 @@ def schedule(circuits: Union[QuantumCircuit, List[QuantumCircuit]],
if backend is None:
raise Qiskit... |
pytorch__pytorch-115753 | `run_decompositions` in `ExportedProgram` doesn't keep the same model state_dict
### 🐛 Describe the bug
After running `run_decompositions`, the exported program is not the same.
https://github.com/pytorch/pytorch/blob/e0d2a24967218d7c39e24f66bb6c4836c9d1d427/torch/export/exported_program.py#L351-L361
However, `... | [
{
"content": "import copy\nimport dataclasses\nimport functools\nfrom typing import (\n Any,\n Callable,\n Dict,\n Iterator,\n List,\n Optional,\n Tuple,\n Type,\n TYPE_CHECKING,\n Union,\n)\n\nif TYPE_CHECKING:\n # Import the following modules during type checking to enable cod... | [
{
"content": "import copy\nimport dataclasses\nimport functools\nfrom typing import (\n Any,\n Callable,\n Dict,\n Iterator,\n List,\n Optional,\n Tuple,\n Type,\n TYPE_CHECKING,\n Union,\n)\n\nif TYPE_CHECKING:\n # Import the following modules during type checking to enable cod... | diff --git a/test/export/test_export.py b/test/export/test_export.py
index 5094482107819..ac5a3cf118e78 100644
--- a/test/export/test_export.py
+++ b/test/export/test_export.py
@@ -1454,7 +1454,7 @@ def forward(self, x):
m = M()
with unittest.mock.patch("torch._export.DECOMP_TABLE", None):
... |
pymodbus-dev__pymodbus-2186 | ssl.SSLWantReadError: The operation did not complete (read) when using ModbusTlsClient
<!--
Before opening a new issue, make sure you do the following:
- Check that your issue isn't already filed: https://github.com/pymodbus-dev/pymodbus/issues
- Check the discussions forum https://github.com/pymodbus-dev/pymodbus... | [
{
"content": "\"\"\"TLS framer.\"\"\"\nimport struct\n\nfrom pymodbus.exceptions import (\n ModbusIOException,\n)\nfrom pymodbus.framer.old_framer_base import TLS_FRAME_HEADER, ModbusFramer\nfrom pymodbus.framer.tls import FramerTLS\n\n\n# ---------------------------------------------------------------------... | [
{
"content": "\"\"\"TLS framer.\"\"\"\nimport struct\nfrom time import sleep\n\nfrom pymodbus.exceptions import (\n ModbusIOException,\n)\nfrom pymodbus.framer.old_framer_base import TLS_FRAME_HEADER, ModbusFramer\nfrom pymodbus.framer.tls import FramerTLS\n\n\n# ---------------------------------------------... | diff --git a/pymodbus/framer/old_framer_tls.py b/pymodbus/framer/old_framer_tls.py
index 9ebb44227..a6a4df892 100644
--- a/pymodbus/framer/old_framer_tls.py
+++ b/pymodbus/framer/old_framer_tls.py
@@ -1,5 +1,6 @@
"""TLS framer."""
import struct
+from time import sleep
from pymodbus.exceptions import (
ModbusI... |
ansible__ansible-39634 | aws_s3 is automaticly decrypting ansible-vault encrypted files before put
<!---
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release, and devel branch are affected too.
Always add information AFTER of these html comments. -->
##### ISSUE TYPE
- Bug Report
##... | [
{
"content": "# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>\n# (c) 2018, Will Thames <will@thames.id.au>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software F... | [
{
"content": "# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>\n# (c) 2018, Will Thames <will@thames.id.au>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software F... | diff --git a/changelogs/fragments/aws_s3_decryption_fix.yaml b/changelogs/fragments/aws_s3_decryption_fix.yaml
new file mode 100644
index 00000000000000..27034e850476b5
--- /dev/null
+++ b/changelogs/fragments/aws_s3_decryption_fix.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+- fix decrypting vault files for the aws_s3 module... |
elastic__apm-agent-python-1623 | [META 679] Add support for ELB and Lambda URL metadata in lambda integrations
See meta issue for the description and details:
- Meta issue: https://github.com/elastic/apm/issues/679
| [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | diff --git a/elasticapm/contrib/serverless/aws.py b/elasticapm/contrib/serverless/aws.py
index 8fc14cbc4..4bd2ae2f1 100644
--- a/elasticapm/contrib/serverless/aws.py
+++ b/elasticapm/contrib/serverless/aws.py
@@ -261,8 +261,7 @@ def set_metadata_and_context(self, coldstart: bool) -> None:
elif self.source == "... |
ansible__ansible-41206 | aws_s3 is automaticly decrypting ansible-vault encrypted files before put
<!---
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release, and devel branch are affected too.
Always add information AFTER of these html comments. -->
##### ISSUE TYPE
- Bug Report
##... | [
{
"content": "# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>\n# (c) 2018, Will Thames <will@thames.id.au>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software F... | [
{
"content": "# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>\n# (c) 2018, Will Thames <will@thames.id.au>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software F... | diff --git a/changelogs/fragments/aws_s3_decryption_fix.yaml b/changelogs/fragments/aws_s3_decryption_fix.yaml
new file mode 100644
index 00000000000000..27034e850476b5
--- /dev/null
+++ b/changelogs/fragments/aws_s3_decryption_fix.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+- fix decrypting vault files for the aws_s3 module... |
translate__pootle-4277 | `sync_stores` doesn't handle disabled projects
We addressed the similar issue for `update_stores` #4198.
`sync_stores` should work for disabled projects as well https://github.com/translate/pootle/issues/4198#issuecomment-161717337.
| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa... | diff --git a/pootle/apps/pootle_app/management/commands/sync_stores.py b/pootle/apps/pootle_app/management/commands/sync_stores.py
index 3f9e7ee53cc..a727683ef81 100644
--- a/pootle/apps/pootle_app/management/commands/sync_stores.py
+++ b/pootle/apps/pootle_app/management/commands/sync_stores.py
@@ -40,13 +40,15 @@ cla... |
lutris__lutris-2121 | ENV - Variables - Strip Whitespace + Make "Add" better
- Make "Add" better: When adding ENV variables to a game, you click ADD. Space is allocated for the ENV variable, but nothing actually happens visually (perhaps depending on Color Scheme?).
Expected: When you click add, cursor is set to input field of the ENV va... | [
{
"content": "\"\"\"Misc widgets used in the GUI.\"\"\"\nimport os\n\nfrom gi.repository import Gtk, GObject, Pango\n\nfrom lutris.util.log import logger\nfrom lutris.util import system\nfrom lutris.util.linux import LINUX_SYSTEM\nfrom lutris.gui.widgets.utils import get_stock_icon\n\n\nclass SlugEntry(Gtk.Entr... | [
{
"content": "\"\"\"Misc widgets used in the GUI.\"\"\"\nimport os\n\nfrom gi.repository import Gtk, GObject, Pango\n\nfrom lutris.util.log import logger\nfrom lutris.util import system\nfrom lutris.util.linux import LINUX_SYSTEM\nfrom lutris.gui.widgets.utils import get_stock_icon\n\n\nclass SlugEntry(Gtk.Entr... | diff --git a/lutris/gui/widgets/common.py b/lutris/gui/widgets/common.py
index 0bfedbaa05..65b44f3bc8 100644
--- a/lutris/gui/widgets/common.py
+++ b/lutris/gui/widgets/common.py
@@ -255,6 +255,9 @@ def __init__(self, data, columns):
def on_add(self, widget):
self.liststore.append(["", ""])
+ row... |
googleapis__google-auth-library-python-1315 | KeyError when generating IDTokenCredentials with bad permissions
When trying to generate a IDTokenCredentials token, if for some reason there is some sort of permissions error, the library crashes with a KeyError instead of providing useful info to fix the error.
#### Environment details
- OS: Ubuntu 22.04
-... | [
{
"content": "# Copyright 2018 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica... | [
{
"content": "# Copyright 2018 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica... | diff --git a/google/auth/impersonated_credentials.py b/google/auth/impersonated_credentials.py
index ddafc08ee..7c2f18d74 100644
--- a/google/auth/impersonated_credentials.py
+++ b/google/auth/impersonated_credentials.py
@@ -438,11 +438,19 @@ def refresh(self, request):
self._target_credentials._source_cre... |
saulpw__visidata-1901 | Keystroke ] not detected on Windows
In Powershell and cmd.exe I encountered that sorting didn't work in both orders. The `[` shortcut was detected and had its effect, but the `]` didn't. I narrowed it down to a problem with `windows-curses`, and in turn with its dependency `PDCurses`: https://github.com/zephyrproject-r... | [
{
"content": "#!/usr/bin/env python3\n\nfrom setuptools import setup\n# tox can't actually run python3 setup.py: https://github.com/tox-dev/tox/issues/96\n#from visidata import __version__\n__version__ = '2.12dev'\n\nsetup(name='visidata',\n version=__version__,\n description='terminal interface for e... | [
{
"content": "#!/usr/bin/env python3\n\nfrom setuptools import setup\n# tox can't actually run python3 setup.py: https://github.com/tox-dev/tox/issues/96\n#from visidata import __version__\n__version__ = '2.12dev'\n\nsetup(name='visidata',\n version=__version__,\n description='terminal interface for e... | diff --git a/setup.py b/setup.py
index 1ab28c404..f8754e16c 100755
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@
py_modules=['visidata'],
install_requires=[
'python-dateutil',
- 'windows-curses; platform_system == "Windows"',
+ 'windows-curses<2.3.1; platform_system == "Wind... |
psychopy__psychopy-5023 | Instantiating MoveStim3 object before SoundPyo object causes SoundPyo sampleRate argument to be silently ignored.
I am using an [external USB audio interface](https://focusrite.com/en/usb-audio-interface/scarlett/scarlett-2i2) to deliver ultrasonic vocalizations at 192kHz to mice, while also playing them silent natur... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Part of the PsychoPy library\n# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2022 Open Science Tools Ltd.\n# Distributed under the terms of the GNU General Public License (GPL).\n\nimport sys\nimport os\nimport atexit\nimport threading\nfrom ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Part of the PsychoPy library\n# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2022 Open Science Tools Ltd.\n# Distributed under the terms of the GNU General Public License (GPL).\n\nimport sys\nimport os\nimport atexit\nimport threading\nfrom ... | diff --git a/psychopy/sound/backend_pyo.py b/psychopy/sound/backend_pyo.py
index 0bb588681f..7fd0f14e9e 100644
--- a/psychopy/sound/backend_pyo.py
+++ b/psychopy/sound/backend_pyo.py
@@ -325,7 +325,16 @@ def __init__(self, value="C", secs=0.5, octave=4, stereo=True,
if pyoSndServer is None or pyoSndServer.getI... |
iterative__dvc-7965 | Add TOML support for metrics
Right now, there is only TOML file support for params files. We need to add TOML support for metrics as well.
Here's a [link to the Discord question](https://discord.com/channels/485586884165107732/485596304961962003/865974923079319563) that brought this up.
| [
{
"content": "import logging\nimport os\nfrom typing import List\n\nfrom scmrepo.exceptions import SCMError\n\nfrom dvc.fs.dvc import DvcFileSystem\nfrom dvc.output import Output\nfrom dvc.repo import locked\nfrom dvc.repo.collect import StrPaths, collect\nfrom dvc.repo.live import summary_fs_path\nfrom dvc.scm... | [
{
"content": "import logging\nimport os\nfrom typing import List\n\nfrom scmrepo.exceptions import SCMError\n\nfrom dvc.fs.dvc import DvcFileSystem\nfrom dvc.output import Output\nfrom dvc.repo import locked\nfrom dvc.repo.collect import StrPaths, collect\nfrom dvc.repo.live import summary_fs_path\nfrom dvc.scm... | diff --git a/dvc/repo/metrics/show.py b/dvc/repo/metrics/show.py
index 166765a1ef..a829413e53 100644
--- a/dvc/repo/metrics/show.py
+++ b/dvc/repo/metrics/show.py
@@ -12,7 +12,7 @@
from dvc.scm import NoSCMError
from dvc.utils import error_handler, errored_revisions, onerror_collect
from dvc.utils.collections import... |
huggingface__peft-1320 | An error occurs when using LoftQ. IndexError
A problem occurred while applying LoftQ to T5.
`IndexError: tensors used as indices must be long, byte or bool tensors`
The problem was in [this line](https://github.com/huggingface/peft/blob/main/src/peft/utils/loftq_utils.py#L158), I replaced int with long and it worked ... | [
{
"content": "# coding=utf-8\n# Copyright 2023-present the HuggingFace 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/LICENS... | [
{
"content": "# coding=utf-8\n# Copyright 2023-present the HuggingFace 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/LICENS... | diff --git a/src/peft/utils/loftq_utils.py b/src/peft/utils/loftq_utils.py
index 03da3d17d6..bfbdabf5a0 100644
--- a/src/peft/utils/loftq_utils.py
+++ b/src/peft/utils/loftq_utils.py
@@ -155,7 +155,7 @@ def dequantize_block(self, qweight, weight_max, weight_shape):
weight = torch.zeros((qweight.shape[0], 8 // ... |
pantsbuild__pants-20300 | `terraform_deployment` cannot load vars files if the root `terraform_module` is not in the same dir
**Describe the bug**
root/BUILD:
```
terraform_deployment(root_module="//mod0:mod0", var_files=["a.tfvars"])
```
root/a.tfvars:
```
var0 = "hihello"
```
mod/BUILD:
```
terraform_module()
```
mod/main.tf:
... | [
{
"content": "# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\nimport shlex\nfrom pathlib import PurePath\n\n\ndef terraform_arg(name: str, value: str) -> str:\n \"\"\"Format a Terraform arg.\"\"\"\n return f\"{name}={shle... | [
{
"content": "# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\nimport os.path\nimport shlex\n\n\ndef terraform_arg(name: str, value: str) -> str:\n \"\"\"Format a Terraform arg.\"\"\"\n return f\"{name}={shlex.quote(value)... | diff --git a/src/python/pants/backend/terraform/utils.py b/src/python/pants/backend/terraform/utils.py
index 65c7b53fb51..c07cf42a695 100644
--- a/src/python/pants/backend/terraform/utils.py
+++ b/src/python/pants/backend/terraform/utils.py
@@ -1,7 +1,7 @@
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.... |
kserve__kserve-882 | Missing requirements.txt in the Pypi source code
**What steps did you take and what happened:**
The requirements.txt file is missing in the source code on Pypi so setuptools will not work.
```
Executing setuptoolsBuildPhase
Traceback (most recent call last):
File "nix_run_setup", line 8, in <module>
exec(... | [
{
"content": "# Copyright 2020 kubeflow.org.\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 applica... | [
{
"content": "# Copyright 2020 kubeflow.org.\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 applica... | diff --git a/python/kfserving/MANIFEST.in b/python/kfserving/MANIFEST.in
new file mode 100644
index 00000000000..f9bd1455b37
--- /dev/null
+++ b/python/kfserving/MANIFEST.in
@@ -0,0 +1 @@
+include requirements.txt
diff --git a/python/kfserving/setup.py b/python/kfserving/setup.py
index 1689765d513..25315c8e586 100644
-... |
sunpy__sunpy-1158 | Fix for sunpy paper listing 3.7
| [
{
"content": "# -*- coding: utf-8 -*-\n# Author: Michael Malocha <mjm159@humboldt.edu>\n# Last Edit: September 22nd, 2013\n#\n# This module was developed with funding from the GSOC 2013 summer of code\n#\n\n\"\"\"\nThis module is meant to parse the HELIO registry and return WSDL endpoints to\nfacilitate the ... | [
{
"content": "# -*- coding: utf-8 -*-\n# Author: Michael Malocha <mjm159@humboldt.edu>\n# Last Edit: September 22nd, 2013\n#\n# This module was developed with funding from the GSOC 2013 summer of code\n#\n\n\"\"\"\nThis module is meant to parse the HELIO registry and return WSDL endpoints to\nfacilitate the ... | diff --git a/sunpy/net/helio/parser.py b/sunpy/net/helio/parser.py
index c4b27d49cef..3c848b0f6d0 100644
--- a/sunpy/net/helio/parser.py
+++ b/sunpy/net/helio/parser.py
@@ -54,7 +54,7 @@ def webservice_parser(service='HEC'):
'http://festung1.oats.inaf.it:8080/helio-hec/HelioLongQueryService',
'http://hec.heli... |
jazzband__django-oauth-toolkit-215 | ProtectResourceMixin denies OPTIONS request
The OPTIONS preflight request typically has all headers stripped by the browser (including HTTP_AUTORIZATION), which causes the dispatch method to return a 403 response.
My suggestion is to accept all OPTIONS requests.
| [
{
"content": "from __future__ import unicode_literals\n\nimport logging\n\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.http import HttpResponseForbidden\n\nfrom ..oauth2_backends import OAuthLibCore\nfrom ..exceptions import FatalClientError\nfrom ..settings import oauth2_settings\n\n\n... | [
{
"content": "from __future__ import unicode_literals\n\nimport logging\n\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.http import HttpResponseForbidden\n\nfrom ..oauth2_backends import OAuthLibCore\nfrom ..exceptions import FatalClientError\nfrom ..settings import oauth2_settings\n\n\n... | diff --git a/oauth2_provider/tests/test_mixins.py b/oauth2_provider/tests/test_mixins.py
index a4ba7a4c7..484a54207 100644
--- a/oauth2_provider/tests/test_mixins.py
+++ b/oauth2_provider/tests/test_mixins.py
@@ -3,18 +3,21 @@
from django.core.exceptions import ImproperlyConfigured
from django.views.generic import Vi... |
conda__conda-build-1388 | Unable to acquire lock on Windows since 2.0
I'm currently unable to build on our build servers as conda-build just keeps timing out due to not being able to acquire the lock in time. I've changed down to only 1 build at a time and I'm still seeing the error. I run `conda clean --lock` before every build.
[Example 1](h... | [
{
"content": "'''\nModule that does most of the heavy lifting for the ``conda build`` command.\n'''\nfrom __future__ import absolute_import, division, print_function\n\nfrom collections import deque\nimport fnmatch\nfrom glob import glob\nimport io\nimport json\nimport logging\nimport mmap\nimport os\nfrom os.p... | [
{
"content": "'''\nModule that does most of the heavy lifting for the ``conda build`` command.\n'''\nfrom __future__ import absolute_import, division, print_function\n\nfrom collections import deque\nimport fnmatch\nfrom glob import glob\nimport io\nimport json\nimport logging\nimport mmap\nimport os\nfrom os.p... | diff --git a/conda_build/build.py b/conda_build/build.py
index fc27d09c09..7ad9ec5c5d 100644
--- a/conda_build/build.py
+++ b/conda_build/build.py
@@ -407,10 +407,10 @@ def create_env(prefix, specs, config, clear_cache=True):
if not os.path.isdir(folder):
os.makedirs(folder... |
pymedusa__Medusa-6656 | Torrent file content is empty
**Describe the bug**
I have many log like this:
2019-04-25 21:01:35 WARNING SNATCHQUEUE-SNATCH-274431 :: [f46bfac] Torrent file content is empty: Gotham.S04E20.VOSTFR.WebDl.720p.x264.-.Chris44
**Expected behavior**
torrent from yggtorrent dont snatched
**Screenshots**
<img ... | [
{
"content": "# coding=utf-8\n\n\"\"\"Provider code for Generic Torrent Provider.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport os\nimport re\nfrom base64 import b16encode, b32decode\nfrom os.path import join\nfrom random import shuffle\n\nfrom bencode import BencodeDecodeError, bde... | [
{
"content": "# coding=utf-8\n\n\"\"\"Provider code for Generic Torrent Provider.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport os\nimport re\nfrom base64 import b16encode, b32decode\nfrom os.path import join\nfrom random import shuffle\n\nfrom bencode import BencodeDecodeError, bde... | diff --git a/medusa/providers/torrent/torrent_provider.py b/medusa/providers/torrent/torrent_provider.py
index 442b531351..cdbfb8727c 100644
--- a/medusa/providers/torrent/torrent_provider.py
+++ b/medusa/providers/torrent/torrent_provider.py
@@ -146,12 +146,13 @@ def _get_pubdate(self, item):
return pubdate
... |
googleapis__google-cloud-python-1709 | v1beta3 and emulator use
The docs in this link do not make it clear on how to use the library against the local emulator, with out any creds needed. https://cloud.google.com/datastore/docs/datastore-api-tutorial
The service object can be instantiated without creds for emulator use:
c = datastore.Client(project='test',... | [
{
"content": "# Copyright 2014 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | [
{
"content": "# Copyright 2014 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | diff --git a/gcloud/datastore/connection.py b/gcloud/datastore/connection.py
index 0810d3303b26..d949b696b88d 100644
--- a/gcloud/datastore/connection.py
+++ b/gcloud/datastore/connection.py
@@ -56,8 +56,12 @@ class Connection(connection.Connection):
def __init__(self, credentials=None, http=None, api_base_url=Non... |
getpelican__pelican-2716 | LOG_FILTER not working as it should?
Good evening folks,
I have a problem with LOG_FILTER. According to the docs, one can remove `TAG_SAVE_AS is set to False` by configuring `LOG_FILTER` this way:
```python
import logging
LOG_FILTER = [(logging.WARN, 'TAG_SAVE_AS is set to False')]
```
So to ignore `AUTHOR_... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport logging\nimport os\nimport sys\nfrom collections import defaultdict\n\n__all__ = [\n 'init'\n]\n\n\nclass BaseFormatter(logging.Formatter):\n def __init__(self, fmt=None, datefmt=None):\n FORMAT = '%(customlevelname)s %(message)s'\n super().__i... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport logging\nimport os\nimport sys\nfrom collections import defaultdict\n\n__all__ = [\n 'init'\n]\n\n\nclass BaseFormatter(logging.Formatter):\n def __init__(self, fmt=None, datefmt=None):\n FORMAT = '%(customlevelname)s %(message)s'\n super().__i... | diff --git a/pelican/log.py b/pelican/log.py
index bae15b4be..0576af2a8 100644
--- a/pelican/log.py
+++ b/pelican/log.py
@@ -110,11 +110,13 @@ def filter(self, record):
else:
self._raised_messages.add(message_key)
- # ignore LOG_FILTER records by templates when "debug" isn't enabled
+ ... |
Lightning-Universe__lightning-flash-615 | Not able to import flash as transformer.__spec__ is returning None
## 🐛 Bug
<!-- A clear and concise description of what the bug is. -->
I am trying to complete a summarization project and decided to use flash for it but am getting import error as `transformers.__spec__` is returning None. I have opened huggingfa... | [
{
"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 1fa497852c..7bb4cfecae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -40,10 +40,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
### Fixed
-
- Fixed a bug where serve sanity checking would not be triggered using the latest PyTor... |
litestar-org__litestar-992 | Bug: Running `starlite run` after installing starlite[cli] gives error about missing cryptography package
The error is here:
```
Traceback (most recent call last):
File "C:\Users\hanne\Documents\Programme\analyze-wiktionary\.venv\lib\site-packages\starlite\middleware\session\cookie_backend.py", line 20,
in <modu... | [
{
"content": "from .base import SessionMiddleware\nfrom .cookie_backend import (\n CookieBackendConfig as SessionCookieConfig, # backwards compatible export\n)\n\n__all__ = [\n \"SessionMiddleware\",\n \"SessionCookieConfig\",\n]\n",
"path": "starlite/middleware/session/__init__.py"
}
] | [
{
"content": "from typing import Any\n\nfrom starlite.utils import warn_deprecation\n\nfrom .base import SessionMiddleware\n\n\ndef __getattr__(name: str) -> Any:\n \"\"\"Provide lazy importing as per https://peps.python.org/pep-0562/\"\"\"\n\n if name != \"SessionCookieConfig\":\n raise AttributeE... | diff --git a/poetry.lock b/poetry.lock
index a593ca7330..bb5dc66093 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,5 +1,3 @@
-# This file is automatically @generated by Poetry and should not be changed by hand.
-
[[package]]
name = "aiomcache"
version = "0.8.0"
@@ -7,10 +5,6 @@ description = "Minimal pure python m... |
PaddlePaddle__PaddleOCR-2654 | win10 训练中断
win10 Cuda11.0 训练icdar2015 检测,减小 batch_size,num_workers还是到
**eval model** 时候中断????

 2020 PaddlePaddle 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.... | [
{
"content": "# Copyright (c) 2020 PaddlePaddle 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.... | diff --git a/tools/program.py b/tools/program.py
index d4c3583829f..df5db120841 100755
--- a/tools/program.py
+++ b/tools/program.py
@@ -18,6 +18,7 @@
import os
import sys
+import platform
import yaml
import time
import shutil
@@ -333,8 +334,10 @@ def eval(model, valid_dataloader, post_process_class, eval_class,... |
vega__altair-344 | Default Mark Property
I came accross a problem with the display of altair plots in Jupyter notebooks.
Take the following code, where df is any dataset:
from altair import Chart
Chart(df).to_dict().get('mark')
This would return 'point' in altair 1.0.0. In altair 1.2.0 this returns None, which res... | [
{
"content": "\"\"\"\nMain API for Vega-lite spec generation.\n\nDSL mapping Vega types to IPython traitlets.\n\"\"\"\nimport os\nimport functools\nimport operator\n\nimport traitlets as T\nimport pandas as pd\n\nfrom .utils import visitors\nfrom .utils._py3k_compat import string_types\nfrom .utils import node\... | [
{
"content": "\"\"\"\nMain API for Vega-lite spec generation.\n\nDSL mapping Vega types to IPython traitlets.\n\"\"\"\nimport os\nimport functools\nimport operator\n\nimport traitlets as T\nimport pandas as pd\n\nfrom .utils import visitors\nfrom .utils._py3k_compat import string_types\nfrom .utils import node\... | diff --git a/altair/api.py b/altair/api.py
index 6240ab7c6..332f1c930 100644
--- a/altair/api.py
+++ b/altair/api.py
@@ -369,6 +369,7 @@ class Chart(schema.ExtendedUnitSpec, TopLevelMixin):
help=schema.ExtendedUnitSpec.encoding.help)
transform = T.Instance(Transform, allow_none=True, def... |
speechbrain__speechbrain-124 | Replicability Issue
Every time I run the same experiment (e.,g minimal_examples/neural_networks/autoencoder) on the same machine I got slightly different results. Since we set up the seed, this shouldn't happen.
| [
{
"content": "#!/usr/bin/env python3\nimport os\nimport sys\nimport torch\nimport speechbrain as sb\nimport speechbrain.data_io.wer as wer_io\nimport speechbrain.utils.edit_distance as edit_distance\nfrom speechbrain.data_io.data_io import convert_index_to_lab\nfrom speechbrain.decoders.ctc import ctc_greedy_de... | [
{
"content": "#!/usr/bin/env python3\nimport os\nimport sys\nimport speechbrain as sb\nimport speechbrain.data_io.wer as wer_io\nimport speechbrain.utils.edit_distance as edit_distance\nfrom speechbrain.data_io.data_io import convert_index_to_lab\nfrom speechbrain.decoders.ctc import ctc_greedy_decode\nfrom spe... | diff --git a/recipes/TIMIT/ASR_CTC/experiment.py b/recipes/TIMIT/ASR_CTC/experiment.py
index 63a5cd7706..added8a935 100644
--- a/recipes/TIMIT/ASR_CTC/experiment.py
+++ b/recipes/TIMIT/ASR_CTC/experiment.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python3
import os
import sys
-import torch
import speechbrain as sb
import sp... |
hylang__hy-1122 | Hy sets are really broken.
``` Hy
(env-hy) C:\Users\ME\Code>hy
hy 0.11.0 using CPython(v3.4.3:9b73f1c3e601) 3.4.3 on Windows
=> #{:a 'a}
Traceback (most recent call last):
File "C:\Python34\Scripts\env-hy\Scripts\hy-script.py", line 9, in <module>
load_entry_point('hy==0.11.0', 'console_scripts', 'hy')()
File "... | [
{
"content": "# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without restriction, including without limitation\n# t... | [
{
"content": "# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without restriction, including without limitation\n# t... | diff --git a/hy/models/set.py b/hy/models/set.py
index 3a81aed8d..fda7b5218 100644
--- a/hy/models/set.py
+++ b/hy/models/set.py
@@ -18,19 +18,16 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
+from hy.models import _wrappers, wrap_value
from hy.models.list imp... |
nvaccess__nvda-11328 | Does not Speak when Deleting character by pressing shift.
While trying to delete a character when shift is pressed, the nvda does not speak anything.
It should reade the character which is getting deleted even if shift is pressed.
| [
{
"content": "# A part of NonVisual Desktop Access (NVDA)\r\n# This file is covered by the GNU General Public License.\r\n# See the file COPYING for more details.\r\n# Copyright (C) 2006-2020 NV Access Limited, Davy Kager, Julien Cochuyt\r\n\r\n\"\"\"Common support for editable text.\r\n@note: If you want edita... | [
{
"content": "# A part of NonVisual Desktop Access (NVDA)\r\n# This file is covered by the GNU General Public License.\r\n# See the file COPYING for more details.\r\n# Copyright (C) 2006-2020 NV Access Limited, Davy Kager, Julien Cochuyt\r\n\r\n\"\"\"Common support for editable text.\r\n@note: If you want edita... | diff --git a/source/editableText.py b/source/editableText.py
index cfdca9eeff4..0103ae3b41e 100755
--- a/source/editableText.py
+++ b/source/editableText.py
@@ -305,10 +305,13 @@ def script_caret_deleteWord(self, gesture):
"kb:control+home": "caret_moveByLine",
"kb:control+end": "caret_moveByLine",
"kb:delet... |
Mailu__Mailu-1941 | Letsencrypt Force Renewal
Is there a limit on the Subject Alt Name entries?
I have updated my /mailu/mailu.env "HOSTNAMES" variable, but when I restart Mailu it doesn't update the Subject Alt Names on the mailu cert.
Previously it has worked, so I am guessing that I need to force Letsencrypt to refresh as it isnt... | [
{
"content": "#!/usr/bin/python3\n\nimport os\nimport time\nimport subprocess\n\ncommand = [\n \"certbot\",\n \"-n\", \"--agree-tos\", # non-interactive\n \"-d\", os.environ[\"HOSTNAMES\"],\n \"-m\", \"{}@{}\".format(os.environ[\"POSTMASTER\"], os.environ[\"DOMAIN\"]),\n \"certonly\", \"--standal... | [
{
"content": "#!/usr/bin/python3\n\nimport os\nimport time\nimport subprocess\n\ncommand = [\n \"certbot\",\n \"-n\", \"--agree-tos\", # non-interactive\n \"-d\", os.environ[\"HOSTNAMES\"],\n \"-m\", \"{}@{}\".format(os.environ[\"POSTMASTER\"], os.environ[\"DOMAIN\"]),\n \"certonly\", \"--standal... | diff --git a/core/nginx/letsencrypt.py b/core/nginx/letsencrypt.py
index 1dd2cba49..e3db05f15 100755
--- a/core/nginx/letsencrypt.py
+++ b/core/nginx/letsencrypt.py
@@ -13,6 +13,7 @@
"--cert-name", "mailu",
"--preferred-challenges", "http", "--http-01-port", "8008",
"--keep-until-expiring",
+ "--renew... |
ray-project__ray-10979 | [tune] The search algorithms generate more trials than necessary
### What is the problem?
I was under the impression that #10802 should avoid producing too many trials before resources are ready. However, on master, it seems like many trials are generated (especially when using search algorithms) before resources ar... | [
{
"content": "import click\nfrom datetime import datetime\nimport json\nimport logging\nimport os\nimport time\nimport traceback\nimport types\n\nimport ray.cloudpickle as cloudpickle\nfrom ray.services import get_node_ip_address\nfrom ray.tune import TuneError\nfrom ray.tune.stopper import NoopStopper\nfrom ra... | [
{
"content": "import click\nfrom datetime import datetime\nimport json\nimport logging\nimport os\nimport time\nimport traceback\nimport types\n\nimport ray.cloudpickle as cloudpickle\nfrom ray.services import get_node_ip_address\nfrom ray.tune import TuneError\nfrom ray.tune.stopper import NoopStopper\nfrom ra... | diff --git a/python/ray/tune/tests/test_trial_runner.py b/python/ray/tune/tests/test_trial_runner.py
index 1dbac72aeae11..cf1232f7b91f4 100644
--- a/python/ray/tune/tests/test_trial_runner.py
+++ b/python/ray/tune/tests/test_trial_runner.py
@@ -288,6 +288,44 @@ def on_trial_result(self, trial_runner, trial, result):
... |
ansible-collections__community.aws-1290 | SSM connection doesn't use regional S3 endpoint
### Summary
When using `ansible_connection: aws_ssm` the url used to download data from a bucket is always `*.s3.amazonaws.com` regardless of the region specified in `ansible_aws_ssm_region`.
This causes issues since in restricted environments the EC2 instance has to ... | [
{
"content": "# Based on the ssh connection plugin by Michael DeHaan\n#\n# Copyright: (c) 2018, Pat Sharkey <psharkey@cleo.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import (absolute_import, division, print_function)\n__metaclass__ = typ... | [
{
"content": "# Based on the ssh connection plugin by Michael DeHaan\n#\n# Copyright: (c) 2018, Pat Sharkey <psharkey@cleo.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import (absolute_import, division, print_function)\n__metaclass__ = typ... | diff --git a/changelogs/fragments/1176-ssm-connection-plugin-region-fix.yml b/changelogs/fragments/1176-ssm-connection-plugin-region-fix.yml
new file mode 100644
index 00000000000..a88a5ba84e9
--- /dev/null
+++ b/changelogs/fragments/1176-ssm-connection-plugin-region-fix.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - aws_ssm - pu... |
getsentry__sentry-30922 | Allow alerting based on `sdk.name`
### Problem Statement
We're in a React Native project and we'd like the ability to have separate reporting rules based on the `sdk.name`. Right now we're looking very closely at any errors which are reported from `sentry.cocoa` and we would like to send them to a channel where the de... | [
{
"content": "from collections import OrderedDict\n\nfrom django import forms\n\nfrom sentry.rules.conditions.base import EventCondition\n\n\nclass MatchType:\n EQUAL = \"eq\"\n NOT_EQUAL = \"ne\"\n STARTS_WITH = \"sw\"\n NOT_STARTS_WITH = \"nsw\"\n ENDS_WITH = \"ew\"\n NOT_ENDS_WITH = \"new\"... | [
{
"content": "from collections import OrderedDict\n\nfrom django import forms\n\nfrom sentry.rules.conditions.base import EventCondition\n\n\nclass MatchType:\n EQUAL = \"eq\"\n NOT_EQUAL = \"ne\"\n STARTS_WITH = \"sw\"\n NOT_STARTS_WITH = \"nsw\"\n ENDS_WITH = \"ew\"\n NOT_ENDS_WITH = \"new\"... | diff --git a/src/sentry/rules/conditions/event_attribute.py b/src/sentry/rules/conditions/event_attribute.py
index eefce3086aa4e7..21c77e00b88d73 100644
--- a/src/sentry/rules/conditions/event_attribute.py
+++ b/src/sentry/rules/conditions/event_attribute.py
@@ -46,6 +46,7 @@ class MatchType:
"user.ip_address",
... |
ansible-collections__community.aws-1291 | SSM connection doesn't use regional S3 endpoint
### Summary
When using `ansible_connection: aws_ssm` the url used to download data from a bucket is always `*.s3.amazonaws.com` regardless of the region specified in `ansible_aws_ssm_region`.
This causes issues since in restricted environments the EC2 instance has to ... | [
{
"content": "# Based on the ssh connection plugin by Michael DeHaan\n#\n# Copyright: (c) 2018, Pat Sharkey <psharkey@cleo.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import (absolute_import, division, print_function)\n__metaclass__ = typ... | [
{
"content": "# Based on the ssh connection plugin by Michael DeHaan\n#\n# Copyright: (c) 2018, Pat Sharkey <psharkey@cleo.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import (absolute_import, division, print_function)\n__metaclass__ = typ... | diff --git a/changelogs/fragments/1176-ssm-connection-plugin-region-fix.yml b/changelogs/fragments/1176-ssm-connection-plugin-region-fix.yml
new file mode 100644
index 00000000000..a88a5ba84e9
--- /dev/null
+++ b/changelogs/fragments/1176-ssm-connection-plugin-region-fix.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - aws_ssm - pu... |
Textualize__textual-1359 | Validators and watchers should run hand-in-hand
When `init=True` in a `reactive` attribute, the `watch_` method for that attribute run, but the `validate_` method does not.
This seems rather confusing and we think that validators and watchers should always run hand-in-hand.
If the watcher is called, you should be confi... | [
{
"content": "from __future__ import annotations\n\nfrom functools import partial\nfrom inspect import isawaitable\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awaitable,\n Callable,\n Generic,\n Type,\n TypeVar,\n Union,\n)\n\nfrom . import events\nfrom ._callback import count_parame... | [
{
"content": "from __future__ import annotations\n\nfrom functools import partial\nfrom inspect import isawaitable\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awaitable,\n Callable,\n Generic,\n Type,\n TypeVar,\n Union,\n)\n\nfrom . import events\nfrom ._callback import count_parame... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a8a4fa91ef..96d5e88baa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
+- Fixed validator not running on first reactive set https://github.com/Textualize/textual/pull/1359
-... |
biolab__orange3-2610 | Alternating shadowing of rows in Rank widget does not shadows the row header
##### Orange version
3.5.dev
##### Expected behavior
Row headers should be shaded as well, else shading every other row does not make sense.
##### Actual behavior
Scores in Rank widget are shaded (every other row), header column... | [
{
"content": "\"\"\"\nRank\n====\n\nRank (score) features for prediction.\n\n\"\"\"\n\nfrom collections import namedtuple, OrderedDict\nimport logging\nfrom functools import partial\nfrom itertools import chain\n\nimport numpy as np\nfrom scipy.sparse import issparse\n\nfrom AnyQt.QtGui import QFontMetrics\nfro... | [
{
"content": "\"\"\"\nRank\n====\n\nRank (score) features for prediction.\n\n\"\"\"\n\nfrom collections import namedtuple, OrderedDict\nimport logging\nfrom functools import partial\nfrom itertools import chain\n\nimport numpy as np\nfrom scipy.sparse import issparse\n\nfrom AnyQt.QtGui import QFontMetrics\nfro... | diff --git a/Orange/widgets/data/owrank.py b/Orange/widgets/data/owrank.py
index cbdb6a5ee52..c7fdad641f3 100644
--- a/Orange/widgets/data/owrank.py
+++ b/Orange/widgets/data/owrank.py
@@ -73,9 +73,9 @@ def __init__(self, parent=None, **kwargs):
selectionBehavior=QTableView.SelectRows,
... |
mantl__mantl-481 | Update Dockerfile for terraform
- [ ] Add terraform install to Dockerfile
- [ ] change CMD to be a script that provisions via terraform and ansible
| [
{
"content": "#!/usr/bin/env python\n#\n# Copyright 2015 Cisco Systems, 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... | [
{
"content": "#!/usr/bin/env python\n#\n# Copyright 2015 Cisco Systems, 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... | diff --git a/Dockerfile b/Dockerfile
index 0f27bb956..48bce35c1 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,22 +1,34 @@
-FROM alpine:3.1
+FROM centos:7
-RUN apk add --update openssh openssl python py-pip \
- && rm -rf /var/cache/apk/*
+ENV TERRAFORM_VERSION 0.5.3
+ENV TERRAFORM_STATE_ROOT /state
+
+RUN mkdir -p... |
django-hijack__django-hijack-370 | Hijack of an inactive User can't be released
When using a "standard" django setup with the standard User model and `django.contrib.auth.backends.ModelBackend` as the authentication backend, if you do the following:
1. Have a User with `is_active = False`
2. Hijack this user (`inactive_user`)
3. At this point even ... | [
{
"content": "def superusers_only(*, hijacker=None, hijacked=None):\n \"\"\"Superusers may hijack any other user.\"\"\"\n return hijacker.is_superuser\n\n\ndef superusers_and_staff(*, hijacker=None, hijacked=None):\n \"\"\"\n Superusers and staff members may hijack other users.\n\n A superuser ma... | [
{
"content": "def superusers_only(*, hijacker, hijacked):\n \"\"\"Superusers may hijack any other user.\"\"\"\n return hijacked.is_active and hijacker.is_superuser\n\n\ndef superusers_and_staff(*, hijacker, hijacked):\n \"\"\"\n Superusers and staff members may hijack other users.\n\n A superuser... | diff --git a/docs/customization.md b/docs/customization.md
index 12fa2f6d..a53e1e7c 100644
--- a/docs/customization.md
+++ b/docs/customization.md
@@ -18,17 +18,17 @@ We provide a couple of builtin permission functions for your convenience.
#### `hijack.permissions.superusers_only`
-A superuser may hijack any othe... |
translate__pootle-6584 | Team page is very slow to load
not sure of the cause, but new team page is loading v slowly
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nfrom django.co... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nfrom django.co... | diff --git a/pootle/apps/pootle_language/views.py b/pootle/apps/pootle_language/views.py
index 3fb929269c6..2078369596b 100644
--- a/pootle/apps/pootle_language/views.py
+++ b/pootle/apps/pootle_language/views.py
@@ -302,11 +302,9 @@ def get_context_data(self, **kwargs):
if k in stats:
sta... |
pytest-dev__pytest-django-1010 | assertRaisesMessage expects wrong excepted_exception type
I am trying to use `assertRaisesMessage` to test for `save()` raising an `IntegrityError`. However, the `expected_exception` expected type is `BaseException`.
vscode shows me `Type[Exception]` for `TestCase.assertRaisesMessage`.
Code snippet:
```python
... | [
{
"content": "\"\"\"\nDynamically load all Django assertion cases and expose them for importing.\n\"\"\"\nfrom functools import wraps\nfrom typing import Any, Callable, Optional, Sequence, Set, Union\n\nfrom django.test import (\n LiveServerTestCase, SimpleTestCase, TestCase, TransactionTestCase,\n)\n\n\nTYP... | [
{
"content": "\"\"\"\nDynamically load all Django assertion cases and expose them for importing.\n\"\"\"\nfrom functools import wraps\nfrom typing import Any, Callable, Optional, Sequence, Set, Type, Union\n\nfrom django.test import (\n LiveServerTestCase, SimpleTestCase, TestCase, TransactionTestCase,\n)\n\... | diff --git a/pytest_django/asserts.py b/pytest_django/asserts.py
index a589abd2..2919aef2 100644
--- a/pytest_django/asserts.py
+++ b/pytest_django/asserts.py
@@ -2,7 +2,7 @@
Dynamically load all Django assertion cases and expose them for importing.
"""
from functools import wraps
-from typing import Any, Callable, ... |
celery__celery-3392 | test_retry_kwargs_can_be_empty fails on pypy3
From https://travis-ci.org/celery/celery/jobs/151613800:
```
======================================================================
ERROR: test_retry_kwargs_can_be_empty (celery.tests.tasks.test_tasks.test_task_retries)
-----------------------------------------------------... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Utilities for safely pickling exceptions.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport datetime\nimport numbers\nimport sys\n\nfrom base64 import b64encode as base64encode, b64decode as base64decode\nfrom functools import partial\nfrom in... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Utilities for safely pickling exceptions.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport datetime\nimport numbers\nimport sys\n\nfrom base64 import b64encode as base64encode, b64decode as base64decode\nfrom functools import partial\nfrom in... | diff --git a/celery/utils/serialization.py b/celery/utils/serialization.py
index de0f4f1deec..34b39f90c26 100644
--- a/celery/utils/serialization.py
+++ b/celery/utils/serialization.py
@@ -24,7 +24,7 @@
except ImportError:
import pickle # noqa
-PY3 = sys.version_info[0] >= 3
+PY33 = sys.version_info >= (3, 3)
... |
biolab__orange3-2462 | Mosaic: Doesn't clear when data is disconnected
##### Orange version
3.5.0.dev0+942877a
##### Expected behavior
Mosaic clears its state when the input data is disconnected and reverts to what it looked like on first open.
##### Actual behavior
The data is not cleared and the display doesn't update at all
... | [
{
"content": "from collections import defaultdict\nfrom functools import reduce\nfrom itertools import product, chain\nfrom math import sqrt, log\nfrom operator import mul, attrgetter\n\nfrom scipy.stats import distributions\nfrom scipy.misc import comb\nfrom AnyQt.QtCore import Qt, QSize, pyqtSignal as Signal\... | [
{
"content": "from collections import defaultdict\nfrom functools import reduce\nfrom itertools import product, chain\nfrom math import sqrt, log\nfrom operator import mul, attrgetter\n\nfrom scipy.stats import distributions\nfrom scipy.misc import comb\nfrom AnyQt.QtCore import Qt, QSize, pyqtSignal as Signal\... | diff --git a/Orange/widgets/visualize/owmosaic.py b/Orange/widgets/visualize/owmosaic.py
index b626721f396..9dca9d163d5 100644
--- a/Orange/widgets/visualize/owmosaic.py
+++ b/Orange/widgets/visualize/owmosaic.py
@@ -384,6 +384,7 @@ def init_combos(self, data):
for combo in self.attr_combos:
combo... |
mozilla__bugbug-3703 | Use all threads when decompressing with zstd
We should use the `-T0` option (or use the `zstdmt` binary instead of `zstd`).
| [
{
"content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport concurrent.futures\nimport errno\nimport json\nimport logging\... | [
{
"content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport concurrent.futures\nimport errno\nimport json\nimport logging\... | diff --git a/bugbug/utils.py b/bugbug/utils.py
index 8e38ca5873..54f1708882 100644
--- a/bugbug/utils.py
+++ b/bugbug/utils.py
@@ -244,7 +244,7 @@ def zstd_decompress(path: str) -> None:
if not os.path.exists(f"{path}.zst"):
raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), path)
- sub... |
pypa__setuptools-1847 | The 'python_requires' field is ignored in setup.cfg (not in setup.py).
I'm using setuptools version '41.0.1.post20190616' (commit 8aeff6b2c9a64e47ad2a22533d7e65c08cd4103f).
$ cd /tmp/setup/py
$ cat setup.py
from setuptools import setup
setup(python_requires='invalid')
$ python setup.py install
error in setup c... | [
{
"content": "from __future__ import absolute_import, unicode_literals\nimport io\nimport os\nimport sys\n\nimport warnings\nimport functools\nfrom collections import defaultdict\nfrom functools import partial\nfrom functools import wraps\nfrom importlib import import_module\n\nfrom distutils.errors import Dist... | [
{
"content": "from __future__ import absolute_import, unicode_literals\nimport io\nimport os\nimport sys\n\nimport warnings\nimport functools\nfrom collections import defaultdict\nfrom functools import partial\nfrom functools import wraps\nfrom importlib import import_module\n\nfrom distutils.errors import Dist... | diff --git a/changelog.d/1847.change.rst b/changelog.d/1847.change.rst
new file mode 100644
index 0000000000..d3f7724e20
--- /dev/null
+++ b/changelog.d/1847.change.rst
@@ -0,0 +1 @@
+In declarative config, now traps errors when invalid ``python_requires`` values are supplied.
diff --git a/setuptools/config.py b/setupt... |
numba__numba-2687 | CUDA Streams Not Bound by Default
It seems like constructing a device array with an explicit stream doesn't actually bind the array stream to that stream (e.g. the below). Is this expected
````python
from numba import cuda
stream = cuda.stream()
with stream.auto_synchronize():
arr = cuda.device_array(
... | [
{
"content": "\"\"\"\nA CUDA ND Array is recognized by checking the __cuda_memory__ attribute\non the object. If it exists and evaluate to True, it must define shape,\nstrides, dtype and size attributes similar to a NumPy ndarray.\n\"\"\"\nfrom __future__ import print_function, absolute_import, division\n\nimp... | [
{
"content": "\"\"\"\nA CUDA ND Array is recognized by checking the __cuda_memory__ attribute\non the object. If it exists and evaluate to True, it must define shape,\nstrides, dtype and size attributes similar to a NumPy ndarray.\n\"\"\"\nfrom __future__ import print_function, absolute_import, division\n\nimp... | diff --git a/numba/cuda/cudadrv/devicearray.py b/numba/cuda/cudadrv/devicearray.py
index 225fda43884..bc1a219d10f 100644
--- a/numba/cuda/cudadrv/devicearray.py
+++ b/numba/cuda/cudadrv/devicearray.py
@@ -105,7 +105,7 @@ def __init__(self, shape, strides, dtype, stream=0, writeback=None,
self.gpu_data = gpu_da... |
paperless-ngx__paperless-ngx-4442 | [BUG] 'set' object has no attribute 'extend' when consuming documents
### Description
Document consumption does not work on 1.17.4-dev through docker compose with the image pulled from ghcr.io/paperless-ngx/paperless-ngx:dev
The problem seems to be here https://github.com/paperless-ngx/paperless-ngx/blob/dev/src/... | [
{
"content": "import logging\nimport os\nfrom concurrent.futures import ThreadPoolExecutor\nfrom fnmatch import filter\nfrom pathlib import Path\nfrom pathlib import PurePath\nfrom threading import Event\nfrom time import monotonic\nfrom time import sleep\nfrom typing import Final\n\nfrom django import db\nfrom... | [
{
"content": "import logging\nimport os\nfrom concurrent.futures import ThreadPoolExecutor\nfrom fnmatch import filter\nfrom pathlib import Path\nfrom pathlib import PurePath\nfrom threading import Event\nfrom time import monotonic\nfrom time import sleep\nfrom typing import Final\n\nfrom django import db\nfrom... | diff --git a/src/documents/management/commands/document_consumer.py b/src/documents/management/commands/document_consumer.py
index 64812ed8846..f9f50dcb44a 100644
--- a/src/documents/management/commands/document_consumer.py
+++ b/src/documents/management/commands/document_consumer.py
@@ -32,7 +32,7 @@
logger = logging... |
googleapis__google-api-python-client-2286 | Deprecated utcnow, utcfromtimestamp should be removed
Python 3.12 [deprecates](https://docs.python.org/3.12/whatsnew/3.12.html#deprecated) `datetime.utcnow` and `datetime.utcfromtimestamp`. Their uses should be removed from the project.
| [
{
"content": "# Copyright 2014 Google Inc. 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# Unles... | [
{
"content": "# Copyright 2014 Google Inc. 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# Unles... | diff --git a/googleapiclient/channel.py b/googleapiclient/channel.py
index d6aa852c7e5..37bda1ea7e5 100644
--- a/googleapiclient/channel.py
+++ b/googleapiclient/channel.py
@@ -78,7 +78,7 @@
from googleapiclient import errors
# The unix time epoch starts at midnight 1970.
-EPOCH = datetime.datetime.utcfromtimestamp... |
ray-project__ray-10953 | Issue on page /tune/api_docs/execution.html [tune]
Documentation regarding `max_failures`:
```
max_failures (int): Try to recover a trial at least this many times.
Ray will recover from the latest checkpoint if present.
Setting to -1 will lead to infinite recovery retries.
... | [
{
"content": "import logging\nimport sys\n\nfrom ray.tune.error import TuneError\nfrom ray.tune.experiment import convert_to_experiment_list, Experiment\nfrom ray.tune.analysis import ExperimentAnalysis\nfrom ray.tune.suggest import BasicVariantGenerator, SearchGenerator\nfrom ray.tune.suggest.suggestion import... | [
{
"content": "import logging\nimport sys\n\nfrom ray.tune.error import TuneError\nfrom ray.tune.experiment import convert_to_experiment_list, Experiment\nfrom ray.tune.analysis import ExperimentAnalysis\nfrom ray.tune.suggest import BasicVariantGenerator, SearchGenerator\nfrom ray.tune.suggest.suggestion import... | diff --git a/python/ray/tune/tune.py b/python/ray/tune/tune.py
index 3dff1cc253114..2b74735357730 100644
--- a/python/ray/tune/tune.py
+++ b/python/ray/tune/tune.py
@@ -230,7 +230,7 @@ def run(
max_failures (int): Try to recover a trial at least this many times.
Ray will recover from the latest ch... |
benoitc__gunicorn-2991 | Username parsing for Basic auth fails
I noticed that few test cases have started to fail when running `python setup.py test`
See logs in details
<details>
```
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point ... | [
{
"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport base64\nimport binascii\nimport json\nimport time\nimport logging\nlogging.Logger.manager.emittedNoHandlerWarning = 1 # noqa\nfrom logging.config import dict... | [
{
"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport base64\nimport binascii\nimport json\nimport time\nimport logging\nlogging.Logger.manager.emittedNoHandlerWarning = 1 # noqa\nfrom logging.config import dict... | diff --git a/gunicorn/glogging.py b/gunicorn/glogging.py
index 4e5fbbd5d..e5cda1967 100644
--- a/gunicorn/glogging.py
+++ b/gunicorn/glogging.py
@@ -469,10 +469,7 @@ def _get_user(self, environ):
# so we need to convert it to a byte string
auth = base64.b64decode(auth[1].strip(... |
open-mmlab__mmpretrain-1251 | [Bug] The precision are not aligned between val during train and test
### Branch
master branch (0.24 or other 0.x version)
### Describe the bug
The precision of val in the train is 73, and the precision of test 76, they are not aligned
### Environment
A100 or NPU
### Other information
_No response_
| [
{
"content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\n\nfrom ..builder import HEADS, build_loss\nfrom ..utils import is_tracing\nfrom .base_head import BaseHead\n\n\n@HEADS.register_module()\nclass MultiLabelClsHead(BaseHead):\n \"\"\"Classification head for multilabel task.\n\n Arg... | [
{
"content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\n\nfrom ..builder import HEADS, build_loss\nfrom ..utils import is_tracing\nfrom .base_head import BaseHead\n\n\n@HEADS.register_module()\nclass MultiLabelClsHead(BaseHead):\n \"\"\"Classification head for multilabel task.\n\n Arg... | diff --git a/.circleci/config.yml b/.circleci/config.yml
index 498fd3722a0..0876bfcb4f1 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -187,31 +187,12 @@ workflows:
env: LRU_CACHE_CAPACITY=1
requires:
- lint
- - build:
- name: build_py36_torch1... |
espnet__espnet-3262 | Error when "--field -5" is passed to espnet2.bin.tokenize_text
**Describe the bug**
```
D:\Anaconda\python.exe D:/repos/espnet/espnet2/bin/tokenize_text.py --token_type phn --input tmp.txt --output tmp.phn --field -2 --cleaner none --g2p g2p_en --add_symbol '$<blank>:0' --add_symbol '<oov>:1' --add_symbol '<sos/eos... | [
{
"content": "#!/usr/bin/env python3\nimport argparse\nfrom collections import Counter\nimport logging\nfrom pathlib import Path\nimport sys\nfrom typing import List\nfrom typing import Optional\n\nfrom typeguard import check_argument_types\n\nfrom espnet.utils.cli_utils import get_commandline_args\nfrom espnet... | [
{
"content": "#!/usr/bin/env python3\nimport argparse\nfrom collections import Counter\nimport logging\nfrom pathlib import Path\nimport sys\nfrom typing import List\nfrom typing import Optional\n\nfrom typeguard import check_argument_types\n\nfrom espnet.utils.cli_utils import get_commandline_args\nfrom espnet... | diff --git a/espnet2/bin/tokenize_text.py b/espnet2/bin/tokenize_text.py
index d2ff08cb60b..5a8cbd64814 100755
--- a/espnet2/bin/tokenize_text.py
+++ b/espnet2/bin/tokenize_text.py
@@ -28,7 +28,6 @@ def field2slice(field: Optional[str]) -> slice:
slice(0, 3, None)
>>> field2slice("-3")
slice(... |
Lightning-AI__pytorch-lightning-309 | Remove SLURM warning when in interactive mode
No need to show the "we launched processes for you" warning when in interactive SLURM mode.
Suggested by @adefazio
| [
{
"content": "\"\"\"\nThe trainer handles all the logic for running a val loop, training loop, distributing, etc.. .\n\"\"\"\n\nimport os\nimport re\nimport warnings\n\nimport numpy as np\nimport tqdm\nimport torch\nfrom torch.utils.data.distributed import DistributedSampler\nimport torch.multiprocessing as mp\... | [
{
"content": "\"\"\"\nThe trainer handles all the logic for running a val loop, training loop, distributing, etc.. .\n\"\"\"\n\nimport os\nimport re\nimport warnings\n\nimport numpy as np\nimport tqdm\nimport torch\nfrom torch.utils.data.distributed import DistributedSampler\nimport torch.multiprocessing as mp\... | diff --git a/pytorch_lightning/trainer/trainer.py b/pytorch_lightning/trainer/trainer.py
index 6eae341b393aa..1de939ec42c1d 100644
--- a/pytorch_lightning/trainer/trainer.py
+++ b/pytorch_lightning/trainer/trainer.py
@@ -704,14 +704,6 @@ def fit(self, model):
else:
nb_gpus = self.nb_reques... |
gammapy__gammapy-1627 | WcsGeom.create bug in handling of refpix argument
I tried to make a WcsGeom with image center on the Galactic center at `skydir = (glon, glat) = (0, 0)`.
```python
from gammapy.maps import WcsGeom
geom = WcsGeom.create(skydir=(0, 0), npix=(800, 600), refpix=(400, 300), binsz=0.1, coordsys='GAL')
```
and got this... | [
{
"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nimport copy\nimport numpy as np\nfrom collections import OrderedDict\nfrom astropy.wcs import WCS\nfrom astropy.io import fits\nfrom astropy.coordina... | [
{
"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nimport copy\nimport numpy as np\nfrom collections import OrderedDict\nfrom astropy.wcs import WCS\nfrom astropy.io import fits\nfrom astropy.coordina... | diff --git a/gammapy/maps/tests/test_wcs.py b/gammapy/maps/tests/test_wcs.py
index 8d99a9e302..83fb562f05 100644
--- a/gammapy/maps/tests/test_wcs.py
+++ b/gammapy/maps/tests/test_wcs.py
@@ -199,3 +199,10 @@ def test_geom_repr():
geom = WcsGeom.create(skydir=(0, 0), npix=(10, 4), binsz=50,
... |
ansible-collections__community.general-1308 | MacPorts fails to install package whose name is contained within already installed package
##### SUMMARY
The `community.general.macports` module is failing to install a requested package, because that package's name occurs within another, already installed package.
It checks to see if a package is installed by list... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2013, Jimmy Tang <jcftang@gmail.com>\n# Based on okpg (Patrick Pelletier <pp.pelletier@gmail.com>), pacman\n# (Afterburn) and pkgin (Shaun Zinck) modules\n#\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2013, Jimmy Tang <jcftang@gmail.com>\n# Based on okpg (Patrick Pelletier <pp.pelletier@gmail.com>), pacman\n# (Afterburn) and pkgin (Shaun Zinck) modules\n#\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.... | diff --git a/changelogs/fragments/1307-macports-fix-status-check.yml b/changelogs/fragments/1307-macports-fix-status-check.yml
new file mode 100644
index 00000000000..878e66ca394
--- /dev/null
+++ b/changelogs/fragments/1307-macports-fix-status-check.yml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - macports - fix failure to in... |
conda__conda-build-1259 | conda clean -a fails with conda build 2.0.0beta2
```
$ conda clean -a
Cache location:
There are no tarballs to remove
Cache location:
There are no unused packages to remove
An unexpected error has occurred, please consider sending the
following traceback to the conda GitHub issue tracker at:
https://github.com/c... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport locale\nimport logging\nimport os\nfrom os.path import join, isdir, isfile, abspath, basename, exists, normpath\nimport re\nfrom subprocess import check_call, Popen, PIPE, check_output, CalledProcessError\nimport sys\nimpor... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport locale\nimport logging\nimport os\nfrom os.path import join, isdir, isfile, abspath, basename, exists, normpath\nimport re\nfrom subprocess import check_call, Popen, PIPE, check_output, CalledProcessError\nimport sys\nimpor... | diff --git a/conda_build/config.py b/conda_build/config.py
index 149a12436f..d281396948 100644
--- a/conda_build/config.py
+++ b/conda_build/config.py
@@ -330,5 +330,8 @@ def show(config):
print('build packages directory:', config.bldpkgs_dir)
+# legacy exports for conda
+croot = Config().croot
+
if __name__ ... |
scikit-hep__awkward-2274 | Tests are failing in "Build Docs", possibly due to new Sphinx theme
Is pydata_sphinx_theme broken, perhaps? It had a 0.13 release 12 hours ago.
_Originally posted by @henryiii in https://github.com/scikit-hep/awkward/issues/2268#issuecomment-1448934363_
For example, https://github.com/scikit-hep/awk... | [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup -------------------------------------------... | [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup -------------------------------------------... | diff --git a/docs/_templates/breadcrumbs.html b/docs/_templates/breadcrumbs.html
deleted file mode 100644
index 4ecb013f86..0000000000
--- a/docs/_templates/breadcrumbs.html
+++ /dev/null
@@ -1,4 +0,0 @@
-{%- extends "sphinx_rtd_theme/breadcrumbs.html" %}
-
-{% block breadcrumbs_aside %}
-{% endblock %}
diff --git a/do... |
tornadoweb__tornado-1838 | Excessive CPU load when returning empty collection
The following causes my CPU to stay pinned at 100% usage
``` python
from tornado.ioloop import IOLoop
from tornado import gen
from threading import Thread
loop = IOLoop.current()
t = Thread(target=loop.start, daemon=True)
t.start()
@gen.coroutine
def f():
yield ... | [
{
"content": "#!/usr/bin/env python\n#\n# Copyright 2009 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle... | [
{
"content": "#!/usr/bin/env python\n#\n# Copyright 2009 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle... | diff --git a/tornado/ioloop.py b/tornado/ioloop.py
index cadb41161a..d618317665 100644
--- a/tornado/ioloop.py
+++ b/tornado/ioloop.py
@@ -616,10 +616,14 @@ def _run_callback(self, callback):
# result, which should just be ignored.
pass
else:
- ... |
ansible-collections__community.general-1395 | MacPorts fails to install package whose name is contained within already installed package
##### SUMMARY
The `community.general.macports` module is failing to install a requested package, because that package's name occurs within another, already installed package.
It checks to see if a package is installed by list... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2013, Jimmy Tang <jcftang@gmail.com>\n# Based on okpg (Patrick Pelletier <pp.pelletier@gmail.com>), pacman\n# (Afterburn) and pkgin (Shaun Zinck) modules\n#\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2013, Jimmy Tang <jcftang@gmail.com>\n# Based on okpg (Patrick Pelletier <pp.pelletier@gmail.com>), pacman\n# (Afterburn) and pkgin (Shaun Zinck) modules\n#\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.... | diff --git a/changelogs/fragments/1307-macports-fix-status-check.yml b/changelogs/fragments/1307-macports-fix-status-check.yml
new file mode 100644
index 00000000000..878e66ca394
--- /dev/null
+++ b/changelogs/fragments/1307-macports-fix-status-check.yml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - macports - fix failure to in... |
mne-tools__mne-bids-937 | Automated event renaming doesn't always do the right thing
```python
# %%
from pathlib import Path
from mne_bids import BIDSPath, read_raw_bids
root = Path('~/mne_data/eeg_matchingpennies')
bp = BIDSPath(
subject='05',
task='matchingpennies',
suffix='eeg',
extension='.vhdr',
datatype='ee... | [
{
"content": "\"\"\"Check whether a file format is supported by BIDS and then load it.\"\"\"\n# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>\n# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Teon Brooks <teon.brooks@gmail.com>\n# Chris Holdgraf <choldgraf@ber... | [
{
"content": "\"\"\"Check whether a file format is supported by BIDS and then load it.\"\"\"\n# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>\n# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Teon Brooks <teon.brooks@gmail.com>\n# Chris Holdgraf <choldgraf@ber... | diff --git a/.circleci/config.yml b/.circleci/config.yml
index a66d44118..c2ee54ab3 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -11,7 +11,7 @@ jobs:
# restore cache from last build. Unless __init__.py has changed since then
- restore_cache:
keys:
- - data-... |
azavea__raster-vision-624 | Runner runs commands needlessly
I ran a full workflow, then deleted the predict and eval output, then ran again (without `-r ...`) and it ran predict, eval, and then... train. Using the verbose flag, I saw that the train command expected three files which all exist, so I'm surprised it wanted to run it again.
| [
{
"content": "import os\nfrom copy import deepcopy\nfrom google.protobuf import (json_format)\n\nimport rastervision as rv\nfrom rastervision.backend import (BackendConfig, BackendConfigBuilder,\n TFDeeplab)\nfrom rastervision.protos.backend_pb2 import BackendConfig as BackendCo... | [
{
"content": "import os\nfrom copy import deepcopy\nfrom google.protobuf import (json_format)\n\nimport rastervision as rv\nfrom rastervision.backend import (BackendConfig, BackendConfigBuilder,\n TFDeeplab)\nfrom rastervision.protos.backend_pb2 import BackendConfig as BackendCo... | diff --git a/rastervision/backend/tf_deeplab_config.py b/rastervision/backend/tf_deeplab_config.py
index 574376c06..c4d6cebb7 100644
--- a/rastervision/backend/tf_deeplab_config.py
+++ b/rastervision/backend/tf_deeplab_config.py
@@ -121,7 +121,10 @@ def update_for_command(self,
# Set the fine tune checkpoi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.