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 ⌀ |
|---|---|---|---|---|
django-extensions__django-extensions-1100 | Use text/plain for foreign key autocomplete admin
My admin site uses `ForeignKeyAutocompleteAdmin`. One day, our autocomplete fields started looking like this:
<img width="816" alt="screen shot 2017-05-18 at 3 25 59 pm" src="https://cloud.githubusercontent.com/assets/3439947/26224142/5551f812-3bde-11e7-8c23-74bec868... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Autocomplete feature for admin panel\n#\nimport six\nimport operator\nfrom functools import update_wrapper\nfrom six.moves import reduce\n\nfrom django.apps import apps\nfrom django.http import HttpResponse, HttpResponseNotFound\nfrom django.conf import settings\nfrom... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Autocomplete feature for admin panel\n#\nimport six\nimport operator\nfrom functools import update_wrapper\nfrom six.moves import reduce\n\nfrom django.apps import apps\nfrom django.http import HttpResponse, HttpResponseNotFound\nfrom django.conf import settings\nfrom... | diff --git a/django_extensions/admin/__init__.py b/django_extensions/admin/__init__.py
index eb3fddbe2..5d6ad5710 100644
--- a/django_extensions/admin/__init__.py
+++ b/django_extensions/admin/__init__.py
@@ -120,7 +120,7 @@ def construct_search(field_name):
pass
else:
... |
mne-tools__mne-bids-pipeline-743 | BUG: Too many JSON files error
https://mne.discourse.group/t/mne-bids-pipeline-too-many-json-files-error/6436
> This is a MEG dataset which I converted to BIDS format using mne-bids. The json files which appear to cause the trouble are [_beh.json] sidecar files for the behavioural data I saved to the beh/ subfolder ... | [
{
"content": "\"\"\"Find empty-room data matches.\"\"\"\n\nfrom types import SimpleNamespace\nfrom typing import Dict, Optional\n\nfrom mne.utils import _pl\nfrom mne_bids import BIDSPath\n\nfrom ..._config_utils import (\n get_datatype,\n get_task,\n get_sessions,\n get_subjects,\n get_runs,\n)\... | [
{
"content": "\"\"\"Find empty-room data matches.\"\"\"\n\nfrom types import SimpleNamespace\nfrom typing import Dict, Optional\n\nfrom mne.utils import _pl\nfrom mne_bids import BIDSPath\n\nfrom ..._config_utils import (\n get_datatype,\n get_task,\n get_sessions,\n get_subjects,\n get_runs,\n)\... | diff --git a/docs/source/v1.4.md.inc b/docs/source/v1.4.md.inc
index f2924415e..d5f335631 100644
--- a/docs/source/v1.4.md.inc
+++ b/docs/source/v1.4.md.inc
@@ -15,3 +15,4 @@
### :bug: Bug fixes
- Fix bug when `mf_reference_run != runs[0]` (#742 by @larsoner)
+- Fix bug with too many JSON files found during empty r... |
pymodbus-dev__pymodbus-2045 | Decoder exceptions ufter updating 3.4.3->3.6.4 using server
### Versions
- Python: 3.11
- OS: Windows 11
- Pymodbus: 3.6.4
- Modbus Hardware (if used): -
### Pymodbus Specific
- Server: tcp/async
- Client: tcp/async
### Description
<!-- What were you trying, what has happened, what went wrong, and w... | [
{
"content": "\"\"\"Socket framer.\"\"\"\n# pylint: disable=missing-type-doc\nimport struct\n\nfrom pymodbus.exceptions import (\n InvalidMessageReceivedException,\n ModbusIOException,\n)\nfrom pymodbus.framer.base import SOCKET_FRAME_HEADER, ModbusFramer\nfrom pymodbus.logging import Log\n\n\n# ---------... | [
{
"content": "\"\"\"Socket framer.\"\"\"\n# pylint: disable=missing-type-doc\nimport struct\n\nfrom pymodbus.exceptions import (\n InvalidMessageReceivedException,\n ModbusIOException,\n)\nfrom pymodbus.framer.base import SOCKET_FRAME_HEADER, ModbusFramer\nfrom pymodbus.logging import Log\n\n\n# ---------... | diff --git a/examples/package_test_tool.py b/examples/package_test_tool.py
index cfc81002c..27060508d 100755
--- a/examples/package_test_tool.py
+++ b/examples/package_test_tool.py
@@ -192,11 +192,11 @@ async def client_calls(client):
async def server_calls(transport: ModbusProtocol):
"""Test client API."""
- ... |
pwndbg__pwndbg-1218 | `leakfind` should default to `$sp`
The first argument to `leakfind` is required, but it should just default to `$sp` like `probeleak` does.
| [
{
"content": "\"\"\"\nFind a chain of leaks given some starting address.\n\"\"\"\n\nimport argparse\nimport queue\n\nimport gdb\n\nimport pwndbg.color.chain as C\nimport pwndbg.color.memory as M\nimport pwndbg.color.message as message\nimport pwndbg.commands\nimport pwndbg.vmmap\nfrom pwndbg.chain import config... | [
{
"content": "\"\"\"\nFind a chain of leaks given some starting address.\n\"\"\"\n\nimport argparse\nimport queue\n\nimport gdb\n\nimport pwndbg.color.chain as C\nimport pwndbg.color.memory as M\nimport pwndbg.color.message as message\nimport pwndbg.commands\nimport pwndbg.vmmap\nfrom pwndbg.chain import config... | diff --git a/pwndbg/commands/leakfind.py b/pwndbg/commands/leakfind.py
index c7e7af14d0e..0f53e1183c4 100644
--- a/pwndbg/commands/leakfind.py
+++ b/pwndbg/commands/leakfind.py
@@ -60,7 +60,9 @@ def dbg_print_map(maps):
and are a maximum length of 6.
"""
parser.formatter_class = argparse.RawDescriptionHelpFormatter
... |
pypa__cibuildwheel-199 | cibuildwheel CI tests failing on Azure for windows
`cibuildwheel` CI tests which are using the sample configuration in README are failing on Windows following Azure update to support python 3.8
Given the number of CI providers now tested, I guess we can try to test `cibuildwheel` on python 2.7, 3.5, 3.6, 3.7 and 3.8... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nsetup(\n name='cibuildwheel',\n version='0.12.0',\n install_requires=['bashlex!=0.13'],\n description=\"Build Python wheels on CI with ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nsetup(\n name='cibuildwheel',\n version='0.12.0',\n install_requires=['bashlex!=0.13'],\n description=\"Build Python wheels on CI with ... | diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 6d67dfbb3..72ff2b858 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -3,6 +3,8 @@ jobs:
pool: {vmImage: 'Ubuntu-18.04'}
steps:
- task: UsePythonVersion@0
+ inputs:
+ versionSpec: '3.8'
- bash: |
python -m pip... |
encode__httpx-1469 | environ["SERVER_PORT"] can't be "None"
### Checklist
<!-- Please make sure you check all these items before submitting your bug report. -->
- [x] The bug is reproducible against the latest release and/or `master`.
- [x] There are no similar issues or pull requests to fix it yet.
### Describe the bug
https:... | [
{
"content": "import io\nimport itertools\nimport typing\nfrom urllib.parse import unquote\n\nimport httpcore\n\n\ndef _skip_leading_empty_chunks(body: typing.Iterable) -> typing.Iterable:\n body = iter(body)\n for chunk in body:\n if chunk:\n return itertools.chain([chunk], body)\n r... | [
{
"content": "import io\nimport itertools\nimport typing\nfrom urllib.parse import unquote\n\nimport httpcore\n\n\ndef _skip_leading_empty_chunks(body: typing.Iterable) -> typing.Iterable:\n body = iter(body)\n for chunk in body:\n if chunk:\n return itertools.chain([chunk], body)\n r... | diff --git a/httpx/_transports/wsgi.py b/httpx/_transports/wsgi.py
index 953e1908c2..67b44bde42 100644
--- a/httpx/_transports/wsgi.py
+++ b/httpx/_transports/wsgi.py
@@ -74,6 +74,9 @@ def request(
scheme, host, port, full_path = url
path, _, query = full_path.partition(b"?")
+ if port is Non... |
tobymao__sqlglot-552 | cast to map with clickhouse dialect ignores case
Yet another clickhouse case sensitivity bug :)
ClickHouse CLI:
```
albatross :) select cast(map('a', 1, 'b', 2) as Map(String, Int8));
SELECT CAST(map('a', 1, 'b', 2), 'Map(String, Int8)')
Query id: bab188fb-69f7-4c0f-9bde-ac524a08f6e8
┌─CAST(map('a', 1... | [
{
"content": "from sqlglot import exp\nfrom sqlglot.dialects.dialect import Dialect, inline_array_sql, var_map_sql\nfrom sqlglot.generator import Generator\nfrom sqlglot.helper import csv\nfrom sqlglot.parser import Parser, parse_var_map\nfrom sqlglot.tokens import Tokenizer, TokenType\n\n\ndef _lower_func(sql)... | [
{
"content": "from sqlglot import exp\nfrom sqlglot.dialects.dialect import Dialect, inline_array_sql, var_map_sql\nfrom sqlglot.generator import Generator\nfrom sqlglot.parser import Parser, parse_var_map\nfrom sqlglot.tokens import Tokenizer, TokenType\n\n\ndef _lower_func(sql):\n index = sql.index(\"(\")\... | diff --git a/sqlglot/dialects/clickhouse.py b/sqlglot/dialects/clickhouse.py
index 68afde6d3f..dcabe8d39c 100644
--- a/sqlglot/dialects/clickhouse.py
+++ b/sqlglot/dialects/clickhouse.py
@@ -51,6 +51,9 @@ class Generator(Generator):
**Generator.TYPE_MAPPING,
exp.DataType.Type.NULLABLE: "Nullab... |
python-gitlab__python-gitlab-522 | http_request method of Gitlab class should accept None as the default value for param post_data
http_request method of Gitlab class (in the file \_\_init__.py) should accept None as the default value for param post_data.
For some caching servers, they reject HTTP GET request with body. If post_data's default value i... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2013-2017 Gauvain Pocentek <gauvain@pocentek.net>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation, either version 3 ... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2013-2017 Gauvain Pocentek <gauvain@pocentek.net>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation, either version 3 ... | diff --git a/gitlab/__init__.py b/gitlab/__init__.py
index 8d522b4b9..215949221 100644
--- a/gitlab/__init__.py
+++ b/gitlab/__init__.py
@@ -362,7 +362,7 @@ def _build_url(self, path):
else:
return '%s%s' % (self._url, path)
- def http_request(self, verb, path, query_data={}, post_data={},
+ ... |
kserve__kserve-818 | kubernetes probes using HealthHandler endpoint succeed when models are not ready
/kind bug
**What steps did you take and what happened:**
Used the [HealthHandler endpoint](https://github.com/kubeflow/kfserving/blob/92c5f3c9df662c853beef86bddf7f30ab5d8b996/python/kfserving/kfserving/kfserver.py#L62-L63) to set up a ... | [
{
"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/kfserving/kfserver.py b/python/kfserving/kfserving/kfserver.py
index be0b778c45f..a82d7f5e24d 100644
--- a/python/kfserving/kfserving/kfserver.py
+++ b/python/kfserving/kfserving/kfserver.py
@@ -105,6 +105,12 @@ def get(self, name: str):
)
model = self.models[name]
... |
translate__pootle-5706 | Stats table shows no zero counts
This can be seen in the following screenshot:

| [
{
"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.ut... | [
{
"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.ut... | diff --git a/pootle/core/views/display.py b/pootle/core/views/display.py
index 8d89908802e..b243160d9ec 100644
--- a/pootle/core/views/display.py
+++ b/pootle/core/views/display.py
@@ -157,7 +157,7 @@ def make_display_stat(d, keys=["total", "critical", "incomplete",
"suggestions", "f... |
zestedesavoir__zds-site-2705 | Derniers sujets sur la Home : la date sur mobile n'est pas optimisée
Sur mobile on à en général pas beaucoup de place. Et il faudrait éviter d'afficher la date literralle pour optimiser la place. Cf screen (paysage).
,\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# F... | [
{
"content": "##\n# Copyright 2009-2023 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# F... | diff --git a/easybuild/easyblocks/n/netcdf.py b/easybuild/easyblocks/n/netcdf.py
index 9ac62ff72cc..45017748bb1 100644
--- a/easybuild/easyblocks/n/netcdf.py
+++ b/easybuild/easyblocks/n/netcdf.py
@@ -143,7 +143,7 @@ def sanity_check_step(self):
custom_commands = [
"nc-config --help",
- ... |
sunpy__sunpy-3636 | MapSequence doesn't have `__repr__()`
`MapSequence` doesn't have `__repr__()`, which seems lazy.
```python
>>> from sunpy.data.sample import AIA_171_IMAGE
>>> from sunpy.map import Map
>>> Map(AIA_171_IMAGE)
SunPy Map
---------
Observatory: SDO
Instrument: AIA 3
Detector: ... | [
{
"content": "\"\"\"A Python MapSequence Object\"\"\"\n#pylint: disable=W0401,W0614,W0201,W0212,W0404\n\nfrom copy import deepcopy\n\nimport numpy as np\nimport matplotlib.animation\nimport numpy.ma as ma\n\nimport astropy.units as u\n\nfrom sunpy.map import GenericMap\nfrom sunpy.visualization.animator.mapsequ... | [
{
"content": "\"\"\"A Python MapSequence Object\"\"\"\n#pylint: disable=W0401,W0614,W0201,W0212,W0404\n\nfrom copy import deepcopy\n\nimport numpy as np\nimport matplotlib.animation\nimport numpy.ma as ma\n\nimport astropy.units as u\n\nfrom sunpy.map import GenericMap\nfrom sunpy.visualization.animator.mapsequ... | diff --git a/changelog/3636.feature.rst b/changelog/3636.feature.rst
new file mode 100644
index 00000000000..ae99ecd5daf
--- /dev/null
+++ b/changelog/3636.feature.rst
@@ -0,0 +1,2 @@
+Add ``__repr__`` for `~sunpy.map.MapSequence` objects so that users can view the
+critical information of all the ``Map`` objects, in ... |
carpentries__amy-1544 | Narrow drop down in assigning admin to event
When a user tries to assign an event from the event view or request view, the drop down is super narrow. Edit - I think this happens when no admin has yet been assigned; drop down is wide enough if a user has been assigned and you try to change it.
:
label='Administrator',
required=True,
queryset=Person.objects.all(),
- widget... |
MongoEngine__mongoengine-920 | ListField of embedded docs doesn't set the _instance attribute when iterating over it
It sets it for **getitem** but not for **iter**. Example:
[i._instance for i in parent.children] # [None, None, None]
parent.children[0]._instance == parent # True
| [
{
"content": "import weakref\nimport functools\nimport itertools\nfrom mongoengine.common import _import_class\nfrom mongoengine.errors import DoesNotExist, MultipleObjectsReturned\n\n__all__ = (\"BaseDict\", \"BaseList\", \"EmbeddedDocumentList\")\n\n\nclass BaseDict(dict):\n \"\"\"A special dict so we can ... | [
{
"content": "import weakref\nimport functools\nimport itertools\nfrom mongoengine.common import _import_class\nfrom mongoengine.errors import DoesNotExist, MultipleObjectsReturned\n\n__all__ = (\"BaseDict\", \"BaseList\", \"EmbeddedDocumentList\")\n\n\nclass BaseDict(dict):\n \"\"\"A special dict so we can ... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index 8f5904b89..72d2b49cd 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -5,6 +5,7 @@ Changelog
Changes in 0.9.X - DEV
======================
+- ListField of embedded docs doesn't set the _instance attribute when iterating over it #914
- Support +=... |
pyqtgraph__pyqtgraph-2965 | PyQtGraph 0.1.14 takes approximately twice as long to plot colored points in a ScatterPlotItem that 0.1.13
In PyQtGraph version `0.13.4`, coloring points in a `ScatterPlotItem` with `brush` set to a long index of integers (to rotate over the default number of colors) takes approximately twice as long as in PyQtGraph `0... | [
{
"content": "import itertools\nimport math\nimport weakref\nfrom collections import OrderedDict\n\nimport numpy as np\n\nfrom .. import Qt, debug\nfrom .. import functions as fn\nfrom .. import getConfigOption\nfrom ..Point import Point\nfrom ..Qt import QtCore, QtGui\nfrom .GraphicsObject import GraphicsObjec... | [
{
"content": "import itertools\nimport math\nimport weakref\nfrom collections import OrderedDict\n\nimport numpy as np\n\nfrom .. import Qt, debug\nfrom .. import functions as fn\nfrom .. import getConfigOption\nfrom ..Point import Point\nfrom ..Qt import QtCore, QtGui\nfrom .GraphicsObject import GraphicsObjec... | diff --git a/pyqtgraph/graphicsItems/ScatterPlotItem.py b/pyqtgraph/graphicsItems/ScatterPlotItem.py
index 0cc9046af7..d987621acf 100644
--- a/pyqtgraph/graphicsItems/ScatterPlotItem.py
+++ b/pyqtgraph/graphicsItems/ScatterPlotItem.py
@@ -361,6 +361,8 @@ def __init__(self, *args, **kargs):
self.picture = Non... |
watchdogpolska__feder-311 | Tytuły podstron
Wymagają aktualizacji tytuły (```<title>(…)</title>```) większości podstron w serwisie, aby odzwierciedlały podstronę na której użytkownik się znajduje. Coś bliskiego odwróconemu breadcrumbs bez linków może być. To wymaga więdzy wyłącznie z zakresu HTML-a, a można poobcować z aplikacją. Django-debug-to... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nDjango settings for feder project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/dev/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/dev/ref/settings/\n\"\"\"\nfrom __future__... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nDjango settings for feder project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/dev/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/dev/ref/settings/\n\"\"\"\nfrom __future__... | diff --git a/config/settings/common.py b/config/settings/common.py
index ba7421678..16d9fed68 100644
--- a/config/settings/common.py
+++ b/config/settings/common.py
@@ -326,6 +326,8 @@
},
'gilab': {'SCOPE': ['read_user', 'openid']}
}
+EMAIL_NOTIFICATION = env('EMAIL_NOTIFICATION', default='no-reply@siecobywa... |
rasterio__rasterio-914 | show_hist() fails with nans
I am getting an `UnboundLocalError: local variable 'ymin' referenced before assignment` when I am trying to use the show_hist() function in the plotting module.
```
import rasterio
from rasterio.plot import show_hist
from rasterio.plot import show
import matplotlib.pyplot as plt
fname = ... | [
{
"content": "\"\"\"Implementations of various common operations.\n\nIncluding `show()` for displaying an array or with matplotlib.\nMost can handle a numpy array or `rasterio.Band()`.\nPrimarily supports `$ rio insp`.\n\"\"\"\n\nfrom __future__ import absolute_import\n\nimport logging\nimport warnings\n\nimpor... | [
{
"content": "\"\"\"Implementations of various common operations.\n\nIncluding `show()` for displaying an array or with matplotlib.\nMost can handle a numpy array or `rasterio.Band()`.\nPrimarily supports `$ rio insp`.\n\"\"\"\n\nfrom __future__ import absolute_import\n\nimport logging\nimport warnings\n\nimpor... | diff --git a/rasterio/plot.py b/rasterio/plot.py
index 2df5cecb1..c96561b89 100644
--- a/rasterio/plot.py
+++ b/rasterio/plot.py
@@ -223,7 +223,7 @@ def show_hist(source, bins=10, masked=True, title='Histogram', ax=None, **kwargs
# The histogram is computed individually for each 'band' in the array
# so we ... |
ansible__awx-14626 | Issue on awx.awx.export/import awx cli/collection
### Please confirm the following
- [X] I agree to follow this project's [code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
- [X] I have checked the [current issues](https://github.com/ansible/awx/issues) for duplicates.
- [X]... | [
{
"content": "import logging\nimport re\n\n\nlog = logging.getLogger(__name__)\n\ndescRE = re.compile(r'^[*] `(\\w+)`: [^(]*\\((\\w+), ([^)]+)\\)')\n\n\ndef freeze(key):\n if key is None:\n return None\n return frozenset((k, freeze(v) if isinstance(v, dict) else v) for k, v in key.items())\n\n\ndef... | [
{
"content": "import logging\nimport re\n\n\nlog = logging.getLogger(__name__)\n\ndescRE = re.compile(r'^[*] `(\\w+)`: [^(]*\\((\\w+), ([^)]+)\\)')\n\n\ndef freeze(key):\n if key is None:\n return None\n return frozenset((k, freeze(v) if isinstance(v, dict) else v) for k, v in key.items())\n\n\ndef... | diff --git a/awx_collection/test/awx/test_export.py b/awx_collection/test/awx/test_export.py
index a70b451df461..70c8466ec0d0 100644
--- a/awx_collection/test/awx/test_export.py
+++ b/awx_collection/test/awx/test_export.py
@@ -134,21 +134,17 @@ def test_export_simple(
@pytest.mark.django_db
-def test_export_system... |
coala__coala-bears-970 | GitCommitBear: Change ``returns`` to ``return``
[line](https://github.com/coala-analyzer/coala-bears/blob/master/bears/vcs/git/GitCommitBear.py#L147)
difficulty/newcomer
| [
{
"content": "import nltk\nimport re\nimport shutil\nimport os\n\nfrom coalib.bears.GlobalBear import GlobalBear\nfrom coalib.bears.requirements.PipRequirement import PipRequirement\nfrom coalib.misc.ContextManagers import change_directory\nfrom coalib.misc.Shell import run_shell_command\nfrom coalib.results.Re... | [
{
"content": "import nltk\nimport re\nimport shutil\nimport os\n\nfrom coalib.bears.GlobalBear import GlobalBear\nfrom coalib.bears.requirements.PipRequirement import PipRequirement\nfrom coalib.misc.ContextManagers import change_directory\nfrom coalib.misc.Shell import run_shell_command\nfrom coalib.results.Re... | diff --git a/bears/vcs/git/GitCommitBear.py b/bears/vcs/git/GitCommitBear.py
index 906f112a60..47264429c9 100644
--- a/bears/vcs/git/GitCommitBear.py
+++ b/bears/vcs/git/GitCommitBear.py
@@ -148,7 +148,7 @@ def check_imperative(self, paragraph):
:param paragraph:
The input paragraph to be tested... |
ethereum__web3.py-2360 | Upgrade jsonschema to the latest 4.4
### What was wrong?
https://github.com/ethereum/web3.py/blob/16aff7e80a6bc089051c154b5079213317c27da8/setup.py#L86
I cannot combine `web3.py` with the latest `jsonschema` in a single app (without relying on ugly hacks)
### How can it be fixed?
Maybe just expand the range... | [
{
"content": "#!/usr/bin/env python\nfrom setuptools import (\n find_packages,\n setup,\n)\n\nextras_require = {\n 'tester': [\n \"eth-tester[py-evm]==v0.6.0-beta.6\",\n \"py-geth>=3.7.0,<4\",\n ],\n 'linter': [\n \"flake8==3.8.3\",\n \"isort>=4.2.15,<4.3.5\",\n ... | [
{
"content": "#!/usr/bin/env python\nfrom setuptools import (\n find_packages,\n setup,\n)\n\nextras_require = {\n 'tester': [\n \"eth-tester[py-evm]==v0.6.0-beta.6\",\n \"py-geth>=3.7.0,<4\",\n ],\n 'linter': [\n \"flake8==3.8.3\",\n \"isort>=4.2.15,<4.3.5\",\n ... | diff --git a/newsfragments/2360.feature.rst b/newsfragments/2360.feature.rst
new file mode 100644
index 0000000000..24745ceb15
--- /dev/null
+++ b/newsfragments/2360.feature.rst
@@ -0,0 +1 @@
+Upgrade ``jsonschema`` version range to >=3.2.0<5
\ No newline at end of file
diff --git a/setup.py b/setup.py
index a3934ac913... |
streamlink__streamlink-4590 | Using -j/--json option causes uncaught exception on 404 URLs
### Checklist
- [X] This is a bug report and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of ... | [
{
"content": "import argparse\nimport errno\nimport logging\nimport os\nimport platform\nimport re\nimport signal\nimport sys\nfrom contextlib import closing\nfrom distutils.version import StrictVersion\nfrom functools import partial\nfrom gettext import gettext\nfrom itertools import chain\nfrom pathlib import... | [
{
"content": "import argparse\nimport errno\nimport logging\nimport os\nimport platform\nimport re\nimport signal\nimport sys\nfrom contextlib import closing\nfrom distutils.version import StrictVersion\nfrom functools import partial\nfrom gettext import gettext\nfrom itertools import chain\nfrom pathlib import... | diff --git a/src/streamlink_cli/main.py b/src/streamlink_cli/main.py
index 663844351c7..14e89d8c82a 100644
--- a/src/streamlink_cli/main.py
+++ b/src/streamlink_cli/main.py
@@ -600,7 +600,7 @@ def handle_url():
except NoPluginError:
console.exit(f"No plugin can handle URL: {args.url}")
except PluginE... |
dask__dask-4603 | yaml.load() deprecation warning after updating to pyyaml v5.1 (released 13/03/19)
Very small issue. Wanted to flag early. Just updated to the lastest version of pyyaml (a dependency of dask) v5.1. After updating I get the following deprecation warning.
```
/dask/config.py:168: YAMLLoadWarning: calling yaml.load() ... | [
{
"content": "from __future__ import print_function, division, absolute_import\n\nimport ast\nimport os\nimport sys\nimport threading\ntry:\n import yaml\nexcept ImportError:\n yaml = None\n\nfrom .compatibility import makedirs, builtins, Mapping, string_types\n\n\nno_default = '__no_default__'\n\n\npaths... | [
{
"content": "from __future__ import print_function, division, absolute_import\n\nimport ast\nimport os\nimport sys\nimport threading\ntry:\n import yaml\nexcept ImportError:\n yaml = None\n\nfrom .compatibility import makedirs, builtins, Mapping, string_types\n\n\nno_default = '__no_default__'\n\n\npaths... | diff --git a/dask/config.py b/dask/config.py
index 743548478fc..d2bee117855 100644
--- a/dask/config.py
+++ b/dask/config.py
@@ -165,7 +165,7 @@ def collect_yaml(paths=paths):
for path in file_paths:
try:
with open(path) as f:
- data = yaml.load(f.read()) or {}
+ ... |
lutris__lutris-1975 | Can't launch games on master with prefer system libraries enabled
```
DEBUG 2019-03-30 14:02:57,737 [application.launch:341]:Adding game EFMB (linux) (140618847460016) to running games
DEBUG 2019-03-30 14:02:57,742 [display._get_vidmodes:15]:Retrieving video modes from XrandR
DEBUG 2019-03-30 14:02:57,761 [... | [
{
"content": "\"\"\"Runtime handling module\"\"\"\nimport os\nimport time\n\nfrom gi.repository import GLib\nfrom lutris.settings import RUNTIME_DIR, RUNTIME_URL\nfrom lutris.util import http, jobs, system\nfrom lutris.util.downloader import Downloader\nfrom lutris.util.extract import extract_archive\nfrom lutr... | [
{
"content": "\"\"\"Runtime handling module\"\"\"\nimport os\nimport time\n\nfrom gi.repository import GLib\nfrom lutris.settings import RUNTIME_DIR, RUNTIME_URL\nfrom lutris.util import http, jobs, system\nfrom lutris.util.downloader import Downloader\nfrom lutris.util.extract import extract_archive\nfrom lutr... | diff --git a/lutris/runtime.py b/lutris/runtime.py
index a302976ec7..e5144c5616 100644
--- a/lutris/runtime.py
+++ b/lutris/runtime.py
@@ -236,8 +236,8 @@ def get_system_paths():
# This prioritizes system libraries over
# the Lutris and Steam runtimes.
for lib_paths in LINUX_SYSTEM.iter_lib_folders():
- ... |
aws-cloudformation__cfn-lint-3030 | Use samtranslate `passthrough_metadata` to support ignoring checks on Serverless resources
### Is this feature request related to a new rule or cfn-lint capabilities?
_No response_
### Describe the feature you'd like to request
Based on this: https://github.com/aws/serverless-application-model/pull/2224, it looks li... | [
{
"content": "\"\"\"\nCopyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\n\nfrom __future__ import annotations\n\nimport logging\nimport os\nfrom typing import Any\n\nimport samtranslator\nfrom samtranslator.parser import parser\nfrom samtranslator.pu... | [
{
"content": "\"\"\"\nCopyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\n\nfrom __future__ import annotations\n\nimport logging\nimport os\nfrom typing import Any\n\nimport samtranslator\nfrom samtranslator.parser import parser\nfrom samtranslator.pu... | diff --git a/src/cfnlint/template/transforms/_sam.py b/src/cfnlint/template/transforms/_sam.py
index 178e46a668..a0f6cf53f3 100644
--- a/src/cfnlint/template/transforms/_sam.py
+++ b/src/cfnlint/template/transforms/_sam.py
@@ -152,7 +152,9 @@ def transform_template(self):
self._template = convert_dict(
... |
pymedusa__Medusa-7842 | API v2 - Authenticate Fail
I'm trying to use the APIv2 but the authorization fails.
What is wrong with my resquests?
#############Request#############
POST /api/v2/authenticate HTTP/1.1
Host: 192.168.17.204:8081
User-Agent: FlexGet/3.1.15 (www.flexget.com)
Accept-Encoding: gzip, deflate
Accept: */*
Connection... | [
{
"content": "# coding=utf-8\n\"\"\"Request handler for authentication.\"\"\"\nfrom __future__ import unicode_literals\n\nimport logging\nimport random\nimport string\nimport time\nfrom builtins import range\n\nimport jwt\n\nfrom medusa import app, helpers, notifiers\nfrom medusa.logger.adapters.style import Br... | [
{
"content": "# coding=utf-8\n\"\"\"Request handler for authentication.\"\"\"\nfrom __future__ import unicode_literals\n\nimport logging\nimport random\nimport string\nimport time\nfrom builtins import range\n\nimport jwt\n\nfrom medusa import app, helpers, notifiers\nfrom medusa.logger.adapters.style import Br... | diff --git a/medusa/server/api/v2/auth.py b/medusa/server/api/v2/auth.py
index 6b6062e8a7..77f37cd31b 100644
--- a/medusa/server/api/v2/auth.py
+++ b/medusa/server/api/v2/auth.py
@@ -74,7 +74,7 @@ def _login(self, exp=86400):
'exp': time_now + int(exp),
'username': app.WEB_USERNAME,
... |
numba__numba-2444 | Type inference let through invalid cast in setitem
See comment in
https://github.com/numba/numba/pull/2400#discussion_r122973897
```
numba.errors.LoweringError: Failed at nopython (nopython mode backend)
Cannot cast complex128 to float64: %".268" = load {double, double}, {double, double}* %"$6.4.16"
```
Type ... | [
{
"content": "from __future__ import print_function, division, absolute_import\n\nfrom collections import namedtuple\n\nfrom numba import types\nfrom numba.typing.templates import (AttributeTemplate, AbstractTemplate,\n infer, infer_getattr, signature,\n ... | [
{
"content": "from __future__ import print_function, division, absolute_import\n\nfrom collections import namedtuple\n\nfrom numba import types\nfrom numba.typing.templates import (AttributeTemplate, AbstractTemplate,\n infer, infer_getattr, signature,\n ... | diff --git a/numba/tests/test_typingerror.py b/numba/tests/test_typingerror.py
index a87eb2bdd26..6255b7a5911 100644
--- a/numba/tests/test_typingerror.py
+++ b/numba/tests/test_typingerror.py
@@ -44,6 +44,11 @@ def unknown_module():
def nop(x, y, z):
pass
+def array_setitem_invalid_cast():
+ arr = np.empty(... |
buildbot__buildbot-5771 | _matches_any_tag missing from BuildStartEndStatusGenerator
The [_matches_any_tag function](https://github.com/buildbot/buildbot/blob/e630745771a8bd03a2084d03ea8e43547d3dff4b/master/buildbot/reporters/generators/build.py#L82) is missing from the BuildStartEndStatusGenerator. This causes failures when you try to filter t... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | diff --git a/master/buildbot/newsfragments/reporters-build-start-end-generator-tags.bugfix b/master/buildbot/newsfragments/reporters-build-start-end-generator-tags.bugfix
new file mode 100644
index 000000000000..2bbe7c172312
--- /dev/null
+++ b/master/buildbot/newsfragments/reporters-build-start-end-generator-tags.bugf... |
qtile__qtile-3981 | Can't build HTML documentation
### The issue:
Qtile version is 0.22.1. I make a python virtual environment and install the requirements for building the docs, but when running `make html` I get an error about screenshots not being found.
Here's the full stack trace:
```
# Sphinx version: 5.3.0
# Python version: ... | [
{
"content": "# Copyright (c) 2015 dmpayton\n# Copyright (c) 2021 elParaguayo\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation... | [
{
"content": "# Copyright (c) 2015 dmpayton\n# Copyright (c) 2021 elParaguayo\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation... | diff --git a/docs/sphinx_qtile.py b/docs/sphinx_qtile.py
index e0e6087612..1919e6ee7c 100644
--- a/docs/sphinx_qtile.py
+++ b/docs/sphinx_qtile.py
@@ -163,7 +163,7 @@ def make_rst(self):
try:
with open(index, "r") as f:
shots = json.load(f)
- except json.JSO... |
opsdroid__opsdroid-180 | Cannot use ~ in module paths
Modules specified in the configuration with a path that includes the `~` character do not import. This character needs to be expanded.
| [
{
"content": "\"\"\"Class for loading in modules to OpsDroid.\"\"\"\n\nimport logging\nimport os\nimport sys\nimport shutil\nimport subprocess\nimport importlib\nimport yaml\nfrom opsdroid.const import (\n DEFAULT_GIT_URL, MODULES_DIRECTORY, DEFAULT_MODULES_PATH,\n DEFAULT_MODULE_BRANCH, DEFAULT_CONFIG_PA... | [
{
"content": "\"\"\"Class for loading in modules to OpsDroid.\"\"\"\n\nimport logging\nimport os\nimport sys\nimport shutil\nimport subprocess\nimport importlib\nimport yaml\nfrom opsdroid.const import (\n DEFAULT_GIT_URL, MODULES_DIRECTORY, DEFAULT_MODULES_PATH,\n DEFAULT_MODULE_BRANCH, DEFAULT_CONFIG_PA... | diff --git a/opsdroid/loader.py b/opsdroid/loader.py
index 216750aba..055b49915 100644
--- a/opsdroid/loader.py
+++ b/opsdroid/loader.py
@@ -282,6 +282,7 @@ def _install_git_module(self, config):
def _install_local_module(config):
"""Install a module from a local path."""
installed = False
+ ... |
diofant__diofant-852 | Project logo
There are few places to put images:
- [x] Top left corner of https://diofant.readthedocs.io/ (see e.g. https://sphinx-rtd-theme.readthedocs.io/)
- [x] favicon.ico.
- [x] logo for pdf logs
- [x] Organization profile on the Github (at least 200x200px)
- [x] ~~repository’s social media preview (640×320px... | [
{
"content": "#\n# Diofant documentation build configuration file.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# The contents of this file are pickled, so don't put values in the\n# namespace that aren't pickleable (module imports are okay, they're\n# removed auto... | [
{
"content": "#\n# Diofant documentation build configuration file.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# The contents of this file are pickled, so don't put values in the\n# namespace that aren't pickleable (module imports are okay, they're\n# removed auto... | diff --git a/docs/_static/custom.css b/docs/_static/custom.css
index 8cb4ecadc9..ee6e5c61ed 100644
--- a/docs/_static/custom.css
+++ b/docs/_static/custom.css
@@ -9,5 +9,5 @@
.rst-content div[class^="highlight"] pre {
line-height: normal;
- font-family: 'DejaVuSansMonoBook', 'DejaVuSansMonoBookFallback', 'De... |
saleor__saleor-723 | Add checkout steps navigation
Now there's no explicit navigation. Using browser back button can be dangerous in some cases and it's not a common behavior in ecommerce
| [
{
"content": "import logging\n\nfrom django.conf import settings\nfrom django.contrib import messages, auth\nfrom django.db import transaction\nfrom django.http import Http404, HttpResponseForbidden\nfrom django.shortcuts import get_object_or_404, redirect\nfrom django.utils.translation import ugettext as _\nfr... | [
{
"content": "import logging\n\nfrom django.conf import settings\nfrom django.contrib import messages, auth\nfrom django.db import transaction\nfrom django.http import Http404, HttpResponseForbidden\nfrom django.shortcuts import get_object_or_404, redirect\nfrom django.utils.translation import ugettext as _\nfr... | diff --git a/package.json b/package.json
index e47103c8f57..2fccdf13194 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
"bootstrap-sass": "^3.3.7",
"classnames": "^2.2.5",
"dropzone": "^4.2.0",
+ "font-awesome": "^4.7.0",
"jquery": "^2.1.4",
"jquery-match-height": "^0.7.0",
... |
jazzband__pip-tools-1419 | Order of packages in requirements.txt -- pip-compile vs. pip freeze
The issue regards packages with names containing `-` character or a digit. This may cause an unexpected order of packages in the output file, different than with `pip freeze`. It seems that the output file is sorted by the whole lines, together with `=... | [
{
"content": "import os\nimport re\nimport sys\nfrom itertools import chain\nfrom typing import BinaryIO, Dict, Iterable, Iterator, List, Optional, Set, Tuple\n\nfrom click import unstyle\nfrom click.core import Context\nfrom pip._internal.models.format_control import FormatControl\nfrom pip._internal.req.req_i... | [
{
"content": "import os\nimport re\nimport sys\nfrom itertools import chain\nfrom typing import BinaryIO, Dict, Iterable, Iterator, List, Optional, Set, Tuple\n\nfrom click import unstyle\nfrom click.core import Context\nfrom pip._internal.models.format_control import FormatControl\nfrom pip._internal.req.req_i... | diff --git a/piptools/writer.py b/piptools/writer.py
index 1b3ab8cc5..b99a96ca8 100644
--- a/piptools/writer.py
+++ b/piptools/writer.py
@@ -89,7 +89,7 @@ def __init__(
self.emit_find_links = emit_find_links
def _sort_key(self, ireq: InstallRequirement) -> Tuple[bool, str]:
- return (not ireq.edi... |
liberapay__liberapay.com-897 | DB deadlock during mangopay callback
https://sentry.io/share/issue/3b6782b3c362425bbd45706b70c3f024/
```
TransactionRollbackError: deadlock detected
DETAIL: Process 22472 waits for ExclusiveLock on relation 18144 of database 16390; blocked by process 22475.
Process 22475 waits for ExclusiveLock on relation 18157... | [
{
"content": "\"\"\"Functions for moving money into, out of, or between wallets.\n\"\"\"\nfrom __future__ import division, print_function, unicode_literals\n\nfrom decimal import Decimal\nfrom time import sleep\n\nfrom mangopay.exceptions import APIError\nfrom mangopay.resources import (\n BankAccount, BankW... | [
{
"content": "\"\"\"Functions for moving money into, out of, or between wallets.\n\"\"\"\nfrom __future__ import division, print_function, unicode_literals\n\nfrom decimal import Decimal\nfrom time import sleep\n\nfrom mangopay.exceptions import APIError\nfrom mangopay.resources import (\n BankAccount, BankW... | diff --git a/liberapay/billing/transactions.py b/liberapay/billing/transactions.py
index e939f30bd9..4cf67f59de 100644
--- a/liberapay/billing/transactions.py
+++ b/liberapay/billing/transactions.py
@@ -439,8 +439,8 @@ def propagate_exchange(cursor, participant, exchange, error, amount):
participant.set_attributes... |
tornadoweb__tornado-1576 | Options should support setitem
From http://stackoverflow.com/questions/33411269/attributeerror-in-python-tornado-to-configure-log-into-a-file/33417289
Options currently override getattr, setattr, and getitem. Item and attribute syntax should be symmetric so we need a setitem override to match setattr.
| [
{
"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/options.py b/tornado/options.py
index ba16b1a7fd..bdb5baa0a9 100644
--- a/tornado/options.py
+++ b/tornado/options.py
@@ -132,8 +132,10 @@ def __contains__(self, name):
return name in self._options
def __getitem__(self, name):
- name = self._normalize_name(name)
- retu... |
psychopy__psychopy-3176 | autocomplete is raising an error on mac standalone
My guess is that jedi needs to be packaged differently so that it isn't "frozen"
| [
{
"content": "#!/usr/bin/env python\n################\n# see notes at bottom for requirements\nfrom __future__ import absolute_import, print_function\nimport glob\nimport os\nimport sys\nfrom sys import platform\nfrom distutils.core import setup\nfrom pkg_resources import parse_version\n# import versioneer\nimp... | [
{
"content": "#!/usr/bin/env python\n################\n# see notes at bottom for requirements\nfrom __future__ import absolute_import, print_function\nimport glob\nimport os\nimport sys\nfrom sys import platform\nfrom distutils.core import setup\nfrom pkg_resources import parse_version\n# import versioneer\nimp... | diff --git a/setupApp.py b/setupApp.py
index 89f184d92c..07315ce959 100755
--- a/setupApp.py
+++ b/setupApp.py
@@ -104,7 +104,7 @@ def dyld_find(name, loader=None, **kwargs):
'badapted', 'darc_toolbox', # adaptive methods from Ben Vincent
'questplus',
'metapensiero.pj', 'dukpy', ... |
facebookresearch__ParlAI-1334 | Messenger - qa_data_collection task
Running the messenger qa_data_collection task, it gives me te following error:
Exception in user code:
Traceback (most recent call last):
File "/home/micol/PycharmProjects/parlai_project/ParlAI/parlai/messenger/core/messenger_manager.py", line 552, in _task_function
task_f... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) 2017-present, Facebook, Inc.\n# All rights reserved.\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree. An additional grant\n# of patent rights can be found in the PATENTS fil... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) 2017-present, Facebook, Inc.\n# All rights reserved.\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree. An additional grant\n# of patent rights can be found in the PATENTS fil... | diff --git a/parlai/messenger/tasks/qa_data_collection/run.py b/parlai/messenger/tasks/qa_data_collection/run.py
index 15fb5b6a9e8..9d2f93fa6c8 100644
--- a/parlai/messenger/tasks/qa_data_collection/run.py
+++ b/parlai/messenger/tasks/qa_data_collection/run.py
@@ -27,7 +27,7 @@ def main():
class_name = 'DefaultTea... |
ivy-llc__ivy-28068 | Fix Frontend Failing Test: torch - creation.paddle.eye
To-do List: https://github.com/unifyai/ivy/issues/27498
| [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nimport ivy.functional.frontends.paddle as paddle_frontend\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@with_unsupported_dtypes({\"2.6.0 and below\... | [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nimport ivy.functional.frontends.paddle as paddle_frontend\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@with_unsupported_dtypes({\"2.6.0 and below\... | diff --git a/ivy/functional/frontends/paddle/creation.py b/ivy/functional/frontends/paddle/creation.py
index 4cc1b8f9b0820..2f1b4a5f136c5 100644
--- a/ivy/functional/frontends/paddle/creation.py
+++ b/ivy/functional/frontends/paddle/creation.py
@@ -87,6 +87,9 @@ def empty_like(x, dtype=None, name=None):
return ivy... |
netbox-community__netbox-11439 | Scheduled tasks are not deleted when the JobResult is deleted when another queue is used (via. QUEUE_MAPPINGS)
### NetBox version
v3.4.2
### Python version
3.10
### Steps to Reproduce
1. Schedule a script with a scheduled datetime and an interval
2. Delete the JobResult before the script is executed
### Expected... | [
{
"content": "import json\nimport uuid\n\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.contrib.auth.models import User\nfrom django.contrib.contenttypes.fields import GenericForeignKey\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.cache import c... | [
{
"content": "import json\nimport uuid\n\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.contrib.auth.models import User\nfrom django.contrib.contenttypes.fields import GenericForeignKey\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.cache import c... | diff --git a/netbox/extras/models/models.py b/netbox/extras/models/models.py
index 607c5d4a0a1..e608f81b1d4 100644
--- a/netbox/extras/models/models.py
+++ b/netbox/extras/models/models.py
@@ -634,7 +634,8 @@ def __str__(self):
def delete(self, *args, **kwargs):
super().delete(*args, **kwargs)
- ... |
flairNLP__flair-2393 | Why checkpoint related methods are named inconsistently
For the `ModelTrainer` it's named `load_checkpoint` and for the `LanguageModelTrainer` it is `load_from_checkpoint`?
| [
{
"content": "import time, datetime\nimport random\nimport sys\nfrom pathlib import Path\nfrom typing import Union\n\nfrom torch import cuda\nfrom torch.utils.data import Dataset, DataLoader\nfrom torch.optim.sgd import SGD\n\ntry:\n from apex import amp\nexcept ImportError:\n amp = None\n\nimport flair\n... | [
{
"content": "import time, datetime\nimport random\nimport sys\nfrom pathlib import Path\nfrom typing import Union\n\nfrom torch import cuda\nfrom torch.utils.data import Dataset, DataLoader\nfrom torch.optim.sgd import SGD\n\ntry:\n from apex import amp\nexcept ImportError:\n amp = None\n\nimport flair\n... | diff --git a/flair/trainers/language_model_trainer.py b/flair/trainers/language_model_trainer.py
index 8840d76831..fca2ca46c1 100644
--- a/flair/trainers/language_model_trainer.py
+++ b/flair/trainers/language_model_trainer.py
@@ -477,7 +477,7 @@ def _repackage_hidden(h):
return tuple(v.clone().detach() for v ... |
streamlit__streamlit-6129 | Regression in v1.18.0 `st.metric`'s `help` tooltip position
### Checklist
- [X] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues.
- [X] I added a very descriptive title to this issue.
- [X] I have provided sufficient information below to help reproduce this is... | [
{
"content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\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) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\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/e2e/scripts/st_metric.py b/e2e/scripts/st_metric.py
index f2caec9d5296..9c4d72950a9d 100644
--- a/e2e/scripts/st_metric.py
+++ b/e2e/scripts/st_metric.py
@@ -41,3 +41,13 @@
st.metric("Test 4", -4.56, 1.23, label_visibility="hidden")
with col3:
st.metric("Test 5", -4.56, 1.23, label_visibility="c... |
encode__uvicorn-921 | Websockets implementation does not clean properly tasks if handshake fails
this is a good explanation of what we see in those 2 tests and that causes flaky tests:
FWIW there's an asyncio warning when I try to run `test_send_before_handshake` or `test_missing_handshake` in isolation. Doesn't show if I run either al... | [
{
"content": "import asyncio\nimport http\nimport logging\nfrom urllib.parse import unquote\n\nimport websockets\n\nfrom uvicorn.protocols.utils import get_local_addr, get_remote_addr, is_ssl\n\n\nclass Server:\n closing = False\n\n def register(self, ws):\n pass\n\n def unregister(self, ws):\n ... | [
{
"content": "import asyncio\nimport http\nimport logging\nfrom urllib.parse import unquote\n\nimport websockets\n\nfrom uvicorn.protocols.utils import get_local_addr, get_remote_addr, is_ssl\n\n\nclass Server:\n closing = False\n\n def register(self, ws):\n pass\n\n def unregister(self, ws):\n ... | diff --git a/uvicorn/protocols/websockets/websockets_impl.py b/uvicorn/protocols/websockets/websockets_impl.py
index 30be0dc2f..aa81915bd 100644
--- a/uvicorn/protocols/websockets/websockets_impl.py
+++ b/uvicorn/protocols/websockets/websockets_impl.py
@@ -135,6 +135,9 @@ def send_500_response(self):
msg,
... |
aio-libs__aiohttp-7370 | typo in payload.py class AsyncIterablePayload error message
### Describe the bug
https://github.com/aio-libs/aiohttp/blob/bf9d753edc928e7ecbc590c32603ebd3c1fc6282/aiohttp/payload.py#L419 has a typo in place of the intended `collections.abc.AsyncIterable`.
### To Reproduce
N/A
### Expected behavior
N/A
### Logs/tr... | [
{
"content": "import asyncio\nimport enum\nimport io\nimport json\nimport mimetypes\nimport os\nimport warnings\nfrom abc import ABC, abstractmethod\nfrom itertools import chain\nfrom typing import (\n IO,\n TYPE_CHECKING,\n Any,\n ByteString,\n Dict,\n Iterable,\n Optional,\n TextIO,\n ... | [
{
"content": "import asyncio\nimport enum\nimport io\nimport json\nimport mimetypes\nimport os\nimport warnings\nfrom abc import ABC, abstractmethod\nfrom itertools import chain\nfrom typing import (\n IO,\n TYPE_CHECKING,\n Any,\n ByteString,\n Dict,\n Iterable,\n Optional,\n TextIO,\n ... | diff --git a/aiohttp/payload.py b/aiohttp/payload.py
index de08a293346..11f3f2db7b0 100644
--- a/aiohttp/payload.py
+++ b/aiohttp/payload.py
@@ -416,7 +416,7 @@ def __init__(self, value: _AsyncIterable, *args: Any, **kwargs: Any) -> None:
if not isinstance(value, AsyncIterable):
raise TypeError(
... |
electricitymaps__electricitymaps-contrib-1208 | Moldova repeated ValueError
Seen on the Kibana dashboard.
[Logger](https://kibana.electricitymap.org/app/kibana#/discover/1710fdd0-2460-11e8-a779-9d01de8d7a71?_g=(refreshInterval:('$$hashKey':'object:6765',display:'10%20seconds',pause:!f,section:1,value:10000),time:(from:'2018-03-10T00:00:00.000Z',mode:absolute,to:'... | [
{
"content": "#!/usr/bin/env python3\n# coding=utf-8\n\n\"\"\"Parser for Moldova.\"\"\"\n\nimport arrow\nfrom operator import itemgetter\nimport requests\n\nTYPE_MAPPING = {\n u'tmva476': 'hydro', # NHE Costeşti (run-of-river) #2 index\n u'tmva112': 'hydro', # NHE Dubăsari (run-of-river) #4 index\n u... | [
{
"content": "#!/usr/bin/env python3\n# coding=utf-8\n\n\"\"\"Parser for Moldova.\"\"\"\n\nimport arrow\nfrom operator import itemgetter\nimport requests\n\nTYPE_MAPPING = {\n u'tmva476': 'hydro', # NHE Costeşti (run-of-river) #2 index\n u'tmva112': 'hydro', # NHE Dubăsari (run-of-river) #4 index\n u... | diff --git a/parsers/MD.py b/parsers/MD.py
index c13e6e9d33..1655139c97 100644
--- a/parsers/MD.py
+++ b/parsers/MD.py
@@ -25,9 +25,10 @@ def get_data(session=None):
s = session or requests.Session()
+ #In order for the data url to return data, cookies from the display url must be obtained then reused.
+ ... |
pypa__pip-10846 | `--use-deprecated=html5lib` does not parse links, even though they're present
### Description
When using Pip 22.0 with `--use-deprecated=html5lib` with JFrog as the Index packages pip throws the error: `ERROR: No matching distribution found for requests`
Tested with the "requests" package on Windows 10 using pip... | [
{
"content": "\"\"\"\nThe main purpose of this module is to expose LinkCollector.collect_sources().\n\"\"\"\n\nimport cgi\nimport collections\nimport functools\nimport itertools\nimport logging\nimport os\nimport re\nimport urllib.parse\nimport urllib.request\nimport xml.etree.ElementTree\nfrom html.parser impo... | [
{
"content": "\"\"\"\nThe main purpose of this module is to expose LinkCollector.collect_sources().\n\"\"\"\n\nimport cgi\nimport collections\nimport functools\nimport itertools\nimport logging\nimport os\nimport re\nimport urllib.parse\nimport urllib.request\nimport xml.etree.ElementTree\nfrom html.parser impo... | diff --git a/news/10846.bugfix.rst b/news/10846.bugfix.rst
new file mode 100644
index 00000000000..63c35750d6a
--- /dev/null
+++ b/news/10846.bugfix.rst
@@ -0,0 +1 @@
+Properly handle links parsed by html5lib, when using ```--use-deprecated=html5lib``.
diff --git a/src/pip/_internal/index/collector.py b/src/pip/_intern... |
hylang__hy-139 | Quote doesn't return valid lists
```
=> (car (quote [if 1 2 3]))
u'if'
=> (cdr (quote [if 1 2 3]))
[1, 2, 3]
```
=> OK
```
=> (car (quote (if 1 2 3)))
u'_hy_hoisted_fn_1'
=> (car (car (quote (if 1 2 3))))
u'_'
=> (cdr (quote (if 1 2 3)))
[]
```
=> Not ok
| [
{
"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/core/mangles.py b/hy/core/mangles.py
index b86dd60c5..9d7168d77 100644
--- a/hy/core/mangles.py
+++ b/hy/core/mangles.py
@@ -27,6 +27,11 @@
class HoistableMangle(hy.mangle.Mangle):
def should_hoist(self):
+ for frame in self.stack:
+ if (isinstance(frame, HyExpression) and
+ ... |
dask__dask-2003 | dask.array test failures on OS X
Got this on an OS X machine where I ran the test suite out of curiosity (with Python 3.6):
```
____________________________________________________________________________ test_coarsen ____________________________________________________________________________
Traceback (most recent... | [
{
"content": "\"\"\" A set of NumPy functions to apply per chunk \"\"\"\nfrom __future__ import absolute_import, division, print_function\n\nfrom collections import Container, Iterable, Sequence\nfrom functools import wraps\n\nfrom toolz import concat\nimport numpy as np\nfrom . import numpy_compat as npcompat\... | [
{
"content": "\"\"\" A set of NumPy functions to apply per chunk \"\"\"\nfrom __future__ import absolute_import, division, print_function\n\nfrom collections import Container, Iterable, Sequence\nfrom functools import wraps\n\nfrom toolz import concat\nimport numpy as np\nfrom . import numpy_compat as npcompat\... | diff --git a/dask/array/chunk.py b/dask/array/chunk.py
index 54c17d21377..f5e2d738b6c 100644
--- a/dask/array/chunk.py
+++ b/dask/array/chunk.py
@@ -142,7 +142,7 @@ def coarsen(reduction, x, axes, trim_excess=False):
x = x[ind]
# (10, 10) -> (5, 2, 5, 2)
- newshape = tuple(concat([(x.shape[i] / axes[... |
edgedb__edgedb-6237 | Postgres 13 bootstrap failure: type anymultirange does not exist
- EdgeDB Version: 4.0-dev.50+local, built on 2023-07-25T03:08Z from revision 379dbb5f5 (2023-07-25T00:00Z)
- Postgres: Docker `fantix/pgvector:13`
```
2023-07-25T03:08:22.4678164Z INFO 2916 2023-07-25T03:08:22.467 edb.server: instance name: '_localde... | [
{
"content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2016-present MagicStack Inc. and the EdgeDB authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy... | [
{
"content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2016-present MagicStack Inc. and the EdgeDB authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy... | diff --git a/.github/workflows.src/tests-pg-versions.tpl.yml b/.github/workflows.src/tests-pg-versions.tpl.yml
index 17485f14a4d..19a6a040ac9 100644
--- a/.github/workflows.src/tests-pg-versions.tpl.yml
+++ b/.github/workflows.src/tests-pg-versions.tpl.yml
@@ -35,9 +35,6 @@ jobs:
- 'CREATEDB NOCREATEROLE'
... |
docker__docker-py-1722 | attach fails with no _sock attribute
### System details
```
python --version
Python 2.7.13
pip freeze && python --version && docker version
backports.ssl-match-hostname==3.5.0.1
certifi==2017.7.27.1
chardet==3.0.4
click==6.7
docker==2.5.0
docker-pycreds==0.2.1
Flask==0.12.2
idna==2.6
ipaddress==1.0.18
i... | [
{
"content": "import six\nimport warnings\nfrom datetime import datetime\n\nfrom .. import errors\nfrom .. import utils\nfrom ..types import (\n ContainerConfig, EndpointConfig, HostConfig, NetworkingConfig\n)\n\n\nclass ContainerApiMixin(object):\n @utils.check_resource('container')\n def attach(self,... | [
{
"content": "import six\nimport warnings\nfrom datetime import datetime\n\nfrom .. import errors\nfrom .. import utils\nfrom ..types import (\n ContainerConfig, EndpointConfig, HostConfig, NetworkingConfig\n)\n\n\nclass ContainerApiMixin(object):\n @utils.check_resource('container')\n def attach(self,... | diff --git a/docker/api/container.py b/docker/api/container.py
index dde132542..918f8a3a9 100644
--- a/docker/api/container.py
+++ b/docker/api/container.py
@@ -50,7 +50,7 @@ def attach(self, container, stdout=True, stderr=True,
}
u = self._url("/containers/{0}/attach", container)
- response ... |
qutebrowser__qutebrowser-4463 | Make it possible to not send "x-do-not-track" header
When `content.headers.do_not_track` is enabled, Qutebrowser will append two additional headers: `Dnt: 1` and `X-Do-Not-Track: 1`. When I disable that option, these headers are also sent, but with the value of `0`.
This causes problems with Android Messages site http... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2016-2018 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 2016-2018 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/doc/changelog.asciidoc b/doc/changelog.asciidoc
index 6b2bc1d71ea..d5d76b18134 100644
--- a/doc/changelog.asciidoc
+++ b/doc/changelog.asciidoc
@@ -79,6 +79,7 @@ Fixed
- When `scrolling.bar = True` was set in versions before v1.5.0, this now
correctly gets migrated to `always` instead of `when-searchin... |
lutris__lutris-1136 | "Manage Versions` window is too narrow
Recent improvements to Wine version managing are currently a bit pointless due to Manage Versions windows being too narrow and not being able to display the status of the downloading process:
:
super(RunnerInstallDialog, self).__init__(
... |
strawberry-graphql__strawberry-1811 | Decimal scalars aren't serialized as strings when passed as numbers
When using the `Decimal` scalar, if the value passed in is a floating point number, the value isn't serialized as a string, but as if it were still the floating point number which causes precision issues as can be seen in the working example below.
... | [
{
"content": "import datetime\nimport decimal\nimport uuid\nfrom operator import methodcaller\nfrom typing import Callable\n\nimport dateutil.parser\n\nfrom graphql import GraphQLError\n\nfrom strawberry.custom_scalar import scalar\n\n\ndef wrap_parser(parser: Callable, type_: str) -> Callable:\n def inner(v... | [
{
"content": "import datetime\nimport decimal\nimport uuid\nfrom operator import methodcaller\nfrom typing import Callable\n\nimport dateutil.parser\n\nfrom graphql import GraphQLError\n\nfrom strawberry.custom_scalar import scalar\n\n\ndef wrap_parser(parser: Callable, type_: str) -> Callable:\n def inner(v... | diff --git a/RELEASE.md b/RELEASE.md
new file mode 100644
index 0000000000..e5aed7b695
--- /dev/null
+++ b/RELEASE.md
@@ -0,0 +1,3 @@
+Release type: patch
+
+Correctly parse Decimal scalar types to avoid floating point errors
diff --git a/strawberry/schema/types/base_scalars.py b/strawberry/schema/types/base_scalars.py... |
ocf__ocfweb-553 | fix histogram on printing page
The user histogram is broken on ocf.io/stats/printing. The culprit is https://github.com/ocf/ocfweb/blob/ed143b8f1c59e58157780007fe5fd104ee18d944/ocfweb/stats/printing.py#L58
We should use `SEMESTERLY_QUOTA + 5` instead of 105.
| [
{
"content": "import time\nfrom collections import defaultdict\nfrom datetime import date\nfrom datetime import timedelta\nfrom functools import partial\n\nfrom django.http import HttpResponse\nfrom django.shortcuts import render\nfrom matplotlib.figure import Figure\nfrom ocflib.lab import stats\nfrom ocflib.p... | [
{
"content": "import time\nfrom collections import defaultdict\nfrom datetime import date\nfrom datetime import timedelta\nfrom functools import partial\n\nfrom django.http import HttpResponse\nfrom django.shortcuts import render\nfrom matplotlib.figure import Figure\nfrom ocflib.lab import stats\nfrom ocflib.p... | diff --git a/ocfweb/stats/printing.py b/ocfweb/stats/printing.py
index ebb805966..0c00ea240 100644
--- a/ocfweb/stats/printing.py
+++ b/ocfweb/stats/printing.py
@@ -55,7 +55,7 @@ def _semester_histogram():
fig = Figure(figsize=(10, 5))
ax = fig.add_subplot(1, 1, 1)
ax.locator_params(nbins=20)
- ax.his... |
cookiecutter__cookiecutter-1920 | Variable with null default no longer being required
* Cookiecutter version: 2.3.0
* Template project url: internal
* Python version: Python 3.8.12
* Operating System: Debian GNU/Linux 11
### Description:
After updating from 2.1.1 to 2.3.0, setting a field's default value in `cookiecutter.json` to `null` no lon... | [
{
"content": "\"\"\"Functions for prompting the user for project info.\"\"\"\nimport json\nfrom collections import OrderedDict\n\nfrom rich.prompt import Prompt, Confirm, PromptBase, InvalidResponse\nfrom jinja2.exceptions import UndefinedError\n\nfrom cookiecutter.environment import StrictEnvironment\nfrom coo... | [
{
"content": "\"\"\"Functions for prompting the user for project info.\"\"\"\nimport json\nfrom collections import OrderedDict\n\nfrom rich.prompt import Prompt, Confirm, PromptBase, InvalidResponse\nfrom jinja2.exceptions import UndefinedError\n\nfrom cookiecutter.environment import StrictEnvironment\nfrom coo... | diff --git a/cookiecutter/prompt.py b/cookiecutter/prompt.py
index f5c28240a..6cfbb5cc6 100644
--- a/cookiecutter/prompt.py
+++ b/cookiecutter/prompt.py
@@ -20,7 +20,13 @@ def read_user_variable(var_name, default_value, prompts=None, prefix=""):
if prompts and var_name in prompts.keys() and prompts[var_name]
... |
encode__uvicorn-367 | Uvicorn should handle headers as any iterables, not just lists (ASGI spec compliance)
[ASGI Specification](https://asgi.readthedocs.io/en/latest/specs/www.html#response-start) in the `Response Start` says that if I send `http.response.start`, the `headers` part should be of the following form:
(Iterable[[byte string... | [
{
"content": "import asyncio\nimport http\nimport logging\nimport urllib\n\nimport httptools\n\nfrom uvicorn.protocols.utils import get_local_addr, get_remote_addr, is_ssl\n\n\ndef _get_status_line(status_code):\n try:\n phrase = http.HTTPStatus(status_code).phrase.encode()\n except ValueError as e... | [
{
"content": "import asyncio\nimport http\nimport logging\nimport urllib\n\nimport httptools\n\nfrom uvicorn.protocols.utils import get_local_addr, get_remote_addr, is_ssl\n\n\ndef _get_status_line(status_code):\n try:\n phrase = http.HTTPStatus(status_code).phrase.encode()\n except ValueError as e... | diff --git a/uvicorn/protocols/http/httptools_impl.py b/uvicorn/protocols/http/httptools_impl.py
index 434a8d5f8..218cdd108 100644
--- a/uvicorn/protocols/http/httptools_impl.py
+++ b/uvicorn/protocols/http/httptools_impl.py
@@ -424,7 +424,7 @@ async def send(self, message):
self.waiting_for_100_continue =... |
privacyidea__privacyidea-1893 | Usage of smsgateway endpoint does not get logged to audit
Due to a missing `after_request` decorator, the audit log did no get finalized.
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# http://www.privacyidea.org\n# (c) cornelius kölbel, privacyidea.org\n#\n# 2018-12-20 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Cleaning up the before_after method\n# 2015-12-18 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Mov... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# http://www.privacyidea.org\n# (c) cornelius kölbel, privacyidea.org\n#\n# 2018-12-20 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Cleaning up the before_after method\n# 2015-12-18 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Mov... | diff --git a/privacyidea/api/before_after.py b/privacyidea/api/before_after.py
index b058acc950..937c58eb57 100644
--- a/privacyidea/api/before_after.py
+++ b/privacyidea/api/before_after.py
@@ -215,6 +215,7 @@ def before_request():
@smtpserver_blueprint.after_request
@eventhandling_blueprint.after_request
@radiusse... |
holoviz__hvplot-699 | pn.widgets not working in a list
Hi, I'm trying out the hvplot .interactive. I got TypeError: 'RadioButtonGroup' object is not callable for the following code, I think it's because I can't write my xaxis in a list. It works if I change `.groupby(['origin', xaxis])` to `.groupby(xaxis)`, but it'd be nice if `pn.wid... | [
{
"content": "\"\"\"\ninteractive API\n\"\"\"\n\nimport abc\nimport operator\nimport sys\n\nimport holoviews as hv\nimport pandas as pd\nimport panel as pn\nimport param\n\nfrom panel.layout import Column, Row, VSpacer, HSpacer\nfrom panel.widgets.base import Widget\n\nfrom .util import is_tabular, is_xarray, i... | [
{
"content": "\"\"\"\ninteractive API\n\"\"\"\n\nimport abc\nimport operator\nimport sys\n\nimport holoviews as hv\nimport pandas as pd\nimport panel as pn\nimport param\n\nfrom panel.layout import Column, Row, VSpacer, HSpacer\nfrom panel.widgets.base import Widget\n\nfrom .util import is_tabular, is_xarray, i... | diff --git a/.gitignore b/.gitignore
index 022bb7022..5e98a4679 100644
--- a/.gitignore
+++ b/.gitignore
@@ -117,3 +117,6 @@ hvplot/.version
# doit
.doit.db
+
+# vscode
+.vscode
diff --git a/hvplot/interactive.py b/hvplot/interactive.py
index f7935d049..2490a49ab 100644
--- a/hvplot/interactive.py
+++ b/hvplot/inte... |
sktime__sktime-2047 | [BUG] NaiveForecaster fails when sp>1 and fh is combination of in-sample and out-sample
**Describe the bug**
Exception:
```python
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_18... | [
{
"content": "# -*- coding: utf-8 -*-\n# !/usr/bin/env python3 -u\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\"\"\"Implements simple forecasts based on naive assumptions.\"\"\"\n\n__all__ = [\"NaiveForecaster\"]\n__author__ = [\"mloning\", \"Piyush Gade\", \"Flix6x\", \"aiwalter\"... | [
{
"content": "# -*- coding: utf-8 -*-\n# !/usr/bin/env python3 -u\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\"\"\"Implements simple forecasts based on naive assumptions.\"\"\"\n\n__all__ = [\"NaiveForecaster\"]\n__author__ = [\"mloning\", \"Piyush Gade\", \"Flix6x\", \"aiwalter\"... | diff --git a/sktime/forecasting/naive.py b/sktime/forecasting/naive.py
index 843bbb370d5..906ca43ec5c 100644
--- a/sktime/forecasting/naive.py
+++ b/sktime/forecasting/naive.py
@@ -197,6 +197,9 @@ def _reshape_last_window_for_sp(self, last_window):
pad_width = self.sp_ - remainder
else:
... |
yt-project__yt-1434 | Off-axis projection artifacts for SPH data
Off-axis projections for SPH data have artifacts that seem to be due to an F/C ordering issue.
<!--A short 1-2 sentences that succinctly describes the bug-->
**Code for reproduction**
<!--A minimum code snippet required to reproduce the bug, also minimizing the
numbe... | [
{
"content": "\"\"\"\nSubsets of octrees\n\n\n\n\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed wit... | [
{
"content": "\"\"\"\nSubsets of octrees\n\n\n\n\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed wit... | diff --git a/yt/data_objects/octree_subset.py b/yt/data_objects/octree_subset.py
index 342737ecd19..0db967e516f 100644
--- a/yt/data_objects/octree_subset.py
+++ b/yt/data_objects/octree_subset.py
@@ -445,7 +445,7 @@ def __init__(self, ind, block_slice):
def __getitem__(self, key):
bs = self.block_slice... |
aio-libs__aiohttp-7372 | typo in payload.py class AsyncIterablePayload error message
### Describe the bug
https://github.com/aio-libs/aiohttp/blob/bf9d753edc928e7ecbc590c32603ebd3c1fc6282/aiohttp/payload.py#L419 has a typo in place of the intended `collections.abc.AsyncIterable`.
### To Reproduce
N/A
### Expected behavior
N/A
### Logs/tr... | [
{
"content": "import asyncio\nimport enum\nimport io\nimport json\nimport mimetypes\nimport os\nimport warnings\nfrom abc import ABC, abstractmethod\nfrom itertools import chain\nfrom typing import (\n IO,\n TYPE_CHECKING,\n Any,\n ByteString,\n Dict,\n Final,\n Iterable,\n Optional,\n ... | [
{
"content": "import asyncio\nimport enum\nimport io\nimport json\nimport mimetypes\nimport os\nimport warnings\nfrom abc import ABC, abstractmethod\nfrom itertools import chain\nfrom typing import (\n IO,\n TYPE_CHECKING,\n Any,\n ByteString,\n Dict,\n Final,\n Iterable,\n Optional,\n ... | diff --git a/aiohttp/payload.py b/aiohttp/payload.py
index a26a8a1f357..ba856693eed 100644
--- a/aiohttp/payload.py
+++ b/aiohttp/payload.py
@@ -421,7 +421,7 @@ def __init__(self, value: _AsyncIterable, *args: Any, **kwargs: Any) -> None:
if not isinstance(value, AsyncIterable):
raise TypeError(
... |
hydroshare__hydroshare-4303 | Cannot edit geographic feature aggregation metadata
**Description of the bug**
A clear and concise description of what the bug is.
I cannot see or edit the aggregation level metadata for a geographic feature aggregation (shapefile) within a resource. This is a regression - this used to work fine. Here is a screensh... | [
{
"content": "import os\nimport logging\nimport shutil\nimport zipfile\nimport xmltodict\n\nfrom osgeo import ogr, osr\n\nfrom django.core.exceptions import ValidationError\nfrom django.db import models, transaction\nfrom django.utils.html import strip_tags\nfrom django.template import Template, Context\n\nfrom... | [
{
"content": "import os\nimport logging\nimport shutil\nimport zipfile\nimport xmltodict\n\nfrom osgeo import ogr, osr\n\nfrom django.core.exceptions import ValidationError\nfrom django.db import models, transaction\nfrom django.utils.html import strip_tags\nfrom django.template import Template, Context\n\nfrom... | diff --git a/hs_file_types/models/geofeature.py b/hs_file_types/models/geofeature.py
index 16a462bbf5..4d25e2bed6 100755
--- a/hs_file_types/models/geofeature.py
+++ b/hs_file_types/models/geofeature.py
@@ -79,7 +79,7 @@ def _get_field_informations_html(self):
return root_div.render()
- def get_html_for... |
voxel51__fiftyone-1406 | [BUG] Image paths not ending with an extension make app fail to open
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Linux
- **FiftyOne installed from (pip or source)**: pip
- **FiftyOne version (run `fiftyone --version`)**: 0.14.0
- **Python version**: 3.8
### Des... | [
{
"content": "\"\"\"\nFiftyOne server utils.\n\n| Copyright 2017-2021, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\nimport collections\nimport json\nimport mimetypes\nimport os\nimport io\nimport struct\nimport warnings\n\nimport eta.core.video as etav\nimport PIL.Image\n\nfrom fiftyone im... | [
{
"content": "\"\"\"\nFiftyOne server utils.\n\n| Copyright 2017-2021, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\nimport collections\nimport json\nimport mimetypes\nimport os\nimport io\nimport struct\nimport warnings\n\nimport eta.core.video as etav\nimport PIL.Image\n\nfrom fiftyone im... | diff --git a/fiftyone/server/utils.py b/fiftyone/server/utils.py
index 85d45309769..0925035dacf 100644
--- a/fiftyone/server/utils.py
+++ b/fiftyone/server/utils.py
@@ -127,7 +127,7 @@ def read_metadata(filepath, metadata=None):
dict
"""
mimetype, _ = mimetypes.guess_type(filepath)
- if mimetype.s... |
python-poetry__poetry-6824 | Exit code relay fails when run command is a script
<!--
Hi there! Thank you for submitting a bug report!
Before you submit your issue, please review and follow the instructions at
https://python-poetry.org/docs/contributing/#reporting-bugs. Fully fill out the template below; insufficient
informati... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom cleo.helpers import argument\n\nfrom poetry.console.commands.env_command import EnvCommand\n\n\nif TYPE_CHECKING:\n from poetry.core.masonry.utils.module import Module\n\n\nclass RunCommand(EnvCommand):\n name = \... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom cleo.helpers import argument\n\nfrom poetry.console.commands.env_command import EnvCommand\n\n\nif TYPE_CHECKING:\n from poetry.core.masonry.utils.module import Module\n\n\nclass RunCommand(EnvCommand):\n name = \... | diff --git a/src/poetry/console/commands/run.py b/src/poetry/console/commands/run.py
index 6496b45af24..50e1ae118f6 100644
--- a/src/poetry/console/commands/run.py
+++ b/src/poetry/console/commands/run.py
@@ -58,7 +58,7 @@ def run_script(self, script: str | dict[str, str], args: str) -> int:
"import sys; "... |
dbt-labs__dbt-core-8052 | pin click
resolves #8048
### Description
Pin main to `click>=8.1.1,<8.1.4`
### Checklist
- [ ] I have read [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md) and understand what's expected of me
- [ ] I have signed the [CLA](https://docs.getdbt.com/docs/contributor-li... | [
{
"content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif sys.version_info < (3, 7, 2):\n print(\"Error: dbt does not support this version of Python.\")\n print(\"Please upgrade to Python 3.7.2 or higher.\")\n sys.exit(1)\n\n\nfrom setuptools import setup\n\ntry:\n from setuptools import find... | [
{
"content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif sys.version_info < (3, 7, 2):\n print(\"Error: dbt does not support this version of Python.\")\n print(\"Please upgrade to Python 3.7.2 or higher.\")\n sys.exit(1)\n\n\nfrom setuptools import setup\n\ntry:\n from setuptools import find... | diff --git a/.changes/unreleased/Dependencies-20230707-104052.yaml b/.changes/unreleased/Dependencies-20230707-104052.yaml
new file mode 100644
index 00000000000..274cfc453bd
--- /dev/null
+++ b/.changes/unreleased/Dependencies-20230707-104052.yaml
@@ -0,0 +1,6 @@
+kind: Dependencies
+body: Pin click>=7.0,<8.1.4
+time:... |
fail2ban__fail2ban-2651 | python 3.9 threading changes
Copied from https://bugzilla.redhat.com/show_bug.cgi?id=1808347
Bug ID: 1808347
Summary: fail2ban fails to build with Python 3.9: uses removed
threading.Thread.isAlive()
Product: Fedora
Version: rawhide
Sta... | [
{
"content": "# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-\n# vi: set ft=python sts=4 ts=4 sw=4 noet :\n\n# This file is part of Fail2Ban.\n#\n# Fail2Ban 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# ... | [
{
"content": "# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-\n# vi: set ft=python sts=4 ts=4 sw=4 noet :\n\n# This file is part of Fail2Ban.\n#\n# Fail2Ban 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# ... | diff --git a/.travis.yml b/.travis.yml
index 1f218c810e..59a5031366 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -26,6 +26,7 @@ matrix:
- python: 3.6
- python: 3.7
- python: 3.8
+ - python: 3.9-dev
- python: pypy3.5
before_install:
- echo "running under $TRAVIS_PYTHON_VERSION"
diff --git a/Change... |
PennyLaneAI__pennylane-1990 | Casting to complex in Amplitude Embedding
If I do not batch the parameters in `qml.AmplitudeEmbedding`, the parameter is preprocessed to be `np.compex128`:
```
>>> data = np.random.random(8)
>>> op = qml.templates.AmplitudeEmbedding(data, wires=[0, 1, 2], normalize=True)
>>> op.parameters
[tensor([0.45477115+0.j... | [
{
"content": "# Copyright 2018-2021 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unle... | [
{
"content": "# Copyright 2018-2021 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unle... | diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md
index 1ddd22e876f..933e2e36633 100644
--- a/doc/releases/changelog-dev.md
+++ b/doc/releases/changelog-dev.md
@@ -591,6 +591,10 @@
optimization step updates.
[(#1929)](https://github.com/PennyLaneAI/pennylane/pull/1929)
+* `AmplitudeEmbe... |
dmlc__dgl-490 | Data missing for JTNN
## ❓ Questions and Help
Hello,I come across the problem that the website you put your jtnn.zip is missing.Can you offer me a new website?
thanks!
| [
{
"content": "import torch\nfrom torch.utils.data import Dataset\nimport numpy as np\n\nimport dgl\nfrom dgl.data.utils import download, extract_archive, get_download_dir\nfrom .mol_tree_nx import DGLMolTree\nfrom .mol_tree import Vocab\n\nfrom .mpn import mol2dgl_single as mol2dgl_enc\nfrom .jtmpn import mol2d... | [
{
"content": "import torch\nfrom torch.utils.data import Dataset\nimport numpy as np\n\nimport dgl\nfrom dgl.data.utils import download, extract_archive, get_download_dir\nfrom .mol_tree_nx import DGLMolTree\nfrom .mol_tree import Vocab\n\nfrom .mpn import mol2dgl_single as mol2dgl_enc\nfrom .jtmpn import mol2d... | diff --git a/examples/pytorch/jtnn/jtnn/datautils.py b/examples/pytorch/jtnn/jtnn/datautils.py
index 772deb2186d2..be10e73c1012 100644
--- a/examples/pytorch/jtnn/jtnn/datautils.py
+++ b/examples/pytorch/jtnn/jtnn/datautils.py
@@ -12,7 +12,7 @@
from .jtmpn import ATOM_FDIM as ATOM_FDIM_DEC
from .jtmpn import BOND_FDI... |
conda-forge__conda-smithy-577 | linter false positive with selectors
https://github.com/conda-forge/staged-recipes/pull/3992 got a `Selectors are suggested to take a <two spaces>#<one space>[<expression>] form.` error, when the only selector actually is spaced properly.
Looking at it a bit, `selector_lines` thinks that the following two lines have... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nimport io\nimport itertools\nimport os\nimport re\nimport github\n\nimport jinja2\nimport ruamel.yaml\n\nfrom conda_build.metadata import ensure_valid_license_family\n\n\nEXPECTED_SECTION_ORDER = ['package', 'source', 'build', '... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nimport io\nimport itertools\nimport os\nimport re\nimport github\n\nimport jinja2\nimport ruamel.yaml\n\nfrom conda_build.metadata import ensure_valid_license_family\n\n\nEXPECTED_SECTION_ORDER = ['package', 'source', 'build', '... | diff --git a/conda_smithy/lint_recipe.py b/conda_smithy/lint_recipe.py
index 24c1433e1..40e5ffe39 100644
--- a/conda_smithy/lint_recipe.py
+++ b/conda_smithy/lint_recipe.py
@@ -210,7 +210,7 @@ def run_conda_forge_lints(meta, recipe_dir, lints):
def selector_lines(lines):
# Using the same pattern defined in conda-... |
sublimelsp__LSP-1243 | Server is being shutdown on server sending empty stderr line
When server triggers stderr output that is an empty string (or becomes an empty string after `rstrip` then LSP closes the transports and thus the server.
Issue found when analyzing https://github.com/sublimelsp/LSP-angular/issues/1
| [
{
"content": "from .logging import exception_log, debug\nfrom .types import ClientConfig\nfrom .typing import Dict, Any, Optional, IO, Protocol\nfrom abc import ABCMeta, abstractmethod\nfrom contextlib import closing\nfrom queue import Queue\nimport json\nimport os\nimport shutil\nimport socket\nimport sublime\... | [
{
"content": "from .logging import exception_log, debug\nfrom .types import ClientConfig\nfrom .typing import Dict, Any, Optional, IO, Protocol\nfrom abc import ABCMeta, abstractmethod\nfrom contextlib import closing\nfrom queue import Queue\nimport json\nimport os\nimport shutil\nimport socket\nimport sublime\... | diff --git a/plugin/core/transports.py b/plugin/core/transports.py
index 874170af1..aa22b7266 100644
--- a/plugin/core/transports.py
+++ b/plugin/core/transports.py
@@ -137,6 +137,7 @@ def _end(self, exception: Optional[Exception]) -> None:
callback_object = self._callback_object()
if callback_object:... |
holoviz__holoviews-5706 | Reverse order of dash imports
The imports for the dash libraries should be reversed here: https://github.com/holoviz/holoviews/blob/114aff1cf3210dafbfc044262b45be5d74691ecf/holoviews/plotting/plotly/dash.py#L22-L27
If you import the new style first (`from dash import html, dcc`), it won't show the warning message fo... | [
{
"content": "# standard library imports\nimport uuid\nimport copy\nfrom collections import OrderedDict, namedtuple\nimport pickle\nimport base64\n\n# Holoviews imports\nimport holoviews as hv\nfrom dash.exceptions import PreventUpdate\nfrom holoviews.plotting.plotly import PlotlyRenderer, DynamicMap\nfrom holo... | [
{
"content": "# standard library imports\nimport uuid\nimport copy\nfrom collections import OrderedDict, namedtuple\nimport pickle\nimport base64\n\n# Holoviews imports\nimport holoviews as hv\nfrom dash.exceptions import PreventUpdate\nfrom holoviews.plotting.plotly import PlotlyRenderer, DynamicMap\nfrom holo... | diff --git a/holoviews/plotting/plotly/dash.py b/holoviews/plotting/plotly/dash.py
index cd048e846d..154e57820b 100644
--- a/holoviews/plotting/plotly/dash.py
+++ b/holoviews/plotting/plotly/dash.py
@@ -21,10 +21,10 @@
# Dash imports
try:
+ from dash import dcc, html
+except ImportError:
import dash_core_co... |
pymeasure__pymeasure-450 | report code error found within Instrument.py, while Measuring with Keithley 6517B Electrometer
This is the basic code
`pAmeter=Keithley6517B('ASRL6::INSTR')
id=pAmeter.id
print(id)
#pAmeter.reset()
df=pAmeter.measure_current(0.1,1.05e-11)
sleep(0.1)
a=pAmeter.current
print(a)`
Type error see below:
> KE... | [
{
"content": "#\n# This file is part of the PyMeasure package.\n#\n# Copyright (c) 2013-2021 PyMeasure Developers\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restr... | [
{
"content": "#\n# This file is part of the PyMeasure package.\n#\n# Copyright (c) 2013-2021 PyMeasure Developers\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restr... | diff --git a/pymeasure/instruments/keithley/keithley6517b.py b/pymeasure/instruments/keithley/keithley6517b.py
index 8dd931be2f..d0b5e37a63 100644
--- a/pymeasure/instruments/keithley/keithley6517b.py
+++ b/pymeasure/instruments/keithley/keithley6517b.py
@@ -66,7 +66,8 @@ class Keithley6517B(Instrument, KeithleyBuffer)... |
goauthentik__authentik-7454 | Patreon login doesn't work/setup is not intuitive
**Describe the bug**
While trying to set up the Patreon social integration, I realised that the required fields of Consumer Key and Consumer Secret don't seem to apply to the data that Patreon provides with its API - or at least the terminology is confusing. But outsid... | [
{
"content": "\"\"\"Patreon OAuth Views\"\"\"\r\nfrom typing import Any\r\n\r\nfrom authentik.sources.oauth.clients.oauth2 import UserprofileHeaderAuthClient\r\nfrom authentik.sources.oauth.models import OAuthSource\r\nfrom authentik.sources.oauth.types.registry import SourceType, registry\r\nfrom authentik.sou... | [
{
"content": "\"\"\"Patreon OAuth Views\"\"\"\r\nfrom typing import Any\r\n\r\nfrom authentik.sources.oauth.clients.oauth2 import UserprofileHeaderAuthClient\r\nfrom authentik.sources.oauth.models import OAuthSource\r\nfrom authentik.sources.oauth.types.registry import SourceType, registry\r\nfrom authentik.sou... | diff --git a/authentik/sources/oauth/types/patreon.py b/authentik/sources/oauth/types/patreon.py
index 2b54533ffe2f..d02c3d33da54 100644
--- a/authentik/sources/oauth/types/patreon.py
+++ b/authentik/sources/oauth/types/patreon.py
@@ -12,8 +12,9 @@ class PatreonOAuthRedirect(OAuthRedirect):
"""Patreon OAuth2 Redir... |
scrapy__scrapy-4033 | may be 'accessible'?
in the function [request_fingerprint](https://github.com/scrapy/scrapy/blob/master/scrapy/utils/request.py) ,‘accesible’ may be ‘accessible’ in comments. OCD XD..
| [
{
"content": "\"\"\"\nThis module provides some useful functions for working with\nscrapy.http.Request objects\n\"\"\"\n\nfrom __future__ import print_function\nimport hashlib\nimport weakref\nfrom six.moves.urllib.parse import urlunparse\n\nfrom w3lib.http import basic_auth_header\nfrom scrapy.utils.python imp... | [
{
"content": "\"\"\"\nThis module provides some useful functions for working with\nscrapy.http.Request objects\n\"\"\"\n\nfrom __future__ import print_function\nimport hashlib\nimport weakref\nfrom six.moves.urllib.parse import urlunparse\n\nfrom w3lib.http import basic_auth_header\nfrom scrapy.utils.python imp... | diff --git a/scrapy/utils/request.py b/scrapy/utils/request.py
index 50bc3cb1e4f..9c143b83a39 100644
--- a/scrapy/utils/request.py
+++ b/scrapy/utils/request.py
@@ -30,7 +30,7 @@ def request_fingerprint(request, include_headers=None):
and are equivalent (ie. they should return the same response).
Another ex... |
mlcommons__GaNDLF-173 | Bug during saving probabilities
**Describe the bug**
Small bug is occurring during saving probabilities in classification tasks. This is due to file existence check. It should check if the file exists instead of checking if the directory exists.
| [
{
"content": "from GANDLF.inference_loop import inference_loop\nimport os\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\n\n\ndef InferenceManager(dataframe, outputDir, parameters, device):\n \"\"\"\n This function takes in a dataframe, with some other parameters and performs the infer... | [
{
"content": "from GANDLF.inference_loop import inference_loop\nimport os\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\n\n\ndef InferenceManager(dataframe, outputDir, parameters, device):\n \"\"\"\n This function takes in a dataframe, with some other parameters and performs the infer... | diff --git a/GANDLF/inference_manager.py b/GANDLF/inference_manager.py
index 4a586a9da..e0d747e41 100644
--- a/GANDLF/inference_manager.py
+++ b/GANDLF/inference_manager.py
@@ -43,7 +43,7 @@ def InferenceManager(dataframe, outputDir, parameters, device):
)
logits_dir = os.path.join(fold_dir, "logits... |
mathesar-foundation__mathesar-3127 | Implement frontend flow: User sharing an entity
I've not added a description, since I'll be implementing this.
Refer [Product spec](https://wiki.mathesar.org/en/product/specs/publicly-shareable-links) for detailed info.
| [
{
"content": "from rest_access_policy import AccessPolicy\n\nfrom mathesar.api.utils import get_query_or_404\nfrom mathesar.api.permission_utils import QueryAccessInspector\n\n\nclass SharedTableAccessPolicy(AccessPolicy):\n statements = [\n {\n 'action': ['list', 'retrieve'],\n ... | [
{
"content": "from rest_access_policy import AccessPolicy\n\nfrom mathesar.api.utils import get_query_or_404\nfrom mathesar.api.permission_utils import QueryAccessInspector\n\n\nclass SharedTableAccessPolicy(AccessPolicy):\n statements = [\n {\n 'action': ['list', 'retrieve'],\n ... | diff --git a/mathesar/api/ui/permissions/shares.py b/mathesar/api/ui/permissions/shares.py
index 4ac885f2f3..6483f261b6 100644
--- a/mathesar/api/ui/permissions/shares.py
+++ b/mathesar/api/ui/permissions/shares.py
@@ -16,7 +16,7 @@ class SharedTableAccessPolicy(AccessPolicy):
'action': ['create', 'destroy... |
cocotb__cocotb-557 | Memory leak
For simulations with large number of packets streaming in, the memory usage of the simulator seems to continuously grow.
This can be reproduced even in the endian_swapper testbench by increasing the packets to a very large number (300K).
I have a simulation which reads in a pcap which has 5Million message... | [
{
"content": "#!/usr/bin/env python\n\n''' Copyright (c) 2013 Potential Ventures Ltd\nCopyright (c) 2013 SolarFlare Communications Inc\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n * R... | [
{
"content": "#!/usr/bin/env python\n\n''' Copyright (c) 2013 Potential Ventures Ltd\nCopyright (c) 2013 SolarFlare Communications Inc\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n * R... | diff --git a/cocotb/scheduler.py b/cocotb/scheduler.py
index aaefef1623..12e186caff 100644
--- a/cocotb/scheduler.py
+++ b/cocotb/scheduler.py
@@ -366,6 +366,7 @@ def unschedule(self, coro):
self._trigger2coros[trigger].remove(coro)
if not self._trigger2coros[trigger]:
tri... |
litestar-org__litestar-1723 | Bug: Enabling gzip only sends large streaming responses
### Description
Enabling gzip compression causes small streaming responses to be completely ignored and never sent to the client browser.
I have verified that the request headers to specify at the very least:
`Accept-Encoding: gzip`
As can be seen in the logs.... | [
{
"content": "from __future__ import annotations\n\nfrom gzip import GzipFile\nfrom io import BytesIO\nfrom typing import TYPE_CHECKING, Any, Literal, Optional\n\nfrom litestar.constants import SCOPE_STATE_RESPONSE_COMPRESSED\nfrom litestar.datastructures import Headers, MutableScopeHeaders\nfrom litestar.enums... | [
{
"content": "from __future__ import annotations\n\nfrom gzip import GzipFile\nfrom io import BytesIO\nfrom typing import TYPE_CHECKING, Any, Literal, Optional\n\nfrom litestar.constants import SCOPE_STATE_RESPONSE_COMPRESSED\nfrom litestar.datastructures import Headers, MutableScopeHeaders\nfrom litestar.enums... | diff --git a/litestar/contrib/repository/testing/generic_mock_repository.py b/litestar/contrib/repository/testing/generic_mock_repository.py
index f0b7392beb..eb2c7778be 100644
--- a/litestar/contrib/repository/testing/generic_mock_repository.py
+++ b/litestar/contrib/repository/testing/generic_mock_repository.py
@@ -7... |
celery__celery-4292 | Django celery fixup doesn't respect Django settings for PostgreSQL connections
When using the Django-Celery fixup to run background tasks for a Django web service, the tasks in the background do not respect the settings in Django for PostgreSQL (possibly other) connections. Every task will always create a new connecti... | [
{
"content": "\"\"\"Django-specific customization.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport os\nimport sys\nimport warnings\n\nfrom kombu.utils.imports import symbol_by_name\nfrom kombu.utils.objects import cached_property\n\nfrom datetime import datetime\nfrom importlib import ... | [
{
"content": "\"\"\"Django-specific customization.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport os\nimport sys\nimport warnings\n\nfrom kombu.utils.imports import symbol_by_name\nfrom kombu.utils.objects import cached_property\n\nfrom datetime import datetime\nfrom importlib import ... | diff --git a/celery/fixups/django.py b/celery/fixups/django.py
index 573ce47b858..008ac8473f3 100644
--- a/celery/fixups/django.py
+++ b/celery/fixups/django.py
@@ -183,7 +183,7 @@ def close_database(self, **kwargs):
def _close_database(self):
for conn in self._db.connections.all():
try:
- ... |
microsoft__ptvsd-1893 | Concurrent imports cause error in force_pydevd
Happened in Flask multiproc test on macOS, but I think it can potentially occur in any scenario where a module is imported concurrently from another thread:
```
I+05.947: Debuggee-86 stderr:
b'Error on request:\n'
b'Traceback (most recent call last... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See LICENSE in the project root\n# for license information.\n\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport contextlib\nfrom importlib import import_module... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See LICENSE in the project root\n# for license information.\n\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport contextlib\nfrom importlib import import_module... | diff --git a/src/ptvsd/_vendored/__init__.py b/src/ptvsd/_vendored/__init__.py
index ee595f94e..cfee74bcd 100644
--- a/src/ptvsd/_vendored/__init__.py
+++ b/src/ptvsd/_vendored/__init__.py
@@ -98,7 +98,7 @@ def check_modules(project, match, root=None):
root = project_root(project)
extensions = []
unv... |
Textualize__textual-3274 | Removing an option from an `OptionList` when the mouse is hovering over the last item causes a crash
Given this code:
```python
from textual import on
from textual.app import App, ComposeResult
from textual.widgets import OptionList
class OptionListRemoveOnDeleteApp(App[None]):
def compose(self) -> Comp... | [
{
"content": "\"\"\"Provides the core of a classic vertical bounce-bar option list.\n\nUseful as a lightweight list view (not to be confused with ListView, which\nis much richer but uses widgets for the items) and as the base for various\nforms of bounce-bar menu.\n\"\"\"\n\nfrom __future__ import annotations\n... | [
{
"content": "\"\"\"Provides the core of a classic vertical bounce-bar option list.\n\nUseful as a lightweight list view (not to be confused with ListView, which\nis much richer but uses widgets for the items) and as the base for various\nforms of bounce-bar menu.\n\"\"\"\n\nfrom __future__ import annotations\n... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index aeaecf2074..e824df982c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versionin... |
paperless-ngx__paperless-ngx-1934 | [BUG] Error while processing mail - CELERY
### Description
I have problem with Dev branch with Celery. When Paperless consume email with attacment, error is occure :
Error while processing mail 76999: consume_file() got an **unexpected keyword argument 'task_name'**
### Steps to reproduce
1. Create mail rule
2.... | [
{
"content": "import os\nimport re\nimport tempfile\nfrom datetime import date\nfrom datetime import timedelta\nfrom fnmatch import fnmatch\nfrom typing import Dict\n\nimport magic\nimport pathvalidate\nfrom django.conf import settings\nfrom django.db import DatabaseError\nfrom documents.loggers import LoggingM... | [
{
"content": "import os\nimport re\nimport tempfile\nfrom datetime import date\nfrom datetime import timedelta\nfrom fnmatch import fnmatch\nfrom typing import Dict\n\nimport magic\nimport pathvalidate\nfrom django.conf import settings\nfrom django.db import DatabaseError\nfrom documents.loggers import LoggingM... | diff --git a/src/paperless_mail/mail.py b/src/paperless_mail/mail.py
index 67631ac5e54..145aebec4c8 100644
--- a/src/paperless_mail/mail.py
+++ b/src/paperless_mail/mail.py
@@ -425,7 +425,6 @@ def handle_message(self, message, rule) -> int:
else None,
override_document_type_id=... |
internetarchive__openlibrary-9112 | Edition Editing: language autocomplete is slow
### Problem
According to [this](https://internetarchive.slack.com/archives/C0119PRDV46/p1713446825373169?thread_ts=1713436300.354359&cid=C0119PRDV46) thread, it is very slow:
<img width="455" alt="Screenshot 2024-04-22 at 5 32 04 AM" src="https://github.com/interneta... | [
{
"content": "import itertools\nimport web\nimport json\n\n\nfrom infogami.utils import delegate\nfrom infogami.utils.view import safeint\nfrom openlibrary.core.models import Thing\nfrom openlibrary.plugins.upstream import utils\nfrom openlibrary.plugins.worksearch.search import get_solr\nfrom openlibrary.utils... | [
{
"content": "import itertools\nimport web\nimport json\n\n\nfrom infogami.utils import delegate\nfrom infogami.utils.view import safeint\nfrom openlibrary.core.models import Thing\nfrom openlibrary.plugins.upstream import utils\nfrom openlibrary.plugins.worksearch.search import get_solr\nfrom openlibrary.utils... | diff --git a/openlibrary/plugins/openlibrary/js/autocomplete.js b/openlibrary/plugins/openlibrary/js/autocomplete.js
index 75e1512eccc..63ec9797297 100644
--- a/openlibrary/plugins/openlibrary/js/autocomplete.js
+++ b/openlibrary/plugins/openlibrary/js/autocomplete.js
@@ -124,8 +124,7 @@ export default function($) {
... |
networkx__networkx-2455 | nx.power does not preserve zero-degree nodes
```shell
>>> G = nx.Graph()
>>> G.add_nodes_from([0, 1, 2])
>>> G.add_edge(0, 1)
>>> G2 = nx.power(G, 2)
>>> G.nodes()
[0, 1, 2]
>>> G2.nodes()
[0, 1]
```
Here `nx.power` fails to preserve the zero-degree node 2 in `G2`. This happens for all graphs in all such sc... | [
{
"content": "# Copyright (C) 2011 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\n#\n# Authors:\n# Aric Hagberg <hagberg@lanl.gov>\n# Pieter Swart <swart@lanl.gov>\n# Dan Schult <ds... | [
{
"content": "# Copyright (C) 2011 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\n#\n# Authors:\n# Aric Hagberg <hagberg@lanl.gov>\n# Pieter Swart <swart@lanl.gov>\n# Dan Schult <ds... | diff --git a/networkx/algorithms/operators/product.py b/networkx/algorithms/operators/product.py
index 67b718296e1..b1de0760c8a 100644
--- a/networkx/algorithms/operators/product.py
+++ b/networkx/algorithms/operators/product.py
@@ -413,6 +413,7 @@ def power(G, k):
if k <= 0:
raise ValueError('k must be a... |
dbt-labs__dbt-core-8054 | pin click
resolves #8048
### Description
Pin main to `click>=8.1.1,<8.1.4`
### Checklist
- [ ] I have read [the contributing guide](https://github.com/dbt-labs/dbt-core/blob/main/CONTRIBUTING.md) and understand what's expected of me
- [ ] I have signed the [CLA](https://docs.getdbt.com/docs/contributor-li... | [
{
"content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif sys.version_info < (3, 7, 2):\n print(\"Error: dbt does not support this version of Python.\")\n print(\"Please upgrade to Python 3.7.2 or higher.\")\n sys.exit(1)\n\n\nfrom setuptools import setup\n\ntry:\n from setuptools import find... | [
{
"content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif sys.version_info < (3, 7, 2):\n print(\"Error: dbt does not support this version of Python.\")\n print(\"Please upgrade to Python 3.7.2 or higher.\")\n sys.exit(1)\n\n\nfrom setuptools import setup\n\ntry:\n from setuptools import find... | diff --git a/.changes/unreleased/Dependencies-20230707-104052.yaml b/.changes/unreleased/Dependencies-20230707-104052.yaml
new file mode 100644
index 00000000000..274cfc453bd
--- /dev/null
+++ b/.changes/unreleased/Dependencies-20230707-104052.yaml
@@ -0,0 +1,6 @@
+kind: Dependencies
+body: Pin click>=7.0,<8.1.4
+time:... |
Pycord-Development__pycord-2146 | applied_tags does not update when tags are changed on forum posts
### Summary
applied_tags does not update when tags are changed on forum posts
### Reproduction Steps
Start bot
fetch before.applied_tags
change tags on forum post
fetch after.applied_tags
before.applied_tags == after.applied_tags
### Minimal Repr... | [
{
"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without r... | [
{
"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without r... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7e42278642..aa6cbc5342 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -142,6 +142,8 @@ These changes are available on the `master` branch, but have not yet been releas
([#2091](https://github.com/Pycord-Development/pycord/pull/2091))
- Fixed `AttributeError` when acce... |
svthalia__concrexit-2769 | Events can be unpublished, change price, and republished, while registrations remain
### Describe the bug
Events can be unpublished, change price, and republished, while registrations remain.
This is a problem because we do not allow changing the price after people signed up
### How to reproduce
1. Unpublish
2.... | [
{
"content": "import uuid\n\nfrom django.conf import settings\nfrom django.core import validators\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.db import models, router\nfrom django.db.models import Count, Q\nfrom django.db.models.deletion import Collector\nfrom django.url... | [
{
"content": "import uuid\n\nfrom django.conf import settings\nfrom django.core import validators\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.db import models, router\nfrom django.db.models import Count, Q\nfrom django.db.models.deletion import Collector\nfrom django.url... | diff --git a/website/events/models/event.py b/website/events/models/event.py
index 39e36cdbf..ec22f23ca 100644
--- a/website/events/models/event.py
+++ b/website/events/models/event.py
@@ -335,7 +335,7 @@ def clean_changes(self, changed_data):
can be retrieved from self.changed_data
"""
error... |
cookiecutter__cookiecutter-1874 | getting a parameters original choices
* Cookiecutter version: 2.1.1
* Template project url: github.com/kjaymiller/cookiecutter_relecloud
* Python version: Python 3.11.0
* Operating System: MacOS Ventura - 13.4.1 (22F82)
### Description:
If my cookiecutter.json has:
```json
{
"cc_options": [1, 2, 3, 4]... | [
{
"content": "\"\"\"\nMain entry point for the `cookiecutter` command.\n\nThe code in this module is also a good example of how to use Cookiecutter as a\nlibrary rather than a script.\n\"\"\"\nimport logging\nimport os\nimport re\nimport sys\nfrom copy import copy\n\nfrom cookiecutter.config import get_user_con... | [
{
"content": "\"\"\"\nMain entry point for the `cookiecutter` command.\n\nThe code in this module is also a good example of how to use Cookiecutter as a\nlibrary rather than a script.\n\"\"\"\nimport logging\nimport os\nimport re\nimport sys\nfrom copy import copy\n\nfrom cookiecutter.config import get_user_con... | diff --git a/cookiecutter/main.py b/cookiecutter/main.py
index 5413e8031..dd6f9b23b 100644
--- a/cookiecutter/main.py
+++ b/cookiecutter/main.py
@@ -102,6 +102,9 @@ def cookiecutter(
extra_context=extra_context,
)
+ # preserve the original cookiecutter options
+ context['_cookiecut... |
ansible__ansible-11740 | Encrypts the vault file after edition only if the contents changed
Whenever I edit a vault-protected file, it is re-encrypted even if I discard the changes or don't do any change, so git thinks that the file was actually modified. It forces me to git-checkout it to the previous version.
To avoid this issue I wrote thi... | [
{
"content": "# (c) 2014, James Tanner <tanner.jc@gmail.com>\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n... | [
{
"content": "# (c) 2014, James Tanner <tanner.jc@gmail.com>\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n... | diff --git a/lib/ansible/parsing/vault/__init__.py b/lib/ansible/parsing/vault/__init__.py
index 2aab6fdfe4e8b2..f3cee27ea47c5b 100644
--- a/lib/ansible/parsing/vault/__init__.py
+++ b/lib/ansible/parsing/vault/__init__.py
@@ -227,6 +227,10 @@ def _edit_file_helper(self, existing_data=None, cipher=None):
call(... |
WordPress__openverse-api-787 | Invalid UUID breaks related images query
## Description
<!-- Concisely describe the bug. Compare your experience with what you expected to happen. -->
<!-- For example: "I clicked the 'submit' button and instead of seeing a thank you message, I saw a blank page." -->
It appears that if an invalid UUID-like string is su... | [
{
"content": "import json\nimport logging as log\nfrom http.client import RemoteDisconnected\nfrom urllib.error import HTTPError\nfrom urllib.parse import urlencode\nfrom urllib.request import Request, urlopen\n\nfrom django.conf import settings\nfrom django.http.response import HttpResponse\nfrom rest_framewor... | [
{
"content": "import json\nimport logging as log\nfrom http.client import RemoteDisconnected\nfrom urllib.error import HTTPError\nfrom urllib.parse import urlencode\nfrom urllib.request import Request, urlopen\n\nfrom django.conf import settings\nfrom django.http.response import HttpResponse\nfrom rest_framewor... | diff --git a/api/catalog/api/views/media_views.py b/api/catalog/api/views/media_views.py
index 3b7012e73..28a761247 100644
--- a/api/catalog/api/views/media_views.py
+++ b/api/catalog/api/views/media_views.py
@@ -25,7 +25,9 @@ class MediaViewSet(ReadOnlyModelViewSet):
lookup_field = "identifier"
# TODO: htt... |
pypa__pip-1311 | "pip install ." fails on Python 3.3 (with symlinks in local directory)
This seems to happen only if there are symlinks in the local directory. (In my case, the symlinks are from temporary build files.)
``` bash
$ pip install .
Unpacking /Users/myint/projects/docformatter
Cleaning up...
Exception:
Traceback (most rec... | [
{
"content": "import cgi\nimport email.utils\nimport hashlib\nimport getpass\nimport mimetypes\nimport os\nimport platform\nimport re\nimport shutil\nimport sys\nimport tempfile\n\nimport pip\n\nfrom pip.backwardcompat import urllib, urlparse, raw_input\nfrom pip.exceptions import InstallationError, HashMismatc... | [
{
"content": "import cgi\nimport email.utils\nimport hashlib\nimport getpass\nimport mimetypes\nimport os\nimport platform\nimport re\nimport shutil\nimport sys\nimport tempfile\n\nimport pip\n\nfrom pip.backwardcompat import urllib, urlparse, raw_input\nfrom pip.exceptions import InstallationError, HashMismatc... | diff --git a/pip/download.py b/pip/download.py
index 73f7baa0c02..4f50795bf9e 100644
--- a/pip/download.py
+++ b/pip/download.py
@@ -359,7 +359,7 @@ def unpack_file_url(link, location):
# delete the location since shutil will create it again :(
if os.path.isdir(location):
rmtree(location)... |
plotly__plotly.py-2015 | Error when using two image scrappers together
### Introduction to the problem
I am trying to move the current Jupyter Notebook examples of the [poliastro project](https://github.com/poliastro/poliastro) to an [Sphinx-Gallery](https://github.com/sphinx-gallery/sphinx-gallery) set. Since we are making use of **plotly f... | [
{
"content": "# This module defines an image scraper for sphinx-gallery\n# https://sphinx-gallery.github.io/\n# which can be used by projects using plotly in their documentation.\nimport inspect, os\n\nimport plotly\nfrom glob import glob\nimport shutil\n\nplotly.io.renderers.default = \"sphinx_gallery\"\n\n\nd... | [
{
"content": "# This module defines an image scraper for sphinx-gallery\n# https://sphinx-gallery.github.io/\n# which can be used by projects using plotly in their documentation.\nimport inspect, os\n\nimport plotly\nfrom glob import glob\nimport shutil\n\nplotly.io.renderers.default = \"sphinx_gallery\"\n\n\nd... | diff --git a/packages/python/plotly/plotly/io/_sg_scraper.py b/packages/python/plotly/plotly/io/_sg_scraper.py
index 1d9c649b30b..3f514a57ca8 100644
--- a/packages/python/plotly/plotly/io/_sg_scraper.py
+++ b/packages/python/plotly/plotly/io/_sg_scraper.py
@@ -88,6 +88,8 @@ def figure_rst(figure_list, sources_dir):
... |
buildbot__buildbot-3412 | 0.9.8: MailNotifier info gets "overwritten" if builders argument is the same
I have a function `mk_MailNotifiers` like this:
```
red_builders = ["foobuilder"]
green_builders = ["foobuilder"]
mns = []
red_modes = ["failing", "warnings", "exception", "cancelled"]
if red_builders:
mns.... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | diff --git a/master/buildbot/newsfragments/mailnotifier_modes.bugfix b/master/buildbot/newsfragments/mailnotifier_modes.bugfix
new file mode 100644
index 000000000000..f41e76f4a96b
--- /dev/null
+++ b/master/buildbot/newsfragments/mailnotifier_modes.bugfix
@@ -0,0 +1 @@
+Fix issue when several mail notifiers are used w... |
enthought__chaco-883 | NameError: name 'gc' is not defined
**Problem Description**
NameError: name 'gc' is not defined in chaco/chaco/plots/polar_line_renderer.py
**Reproduction Steps:**
python chaco/examples/demo/simple_polar.py
[Steps to reproduce issue here.]
```python
# Code to reproduce issue here
```
**Expected behavior:**
[MacO... | [
{
"content": "# (C) Copyright 2005-2021 Enthought, Inc., Austin, TX\n# All rights reserved.\n#\n# This software is provided without warranty under the terms of the BSD\n# license included in LICENSE.txt and may be redistributed only under\n# the conditions described in the aforementioned license. The license\n#... | [
{
"content": "# (C) Copyright 2005-2021 Enthought, Inc., Austin, TX\n# All rights reserved.\n#\n# This software is provided without warranty under the terms of the BSD\n# license included in LICENSE.txt and may be redistributed only under\n# the conditions described in the aforementioned license. The license\n#... | diff --git a/chaco/plots/polar_line_renderer.py b/chaco/plots/polar_line_renderer.py
index c9ca108e7..e488c4fba 100644
--- a/chaco/plots/polar_line_renderer.py
+++ b/chaco/plots/polar_line_renderer.py
@@ -130,7 +130,7 @@ def map_data(self, screen_pt):
def _downsample(self):
return self.map_screen(self._ca... |
pytorch__vision-4939 | [transforms] Troubles with padding for PIL image in mode P
### 🐛 Describe the bug
Hello there :wave:
I was running some training for semantic segmentation using the implementation of `RandomCrop` provided in the [references](https://github.com/pytorch/vision/blob/main/references/segmentation/transforms.py#L9) f... | [
{
"content": "import distutils.command.clean\nimport distutils.spawn\nimport glob\nimport os\nimport shutil\nimport subprocess\nimport sys\n\nimport torch\nfrom pkg_resources import parse_version, get_distribution, DistributionNotFound\nfrom setuptools import setup, find_packages\nfrom torch.utils.cpp_extension... | [
{
"content": "import distutils.command.clean\nimport distutils.spawn\nimport glob\nimport os\nimport shutil\nimport subprocess\nimport sys\n\nimport torch\nfrom pkg_resources import parse_version, get_distribution, DistributionNotFound\nfrom setuptools import setup, find_packages\nfrom torch.utils.cpp_extension... | diff --git a/setup.py b/setup.py
index 6f56fee6be5..0b151988d1b 100644
--- a/setup.py
+++ b/setup.py
@@ -62,8 +62,8 @@ def write_version_file():
pytorch_dep,
]
-# Excluding 8.3.0 because of https://github.com/pytorch/vision/issues/4146
-pillow_ver = " >= 5.3.0, !=8.3.0"
+# Excluding 8.3.* because of https://git... |
zulip__zulip-27536 | Document ability to drag-and-drop anywhere to upload a file
We should document the functionality introduced in #14579 / https://github.com/zulip/zulip/pull/26041.
I would probably replace the "Via Markdown" tab with "Via drag-and-drop", and modify the instructions to explain that you can drag anywhere, whether or no... | [
{
"content": "import re\nfrom typing import Any, Dict, List, Mapping, Optional\n\nimport markdown\nfrom markdown.extensions import Extension\nfrom markdown.preprocessors import Preprocessor\nfrom typing_extensions import override\n\nfrom zerver.lib.markdown.priorities import PREPROCESSOR_PRIORITES\n\nSTART_TABB... | [
{
"content": "import re\nfrom typing import Any, Dict, List, Mapping, Optional\n\nimport markdown\nfrom markdown.extensions import Extension\nfrom markdown.preprocessors import Preprocessor\nfrom typing_extensions import override\n\nfrom zerver.lib.markdown.priorities import PREPROCESSOR_PRIORITES\n\nSTART_TABB... | diff --git a/help/share-and-upload-files.md b/help/share-and-upload-files.md
index 5c91e0cb5b9a8..90cedd5cff2b4 100644
--- a/help/share-and-upload-files.md
+++ b/help/share-and-upload-files.md
@@ -12,12 +12,27 @@ and you can click on a thumbnail to [view the full image](/help/view-and-browse-
{start_tabs}
-{tab|vi... |
Textualize__rich-2201 | [BUG] SVG gets surrounded in a black box
**Describe the bug**
Making an SVG, ideally a light-mode SVG, creates a black box around the terminal with square edges. Ideally, I think, the corners could be rounded to match the terminal application, otherwise, the box should be removed. Or both + a drop shadow, which woul... | [
{
"content": "CONSOLE_HTML_FORMAT = \"\"\"\\\n<!DOCTYPE html>\n<head>\n<meta charset=\"UTF-8\">\n<style>\n{stylesheet}\nbody {{\n color: {foreground};\n background-color: {background};\n}}\n</style>\n</head>\n<html>\n<body>\n <code>\n <pre style=\"font-family:Menlo,'DejaVu Sans Mono',consolas,'C... | [
{
"content": "CONSOLE_HTML_FORMAT = \"\"\"\\\n<!DOCTYPE html>\n<head>\n<meta charset=\"UTF-8\">\n<style>\n{stylesheet}\nbody {{\n color: {foreground};\n background-color: {background};\n}}\n</style>\n</head>\n<html>\n<body>\n <code>\n <pre style=\"font-family:Menlo,'DejaVu Sans Mono',consolas,'C... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e66cb4e19..86b56e44f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fall back to `sys.__stderr__` on POSIX systems when trying to get the terminal size (fix issues when Ri... |
urllib3__urllib3-841 | PyOpenSSL: Fails to import after installation with the provided instructions
The [Security documentation page](https://urllib3.readthedocs.org/en/latest/security.html#openssl-pyopenssl) indicates that to use PyOpenSSL that you must first install:
- pip3 install pyopenssl ndg-httpsclient pyasn1
And then in a Python int... | [
{
"content": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nimport os\nimport re\nimport codecs\n\nbase_path = os.path.dirname(__file__)\n\n# Get the version (borrowed from SQLAlchemy)\nfp = open(os.path.join(base_path, 'urllib3', '__init__.py'))\nVERSION = re.compile(r\".*__version__ = '(.*?)'\",\n ... | [
{
"content": "#!/usr/bin/env python\n\nfrom setuptools import setup\n\nimport os\nimport re\nimport codecs\n\nbase_path = os.path.dirname(__file__)\n\n# Get the version (borrowed from SQLAlchemy)\nfp = open(os.path.join(base_path, 'urllib3', '__init__.py'))\nVERSION = re.compile(r\".*__version__ = '(.*?)'\",\n ... | diff --git a/setup.py b/setup.py
index 2f7c3b76b8..994bd890ed 100644
--- a/setup.py
+++ b/setup.py
@@ -40,7 +40,8 @@
license='MIT',
packages=['urllib3',
'urllib3.packages', 'urllib3.packages.ssl_match_hostname',
- 'urllib3.contrib', 'urllib3.util',
+ 'urllib3... |
mne-tools__mne-python-6083 | pip install mne should install numpy and scipy
Currently, the `mne` PyPI package doesn't have any dependencies, but I think it should really treat `numpy` and `scipy` as hard dependencies (and automatically install them if they are not present).
| [
{
"content": "#!/usr/bin/env python\n\n# Copyright (C) 2011-2017 Alexandre Gramfort\n# <alexandre.gramfort@telecom-paristech.fr>\n\nimport os\nimport os.path as op\n\nfrom setuptools import setup\n\n# get the version (don't import mne here, so dependencies are not needed)\nversion = None\nwith open(op.join('mne... | [
{
"content": "#!/usr/bin/env python\n\n# Copyright (C) 2011-2017 Alexandre Gramfort\n# <alexandre.gramfort@telecom-paristech.fr>\n\nimport os\nimport os.path as op\n\nfrom setuptools import setup\n\n# get the version (don't import mne here, so dependencies are not needed)\nversion = None\nwith open(op.join('mne... | diff --git a/setup.py b/setup.py
index 2675c7f3fab..7ce85418944 100755
--- a/setup.py
+++ b/setup.py
@@ -69,6 +69,7 @@ def package_tree(pkgroot):
'Programming Language :: Python :: 3',
],
platforms='any',
+ install_requires=['numpy>=1.11.3', 'scipy>=0.... |
pytorch__pytorch-4011 | Sequential and ModuleList call add_module() with integer keys
Hello,
In the case where these classes sequentially append the received elements with `add_module(str(idx), value)`, the modules become inaccessible since a variable name starting with a number is forbidden in Python.
I attached a patch that names the ... | [
{
"content": "from collections import OrderedDict, Iterable\nimport functools\n\nimport torch\nfrom ..backends.thnn import backend as thnn_backend\nfrom ..parameter import Parameter\nfrom torch.autograd import Variable\nimport torch.utils.hooks as hooks\n\n\ndef _addindent(s_, numSpaces):\n s = s_.split('\\n... | [
{
"content": "from collections import OrderedDict\nimport functools\n\nimport torch\nfrom ..backends.thnn import backend as thnn_backend\nfrom ..parameter import Parameter\nfrom torch.autograd import Variable\nimport torch.utils.hooks as hooks\n\n\ndef _addindent(s_, numSpaces):\n s = s_.split('\\n')\n # ... | diff --git a/torch/nn/modules/module.py b/torch/nn/modules/module.py
index e42c69b76d1caa..48e379267511af 100644
--- a/torch/nn/modules/module.py
+++ b/torch/nn/modules/module.py
@@ -677,4 +677,8 @@ def __dir__(self):
modules = list(self._modules.keys())
buffers = list(self._buffers.keys())
k... |
mozilla__bugbug-130 | Add bug alias as a feature
Not the alias by itself, but something like True if `CVE` is in bug['alias'], False otherwise.
| [
{
"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 re\nfrom datetime import datetime\nfrom datetime import timezo... | [
{
"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 re\nfrom datetime import datetime\nfrom datetime import timezo... | diff --git a/bugbug/bug_features.py b/bugbug/bug_features.py
index b943ad5e91..7758cf5bd3 100644
--- a/bugbug/bug_features.py
+++ b/bugbug/bug_features.py
@@ -183,6 +183,11 @@ def __call__(self, bug):
return bug['priority']
+class bug_has_cve_in_alias(object):
+ def __call__(self, bug):
+ return ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.