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 ⌀ |
|---|---|---|---|---|
pytorch__pytorch-5085 | `F.mse_loss` has strange broadcasting semantics
```
import torch
import torch.nn.functional as F
from torch.autograd import Variable
output = Variable(torch.Tensor([1, 2]), requires_grad=True)
target = Variable(torch.Tensor([0, 1]))
train_loss1 = F.mse_loss(output.view(2, 1), target.view(2, 1, 1, 1), True) #... | [
{
"content": "import warnings\n\nfrom torch.autograd import Variable\nimport torch\nfrom .module import Module\nfrom .container import Sequential\nfrom .activation import LogSoftmax\nfrom .. import functional as F\n\n\ndef _assert_no_grad(variable):\n assert not variable.requires_grad, \\\n \"nn crite... | [
{
"content": "import warnings\n\nfrom torch.autograd import Variable\nimport torch\nfrom .module import Module\nfrom .container import Sequential\nfrom .activation import LogSoftmax\nfrom .. import functional as F\n\n\ndef _assert_no_grad(variable):\n assert not variable.requires_grad, \\\n \"nn crite... | diff --git a/aten/src/THCUNN/generic/AbsCriterion.cu b/aten/src/THCUNN/generic/AbsCriterion.cu
index b1c4f475d68a7e..f5c2b1e1466843 100644
--- a/aten/src/THCUNN/generic/AbsCriterion.cu
+++ b/aten/src/THCUNN/generic/AbsCriterion.cu
@@ -12,7 +12,7 @@ void THNN_(AbsCriterion_updateOutput)(
bool sizeAverage,
... |
sherlock-project__sherlock-911 | [site_list.py] change numbering to reduce commit size
letting the markdown renderer do the counting lets us reduce commit size and avoide possible merge conflicts.
---
```
1.
1.
1.
```
renders to:
1.
1.
1.
| [
{
"content": "\"\"\"Sherlock: Supported Site Listing\nThis module generates the listing of supported sites\nwhich can be found in sites.md\nIt also organizes all the sites in alphanumeric order\n\"\"\"\nimport json\n\npool = list()\n\nwith open(\"sherlock/resources/data.json\", \"r\", encoding=\"utf-8\") as dat... | [
{
"content": "\"\"\"Sherlock: Supported Site Listing\nThis module generates the listing of supported sites\nwhich can be found in sites.md\nIt also organizes all the sites in alphanumeric order\n\"\"\"\nimport json\n\npool = list()\n\nwith open(\"sherlock/resources/data.json\", \"r\", encoding=\"utf-8\") as dat... | diff --git a/site_list.py b/site_list.py
index 9e2288393..ea64d954f 100644
--- a/site_list.py
+++ b/site_list.py
@@ -18,11 +18,8 @@
url_main = data.get(social_network).get("urlMain")
pool.append((social_network, url_main))
- index = 1
for social_network, url_main in pool:
- site_file.... |
pyg-team__pytorch_geometric-6562 | Some layer parameters are not reset
### 🐛 Describe the bug
For the file: `torch_geometric/nn/models/dimenet.py`
In `reset_parameters()` of `InteractionPPBlock`, `self.layers_before_skip` is reset twice, and `self.layers_after_skip` is not reset at all.
This is the current version:
```python
for res_layer in... | [
{
"content": "import os\nimport os.path as osp\nfrom math import pi as PI\nfrom math import sqrt\nfrom typing import Callable, Optional, Tuple, Union\n\nimport numpy as np\nimport torch\nfrom torch import Tensor\nfrom torch.nn import Embedding, Linear\nfrom torch_sparse import SparseTensor\n\nfrom torch_geometr... | [
{
"content": "import os\nimport os.path as osp\nfrom math import pi as PI\nfrom math import sqrt\nfrom typing import Callable, Optional, Tuple, Union\n\nimport numpy as np\nimport torch\nfrom torch import Tensor\nfrom torch.nn import Embedding, Linear\nfrom torch_sparse import SparseTensor\n\nfrom torch_geometr... | diff --git a/torch_geometric/nn/models/dimenet.py b/torch_geometric/nn/models/dimenet.py
index 2408db464f34..815f901c7662 100644
--- a/torch_geometric/nn/models/dimenet.py
+++ b/torch_geometric/nn/models/dimenet.py
@@ -275,7 +275,7 @@ def reset_parameters(self):
res_layer.reset_parameters()
glorot... |
praw-dev__praw-844 | comment.refresh() causes praw to crash
## Issue Description
This issue arises when calling refresh on a comment. I have been able to reproduce the bug multiple times by running this simplified script:
#!/usr/bin/python3
import praw
reddit = praw.Reddit('bot1', user_agent='python')
askreddit =... | [
{
"content": "\"\"\"Provide the Comment class.\"\"\"\nfrom ...const import urljoin\nfrom ...exceptions import ClientException\nfrom ..comment_forest import CommentForest\nfrom .base import RedditBase\nfrom .mixins import InboxableMixin, ThingModerationMixin, UserContentMixin\nfrom .redditor import Redditor\n\n\... | [
{
"content": "\"\"\"Provide the Comment class.\"\"\"\nfrom ...const import urljoin\nfrom ...exceptions import ClientException\nfrom ..comment_forest import CommentForest\nfrom .base import RedditBase\nfrom .mixins import InboxableMixin, ThingModerationMixin, UserContentMixin\nfrom .redditor import Redditor\n\n\... | diff --git a/CHANGES.rst b/CHANGES.rst
index 561e0f4b3..57e4f2883 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -23,6 +23,9 @@ Unreleased
:class:`.Comment` will additionally pull in as many parent comments as
possible (currently 8) enabling significantly quicker traversal to the
top-most :class:`.Comment` via ... |
blaze__blaze-1524 | Coerce to `'string'` broken with Pandas
``` python
In [1]: import pandas as pd
In [2]: df = pd.Series([1, 2, 3])
In [3]: import blaze as bz
In [4]: bdf = bz.data(df)
In [7]: bz.compute(bdf.coerce('string')).dtypes
Out[7]: dtype('O')
In [8]: res = bz.compute(bdf.coerce('string'))
In [10]: type(res.iloc[0])
Out[10]... | [
{
"content": "\"\"\"\n\n>>> from blaze.expr import symbol\n>>> from blaze.compute.pandas import compute\n\n>>> accounts = symbol('accounts', 'var * {name: string, amount: int}')\n>>> deadbeats = accounts[accounts['amount'] < 0]['name']\n\n>>> from pandas import DataFrame\n>>> data = [['Alice', 100], ['Bob', -50... | [
{
"content": "\"\"\"\n\n>>> from blaze.expr import symbol\n>>> from blaze.compute.pandas import compute\n\n>>> accounts = symbol('accounts', 'var * {name: string, amount: int}')\n>>> deadbeats = accounts[accounts['amount'] < 0]['name']\n\n>>> from pandas import DataFrame\n>>> data = [['Alice', 100], ['Bob', -50... | diff --git a/blaze/compute/pandas.py b/blaze/compute/pandas.py
index 271ec1d1e..31a2a9920 100644
--- a/blaze/compute/pandas.py
+++ b/blaze/compute/pandas.py
@@ -753,6 +753,12 @@ def compute_up(expr, data, **kwargs):
@dispatch(Coerce, (Series, DaskSeries))
def compute_up(expr, data, **kwargs):
+ if datashape.dsha... |
conan-io__conan-center-index-2833 | [package] icu/67.1: can't compile on Windows
<!--
Please don't forget to update the issue title.
Include all applicable information to help us reproduce your problem.
-->
### Package and Environment Details (include every applicable attribute)
* Package Name/Version: **icu/67.1**
* Operating System+ver... | [
{
"content": "import glob\nimport os\nimport platform\nimport shutil\n\nfrom conans import ConanFile, tools, AutoToolsBuildEnvironment\n\n\nclass ICUBase(ConanFile):\n name = \"icu\"\n homepage = \"http://site.icu-project.org\"\n license = \"ICU\"\n description = \"ICU is a mature, widely used set o... | [
{
"content": "import glob\nimport os\nimport platform\nimport shutil\n\nfrom conans import ConanFile, tools, AutoToolsBuildEnvironment\n\n\nclass ICUBase(ConanFile):\n name = \"icu\"\n homepage = \"http://site.icu-project.org\"\n license = \"ICU\"\n description = \"ICU is a mature, widely used set o... | diff --git a/recipes/icu/all/conanfile.py b/recipes/icu/all/conanfile.py
index a3b9be50682c5..4e8173d757ec2 100644
--- a/recipes/icu/all/conanfile.py
+++ b/recipes/icu/all/conanfile.py
@@ -60,8 +60,7 @@ def package_id(self):
del self.info.options.silent # Verbosity doesn't affect package's ID
def build... |
aio-libs__aiohttp-7358 | Request.transport is sometimes None
## Long story short
The transport attribute on requests is sometimes (like 1/month on a rather idle system!?) None – I cannot figure out why?
## Expected behaviour
Either never be None or an explanation in http://docs.aiohttp.org/en/stable/web_reference.html#aiohttp.web.Base... | [
{
"content": "import asyncio\nimport functools\nimport random\nimport sys\nimport traceback\nimport warnings\nfrom collections import defaultdict, deque\nfrom contextlib import suppress\nfrom http import HTTPStatus\nfrom http.cookies import SimpleCookie\nfrom itertools import cycle, islice\nfrom time import mon... | [
{
"content": "import asyncio\nimport functools\nimport random\nimport sys\nimport traceback\nimport warnings\nfrom collections import defaultdict, deque\nfrom contextlib import suppress\nfrom http import HTTPStatus\nfrom http.cookies import SimpleCookie\nfrom itertools import cycle, islice\nfrom time import mon... | diff --git a/CHANGES/3355.bugfix b/CHANGES/3355.bugfix
new file mode 100644
index 00000000000..fd002cb00df
--- /dev/null
+++ b/CHANGES/3355.bugfix
@@ -0,0 +1 @@
+Fixed a transport is :data:`None` error -- by :user:`Dreamsorcerer`.
diff --git a/aiohttp/connector.py b/aiohttp/connector.py
index ea58d4cd193..a3a33f549df 1... |
pypa__setuptools-830 | Discrepancy between setuptools and distutils in sdist without MANIFEST.in
Originally reported by: **ikelos (Bitbucket: [ikelos](http://bitbucket.org/ikelos), GitHub: [ikelos](http://github.com/ikelos))**
---
[This upstream bug](http://bugs.python.org/issue2279) (fixed in to 2010) resolved the need to create a MANIFES... | [
{
"content": "from distutils import log\nimport distutils.command.sdist as orig\nimport os\nimport sys\nimport io\nimport contextlib\n\nfrom setuptools.extern import six\n\nfrom .py36compat import sdist_add_defaults\n\nimport pkg_resources\n\n_default_revctrl = list\n\n\ndef walk_revctrl(dirname=''):\n \"\"\... | [
{
"content": "from distutils import log\nimport distutils.command.sdist as orig\nimport os\nimport sys\nimport io\nimport contextlib\n\nfrom setuptools.extern import six\n\nfrom .py36compat import sdist_add_defaults\n\nimport pkg_resources\n\n_default_revctrl = list\n\n\ndef walk_revctrl(dirname=''):\n \"\"\... | diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py
index 9975753d9f..d4ac9efa97 100755
--- a/setuptools/command/sdist.py
+++ b/setuptools/command/sdist.py
@@ -141,11 +141,6 @@ def _add_defaults_python(self):
self.filelist.extend([os.path.join(src_dir, filename)
... |
ray-project__ray-1662 | [DataFrame] Error checking on Pandas version
We need better reporting for issues with the Pandas version on a user's system.
| [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport threading\n\nDEFAULT_NPARTITIONS = 4\n\n\ndef set_npartition_default(n):\n global DEFAULT_NPARTITIONS\n DEFAULT_NPARTITIONS = n\n\n\ndef get_npartitions():\n return DEFAU... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport pandas as pd\nimport threading\n\npd_version = pd.__version__\npd_major = int(pd_version.split(\".\")[0])\npd_minor = int(pd_version.split(\".\")[1])\n\nif pd_major == 0 and pd_... | diff --git a/python/ray/dataframe/__init__.py b/python/ray/dataframe/__init__.py
index 0bce774037f4f..824ef367ab0a6 100644
--- a/python/ray/dataframe/__init__.py
+++ b/python/ray/dataframe/__init__.py
@@ -1,8 +1,18 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print... |
pantsbuild__pants-20720 | "export" goal docs have unclosed call out
**Describe the bug**
The warning callout about "exporting tools requires ..." seems to be unclosed:
- https://www.pantsbuild.org/2.18/reference/goals/export
- https://www.pantsbuild.org/2.19/reference/goals/export
- https://www.pantsbuild.org/2.20/reference/goals/export... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport itertools\nimport os\nfrom dataclasses import dataclass\nfrom typing import Iterable, Mapping, Sequence, cast\n\nfrom ... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport itertools\nimport os\nfrom dataclasses import dataclass\nfrom typing import Iterable, Mapping, Sequence, cast\n\nfrom ... | diff --git a/src/python/pants/core/goals/export.py b/src/python/pants/core/goals/export.py
index 9ed430b2bc6..88fe837701a 100644
--- a/src/python/pants/core/goals/export.py
+++ b/src/python/pants/core/goals/export.py
@@ -110,7 +110,9 @@ class ExportSubsystem(GoalSubsystem):
Export Pants data for use in other t... |
pantsbuild__pants-20719 | "export" goal docs have unclosed call out
**Describe the bug**
The warning callout about "exporting tools requires ..." seems to be unclosed:
- https://www.pantsbuild.org/2.18/reference/goals/export
- https://www.pantsbuild.org/2.19/reference/goals/export
- https://www.pantsbuild.org/2.20/reference/goals/export... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport itertools\nimport os\nfrom dataclasses import dataclass\nfrom typing import Iterable, Mapping, Sequence, cast\n\nfrom ... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport itertools\nimport os\nfrom dataclasses import dataclass\nfrom typing import Iterable, Mapping, Sequence, cast\n\nfrom ... | diff --git a/src/python/pants/core/goals/export.py b/src/python/pants/core/goals/export.py
index 95c51075eab..75e8c081b4d 100644
--- a/src/python/pants/core/goals/export.py
+++ b/src/python/pants/core/goals/export.py
@@ -110,7 +110,9 @@ class ExportSubsystem(GoalSubsystem):
Export Pants data for use in other t... |
pennersr__django-allauth-1428 | [Question] Why is confirmation_key in the BaseSignupForm?
It doesn't seem to be used anywhere, right?
| [
{
"content": "from __future__ import absolute_import\n\nimport warnings\n\nfrom django import forms\nfrom django.core.urlresolvers import reverse\nfrom django.core import exceptions\nfrom django.utils.translation import pgettext, ugettext_lazy as _, ugettext\nfrom django.core import validators\nfrom django.cont... | [
{
"content": "from __future__ import absolute_import\n\nimport warnings\n\nfrom django import forms\nfrom django.core.urlresolvers import reverse\nfrom django.core import exceptions\nfrom django.utils.translation import pgettext, ugettext_lazy as _, ugettext\nfrom django.core import validators\nfrom django.cont... | diff --git a/allauth/account/forms.py b/allauth/account/forms.py
index 3113224ea5..2404e80150 100644
--- a/allauth/account/forms.py
+++ b/allauth/account/forms.py
@@ -337,9 +337,6 @@ class SignupForm(BaseSignupForm):
password1 = PasswordField(label=_("Password"))
password2 = PasswordField(label=_("Password ... |
ydataai__ydata-profiling-736 | Negative exponents appear positive
**Describe the bug**
Negative exponents do not appear in a profiling report
**To Reproduce**
```python
import numpy as np
import pandas as pd
from pandas_profiling import ProfileReport
data = { 'some_numbers' : (0.0001, 0.00001, 0.00000001, 0.002, 0.0002, 0.00003) * 100... | [
{
"content": "\"\"\"Formatters are mappings from object(s) to a string.\"\"\"\nfrom typing import Callable, Dict\n\nimport numpy as np\nfrom jinja2.utils import escape\n\n\ndef fmt_color(text: str, color: str) -> str:\n \"\"\"Format a string in a certain color (`<span>`).\n\n Args:\n text: The text t... | [
{
"content": "\"\"\"Formatters are mappings from object(s) to a string.\"\"\"\nfrom typing import Callable, Dict\n\nimport numpy as np\nfrom jinja2.utils import escape\n\n\ndef fmt_color(text: str, color: str) -> str:\n \"\"\"Format a string in a certain color (`<span>`).\n\n Args:\n text: The text t... | diff --git a/src/pandas_profiling/report/formatters.py b/src/pandas_profiling/report/formatters.py
index 6a29e8bdd..a4fe77ae0 100644
--- a/src/pandas_profiling/report/formatters.py
+++ b/src/pandas_profiling/report/formatters.py
@@ -206,8 +206,10 @@ def fmt_numeric(value: float, precision=10) -> str:
fmtted = f"{{... |
mozilla__bugbug-98 | Unnecessary string formatting when saving the model
https://github.com/mozilla/bugbug/blob/ab007344c5c799c08739b2d56f334afcaf242919/bugbug/model.py#L111 is not needed, we can use the variable directly.
| [
{
"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 numpy as np\nimport shap\nfrom imblearn.metrics import classif... | [
{
"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 numpy as np\nimport shap\nfrom imblearn.metrics import classif... | diff --git a/bugbug/model.py b/bugbug/model.py
index ba4c70835d..a428063422 100644
--- a/bugbug/model.py
+++ b/bugbug/model.py
@@ -104,7 +104,7 @@ def bugs():
print(metrics.confusion_matrix(y_test_filter, y_pred_filter, labels=class_names))
print(classification_report_imbalanced(y_test_filter,... |
sanic-org__sanic-2247 | Sanic prints "auto-reload: enabled" even when auto_reload is False.
Kinda related to #2237
https://github.com/sanic-org/sanic/blob/404c5f9f9eb54f06d1f30250bc2cc840c18a0eab/sanic/app.py#L1340
| [
{
"content": "from __future__ import annotations\n\nimport logging\nimport logging.config\nimport os\nimport re\n\nfrom asyncio import (\n AbstractEventLoop,\n CancelledError,\n Protocol,\n ensure_future,\n get_event_loop,\n wait_for,\n)\nfrom asyncio.futures import Future\nfrom collections im... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport logging.config\nimport os\nimport re\n\nfrom asyncio import (\n AbstractEventLoop,\n CancelledError,\n Protocol,\n ensure_future,\n get_event_loop,\n wait_for,\n)\nfrom asyncio.futures import Future\nfrom collections im... | diff --git a/sanic/app.py b/sanic/app.py
index 38d4b1d27c..ca8c4fe02f 100644
--- a/sanic/app.py
+++ b/sanic/app.py
@@ -1330,7 +1330,8 @@ def _helper(
logger.info(f"Goin' Fast @ {proto}://{host}:{port}")
debug_mode = "enabled" if self.debug else "disabled"
- logger.debug("Sanic auto-re... |
Flexget__Flexget-2761 | base64 issues with python 3.9
I just updated my install of python and something seams to have changed with base64
```
python -V
Python 3.9.0
```
Logs :
```
$ flexget
2020-10-18 13:00:03 CRITICAL plugin Exception while loading plugin flexget.plugins.input.apple_trailers
Traceback (most ... | [
{
"content": "import sys\nfrom pathlib import Path\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\nlong_description = Path('README.rst').read_text()\n\n# Populates __version__ without importing the package\n__version__ = None\nwith open('flexget/_version.py', encoding='utf-8') as ver_... | [
{
"content": "import sys\nfrom pathlib import Path\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\nlong_description = Path('README.rst').read_text()\n\n# Populates __version__ without importing the package\n__version__ = None\nwith open('flexget/_version.py', encoding='utf-8') as ver_... | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index ccfaff5775..9ab651c1c3 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -13,7 +13,7 @@ jobs:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
- python-version: [3.6, 3.7, 3.8]
+ ... |
pymedusa__Medusa-2851 | [APP SUBMITTED]: ValueError: hour must be in 0..23
### INFO
**Python Version**: `2.7.9 (default, Sep 17 2016, 20:26:04) [GCC 4.9.2]`
**Operating System**: `Linux-4.4.38-v7+-armv7l-with-debian-8.0`
**Locale**: `UTF-8`
**Branch**: [develop](../tree/develop)
**Database**: `44.8`
**Commit**: pymedusa/Medusa@94e0649919e9e05... | [
{
"content": "# coding=utf-8\n\n\"\"\"Provider code for TorrentProject.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport traceback\n\nfrom medusa import tv\nfrom medusa.bs4_parser import BS4Parser\nfrom medusa.common import USER_AGENT\nfrom medusa.helper.common import (\n convert_si... | [
{
"content": "# coding=utf-8\n\n\"\"\"Provider code for TorrentProject.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport traceback\n\nfrom medusa import tv\nfrom medusa.bs4_parser import BS4Parser\nfrom medusa.common import USER_AGENT\nfrom medusa.helper.common import (\n convert_si... | diff --git a/medusa/providers/torrent/html/torrentproject.py b/medusa/providers/torrent/html/torrentproject.py
index c7b035a592..9c6ad8e5ef 100644
--- a/medusa/providers/torrent/html/torrentproject.py
+++ b/medusa/providers/torrent/html/torrentproject.py
@@ -144,7 +144,7 @@ def parse(self, data, mode):
... |
napari__napari-3929 | missing doc items (may be copy-docs problem)
## 🐛 Bug
I was looking at napari.org after seeing #3916 get merged (a big update to plugin docs), and it looks like the toc is missing items. This seems to have something to do with the copy-docs script.
In particular,
* it looks like files that are not in the toc a... | [
{
"content": "\"\"\"\nCopy docs from the napari repo into the napari.github.io repo\nand update the table of contents.\nBy default, will assume that there is a folder named napari.github.io\nin the same directory as the napari folder, if not a different copy\ndestination can be provided.\n\nRead ORGANIZATION.md... | [
{
"content": "\"\"\"\nCopy docs from the napari repo into the napari.github.io repo\nand update the table of contents.\nBy default, will assume that there is a folder named napari.github.io\nin the same directory as the napari folder, if not a different copy\ndestination can be provided.\n\nRead ORGANIZATION.md... | diff --git a/docs/copy-docs.py b/docs/copy-docs.py
index 74c551044c5..bd53971ff86 100644
--- a/docs/copy-docs.py
+++ b/docs/copy-docs.py
@@ -54,6 +54,13 @@
'glossary.md', # this document will still be at the destination ToC
'guides/stable/_layer_events.md',
'guides/stable/_viewer_events.md',
+ 'plugi... |
spyder-ide__spyder-9831 | Fail to Launch Spyder Tutorial
## Description
### What steps will reproduce the problem?
<!--- You can use Markdown here --->
After updating to spyder 4, when I click Help and than click to start spyder tutorial, it does not start the tutorial and will lead me to issue reporter.
### Traceback
```python-traceback
... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"\nSpyder\n======\n\nThe Scientific Python Development Environment\n\nSpyder is a powerful scientific environment written in Python, ... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"\nSpyder\n======\n\nThe Scientific Python Development Environment\n\nSpyder is a powerful scientific environment written in Python, ... | diff --git a/setup.py b/setup.py
index 72c64052252..c7e53f85a9b 100644
--- a/setup.py
+++ b/setup.py
@@ -140,7 +140,7 @@ def run(self):
# Files added to the package
#==============================================================================
EXTLIST = ['.pot', '.po', '.mo', '.svg', '.png', '.css', '.html', '.js',... |
numpy__numpy-3852 | np.nansum(pandas.Series([1.0, np.nan])) breakage in current 1.8
[copied from mailing list so we don't lose track of it]
With pandas 0.12.0, this code:
```
np.nansum(pandas.Series([1.0, np.nan]))
```
works correctly using current master (74abfa27), but is broken with
current maintenance/1.8.x (f5fe91b9).
Here "corre... | [
{
"content": "\"\"\"\nFunctions that ignore NaN.\n\nFunctions\n---------\n\n- `nanmin` -- minimum non-NaN value\n- `nanmax` -- maximum non-NaN value\n- `nanargmin` -- index of minimum non-NaN value\n- `nanargmax` -- index of maximum non-NaN value\n- `nansum` -- sum of non-NaN values\n- `nanmean` -- mean of non-... | [
{
"content": "\"\"\"\nFunctions that ignore NaN.\n\nFunctions\n---------\n\n- `nanmin` -- minimum non-NaN value\n- `nanmax` -- maximum non-NaN value\n- `nanargmin` -- index of minimum non-NaN value\n- `nanargmax` -- index of maximum non-NaN value\n- `nansum` -- sum of non-NaN values\n- `nanmean` -- mean of non-... | diff --git a/numpy/lib/nanfunctions.py b/numpy/lib/nanfunctions.py
index 9ca34fb66eba..acc9232329b7 100644
--- a/numpy/lib/nanfunctions.py
+++ b/numpy/lib/nanfunctions.py
@@ -482,7 +482,7 @@ def nansum(a, axis=None, dtype=None, out=None, keepdims=0):
if mask is None:
return a.sum(axis, dtype, out, keepdim... |
internetarchive__openlibrary-4932 | Bug in bookshelves.py add method when changing edition
When calling the add method in openlibrary/core/bookshelves.py (e.g. POSTing to bookshelves.json) with a specific edition_id, the result is not as expected if another edition of the same work already exists on the user's bookshelves.
### Steps to Reproduce
Sub... | [
{
"content": "from openlibrary.utils.dateutil import DATE_ONE_MONTH_AGO, DATE_ONE_WEEK_AGO\n\nfrom . import db\n\n\nclass Bookshelves(object):\n\n PRESET_BOOKSHELVES = {\n 'Want to Read': 1,\n 'Currently Reading': 2,\n 'Already Read': 3\n }\n\n PRESET_BOOKSHELVES_JSON = {\n ... | [
{
"content": "from openlibrary.utils.dateutil import DATE_ONE_MONTH_AGO, DATE_ONE_WEEK_AGO\n\nfrom . import db\n\n\nclass Bookshelves(object):\n\n PRESET_BOOKSHELVES = {\n 'Want to Read': 1,\n 'Currently Reading': 2,\n 'Already Read': 3\n }\n\n PRESET_BOOKSHELVES_JSON = {\n ... | diff --git a/openlibrary/core/bookshelves.py b/openlibrary/core/bookshelves.py
index 75041498204..e9cdc6fc73d 100644
--- a/openlibrary/core/bookshelves.py
+++ b/openlibrary/core/bookshelves.py
@@ -187,7 +187,7 @@ def add(cls, username, bookshelf_id, work_id, edition_id=None):
else:
where = "work_i... |
bridgecrewio__checkov-3641 | Checkov hangs/slow if local kubeconfig points to a cluster that is unreachable
**Checkov performs slow if the local kubeconfig points to a cluster that is unreachable**
When my local `kubeconfig` file has a current_context that is set to a kubernetes cluster that is not reachable at that moment (because it is for exam... | [
{
"content": "from __future__ import annotations\n\nimport copy\nimport io\nimport logging\nimport multiprocessing\nimport os\nimport pathlib\nimport platform\nimport shutil\nimport subprocess # nosec\nimport tempfile\nimport yaml\nfrom typing import Optional, Dict, Any, Type, TextIO, TYPE_CHECKING\n\nfrom che... | [
{
"content": "from __future__ import annotations\n\nimport copy\nimport io\nimport logging\nimport multiprocessing\nimport os\nimport pathlib\nimport platform\nimport shutil\nimport subprocess # nosec\nimport tempfile\nimport yaml\nfrom typing import Optional, Dict, Any, Type, TextIO, TYPE_CHECKING\n\nfrom che... | diff --git a/checkov/kustomize/runner.py b/checkov/kustomize/runner.py
index 155b57c07d..33bfc73860 100644
--- a/checkov/kustomize/runner.py
+++ b/checkov/kustomize/runner.py
@@ -225,7 +225,7 @@ def check_system_deps(self):
if shutil.which(self.kubectl_command) is not None:
try:
- ... |
ckan__ckan-6774 | remove extra comma
Because typo of additional comma we see:
`jinja2.exceptions.TemplateSyntaxError: invalid syntax for function call expression`
- [ ] includes tests covering changes
- [ ] includes updated documentation
- [ ] includes user-visible changes
- [ ] includes API changes
- [ ] includes bugfix for po... | [
{
"content": "# encoding: utf-8\n\nimport os\nimport logging\nimport html\nimport io\n\nfrom flask import Blueprint, make_response\nimport six\nfrom six import text_type\nfrom werkzeug.exceptions import BadRequest\n\nimport ckan.model as model\nfrom ckan.common import json, _, g, request\nfrom ckan.lib.helpers ... | [
{
"content": "# encoding: utf-8\n\nimport os\nimport logging\nimport html\nimport io\n\nfrom flask import Blueprint, make_response\nimport six\nfrom six import text_type\nfrom werkzeug.exceptions import BadRequest\n\nimport ckan.model as model\nfrom ckan.common import json, _, g, request\nfrom ckan.lib.helpers ... | diff --git a/ckan/templates/snippets/changes/maintainer.html b/ckan/templates/snippets/changes/maintainer.html
index 3261fd20fbe..6a4ae589b96 100644
--- a/ckan/templates/snippets/changes/maintainer.html
+++ b/ckan/templates/snippets/changes/maintainer.html
@@ -3,7 +3,7 @@
{% if change.method == "change" %}
... |
conan-io__conan-2966 | Confusing message or behavior in SCM when url can't be deduced
It raises:
```python
if not origin:
raise ConanException("Repo origin cannot be deduced by 'auto', using source folder")
```
But it doesn't use the source folder, as execution is aborted. Maybe change the message? Or allow to proceed an... | [
{
"content": "\"\"\" manages the movement of conanfiles and associated files from the user space\nto the local store, as an initial step before building or uploading to remotes\n\"\"\"\n\nimport os\nimport shutil\n\nfrom conans.client.cmd.export_linter import conan_linter\nfrom conans.client.file_copier import ... | [
{
"content": "\"\"\" manages the movement of conanfiles and associated files from the user space\nto the local store, as an initial step before building or uploading to remotes\n\"\"\"\n\nimport os\nimport shutil\n\nfrom conans.client.cmd.export_linter import conan_linter\nfrom conans.client.file_copier import ... | diff --git a/conans/client/cmd/export.py b/conans/client/cmd/export.py
index fdc18119d00..ed8a2e3e2a2 100644
--- a/conans/client/cmd/export.py
+++ b/conans/client/cmd/export.py
@@ -112,7 +112,7 @@ def _capture_export_scm_data(conanfile, src_path, destination_folder, output, pa
if scm.url == "auto":
origin... |
ResonantGeoData__ResonantGeoData-436 | expose STAC post endpoint in Python client
for https://github.com/ResonantGeoData/issue-dashboard/issues/11
| [
{
"content": "from base64 import b64encode\nfrom dataclasses import dataclass\nimport getpass\nfrom pathlib import Path\nimport tempfile\nfrom typing import Dict, Iterator, List, Optional, Tuple, Union\n\nfrom tqdm import tqdm\n\nfrom .session import RgdcSession\nfrom .types import DATETIME_OR_STR_TUPLE, SEARCH... | [
{
"content": "from base64 import b64encode\nfrom dataclasses import dataclass\nimport getpass\nfrom pathlib import Path\nimport tempfile\nfrom typing import Dict, Iterator, List, Optional, Tuple, Union\n\nfrom tqdm import tqdm\n\nfrom .session import RgdcSession\nfrom .types import DATETIME_OR_STR_TUPLE, SEARCH... | diff --git a/rgdc/rgdc/rgdc.py b/rgdc/rgdc/rgdc.py
index 0c3366381..9c5b14400 100644
--- a/rgdc/rgdc/rgdc.py
+++ b/rgdc/rgdc/rgdc.py
@@ -240,6 +240,13 @@ def search(
)
return list(limit_offset_pager(self.session, 'geosearch', params=params))
+ def create_raster_stac(self, raster: Dict) -> Dict:
+... |
agconti__cookiecutter-django-rest-35 | Configure nosetests arguments
| [
{
"content": "import os\nfrom .common import Common\nfrom configurations import values\n\n\nclass Local(Common):\n\n DEBUG = values.BooleanValue(True)\n TEMPLATE_DEBUG = DEBUG\n\n # Testing\n INSTALLED_APPS = Common.INSTALLED_APPS\n INSTALLED_APPS += ('django_nose',)\n TEST_RUNNER = 'django_no... | [
{
"content": "import os\nfrom .common import Common\nfrom configurations import values\n\n\nclass Local(Common):\n\n DEBUG = values.BooleanValue(True)\n TEMPLATE_DEBUG = DEBUG\n\n # Testing\n INSTALLED_APPS = Common.INSTALLED_APPS\n INSTALLED_APPS += ('django_nose',)\n TEST_RUNNER = 'django_no... | diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/local.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/local.py
index 7bc157936..8ede02781 100755
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/local.py
+++ b/{{cookiecutte... |
fonttools__fonttools-1809 | [varLib] merging OTL fails if master TTFonts are loaded with lazy=True
If I populate my designspace source descriptors with TTFont() objects, similar to this:
```python
for source in ds.sources:
source.font = TTFont(<ttfsource>, lazy=True)
```
I get an AssertionError deep down in `mergeThings()`:
```
... | [
{
"content": "\"\"\"\nMerge OpenType Layout tables (GDEF / GPOS / GSUB).\n\"\"\"\nimport copy\nfrom operator import ior\nfrom fontTools.misc.fixedTools import otRound\nfrom fontTools.misc import classifyTools\nfrom fontTools.ttLib.tables import otTables as ot\nfrom fontTools.ttLib.tables import otBase as otBase... | [
{
"content": "\"\"\"\nMerge OpenType Layout tables (GDEF / GPOS / GSUB).\n\"\"\"\nimport copy\nfrom operator import ior\nfrom fontTools.misc.fixedTools import otRound\nfrom fontTools.misc import classifyTools\nfrom fontTools.ttLib.tables import otTables as ot\nfrom fontTools.ttLib.tables import otBase as otBase... | diff --git a/Lib/fontTools/varLib/merger.py b/Lib/fontTools/varLib/merger.py
index 2ac64fdbf4..f298b64d8a 100644
--- a/Lib/fontTools/varLib/merger.py
+++ b/Lib/fontTools/varLib/merger.py
@@ -60,6 +60,11 @@ def mergersFor(celf, thing, _default={}):
return _default
def mergeObjects(self, out, lst, exclude=()):
+ ... |
secdev__scapy-1041 | RDataField treats NS, CNAME as DNS string type.
That's about it. At present the code only correctly handles PTR RRs, this makes it so that it also handles NS and CNAME RRs.
| [
{
"content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## This program is published under a GPLv2 license\n\n\"\"\"\nDNS: Domain Name System.\n\"\"\"\n\nfrom __future__ import absolute_import\nimport soc... | [
{
"content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## This program is published under a GPLv2 license\n\n\"\"\"\nDNS: Domain Name System.\n\"\"\"\n\nfrom __future__ import absolute_import\nimport soc... | diff --git a/scapy/layers/dns.py b/scapy/layers/dns.py
old mode 100644
new mode 100755
index a5312e41edf..17a7711f06d
--- a/scapy/layers/dns.py
+++ b/scapy/layers/dns.py
@@ -194,7 +194,7 @@ def m2i(self, pkt, s):
family = None
if pkt.type == 1: # A
family = socket.AF_INET
- elif pk... |
interactions-py__interactions.py-1648 | [BUG] Occasionally VoiceChannel is None
### Library Version
5.11.0
### Describe the Bug
Occasionally, the built in cache receives None for VoiceChannel when trying to access `_voice_member_ids`. I believe this has to do with not having the `VOICE_STATE_UPDATE` intent.
### Steps to Reproduce
Run an inter... | [
{
"content": "from contextlib import suppress\nfrom logging import Logger\nfrom typing import TYPE_CHECKING, List, Dict, Any, Optional, Union\n\nimport attrs\nimport discord_typings\n\nfrom interactions.client.const import Absent, MISSING, get_logger\nfrom interactions.client.errors import NotFound, Forbidden\n... | [
{
"content": "from contextlib import suppress\nfrom logging import Logger\nfrom typing import TYPE_CHECKING, List, Dict, Any, Optional, Union\n\nimport attrs\nimport discord_typings\n\nfrom interactions.client.const import Absent, MISSING, get_logger\nfrom interactions.client.errors import NotFound, Forbidden\n... | diff --git a/interactions/client/smart_cache.py b/interactions/client/smart_cache.py
index c84d7b8c7..bc7ab5b14 100644
--- a/interactions/client/smart_cache.py
+++ b/interactions/client/smart_cache.py
@@ -794,7 +794,7 @@ async def place_voice_state_data(
if old_state := self.get_voice_state(user_id):
... |
horovod__horovod-214 | Error on using hvd.mpi_threads_supported() error: undefined symbol: mpi_threads_supported
Error on using hvd.mpi_threads_supported()
error: undefined symbol: mpi_threads_supported
`mpi_threads_supported = MPI_COMMON_LIB_CTYPES.mpi_threads_supported()`
should be
`mpi_threads_supported = MPI_COMMON_LIB_CTYPES... | [
{
"content": "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n# Modifications copyright (C) 2018 Uber 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 Lice... | [
{
"content": "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n# Modifications copyright (C) 2018 Uber 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 Lice... | diff --git a/horovod/common/__init__.py b/horovod/common/__init__.py
index 308064b5cb..ec9dc4bc5f 100644
--- a/horovod/common/__init__.py
+++ b/horovod/common/__init__.py
@@ -107,7 +107,7 @@ def mpi_threads_supported():
Returns:
A boolean value indicating whether MPI multi-threading is supported.
"""
-... |
saulpw__visidata-1717 | Create New Table from Clipboard
It would be nice to have a command which can create a new table directly from the clipboard.
For example, suppose I have tab separated data in my clipboard.
I would like to be able to execute a visidata command to load a table from the clipboard.
The command might ask me what filety... | [
{
"content": "from visidata import vd, BaseSheet, Path\n\n\n@BaseSheet.api\ndef open_syspaste(sheet, filetype='tsv'):\n import io\n\n v = vd.sysclipValue().strip() or vd.fail('nothing to open')\n\n p = Path('syspaste'+'.'+filetype, fp=io.BytesIO(v.encode('utf-8')))\n return vd.openSource(p, filetype... | [
{
"content": "'''\nLoad new table from system clipboard\n'''\n\nfrom visidata import vd, BaseSheet, Path\n\n\n@BaseSheet.api\ndef open_syspaste(sheet, filetype='tsv'):\n import io\n\n v = vd.sysclipValue().strip() or vd.fail('nothing to open')\n\n p = Path('syspaste'+'.'+filetype, fp=io.BytesIO(v.encod... | diff --git a/visidata/features/open_syspaste.py b/visidata/features/open_syspaste.py
index ac743fa5c..3ada94785 100644
--- a/visidata/features/open_syspaste.py
+++ b/visidata/features/open_syspaste.py
@@ -1,3 +1,7 @@
+'''
+Load new table from system clipboard
+'''
+
from visidata import vd, BaseSheet, Path
@@ -11,... |
bridgecrewio__checkov-3596 | CKV_DOCKER_1 rule not failed when using EXPOSE 22/TCP
**Issue**
If it is related to an existing check, CKV_DOCKER_1.
Dockerfile EXPOSE can accept port using tcp proto by defaut if not specified or you can also specify the protocol with /tcp or /udp.
When using "EXPOSE 22/tcp" the rule does not detect the SSH port.... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom checkov.common.models.enums import CheckCategories, CheckResult\nfrom checkov.dockerfile.base_dockerfile_check import BaseDockerfileCheck\n\nif TYPE_CHECKING:\n from dockerfile_parse.parser import _Instruction\n\n\nc... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING\n\nfrom checkov.common.models.enums import CheckCategories, CheckResult\nfrom checkov.dockerfile.base_dockerfile_check import BaseDockerfileCheck\n\nif TYPE_CHECKING:\n from dockerfile_parse.parser import _Instruction\n\n\nc... | diff --git a/checkov/dockerfile/checks/ExposePort22.py b/checkov/dockerfile/checks/ExposePort22.py
index 5e8a646c4e..bcf39c10b1 100644
--- a/checkov/dockerfile/checks/ExposePort22.py
+++ b/checkov/dockerfile/checks/ExposePort22.py
@@ -19,7 +19,7 @@ def __init__(self) -> None:
def scan_resource_conf(self, conf: l... |
joke2k__faker-678 | NameError: name 'args' is not defined
I'm getting an error using the *args method.
```
fake.email(*args, **kwargs)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'args' is not defined
```
Also can I change the **kwargs with @gmail to get random@gmail.com?
| [
{
"content": "# coding=utf-8\nfrom __future__ import unicode_literals\n\nfrom text_unidecode import unidecode\n\nfrom .. import BaseProvider\n\nfrom ipaddress import ip_address, ip_network, IPV4LENGTH, IPV6LENGTH\n\n# from faker.generator import random\n# from faker.providers.lorem.la import Provider as Lorem\n... | [
{
"content": "# coding=utf-8\nfrom __future__ import unicode_literals\n\nfrom text_unidecode import unidecode\n\nfrom .. import BaseProvider\n\nfrom ipaddress import ip_address, ip_network, IPV4LENGTH, IPV6LENGTH\n\n# from faker.generator import random\n# from faker.providers.lorem.la import Provider as Lorem\n... | diff --git a/faker/providers/internet/__init__.py b/faker/providers/internet/__init__.py
index acdda088a0..f357f2c751 100644
--- a/faker/providers/internet/__init__.py
+++ b/faker/providers/internet/__init__.py
@@ -75,9 +75,13 @@ def _to_ascii(self, string):
return string
@lowercase
- def email(self)... |
statsmodels__statsmodels-5335 | TST: Random failure with Test_MVN_MVT_prob.test_mvn_mvt_3
Example here:
https://travis-ci.org/statsmodels/statsmodels/jobs/447560388
weird thing is, it looks like it passes, but it fails:
```
> assert_almost_equal(probmvt_R, probmvt, 4)
E AssertionError:
E Arrays are not almost equal to 4... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nImplements Lilliefors corrected Kolmogorov-Smirnov tests for normal and\nexponential distributions.\n\n`kstest_fit` is provided as a top-level function to access both tests.\n`kstest_normal` and `kstest_exponential` are provided as convenience functions\nwith the a... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nImplements Lilliefors corrected Kolmogorov-Smirnov tests for normal and\nexponential distributions.\n\n`kstest_fit` is provided as a top-level function to access both tests.\n`kstest_normal` and `kstest_exponential` are provided as convenience functions\nwith the a... | diff --git a/.travis.yml b/.travis.yml
index da57b2f2e0e..060b77573f9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -125,9 +125,9 @@ before_install:
if [ ${COVERAGE} = true ]; then
pip install codecov coverage coveralls pytest-cov
if [ -z ${SM_CYTHON_COVERAGE} ] || [ ${SM_CYTHON_COVERAGE} = false... |
facebookresearch__ParlAI-385 | Training hanged at loss.backward() of movie-dialog-qa
Hi, I am interested in Memory Networks and Movie Dialog QA. Although I tried below command, training stopped at first `loss.backward()` at `memnn.py`. I waited almost one day, but `loss.backward()` didn't finish. I have checked this by printing debug and `[Using Cud... | [
{
"content": "# 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 file in the same directory.\n... | [
{
"content": "# 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 file in the same directory.\n... | diff --git a/parlai/agents/memnn/memnn.py b/parlai/agents/memnn/memnn.py
index 9298c281915..dc50315864a 100644
--- a/parlai/agents/memnn/memnn.py
+++ b/parlai/agents/memnn/memnn.py
@@ -129,6 +129,8 @@ def observe(self, observation):
return observation
def predict(self, xs, cands, ys=None):
+ # Su... |
zulip__zulip-15887 | Cannot react with a custom emoji to a bot message
Attempting to react to a bot message with a custom emoji appears to work but if you refresh the page it's gone. Inspecting the network requests reveals that the request to add the reaction fails with a 400 Bad Request error `Reaction doesn't exist.`.
This can be eas... | [
{
"content": "from typing import Optional\n\nfrom django.http import HttpRequest, HttpResponse\nfrom django.utils.translation import ugettext as _\n\nfrom zerver.decorator import REQ, has_request_variables\nfrom zerver.lib.actions import do_add_reaction, do_remove_reaction\nfrom zerver.lib.emoji import check_em... | [
{
"content": "from typing import Optional\n\nfrom django.http import HttpRequest, HttpResponse\nfrom django.utils.translation import ugettext as _\n\nfrom zerver.decorator import REQ, has_request_variables\nfrom zerver.lib.actions import do_add_reaction, do_remove_reaction\nfrom zerver.lib.emoji import check_em... | diff --git a/zerver/views/reactions.py b/zerver/views/reactions.py
index 951ad88a4fc85..a52395f211cd6 100644
--- a/zerver/views/reactions.py
+++ b/zerver/views/reactions.py
@@ -73,7 +73,7 @@ def add_reaction(request: HttpRequest, user_profile: UserProfile, message_id: in
# Otherwise, use the name provided in t... |
geopandas__geopandas-1498 | to_postgis raises spurious warning
Very happy about the new `to_postgis` function in 0.8. I found that it works as expected, but it raises a spurious warning. It creates a temporary copy of the GeoDataFrame with geometry columns converted to WKB. This temporary copy fails a check that the geometry columns must actually... | [
{
"content": "import warnings\n\nimport pandas as pd\n\nimport shapely.wkb\n\nfrom geopandas import GeoDataFrame\n\nfrom .. import _compat as compat\n\n\ndef _df_to_geodf(df, geom_col=\"geom\", crs=None):\n \"\"\"\n Transforms a pandas DataFrame into a GeoDataFrame.\n The column 'geom_col' must be a ge... | [
{
"content": "import warnings\n\nimport pandas as pd\n\nimport shapely.wkb\n\nfrom geopandas import GeoDataFrame\n\nfrom .. import _compat as compat\n\n\ndef _df_to_geodf(df, geom_col=\"geom\", crs=None):\n \"\"\"\n Transforms a pandas DataFrame into a GeoDataFrame.\n The column 'geom_col' must be a ge... | diff --git a/geopandas/io/sql.py b/geopandas/io/sql.py
index 16996c7e7a..8aa79693dd 100644
--- a/geopandas/io/sql.py
+++ b/geopandas/io/sql.py
@@ -248,8 +248,12 @@ def _convert_to_ewkb(gdf, geom_name, srid):
geoms = [dumps(geom, srid=srid, hex=True) for geom in gdf[geom_name]]
- gdf[geom_name] = geoms
-... |
plotly__dash-2513 | [BUG] Exception when property of patched_fig is viewed
I know that it is currently not supported to view properties of `patch_fig=Patch()` but when e.g. iterating over trace names like so:
```
for trace in patched_fig['data']:
print(trace['name'])
```
no exception or error message is thrown but an endless... | [
{
"content": "def _operation(name, location, **kwargs):\n return {\"operation\": name, \"location\": location, \"params\": dict(**kwargs)}\n\n\n_noop = object()\n\n\ndef validate_slice(obj):\n if isinstance(obj, slice):\n raise TypeError(\"a slice is not a valid index for patch\")\n\n\nclass Patch:... | [
{
"content": "def _operation(name, location, **kwargs):\n return {\"operation\": name, \"location\": location, \"params\": dict(**kwargs)}\n\n\n_noop = object()\n\n\ndef validate_slice(obj):\n if isinstance(obj, slice):\n raise TypeError(\"a slice is not a valid index for patch\")\n\n\nclass Patch:... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2d99189599..55e9e0c4b9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- [#2508](https://github.com/plotly/dash/pull/2508) Fix error message, when callback output has different length than sp... |
keras-team__keras-1767 | unable to load weights in models with siamese branches
The problem is that the set_weights() function in sequential tries to concatenate trainable_weights and non_trainable together
However if one of your layers is another sequential container, this does not have a non_trainable_weights parameter
This needs to be imple... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nfrom collections import OrderedDict\nfrom .. import backend as K\nfrom ..layers.core import Layer, Merge, Siamese, SiameseHead\nfrom six.moves import range\n\n\nclass Sequential(Layer):\n '... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nfrom collections import OrderedDict\nfrom .. import backend as K\nfrom ..layers.core import Layer, Merge, Siamese, SiameseHead\nfrom six.moves import range\n\n\nclass Sequential(Layer):\n '... | diff --git a/keras/layers/containers.py b/keras/layers/containers.py
index cdebcd037948..6a281a7e40a2 100644
--- a/keras/layers/containers.py
+++ b/keras/layers/containers.py
@@ -156,9 +156,9 @@ def get_weights(self):
return weights
def set_weights(self, weights):
- for i in range(len(self.layers... |
pyinstaller__pyinstaller-2831 | Can't package pyusb, 'Unable to find "libusb-1.0.so.0"'
To reproduce
1. `virtualenv env`
`source env/bin/activate`
`pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip`
`pip install pyusb`
`pip freeze > requirements.txt`
2. Create simple python file which imports pyusb
test.py
```
impo... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2017, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING.... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2017, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING.... | diff --git a/PyInstaller/hooks/hook-usb.py b/PyInstaller/hooks/hook-usb.py
index a57971caec..da64a97a53 100644
--- a/PyInstaller/hooks/hook-usb.py
+++ b/PyInstaller/hooks/hook-usb.py
@@ -40,7 +40,9 @@
binaries = []
for usblib in [getattr(usb.backend, be)._lib for be in backends]:
if usblib is not Non... |
paperless-ngx__paperless-ngx-55 | [Other] Allow access to webhooks for readthedocs
I recently set up the [readthedocs site](https://paperless-ngx.readthedocs.io/en/latest/). Unfortunately, I don't have access to the webhooks settings of the project.
I requested access to it from the project owner. When granted, the docs will automatically update.
Al... | [
{
"content": "import sphinx_rtd_theme\n\n\n__version__ = None\nexec(open(\"../src/paperless/version.py\").read())\n\n\nextensions = [\n 'sphinx.ext.autodoc',\n 'sphinx.ext.intersphinx',\n 'sphinx.ext.todo',\n 'sphinx.ext.imgmath',\n 'sphinx.ext.viewcode',\n 'sphinx_rtd_theme',\n]\n\n# Add any ... | [
{
"content": "import sphinx_rtd_theme\n\n\n__version__ = None\nexec(open(\"../src/paperless/version.py\").read())\n\n\nextensions = [\n 'sphinx.ext.autodoc',\n 'sphinx.ext.intersphinx',\n 'sphinx.ext.todo',\n 'sphinx.ext.imgmath',\n 'sphinx.ext.viewcode',\n 'sphinx_rtd_theme',\n]\n\n# Add any ... | diff --git a/README.md b/README.md
index a104b723b68..d6b4ecc433a 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,7 @@
-[](https://github.com/jonaswinkler/paperless-ng/actions)
-[:\n ... | [
{
"content": "import duckdb\nimport numpy as np\nfrom mindsdb_sql import parse_sql\nfrom mindsdb_sql.parser.ast import Select, Identifier, BinaryOperation, OrderBy\nfrom mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender\n\nfrom mindsdb.utilities.log import log\n\n\ndef _remove_table_name(root):\n ... | diff --git a/mindsdb/api/mysql/mysql_proxy/utilities/sql.py b/mindsdb/api/mysql/mysql_proxy/utilities/sql.py
index e50c099318e..7fca67d91f4 100644
--- a/mindsdb/api/mysql/mysql_proxy/utilities/sql.py
+++ b/mindsdb/api/mysql/mysql_proxy/utilities/sql.py
@@ -54,4 +54,13 @@ def query_df(df, query):
res = duckdb.query... |
urllib3__urllib3-2249 | Misleading deprecation warning in 1.26.X
### Subject
While using `Retry.DEFAULT_METHOD_WHITELIST` warning message asks to use `Retry.DEFAULT_METHODS_ALLOWED` which does not exist. The proper attribute name is `DEFAULT_ALLOWED_METHODS`.
### Environment
Issue seems to be platform-agnostic.
OS macOS-10.15.7-x8... | [
{
"content": "from __future__ import absolute_import\n\nimport email\nimport logging\nimport re\nimport time\nimport warnings\nfrom collections import namedtuple\nfrom itertools import takewhile\n\nfrom ..exceptions import (\n ConnectTimeoutError,\n InvalidHeader,\n MaxRetryError,\n ProtocolError,\n... | [
{
"content": "from __future__ import absolute_import\n\nimport email\nimport logging\nimport re\nimport time\nimport warnings\nfrom collections import namedtuple\nfrom itertools import takewhile\n\nfrom ..exceptions import (\n ConnectTimeoutError,\n InvalidHeader,\n MaxRetryError,\n ProtocolError,\n... | diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 51bbc2b227..9ed5b843d4 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -306,5 +306,8 @@ In chronological order:
* [Ezzeri Esa] <https://github.com/savarin>
* Ports and extends on types from typeshed
+* [Mateusz Pawlik] <https://github.com/matee911>
+ ... |
Cloud-CV__EvalAI-726 | Add fields in ChallengePhaseSerializer
Please add fields `max_submissions_per_day` and `max_submissions` in the `Challenge Phase Serializer`. It is needed for the issue #704 .
| [
{
"content": "from rest_framework import serializers\n\nfrom hosts.serializers import ChallengeHostTeamSerializer\n\nfrom .models import (\n Challenge,\n ChallengePhase,\n ChallengePhaseSplit,\n DatasetSplit,)\n\n\nclass ChallengeSe... | [
{
"content": "from rest_framework import serializers\n\nfrom hosts.serializers import ChallengeHostTeamSerializer\n\nfrom .models import (\n Challenge,\n ChallengePhase,\n ChallengePhaseSplit,\n DatasetSplit,)\n\n\nclass ChallengeSe... | diff --git a/apps/challenges/serializers.py b/apps/challenges/serializers.py
index 8e2238940d..675a129bc9 100644
--- a/apps/challenges/serializers.py
+++ b/apps/challenges/serializers.py
@@ -44,7 +44,8 @@ def __init__(self, *args, **kwargs):
class Meta:
model = ChallengePhase
fields = ('id', 'nam... |
sanic-org__sanic-2001 | Hard error on invalid max-age cookie
**Describe the bug**
Currently when setting the `max-age` cookie value, it's possible for a valid value to not be set as expected, as well as an invalid value from raising a hard error. In both cases the values are replaced by a `0` `max-age`.
**Code snippet**
```python
resp... | [
{
"content": "import re\nimport string\n\nfrom datetime import datetime\n\n\nDEFAULT_MAX_AGE = 0\n\n# ------------------------------------------------------------ #\n# SimpleCookie\n# ------------------------------------------------------------ #\n\n# Straight up copied this section of dark magic from SimpleCo... | [
{
"content": "import re\nimport string\n\nfrom datetime import datetime\n\n\nDEFAULT_MAX_AGE = 0\n\n# ------------------------------------------------------------ #\n# SimpleCookie\n# ------------------------------------------------------------ #\n\n# Straight up copied this section of dark magic from SimpleCo... | diff --git a/sanic/cookies.py b/sanic/cookies.py
index ed672fba1a..5387fcc540 100644
--- a/sanic/cookies.py
+++ b/sanic/cookies.py
@@ -109,7 +109,7 @@ def __setitem__(self, key, value):
if value is not False:
if key.lower() == "max-age":
if not str(value).isdigit():
- ... |
elastic__apm-agent-python-803 | read_pem_file doesn't support certificate chains
Something like this should fix the issue:
```diff
def read_pem_file(file_obj):
cert = b""
for line in file_obj:
if line.startswith(b"-----BEGIN CERTIFICATE-----"):
break
for line in file_obj:
- if not line.startswith(b... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c... | diff --git a/elasticapm/utils/__init__.py b/elasticapm/utils/__init__.py
index 1c36987a3..480e7e361 100644
--- a/elasticapm/utils/__init__.py
+++ b/elasticapm/utils/__init__.py
@@ -165,9 +165,11 @@ def read_pem_file(file_obj):
for line in file_obj:
if line.startswith(b"-----BEGIN CERTIFICATE-----"):
... |
ivy-llc__ivy-23586 | cumsum
| [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\... | [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\... | diff --git a/ivy/functional/frontends/paddle/math.py b/ivy/functional/frontends/paddle/math.py
index c4d3a0130f79b..1da2723627ae6 100644
--- a/ivy/functional/frontends/paddle/math.py
+++ b/ivy/functional/frontends/paddle/math.py
@@ -152,6 +152,14 @@ def cumprod(x, dim=None, dtype=None, name=None):
return ivy.cumpr... |
zulip__zulip-28775 | Improve integrations documentation in help center
We should:
- Rename /help/bots-and-integrations to "Bots overview" everywhere (sidebar, page title, page URL).
- Add a copy of https://zulip.com/api/integrations-overview as the second page in the Bots & integrations section, titled "Integration overview"
- Cross-lin... | [
{
"content": "from dataclasses import dataclass\nfrom typing import List\n\n\n@dataclass\nclass URLRedirect:\n old_url: str\n new_url: str\n\n\nAPI_DOCUMENTATION_REDIRECTS: List[URLRedirect] = [\n # Add URL redirects for REST API documentation here:\n URLRedirect(\"/api/delete-stream\", \"/api/archi... | [
{
"content": "from dataclasses import dataclass\nfrom typing import List\n\n\n@dataclass\nclass URLRedirect:\n old_url: str\n new_url: str\n\n\nAPI_DOCUMENTATION_REDIRECTS: List[URLRedirect] = [\n # Add URL redirects for REST API documentation here:\n URLRedirect(\"/api/delete-stream\", \"/api/archi... | diff --git a/api_docs/integrations-overview.md b/api_docs/integrations-overview.md
index 465a3cf9e8095..02dd5fe96289e 100644
--- a/api_docs/integrations-overview.md
+++ b/api_docs/integrations-overview.md
@@ -67,3 +67,11 @@ us](/help/contact-support) and we'll see what we can do.
something that isn't there check out... |
bookwyrm-social__bookwyrm-1172 | Incorrect import of book from Goodreads
**Describe the bug**
I attempted to import my Goodreads library (https://www.goodreads.com/user/show/986159-nikhil) into Bookwyrm. I noticed the book _Dark Fiber: Tracking Critical Internet Culture_ ([bookwyrm](https://bookwyrm.social/book/120984), [goodreads](https://www.goodre... | [
{
"content": "\"\"\" track progress of goodreads imports \"\"\"\nimport re\nimport dateutil.parser\n\nfrom django.apps import apps\nfrom django.db import models\nfrom django.utils import timezone\n\nfrom bookwyrm.connectors import connector_manager\nfrom bookwyrm.models import ReadThrough, User, Book\nfrom .fie... | [
{
"content": "\"\"\" track progress of goodreads imports \"\"\"\nimport re\nimport dateutil.parser\n\nfrom django.apps import apps\nfrom django.db import models\nfrom django.utils import timezone\n\nfrom bookwyrm.connectors import connector_manager\nfrom bookwyrm.models import ReadThrough, User, Book\nfrom .fie... | diff --git a/bookwyrm/models/import_job.py b/bookwyrm/models/import_job.py
index c8130af260..f299384698 100644
--- a/bookwyrm/models/import_job.py
+++ b/bookwyrm/models/import_job.py
@@ -75,7 +75,12 @@ class ImportItem(models.Model):
def resolve(self):
"""try various ways to lookup a book"""
- se... |
Flexget__Flexget-3204 | python 3.10 issue
I have an issue with python 3.10 and Flexget. Greenlet has been updated to 1.1.2 because the 1.0.0 version is not compatible with python 3.10. After that Flexget was installed successfully but I got the error message below.
- FlexGet version: 3.1.137
- Python version: 3.10
- Installation method: ... | [
{
"content": "import sys\nfrom pathlib import Path\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\nlong_description = Path('README.rst').read_text()\n\n# Populates __version__ without importing the package\n__version__ = None\nwith open('flexget/_version.py', encoding='utf-8') as ver_... | [
{
"content": "import sys\nfrom pathlib import Path\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\nlong_description = Path('README.rst').read_text()\n\n# Populates __version__ without importing the package\n__version__ = None\nwith open('flexget/_version.py', encoding='utf-8') as ver_... | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9ab651c1c3..1d49a2eb9b 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -13,7 +13,7 @@ jobs:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
- python-version: [3.6, 3.7, 3.8, 3.9]
+ ... |
docker__docker-py-132 | Push(stream=True) does not work anymore.
```
$ cat test.py
import docker
c = docker.Client()
for line in c.push("test_image", stream=True):
print line
$ sudo venv/bin/python test.py
Traceback (most recent call last):
File "test.py", line 4, in <module>
for line in c.push("test_image", stream=True):
File ... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | diff --git a/docker/client.py b/docker/client.py
index 8c13ea2a8..5ccf99880 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -227,7 +227,9 @@ def _stream_result_socket(self, response):
def _stream_helper(self, response):
"""Generator for data coming from a chunked-encoded HTTP response."""
- ... |
googleapis__google-auth-library-python-51 | Create system tests for service account-based credentials
| [
{
"content": "# Copyright 2014 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica... | [
{
"content": "# Copyright 2014 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica... | diff --git a/.travis.yml b/.travis.yml
index 295f14cb5..a56fb349b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,13 +16,17 @@ matrix:
env: TOXENV=pypy
- python: 3.5
env: TOXENV=cover
+ - python: 3.5
+ env: TOXENV=py35-system SYSTEM_TEST=1
+ - python: 2.7
+ env: TOXENV=py27-system SYSTEM_TEST=1
... |
cisagov__manage.get.gov-2071 | Update to V3 of django audit logs
### Issue description
V3 of Django audit logs has been released which includes accessing values as a dictionary instead of json objects. That said, it is also a breaking change that doesn't work without other code changes.
### Acceptance criteria
- [ ] our django audit logs i... | [
{
"content": "\"\"\"\nDjango settings for .gov registrar project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/4.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/4.0/ref/settings/\n\nIF you'd like to see all of these set... | [
{
"content": "\"\"\"\nDjango settings for .gov registrar project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/4.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/4.0/ref/settings/\n\nIF you'd like to see all of these set... | diff --git a/src/Pipfile b/src/Pipfile
index 1565af79b..5bab9cc95 100644
--- a/src/Pipfile
+++ b/src/Pipfile
@@ -9,7 +9,7 @@ cfenv = "*"
django-cors-headers = "*"
pycryptodomex = "*"
django-allow-cidr = "*"
-django-auditlog = "2.3.0"
+django-auditlog = "*"
django-csp = "*"
environs = {extras=["django"]}
Faker = "... |
ivy-llc__ivy-22098 | reshape_
| [
{
"content": "# global\nimport ivy\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\nfrom ivy.func_wrapper import (\n with_unsupported_dtypes,\n with_supported_dtypes,\n with_supported_device_and_dtypes,\n)\n\n\n@to_ivy_arrays_and_back\ndef reshape(x, shape):\... | [
{
"content": "# global\nimport ivy\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\nfrom ivy.func_wrapper import (\n with_unsupported_dtypes,\n with_supported_dtypes,\n with_supported_device_and_dtypes,\n)\n\n\n@to_ivy_arrays_and_back\ndef reshape(x, shape):\... | diff --git a/ivy/functional/frontends/paddle/tensor/manipulation.py b/ivy/functional/frontends/paddle/tensor/manipulation.py
index 7d0fa71ebe270..2b5df8acacd6b 100644
--- a/ivy/functional/frontends/paddle/tensor/manipulation.py
+++ b/ivy/functional/frontends/paddle/tensor/manipulation.py
@@ -15,6 +15,17 @@ def reshape(... |
uclapi__uclapi-556 | Move to WebPack
Building the frontend is annoying, and updating dependencies in a way that lets us test the updates is nothing short of tedious.
WebPack with proper bounds on the minor version of each component and dependency should help us stay in line and keep up to date with the frontend code.
| [
{
"content": "\"\"\"\nDjango settings for uclapi project.\n\nGenerated by 'django-admin startproject' using Django 1.10.4.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.10/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/... | [
{
"content": "\"\"\"\nDjango settings for uclapi project.\n\nGenerated by 'django-admin startproject' using Django 1.10.4.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.10/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/... | diff --git a/backend/uclapi/dashboard/templates/agreement.html b/backend/uclapi/dashboard/templates/agreement.html
index 13f8678f1..59d9f3833 100644
--- a/backend/uclapi/dashboard/templates/agreement.html
+++ b/backend/uclapi/dashboard/templates/agreement.html
@@ -9,7 +9,6 @@
<link rel="stylesheet" href="https://unp... |
wagtail__wagtail-4812 | manage.py migrate fails on StreamFields with '' as default value
### Issue Summary
If a StreamField with `blank=False` is added to a model with existing instances, and the empty string is specified as the one-off default value when running `./manage.py makemigrations`, the subsequent `./manage.py migrate` fails with... | [
{
"content": "import collections\nimport uuid\n\nfrom django import forms\nfrom django.contrib.staticfiles.templatetags.staticfiles import static\nfrom django.core.exceptions import NON_FIELD_ERRORS, ValidationError\nfrom django.forms.utils import ErrorList\nfrom django.template.loader import render_to_string\n... | [
{
"content": "import collections\nimport uuid\n\nfrom django import forms\nfrom django.contrib.staticfiles.templatetags.staticfiles import static\nfrom django.core.exceptions import NON_FIELD_ERRORS, ValidationError\nfrom django.forms.utils import ErrorList\nfrom django.template.loader import render_to_string\n... | diff --git a/wagtail/core/blocks/stream_block.py b/wagtail/core/blocks/stream_block.py
index d47f827e335a..7deeff408dc2 100644
--- a/wagtail/core/blocks/stream_block.py
+++ b/wagtail/core/blocks/stream_block.py
@@ -243,8 +243,9 @@ def to_python(self, value):
], is_lazy=True)
def get_prep_value(self, val... |
SigmaHQ__sigma-4667 | `documentations/tools/sigma-logsource-checker.py` is broken
When you run it on the `rules` directory. It tries to part `README.md` as a yml files and breaks in line 119.
```
Traceback (most recent call last):
File "/Users/fbreedijk/repos/sigma/documentation/tools/sigma-logsource-checker.py", line 362, in <module... | [
{
"content": "# Author: Nasreddine Bencherchali (@nas_bench) / Nextron Systems\n\n__version__ = \"0.1.0\"\n\nfrom time import sleep\nimport yaml\nimport os\nimport argparse\nfrom colorama import init\nfrom colorama import Fore\nimport collections\nimport xml.etree.ElementTree as ET\nfrom collections import defa... | [
{
"content": "# Author: Nasreddine Bencherchali (@nas_bench) / Nextron Systems\n\n__version__ = \"0.1.0\"\n\nfrom time import sleep\nimport yaml\nimport os\nimport argparse\nfrom colorama import init\nfrom colorama import Fore\nimport collections\nimport xml.etree.ElementTree as ET\nfrom collections import defa... | diff --git a/documentation/tools/sigma-logsource-checker.py b/documentation/tools/sigma-logsource-checker.py
index 440ec5217ba..df63727286e 100644
--- a/documentation/tools/sigma-logsource-checker.py
+++ b/documentation/tools/sigma-logsource-checker.py
@@ -111,7 +111,8 @@
def yield_next_rule_file_path(path_to_rules: s... |
arviz-devs__arviz-1636 | invert the order of links in sampling wrapper docstrings
https://arviz-devs.github.io/arviz/api/generated/arviz.SamplingWrapper.html#arviz.SamplingWrapper has a link to the api section corresponding to all the wrappers and a link to the user guide section about the wrappers. The temptation to click on the first link an... | [
{
"content": "\"\"\"Base class for sampling wrappers.\"\"\"\nfrom xarray import apply_ufunc\n\n# from ..data import InferenceData\nfrom ..stats import wrap_xarray_ufunc as _wrap_xarray_ufunc\n\n\nclass SamplingWrapper:\n \"\"\"Class wrapping sampling routines for its usage via ArviZ.\n\n Using a common cl... | [
{
"content": "\"\"\"Base class for sampling wrappers.\"\"\"\nfrom xarray import apply_ufunc\n\n# from ..data import InferenceData\nfrom ..stats import wrap_xarray_ufunc as _wrap_xarray_ufunc\n\n\nclass SamplingWrapper:\n \"\"\"Class wrapping sampling routines for its usage via ArviZ.\n\n Using a common cl... | diff --git a/arviz/wrappers/base.py b/arviz/wrappers/base.py
index 682221990f..edefac64d9 100644
--- a/arviz/wrappers/base.py
+++ b/arviz/wrappers/base.py
@@ -12,8 +12,8 @@ class SamplingWrapper:
functions requiring refitting like Leave Future Out or Simulation Based Calibration can be
performed from ArviZ.
... |
akvo__akvo-rsr-2743 | iati_status query parameter is still used on the site
The query parameter for status was changed from `iati_status` to `status` in #2681. But, the `iati_status` filter is being used in a bunch of places (for example on an organisation page - the link to projects).
`iati_status` parameter needs to be brought back, a... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nAkvo RSR is covered by the GNU Affero General Public License.\n\nSee more details in the license.txt file located at the root folder of the\nAkvo RSR module. For additional details on the GNU license please see\n< http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nAkvo RSR is covered by the GNU Affero General Public License.\n\nSee more details in the license.txt file located at the root folder of the\nAkvo RSR module. For additional details on the GNU license please see\n< http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\... | diff --git a/akvo/rsr/static/scripts-src/project-directory-filters.js b/akvo/rsr/static/scripts-src/project-directory-filters.js
index 57dd5a746d..a2ac0b50f4 100644
--- a/akvo/rsr/static/scripts-src/project-directory-filters.js
+++ b/akvo/rsr/static/scripts-src/project-directory-filters.js
@@ -66,7 +66,6 @@ var FilterF... |
open-telemetry__opentelemetry-python-contrib-2527 | Confluent kafka Producer doesn't return expected values from poll() and flush() methods when instrumented by ConfluentKafkaInstrumentor().instrument_producer()
**Describe your environment**
```
python 3.9
confluent-kafka==2.3.0
opentelemetry-instrumentation-confluent-kafka==0.45b0
opentelemetry-semantic-conventio... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6876e2cf9e..c9cafd2dc1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Breaking changes
+- Add return statement to Confluent kafka Producer poll() and flush() calls when ... |
OpenNMT__OpenNMT-py-1805 | Logger is not passed to translator
When building the translator, there is a logger created but not passed to the translator:
https://github.com/OpenNMT/OpenNMT-py/blob/35cf4f0ae774a4aa500318879a1a4d53408ac129/onmt/bin/translate.py#L18
This results in a log file that only contains a single entry:
https://github.com/O... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nfrom onmt.utils.logging import init_logger\nfrom onmt.utils.misc import split_corpus\nfrom onmt.translate.translator import build_translator\n\nimport onmt.opts as opts\nfrom onmt.utils.parse import Argume... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\nfrom onmt.utils.logging import init_logger\nfrom onmt.utils.misc import split_corpus\nfrom onmt.translate.translator import build_translator\n\nimport onmt.opts as opts\nfrom onmt.utils.parse import Argume... | diff --git a/onmt/bin/translate.py b/onmt/bin/translate.py
index dd07368210..f81742ca02 100755
--- a/onmt/bin/translate.py
+++ b/onmt/bin/translate.py
@@ -15,7 +15,7 @@ def translate(opt):
ArgumentParser.validate_translate_opts(opt)
logger = init_logger(opt.log_file)
- translator = build_translator(opt, ... |
interlegis__sapl-1948 | Erro na inclusão de Nome de Comissão acima de 50 caracteres
Ao inserir um Nome de Comissão acima de 50 caracteres aparece a mensagem Error 500. Mas na edição o sistema aceita.
grato
| [
{
"content": "from django import forms\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ValidationError\nfrom django.db import transaction\nfrom django.db.models import Q\nfrom django.forms import ModelForm\nfrom django.utils.translation import ugettext_lazy as _\n... | [
{
"content": "from django import forms\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ValidationError\nfrom django.db import transaction\nfrom django.db.models import Q\nfrom django.forms import ModelForm\nfrom django.utils.translation import ugettext_lazy as _\n... | diff --git a/sapl/comissoes/forms.py b/sapl/comissoes/forms.py
index 3576873b7..05a0a97b9 100644
--- a/sapl/comissoes/forms.py
+++ b/sapl/comissoes/forms.py
@@ -241,6 +241,9 @@ def clean(self):
if not self.is_valid():
return self.cleaned_data
+ if len(self.cleaned_data['nome']) > 50:
+ ... |
joke2k__faker-995 | pyfloat producing values above max_value
* Faker version: 2.0.1
* OS: Windows 10
Calling `pyfloat` with the `max_value` set can produce values above `max_value` leading to issues.
### Steps to reproduce
Run my example code below.
### Expected behavior
Given my following example, I would expect to _only_... | [
{
"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\n\nfrom decimal import Decimal\nimport sys\n\nimport six\n\nfrom .. import BaseProvider\n\n\nclass Provider(BaseProvider):\n def pybool(self):\n return self.random_int(0, 1) == 1\n\n def pystr(self, min_chars=None, max_chars=20... | [
{
"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\n\nfrom decimal import Decimal\nimport sys\n\nimport six\n\nfrom .. import BaseProvider\n\n\nclass Provider(BaseProvider):\n def pybool(self):\n return self.random_int(0, 1) == 1\n\n def pystr(self, min_chars=None, max_chars=20... | diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py
index 7b1bd6f850..eb8a70a609 100644
--- a/faker/providers/python/__init__.py
+++ b/faker/providers/python/__init__.py
@@ -60,7 +60,7 @@ def pyfloat(self, left_digits=None, right_digits=None, positive=False,
if max_value is... |
locustio__locust-1269 | Fix simple typo: betwen -> between
# Issue Type
[x] Bug (Typo)
# Steps to Replicate
1. Examine locust/core.py.
2. Search for `betwen`.
# Expected Behaviour
1. Should read `between`.
| [
{
"content": "import logging\nimport random\nimport sys\nimport traceback\nfrom time import time\n\nimport gevent\nimport gevent.lock\n\nfrom gevent import GreenletExit, monkey\n\n# The monkey patching must run before requests is imported, or else \n# we'll get an infinite recursion when doing SSL/HTTPS request... | [
{
"content": "import logging\nimport random\nimport sys\nimport traceback\nfrom time import time\n\nimport gevent\nimport gevent.lock\n\nfrom gevent import GreenletExit, monkey\n\n# The monkey patching must run before requests is imported, or else \n# we'll get an infinite recursion when doing SSL/HTTPS request... | diff --git a/locust/core.py b/locust/core.py
index b28c93b5f4..1ed58279bd 100644
--- a/locust/core.py
+++ b/locust/core.py
@@ -314,7 +314,7 @@ class ForumPage(TaskSet):
wait_function = None
"""
Deprecated: Use wait_time instead.
- Function used to calculate waiting time betwen the execution of locust ... |
digitalfabrik__integreat-cms-205 | Pages: Separate page and translation attributes in page form
At the moment, it is not clear which attributes of the page form refer to the `Page` object and which only handle `PageTranslation` objects (from a user's point of view). Probably, we should separate these two sections from each other.
This is part of #98.... | [
{
"content": "\"\"\"\nDatabase model representing an autonomous authority\n\"\"\"\nfrom django.contrib.postgres.fields import ArrayField\nfrom django.db import models\nfrom django.http import Http404\nfrom django.utils import timezone\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass Region(mo... | [
{
"content": "\"\"\"\nDatabase model representing an autonomous authority\n\"\"\"\nfrom django.contrib.postgres.fields import ArrayField\nfrom django.db import models\nfrom django.http import Http404\nfrom django.utils import timezone\nfrom django.utils.translation import ugettext_lazy as _\n\n\nclass Region(mo... | diff --git a/backend/cms/locale/de/LC_MESSAGES/django.po b/backend/cms/locale/de/LC_MESSAGES/django.po
index e1d4ef342e..8c98a784eb 100644
--- a/backend/cms/locale/de/LC_MESSAGES/django.po
+++ b/backend/cms/locale/de/LC_MESSAGES/django.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 1.0\n"
"Report-Msgid-B... |
mkdocs__mkdocs-409 | problem with config in command line
If I run the follow command in current development version:
mkdocs serve --config=/home/lf/git/mywork/bb/bog/mkdocs.yml
it will raise error:
```
Config file 'mkdocs.yml' does not exist.
```
But if I run the same command use version 0.11.1
Everything is OK
Is there any thing wr... | [
{
"content": "# coding: utf-8\n\nfrom mkdocs import utils\nfrom mkdocs.compat import urlparse\nfrom mkdocs.exceptions import ConfigurationError\n\nimport logging\nimport os\nimport yaml\n\nlog = logging.getLogger(__name__)\n\nDEFAULT_CONFIG = {\n 'site_name': None,\n 'pages': None,\n\n 'site_url': None... | [
{
"content": "# coding: utf-8\n\nfrom mkdocs import utils\nfrom mkdocs.compat import urlparse\nfrom mkdocs.exceptions import ConfigurationError\n\nimport logging\nimport os\nimport yaml\n\nlog = logging.getLogger(__name__)\n\nDEFAULT_CONFIG = {\n 'site_name': None,\n 'pages': None,\n\n 'site_url': None... | diff --git a/mkdocs/config.py b/mkdocs/config.py
index 2b6dcebe45..1cd56183e5 100644
--- a/mkdocs/config.py
+++ b/mkdocs/config.py
@@ -76,7 +76,7 @@
def load_config(filename='mkdocs.yml', options=None):
options = options or {}
if 'config' in options:
- filename = options.pop('config')
+ filenam... |
sktime__sktime-1445 | [DOC] Broken links on 'Estimator Overview' page
#### Describe the issue linked to the documentation
There was a new doc page added in recent update called 'Estimator Overview'.
`https://www.sktime.org/en/latest/estimator_overview.html`
 Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport logging\nimport math\nimport time\nfrom typing import Any, Optional, Sequence\n\nimport networkx as nx\nimport numpy as np\nimport umap\nfrom sklearn.manifold import TSNE\n\nfrom graspologic.types import Dict, List... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport logging\nimport math\nimport time\nfrom typing import Any, Optional, Sequence\n\nimport networkx as nx\nimport numpy as np\nimport umap\nfrom sklearn.manifold import TSNE\n\nfrom graspologic.types import Dict, List... | diff --git a/graspologic/layouts/auto.py b/graspologic/layouts/auto.py
index dab78ba27..2aa4d7323 100644
--- a/graspologic/layouts/auto.py
+++ b/graspologic/layouts/auto.py
@@ -227,7 +227,7 @@ def _approximate_prune(graph: nx.Graph, max_edges_to_keep: int = 1000000) -> nx.
if counts >= max_edges_to_keep:
... |
pytorch__vision-531 | Dead link in ToPILImage
- master branch
See the code
https://github.com/pytorch/vision/blob/50b2f910490a731c4cd50db5813b291860f02237/torchvision/transforms/transforms.py#L96
http://pillow.readthedocs.io/en/3.4.x/handbook/concepts.html#modes
is not a valid address any longer.
| [
{
"content": "from __future__ import division\nimport torch\nimport math\nimport random\nfrom PIL import Image, ImageOps, ImageEnhance\ntry:\n import accimage\nexcept ImportError:\n accimage = None\nimport numpy as np\nimport numbers\nimport types\nimport collections\nimport warnings\n\nfrom . import func... | [
{
"content": "from __future__ import division\nimport torch\nimport math\nimport random\nfrom PIL import Image, ImageOps, ImageEnhance\ntry:\n import accimage\nexcept ImportError:\n accimage = None\nimport numpy as np\nimport numbers\nimport types\nimport collections\nimport warnings\n\nfrom . import func... | diff --git a/torchvision/transforms/transforms.py b/torchvision/transforms/transforms.py
index 698dbdfb9d2..fcba9dcd6bd 100644
--- a/torchvision/transforms/transforms.py
+++ b/torchvision/transforms/transforms.py
@@ -93,7 +93,7 @@ class ToPILImage(object):
3. If the input has 1 channel, the ``mode`` is det... |
encode__django-rest-framework-6380 | URLPathVersioning: Use Default Version when It's None (Not Invalid)
## Checklist
- [x] I have verified that that issue exists against the `master` branch of Django REST framework.
- [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [x] This is not a usage questio... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom rest_framework import exceptions\nfrom rest_framework.compat import unicode_http_header\nfrom rest_framework.reverse import _reverse\nfrom rest_framework.setting... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom rest_framework import exceptions\nfrom rest_framework.compat import unicode_http_header\nfrom rest_framework.reverse import _reverse\nfrom rest_framework.setting... | diff --git a/rest_framework/versioning.py b/rest_framework/versioning.py
index 5c9a7ade12..206ff6c2ec 100644
--- a/rest_framework/versioning.py
+++ b/rest_framework/versioning.py
@@ -75,6 +75,9 @@ class URLPathVersioning(BaseVersioning):
def determine_version(self, request, *args, **kwargs):
version = k... |
svthalia__concrexit-2526 | Vacancies without partner page on homepage lead to 404 errors
### Describe the bug
The vacancy view on the homepage leads to a 404 for vacancies without partner pages, as it tries to go to that page anyway.
### How to reproduce
Steps to reproduce the behaviour:
1. Create an inactive partner
2. Create a vacancy w... | [
{
"content": "from django import template\nfrom django.urls import reverse\n\nfrom partners.models import Vacancy\n\nregister = template.Library()\n\n\n@register.inclusion_tag(\"partners/frontpage_vacancies.html\")\ndef render_frontpage_vacancies():\n vacancies = []\n\n for vacancy in Vacancy.objects.orde... | [
{
"content": "from django import template\nfrom django.urls import reverse\n\nfrom partners.models import Vacancy\n\nregister = template.Library()\n\n\n@register.inclusion_tag(\"partners/frontpage_vacancies.html\")\ndef render_frontpage_vacancies():\n vacancies = []\n\n for vacancy in Vacancy.objects.orde... | diff --git a/website/partners/templatetags/frontpage_vacancies.py b/website/partners/templatetags/frontpage_vacancies.py
index 12a1b3411..459b3c6d1 100644
--- a/website/partners/templatetags/frontpage_vacancies.py
+++ b/website/partners/templatetags/frontpage_vacancies.py
@@ -12,7 +12,7 @@ def render_frontpage_vacancie... |
pydantic__pydantic-2119 | validate_assignment with side effect validators
# Bug
Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
```
pydantic version: 1.7.2
pydantic compiled: True
install path: /home/arthur/Documents/odmantic/.venv/lib/python3.8/site-packages... | [
{
"content": "import json\nimport sys\nimport warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n Dic... | [
{
"content": "import json\nimport sys\nimport warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n Dic... | diff --git a/changes/2116-PrettyWood.md b/changes/2116-PrettyWood.md
new file mode 100644
index 00000000000..d2c81cbf7f4
--- /dev/null
+++ b/changes/2116-PrettyWood.md
@@ -0,0 +1 @@
+fix: update all modified field values in `root_validator` when `validate_assignment` is on
\ No newline at end of file
diff --git a/pydan... |
Lightning-AI__pytorch-lightning-3741 | Metatags are saved over and over in TensorBoardLogger when logging metrics
Is it okay that the metatags are saved every time metrics are logged in `TensorBoardLogger`? I find that it slows down training a bit.
[I found a related discussion.](https://github.com/PyTorchLightning/pytorch-lightning/pull/687/files#r36701... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | diff --git a/pytorch_lightning/loggers/tensorboard.py b/pytorch_lightning/loggers/tensorboard.py
index 24ff137a51cc2..81e847d7827c9 100644
--- a/pytorch_lightning/loggers/tensorboard.py
+++ b/pytorch_lightning/loggers/tensorboard.py
@@ -215,8 +215,9 @@ def save(self) -> None:
# prepare the file path
h... |
pulp__pulpcore-5484 | Replication assumes every plugin supports Publications
The ```Replicator``` class, which is being subclassed inside plugins to support the replication feature, assumes that every plugin supports publications as it tries to access ```upstream_distribution["publication"]``` inside one of its methods (for some plugins, th... | [
{
"content": "from django.conf import settings\nfrom django.db.models import Model\nimport logging\n\nfrom pulp_glue.common.context import PulpContext\nfrom pulpcore.tasking.tasks import dispatch\nfrom pulpcore.app.tasks.base import (\n general_update,\n general_create,\n general_multi_delete,\n)\nfrom... | [
{
"content": "from django.conf import settings\nfrom django.db.models import Model\nimport logging\n\nfrom pulp_glue.common.context import PulpContext\nfrom pulpcore.tasking.tasks import dispatch\nfrom pulpcore.app.tasks.base import (\n general_update,\n general_create,\n general_multi_delete,\n)\nfrom... | diff --git a/CHANGES/5464.bugfix b/CHANGES/5464.bugfix
new file mode 100644
index 0000000000..cc4669cf25
--- /dev/null
+++ b/CHANGES/5464.bugfix
@@ -0,0 +1,2 @@
+Pulpcore no longer assumes that every plugin implementing the Replication feature supports
+Publications.
diff --git a/pulpcore/app/replica.py b/pulpcore/app/... |
tobymao__sqlglot-1468 | support division in a comment
`select 1 /*/2 */` will raise error, while it is valid query.
As far as I understend issue is that combination /*/ is treated like start and end of comment, while it is not
| [
{
"content": "from __future__ import annotations\n\nimport typing as t\nfrom enum import auto\n\nfrom sqlglot.helper import AutoName\nfrom sqlglot.trie import in_trie, new_trie\n\n\nclass TokenType(AutoName):\n L_PAREN = auto()\n R_PAREN = auto()\n L_BRACKET = auto()\n R_BRACKET = auto()\n L_BRAC... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\nfrom enum import auto\n\nfrom sqlglot.helper import AutoName\nfrom sqlglot.trie import in_trie, new_trie\n\n\nclass TokenType(AutoName):\n L_PAREN = auto()\n R_PAREN = auto()\n L_BRACKET = auto()\n R_BRACKET = auto()\n L_BRAC... | diff --git a/sqlglot/tokens.py b/sqlglot/tokens.py
index 81992f283f..ae565ee068 100644
--- a/sqlglot/tokens.py
+++ b/sqlglot/tokens.py
@@ -953,8 +953,10 @@ def _scan_comment(self, comment_start: str) -> bool:
comment_end = self._COMMENTS[comment_start] # type: ignore
if comment_end:
- co... |
mozilla__telemetry-analysis-service-1493 | Email server shutdown warning again after extending cluster
Hey, would it be possible to send another hour warning email if a user extends the cluster life?
| [
{
"content": "# 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\n# file, you can obtain one at http://mozilla.org/MPL/2.0/.\nimport math\nfrom datetime import timedelta\n\nfrom autorepr import autorepr, autostr\nfrom djan... | [
{
"content": "# 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\n# file, you can obtain one at http://mozilla.org/MPL/2.0/.\nimport math\nfrom datetime import timedelta\n\nfrom autorepr import autorepr, autostr\nfrom djan... | diff --git a/atmo/clusters/models.py b/atmo/clusters/models.py
index 8ef5e3ff..cb13c8ac 100644
--- a/atmo/clusters/models.py
+++ b/atmo/clusters/models.py
@@ -360,6 +360,7 @@ def extend(self, hours):
"""Extend the cluster lifetime by the given number of hours."""
self.expires_at = models.F('expires_at... |
scikit-image__scikit-image-4800 | Optimize gallery images with optipng
## Purpose
This issue follows the PR #4613, the[ issue reported to sphinx-gallery](https://github.com/sphinx-gallery/sphinx-gallery/issues/655) and the addition of optipng proposed by @larsoner in [this PR](https://github.com/sphinx-gallery/sphinx-gallery/pull/656).
I would li... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# skimage documentation build configuration file, created by\n# sphinx-quickstart on Sat Aug 22 13:00:30 2009.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# skimage documentation build configuration file, created by\n# sphinx-quickstart on Sat Aug 22 13:00:30 2009.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\... | diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml
index f1985443e50..40870fff327 100644
--- a/.github/workflows/build-docs.yml
+++ b/.github/workflows/build-docs.yml
@@ -18,6 +18,7 @@ jobs:
python-version: 3.7
- name: Install dependencies
run: |
+ sudo ... |
encode__django-rest-framework-7641 | OpenAPI Schema: rendering to json fails for timedelta
## Checklist
- [x] I have verified that that issue exists against the `master` branch of Django REST framework.
- [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [x] This is not a usage question. (Those shou... | [
{
"content": "\"\"\"\nRenderers are used to serialize a response into specific media types.\n\nThey give us a generic way of being able to handle various media types\non the response, such as JSON encoded data or HTML output.\n\nREST framework also provides an HTML renderer that renders the browsable API.\n\"\"... | [
{
"content": "\"\"\"\nRenderers are used to serialize a response into specific media types.\n\nThey give us a generic way of being able to handle various media types\non the response, such as JSON encoded data or HTML output.\n\nREST framework also provides an HTML renderer that renders the browsable API.\n\"\"... | diff --git a/rest_framework/renderers.py b/rest_framework/renderers.py
index 3c4be8aeb0..5b7ba8a8c8 100644
--- a/rest_framework/renderers.py
+++ b/rest_framework/renderers.py
@@ -1063,7 +1063,8 @@ def ignore_aliases(self, data):
class JSONOpenAPIRenderer(BaseRenderer):
media_type = 'application/vnd.oai.openapi+js... |
opensearch-project__opensearch-build-1829 | [RPM M1] Add a new block to call the generation code for RPM
Tasks | Estimate | Status | Notes | Dependencies
-- | -- | -- | -- | --
The generation code should pull the artifacts from the build workflow to a temporary location | 1 | Complete | | Build workflow must provide usable artifacts
The code will call exist... | [
{
"content": "# SPDX-License-Identifier: Apache-2.0\n#\n# The OpenSearch Contributors require contributions made to\n# this file be licensed under the Apache-2.0 license or a\n# compatible open source license.\n\nimport logging\nimport os\nimport shutil\nimport subprocess\n\nfrom manifests.build_manifest import... | [
{
"content": "# SPDX-License-Identifier: Apache-2.0\n#\n# The OpenSearch Contributors require contributions made to\n# this file be licensed under the Apache-2.0 license or a\n# compatible open source license.\n\nimport logging\nimport os\nimport shutil\nimport subprocess\n\nfrom manifests.build_manifest import... | diff --git a/src/assemble_workflow/bundle_rpm.py b/src/assemble_workflow/bundle_rpm.py
index d89959b381..a2b1c99e5e 100644
--- a/src/assemble_workflow/bundle_rpm.py
+++ b/src/assemble_workflow/bundle_rpm.py
@@ -99,7 +99,7 @@ def build(self, name: str, dest: str, archive_path: str, build_cls: BuildManifes
... |
nextcloud__appstore-186 | Email confirmation email should be improved
I couldn't find the text for the email, so I suspect it's from some library.
Here is the content:
---
Hello from **apps.nextcloud.com**!
You're receiving this e-mail because user oparoz at apps.nextcloud.com has given **yours as an e-mail address to connect their account*... | [
{
"content": "from allauth.socialaccount.models import SocialApp\nfrom django.contrib.sites.models import Site\nfrom django.core.management import BaseCommand\n\n\nclass Command(BaseCommand):\n help = ('Updates the first site with the given domain and creates or '\n 'updates the GitHub social logi... | [
{
"content": "from allauth.socialaccount.models import SocialApp\nfrom django.contrib.sites.models import Site\nfrom django.core.management import BaseCommand\n\n\nclass Command(BaseCommand):\n help = ('Updates the first site with the given domain and creates or '\n 'updates the GitHub social logi... | diff --git a/nextcloudappstore/core/management/commands/setupsocial.py b/nextcloudappstore/core/management/commands/setupsocial.py
index dbe69d2b771..e4c1834f8f5 100644
--- a/nextcloudappstore/core/management/commands/setupsocial.py
+++ b/nextcloudappstore/core/management/commands/setupsocial.py
@@ -21,7 +21,7 @@ def h... |
magenta__magenta-1701 | Error training latest version of MusicVAE
#### Steps to reproduce the issue
- Create new magenta environment as well as cloning magenta repo:
`curl https://raw.githubusercontent.com/tensorflow/magenta/master/magenta/tools/magenta-install.sh > /tmp/magenta-install.sh`
`bash /tmp/magenta-install.sh`
`git clone http... | [
{
"content": "# Copyright 2020 The Magenta Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright 2020 The Magenta Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/magenta/models/music_vae/music_vae_train.py b/magenta/models/music_vae/music_vae_train.py
index 4be644c15b..83a5ddcce4 100644
--- a/magenta/models/music_vae/music_vae_train.py
+++ b/magenta/models/music_vae/music_vae_train.py
@@ -120,7 +120,7 @@ def _trial_summary(hparams, examples_path, output_dir):
def ... |
Lightning-AI__pytorch-lightning-1193 | Wandb logger doesn't upload saved model checkpoint for final epoch
## 🐛 Bug
When training a model on the TPU and using the wandb logger, the checkpoint for the last epoch trained doesn't get uploaded to wandb.
### To Reproduce
Colab notebook: https://colab.research.google.com/drive/1oPaRWGZcz6YEol012xFADN42LV... | [
{
"content": "r\"\"\"\n\n.. _wandb:\n\nWandbLogger\n-------------\n\"\"\"\nimport os\nfrom argparse import Namespace\nfrom typing import Optional, List, Dict, Union, Any\n\nimport torch.nn as nn\n\ntry:\n import wandb\n from wandb.wandb_run import Run\nexcept ImportError: # pragma: no-cover\n raise Im... | [
{
"content": "r\"\"\"\n\n.. _wandb:\n\nWandbLogger\n-------------\n\"\"\"\nimport os\nfrom argparse import Namespace\nfrom typing import Optional, List, Dict, Union, Any\n\nimport torch.nn as nn\n\ntry:\n import wandb\n from wandb.wandb_run import Run\nexcept ImportError: # pragma: no-cover\n raise Im... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e2739ed8b3f02..fb7535fb5e21d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,6 +32,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
### Removed
- Removed duplicated module `pytorch_lightning.utilities.arg_parse` for loading CLI a... |
vyperlang__vyper-618 | "in" list doesn't check whether variable type matches the list subtype
### What's your issue about?
```
@public
def testin(x: address) -> bool:
y = 1
s = [1, 2, 3, 4]
if x in s:
return True
return False
```
This program is allowed by the Viper compiler. However the type of the varialbe... | [
{
"content": "import ast\n\nfrom viper.exceptions import (\n StructureException,\n TypeMismatchException,\n VariableDeclarationException,\n InvalidLiteralException,\n NonPayableViolationException,\n)\nfrom .parser_utils import LLLnode\nfrom .parser_utils import (\n getpos,\n unwrap_location... | [
{
"content": "import ast\n\nfrom viper.exceptions import (\n StructureException,\n TypeMismatchException,\n VariableDeclarationException,\n InvalidLiteralException,\n NonPayableViolationException,\n)\nfrom .parser_utils import LLLnode\nfrom .parser_utils import (\n getpos,\n unwrap_location... | diff --git a/tests/parser/features/iteration/test_range_in.py b/tests/parser/features/iteration/test_range_in.py
index 2948c6164d..f77f6f9a97 100644
--- a/tests/parser/features/iteration/test_range_in.py
+++ b/tests/parser/features/iteration/test_range_in.py
@@ -107,3 +107,15 @@ def is_owner() -> bool:
# Owner in ... |
qtile__qtile-3225 | widget.box does not close
Hi,
I'm running qtile on arch and after the latest update the widget.box does not close. It was working fine before the update.

 2020 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 the rights\n# to use, copy, mo... | [
{
"content": "# Copyright (c) 2020 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 the rights\n# to use, copy, mo... | diff --git a/libqtile/widget/widgetbox.py b/libqtile/widget/widgetbox.py
index 2f32182a59..5e8690f8e5 100644
--- a/libqtile/widget/widgetbox.py
+++ b/libqtile/widget/widgetbox.py
@@ -120,7 +120,7 @@ def toggle_widgets(self):
# are separate _Window instances.
# Systray unhides icons whe... |
encode__starlette-706 | WSGI mount error
When I mount a django application and try to access it
```
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "C:\Users\AberS\Documents\Coding\lexiang\lebu\.venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 375, in run_asgi
result = await app(self.s... | [
{
"content": "import asyncio\nimport io\nimport sys\nimport typing\n\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.types import Message, Receive, Scope, Send\n\n\ndef build_environ(scope: Scope, body: bytes) -> dict:\n \"\"\"\n Builds a scope and request body into a WSGI environ obj... | [
{
"content": "import asyncio\nimport io\nimport sys\nimport typing\n\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.types import Message, Receive, Scope, Send\n\n\ndef build_environ(scope: Scope, body: bytes) -> dict:\n \"\"\"\n Builds a scope and request body into a WSGI environ obj... | diff --git a/starlette/middleware/wsgi.py b/starlette/middleware/wsgi.py
index 2e72ef1ee..f0c69c8d6 100644
--- a/starlette/middleware/wsgi.py
+++ b/starlette/middleware/wsgi.py
@@ -120,7 +120,7 @@ def start_response(
status_code_string, _ = status.split(" ", 1)
status_code = int(status_code_st... |
wagtail__wagtail-9518 | Scheduled publishing overlay only opens on settings tab with custom settings_panels (4.1rc1)
### Issue Summary
In the (new) default wagtail setup the settings tab is not visible, but the `settings_panels` are still used for the `CommentPanel` and the `PublishingPanel`.
If you add custom panels to the `settings_pane... | [
{
"content": "import functools\nfrom warnings import warn\n\nfrom django import forms\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured\nfrom django.core.signals import setti... | [
{
"content": "import functools\nfrom warnings import warn\n\nfrom django import forms\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured\nfrom django.core.signals import setti... | diff --git a/client/scss/components/forms/_publishing.scss b/client/scss/components/forms/_publishing.scss
index 15df6cbc3c83..54ab5c719689 100644
--- a/client/scss/components/forms/_publishing.scss
+++ b/client/scss/components/forms/_publishing.scss
@@ -1,5 +1,5 @@
// Styles for the fields in the scheduled publishing... |
PennyLaneAI__pennylane-2266 | [BUG] decomposition of `RandomLayers` broken
Upon executing the documentation example of `qml.RandomLayers`,
```python
import pennylane as qml
import numpy as np
dev = qml.device("default.qubit", wires=2)
weights = [[0.1, -2.1, 1.4]]
@qml.qnode(dev)
def circuit1(weights):
qml.RandomLayers(weights=wei... | [
{
"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 d9dc6fb9860..e6e46402846 100644
--- a/doc/releases/changelog-dev.md
+++ b/doc/releases/changelog-dev.md
@@ -265,6 +265,9 @@
<h3>Bug fixes</h3>
+* The `qml.RandomLayers` template now decomposes when the weights are a list of lists.
+ ... |
spyder-ide__spyder-6303 | RuntimeError when interrupting kernel
## Description
**What steps will reproduce the problem?**
1.
2.
3.
**What is the expected output? What do you see instead?**
**Please provide any additional information below**
File "/Users/LZQ/anaconda3/lib/python3.6/site-packages/spyder/plugins/projects.py... | [
{
"content": "# -*- coding:utf-8 -*-\r\n#\r\n# Copyright © Spyder Project Contributors\r\n# Licensed under the terms of the MIT License\r\n# (see spyder/__init__.py for details)\r\n\r\n\"\"\"\r\nClient widget for the IPython Console\r\n\r\nThis is the widget used on all its tabs\r\n\"\"\"\r\n\r\n# Standard libr... | [
{
"content": "# -*- coding:utf-8 -*-\r\n#\r\n# Copyright © Spyder Project Contributors\r\n# Licensed under the terms of the MIT License\r\n# (see spyder/__init__.py for details)\r\n\r\n\"\"\"\r\nClient widget for the IPython Console\r\n\r\nThis is the widget used on all its tabs\r\n\"\"\"\r\n\r\n# Standard libr... | diff --git a/spyder/widgets/ipythonconsole/client.py b/spyder/widgets/ipythonconsole/client.py
index 8f7cca500c1..f4f288390d3 100644
--- a/spyder/widgets/ipythonconsole/client.py
+++ b/spyder/widgets/ipythonconsole/client.py
@@ -445,7 +445,12 @@ def shutdown(self):
def interrupt_kernel(self):
"""Inter... |
qutebrowser__qutebrowser-5049 | Disable Tab Title?
I think it's really annoying when hovering. With Firefox, I can disable it and even element titles inside webpages.
Thanks!
| [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2019 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2019 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/help/settings.asciidoc b/doc/help/settings.asciidoc
index fe86b577b14..d73979d335d 100644
--- a/doc/help/settings.asciidoc
+++ b/doc/help/settings.asciidoc
@@ -282,6 +282,7 @@
|<<tabs.title.alignment,tabs.title.alignment>>|Alignment of the text inside of tabs.
|<<tabs.title.format,tabs.title.format>>... |
encode__django-rest-framework-6613 | DjangoGuardianObjectPermissionsFilter Broken on django 1.11 with python 2.7
This line unconditionally disables django-guardian from being detected with python 2.7 but it should still work with older releases that don't meet the conditions in the comments:
https://github.com/encode/django-rest-framework/blob/29cbe574a3... | [
{
"content": "\"\"\"\nThe `compat` module provides support for backwards compatibility with older\nversions of Django/Python, and compatibility wrappers around optional packages.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport sys\n\nfrom django.conf import settings\nfrom django.core import validat... | [
{
"content": "\"\"\"\nThe `compat` module provides support for backwards compatibility with older\nversions of Django/Python, and compatibility wrappers around optional packages.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport sys\n\nfrom django.conf import settings\nfrom django.core import validat... | diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index 9422e6ad56..d61ca5dbba 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -168,7 +168,12 @@ def is_guardian_installed():
"""
django-guardian is optional and only imported if in INSTALLED_APPS.
"""
- if six.PY2:... |
ibis-project__ibis-5345 | feat: memtable() should support nullable pandas types
### What happened?
nullable dtypes like pd.Int64Dtype(). Probably fails with other ones too, but I haven't tested.
```python
import pandas as pd
import ibis
df = pd.DataFrame(
{
"x": pd.Series([1, 2, None], dtype=pd.Int64Dtype()),
}
)
i... | [
{
"content": "\"\"\"The pandas client implementation.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\n\nimport numpy as np\nimport pandas as pd\nimport toolz\nfrom dateutil.parser import parse as date_parse\nfrom pandas.api.types import CategoricalDtype, DatetimeTZDtype\n\nimport ibis.expr.datatypes... | [
{
"content": "\"\"\"The pandas client implementation.\"\"\"\n\nfrom __future__ import annotations\n\nimport json\n\nimport numpy as np\nimport pandas as pd\nimport toolz\nfrom dateutil.parser import parse as date_parse\nfrom pandas.api.types import CategoricalDtype, DatetimeTZDtype\n\nimport ibis.expr.datatypes... | diff --git a/ibis/backends/duckdb/tests/test_register.py b/ibis/backends/duckdb/tests/test_register.py
index 75b9d6c0e82d..d745b0185e56 100644
--- a/ibis/backends/duckdb/tests/test_register.py
+++ b/ibis/backends/duckdb/tests/test_register.py
@@ -2,6 +2,7 @@
import tempfile
from pathlib import Path
+import duckdb
... |
Lightning-AI__pytorch-lightning-3534 | overfit_batches doesn't work
When I try to use overfit_batches:
https://pytorch-lightning.readthedocs.io/en/latest/debugging.html#make-model-overfit-on-subset-of-data
```
trainer = Trainer(gpus=num_gpus, max_epochs=config.epochs, overfit_batches=0.01, logger=logger)
```
my code fails with:
```
trainer.fit(... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 884e0cbd453f6..139b9ccc1587f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -66,6 +66,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed `ModelCheckpoint` name formatting ([3164](https://github.com/PyTorchLightning/pytorch-ligh... |
ManimCommunity__manim-2576 | removing edges from Graph in an animatoin
## Description of bug / unexpected behavior
<!-- Add a clear and concise description of the problem you encountered. -->
If g is a Graph, calling g.animate.remove_edges(...) does not actually play an animation.
Instead, the edges will all be removed instantaneously.
## Ho... | [
{
"content": "\"\"\"Mobjects used to represent mathematical graphs (think graph theory, not plotting).\"\"\"\n\nfrom __future__ import annotations\n\n__all__ = [\n \"Graph\",\n]\n\nimport itertools as it\nfrom copy import copy\nfrom typing import Hashable, Iterable\n\nimport networkx as nx\nimport numpy as n... | [
{
"content": "\"\"\"Mobjects used to represent mathematical graphs (think graph theory, not plotting).\"\"\"\n\nfrom __future__ import annotations\n\n__all__ = [\n \"Graph\",\n]\n\nimport itertools as it\nfrom copy import copy\nfrom typing import Hashable, Iterable\n\nimport networkx as nx\nimport numpy as n... | diff --git a/manim/mobject/graph.py b/manim/mobject/graph.py
index 3bc11c7a36..7b73dda9f2 100644
--- a/manim/mobject/graph.py
+++ b/manim/mobject/graph.py
@@ -997,9 +997,7 @@ def _remove_edges_animation(self, *edges, anim_args=None):
animation = anim_args.pop("animation", Uncreate)
mobjects = self.r... |
conan-io__conan-center-index-14622 | [package] b2/4.9.3: Can't build with clang without g++
### Description
I'm trying to build b2 in Docker that doesn't have g++. It fails.
### Package and Environment Details
* Package Name/Version: **b2/4.9.3**
* Operating System+version: **Debian Bullseye**
* Compiler+version: **Debian clang version 11.0.1-2... | [
{
"content": "import os\nfrom contextlib import contextmanager\nimport conan.tools.files\nimport conan.tools.layout\nfrom conan import ConanFile\nfrom conan.errors import ConanInvalidConfiguration\nfrom six import StringIO\n\nrequired_conan_version = \">=1.47.0\"\n\n\nclass B2Conan(ConanFile):\n name = \"b2\... | [
{
"content": "import os\nfrom contextlib import contextmanager\nimport conan.tools.files\nimport conan.tools.layout\nfrom conan import ConanFile\nfrom conan.errors import ConanInvalidConfiguration\nfrom six import StringIO\n\nrequired_conan_version = \">=1.47.0\"\n\n\nclass B2Conan(ConanFile):\n name = \"b2\... | diff --git a/recipes/b2/portable/conanfile.py b/recipes/b2/portable/conanfile.py
index 5cc7b0cdfb0dc..c4123bff05281 100644
--- a/recipes/b2/portable/conanfile.py
+++ b/recipes/b2/portable/conanfile.py
@@ -141,6 +141,8 @@ def build(self):
self.output.info("Install..")
command = os.path.join(
... |
Mailu__Mailu-934 | CLI domain creation arguments bug
When creating a new domain using cli we have optional arguments that can be passed
```bash
$ docker-compose exec admin flask mailu domain --help
Usage: flask mailu domain [OPTIONS] DOMAIN_NAME
Create a domain
Options:
-u, --max-users TEXT
-a, --max-aliases TEXT
-q... | [
{
"content": "from mailu import models\n\nfrom flask import current_app as app\nfrom flask import cli as flask_cli\n\nimport flask\nimport os\nimport socket\nimport uuid\nimport click\n\n\ndb = models.db\n\n\n@click.group()\ndef mailu(cls=flask_cli.FlaskGroup):\n \"\"\" Mailu command line\n \"\"\"\n\n\n@m... | [
{
"content": "from mailu import models\n\nfrom flask import current_app as app\nfrom flask import cli as flask_cli\n\nimport flask\nimport os\nimport socket\nimport uuid\nimport click\n\n\ndb = models.db\n\n\n@click.group()\ndef mailu(cls=flask_cli.FlaskGroup):\n \"\"\" Mailu command line\n \"\"\"\n\n\n@m... | diff --git a/core/admin/mailu/manage.py b/core/admin/mailu/manage.py
index 3a8256ad7..ac60d2d5c 100644
--- a/core/admin/mailu/manage.py
+++ b/core/admin/mailu/manage.py
@@ -94,7 +94,8 @@ def user(localpart, domain_name, password, hash_scheme=None):
def domain(domain_name, max_users=-1, max_aliases=-1, max_quota_bytes=... |
svthalia__concrexit-1369 | Searching in photos api is broken
### Describe the bug
Searching in photos api is broken
### How to reproduce
Steps to reproduce the behaviour:
1. Go to https://thalia.nu/api/v1/photos/albums/?search=Test
### Expected behaviour
This should not crash.
| [
{
"content": "from rest_framework import permissions, filters\nfrom rest_framework.exceptions import PermissionDenied\nfrom rest_framework.mixins import CreateModelMixin, UpdateModelMixin\nfrom rest_framework.viewsets import ModelViewSet, GenericViewSet\n\nfrom photos import services\nfrom photos.api import ser... | [
{
"content": "from rest_framework import permissions, filters\nfrom rest_framework.exceptions import PermissionDenied\nfrom rest_framework.mixins import CreateModelMixin, UpdateModelMixin\nfrom rest_framework.viewsets import ModelViewSet, GenericViewSet\n\nfrom photos import services\nfrom photos.api import ser... | diff --git a/website/photos/api/viewsets.py b/website/photos/api/viewsets.py
index 810378c9f..265348185 100644
--- a/website/photos/api/viewsets.py
+++ b/website/photos/api/viewsets.py
@@ -14,7 +14,7 @@ class AlbumsViewSet(ModelViewSet):
permission_classes = (permissions.IsAuthenticated,)
queryset = Album.obj... |
systemd__mkosi-2315 | `sh` unavailable in sandbox on non `usr`-merged systems
mkosi's sandbox [mounts `/usr:/usr`](https://github.com/systemd/mkosi/blob/14b07c74d5b3a8b0f44d9a5c733f7902c7859417/mkosi/sandbox.py#L88) if no ToolsTree is specified. On NixOS, which is not usr-merged, this causes problems when programs have runtime dependencies ... | [
{
"content": "# SPDX-License-Identifier: LGPL-2.1+\nimport enum\nimport logging\nimport os\nimport uuid\nfrom collections.abc import Sequence\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom mkosi.types import PathString\nfrom mkosi.util import INVOKING_USER, flatten, one_zero\n\n\n# https://githu... | [
{
"content": "# SPDX-License-Identifier: LGPL-2.1+\nimport enum\nimport logging\nimport os\nimport uuid\nfrom collections.abc import Sequence\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom mkosi.types import PathString\nfrom mkosi.util import INVOKING_USER, flatten, one_zero\n\n\n# https://githu... | diff --git a/mkosi/sandbox.py b/mkosi/sandbox.py
index 6bb19addd..0e0625d47 100644
--- a/mkosi/sandbox.py
+++ b/mkosi/sandbox.py
@@ -137,6 +137,8 @@ def sandbox_cmd(
for d in ("bin", "sbin", "lib", "lib32", "lib64"):
if (p := tools / d).is_symlink():
cmdline += ["--symlink", p.readlink(), Pat... |
scipy__scipy-20569 | BUG: warning from `optimize.least_squares` for astropy with OpenBLAS 0.3.26-dev
### Describe your issue.
When running astropy's test suite locally I see one test behaving differently depending on
which version of scipy I have installed.
Namely, I get a warning with scipy 1.13.0, which doesn't appear with 1.12.0.
Sp... | [
{
"content": "import glob\nimport os\nimport platform\nimport sysconfig\nimport sys\nimport shutil\nimport tarfile\nimport textwrap\nimport time\nimport zipfile\n\nfrom tempfile import mkstemp, gettempdir\nfrom urllib.request import urlopen, Request\nfrom urllib.error import HTTPError\n\nOPENBLAS_V = '0.3.26.de... | [
{
"content": "import glob\nimport os\nimport platform\nimport sysconfig\nimport sys\nimport shutil\nimport tarfile\nimport textwrap\nimport time\nimport zipfile\n\nfrom tempfile import mkstemp, gettempdir\nfrom urllib.request import urlopen, Request\nfrom urllib.error import HTTPError\n\nOPENBLAS_V = '0.3.27'\n... | diff --git a/tools/openblas_support.py b/tools/openblas_support.py
index bdb42f3da230..37b60dd69e55 100644
--- a/tools/openblas_support.py
+++ b/tools/openblas_support.py
@@ -13,8 +13,8 @@
from urllib.request import urlopen, Request
from urllib.error import HTTPError
-OPENBLAS_V = '0.3.26.dev'
-OPENBLAS_LONG = 'v0.... |
sopel-irc__sopel-1875 | add ping/pong response to ping.py
### The problem
The default ping module doesn't include ping/pong despite it's name and I'd rather not replace it just for that (I could move it out of core hacks but why not upstream)!
### The solution
Add it, I will after I write this.
### Example
09:54:36 <+RhinosF1> .pin... | [
{
"content": "# coding=utf-8\n\"\"\"\nping.py - Sopel Ping Module\nCopyright 2008 (?), Sean B. Palmer, inamidst.com\n\nhttps://sopel.chat\n\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport random\n\nfrom sopel.module import priority, rule, thread\n\n\n@rule(r'(... | [
{
"content": "# coding=utf-8\n\"\"\"\nping.py - Sopel Ping Module\nCopyright 2008 (?), Sean B. Palmer, inamidst.com\n\nhttps://sopel.chat\n\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport random\n\nfrom sopel.module import commands, priority, rule, thread\n\n\... | diff --git a/sopel/modules/ping.py b/sopel/modules/ping.py
index 4e07c93bea..81584430fc 100644
--- a/sopel/modules/ping.py
+++ b/sopel/modules/ping.py
@@ -9,7 +9,7 @@
import random
-from sopel.module import priority, rule, thread
+from sopel.module import commands, priority, rule, thread
@rule(r'(?i)(hi|hello... |
sopel-irc__sopel-2174 | UTF-8 Check fails on windows in Powershell
### Description
The current version of sopel in pip (py3.9.6) and from git master both prompt this message upon running sopel even with a utf8 configuration:
> WARNING!!! You are running with a non-UTF8 locale environment variable (e.g. LC_ALL is set to "C"), which makes P... | [
{
"content": "# ASCII ONLY IN THIS FILE THOUGH!!!!!!!\n# Python does some stupid bullshit of respecting LC_ALL over the encoding on the\n# file, so in order to undo Python's ridiculous fucking idiocy, we have to have\n# our own check.\n\n# Copyright 2008, Sean B. Palmer, inamidst.com\n# Copyright 2012, Elsie Po... | [
{
"content": "# ASCII ONLY IN THIS FILE THOUGH!!!!!!!\n# Python does some stupid bullshit of respecting LC_ALL over the encoding on the\n# file, so in order to undo Python's ridiculous fucking idiocy, we have to have\n# our own check.\n\n# Copyright 2008, Sean B. Palmer, inamidst.com\n# Copyright 2012, Elsie Po... | diff --git a/sopel/__init__.py b/sopel/__init__.py
index 12ef61d824..9ea89829f5 100644
--- a/sopel/__init__.py
+++ b/sopel/__init__.py
@@ -34,7 +34,7 @@
]
loc = locale.getlocale()
-if not loc[1] or 'UTF-8' not in loc[1]:
+if not loc[1] or ('UTF-8' not in loc[1] and 'utf8' not in loc[1]):
print('WARNING!!! You ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.