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 ⌀ |
|---|---|---|---|---|
google__jax-7572 | script "examples/advi.py" throws "ValueError" exception
Run:
```python3 jax/examples/advi.py```
Output:
```
Optimizing variational parameters...
Iteration 0 lower bound 0.4957694113254547
Traceback (most recent call last):
File "jax/examples/advi.py", line 138, in <module>
callback(params, t)
File "ja... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/examples/advi.py b/examples/advi.py
index 1e8c13b653a0..468de63e1644 100644
--- a/examples/advi.py
+++ b/examples/advi.py
@@ -86,8 +86,8 @@ def objective(params, t):
ax = fig.add_subplot(111, frameon=False)
plt.ion()
plt.show(block=False)
- x_limits = [-2, 2]
- y_limits = [-4, 2]
+ ... |
Lightning-AI__pytorch-lightning-2962 | AttributeError: 'NoneType' object has no attribute 'best_model_path' when `checkpoint_callback` = False
## 🐛 Bug
Model does not complete training on TPU and error's out with error `AttributeError: 'NoneType' object has no attribute 'best_model_path'` when `checkpoint_callback=False`.
### To Reproduce
Steps to... | [
{
"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/accelerators/tpu_backend.py b/pytorch_lightning/accelerators/tpu_backend.py
index dbf13c34349c7..043c6b1e5ccb6 100644
--- a/pytorch_lightning/accelerators/tpu_backend.py
+++ b/pytorch_lightning/accelerators/tpu_backend.py
@@ -67,7 +67,8 @@ def teardown(self):
last_path = self.mp_... |
airctic__icevision-596 | Augmented (albumentations) BBox outside the range [0.0, 1.0]
## 🐛 Bug
**Describe the bug**
The error occur during training in this [Plantdoc notebook](https://colab.research.google.com/drive/1JFq-Do9JNLmjxf4gqqd0ow6_HLMZhr4D?usp=sharing):
`learn.fine_tune(20, 0.012, freeze_epochs=3)`
It occurs in:
```python
Fi... | [
{
"content": "__all__ = [\"open_img\", \"show_img\", \"plot_grid\", \"plot_grid_preds_actuals\"]\n\nfrom icevision.imports import *\n\n\ndef open_img(fn, gray=False):\n if not os.path.exists(fn):\n raise ValueError(f\"File {fn} does not exists\")\n color = cv2.COLOR_BGR2GRAY if gray else cv2.COLOR_... | [
{
"content": "__all__ = [\"open_img\", \"show_img\", \"plot_grid\", \"plot_grid_preds_actuals\"]\n\nfrom icevision.imports import *\n\n\ndef open_img(fn, gray=False):\n if not os.path.exists(fn):\n raise ValueError(f\"File {fn} does not exists\")\n color = cv2.COLOR_BGR2GRAY if gray else cv2.COLOR_... | diff --git a/icevision/utils/imageio.py b/icevision/utils/imageio.py
index 77bd97eb4..da81ece0c 100644
--- a/icevision/utils/imageio.py
+++ b/icevision/utils/imageio.py
@@ -7,7 +7,7 @@ def open_img(fn, gray=False):
if not os.path.exists(fn):
raise ValueError(f"File {fn} does not exists")
color = cv2.... |
wagtail__wagtail-10731 | {% page_header_buttons %} crashes when used due to typo in the first line
### Issue Summary
The `{% page_header_buttons %}` template tag from `wagtailadmin_tags` crashes when used.
### Steps to Reproduce
1. Put `{% page_header_buttons None None %}` anywhere in a template that includes `{% load wagtailadmin_tag... | [
{
"content": "import json\nfrom datetime import datetime\nfrom urllib.parse import urljoin\nfrom warnings import warn\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.admin.utils import quote\nfrom django.contrib.humanize.templatetags.humanize import intcomma, naturaltime\nf... | [
{
"content": "import json\nfrom datetime import datetime\nfrom urllib.parse import urljoin\nfrom warnings import warn\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.admin.utils import quote\nfrom django.contrib.humanize.templatetags.humanize import intcomma, naturaltime\nf... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index f91c3a190f51..688a6e2cf0a5 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -76,6 +76,7 @@ Changelog
* Fix: Fix `search_promotions` `0004_copy_queries` migration for long-lived Wagtail instances (Sage Abdullah)
* Fix: Guard against `TypeError` in `0088_fix_log_entry... |
aws-cloudformation__cfn-lint-2974 | Fn::Sub with Fn::GetAtt dot notation fails when AWS::LanguageExtensions Transform is included
### CloudFormation Lint Version
cfn-lint 0.80.2
### What operating system are you using?
Mac
### Describe the bug
Receiving the following exception when including an Fn::Sub intrinsic function with Fn::GetAtt dot notation... | [
{
"content": "\"\"\"\nCopyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\n\nfrom __future__ import annotations\n\nimport logging\nimport random\nimport string\nfrom copy import deepcopy\nfrom typing import Any, Iterable, List, Mapping, MutableMapping,... | [
{
"content": "\"\"\"\nCopyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\n\nfrom __future__ import annotations\n\nimport logging\nimport random\nimport string\nfrom copy import deepcopy\nfrom typing import Any, Iterable, List, Mapping, MutableMapping,... | diff --git a/src/cfnlint/template/transforms/_language_extensions.py b/src/cfnlint/template/transforms/_language_extensions.py
index d770283994..6196a0e775 100644
--- a/src/cfnlint/template/transforms/_language_extensions.py
+++ b/src/cfnlint/template/transforms/_language_extensions.py
@@ -194,7 +194,7 @@ def _walk(sel... |
cltk__cltk-371 | Inconsistent case of data directory
[The latin module](https://github.com/cltk/cltk/blob/36b6fe7aa23a8c4f41ef694ddb64b4b02534146c/cltk/corpus/latin/__init__.py#L20) tries to load the latin library from "~/CLTK_DATA", which fails on a case-sensitive filesystem.
All other modules seem to use "~/cltk_data", so that shoul... | [
{
"content": "# CLTK: Latin Corpus Readers\n\n__author__ = 'Patrick J. Burns <patrick@diyclassics.org>'\n__license__ = 'MIT License. See LICENSE.'\n\n\"\"\"\nCLTK Latin corpus readers\n\"\"\"\n\nimport os.path\nfrom nltk.corpus.reader.plaintext import PlaintextCorpusReader\nfrom nltk.tokenize.punkt import Punkt... | [
{
"content": "# CLTK: Latin Corpus Readers\n\n__author__ = 'Patrick J. Burns <patrick@diyclassics.org>'\n__license__ = 'MIT License. See LICENSE.'\n\n\"\"\"\nCLTK Latin corpus readers\n\"\"\"\n\nimport os.path\nfrom nltk.corpus.reader.plaintext import PlaintextCorpusReader\nfrom nltk.tokenize.punkt import Punkt... | diff --git a/cltk/corpus/latin/__init__.py b/cltk/corpus/latin/__init__.py
index 2993f521f..79902ccfd 100644
--- a/cltk/corpus/latin/__init__.py
+++ b/cltk/corpus/latin/__init__.py
@@ -17,7 +17,7 @@
# Would like to have this search through a CLTK_DATA environment variable
# Better to use something like make_cltk_path... |
pytorch__pytorch-255 | batch_first broken in AutogradRNN
The last line here fails on CPU or when CUDNN is otherwise unavailable:
```python
l, b, t, x, h = 2, 3, 5, 10, 20
rnn = nn.LSTM(x, h, l, batch_first=True)
inpt = Variable(torch.randn(b, t, x))
h0 = Variable(torch.randn(l, b, h))
c0 = Variable(torch.randn(l, b, h))
output, hn... | [
{
"content": "from torch.autograd import Function, NestedIOFunction, Variable\nfrom torch._thnn import type2backend\nimport torch.backends.cudnn as cudnn\ntry:\n import torch.backends.cudnn.rnn\nexcept ImportError:\n pass\n\n\n# FIXME: write a proper function library\nfrom .thnn import Tanh, Sigmoid, Thre... | [
{
"content": "from torch.autograd import Function, NestedIOFunction, Variable\nfrom torch._thnn import type2backend\nimport torch.backends.cudnn as cudnn\ntry:\n import torch.backends.cudnn.rnn\nexcept ImportError:\n pass\n\n\n# FIXME: write a proper function library\nfrom .thnn import Tanh, Sigmoid, Thre... | diff --git a/torch/nn/functions/rnn.py b/torch/nn/functions/rnn.py
index 4f716b19d7c136..f1e97a360483e6 100644
--- a/torch/nn/functions/rnn.py
+++ b/torch/nn/functions/rnn.py
@@ -154,12 +154,12 @@ def AutogradRNN(mode, input_size, hidden_size, num_layers=1, batch_first=False,
def forward(input, weight, hidden):
... |
awslabs__gluonts-2513 | AssertionError while using ets from wrapper.
## Description
ets from statforecast model producing error.
## To Reproduce
(Please provide minimal example of code snippet that reproduces the error. For existing examples, please provide link.)
```python
from gluonts.ext.statsforecast import ETSPredictor
from glu... | [
{
"content": "# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\").\n# You may not use this file except in compliance with the License.\n# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICE... | [
{
"content": "# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\").\n# You may not use this file except in compliance with the License.\n# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICE... | diff --git a/src/gluonts/model/forecast.py b/src/gluonts/model/forecast.py
index ae3821c3cd..70186fbd76 100644
--- a/src/gluonts/model/forecast.py
+++ b/src/gluonts/model/forecast.py
@@ -718,7 +718,7 @@ def quantile(self, inference_quantile: Union[float, str]) -> np.ndarray:
inference_quantile = Quantile.par... |
encode__starlette-1235 | ImmutableMultiDict returns a List[Any] instead of a List[str]
`starlette.datastructures.ImmutableMultiDict.getlist()` could return a list of List[UploadFile] in some circumstances.
### Code to reproduce
```python
@router.post("/upload")
async def create_training_set(request: Request) -> Any:
form = await r... | [
{
"content": "import tempfile\nimport typing\nfrom collections import namedtuple\nfrom collections.abc import Sequence\nfrom shlex import shlex\nfrom urllib.parse import SplitResult, parse_qsl, urlencode, urlsplit\n\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.types import Scope\n\nAddre... | [
{
"content": "import tempfile\nimport typing\nfrom collections import namedtuple\nfrom collections.abc import Sequence\nfrom shlex import shlex\nfrom urllib.parse import SplitResult, parse_qsl, urlencode, urlsplit\n\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.types import Scope\n\nAddre... | diff --git a/starlette/datastructures.py b/starlette/datastructures.py
index 5149a6e2e..17dc46eb6 100644
--- a/starlette/datastructures.py
+++ b/starlette/datastructures.py
@@ -266,7 +266,7 @@ def __init__(
self._dict = {k: v for k, v in _items}
self._list = _items
- def getlist(self, key: typing... |
jupyterhub__jupyterhub-1111 | Passwords beginning or ending with a whitespace are not supported
Due to POST argument stripping, passwords with a beginning or ending whitespace are not allowed.
**How to reproduce the issue**
Set up a user password with an ending or beginning whitespace.
**What you expected to happen**
The user should be allo... | [
{
"content": "\"\"\"HTTP Handlers for the hub server\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom urllib.parse import urlparse\n\nfrom tornado.escape import url_escape\nfrom tornado import gen\nfrom tornado.httputil import url_concat\n\nf... | [
{
"content": "\"\"\"HTTP Handlers for the hub server\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom urllib.parse import urlparse\n\nfrom tornado.escape import url_escape\nfrom tornado import gen\nfrom tornado.httputil import url_concat\n\nf... | diff --git a/jupyterhub/handlers/login.py b/jupyterhub/handlers/login.py
index ec1745276e..b8e7b5582e 100644
--- a/jupyterhub/handlers/login.py
+++ b/jupyterhub/handlers/login.py
@@ -78,7 +78,7 @@ def post(self):
# parse the arguments dict
data = {}
for arg in self.request.arguments:
- ... |
mitmproxy__mitmproxy-2311 | Unpacking request body (gzip) doesn't automatically update the Content-Length header
##### Steps to reproduce the problem:
1. Send a request with the body packed as gzip.
2. Enter into the request in mitmproxy and notice Content-Length shows the packed length.
3. Unpack the body (the z key) - notice the Content-Le... | [
{
"content": "import re\nfrom typing import Optional, Union # noqa\n\nfrom mitmproxy.utils import strutils\nfrom mitmproxy.net.http import encoding\nfrom mitmproxy.types import serializable\nfrom mitmproxy.net.http import headers\n\n\nclass MessageData(serializable.Serializable):\n content = None # type: b... | [
{
"content": "import re\nfrom typing import Optional, Union # noqa\n\nfrom mitmproxy.utils import strutils\nfrom mitmproxy.net.http import encoding\nfrom mitmproxy.types import serializable\nfrom mitmproxy.net.http import headers\n\n\nclass MessageData(serializable.Serializable):\n content = None # type: b... | diff --git a/mitmproxy/net/http/message.py b/mitmproxy/net/http/message.py
index 1040c6ce17..cb32aee4df 100644
--- a/mitmproxy/net/http/message.py
+++ b/mitmproxy/net/http/message.py
@@ -226,8 +226,9 @@ def decode(self, strict=True):
Raises:
ValueError, when the content-encoding is invalid and str... |
zestedesavoir__zds-site-4566 | [v25][beta] La page "tous les tags" d'une tribune montre des tags qui renvoient vers la bibliothèque
Bonjour,
Lorsque je vais sur la page de tous les tags de la tribune j'arrive sur [ce lien](https://beta.zestedesavoir.com/contenus/tags/?type=opinion) (topbar > tribune > Tous les tags).
Et là je vois ceci :
!... | [
{
"content": "# coding: utf-8\nfrom datetime import datetime\nimport json as json_writer\nimport logging\nimport os\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.models import User\nfrom django.core.exceptions import PermissionDenied\nfrom django.db import tr... | [
{
"content": "# coding: utf-8\nfrom datetime import datetime\nimport json as json_writer\nimport logging\nimport os\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.models import User\nfrom django.core.exceptions import PermissionDenied\nfrom django.db import tr... | diff --git a/templates/tutorialv2/view/tags.html b/templates/tutorialv2/view/tags.html
index f2f2c3afb6..e587b1f776 100644
--- a/templates/tutorialv2/view/tags.html
+++ b/templates/tutorialv2/view/tags.html
@@ -17,18 +17,33 @@
<li>{% trans "Liste des tags" %}</li>
{% endblock %}
-
-
{% block content_out %}
+ ... |
sopel-irc__sopel-2354 | Exceptions with empty messages produce opaque error reports
### Description
Error reports issued by [`Sopel.error`](https://github.com/sopel-irc/sopel/blob/4e0a3868da1b6b350b761395fe627ac0a5978ae3/sopel/bot.py#L932-L933) format the exception as a string, which for most exception types will report only the message. For... | [
{
"content": "# Copyright 2008, Sean B. Palmer, inamidst.com\n# Copyright © 2012, Elad Alfassa <elad@fedoraproject.org>\n# Copyright 2012-2015, Elsie Powell, http://embolalia.com\n# Copyright 2019, Florian Strzelecki <florian.strzelecki@gmail.com>\n#\n# Licensed under the Eiffel Forum License 2.\n\nfrom __futur... | [
{
"content": "# Copyright 2008, Sean B. Palmer, inamidst.com\n# Copyright © 2012, Elad Alfassa <elad@fedoraproject.org>\n# Copyright 2012-2015, Elsie Powell, http://embolalia.com\n# Copyright 2019, Florian Strzelecki <florian.strzelecki@gmail.com>\n#\n# Licensed under the Eiffel Forum License 2.\n\nfrom __futur... | diff --git a/sopel/bot.py b/sopel/bot.py
index 009640597d..4f9454c58d 100644
--- a/sopel/bot.py
+++ b/sopel/bot.py
@@ -930,7 +930,8 @@ def error(
"""
message = 'Unexpected error'
if exception:
- message = '{} ({})'.format(message, exception)
+ detail = ' ({})'.format(exc... |
Cloud-CV__EvalAI-1596 | Permission denied: '/tmp/logfile'
The submission worker currently faces the problem of permission denied due to the dependency on `/tmp/logfile`. Here is the error log:
```
(EvalAI) 137 ubuntu@staging-evalai:~/Projects/EvalAI⟫ python scripts/workers/submission_worker.py settings.prod
Traceback (most recent call la... | [
{
"content": "\"\"\"\nDjango settings for evalai project.\n\nGenerated by 'django-admin startproject' using Django 1.10.2.\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 evalai project.\n\nGenerated by 'django-admin startproject' using Django 1.10.2.\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/.gitignore b/.gitignore
index bf543682c7..5f77e1dd00 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,51 +3,14 @@ __pycache__/
*.py[cod]
*$py.class
-# C extensions
-*.so
-
-# Distribution / packaging
-.Python
-env/
-build/
-develop-eggs/
-dist/
-downloads/
-eggs/
-.eggs/
-lib/
-lib64/
-parts/
-sdist/
-va... |
pypa__cibuildwheel-1217 | Should arm64 runners build both universal2 and arm64 wheels by default?
Continuing the discussion from https://github.com/pypa/cibuildwheel/pull/1191#discussion_r928749039
The current situation is that arm64 runners builds universal2 and arm64 by default. This discussion is whether we change that to just arm64.
>... | [
{
"content": "from __future__ import annotations\n\nimport functools\nimport platform as platform_module\nimport re\nfrom enum import Enum\n\nfrom .typing import Final, Literal, PlatformName, assert_never\n\nPRETTY_NAMES: Final = {\"linux\": \"Linux\", \"macos\": \"macOS\", \"windows\": \"Windows\"}\n\n\n@funct... | [
{
"content": "from __future__ import annotations\n\nimport functools\nimport platform as platform_module\nimport re\nfrom enum import Enum\n\nfrom .typing import Final, Literal, PlatformName, assert_never\n\nPRETTY_NAMES: Final = {\"linux\": \"Linux\", \"macos\": \"macOS\", \"windows\": \"Windows\"}\n\n\n@funct... | diff --git a/cibuildwheel/architecture.py b/cibuildwheel/architecture.py
index 82a78b30b..7b90ff947 100644
--- a/cibuildwheel/architecture.py
+++ b/cibuildwheel/architecture.py
@@ -66,10 +66,6 @@ def auto_archs(platform: PlatformName) -> set[Architecture]:
if platform == "windows" and native_architecture == Ar... |
pymedusa__Medusa-7449 | [APP SUBMITTED]: KeyError: 'backlog_search'
### INFO
**Python Version**: `3.7.5 (default, Nov 1 2019, 02:16:23) [Clang 11.0.0 (clang-1100.0.33.8)]`
**Operating System**: `Darwin-19.0.0-x86_64-i386-64bit`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Database**: `44.14`
**Commit**: pymedusa/Medusa@fcb5a19... | [
{
"content": "# coding=utf-8\n\n\"\"\"Module with different types of Queue Items for searching and snatching.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport threading\nimport time\nimport traceback\n\nfrom medusa import app, common, failed_history, generic_queue, history, ui\nfrom me... | [
{
"content": "# coding=utf-8\n\n\"\"\"Module with different types of Queue Items for searching and snatching.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport threading\nimport time\nimport traceback\n\nfrom medusa import app, common, failed_history, generic_queue, history, ui\nfrom me... | diff --git a/medusa/search/queue.py b/medusa/search/queue.py
index 8824125433..290c617659 100644
--- a/medusa/search/queue.py
+++ b/medusa/search/queue.py
@@ -169,7 +169,7 @@ def is_forced_search_in_progress(self):
def queue_length(self):
"""Get queue length."""
- length = {'forced_search': 0, 'm... |
flairNLP__flair-2128 | Update TARS model for Flair 0.8 release
Flair 0.8 includes some improvements to the TARS model. This issue tracks the progress of updating the tars-base model for the new release.
| [
{
"content": "import logging\nfrom pathlib import Path\nfrom typing import List, Union, Dict, Optional, Set\n\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data.dataset import Dataset\nfrom tqdm import tqdm\nimport numpy as np\n\nimport sklearn.metrics as metrics\nfrom sklearn.metrics.pairwise import c... | [
{
"content": "import logging\nfrom pathlib import Path\nfrom typing import List, Union, Dict, Optional, Set\n\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data.dataset import Dataset\nfrom tqdm import tqdm\nimport numpy as np\n\nimport sklearn.metrics as metrics\nfrom sklearn.metrics.pairwise import c... | diff --git a/flair/models/text_classification_model.py b/flair/models/text_classification_model.py
index b0cf4a4163..5d81dd3566 100644
--- a/flair/models/text_classification_model.py
+++ b/flair/models/text_classification_model.py
@@ -939,7 +939,7 @@ def _fetch_model(model_name) -> str:
model_map = {}
... |
privacyidea__privacyidea-1207 | passOnNoUser stop to work after upgrade from "2.22.1" to "2.23"
I've two Realm: **a** and **b**
**Policies (in this order)**:
a_authentication | authentication | { "passthru": "userstore", "reset_all_user_tokens": true, "otppin": "tokenpin" } | [ "a" ] | [] | [] | []
b_authentication | authent... | [
{
"content": "# -*- coding: utf-8 -*-\n# 2017-08-11 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Add condition for detail->error->message\n# 2017-07-19 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Add possibility to compare tokeninfo field against fixed time\n# ... | [
{
"content": "# -*- coding: utf-8 -*-\n# 2017-08-11 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Add condition for detail->error->message\n# 2017-07-19 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Add possibility to compare tokeninfo field against fixed time\n# ... | diff --git a/privacyidea/lib/eventhandler/base.py b/privacyidea/lib/eventhandler/base.py
index 8bbd65eaa7..480affc3fe 100644
--- a/privacyidea/lib/eventhandler/base.py
+++ b/privacyidea/lib/eventhandler/base.py
@@ -268,7 +268,9 @@ def _get_tokenowner(request):
try:
ui = user.info
except U... |
quantumlib__Cirq-2465 | Gate.controlled(0) should return self
| [
{
"content": "# Copyright 2018 The Cirq Developers\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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright 2018 The Cirq Developers\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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/cirq/ops/raw_types.py b/cirq/ops/raw_types.py
index 5a494b20f37..6ed0ad1dd14 100644
--- a/cirq/ops/raw_types.py
+++ b/cirq/ops/raw_types.py
@@ -285,6 +285,8 @@ def controlled(self,
"""
# Avoids circular import.
from cirq.ops import ControlledGate
+ if num_controls == 0:
+ ... |
stephenmcd__mezzanine-358 | Dynamic page permissions aren't called on the content model
The documentation mentions a `can_add` method to define on a a custom page model. When this is called in `page_tags.set_page_permissions`, it only calls in on the `Page` instance, never using `Page.get_content_model()`.
I will submit a pull request to fix thi... | [
{
"content": "\nfrom collections import defaultdict\n\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.core.urlresolvers import reverse, NoReverseMatch\nfrom django.template import TemplateSyntaxError, Variable\nfrom django.template.loader import get_template\nfrom django.utils.translation ... | [
{
"content": "\nfrom collections import defaultdict\n\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.core.urlresolvers import reverse, NoReverseMatch\nfrom django.template import TemplateSyntaxError, Variable\nfrom django.template.loader import get_template\nfrom django.utils.translation ... | diff --git a/mezzanine/pages/templatetags/pages_tags.py b/mezzanine/pages/templatetags/pages_tags.py
index 57edca6edc..4b82fb7aa1 100644
--- a/mezzanine/pages/templatetags/pages_tags.py
+++ b/mezzanine/pages/templatetags/pages_tags.py
@@ -178,6 +178,6 @@ def set_page_permissions(context, token):
setattr(page, "per... |
biolab__orange3-4920 | MDS: pair lines don't follow jittering
When setting jittering on points in MDS, the lines connecting similar pairs don't follow the points. When re-setting the Show similar pairs slider, they get updated.
To reproduce:
Datasets (zoo) - MDS. Jitter the points. Lines are not properly placed after jittering.
| [
{
"content": "# pylint: disable=too-many-ancestors\nfrom types import SimpleNamespace as namespace\n\nimport numpy as np\nimport scipy.spatial.distance\n\nfrom AnyQt.QtCore import Qt\n\nimport pyqtgraph as pg\n\nfrom Orange.data import ContinuousVariable, Domain, Table, StringVariable\nfrom Orange.data.util imp... | [
{
"content": "# pylint: disable=too-many-ancestors\nfrom types import SimpleNamespace as namespace\n\nimport numpy as np\nimport scipy.spatial.distance\n\nfrom AnyQt.QtCore import Qt\n\nimport pyqtgraph as pg\n\nfrom Orange.data import ContinuousVariable, Domain, Table, StringVariable\nfrom Orange.data.util imp... | diff --git a/Orange/widgets/unsupervised/owmds.py b/Orange/widgets/unsupervised/owmds.py
index ee17626b389..c32258aa836 100644
--- a/Orange/widgets/unsupervised/owmds.py
+++ b/Orange/widgets/unsupervised/owmds.py
@@ -102,6 +102,10 @@ def update_coordinates(self):
super().update_coordinates()
self.upda... |
ros2__ros2_documentation-1783 | Update instructions for checking out develop, release and rolling (master) branches
Due to the release of rolling, and galactic being branched off rolling, there are some instructions that require updating in [Maintaining-a-Source-Checkout.rst](https://github.com/ros2/ros2_documentation/blob/rolling/source/Installation... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# rosindex documentation build configuration file, created by\n# sphinx-quickstart on Tue Oct 2 16:34:57 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in t... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# rosindex documentation build configuration file, created by\n# sphinx-quickstart on Tue Oct 2 16:34:57 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in t... | diff --git a/conf.py b/conf.py
index 8c7e5b2ba16..49706ccc3c6 100644
--- a/conf.py
+++ b/conf.py
@@ -73,7 +73,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-extensions = ['sphinx.ext.intersphinx', 'sphinx_tabs.tabs', ... |
DataBiosphere__toil-2790 | Update psutil version
`psutil` is pinned to version 3.0.1, which causes dependency conflicts with other packages like `dask`, which requires version >=5.0. All `psutil` calls are in **src/toil/batchSystems/mesos/executor.py** and I confirmed that on the latest version (5.6.3), every `psutil` call works the same:
```
I... | [
{
"content": "# Copyright (C) 2015-2016 Regents of the University of California\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-... | [
{
"content": "# Copyright (C) 2015-2016 Regents of the University of California\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-... | diff --git a/setup.py b/setup.py
index c3ceccb71a..a3c4cffce3 100644
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@ def runSetup():
futures = 'futures==3.1.1'
pycryptodome = 'pycryptodome==3.5.1'
pymesos = 'pymesos==0.3.7'
- psutil = 'psutil==3.0.1'
+ psutil = 'psutil >= 3.0.1, <6'
azureCosmo... |
holoviz__holoviews-2802 | Colorbar of the scatter shows wrong label
Sample notebook code:
```
import holoviews as hv
import numpy as np
hv.extension('matplotlib')
%opts Scatter [color_index=2 colorbar=True]
hv.Scatter(np.random.rand(100, 3), vdims=["y", "c"])
```
Colorbar should be labeled "c", because that's the name of the colum... | [
{
"content": "import math\n\nimport param\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.colors as mpl_colors\nfrom matplotlib import ticker\nfrom matplotlib.dates import date2num\n\nfrom ...core import util\nfrom ...core import (OrderedDict, NdOverlay, DynamicMap,\n Compos... | [
{
"content": "import math\n\nimport param\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.colors as mpl_colors\nfrom matplotlib import ticker\nfrom matplotlib.dates import date2num\n\nfrom ...core import util\nfrom ...core import (OrderedDict, NdOverlay, DynamicMap,\n Compos... | diff --git a/holoviews/plotting/mpl/element.py b/holoviews/plotting/mpl/element.py
index 1986f62d2e..833aeb5b0b 100644
--- a/holoviews/plotting/mpl/element.py
+++ b/holoviews/plotting/mpl/element.py
@@ -539,7 +539,8 @@ def _adjust_cbar(self, cbar, label, dim):
def _finalize_artist(self, element):
artist =... |
matrix-org__synapse-8135 | Improve MatrixError when user tries to create an account with digits only
Could be nice to send errcode `M_INVALID_USERNAME`, for the moment, the client receives `M_UNKNOWN`:
```json
{"errcode":"M_UNKNOWN","error":"Numeric user IDs are reserved for guest users."}
```
_Originally posted by @bmarty in https://git... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2014 - 2016 OpenMarket Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2014 - 2016 OpenMarket Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.... | diff --git a/changelog.d/8135.bugfix b/changelog.d/8135.bugfix
new file mode 100644
index 000000000000..9d5c60ea00e3
--- /dev/null
+++ b/changelog.d/8135.bugfix
@@ -0,0 +1 @@
+Clarify the error code if a user tries to register with a numeric ID. This bug was introduced in v1.15.0.
diff --git a/synapse/handlers/register... |
ivy-llc__ivy-17744 | gcd
| [
{
"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.0 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.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\... | diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py
index 8d55d66a1efda..94e9084c12618 100644
--- a/ivy/functional/frontends/paddle/tensor/math.py
+++ b/ivy/functional/frontends/paddle/tensor/math.py
@@ -234,7 +234,14 @@ def reciprocal(x, name=None):
return ... |
pyinstaller__pyinstaller-4895 | pyinstaller fails to find library binary for OSX when Python3 is installed via Brew
## Description of the issue
## Context information (for bug reports)
* **Output of `pyinstaller --version`**:
```
3.6
```
* **Version of Python**: `3.7`
* **Platform**: OSX / Brew
* **Did you also try this on another platfo... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2020, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2020, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens... | diff --git a/PyInstaller/compat.py b/PyInstaller/compat.py
index b3c326cd08..30b5ce931e 100644
--- a/PyInstaller/compat.py
+++ b/PyInstaller/compat.py
@@ -65,6 +65,7 @@
elif is_darwin:
# libpython%d.%dm.dylib for Conda virtual environment installations
PYDYLIB_NAMES = {'Python', '.Python',
+ ... |
docker__docker-py-203 | Specify "ro"/"rw" for volumes
It would be nice to have ability to specify mode for volume, e.g. read only.
Currently this can be done in this not obvious way:
```
c.start(container_id, binds={"/home/host-data/": "/mnt/data:ro"})
```
| [
{
"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/README.md b/README.md
index 6fceda9a4..39bbced93 100644
--- a/README.md
+++ b/README.md
@@ -301,7 +301,15 @@ Volume mappings are then declared inside the `Client.start` method like this:
```python
c.start(container_id, binds={
- '/home/user1/': '/mnt/vol2',
- '/var/www': '/mnt/vol1'
+ '/home/u... |
zulip__zulip-25400 | Integration with Notion
We received a feature request from a user asking for an integration with Notion. It seems like this might be possible as an incoming webhook via their Zapier integration - https://zapier.com/apps/notion/integrations/webhook/599249/trigger-post-webhooks-with-new-items-in-notion-databases to send ... | [
{
"content": "import os\nfrom dataclasses import dataclass, field\nfrom typing import Any, Callable, Dict, List, Optional, Sequence, Tuple\n\nfrom django.contrib.staticfiles.storage import staticfiles_storage\nfrom django.urls import URLResolver, path\nfrom django.utils.module_loading import import_string\nfrom... | [
{
"content": "import os\nfrom dataclasses import dataclass, field\nfrom typing import Any, Callable, Dict, List, Optional, Sequence, Tuple\n\nfrom django.contrib.staticfiles.storage import staticfiles_storage\nfrom django.urls import URLResolver, path\nfrom django.utils.module_loading import import_string\nfrom... | diff --git a/static/images/integrations/bot_avatars/notion.png b/static/images/integrations/bot_avatars/notion.png
new file mode 100644
index 0000000000000..2b6d22b4018dc
Binary files /dev/null and b/static/images/integrations/bot_avatars/notion.png differ
diff --git a/static/images/integrations/logos/notion.svg b/stat... |
readthedocs__readthedocs.org-3641 | Improve security contact webpage
We need to improve our documentation about a user who found a security issue could contact us to report this vulnerability in a confidential way.
This page should be clear regarding how to report the issue, how submit a patch (wihtout making it public) and what to do receive feedback... | [
{
"content": "# pylint: disable=missing-docstring\nfrom __future__ import absolute_import\n\nfrom functools import reduce\nfrom operator import add\n\nfrom django.conf.urls import url, include\nfrom django.contrib import admin\nfrom django.conf import settings\nfrom django.conf.urls.static import static\nfrom d... | [
{
"content": "# pylint: disable=missing-docstring\nfrom __future__ import absolute_import\n\nfrom functools import reduce\nfrom operator import add\n\nfrom django.conf.urls import url, include\nfrom django.contrib import admin\nfrom django.conf import settings\nfrom django.conf.urls.static import static\nfrom d... | diff --git a/docs/index.rst b/docs/index.rst
index 457de45b7cc..d6e30f31272 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -104,6 +104,7 @@ Information about development is also available:
settings
i18n
issue-labels
+ security
api/index
.. _business-docs:
diff --git a/docs/security.rst b/docs/... |
feast-dev__feast-135 | Python SDK fails to apply feature when submitting job
## Expected Behavior
When using the Python SDK to start an import job, the `run` method should be able to `apply` features within the import.
## Current Behavior
The run method returns an error:
```
globals = debugger.run(setup['file'], None, None,... | [
{
"content": "# Copyright 2018 The Feast 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# https://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required b... | [
{
"content": "# Copyright 2018 The Feast 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# https://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required b... | diff --git a/sdk/python/feast/sdk/client.py b/sdk/python/feast/sdk/client.py
index ea2d2317c6a..d1b09ebf22c 100644
--- a/sdk/python/feast/sdk/client.py
+++ b/sdk/python/feast/sdk/client.py
@@ -166,7 +166,7 @@ def run(self, importer, name_override=None,
self._apply_entity(importer.entity)
if apply_... |
Pycord-Development__pycord-705 | Slash commands broken
### Summary
Slash commands not appearing in menu
### Reproduction Steps
Any bot, made with pycord has this problem, I think... only one command appears, rest all disappeared.
This might be a bug, but yeah its kinda frustrating as we dont know what to tell all the users.
### Minimal Reproducib... | [
{
"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without r... | [
{
"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without r... | diff --git a/discord/bot.py b/discord/bot.py
index 82e91cc953..57c07b7708 100644
--- a/discord/bot.py
+++ b/discord/bot.py
@@ -130,8 +130,7 @@ def add_application_command(self, command: ApplicationCommand) -> None:
command.id = cmd.id
self._application_commands[command.id] = command
... |
encode__django-rest-framework-5351 | returning QueryDict with content-type application/json and empty body
## 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 quest... | [
{
"content": "\"\"\"\nThe Request class is used as a wrapper around the standard request object.\n\nThe wrapped request then offers a richer API, in particular :\n\n - content automatically parsed according to `Content-Type` header,\n and available as `request.data`\n - full support of PUT method, in... | [
{
"content": "\"\"\"\nThe Request class is used as a wrapper around the standard request object.\n\nThe wrapped request then offers a richer API, in particular :\n\n - content automatically parsed according to `Content-Type` header,\n and available as `request.data`\n - full support of PUT method, in... | diff --git a/rest_framework/request.py b/rest_framework/request.py
index 6f4269fe51..4f413e03f6 100644
--- a/rest_framework/request.py
+++ b/rest_framework/request.py
@@ -303,7 +303,7 @@ def _parse(self):
stream = None
if stream is None or media_type is None:
- if media_type and not i... |
microsoft__PubSec-Info-Assistant-558 | Sometime Documents is staying into queue for permanently
Sometimes status is not updating and not updating the processing file ahead and stays in queue only
It's not a very big file, its like a 1.40MB file with 1500rows and 5 columns of data
 Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport logging\nimport json\nimport html\nfrom datetime import datetime\nfrom enum import Enum\nimport zipfile\nimport os\nfrom azure.storage.blob import BlobServiceClient\nfrom shared_code.utilities_helper import Utiliti... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport logging\nimport json\nimport html\nfrom datetime import datetime\nfrom enum import Enum\nimport zipfile\nimport os\nfrom azure.storage.blob import BlobServiceClient\nfrom shared_code.utilities_helper import Utiliti... | diff --git a/functions/requirements.txt b/functions/requirements.txt
index 06a2d43c9..99db4d606 100644
--- a/functions/requirements.txt
+++ b/functions/requirements.txt
@@ -15,7 +15,7 @@ azure-storage-queue == 12.6.0
nltk == 3.8.1
tenacity == 8.2.3
azure-ai-vision == 0.15.1b1
-unstructured[csv,doc,docx,email,html,md... |
Kinto__kinto-1285 | Remove userid from statsd metrics
```
Traceback (most recent
call last):#012 File "/opt/datadog-agent/agent/dogstatsd.py", line 419, in
start#012 aggregator_submit(message)#012 File
"/opt/datadog-agent/agent/aggregator.py", line 613, in submit_packets#012
parsed_packets = self.parse_metric_packet(packet)#0... | [
{
"content": "import logging\nimport re\nimport warnings\nfrom datetime import datetime\nfrom dateutil import parser as dateparser\n\nfrom pyramid.events import NewRequest, NewResponse\nfrom pyramid.exceptions import ConfigurationError\nfrom pyramid.httpexceptions import (HTTPTemporaryRedirect, HTTPGone,\n ... | [
{
"content": "import logging\nimport re\nimport warnings\nfrom datetime import datetime\nfrom dateutil import parser as dateparser\n\nfrom pyramid.events import NewRequest, NewResponse\nfrom pyramid.exceptions import ConfigurationError\nfrom pyramid.httpexceptions import (HTTPTemporaryRedirect, HTTPGone,\n ... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 59346edfd..cfe914dce 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -16,6 +16,7 @@ This document describes changes between each past release.
specified users only makes sense if those users are "admins", which
means they're in ``account_write_principals``. (Fixe... |
fossasia__open-event-server-5383 | Improper exception handling in manage.py
**Describe the bug**
Exceptions are not handled properly in `initialize_db` method of `manage` module.
**To Reproduce**
Steps to reproduce the behavior:
1. Open 'manage.py'
2. See https://github.com/fossasia/open-event-server/blob/05cbd1abee0d81dd24d701420c3530e3b9bd645f/... | [
{
"content": "import os\n\nfrom app.api.helpers.db import save_to_db\nfrom app.models.event import Event, get_new_event_identifier\nfrom app import manager\nfrom app import current_app as app\nfrom app.models import db\nfrom app.models.speaker import Speaker\nfrom populate_db import populate\nfrom flask_migrate... | [
{
"content": "import os\n\nfrom app.api.helpers.db import save_to_db\nfrom app.models.event import Event, get_new_event_identifier\nfrom app import manager\nfrom app import current_app as app\nfrom app.models import db\nfrom app.models.speaker import Speaker\nfrom populate_db import populate\nfrom flask_migrate... | diff --git a/manage.py b/manage.py
index 7ba1ac5d32..5c247c9751 100644
--- a/manage.py
+++ b/manage.py
@@ -74,7 +74,7 @@ def initialize_db(credentials):
try:
db.create_all()
stamp()
- except:
+ except Exception:
populate_data = False
... |
qutip__qutip-208 | _version2int can't always correctly parse version info
I built latest cython, which happens to be version 0.21a1.
Running any qutip code throws a warning:
QuTiP warning: Cython setup failed: invalid literal for int() with base 10: '21a1'
This is due to _version2int() not properly parsing the version info in __init__.... | [
{
"content": "# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the followi... | [
{
"content": "# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the followi... | diff --git a/qutip/utilities.py b/qutip/utilities.py
index afb2c06c61..85fabf4612 100644
--- a/qutip/utilities.py
+++ b/qutip/utilities.py
@@ -389,6 +389,6 @@ def view_methods(Q):
def _version2int(version_string):
str_list = version_string.split(
- "-dev")[0].split("rc")[0].split("b")[0].split("post")[0]... |
huggingface__accelerate-1880 | 【BUG Report】accelerate method remove_hook_from_module can't remove cpu_offload hook.
### System Info
First I wanna cpu offloaded model back to cpu.
so i first call the method `accelerate.cpu_offload(module, CUDA_0)` to offload module to cuda.
then I want my module back to cpu, as i called `remove_hook_from_module(... | [
{
"content": "# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | [
{
"content": "# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | diff --git a/src/accelerate/hooks.py b/src/accelerate/hooks.py
index c3589ac59bd..b9bc2a86215 100644
--- a/src/accelerate/hooks.py
+++ b/src/accelerate/hooks.py
@@ -311,6 +311,7 @@ def detach_hook(self, module):
for name, device in self.original_devices.items():
if device != torch.device("... |
jschneier__django-storages-833 | s3boto3 backend throws exception when attempting to close file opened in read mode since V1.9
Since V1.9 it is now impossible to close a file opened in read mode using s3boto3 backend.
The culprit appears to be the _create_empty_on_close() method that has been added in this version which is called when no data has b... | [
{
"content": "import io\nimport mimetypes\nimport os\nimport posixpath\nimport threading\nimport warnings\nfrom gzip import GzipFile\nfrom tempfile import SpooledTemporaryFile\n\nfrom django.conf import settings as django_settings\nfrom django.core.exceptions import ImproperlyConfigured, SuspiciousOperation\nfr... | [
{
"content": "import io\nimport mimetypes\nimport os\nimport posixpath\nimport threading\nimport warnings\nfrom gzip import GzipFile\nfrom tempfile import SpooledTemporaryFile\n\nfrom django.conf import settings as django_settings\nfrom django.core.exceptions import ImproperlyConfigured, SuspiciousOperation\nfr... | diff --git a/storages/backends/s3boto3.py b/storages/backends/s3boto3.py
index 63d288074..55a55419b 100644
--- a/storages/backends/s3boto3.py
+++ b/storages/backends/s3boto3.py
@@ -190,7 +190,7 @@ def close(self):
else:
if self._multipart is not None:
self._multipart.abort()
- ... |
kivy__kivy-3104 | Issues with popup on py3
When running the following code in py3 on windows I get the following error:
``` py
from kivy.uix.widget import Widget
from kivy.uix.popup import Popup
w1 = Widget()
w2 = Widget()
p1 = Popup(content=w1)
p2 = Popup(content=w2)
```
```
Traceback (most recent call last):
File "playground8.p... | [
{
"content": "'''\nPopup\n=====\n\n.. versionadded:: 1.0.7\n\n.. image:: images/popup.jpg\n :align: right\n\nThe :class:`Popup` widget is used to create modal popups. By default, the popup\nwill cover the whole \"parent\" window. When you are creating a popup, you\nmust at least set a :attr:`Popup.title` and... | [
{
"content": "'''\nPopup\n=====\n\n.. versionadded:: 1.0.7\n\n.. image:: images/popup.jpg\n :align: right\n\nThe :class:`Popup` widget is used to create modal popups. By default, the popup\nwill cover the whole \"parent\" window. When you are creating a popup, you\nmust at least set a :attr:`Popup.title` and... | diff --git a/kivy/uix/popup.py b/kivy/uix/popup.py
index 70dbeadeec..d2ec7601dc 100644
--- a/kivy/uix/popup.py
+++ b/kivy/uix/popup.py
@@ -185,9 +185,6 @@ def add_widget(self, widget):
super(Popup, self).add_widget(widget)
def on_content(self, instance, value):
- if not hasattr(value, 'popup'... |
holoviz__holoviews-4937 | Stacked area only show last label
@Pill-GZ found a bug (and a solution!) for the legend of a stacked area plot only showing the last label. See https://discourse.holoviz.org/t/how-to-add-legend-for-stacked-area-plots/2193
| [
{
"content": "import numpy as np\nimport param\n\nfrom ..core import util\nfrom ..core import Dimension, Dataset, Element2D, NdOverlay, Overlay\nfrom ..core.dimension import process_dimensions\nfrom ..core.data import GridInterface\nfrom .geom import Rectangles, Points, VectorField # noqa: backward compatible i... | [
{
"content": "import numpy as np\nimport param\n\nfrom ..core import util\nfrom ..core import Dimension, Dataset, Element2D, NdOverlay, Overlay\nfrom ..core.dimension import process_dimensions\nfrom ..core.data import GridInterface\nfrom .geom import Rectangles, Points, VectorField # noqa: backward compatible i... | diff --git a/holoviews/element/chart.py b/holoviews/element/chart.py
index 5adc2c469f..3f135721a7 100644
--- a/holoviews/element/chart.py
+++ b/holoviews/element/chart.py
@@ -289,5 +289,5 @@ def stack(cls, areas, baseline_name='Baseline'):
sdf[vdim.name] = sdf[vdim.name] + baseline
sdf... |
xorbitsai__inference-808 | BUG: launch method exception
### Describe the bug
The `launch` method of XInference encounters an error when loading embeddings, images, and reranking because it does not account for the scenario where `size_in_billions` is `None`.
### To Reproduce
$ xinference launch --model-name bge-reranker-large --model-type r... | [
{
"content": "# Copyright 2022-2023 XProbe 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 ap... | [
{
"content": "# Copyright 2022-2023 XProbe 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 ap... | diff --git a/xinference/deploy/cmdline.py b/xinference/deploy/cmdline.py
index 2c78bbf052..37f776f21c 100644
--- a/xinference/deploy/cmdline.py
+++ b/xinference/deploy/cmdline.py
@@ -497,8 +497,10 @@ def model_launch(
_n_gpu = int(n_gpu)
endpoint = get_endpoint(endpoint)
- model_size: Union[str, int]... |
xonsh__xonsh-1427 | lazyjson - OSError: Bad file descriptor
this issue is bothering me for too long, a bug that appears 1 out of 5 times i startup xonsh:
```
$ XONSH_DEBUG=1 python3 -m xonsh
Exception ignored in: <bound method LazyJSON.__del__ of <xonsh.lazyjson.LazyJSON object at 0xb4a89fec>>
Traceback (most recent call last):
File "/... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Implements a lazy JSON file class that wraps around json data.\"\"\"\nimport io\nimport json\nimport weakref\nimport contextlib\nimport collections.abc as abc\n\n\ndef _to_json_with_size(obj, offset=0, sort_keys=False):\n if isinstance(obj, str):\n s = json... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Implements a lazy JSON file class that wraps around json data.\"\"\"\nimport io\nimport json\nimport weakref\nimport contextlib\nimport collections.abc as abc\n\n\ndef _to_json_with_size(obj, offset=0, sort_keys=False):\n if isinstance(obj, str):\n s = json... | diff --git a/news/ljbfd.rst b/news/ljbfd.rst
new file mode 100644
index 0000000000..77622b559e
--- /dev/null
+++ b/news/ljbfd.rst
@@ -0,0 +1,14 @@
+**Added:** None
+
+**Changed:** None
+
+**Deprecated:** None
+
+**Removed:** None
+
+**Fixed:**
+
+* ``LazyJSON`` will now hide failures to close, and instead rely on refer... |
translate__pootle-6747 | Add current character count when entering translations
We're trying to use Pootle to translate metadata strings for an app in the iOS AppStore. The metadata includes individual messages for the app name, subtitle, description, privacy URL and so on and there are different limits on the number of characters allowed in e... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa... | diff --git a/pootle/core/templatetags/core.py b/pootle/core/templatetags/core.py
index fbc025199ca..78d4eab3a0c 100644
--- a/pootle/core/templatetags/core.py
+++ b/pootle/core/templatetags/core.py
@@ -25,6 +25,13 @@ def to_js(value):
return mark_safe('JSON.parse("%s")' % escapejs(jsonify(value)))
+@register.fi... |
open-telemetry__opentelemetry-python-contrib-1748 | httpx tests failing on httpx==0.23.1
Can we leave https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1459 open until we actually fix the instrumentation to work with that version?
_Originally posted by @aabmass in https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1460#pul... | [
{
"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 000216e2a1..777b5a3530 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
+- Instrument all httpx versions >= 0.18. ([#1748](https://github.com/open-telemetry/open... |
Lightning-AI__pytorch-lightning-2832 | Can't use None (anymore) in checkpoint_callback
## 🐛 Bug
using None in checkpoint_callback now errors out
```
-- Process 0 terminated with the following error:
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/torch/multiprocessing/spawn.py", line 20, in _wrap
fn(i, *args)
... | [
{
"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/accelerator_backends/ddp_spawn_backend.py b/pytorch_lightning/accelerator_backends/ddp_spawn_backend.py
index 678b1e57c2305..8301cd8a71e16 100644
--- a/pytorch_lightning/accelerator_backends/ddp_spawn_backend.py
+++ b/pytorch_lightning/accelerator_backends/ddp_spawn_backend.py
@@ -49,7 +4... |
encode__starlette-623 | GraphQL response should not include error key if no error occured
The [GraphQL Spec](https://graphql.github.io/graphql-spec/June2018/#sec-Errors) states that:
> If no errors were encountered during the requested operation, the errors entry should not be present in the result.
Currently, if no errors are encountered... | [
{
"content": "import json\nimport typing\n\nfrom starlette import status\nfrom starlette.background import BackgroundTasks\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.requests import Request\nfrom starlette.responses import HTMLResponse, JSONResponse, PlainTextResponse, Response\nfrom s... | [
{
"content": "import json\nimport typing\n\nfrom starlette import status\nfrom starlette.background import BackgroundTasks\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.requests import Request\nfrom starlette.responses import HTMLResponse, JSONResponse, PlainTextResponse, Response\nfrom s... | diff --git a/starlette/graphql.py b/starlette/graphql.py
index 2063c0789..3af6b04a1 100644
--- a/starlette/graphql.py
+++ b/starlette/graphql.py
@@ -107,7 +107,9 @@ async def handle_graphql(self, request: Request) -> Response:
if result.errors
else None
)
- response_data = {"da... |
aio-libs__aiohttp-4279 | TCPConnector ttl_dns_cache type hint
Hello,
```
class TCPConnector
def __init__(
....
ttl_dns_cache: int=10
...)
```
but documentation (and code so):
> ttl_dns_cache (int) –
>
> expire after some seconds the DNS entries, None means cached forever. By default 10 seconds.
Can you annotate as Optional... | [
{
"content": "import asyncio\nimport functools\nimport logging\nimport random\nimport sys\nimport traceback\nimport warnings\nfrom collections import defaultdict, deque\nfrom contextlib import suppress\nfrom http.cookies import SimpleCookie\nfrom itertools import cycle, islice\nfrom time import monotonic\nfrom ... | [
{
"content": "import asyncio\nimport functools\nimport logging\nimport random\nimport sys\nimport traceback\nimport warnings\nfrom collections import defaultdict, deque\nfrom contextlib import suppress\nfrom http.cookies import SimpleCookie\nfrom itertools import cycle, islice\nfrom time import monotonic\nfrom ... | diff --git a/CHANGES/4270.doc b/CHANGES/4270.doc
new file mode 100644
index 00000000000..024bce19f9a
--- /dev/null
+++ b/CHANGES/4270.doc
@@ -0,0 +1 @@
+Changes doc and ttl_dns_cache type from int to Optional[int].
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 0278c7664ae..9818c73cc7e 100644
--- a/CONTRIBUTORS... |
scikit-hep__awkward-2012 | `ak.to_numpy()` fails cryptically for `ak.Array([{}])`
### Version of Awkward Array
main
### Description and code to reproduce
This raises
```pytb
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
Cell In [10], ... | [
{
"content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE\nfrom __future__ import annotations\n\nimport copy\nimport json\nfrom collections.abc import Iterable\n\nimport awkward as ak\nfrom awkward._util import unset\nfrom awkward.contents.content import Content\nfrom... | [
{
"content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE\nfrom __future__ import annotations\n\nimport copy\nimport json\nfrom collections.abc import Iterable\n\nimport awkward as ak\nfrom awkward._util import unset\nfrom awkward.contents.content import Content\nfrom... | diff --git a/src/awkward/contents/recordarray.py b/src/awkward/contents/recordarray.py
index b2f37d756b..c7fa3c2b55 100644
--- a/src/awkward/contents/recordarray.py
+++ b/src/awkward/contents/recordarray.py
@@ -868,7 +868,7 @@ def _to_numpy(self, allow_missing):
ValueError(f"cannot convert {self} into ... |
encode__httpx-2442 | Support httpcore>=0.16.0
Hi,
I have a project that uses `fastapi` and `uvicorn` which demands `h11>=0.8`. Latest version of `fastapi` changed their test suite from `requests` to `httpx`. So I had to add `httpx` to my tests requirements.
Now the problem is, that `httpx` requires `httpcore`, which since version `0.... | [
{
"content": "import sys\n\nfrom setuptools import setup\n\nsys.stderr.write(\n \"\"\"\n===============================\nUnsupported installation method\n===============================\nhttpx no longer supports installation with `python setup.py install`.\nPlease use `python -m pip install .` instead.\n\"\"... | [
{
"content": "import sys\n\nfrom setuptools import setup\n\nsys.stderr.write(\n \"\"\"\n===============================\nUnsupported installation method\n===============================\nhttpx no longer supports installation with `python setup.py install`.\nPlease use `python -m pip install .` instead.\n\"\"... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6f5e7c4256..d719b08ef8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
+## 0.23.1
+
+### Added
+
+* Supp... |
Kinto__kinto-316 | kinto init fails if config folder does not exist
```
kinto init
Which backend to use? (1 - postgresql, 2 - redis, default - memory)
Traceback (most recent call last):
File "/var/www/kinto.leplat.re/venv/bin/kinto", line 9, in <module>
load_entry_point('kinto==1.9.0', 'console_scripts', 'kinto')()
File "/var/w... | [
{
"content": "import os\nimport binascii\nimport codecs\n\nHERE = os.path.abspath(os.path.dirname(__file__))\n\n\ndef render_template(template, destination, **kwargs):\n template = os.path.join(HERE, template)\n\n with codecs.open(template, 'r', encoding='utf-8') as f:\n raw_template = f.read()\n ... | [
{
"content": "import os\nimport binascii\nimport codecs\n\nHERE = os.path.abspath(os.path.dirname(__file__))\n\n\ndef render_template(template, destination, **kwargs):\n template = os.path.join(HERE, template)\n\n folder = os.path.dirname(destination)\n os.makedirs(folder)\n\n with codecs.open(templ... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 51abdf2bc..0aef663a5 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -6,7 +6,9 @@ This document describes changes between each past release.
1.11.0 (unreleased)
===================
-- Nothing changed yet.
+**Bug fixes**
+
+- Fix ``kinto init`` when containing folde... |
ipython__ipython-13410 | Wrong argument to `Path` in ipython in version 8.0.0a1
<!-- This is the repository for IPython command line, if you can try to make sure this question/bug/feature belong here and not on one of the Jupyter repositories.
If it's a generic Python/Jupyter question, try other forums or discourse.jupyter.org.
If you ... | [
{
"content": "# encoding: utf-8\n\"\"\"\nAn application for IPython.\n\nAll top-level applications should use the classes in this module for\nhandling configuration and creating configurables.\n\nThe job of an :class:`Application` is to create the master configuration\nobject and then create the configurable ob... | [
{
"content": "# encoding: utf-8\n\"\"\"\nAn application for IPython.\n\nAll top-level applications should use the classes in this module for\nhandling configuration and creating configurables.\n\nThe job of an :class:`Application` is to create the master configuration\nobject and then create the configurable ob... | diff --git a/IPython/core/application.py b/IPython/core/application.py
index 2b26d4fad82..3e2a8c9b8f8 100644
--- a/IPython/core/application.py
+++ b/IPython/core/application.py
@@ -34,9 +34,9 @@
)
if os.name == "nt":
- programdata = Path(os.environ.get("PROGRAMDATA", None))
- if programdata:
- SYSTEM_C... |
roboflow__supervision-289 | Wrong COCO format while exporting a `sv.DetectionDataset` using its `as_coco` method
### The Issue:
I export some annotations using:
```python
sv.DetectionDataset(
classes=CLASSES,
images=images,
annotations=annotations
).as_coco(
annotations_path=ANNOTATIONS_PATH,
min_image_area_percentag... | [
{
"content": "import os\nfrom datetime import datetime\nfrom pathlib import Path\nfrom typing import Dict, List, Tuple\n\nimport cv2\nimport numpy as np\n\nfrom supervision.dataset.utils import (\n approximate_mask_with_polygons,\n map_detections_class_id,\n)\nfrom supervision.detection.core import Detect... | [
{
"content": "import os\nfrom datetime import datetime\nfrom pathlib import Path\nfrom typing import Dict, List, Tuple\n\nimport cv2\nimport numpy as np\n\nfrom supervision.dataset.utils import (\n approximate_mask_with_polygons,\n map_detections_class_id,\n)\nfrom supervision.detection.core import Detect... | diff --git a/supervision/dataset/formats/coco.py b/supervision/dataset/formats/coco.py
index 35a8d0f3e..d54d39da4 100644
--- a/supervision/dataset/formats/coco.py
+++ b/supervision/dataset/formats/coco.py
@@ -215,7 +215,7 @@ def save_coco_annotations(
coco_images.append(coco_image)
detections = annota... |
docker__docker-py-1919 | Pull image by full digest is broken in 3.0.1
Using `python3` and `3.0.1` version - this can be reproduced as
```
>>> import docker
>>> client = docker.from_env()
>>> client.images.pull('python@sha256:7c3028aa4b9a30a34ce778b1fd4f460c9cdf174515a94641a89ef40c115b51e5')
Traceback (most recent call last):
File "/u... | [
{
"content": "import itertools\nimport re\n\nimport six\n\nfrom ..api import APIClient\nfrom ..constants import DEFAULT_DATA_CHUNK_SIZE\nfrom ..errors import BuildError, ImageLoadError\nfrom ..utils import parse_repository_tag\nfrom ..utils.json_stream import json_stream\nfrom .resource import Collection, Model... | [
{
"content": "import itertools\nimport re\n\nimport six\n\nfrom ..api import APIClient\nfrom ..constants import DEFAULT_DATA_CHUNK_SIZE\nfrom ..errors import BuildError, ImageLoadError\nfrom ..utils import parse_repository_tag\nfrom ..utils.json_stream import json_stream\nfrom .resource import Collection, Model... | diff --git a/docker/models/images.py b/docker/models/images.py
index d604f7c7f..58d5d93c4 100644
--- a/docker/models/images.py
+++ b/docker/models/images.py
@@ -314,7 +314,9 @@ def pull(self, repository, tag=None, **kwargs):
self.client.api.pull(repository, tag=tag, **kwargs)
if tag:
- re... |
mindsdb__mindsdb-177 | AttributeError: 'PredictTransactionOutputData' object has no attribute 'predicted_values'
**Describe the bug**
After running predict.py in the example mindsdb/docs/examples/time_series/ I got the following AttributeError:
```
Traceback (most recent call last):
File "predict.py", line 12, in <module>
print(... | [
{
"content": "\"\"\"\n\n\"\"\"\n\nfrom mindsdb import Predictor\n\n# Here we use the model to make predictions (NOTE: You need to run train.py first)\nresult = Predictor(name='fuel').predict(when_data = 'fuel_predict.csv')\n\n# you can now print the results\nprint('The predicted main engine fuel consumption')\n... | [
{
"content": "\"\"\"\n\n\"\"\"\n\nfrom mindsdb import Predictor\n\n# Here we use the model to make predictions (NOTE: You need to run train.py first)\nresult = Predictor(name='fuel').predict(when_data = 'fuel_predict.csv')\n\n# you can now print the results\nprint('The predicted main engine fuel consumption')\n... | diff --git a/README.md b/README.md
index a98979e77b0..3ada2abc874 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ MindsDB's goal is to give developers easy access to the power of artificial neur
## Quick Overview
-You can get started with your own computer/cloud or try MindsDB via your browser using [Goog... |
pytorch__TensorRT-1004 | 🐛 [Bug] Failed to use stoi to get the engine ID in TRTEngine function
## Bug Description
Got this error:
```
INFO: [Torch-TensorRT - Debug Build] - [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +132, now: CPU 0, GPU 540 (MiB)
terminate called after throwing an instanc... | [
{
"content": "from typing import List, Dict, Any\nimport torch\nfrom torch import nn\n\nimport torch_tensorrt._C.ts as _C\nfrom torch_tensorrt import _enums\nfrom torch_tensorrt.ts._compile_spec import _parse_compile_spec, _parse_device\nfrom torch_tensorrt._Device import Device\nfrom types import FunctionType\... | [
{
"content": "from typing import List, Dict, Any\nimport torch\nfrom torch import nn\n\nimport torch_tensorrt._C.ts as _C\nfrom torch_tensorrt import _enums\nfrom torch_tensorrt.ts._compile_spec import _parse_compile_spec, _parse_device\nfrom torch_tensorrt._Device import Device\nfrom types import FunctionType\... | diff --git a/core/ir/ir.cpp b/core/ir/ir.cpp
index 1c1813ea5f..fcca3df33c 100644
--- a/core/ir/ir.cpp
+++ b/core/ir/ir.cpp
@@ -21,7 +21,7 @@ InputSpecMap pair_input_vals_with_specs(std::vector<const torch::jit::Value*> va
std::unordered_map<const torch::jit::Value*, core::ir::Input> a;
for (size_t i = 0; i < va... |
ray-project__ray-6233 | Kubernetes Docker Container untagged
The container used by the kubernetes manifests (rayproject/autoscaler) doesn't have any useful tags. Furthermore the contents of the container are actually built using github.com/edoakes/ray and the container is two months old.
It might be better to properly tag the containers wi... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport glob\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\n\nfrom setuptools import setup, find_packages, Distribution\nimport setuptools.command.build_ext as _bu... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport glob\nfrom itertools import chain\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\n\nfrom setuptools import setup, find_packages, Distribution\nimport setupt... | diff --git a/.travis.yml b/.travis.yml
index ab8b6a333f95a..7303013dbcd90 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -85,6 +85,8 @@ matrix:
# except the `$MOUNT_BAZEL_CACHE` part.
- ./ci/suppress_output docker run --rm -w /ray -v `pwd`:/ray $MOUNT_BAZEL_CACHE -ti rayproject/arrow_linux_x86_64_bas... |
fedora-infra__bodhi-4102 | Bad characters in username
There's a bot with a bad username of `packagerbot/os-master01.phx2.fedoraproject.org` that makes CI tests failing.
https://bodhi.fedoraproject.org/users/packagerbot/os-master01.phx2.fedoraproject.org
I'm pushing a PR to safe check CI tests, but do we want to make Bodhi safe to bad usernam... | [
{
"content": "# Copyright 2014-2019 Red Hat, Inc. and others\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, o... | [
{
"content": "# Copyright 2014-2019 Red Hat, Inc. and others\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, o... | diff --git a/bodhi/server/services/user.py b/bodhi/server/services/user.py
index 2c0ecace7b..748aee7c53 100644
--- a/bodhi/server/services/user.py
+++ b/bodhi/server/services/user.py
@@ -32,7 +32,7 @@
import bodhi.server.services.updates
-user = Service(name='user', path='/users/{name}',
+user = Service(name='user... |
pre-commit__pre-commit-177 | Stashed changes lost if hook fails
I've run into this particular (in my eyes, critical) bug.
If I want to do a partial commit, e.g. I have 2 files but I only add 1 file to the staging area and the staged file will cause a hook to fail, I loose the changes in the 2nd file because pre-commit fails to reroll the patch it ... | [
{
"content": "from __future__ import unicode_literals\n\nimport contextlib\nimport io\nimport logging\nimport time\n\nfrom pre_commit.util import CalledProcessError\n\n\nlogger = logging.getLogger('pre_commit')\n\n\n@contextlib.contextmanager\ndef staged_files_only(cmd_runner):\n \"\"\"Clear any unstaged cha... | [
{
"content": "from __future__ import unicode_literals\n\nimport contextlib\nimport io\nimport logging\nimport time\n\nfrom pre_commit.util import CalledProcessError\n\n\nlogger = logging.getLogger('pre_commit')\n\n\n@contextlib.contextmanager\ndef staged_files_only(cmd_runner):\n \"\"\"Clear any unstaged cha... | diff --git a/pre_commit/staged_files_only.py b/pre_commit/staged_files_only.py
index 9ede80324..a2978b996 100644
--- a/pre_commit/staged_files_only.py
+++ b/pre_commit/staged_files_only.py
@@ -21,7 +21,10 @@ def staged_files_only(cmd_runner):
"""
# Determine if there are unstaged files
retcode, diff_stdo... |
magenta__magenta-1347 | [Bug] Melody_rnn Create Dataset get_pipeline missing arg
`melody_rnn_create_dataset --config=basic_rnn --input=notesequences.tfrecord --output_dir=sequence_examples` fails with this error:
```
File "/Users/ericcacciavillani/anaconda3/envs/Magenta_Testing/lib/python3.6/site-packages/magenta/pipelines/note_sequence_pip... | [
{
"content": "# Copyright 2016 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | [
{
"content": "# Copyright 2016 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | diff --git a/magenta/models/melody_rnn/melody_rnn_create_dataset.py b/magenta/models/melody_rnn/melody_rnn_create_dataset.py
index 55ccdb74b5..05048e21c0 100644
--- a/magenta/models/melody_rnn/melody_rnn_create_dataset.py
+++ b/magenta/models/melody_rnn/melody_rnn_create_dataset.py
@@ -49,7 +49,7 @@ def main(unused_arg... |
pre-commit__pre-commit-2480 | SKIP skips invocation by alias but doesn't skip "Installing environment"
### search tried in the issue tracker
SKIP alias
### describe your issue
When I run
```sh
SKIP=pylint-alias2 git commit
```
the hook aliased as `pylint-alias2` is properly skipped, however, its environment is still initialized. I... | [
{
"content": "from __future__ import annotations\n\nimport argparse\nimport contextlib\nimport functools\nimport logging\nimport os\nimport re\nimport subprocess\nimport time\nimport unicodedata\nfrom typing import Any\nfrom typing import Collection\nfrom typing import MutableMapping\nfrom typing import Sequenc... | [
{
"content": "from __future__ import annotations\n\nimport argparse\nimport contextlib\nimport functools\nimport logging\nimport os\nimport re\nimport subprocess\nimport time\nimport unicodedata\nfrom typing import Any\nfrom typing import Collection\nfrom typing import MutableMapping\nfrom typing import Sequenc... | diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py
index ad3d766ef..8d11882c0 100644
--- a/pre_commit/commands/run.py
+++ b/pre_commit/commands/run.py
@@ -420,7 +420,11 @@ def run(
return 1
skips = _get_skips(environ)
- to_install = [hook for hook in hooks if hook.id not... |
python-trio__trio-666 | Update dependency yapf to v0.24.0
This PR contains the following updates:
| Package | Update | New value |
|---|---|---|
| yapf | minor | ==0.24.0 |
---
### Renovate configuration
:date: **Schedule**: No schedule defined.
:vertical_traffic_light: **Automerge**: Enabled.
:recycle: **Rebasing**: Renovate will regen... | [
{
"content": "# General theory of operation:\n#\n# We implement an API that closely mirrors the stdlib ssl module's blocking\n# API, and we do it using the stdlib ssl module's non-blocking in-memory API.\n# The stdlib non-blocking in-memory API is barely documented, and acts as a\n# thin wrapper around openssl,... | [
{
"content": "# General theory of operation:\n#\n# We implement an API that closely mirrors the stdlib ssl module's blocking\n# API, and we do it using the stdlib ssl module's non-blocking in-memory API.\n# The stdlib non-blocking in-memory API is barely documented, and acts as a\n# thin wrapper around openssl,... | diff --git a/renovate.json b/renovate.json
index 04b95fd12..6c9954a37 100644
--- a/renovate.json
+++ b/renovate.json
@@ -2,5 +2,9 @@
"extends": [
"config:base"
],
- "automerge": true
+ "automerge": true,
+ "packageRules": [{
+ "packageNames": ["yapf"],
+ "allowedVersions": "==0.22.0"
+ }]
}
diff -... |
akvo__akvo-rsr-2254 | Create a 500 page
Create a (working) 500 page with a message like:
> Oops something went wrong. We have been notified and will take action asap. Please check in later or contact us at xyz. RSR team
| [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\n Akvo RSR is covered by the GNU Affero General Public License.\n See more details in the license.txt file located at the root folder of the\n Akvo RSR module. For additional details on the GNU license please\n see < http://www.gnu.org/licenses/agpl.html... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\n Akvo RSR is covered by the GNU Affero General Public License.\n See more details in the license.txt file located at the root folder of the\n Akvo RSR module. For additional details on the GNU license please\n see < http://www.gnu.org/licenses/agpl.html... | diff --git a/akvo/rsr/views/error.py b/akvo/rsr/views/error.py
index 2ee1c8ade1..90d48e44c9 100644
--- a/akvo/rsr/views/error.py
+++ b/akvo/rsr/views/error.py
@@ -6,8 +6,12 @@
see < http://www.gnu.org/licenses/agpl.html >.
"""
-from django.http import HttpResponse
+from django.shortcuts import render_to_respons... |
open-telemetry__opentelemetry-python-contrib-1460 | httpx tests failing on httpx==0.23.1
| [
{
"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/instrumentation/opentelemetry-instrumentation-httpx/pyproject.toml b/instrumentation/opentelemetry-instrumentation-httpx/pyproject.toml
index 873b40e3a8..61e1bc4b6e 100644
--- a/instrumentation/opentelemetry-instrumentation-httpx/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-httpx/pypr... |
translate__pootle-6751 | Pootle Install
I am a Pootle novice, I successfully installed it on the mac, but when i want to deploy to the production environment, the following installation error occurs.
# Steps to reproduce:
1. I create a virtualenv env
2. Install Pootle requirements
3. Install Pootle, using `pip install --process-depend... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\n# Some functio... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\n# Some functio... | diff --git a/pootle/core/utils/version.py b/pootle/core/utils/version.py
index 06963fabf25..746ded7923f 100644
--- a/pootle/core/utils/version.py
+++ b/pootle/core/utils/version.py
@@ -228,10 +228,10 @@ def get_git_branch():
'feature/proper_version'
"""
branch = _shell_command(['/usr/bin/git', 'symbolic-... |
mdn__kuma-6331 | TypeError in get_seo_description
https://sentry.prod.mozaws.net/operations/mdn-prod/issues/6740633/
```
TypeError: sequence item 0: expected str instance, NoneType found
(21 additional frame(s) were not displayed)
...
File "kuma/wiki/models.py", line 69, in wrapper
field_val = fn(self, force_fresh=force_fresh)
... | [
{
"content": "import re\nfrom collections import defaultdict\nfrom urllib.parse import unquote, urlencode, urlparse, urlsplit\nfrom xml.sax.saxutils import quoteattr\n\nimport bleach\nimport html5lib\nimport newrelic.agent\nfrom django.conf import settings\nfrom django.utils.translation import ugettext\nfrom ht... | [
{
"content": "import re\nfrom collections import defaultdict\nfrom urllib.parse import unquote, urlencode, urlparse, urlsplit\nfrom xml.sax.saxutils import quoteattr\n\nimport bleach\nimport html5lib\nimport newrelic.agent\nfrom django.conf import settings\nfrom django.utils.translation import ugettext\nfrom ht... | diff --git a/kuma/wiki/content.py b/kuma/wiki/content.py
index 317a19a4796..143f7c5f62b 100644
--- a/kuma/wiki/content.py
+++ b/kuma/wiki/content.py
@@ -239,7 +239,7 @@ def get_seo_description(content, locale=None, strip_markup=True):
seo_summary = summaryClasses.text()
else:
... |
liqd__a4-meinberlin-3044 | [dev/stage] auto-fill-in overwrites my bplan-name
**URL:** https://meinberlin-stage.liqd.net/dashboard/projects/caro-testing-new-bplan-mail-2/bplan/
**user:** initiator addin bplan
**expected behaviour:** I can use autofill to add my mail-address
**behaviour:** if I do so, the title of bplan is overwritten by my nam... | [
{
"content": "from django import forms\n\nfrom meinberlin.apps.extprojects.forms import ExternalProjectCreateForm\nfrom meinberlin.apps.extprojects.forms import ExternalProjectForm\n\nfrom . import models\n\n\nclass StatementForm(forms.ModelForm):\n class Meta:\n model = models.Statement\n fiel... | [
{
"content": "from django import forms\n\nfrom meinberlin.apps.extprojects.forms import ExternalProjectCreateForm\nfrom meinberlin.apps.extprojects.forms import ExternalProjectForm\n\nfrom . import models\n\n\nclass StatementForm(forms.ModelForm):\n class Meta:\n model = models.Statement\n fiel... | diff --git a/meinberlin/apps/bplan/forms.py b/meinberlin/apps/bplan/forms.py
index 22feaecd0a..c405c71a33 100644
--- a/meinberlin/apps/bplan/forms.py
+++ b/meinberlin/apps/bplan/forms.py
@@ -29,3 +29,9 @@ class Meta:
'start_date', 'end_date']
required_for_project_publish = ['name', 'url', 'd... |
scikit-image__scikit-image-4589 | Negative eigenvalue in inertia_tensor_eigvals due to floating point precision
## Description
skimage.measure.inertia_tensor_eigvals can return a very slightly negative eigenvalue even though it is given a value of mu that should yield a positive semidefinite matrix with only non-negative eigenvalues. Subsequently taki... | [
{
"content": "import numpy as np\nfrom .._shared.utils import check_nD\nfrom . import _moments_cy\nimport itertools\n\n\ndef moments_coords(coords, order=3):\n \"\"\"Calculate all raw image moments up to a certain order.\n\n The following properties can be calculated from raw image moments:\n * Area a... | [
{
"content": "import numpy as np\nfrom .._shared.utils import check_nD\nfrom . import _moments_cy\nimport itertools\n\n\ndef moments_coords(coords, order=3):\n \"\"\"Calculate all raw image moments up to a certain order.\n\n The following properties can be calculated from raw image moments:\n * Area a... | diff --git a/skimage/measure/_moments.py b/skimage/measure/_moments.py
index f19f19f3647..11b62946388 100644
--- a/skimage/measure/_moments.py
+++ b/skimage/measure/_moments.py
@@ -445,4 +445,9 @@ def inertia_tensor_eigvals(image, mu=None, T=None):
if T is None:
T = inertia_tensor(image, mu)
eigvals ... |
rootpy__rootpy-740 | root styled fillstyle code
When I do
```python
import rootpy.ROOT as ROOT
h = ROOT.Hist(0,100,100)
h.fillstyle = 3001
```
I get this error:
```
h.fillstyle=3001
---------------------------------------------------------------------------
ValueError Traceback (most recent call las... | [
{
"content": "# Copyright 2012 the rootpy developers\n# distributed under the terms of the GNU General Public License\n\"\"\"\nThis module contains base classes defining core funcionality\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom functools import wraps\nimport warnings\nimport sys\n\nimport ROOT\n... | [
{
"content": "# Copyright 2012 the rootpy developers\n# distributed under the terms of the GNU General Public License\n\"\"\"\nThis module contains base classes defining core funcionality\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom functools import wraps\nimport warnings\nimport sys\n\nimport ROOT\n... | diff --git a/rootpy/plotting/base.py b/rootpy/plotting/base.py
index 60538197..4c1a0fb2 100644
--- a/rootpy/plotting/base.py
+++ b/rootpy/plotting/base.py
@@ -549,7 +549,10 @@ class _StyleContainer(object):
def __init__(self, value, function):
self._input = value
self._root = function(value, 'roo... |
flairNLP__flair-1877 | AttributeError using de-offensive-language
I tried to use the TextClassifier with '_de-offensive-language_':
```
classifier = TextClassifier.load('de-offensive-language')
sentence = Sentence('Das gefällt mir nicht.')
# predict has a Bug
classifier.predict(sentence)
```
I get the following Error:en-senti... | [
{
"content": "import logging\nfrom pathlib import Path\nfrom typing import List, Union, Dict, Optional\n\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data.dataset import Dataset\nfrom tqdm import tqdm\nimport numpy as np\n\nimport sklearn.metrics as metrics\nimport flair.nn\nimport flair.embeddings\nf... | [
{
"content": "import logging\nfrom pathlib import Path\nfrom typing import List, Union, Dict, Optional\n\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data.dataset import Dataset\nfrom tqdm import tqdm\nimport numpy as np\n\nimport sklearn.metrics as metrics\nimport flair.nn\nimport flair.embeddings\nf... | diff --git a/flair/models/text_classification_model.py b/flair/models/text_classification_model.py
index 5938bf0c50..f6305464ac 100644
--- a/flair/models/text_classification_model.py
+++ b/flair/models/text_classification_model.py
@@ -462,7 +462,7 @@ def _fetch_model(model_name) -> str:
hu_path: str = "https:/... |
ipython__ipython-4092 | nbconvert can't handle Heading with Chinese characters on Japanese Windows OS.
Convert following notebook by `ipython nbconvert test.ipynb` will raise Exception:
```
File "C:\Python27\lib\site-packages\ipython-1.0.0_dev-py2.7.egg\IPython\nbconv
ert\filters\strings.py", line 83, in add_anchor
h = ElementTree.from... | [
{
"content": "# coding: utf-8\n\"\"\"String filters.\n\nContains a collection of useful string manipulation filters for use in Jinja\ntemplates.\n\"\"\"\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, the IPython Development Team.\n#\n# Distributed under th... | [
{
"content": "# coding: utf-8\n\"\"\"String filters.\n\nContains a collection of useful string manipulation filters for use in Jinja\ntemplates.\n\"\"\"\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, the IPython Development Team.\n#\n# Distributed under th... | diff --git a/IPython/nbconvert/filters/strings.py b/IPython/nbconvert/filters/strings.py
index 4b8d78f21d3..36d8b4bda2f 100755
--- a/IPython/nbconvert/filters/strings.py
+++ b/IPython/nbconvert/filters/strings.py
@@ -80,7 +80,7 @@ def add_anchor(html):
For use in heading cells
"""
- h = ElementTree.f... |
comic__grand-challenge.org-1064 | Duplicate email to algorithm user that is also an editor when job fails
A tiny improvement request: When an algorithm job fails, the editors and the job creator are emailed (#1018), but there is apparently no check whether the job creator is one of the algorithm editor and would receive an email anyway - I was testing ... | [
{
"content": "from django.conf import settings\nfrom django.contrib.sites.models import Site\nfrom django.core.mail import send_mail\n\nfrom grandchallenge.core.utils.email import send_templated_email\nfrom grandchallenge.evaluation.templatetags.evaluation_extras import user_error\n\n\ndef send_permission_reque... | [
{
"content": "from django.conf import settings\nfrom django.contrib.sites.models import Site\nfrom django.core.mail import send_mail\n\nfrom grandchallenge.core.utils.email import send_templated_email\nfrom grandchallenge.evaluation.templatetags.evaluation_extras import user_error\n\n\ndef send_permission_reque... | diff --git a/app/grandchallenge/algorithms/emails.py b/app/grandchallenge/algorithms/emails.py
index fc57a1f305..3dbdc493e7 100644
--- a/app/grandchallenge/algorithms/emails.py
+++ b/app/grandchallenge/algorithms/emails.py
@@ -99,7 +99,8 @@ def send_failed_job_email(job):
o.email for o in algorithm.editors_gro... |
geopandas__geopandas-202 | Remove mapquest from geocoder
The mapquest API is now only available to enterprise customers and has been removed from geopy.
See [geopy docs](https://geopy.readthedocs.org/en/1.10.0/#id4)
| [
{
"content": "from collections import defaultdict\nimport time\n\nfrom fiona.crs import from_epsg\nimport numpy as np\nimport pandas as pd\nfrom shapely.geometry import Point\nfrom six import iteritems\n\nimport geopandas as gpd\n\n\ndef _throttle_time(provider):\n \"\"\" Amount of time to wait between reque... | [
{
"content": "from collections import defaultdict\nimport time\n\nfrom fiona.crs import from_epsg\nimport numpy as np\nimport pandas as pd\nfrom shapely.geometry import Point\nfrom six import iteritems\n\nimport geopandas as gpd\n\n\ndef _throttle_time(provider):\n \"\"\" Amount of time to wait between reque... | diff --git a/.travis.yml b/.travis.yml
index c2ddc0fde4..77fd627375 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,7 +8,7 @@ python:
env:
- PANDAS_VERSION=v0.15.2
- - PANDAS_VERSION=v0.16.0
+ - PANDAS_VERSION=v0.16.2
- PANDAS_VERSION=master
before_install:
diff --git a/geopandas/tools/geocoding.py b/geo... |
OpenCTI-Platform__connectors-292 | [MISP] ERROR:root:search() keywords must be strings
## Description
I want to integrate MISP with OpenCTI. The connector errors and doesn't import events.
How do I debug this?
## Environment
1. OS (where OpenCTI server runs): https://github.com/OpenCTI-Platform/docker host: Debian 10
2. OpenCTI version: 4.3.0
... | [
{
"content": "import os\nimport yaml\nimport time\nimport json\n\nfrom datetime import datetime\nfrom dateutil.parser import parse\nfrom pymisp import ExpandedPyMISP\nfrom stix2 import (\n Bundle,\n Identity,\n IntrusionSet,\n Malware,\n Tool,\n AttackPattern,\n Report,\n Indicator,\n ... | [
{
"content": "import os\nimport yaml\nimport time\nimport json\n\nfrom datetime import datetime\nfrom dateutil.parser import parse\nfrom pymisp import ExpandedPyMISP\nfrom stix2 import (\n Bundle,\n Identity,\n IntrusionSet,\n Malware,\n Tool,\n AttackPattern,\n Report,\n Indicator,\n ... | diff --git a/misp/src/misp.py b/misp/src/misp.py
index f943ce62ed..453b48f354 100644
--- a/misp/src/misp.py
+++ b/misp/src/misp.py
@@ -206,6 +206,7 @@ def run(self):
self.helper.log_info(
"Fetching MISP events with args: " + json.dumps(kwargs)
)
+ kw... |
obspy__obspy-1916 | Invalid version schema "0.0.0.dev+.gXXX" - may not work with newer versions of setuptools, pip, and PyPI
```C:\Miniconda-x64\envs\test\lib\site-packages\setuptools\dist.py:350: UserWarning: The version specified (u'0.0.0.dev+.g5c641b2cb1') is an invalid version, this may not work as expected with newer versions of setu... | [
{
"content": "# -*- coding: utf-8 -*-\n# Author: Douglas Creager <dcreager@dcreager.net>\n# This file is placed into the public domain.\n\n# Calculates the current version number. If possible, this is the\n# output of “git describe”, modified to conform to the versioning\n# scheme that setuptools uses. If “gi... | [
{
"content": "# -*- coding: utf-8 -*-\n# Author: Douglas Creager <dcreager@dcreager.net>\n# This file is placed into the public domain.\n\n# Calculates the current version number. If possible, this is the\n# output of “git describe”, modified to conform to the versioning\n# scheme that setuptools uses. If “gi... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index a33f1c94f3e..4c3de4f6833 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -11,6 +11,8 @@ master: (doi: 10.5281/zenodo.165135)
* Client to access the Nominal Response Library (NRL) (see #1185).
* `obspy.read_inventory()` can now read dataless SEED and RESP files
... |
nautobot__nautobot-2041 | Create a job with IntegerVar and having the default set to 0 evaluates to False.
<!--
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
This form is only for reporting reproducible bugs. If you need assistance
with Nautobot installation, or if you have a general question, please sta... | [
{
"content": "\"\"\"Jobs functionality - consolidates and replaces legacy \"custom scripts\" and \"reports\" features.\"\"\"\nfrom collections import OrderedDict\nimport inspect\nimport json\nimport logging\nimport os\nimport shutil\nfrom textwrap import dedent\nimport traceback\nimport warnings\n\n\nfrom cache... | [
{
"content": "\"\"\"Jobs functionality - consolidates and replaces legacy \"custom scripts\" and \"reports\" features.\"\"\"\nfrom collections import OrderedDict\nimport inspect\nimport json\nimport logging\nimport os\nimport shutil\nfrom textwrap import dedent\nimport traceback\nimport warnings\n\n\nfrom cache... | diff --git a/nautobot/extras/jobs.py b/nautobot/extras/jobs.py
index 146eaaff072..464467ec30b 100644
--- a/nautobot/extras/jobs.py
+++ b/nautobot/extras/jobs.py
@@ -608,7 +608,7 @@ def __init__(self, label="", description="", default=None, required=True, widget
self.field_attrs["label"] = label
if... |
sktime__sktime-176 | [BUG] EnsembleForecaster keeps adding estimators when called multiple times
**Describe the bug**
The fitting function in `EnsembleForecaster` keeps adding estimators each time it is called without removing any prior fits. This does not change behaviour for if the estimators are deterministic but might do so if they in... | [
{
"content": "import pandas as pd\nimport numpy as np\nfrom sklearn.base import clone\nfrom sklearn.utils.validation import check_is_fitted\n\nfrom sktime.utils.validation.forecasting import validate_fh\nfrom sktime.utils.time_series import RollingWindowSplit\nfrom sktime.forecasters.base import BaseForecaster\... | [
{
"content": "import pandas as pd\nimport numpy as np\nfrom sklearn.base import clone\nfrom sklearn.utils.validation import check_is_fitted\n\nfrom sktime.utils.validation.forecasting import validate_fh\nfrom sktime.utils.time_series import RollingWindowSplit\nfrom sktime.forecasters.base import BaseForecaster\... | diff --git a/sktime/forecasters/compose.py b/sktime/forecasters/compose.py
index 406fb936e85..db9218d4050 100644
--- a/sktime/forecasters/compose.py
+++ b/sktime/forecasters/compose.py
@@ -60,6 +60,9 @@ def fit(self, y, fh=None, X=None):
# validate forecasting horizon
fh = validate_fh(fh)
+ #... |
psychopy__psychopy-1838 | Error raised closing Monitor Center
The following SystemError is raised when closing Monitor Center in version 1.90.1 PY3:
```
wx._core.wxAssertionError: C++ assertion "m_count > 0" failed at ..\..\src\common\object.cpp(352) in wxRefCounter::DecRef(): invalid ref data count
The above exception was the direct cause... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Part of the PsychoPy library\n# Copyright (C) 2018 Jonathan Peirce\n# Distributed under the terms of the GNU General Public License (GPL).\n\nfrom __future__ import absolute_import, print_function\n\nfrom builtins import map\nfrom builtins import... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Part of the PsychoPy library\n# Copyright (C) 2018 Jonathan Peirce\n# Distributed under the terms of the GNU General Public License (GPL).\n\nfrom __future__ import absolute_import, print_function\n\nfrom builtins import map\nfrom builtins import... | diff --git a/psychopy/monitors/MonitorCenter.py b/psychopy/monitors/MonitorCenter.py
index 848a7e8b38..b6cd1edc5d 100755
--- a/psychopy/monitors/MonitorCenter.py
+++ b/psychopy/monitors/MonitorCenter.py
@@ -90,6 +90,7 @@ def __init__(self, parent, id=-1, rows=(), cols=(), data=None):
for nRow in range(self.nRo... |
jupyterhub__jupyterhub-1793 | Jupyterhub prespawn hook to modify spawner args
Hi,
I'm trying to use the prespawn hook function modify the spawner notebook directory but it seems that its not getting picked up.
I'm using Jupyterhub 0.8.1 and LocalProcessSpawner. I've modified the jupyterhub_config.py and added the following:
```
def noteb... | [
{
"content": "\"\"\"\nContains base Spawner class & default implementation\n\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport errno\nimport json\nimport os\nimport pipes\nimport shutil\nimport signal\nimport sys\nimport warnings\nfrom subpr... | [
{
"content": "\"\"\"\nContains base Spawner class & default implementation\n\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport errno\nimport json\nimport os\nimport pipes\nimport shutil\nimport signal\nimport sys\nimport warnings\nfrom subpr... | diff --git a/jupyterhub/spawner.py b/jupyterhub/spawner.py
index 35b625ba5b..1d5a67eb44 100644
--- a/jupyterhub/spawner.py
+++ b/jupyterhub/spawner.py
@@ -667,7 +667,7 @@ def get_args(self):
if self.port:
args.append('--port=%i' % self.port)
- elif self.server.port:
+ elif self.ser... |
mitmproxy__mitmproxy-4845 | WebSocket view jumps to top on new message
The WebSocket view keeps jumping to the top every time a new message arrives. This makes it basically impossible to work with while the connection is open. I hold down arrow -> it scrolls a bit -> message arrives -> I'm back at the top
_Originally posted by @Prinzhorn in ht... | [
{
"content": "import urwid\n\nfrom mitmproxy.tools.console import signals\n\n\nclass Highlight(urwid.AttrMap):\n\n def __init__(self, t):\n urwid.AttrMap.__init__(\n self,\n urwid.Text(t.text),\n \"focusfield\",\n )\n self.backup = t\n\n\nclass Searchable... | [
{
"content": "import urwid\n\nfrom mitmproxy.tools.console import signals\n\n\nclass Highlight(urwid.AttrMap):\n\n def __init__(self, t):\n urwid.AttrMap.__init__(\n self,\n urwid.Text(t.text),\n \"focusfield\",\n )\n self.backup = t\n\n\nclass Searchable... | diff --git a/mitmproxy/tools/console/searchable.py b/mitmproxy/tools/console/searchable.py
index f2bb56126e..241ac40176 100644
--- a/mitmproxy/tools/console/searchable.py
+++ b/mitmproxy/tools/console/searchable.py
@@ -19,6 +19,7 @@ class Searchable(urwid.ListBox):
def __init__(self, contents):
self.walke... |
beetbox__beets-3837 | chroma: Submission fails if fingerprint already exists
<!--
Describe your problem, feature request, or discussion topic here.
Please fill out this and the "Setup" section below and remember to include
enough detail so that other people can reproduce the problem.
-->
Hi there,
### Problem
Running th... | [
{
"content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in... | [
{
"content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in... | diff --git a/beetsplug/chroma.py b/beetsplug/chroma.py
index 20d0f54791..91f2fe2533 100644
--- a/beetsplug/chroma.py
+++ b/beetsplug/chroma.py
@@ -329,7 +329,7 @@ def fingerprint_item(log, item, write=False):
else:
log.info(u'{0}: using existing fingerprint',
util.displayable... |
pypi__warehouse-12440 | Doom transaction if `request.user` is None
Fixes #12422.
| [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/tests/unit/test_db.py b/tests/unit/test_db.py
index 89697d040e82..ab4fc4558e19 100644
--- a/tests/unit/test_db.py
+++ b/tests/unit/test_db.py
@@ -164,7 +164,11 @@ def test_create_session(monkeypatch, pyramid_services):
(None, False, []),
(pretend.stub(enabled=False), True, []),
(... |
dask__dask-2634 | String Accessors in Converted DataFrame Columns
Whenever I try to access strings in a dataframe which are previously converted to strings (ie. datall[['A']] = datall[['A']].applymap(str) and then datall['A']=datall['A'].str[:5]) I get a TypeError: 'StringAccessor' object has no attribute '__getitem__'.
This is repro... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport numpy as np\nimport pandas as pd\nfrom toolz import partial\n\nfrom ..utils import derived_from\n\n\ndef maybe_wrap_pandas(obj, x):\n if isinstance(x, np.ndarray):\n if isinstance(obj, pd.Series):\n ret... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport numpy as np\nimport pandas as pd\nfrom toolz import partial\n\nfrom ..utils import derived_from\n\n\ndef maybe_wrap_pandas(obj, x):\n if isinstance(x, np.ndarray):\n if isinstance(obj, pd.Series):\n ret... | diff --git a/dask/dataframe/accessor.py b/dask/dataframe/accessor.py
index 0ef476be98e..967ab833319 100644
--- a/dask/dataframe/accessor.py
+++ b/dask/dataframe/accessor.py
@@ -115,3 +115,12 @@ def _validate(self, series):
@derived_from(pd.core.strings.StringMethods)
def split(self, pat=None, n=-1):
... |
google__turbinia-1005 | create_request() always uses default_recipe
Fix an issue with create_request() where it always uses the default recipe
```def create_request(
self, request_id=None, group_id=None, requester=None, recipe=None,
context=None, evidence_=None):
"""Wrapper method to create a Turbinia request."""
defa... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2017 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2017 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U... | diff --git a/turbinia/client.py b/turbinia/client.py
index c2e8ef045..ba7c4aecf 100644
--- a/turbinia/client.py
+++ b/turbinia/client.py
@@ -250,7 +250,8 @@ def create_request(
default_recipe = self.create_recipe()
request = TurbiniaRequest(
request_id=request_id, group_id=group_id, requester=request... |
abey79__vpype-144 | Doesn't have support for outputting a2 to a0 paper sizes
I was hoping to output some large paper sizes to plot.
the error messages were the same for paper sizes a2 to a0
```
Traceback (most recent call last):
File "/usr/local/bin/vpype", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3... | [
{
"content": "import logging\nimport math\nimport re\nfrom typing import Callable, Dict, List, Tuple, Union\n\nimport click\nimport numpy as np\n\n# REMINDER: anything added here must be added to docs/api.rst\n__all__ = [\n \"UNITS\",\n \"ANGLE_UNITS\",\n \"PAGE_SIZES\",\n \"LengthType\",\n \"Ang... | [
{
"content": "import logging\nimport math\nimport re\nfrom typing import Callable, Dict, List, Tuple, Union\n\nimport click\nimport numpy as np\n\n# REMINDER: anything added here must be added to docs/api.rst\n__all__ = [\n \"UNITS\",\n \"ANGLE_UNITS\",\n \"PAGE_SIZES\",\n \"LengthType\",\n \"Ang... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3d3f2c9f..1eccc345 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
New features and improvements:
* Minor loading time improvement (#133)
+* Added large format paper sizes (A2, A1, A0) (#144)
#### 1.2.1 (2020-12-26)
diff --git a/vpype/utils.py b/vpype... |
scrapy__scrapy-2503 | scrapy view <url> raise exc in v1.3.0
````
(py35) wingyiu@mbp101:~$scrapy view http://www.scrapy.org
2017-01-19 22:13:54 [scrapy.utils.log] INFO: Scrapy 1.3.0 started (bot: scrapybot)
2017-01-19 22:13:54 [scrapy.utils.log] INFO: Overridden settings: {}
Traceback (most recent call last):
File "/Users/user/venv/py... | [
{
"content": "from scrapy.commands import fetch, ScrapyCommand\nfrom scrapy.utils.response import open_in_browser\n\nclass Command(fetch.Command):\n\n def short_desc(self):\n return \"Open URL in browser, as seen by Scrapy\"\n\n def long_desc(self):\n return \"Fetch a URL using the Scrapy do... | [
{
"content": "from scrapy.commands import fetch, ScrapyCommand\nfrom scrapy.utils.response import open_in_browser\n\nclass Command(fetch.Command):\n\n def short_desc(self):\n return \"Open URL in browser, as seen by Scrapy\"\n\n def long_desc(self):\n return \"Fetch a URL using the Scrapy do... | diff --git a/docs/topics/commands.rst b/docs/topics/commands.rst
index 6636c30cbeb..eaeeee113f4 100644
--- a/docs/topics/commands.rst
+++ b/docs/topics/commands.rst
@@ -358,6 +358,12 @@ Opens the given URL in a browser, as your Scrapy spider would "see" it.
Sometimes spiders see pages differently from regular users, s... |
microsoft__qlib-1246 | Misleading Error "Please install necessary libs for CatBoostModel."
## 🐛 Bug Description
Qlib does not require the installation of packages like `CatBoostModel`
But the output looks a little misleading.
## To Reproduce
Run `examples/workflow_by_code.ipynb` in jupyter notebook.
## Expected Behavior
Su... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT License.\ntry:\n from .catboost_model import CatBoostModel\nexcept ModuleNotFoundError:\n CatBoostModel = None\n print(\"Please install necessary libs for CatBoostModel.\")\ntry:\n from .double_ensemble import DEnsembleMo... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT License.\ntry:\n from .catboost_model import CatBoostModel\nexcept ModuleNotFoundError:\n CatBoostModel = None\n print(\"ModuleNotFoundError. CatBoostModel are skipped. (optional: maybe installing CatBoostModel can fix it.)\... | diff --git a/qlib/contrib/model/__init__.py b/qlib/contrib/model/__init__.py
index c98f936acd..5d4d5f2e69 100644
--- a/qlib/contrib/model/__init__.py
+++ b/qlib/contrib/model/__init__.py
@@ -4,7 +4,7 @@
from .catboost_model import CatBoostModel
except ModuleNotFoundError:
CatBoostModel = None
- print("Ple... |
cloudtools__troposphere-324 | RDS ValueError on LicenseModel
I'm hitting a similar problem to #316, Postgres instances only use the string `'postgresql-license'` for the LicenseModel parameter and I'm getting a ValueError:
```
ValueError: DBInstance LicenseModel must be one of: license-included, bring-your-own-license, general-public-license
```
... | [
{
"content": "# Copyright (c) 2013, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nimport re\n\nfrom . import AWSHelperFn, AWSObject, AWSProperty, Ref\nfrom .validators import boolean, network_port, integer, positive_integer\n\n# Taken from:\n# http://docs.aws.amaz... | [
{
"content": "# Copyright (c) 2013, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nimport re\n\nfrom . import AWSHelperFn, AWSObject, AWSProperty, Ref\nfrom .validators import boolean, network_port, integer, positive_integer\n\n# Taken from:\n# http://docs.aws.amaz... | diff --git a/troposphere/rds.py b/troposphere/rds.py
index 02994916c..2bca95eb3 100644
--- a/troposphere/rds.py
+++ b/troposphere/rds.py
@@ -16,7 +16,7 @@
'sqlserver-ee', 'sqlserver-se', 'sqlserver-ex',
'sqlserver-web', 'postgres')
VALID_LICENSE_MODELS = ('license-included', '... |
wagtail__wagtail-554 | Search: Boosting the title to 100 is a bit extreme
I've not done any formal testing of this, but I think a value around 2 - 3 will be more appropriate.
| [
{
"content": "import warnings\n\nimport six\nfrom six import string_types\nfrom six import StringIO\nfrom six.moves.urllib.parse import urlparse\n\nfrom modelcluster.models import ClusterableModel, get_all_child_relations\n\nfrom django.db import models, connection, transaction\nfrom django.db.models import Q\n... | [
{
"content": "import warnings\n\nimport six\nfrom six import string_types\nfrom six import StringIO\nfrom six.moves.urllib.parse import urlparse\n\nfrom modelcluster.models import ClusterableModel\n\nfrom django.db import models, connection, transaction\nfrom django.db.models import get_model, Q\nfrom django.ht... | diff --git a/docs/core_components/search/for_python_developers.rst b/docs/core_components/search/for_python_developers.rst
index b99795e7bffa..a38325cca6c7 100644
--- a/docs/core_components/search/for_python_developers.rst
+++ b/docs/core_components/search/for_python_developers.rst
@@ -82,7 +82,7 @@ Options
```````
... |
scverse__scanpy-2965 | sc.get.aggregate looses values
### Please make sure these conditions are met
- [X] I have checked that this issue has not already been reported.
- [X] I have confirmed this bug exists on the latest version of scanpy.
- [ ] (optional) I have confirmed this bug exists on the main branch of scanpy.
### What happen... | [
{
"content": "from __future__ import annotations\n\nfrom functools import singledispatch\nfrom typing import TYPE_CHECKING, Literal, Union, get_args\n\nimport numpy as np\nimport pandas as pd\nfrom anndata import AnnData, utils\nfrom scipy import sparse\n\nfrom .._utils import _resolve_axis\nfrom .get import _c... | [
{
"content": "from __future__ import annotations\n\nfrom functools import singledispatch\nfrom typing import TYPE_CHECKING, Literal, Union, get_args\n\nimport numpy as np\nimport pandas as pd\nfrom anndata import AnnData, utils\nfrom scipy import sparse\n\nfrom .._utils import _resolve_axis\nfrom .get import _c... | diff --git a/docs/release-notes/1.10.1.md b/docs/release-notes/1.10.1.md
new file mode 100644
index 0000000000..282d2297ca
--- /dev/null
+++ b/docs/release-notes/1.10.1.md
@@ -0,0 +1,13 @@
+### 1.10.1 {small}`the future`
+
+
+```{rubric} Docs
+```
+
+```{rubric} Bug fixes
+```
+
+* Fix `aggregate` when aggregating by m... |
translate__translate-4383 | Proposing a PR to fix a few small typos
# Issue Type
[x] Bug (Typo)
# Steps to Replicate and Expected Behaviour
- Examine translate/convert/test_po2dtd.py and observe `preseve`, however expect to see `preserve`.
- Examine translate/filters/test_checks.py and observe `placeholds`, however expect to see `placeholder`.... | [
{
"content": "#\n# Copyright 2004-2006 Zuza Software Foundation\n#\n# This file is part of translate.\n#\n# translate is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, ... | [
{
"content": "#\n# Copyright 2004-2006 Zuza Software Foundation\n#\n# This file is part of translate.\n#\n# translate is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, ... | diff --git a/translate/convert/convert.py b/translate/convert/convert.py
index ab899ea231..0fcbce8357 100644
--- a/translate/convert/convert.py
+++ b/translate/convert/convert.py
@@ -489,7 +489,7 @@ def recursiveprocess(self, options):
def processfile(
self, fileprocessor, options, fullinputpath, fulloutp... |
frappe__frappe-22486 | TypeError: 'NoneType' object is not iterable
Getting this everywhere inside desk.
```
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 108, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 53, in handle
return _RESTAPIHandler(call, doctype, ... | [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# License: MIT. See LICENSE\n\nimport json\n\nfrom bs4 import BeautifulSoup\n\nimport frappe\nfrom frappe import _\nfrom frappe.desk.doctype.notification_log.notification_log import (\n\tenqueue_create_notification,\n\tget_title... | [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# License: MIT. See LICENSE\n\nimport json\n\nfrom bs4 import BeautifulSoup\n\nimport frappe\nfrom frappe import _\nfrom frappe.desk.doctype.notification_log.notification_log import (\n\tenqueue_create_notification,\n\tget_title... | diff --git a/frappe/desk/notifications.py b/frappe/desk/notifications.py
index f0470566ac84..4c728bdee99f 100644
--- a/frappe/desk/notifications.py
+++ b/frappe/desk/notifications.py
@@ -311,7 +311,7 @@ def get_internal_links(doc, link, link_doctype):
elif isinstance(link, list):
# get internal links in child docu... |
ansible__ansible-lint-2398 | False positive load-failure when using import_tasks / include_tasks inside a block
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and main branch are affected too -->
##### Summary
<!--- Explain the problem briefly below -->
PR #2202 for #1446 fixe... | [
{
"content": "# Copyright (c) 2013-2014 Will Thames <will@thames.id.au>\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 r... | [
{
"content": "# Copyright (c) 2013-2014 Will Thames <will@thames.id.au>\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 r... | diff --git a/examples/playbooks/test_include_inplace.yml b/examples/playbooks/test_include_inplace.yml
index 5c6cffb46c..0f4cf2cbb6 100644
--- a/examples/playbooks/test_include_inplace.yml
+++ b/examples/playbooks/test_include_inplace.yml
@@ -1,4 +1,5 @@
---
-- hosts: all
+- name: Test fixture
+ hosts: all
roles:
... |
frappe__frappe-13293 | sendmail stopped working after recent changes
## Description of the issue
The functionality to send mail stopped working after upgrading frappe to the latest version.
## Context information (for bug reports)
**Output of `bench version`**
```
$ bench version
community 0.0.1
frappe 13.x.x-develop
mon_schoo... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Frappe Technologies and contributors\n# For license information, please see license.txt\n\nimport traceback\nimport json\n\nfrom rq.timeouts import JobTimeoutException\nimport smtplib\nimport quopri\nfrom email.parser import Parser\n\nimport frappe\nf... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Frappe Technologies and contributors\n# For license information, please see license.txt\n\nimport traceback\nimport json\n\nfrom rq.timeouts import JobTimeoutException\nimport smtplib\nimport quopri\nfrom email.parser import Parser\n\nimport frappe\nf... | diff --git a/frappe/email/doctype/email_queue/email_queue.py b/frappe/email/doctype/email_queue/email_queue.py
index 076dfc541742..9ed8c2c71498 100644
--- a/frappe/email/doctype/email_queue/email_queue.py
+++ b/frappe/email/doctype/email_queue/email_queue.py
@@ -102,7 +102,7 @@ def send(self, is_background_task=False):... |
helmholtz-analytics__heat-1095 | [Bug]: convolve with distributed kernel on multiple GPUs
### What happened?
convolve does not work if the kernel is distributed when more than one GPU is available.
### Code snippet triggering the error
```python
import heat as ht
dis_signal = ht.arange(0, 16, split=0, device='gpu', dtype=ht.int)
dis_kern... | [
{
"content": "\"\"\"Provides a collection of signal-processing operations\"\"\"\n\nimport torch\nimport numpy as np\n\nfrom .communication import MPI\nfrom .dndarray import DNDarray\nfrom .types import promote_types\nfrom .manipulations import pad, flip\nfrom .factories import array, zeros\nimport torch.nn.func... | [
{
"content": "\"\"\"Provides a collection of signal-processing operations\"\"\"\n\nimport torch\nimport numpy as np\n\nfrom .communication import MPI\nfrom .dndarray import DNDarray\nfrom .types import promote_types\nfrom .manipulations import pad, flip\nfrom .factories import array, zeros\nimport torch.nn.func... | diff --git a/heat/core/signal.py b/heat/core/signal.py
index aab6b4d113..3274620927 100644
--- a/heat/core/signal.py
+++ b/heat/core/signal.py
@@ -156,7 +156,8 @@ def convolve(a: DNDarray, v: DNDarray, mode: str = "full") -> DNDarray:
size = v.comm.size
for r in range(size):
- rec_v = v.c... |
pyca__cryptography-4289 | Raise clearer error message when passing a unicode value as a symmetric key
Python: 2.7.3
cryptography==2.1.4
cffi==1.11.5
pip 9.0.1
```
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend
import os
iv = os.urandom(16)
cipher... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nfrom cryptography import utils\nfrom cryptogr... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nfrom cryptography import utils\nfrom cryptogr... | diff --git a/src/cryptography/hazmat/primitives/ciphers/algorithms.py b/src/cryptography/hazmat/primitives/ciphers/algorithms.py
index 99a837e4e1d0..68a9e33085fe 100644
--- a/src/cryptography/hazmat/primitives/ciphers/algorithms.py
+++ b/src/cryptography/hazmat/primitives/ciphers/algorithms.py
@@ -12,6 +12,9 @@
de... |
elastic__apm-agent-python-1185 | Cannot startup fastapi with apm
With start apm in docker, I just set up agent in fastapi. Then I run app with uvicorn, it hangs.
**To Reproduce**
1. Start Service with docker compose [Reference](https://www.elastic.co/guide/en/apm/get-started/current/quick-start-overview.html)
 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/contrib/starlette/__init__.py b/elasticapm/contrib/starlette/__init__.py
index 62bebf0ab..db52cc395 100644
--- a/elasticapm/contrib/starlette/__init__.py
+++ b/elasticapm/contrib/starlette/__init__.py
@@ -130,6 +130,9 @@ async def __call__(self, scope, receive, send):
receive: recei... |
getpelican__pelican-1698 | pelican-quickstart crashes on setting timezone
> What is your time zone? [Europe/Paris]
> Traceback (most recent call last):
> File "/usr/bin/pelican-quickstart", line 9, in <module>
> load_entry_point('pelican==3.5.0', 'console_scripts', 'pelican-quickstart')()
> File "/usr/lib/python3.4/site-packages/pelican... | [
{
"content": "#!/usr/bin/env python\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport six\n\nimport os\nimport string\nimport argparse\nimport sys\nimport codecs\nimport pytz\n\nfrom pelican import __version__\n\n_TEMPLATES_DIR = os.path.join(os.path.dirname(os.path.abs... | [
{
"content": "#!/usr/bin/env python\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport six\n\nimport os\nimport string\nimport argparse\nimport sys\nimport codecs\nimport pytz\n\nfrom pelican import __version__\n\n_TEMPLATES_DIR = os.path.join(os.path.dirname(os.path.abs... | diff --git a/pelican/tools/pelican_quickstart.py b/pelican/tools/pelican_quickstart.py
index 74633630f..2f1129dcb 100755
--- a/pelican/tools/pelican_quickstart.py
+++ b/pelican/tools/pelican_quickstart.py
@@ -162,7 +162,7 @@ def ask(question, answer=str_compat, default=None, l=None):
def ask_timezone(question, defau... |
opsdroid__opsdroid-1985 | Match @mention regex
Hi,
This is a general question, and I couldn't find any information in the documentation.
I would like the bot to capture a user/team mention in slack - "@devopsteam" for example.
The channel user mention a group (which is not the bot), and I would like to capture the message and create a ti... | [
{
"content": "\"\"\"A connector for Slack.\"\"\"\n\nimport asyncio\nimport json\nimport logging\nimport os\nimport re\nimport ssl\nimport time\nimport urllib.parse\n\nimport aiohttp\nimport arrow\nimport certifi\nimport opsdroid.events\nfrom emoji import demojize\nfrom opsdroid.connector import Connector, regis... | [
{
"content": "\"\"\"A connector for Slack.\"\"\"\n\nimport asyncio\nimport json\nimport logging\nimport os\nimport re\nimport ssl\nimport time\nimport urllib.parse\n\nimport aiohttp\nimport arrow\nimport certifi\nimport opsdroid.events\nfrom emoji import demojize\nfrom opsdroid.connector import Connector, regis... | diff --git a/opsdroid/connector/slack/connector.py b/opsdroid/connector/slack/connector.py
index 9eb4328c8..a979fe30c 100644
--- a/opsdroid/connector/slack/connector.py
+++ b/opsdroid/connector/slack/connector.py
@@ -444,7 +444,8 @@ async def replace_usernames(self, message):
for userid in userids:
... |
aws-cloudformation__cfn-lint-2901 | No Support for ItemBatcher & ToleratedFailurePercentage in Map State of StateMachine definition
### CloudFormation Lint Version
0.79.7
### What operating system are you using?
WSL Ubuntu
### Describe the bug
E2532 errors are thrown for ItemBatcher and ToleratedFailurePercentage for Map states in StateMa... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport json\n\nfrom cfnlint.rules import CloudFormationLintRule, RuleMatch\n\n\nclass StateMachine(CloudFormationLintRule):\n \"\"\"Check State Machine Definition\"\"\"\n\n id ... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport json\n\nfrom cfnlint.rules import CloudFormationLintRule, RuleMatch\n\n\nclass StateMachine(CloudFormationLintRule):\n \"\"\"Check State Machine Definition\"\"\"\n\n id ... | diff --git a/src/cfnlint/rules/resources/stepfunctions/StateMachine.py b/src/cfnlint/rules/resources/stepfunctions/StateMachine.py
index 00154efc68..14a6359084 100644
--- a/src/cfnlint/rules/resources/stepfunctions/StateMachine.py
+++ b/src/cfnlint/rules/resources/stepfunctions/StateMachine.py
@@ -68,6 +68,8 @@ def _ch... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.