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 ⌀ |
|---|---|---|---|---|
huggingface__transformers-4385 | max_qa_length is needed for funetune on multiple-choice problems
# 🚀 Feature request
In examples/multiple-choice/run_multiple_choice.py, the max_qa_length is not implemented as that in google/Albert, which would cause trouble when funetuning RACE.
This should be easy becauce there are similar codes in codes for run_... | [
{
"content": "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. 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 Li... | [
{
"content": "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. 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 Li... | diff --git a/examples/multiple-choice/utils_multiple_choice.py b/examples/multiple-choice/utils_multiple_choice.py
index 05b808ad9e22..1e86880ecc35 100644
--- a/examples/multiple-choice/utils_multiple_choice.py
+++ b/examples/multiple-choice/utils_multiple_choice.py
@@ -535,7 +535,12 @@ def convert_examples_to_features... |
ytdl-org__youtube-dl-14716 | Cannot download certain Cartoon Network videos?
## Please follow the guide below
- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`)
- Use the *Preview* tab t... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom .turner import TurnerBaseIE\n\n\nclass CartoonNetworkIE(TurnerBaseIE):\n _VALID_URL = r'https?://(?:www\\.)?cartoonnetwork\\.com/video/(?:[^/]+/)+(?P<id>[^/?#]+)-(?:clip|episode)\\.html'\n _TEST = {\n 'url':... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\n\nfrom .turner import TurnerBaseIE\n\n\nclass CartoonNetworkIE(TurnerBaseIE):\n _VALID_URL = r'https?://(?:www\\.)?cartoonnetwork\\.com/video/(?:[^/]+/)+(?P<id>[^/?#]+)-(?:clip|episode)\\.html'\n _TEST = {\n 'url':... | diff --git a/youtube_dl/extractor/cartoonnetwork.py b/youtube_dl/extractor/cartoonnetwork.py
index 086ec90c9bc..6aeebd7b345 100644
--- a/youtube_dl/extractor/cartoonnetwork.py
+++ b/youtube_dl/extractor/cartoonnetwork.py
@@ -31,7 +31,7 @@ def _real_extract(self, url):
'http://www.cartoonnetwork.com/video-s... |
scikit-hep__awkward-2201 | ak.any Error message gives suggestion which will also error
### Version of Awkward Array
2.0.6
### Description and code to reproduce
```python
import awkward as ak
ak.any(ak.Array([{"a": False}]))
```
Throws an error that says:
```pytb
TypeError: while calling
ak.any(
array = <Array [{a: ... | [
{
"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._nplikes.numpy import Numpy\nfrom awkward._nplikes.numpylike import Nu... | [
{
"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._nplikes.numpy import Numpy\nfrom awkward._nplikes.numpylike import Nu... | diff --git a/src/awkward/contents/recordarray.py b/src/awkward/contents/recordarray.py
index 91a078585c..724d154ab3 100644
--- a/src/awkward/contents/recordarray.py
+++ b/src/awkward/contents/recordarray.py
@@ -934,9 +934,11 @@ def _remove_structure(self, backend, options):
in_function = " in " + optio... |
facebookresearch__habitat-lab-472 | Have Default SensorTypes have a YAML Customizable UUIDs
## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->
* Currently, using multiple visual sensors is difficult since each sensor has a UUID that is baked into the default class. It should be able to be overriden by the configs.
## Motiva... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom collections import OrderedDict\nfrom enum import Enum\nfrom typing import Any, Dict, It... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom collections import OrderedDict\nfrom enum import Enum\nfrom typing import Any, Dict, It... | diff --git a/habitat/core/simulator.py b/habitat/core/simulator.py
index ee68b22788..abdba528b8 100644
--- a/habitat/core/simulator.py
+++ b/habitat/core/simulator.py
@@ -63,7 +63,11 @@ class Sensor:
def __init__(self, *args: Any, **kwargs: Any) -> None:
self.config = kwargs["config"] if "config" in kwa... |
DataDog__dd-trace-py-2715 | mypy stub files
mypy throws an error when ddtrace is in use:

It would be nice if this library could ship with stub files or be put on https://github.com/python/typeshed. I'm not sure how to do that yet b... | [
{
"content": "import os\nimport platform\nimport sys\n\nfrom setuptools import setup, find_packages, Extension\nfrom setuptools.command.test import test as TestCommand\n\n# ORDER MATTERS\n# Import this after setuptools or it will fail\nfrom Cython.Build import cythonize # noqa: I100\nimport Cython.Distutils\n\... | [
{
"content": "import os\nimport platform\nimport sys\n\nfrom setuptools import setup, find_packages, Extension\nfrom setuptools.command.test import test as TestCommand\n\n# ORDER MATTERS\n# Import this after setuptools or it will fail\nfrom Cython.Build import cythonize # noqa: I100\nimport Cython.Distutils\n\... | diff --git a/ddtrace/py.typed b/ddtrace/py.typed
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/setup.py b/setup.py
index 287ddb05421..857be0daaeb 100644
--- a/setup.py
+++ b/setup.py
@@ -157,8 +157,10 @@ def get_exts_for(name):
long_description_content_type="text/markdown",
license="BSD",
... |
CTFd__CTFd-2030 | SubmissionSchema needs more nested fields
I'm having trouble accessing a user's name from a SubmissionSchema dump. This is probably because we need more Nested Fields on the Schema in addition to just the nested challenge schema.
| [
{
"content": "from marshmallow import fields\n\nfrom CTFd.models import Submissions, ma\nfrom CTFd.schemas.challenges import ChallengeSchema\nfrom CTFd.utils import string_types\n\n\nclass SubmissionSchema(ma.ModelSchema):\n challenge = fields.Nested(ChallengeSchema, only=[\"name\", \"category\", \"value\"])... | [
{
"content": "from marshmallow import fields\n\nfrom CTFd.models import Submissions, ma\nfrom CTFd.schemas.challenges import ChallengeSchema\nfrom CTFd.schemas.teams import TeamSchema\nfrom CTFd.schemas.users import UserSchema\nfrom CTFd.utils import string_types\n\n\nclass SubmissionSchema(ma.ModelSchema):\n ... | diff --git a/CTFd/schemas/submissions.py b/CTFd/schemas/submissions.py
index 22b3dad39..8b439f047 100644
--- a/CTFd/schemas/submissions.py
+++ b/CTFd/schemas/submissions.py
@@ -2,11 +2,15 @@
from CTFd.models import Submissions, ma
from CTFd.schemas.challenges import ChallengeSchema
+from CTFd.schemas.teams import T... |
paperless-ngx__paperless-ngx-2938 | [BUG] error when updating correspondent
### Description
When updating (press save button) an existing correspondent/tag/document type/etc, paperless throws an error, and the dialog box stays open.
please open .har file in chrome to see the interaction with server (payload/response).
[paperless-har-file..zip](htt... | [
{
"content": "import datetime\nimport math\nimport re\n\nfrom celery import states\n\ntry:\n import zoneinfo\nexcept ImportError:\n import backports.zoneinfo as zoneinfo\nimport magic\nfrom django.conf import settings\nfrom django.utils.text import slugify\nfrom django.utils.translation import gettext as ... | [
{
"content": "import datetime\nimport math\nimport re\n\nfrom celery import states\n\ntry:\n import zoneinfo\nexcept ImportError:\n import backports.zoneinfo as zoneinfo\nimport magic\nfrom django.conf import settings\nfrom django.utils.text import slugify\nfrom django.utils.translation import gettext as ... | diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf
index edc2926ae16..6fe9898767d 100644
--- a/src-ui/messages.xlf
+++ b/src-ui/messages.xlf
@@ -1505,7 +1505,7 @@
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/components/manage/management-... |
boto__botocore-1920 | Fix simple typo: whenver -> whenever
There is a small typo in botocore/parsers.py.
Should read `whenever` rather than `whenver`.
| [
{
"content": "# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#\n# ... | [
{
"content": "# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#\n# ... | diff --git a/botocore/parsers.py b/botocore/parsers.py
index 1452900ff6..9df114db83 100644
--- a/botocore/parsers.py
+++ b/botocore/parsers.py
@@ -782,7 +782,7 @@ def _populate_response_metadata(self, response):
metadata['RequestId'] = headers['x-amzn-requestid']
elif 'x-amz-request-id' in headers... |
cobbler__cobbler-3397 | [Backport] GHSA-mcg6-h362-cmq5
### Original feature issue
- Advisory: https://github.com/advisories/GHSA-mcg6-h362-cmq5
### Target release
- [ ] release33
- [x] release32
- [ ] release30
### Reason
Stabilization of Cobbler 3.2.x in the Fedora Ecosystem
| [
{
"content": "\"\"\"\nAuthentication module that uses /etc/cobbler/auth.conf\nChoice of authentication module is in /etc/cobbler/modules.conf\n\nCopyright 2007-2009, Red Hat, Inc and Others\nMichael DeHaan <michael.dehaan AT gmail>\n\nThis program is free software; you can redistribute it and/or modify\nit unde... | [
{
"content": "\"\"\"\nAuthentication module that uses /etc/cobbler/auth.conf\nChoice of authentication module is in /etc/cobbler/modules.conf\n\nCopyright 2007-2009, Red Hat, Inc and Others\nMichael DeHaan <michael.dehaan AT gmail>\n\nThis program is free software; you can redistribute it and/or modify\nit unde... | diff --git a/cobbler/modules/authentication/pam.py b/cobbler/modules/authentication/pam.py
index 07d5db681f..bbb152654f 100644
--- a/cobbler/modules/authentication/pam.py
+++ b/cobbler/modules/authentication/pam.py
@@ -114,6 +114,10 @@ class PamConv(Structure):
PAM_AUTHENTICATE.restype = c_int
PAM_AUTHENTICATE.argtyp... |
ansible-collections__community.vmware-1441 | community.vmware.vmware_cfg_backup: urlopen error timed out on config restore
##### SUMMARY
When attempting a restore to a host the module fails with the below URL timed out failure, due to port 80 being blocked.
Similar issue to #1270 which was for backup, and a similar fix works
##### ISSUE TYPE
- Bug Report
... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2017, IBM Corp\n# Author(s): Andreas Nafpliotis <nafpliot@de.ibm.com>\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)\n# SPDX-License-Identifier: GPL-3.0-or-later\n\nf... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2017, IBM Corp\n# Author(s): Andreas Nafpliotis <nafpliot@de.ibm.com>\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)\n# SPDX-License-Identifier: GPL-3.0-or-later\n\nf... | diff --git a/changelogs/fragments/1440-vmware_cfg_backup-fails-to-restore-port-80-blocked.yaml b/changelogs/fragments/1440-vmware_cfg_backup-fails-to-restore-port-80-blocked.yaml
new file mode 100644
index 0000000000..b4a8bb5701
--- /dev/null
+++ b/changelogs/fragments/1440-vmware_cfg_backup-fails-to-restore-port-80-bl... |
opendatacube__datacube-core-543 | Change default representation (__str__) of Dataset model
### Expected behaviour
Dataset should not show location=None where the URIs are non-file URI
### Actual behaviour
```
>>> print(dataset)
Dataset <id=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa type=product_name location=None>
```
Code in `datacube/models/__... | [
{
"content": "# coding=utf-8\n\"\"\"\nCore classes used across modules.\n\"\"\"\nfrom __future__ import absolute_import, division\n\nimport logging\nimport math\nimport warnings\nfrom collections import namedtuple, OrderedDict, Sequence\nfrom pathlib import Path\nfrom uuid import UUID\n\nfrom affine import Affi... | [
{
"content": "# coding=utf-8\n\"\"\"\nCore classes used across modules.\n\"\"\"\nfrom __future__ import absolute_import, division\n\nimport logging\nimport math\nimport warnings\nfrom collections import namedtuple, OrderedDict, Sequence\nfrom pathlib import Path\nfrom uuid import UUID\n\nfrom affine import Affi... | diff --git a/datacube/model/__init__.py b/datacube/model/__init__.py
index 97327eac5a..6a51e39b64 100644
--- a/datacube/model/__init__.py
+++ b/datacube/model/__init__.py
@@ -299,9 +299,10 @@ def __hash__(self):
return hash(self.id)
def __str__(self):
+ str_loc = 'not available' if not self.uris ... |
encode__httpx-1447 | `trust_env` has diverging defaults between `Client` and `create_ssl_context`
Right now there's a slight discrepancy for the default value of `trust_env` for `httpx.Client()` / `httpx.AsyncClient()` and `httpx.create_ssl_context()`.
* Clients use `trust_env=True` as a default.
* `create_ssl_context` uses `trust_env... | [
{
"content": "import os\nimport ssl\nimport typing\nfrom base64 import b64encode\nfrom pathlib import Path\n\nimport certifi\n\nfrom ._models import URL, Headers\nfrom ._types import CertTypes, HeaderTypes, TimeoutTypes, URLTypes, VerifyTypes\nfrom ._utils import get_ca_bundle_from_env, get_logger\n\nDEFAULT_CI... | [
{
"content": "import os\nimport ssl\nimport typing\nfrom base64 import b64encode\nfrom pathlib import Path\n\nimport certifi\n\nfrom ._models import URL, Headers\nfrom ._types import CertTypes, HeaderTypes, TimeoutTypes, URLTypes, VerifyTypes\nfrom ._utils import get_ca_bundle_from_env, get_logger\n\nDEFAULT_CI... | diff --git a/httpx/_config.py b/httpx/_config.py
index 45e93a9964..837519afb5 100644
--- a/httpx/_config.py
+++ b/httpx/_config.py
@@ -43,7 +43,7 @@ class UnsetType:
def create_ssl_context(
cert: CertTypes = None,
verify: VerifyTypes = True,
- trust_env: bool = None,
+ trust_env: bool = True,
http... |
HypothesisWorks__hypothesis-3569 | #3540 causes `RecursionError` in particular draw pattern
#3540 introduces a change that causes a `RecursionError` in [MyGrad's test suite](https://github.com/rsokl/MyGrad/actions/runs/4002289112/jobs/6869371400).
This is a weird bug. It seems to be specific to drawing from an array-based strategy that spans multip... | [
{
"content": "# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Copyright the Hypothesis Authors.\n# Individual contributors are listed in AUTHORS.rst and the git log.\n#\n# This Source Code Form is subject to the terms of the Mozilla Public License... | [
{
"content": "# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Copyright the Hypothesis Authors.\n# Individual contributors are listed in AUTHORS.rst and the git log.\n#\n# This Source Code Form is subject to the terms of the Mozilla Public License... | diff --git a/hypothesis-python/RELEASE.rst b/hypothesis-python/RELEASE.rst
new file mode 100644
index 0000000000..2f00654718
--- /dev/null
+++ b/hypothesis-python/RELEASE.rst
@@ -0,0 +1,7 @@
+RELEASE_TYPE: patch
+
+This patch fixes a rare ``RecursionError`` when pretty-printing a multi-line
+object without type-specifi... |
certbot__certbot-8599 | Error: This security ID may not be assigned as the owner of this object
Operating system: Windows Server 2008 R2
Certbot version: 1.11.0 (installed via Certbot installer for Windows)
Web server: IIS 7.5
<hr>
I tried to obtain a certificate by running the following in the Command Prompt (with administrative rights... | [
{
"content": "\"\"\"Webroot plugin.\"\"\"\nimport argparse\nimport collections\nimport json\nimport logging\n\nimport six\nimport zope.component\nimport zope.interface\n\nfrom acme import challenges\nfrom acme.magic_typing import DefaultDict\nfrom acme.magic_typing import Dict\nfrom acme.magic_typing import Lis... | [
{
"content": "\"\"\"Webroot plugin.\"\"\"\nimport argparse\nimport collections\nimport json\nimport logging\n\nimport six\nimport zope.component\nimport zope.interface\n\nfrom acme import challenges\nfrom acme.magic_typing import DefaultDict\nfrom acme.magic_typing import Dict\nfrom acme.magic_typing import Lis... | diff --git a/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py b/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py
index 28a72837000..8601e680480 100644
--- a/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py
+++ b/certbot-ci/certbot_integration_tests/certbot_tests/test_main.py... |
espnet__espnet-1087 | Exception about reduction-factor and guided-attention
Exception happened when I set `reduction-factor:2` or `reduction-factor:3` with `use-guided-attn-loss: true`.
Also I check the scripts can run in below condition:
- `reduction-factor:1` with `use-guided-attn-loss: true`
- `reduction-factor:2` with `use-guided-att... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright 2018 Nagoya University (Tomoki Hayashi)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\nimport logging\n\nfrom distutils.util import strtobool\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\n\nfrom... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright 2018 Nagoya University (Tomoki Hayashi)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\nimport logging\n\nfrom distutils.util import strtobool\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\n\nfrom... | diff --git a/espnet/nets/pytorch_backend/e2e_tts_tacotron2.py b/espnet/nets/pytorch_backend/e2e_tts_tacotron2.py
index 98b4a38928a..651c363a61a 100644
--- a/espnet/nets/pytorch_backend/e2e_tts_tacotron2.py
+++ b/espnet/nets/pytorch_backend/e2e_tts_tacotron2.py
@@ -533,7 +533,12 @@ def forward(self, xs, ilens, ys, label... |
qutebrowser__qutebrowser-3752 | Pinned tab titles stretch tabs bar beyond the `tabs.width` value
<!-- If this is a bug report, please remember to mention your version info from
`:open qute:version` or `qutebrowser --version` -->
**Step to reproduce**:
- Set `tabs.title.alignment` to `left`;
- Set `tabs.width` to `2%` _(or any other very small v... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py
index 72d3cff220b..4a34a08cbe1 100644
--- a/qutebrowser/mainwindow/tabwidget.py
+++ b/qutebrowser/mainwindow/tabwidget.py
@@ -494,8 +494,8 @@ def minimumTabSizeHint(self, index, ellipsis: bool = True) -> QSize:
... |
plotly__dash-848 | Generator should delete contents of inst/deps for R packages prior to rebuild
Currently, assets for component libraries which are shared between Python and R implementations of Dash are copied from within `project_shortname` to `inst/deps` without removing any artifacts of previous build cycles.
To avoid confusion i... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import print_function\n\nimport os\nimport sys\nimport shutil\nimport glob\nimport importlib\nimport textwrap\nimport re\nimport warnings\n\nfrom ._all_keywords import r_keywords\nfrom ._py_components_generation import reorder_props\n\n\n# De... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import print_function\n\nimport os\nimport sys\nimport shutil\nimport glob\nimport importlib\nimport textwrap\nimport re\nimport warnings\n\nfrom ._all_keywords import r_keywords\nfrom ._py_components_generation import reorder_props\n\n\n# De... | diff --git a/dash/development/_r_components_generation.py b/dash/development/_r_components_generation.py
index 76ada0570f..a542f9b667 100644
--- a/dash/development/_r_components_generation.py
+++ b/dash/development/_r_components_generation.py
@@ -442,8 +442,10 @@ def write_js_metadata(pkg_data, project_shortname, has_w... |
networkx__networkx-3365 | `draw_networkx` behaves differently when `node_size` is provided
If I call `draw_networkx` with something like
```
nx.draw_networkx(g, edgelist=[(0, 1, 0)])
```
that is, with the egelist a list of tuples of length 3, all works well. However, if I in addition pass a `node_size` argument that is an iterable, the be... | [
{
"content": "# Copyright (C) 2004-2018 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\n#\n# Author: Aric Hagberg (hagberg@lanl.gov)\n\"\"\"\n**********\nMatplotlib\n**********\n\nDraw networks ... | [
{
"content": "# Copyright (C) 2004-2018 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\n#\n# Author: Aric Hagberg (hagberg@lanl.gov)\n\"\"\"\n**********\nMatplotlib\n**********\n\nDraw networks ... | diff --git a/networkx/drawing/nx_pylab.py b/networkx/drawing/nx_pylab.py
index b32614e7556..9fa67224fbe 100644
--- a/networkx/drawing/nx_pylab.py
+++ b/networkx/drawing/nx_pylab.py
@@ -674,7 +674,7 @@ def to_marker_edge(marker_size, marker):
shrink_source = 0 # space from source to tail
shrin... |
ipython__ipython-1996 | Test failures and docs don't build on Mac OS X Lion
I have installed the latest ipython from github (f30a572977be51a1b928788540e323ab9bc9c58f) via `python setup.py install --user`.
There are a few test failures and the docs don't build:
http://dl.dropbox.com/u/4923986/bug_reports/ipython-tests.log
http://dl.dropbox.co... | [
{
"content": "# encoding: utf-8\n\"\"\"\nUtilities for getting information about IPython and the system it's running in.\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (C) 2008-2011 The IPython Development Team\n#\n# Distributed under the terms of the B... | [
{
"content": "# encoding: utf-8\n\"\"\"\nUtilities for getting information about IPython and the system it's running in.\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (C) 2008-2011 The IPython Development Team\n#\n# Distributed under the terms of the B... | diff --git a/IPython/core/tests/test_history.py b/IPython/core/tests/test_history.py
index 9e5e758936f..bef2d42b9e8 100644
--- a/IPython/core/tests/test_history.py
+++ b/IPython/core/tests/test_history.py
@@ -93,7 +93,7 @@ def test_history():
# Cross testing: check that magic %save can get previous session... |
getnikola__nikola-2612 | Post.text with strip_html=True fails for empty posts
```pytb
Scanning posts......done!
. local_search:output/assets/js/tipuesearch_content.json
########################################
TaskError - taskid:local_search:output/assets/js/tipuesearch_content.json
PythonAction Error
Traceback (most recent call last):
... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2016 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2016 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi... | diff --git a/nikola/post.py b/nikola/post.py
index e564e52eab..701f2a179f 100644
--- a/nikola/post.py
+++ b/nikola/post.py
@@ -687,7 +687,7 @@ def text(self, lang=None, teaser_only=False, strip_html=False, show_read_more_li
# Not all posts have a body. For example, you may have a page statically define... |
pantsbuild__pants-18894 | docs: `adhoc_tool` example field values swapped
When looking at the rendered docs it was much easier to spot that the example field values here are swapped (files vs directories). 👀
_Originally posted by @kaos in https://github.com/pantsbuild/pants/pull/18237#discussion_r1184219518_
| [
{
"content": "# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nfrom typing import ClassVar\n\nfrom pants.core.util_rules.environments import EnvironmentField\nfrom pants.engine.target impo... | [
{
"content": "# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nfrom typing import ClassVar\n\nfrom pants.core.util_rules.environments import EnvironmentField\nfrom pants.engine.target impo... | diff --git a/src/python/pants/backend/adhoc/target_types.py b/src/python/pants/backend/adhoc/target_types.py
index 8c8ab99f01a..6a6ba3152ad 100644
--- a/src/python/pants/backend/adhoc/target_types.py
+++ b/src/python/pants/backend/adhoc/target_types.py
@@ -257,8 +257,8 @@ class AdhocToolTarget(Target):
... |
docker__docker-py-3202 | `Image.history()` returned wrong type.
At the document, image.history() return `str` type, but it return `list` type.
| [
{
"content": "import itertools\nimport re\nimport warnings\n\nfrom ..api import APIClient\nfrom ..constants import DEFAULT_DATA_CHUNK_SIZE\nfrom ..errors import BuildError, ImageLoadError, InvalidArgument\nfrom ..utils import parse_repository_tag\nfrom ..utils.json_stream import json_stream\nfrom .resource impo... | [
{
"content": "import itertools\nimport re\nimport warnings\n\nfrom ..api import APIClient\nfrom ..constants import DEFAULT_DATA_CHUNK_SIZE\nfrom ..errors import BuildError, ImageLoadError, InvalidArgument\nfrom ..utils import parse_repository_tag\nfrom ..utils.json_stream import json_stream\nfrom .resource impo... | diff --git a/docker/api/image.py b/docker/api/image.py
index 5e1466ec3..85109473b 100644
--- a/docker/api/image.py
+++ b/docker/api/image.py
@@ -47,7 +47,7 @@ def history(self, image):
image (str): The image to show history for
Returns:
- (str): The history of the image
+ (... |
pyro-ppl__numpyro-1548 | LocScaleReparam samples outside the support
Hi
I am a numpyro user having trouble with `LocScaleReparam ` function with non-normal distributions that still have loc/scale parameters.
When I run LocScaleReparam with non-normal distributions, the reparametrized samples are outside the support. For instance, when ... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom abc import ABC, abstractmethod\nimport math\n\nimport numpy as np\n\nimport jax\nimport jax.numpy as jnp\n\nimport numpyro\nimport numpyro.distributions as dist\nfrom numpyro.distributions import biject_to... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom abc import ABC, abstractmethod\nimport math\n\nimport numpy as np\n\nimport jax\nimport jax.numpy as jnp\n\nimport numpyro\nimport numpyro.distributions as dist\nfrom numpyro.distributions import biject_to... | diff --git a/numpyro/infer/reparam.py b/numpyro/infer/reparam.py
index bd24d91a1..57bd4bc8d 100644
--- a/numpyro/infer/reparam.py
+++ b/numpyro/infer/reparam.py
@@ -100,6 +100,15 @@ def __init__(self, centered=None, shape_params=()):
def __call__(self, name, fn, obs):
assert obs is None, "LocScaleRepara... |
python-trio__trio-1038 | Update happy eyeballs for RFC 8305
A new happy eyeballs RFC came out a few months ago: https://tools.ietf.org/html/rfc8305
Golang tracking issue: https://github.com/golang/go/issues/23841
It's interesting. The old one (RFC 6555) was incredibly vague; lots of "well maybe you could do this, or maybe that, there are... | [
{
"content": "from contextlib import contextmanager\n\nimport trio\nfrom trio.socket import getaddrinfo, SOCK_STREAM, socket\n\n__all__ = [\"open_tcp_stream\"]\n\n# Implementation of RFC 6555 \"Happy eyeballs\"\n# https://tools.ietf.org/html/rfc6555\n#\n# Basically, the problem here is that if we want to connec... | [
{
"content": "from contextlib import contextmanager\n\nimport trio\nfrom trio.socket import getaddrinfo, SOCK_STREAM, socket\n\n__all__ = [\"open_tcp_stream\"]\n\n# Implementation of RFC 6555 \"Happy eyeballs\"\n# https://tools.ietf.org/html/rfc6555\n#\n# Basically, the problem here is that if we want to connec... | diff --git a/newsfragments/762.misc.rst b/newsfragments/762.misc.rst
new file mode 100644
index 000000000..2b2e6656b
--- /dev/null
+++ b/newsfragments/762.misc.rst
@@ -0,0 +1 @@
+Change the default timeout in :func:`trio.open_tcp_stream` to 0.250 seconds, for consistency with RFC 8305.
diff --git a/trio/_highlevel_open... |
web2py__web2py-1376 | ldap_auth error
1) problem
2016-06-08 10:14:17.120 WARNING ~/web2py/gluon/contrib/login_methods/ldap_auth.py do_manage_groups:582 [username] Groups are not managed successfully!
2016-06-08 10:14:17.120 DEBUG ~/web2py/gluon/contrib/login_methods/ldap_auth.py do_manage_groups:584 Traceback (most recent call last):
File... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# last tinkered with by korylprince at gmail.com on 2012-07-12\n#\n\nimport sys\nimport logging\ntry:\n import ldap\n import ldap.filter\n ldap.set_option(ldap.OPT_REFERRALS, 0)\nexcept Exception as e:\n logging.error('missing ldap, try \"easy_install python... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# last tinkered with by korylprince at gmail.com on 2012-07-12\n#\n\nimport sys\nimport logging\ntry:\n import ldap\n import ldap.filter\n ldap.set_option(ldap.OPT_REFERRALS, 0)\nexcept Exception as e:\n logging.error('missing ldap, try \"easy_install python... | diff --git a/gluon/contrib/login_methods/ldap_auth.py b/gluon/contrib/login_methods/ldap_auth.py
index e19010f39..89ee56ec4 100644
--- a/gluon/contrib/login_methods/ldap_auth.py
+++ b/gluon/contrib/login_methods/ldap_auth.py
@@ -532,7 +532,7 @@ def do_manage_groups(username, password=None, group_mapping={}, db=db):
... |
internetarchive__openlibrary-8877 | sort books by most recently added/updated
<!-- What issue does this PR close? -->
Closes #7526
<!-- What does this PR achieve? [feature|hotfix|fix|refactor] -->
Books carousel is now sorted by most recently added.
Most recently added refers to the "updated" field from the API schema. Reason for doing so is becau... | [
{
"content": "import json\nimport web\n\nfrom typing import Final, Literal\n\nfrom infogami import config\nfrom infogami.utils import delegate\nfrom infogami.utils.view import public, safeint, render\n\nfrom openlibrary.i18n import gettext as _\n\nfrom openlibrary import accounts\nfrom openlibrary.accounts.mode... | [
{
"content": "import json\nimport web\n\nfrom typing import Final, Literal\n\nfrom infogami import config\nfrom infogami.utils import delegate\nfrom infogami.utils.view import public, safeint, render\n\nfrom openlibrary.i18n import gettext as _\n\nfrom openlibrary import accounts\nfrom openlibrary.accounts.mode... | diff --git a/openlibrary/plugins/upstream/mybooks.py b/openlibrary/plugins/upstream/mybooks.py
index 1cbc79a7bf2..0632007d7f9 100644
--- a/openlibrary/plugins/upstream/mybooks.py
+++ b/openlibrary/plugins/upstream/mybooks.py
@@ -57,7 +57,7 @@ def render_template(self, mb):
loans.docs.append(book)
... |
keras-team__keras-19643 | Layernorm not supporting axis [-2, 3]
Hi,
I wanted to normalise my output on the -2 and -3 axis, (image height and width), however, it seems that the with rms_scaling=true, the self.gamma is not broadcasted to same shape as layer input causing this error,
```
inputs shape: (1, 1920, 1200, 3)
inv shape: (1, 1, 1, ... | [
{
"content": "from keras.src import constraints\nfrom keras.src import initializers\nfrom keras.src import ops\nfrom keras.src import regularizers\nfrom keras.src.api_export import keras_export\nfrom keras.src.layers.layer import Layer\n\n\n@keras_export(\"keras.layers.LayerNormalization\")\nclass LayerNormaliz... | [
{
"content": "from keras.src import constraints\nfrom keras.src import initializers\nfrom keras.src import ops\nfrom keras.src import regularizers\nfrom keras.src.api_export import keras_export\nfrom keras.src.layers.layer import Layer\n\n\n@keras_export(\"keras.layers.LayerNormalization\")\nclass LayerNormaliz... | diff --git a/keras/src/layers/normalization/layer_normalization.py b/keras/src/layers/normalization/layer_normalization.py
index 854a071932b1..321118379a9b 100644
--- a/keras/src/layers/normalization/layer_normalization.py
+++ b/keras/src/layers/normalization/layer_normalization.py
@@ -212,7 +212,9 @@ def _broadcast(v)... |
DDMAL__CantusDB-267 | csv view: AttributeError sometimes appears
(draft - more details coming soon)
the csv view (e.g. http://206.12.93.196/csv/704571 - arrived at via the CSV export link on http://206.12.93.196/source/704571) sometimes raises an attribute error, evidently when a source does not have a `segment`.
| [
{
"content": "import csv\nfrom django.http.response import HttpResponseRedirect, JsonResponse\nfrom django.http import HttpResponse, HttpResponseNotFound\nfrom django.shortcuts import render, redirect\nfrom django.urls.base import reverse\nfrom main_app.models import (\n Century,\n Chant,\n Feast,\n ... | [
{
"content": "import csv\nfrom django.http.response import HttpResponseRedirect, JsonResponse\nfrom django.http import HttpResponse, HttpResponseNotFound\nfrom django.shortcuts import render, redirect\nfrom django.urls.base import reverse\nfrom main_app.models import (\n Century,\n Chant,\n Feast,\n ... | diff --git a/django/cantusdb_project/main_app/views/views.py b/django/cantusdb_project/main_app/views/views.py
index 1e6e75573..3cce159be 100644
--- a/django/cantusdb_project/main_app/views/views.py
+++ b/django/cantusdb_project/main_app/views/views.py
@@ -167,8 +167,8 @@ def csv_export(request, source_id):
so... |
vllm-project__vllm-5077 | Remove EOS token before passing the tokenized input to model
How to remove eos token id before passing the input tokens to model. I'm trying for fine-tuned mistral model. Just because there is an eos token id at the end of sentence, model generates the results for a different input which is similar to original inpu... | [
{
"content": "from typing import Callable, Optional\n\nfrom transformers import PreTrainedTokenizer\n\nfrom vllm.lora.request import LoRARequest\nfrom vllm.sampling_params import SamplingParams\nfrom vllm.sequence import Sequence, SequenceStatus\n\n\nclass StopChecker:\n \"\"\"LLMEngine helper class which se... | [
{
"content": "from typing import Callable, Optional\n\nfrom transformers import PreTrainedTokenizer\n\nfrom vllm.lora.request import LoRARequest\nfrom vllm.sampling_params import SamplingParams\nfrom vllm.sequence import Sequence, SequenceStatus\n\n\nclass StopChecker:\n \"\"\"LLMEngine helper class which se... | diff --git a/tests/engine/output_processor/test_stop_checker.py b/tests/engine/output_processor/test_stop_checker.py
new file mode 100644
index 00000000000..ae54c83605e
--- /dev/null
+++ b/tests/engine/output_processor/test_stop_checker.py
@@ -0,0 +1,86 @@
+from unittest.mock import MagicMock
+
+import pytest
+from tra... |
scikit-hep__awkward-2587 | We shouldn't decorate the `KeyboardInterrupt` exception
### Version of Awkward Array
HEAD
### Description and code to reproduce
If I press control-C (or ■ in Jupyter), I don't need to be told what high-level function failed because it didn't really "fail," it was cancelled.
```
KeyboardInterrupt:
This error ... | [
{
"content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE\nfrom __future__ import annotations\n\nimport builtins\nimport sys\nimport threading\nimport warnings\nfrom collections.abc import Callable, Collection, Iterable, Mapping\nfrom functools import wraps\n\nimport ... | [
{
"content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE\nfrom __future__ import annotations\n\nimport builtins\nimport sys\nimport threading\nimport warnings\nfrom collections.abc import Callable, Collection, Iterable, Mapping\nfrom functools import wraps\n\nimport ... | diff --git a/src/awkward/_errors.py b/src/awkward/_errors.py
index ceb9a6ae3a..c861bb49e3 100644
--- a/src/awkward/_errors.py
+++ b/src/awkward/_errors.py
@@ -59,7 +59,11 @@ def __enter__(self):
def __exit__(self, exception_type, exception_value, traceback):
try:
# Handle caught exception
- ... |
googleapis__python-bigquery-465 | Bound the maximum supported Python version
Related: #462.
The BigQuery library does not support Python 3.9 yet, as the `bqstorage` and `pandas` extras are blocked by the `pyarrow` dependency. Pyarrow [added](https://issues.apache.org/jira/browse/ARROW-10224) the Python 3.9 support, but the change has not been releas... | [
{
"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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
{
"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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | diff --git a/README.rst b/README.rst
index c7d50d729..61192b625 100644
--- a/README.rst
+++ b/README.rst
@@ -52,7 +52,7 @@ dependencies.
Supported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^
-Python >= 3.6
+Python >= 3.6, < 3.9
Unsupported Python Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/setup.py b/setup.... |
sanic-org__sanic-943 | Bad char cause parse exception and how to log the url when request can't be parsed?
Using: sanic 0.5.1 (While I don't see which change with 0.5.4 in changelog)
In our code we using :
```
@app.exception(Exception)
def server_error_handler(request, exception):
if request is not None:
msg = reques... | [
{
"content": "import asyncio\nimport os\nimport traceback\nfrom functools import partial\nfrom inspect import isawaitable\nfrom multiprocessing import Process\nfrom signal import (\n SIGTERM, SIGINT,\n signal as signal_func,\n Signals\n)\nfrom socket import (\n socket,\n SOL_SOCKET,\n SO_REUSE... | [
{
"content": "import asyncio\nimport os\nimport traceback\nfrom functools import partial\nfrom inspect import isawaitable\nfrom multiprocessing import Process\nfrom signal import (\n SIGTERM, SIGINT,\n signal as signal_func,\n Signals\n)\nfrom socket import (\n socket,\n SOL_SOCKET,\n SO_REUSE... | diff --git a/sanic/server.py b/sanic/server.py
index f62ba654d6..4dedc650d6 100644
--- a/sanic/server.py
+++ b/sanic/server.py
@@ -189,10 +189,12 @@ def on_header(self, name, value):
and int(value) > self.request_max_size:
exception = PayloadTooLarge('Payload Too Large')
... |
kubeflow__pipelines-2213 | [Component] GCP dataproc create_cluster component cannot correctly specify image_version.
Issue:
When specifying not-null image version, create_cluster component raises:
`<HttpError 400 when requesting
https://dataproc.googleapis.com/v1/projects/ml-pipeline-dogfood/regions/us-central1/clusters?alt=json&requestId=7c... | [
{
"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# http://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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/components/gcp/container/component_sdk/python/kfp_component/google/dataproc/_create_cluster.py b/components/gcp/container/component_sdk/python/kfp_component/google/dataproc/_create_cluster.py
index 8319b118f8b..be76267721e 100644
--- a/components/gcp/container/component_sdk/python/kfp_component/google/data... |
Gallopsled__pwntools-1420 | Respect XDG Base Directory Spec
I've noticed `~/.pwntools-cache` files appearing. These should be stored in the XDG Cache directory by default, not in the `$HOME` directory. It'd be nice if there were a way to configure this.
| [
{
"content": "#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\nImplements context management so that nested/scoped contexts and threaded\ncontexts work properly and as expected.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport collections\nimport functools\nimpo... | [
{
"content": "#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\nImplements context management so that nested/scoped contexts and threaded\ncontexts work properly and as expected.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport collections\nimport functools\nimpo... | diff --git a/pwnlib/context/__init__.py b/pwnlib/context/__init__.py
index 6d43994aa..408ffd6b7 100644
--- a/pwnlib/context/__init__.py
+++ b/pwnlib/context/__init__.py
@@ -1225,12 +1225,13 @@ def cache_dir(self):
>>> cache_dir == context.cache_dir
True
"""
- home = os.path.exp... |
GPflow__GPflow-55 | Changing parameter to fixed requires model recompilation prior to prediction
Error is: ValueError: Cannot feed value of shape (4,) for Tensor u'Variable:0', which has shape '(5,)'
Error happens in predict_f - full error trace below.
Minimal working example below.
Issue on master branch as of April 24, 2016.
### Code... | [
{
"content": "from __future__ import print_function\nfrom .param import Parameterized\nfrom scipy.optimize import minimize, OptimizeResult\nimport numpy as np\nimport tensorflow as tf\nfrom . import hmc\nimport sys\nfrom functools import wraps\n\n\nclass ObjectiveWrapper(object):\n \"\"\"\n A simple class... | [
{
"content": "from __future__ import print_function\nfrom .param import Parameterized\nfrom scipy.optimize import minimize, OptimizeResult\nimport numpy as np\nimport tensorflow as tf\nfrom . import hmc\nimport sys\nfrom functools import wraps\n\n\nclass ObjectiveWrapper(object):\n \"\"\"\n A simple class... | diff --git a/GPflow/model.py b/GPflow/model.py
index ba03b9526..32d640213 100644
--- a/GPflow/model.py
+++ b/GPflow/model.py
@@ -83,7 +83,8 @@ def __call__(self, tf_method):
def runnable(instance, *np_args):
graph_name = '_' + tf_method.__name__ + '_graph'
if not hasattr(instance, gra... |
CTFd__CTFd-1048 | import will crash ctfd
<!--
If this is a bug report please fill out the template below.
If this is a feature request please describe the behavior that you'd like to see.
-->
**Environment**:
- CTFd Version/Commit: 2.1.3
- Operating System: ubuntu 18.04
- Web Browser and Version: Opera 60.0.3255.170
... | [
{
"content": "\"\"\"Add captain column to Teams\n\nRevision ID: b5551cd26764\nRevises: 4e4d5a9ea000\nCreate Date: 2019-04-12 00:29:08.021141\n\n\"\"\"\nfrom CTFd.models import db\nfrom alembic import op\nimport sqlalchemy as sa\nfrom sqlalchemy.sql import text, table, column, and_\n\n# revision identifiers, use... | [
{
"content": "\"\"\"Add captain column to Teams\n\nRevision ID: b5551cd26764\nRevises: 4e4d5a9ea000\nCreate Date: 2019-04-12 00:29:08.021141\n\n\"\"\"\nfrom CTFd.models import db\nfrom alembic import op\nimport sqlalchemy as sa\nfrom sqlalchemy.sql import text, table, column, and_\n\n# revision identifiers, use... | diff --git a/migrations/versions/b5551cd26764_add_captain_column_to_teams.py b/migrations/versions/b5551cd26764_add_captain_column_to_teams.py
index 9279f1199..302713267 100644
--- a/migrations/versions/b5551cd26764_add_captain_column_to_teams.py
+++ b/migrations/versions/b5551cd26764_add_captain_column_to_teams.py
@@ ... |
readthedocs__readthedocs.org-2916 | Bump allauth to next release
When the next version of allauth is released, be sure to bump allauth in requirements.
| [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Project models.\"\"\"\n\nfrom __future__ import (\n absolute_import, division, print_function, unicode_literals)\n\nimport fnmatch\nimport logging\nimport os\nfrom builtins import object # pylint: disable=redefined-builtin\n\nfrom django.conf import settings\nfro... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Project models.\"\"\"\n\nfrom __future__ import (\n absolute_import, division, print_function, unicode_literals)\n\nimport fnmatch\nimport logging\nimport os\nfrom builtins import object # pylint: disable=redefined-builtin\n\nfrom django.conf import settings\nfro... | diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py
index c4249351e84..9d30b37788a 100644
--- a/readthedocs/projects/models.py
+++ b/readthedocs/projects/models.py
@@ -339,11 +339,11 @@ def save(self, *args, **kwargs): # pylint: disable=arguments-differ
'Re-symlinking supe... |
jazzband__django-oauth-toolkit-574 | POST /o/introspect/ endpoint requires WRITE_SCOPE in addition to "introspection"
POST /o/introspect/ returns a 403 when the scope of the access token only contains "introspection". Adding the WRITE_SCOPE value ("write") makes it succeed. This is because by default a POST is considered something requiring a WRITE_SCOPE ... | [
{
"content": "from __future__ import unicode_literals\n\nimport calendar\nimport json\n\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.http import HttpResponse\nfrom django.utils.decorators import method_decorator\nfrom django.views.decorators.csrf import csrf_exempt\n\nfrom oauth2_provider... | [
{
"content": "from __future__ import unicode_literals\n\nimport calendar\nimport json\n\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.http import HttpResponse\nfrom django.utils.decorators import method_decorator\nfrom django.views.decorators.csrf import csrf_exempt\n\nfrom oauth2_provider... | diff --git a/.gitignore b/.gitignore
index bf1a049e6..af644d1e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,6 +28,7 @@ pip-log.txt
.cache
.coverage
.tox
+.pytest_cache/
nosetests.xml
# Translations
diff --git a/oauth2_provider/views/introspect.py b/oauth2_provider/views/introspect.py
index 2fbaf2ce7..0f3780c... |
Lightning-AI__torchmetrics-2173 | Documentation incorrectly specifies the name of "num_labels" attribute as "num_classes" for MultilabelMatthewsCorrCoef
| [
{
"content": "# Copyright The 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 by appli... | [
{
"content": "# Copyright The 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 by appli... | diff --git a/src/torchmetrics/classification/matthews_corrcoef.py b/src/torchmetrics/classification/matthews_corrcoef.py
index fff62187377..cc86ccfc9bb 100644
--- a/src/torchmetrics/classification/matthews_corrcoef.py
+++ b/src/torchmetrics/classification/matthews_corrcoef.py
@@ -276,7 +276,7 @@ class MultilabelMatthew... |
vaexio__vaex-861 | ValueError: Unknown expression type: <class '_ast.NameConstant'>
df.x.str.replace(..., regex=False) Works fine.
df.x.str.replace(..., regex=True) seems to work, but crashes when continue to work with the virtual column.
Reproduce:
```
import vaex
text = ['Something', 'very pretty', 'is coming', 'our', 'way.']
... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import division\nimport logging\nimport collections\nimport ast\nimport _ast\nimport string\nimport numpy as np\nimport math\nimport sys\nimport six\nimport copy\nimport difflib\n\n\nif hasattr(_ast, 'Num'):\n ast_Num = _ast.Num\n ast_Str = _ast.Str\n... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import division\nimport logging\nimport collections\nimport ast\nimport _ast\nimport string\nimport numpy as np\nimport math\nimport sys\nimport six\nimport copy\nimport difflib\n\n\nif hasattr(_ast, 'Num'):\n ast_Num = _ast.Num\n ast_Str = _ast.Str\n... | diff --git a/packages/vaex-core/vaex/expresso.py b/packages/vaex-core/vaex/expresso.py
index f755cf8615..0eec5655fa 100644
--- a/packages/vaex-core/vaex/expresso.py
+++ b/packages/vaex-core/vaex/expresso.py
@@ -119,6 +119,8 @@ def validate_expression(expr, variable_set, function_set=[], names=None):
valida... |
spack__spack-5816 | libxml2 fails with Intel 16.0.2
I am now trying to build `amrex` on another machine. I setup spack for intel compilers (to load the proper module, etc.). Lots of packages build just fine (including, e.g. `m4` which failed in #5705 and we had to fix it in spack). But the `libxml2` packages fails with:
```
$ spack inst... | [
{
"content": "##############################################################################\n# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ... | [
{
"content": "##############################################################################\n# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ... | diff --git a/var/spack/repos/builtin/packages/libxml2/package.py b/var/spack/repos/builtin/packages/libxml2/package.py
index 2ec64006c9009f..d806544be27ef8 100644
--- a/var/spack/repos/builtin/packages/libxml2/package.py
+++ b/var/spack/repos/builtin/packages/libxml2/package.py
@@ -48,12 +48,15 @@ class Libxml2(Autotoo... |
translate__pootle-6471 | AttributeError: 'QuerySet' object has no attribute 'keys'
The following appears when you first go to `/` and Pootle tries to redirect you to your language based on your Accept-Lang headers. Note this will set a cookie so you need to have cookies reset to replicate.
```python
AttributeError: 'QuerySet' object has n... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nfrom django.co... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nfrom django.co... | diff --git a/pootle/apps/pootle_app/views/index/index.py b/pootle/apps/pootle_app/views/index/index.py
index bea153e731f..f004c62b4eb 100644
--- a/pootle/apps/pootle_app/views/index/index.py
+++ b/pootle/apps/pootle_app/views/index/index.py
@@ -89,9 +89,9 @@ def dispatch(self, request, *args, **kwargs):
if lan... |
ipython__ipython-4820 | ipcluster bug in clean_logs flag
Setting clean_logs=True when using the IPClusterEngines application doesn't remove the log files. The offending line is at parallel/apps/ipclusterapp.py line 404 in IPClusterEngines.start_logging() which looks like this:
```
if re.match(r'ip(engine|controller)z-\d+\.(log|err|out)',f):... | [
{
"content": "#!/usr/bin/env python\n# encoding: utf-8\n\"\"\"\nThe ipcluster application.\n\nAuthors:\n\n* Brian Granger\n* MinRK\n\n\"\"\"\nfrom __future__ import print_function\n\n#-----------------------------------------------------------------------------\n# Copyright (C) 2008-2011 The IPython Developme... | [
{
"content": "#!/usr/bin/env python\n# encoding: utf-8\n\"\"\"\nThe ipcluster application.\n\nAuthors:\n\n* Brian Granger\n* MinRK\n\n\"\"\"\nfrom __future__ import print_function\n\n#-----------------------------------------------------------------------------\n# Copyright (C) 2008-2011 The IPython Developme... | diff --git a/IPython/parallel/apps/ipclusterapp.py b/IPython/parallel/apps/ipclusterapp.py
index 783822b561b..e80d05742aa 100755
--- a/IPython/parallel/apps/ipclusterapp.py
+++ b/IPython/parallel/apps/ipclusterapp.py
@@ -401,10 +401,8 @@ def start_logging(self):
if self.clean_logs:
log_dir = self.... |
redis__redis-py-396 | SentinelConnectionPool. Error when working under uwsgi
It raises following exception:
```
redis.sentinel in get_master_address
AttributeError: 'int' object has no attribute 'discover_master'
```
The reason is `ConnectionPool._checkpid()` calls `__init__()` ([connection.py#L397](https://github.com/andymccurdy/redis-py... | [
{
"content": "import random\n\nfrom redis.client import StrictRedis\nfrom redis.connection import ConnectionPool, Connection\nfrom redis.exceptions import ConnectionError, ResponseError\nfrom redis._compat import xrange, nativestr\n\n\nclass MasterNotFoundError(ConnectionError):\n pass\n\n\nclass SlaveNotFou... | [
{
"content": "import os\nimport random\n\nfrom redis.client import StrictRedis\nfrom redis.connection import ConnectionPool, Connection\nfrom redis.exceptions import ConnectionError, ResponseError\nfrom redis._compat import xrange, nativestr\n\n\nclass MasterNotFoundError(ConnectionError):\n pass\n\n\nclass ... | diff --git a/redis/sentinel.py b/redis/sentinel.py
index bdb955f016..8ba992018f 100644
--- a/redis/sentinel.py
+++ b/redis/sentinel.py
@@ -1,3 +1,4 @@
+import os
import random
from redis.client import StrictRedis
@@ -90,6 +91,14 @@ def rotate_slaves(self):
pass
raise SlaveNotFoundError('No sla... |
pyro-ppl__numpyro-1118 | Use Gauss-Newton hessian matrix in laplace approximation
Currently, in AutoLaplaceApproximation, we use `jax.hessian` to compute Hessian matrix. But the hessian matrix is not always positive definite. So it would be nice to use Gaussian-Newton hessian matrix when [scale_tril = Nan](https://github.com/pyro-ppl/numpyro/b... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\n# Adapted from pyro.infer.autoguide\nfrom abc import ABC, abstractmethod\nfrom contextlib import ExitStack\nimport warnings\n\nimport numpy as np\n\nfrom jax import hessian, lax, random, tree_map\nfrom jax.expe... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\n# Adapted from pyro.infer.autoguide\nfrom abc import ABC, abstractmethod\nfrom contextlib import ExitStack\nimport warnings\n\nimport numpy as np\n\nfrom jax import hessian, lax, random, tree_map\nfrom jax.expe... | diff --git a/numpyro/infer/autoguide.py b/numpyro/infer/autoguide.py
index 89bcf8349..24156b9fc 100644
--- a/numpyro/infer/autoguide.py
+++ b/numpyro/infer/autoguide.py
@@ -889,7 +889,7 @@ def loss_fn(z):
warnings.warn(
"Hessian of log posterior at the MAP point is singular. Poster... |
Gallopsled__pwntools-1302 | Cannot set stdout in process
I am trying to exploit a format string bug, which involves me writing 0xdeadbeef amount of bytes to stdout. If I run it on the shell, pwntools blurts out a bunch of spaces on the screen which makes it unresponsive and I think it buffers for a long time. So I want to redirect stdout to /dev/... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport ctypes\nimport errno\nimport fcntl\nimport logging\nimport os\nimport platform\nimport pty\nimport resource\nimport select\nimport signal\nimport stat\nimport subprocess\nimport time\nimport ... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport ctypes\nimport errno\nimport fcntl\nimport logging\nimport os\nimport platform\nimport pty\nimport resource\nimport select\nimport signal\nimport stat\nimport subprocess\nimport time\nimport ... | diff --git a/pwnlib/tubes/process.py b/pwnlib/tubes/process.py
index 524087449..8214a4474 100644
--- a/pwnlib/tubes/process.py
+++ b/pwnlib/tubes/process.py
@@ -344,9 +344,10 @@ def __init__(self, argv = None,
# Set in non-blocking mode so that a call to call recv(1000) will
# return as soon as a th... |
django-import-export__django-import-export-1685 | Export confirm page does not show the list of fields to be exported
**Describe the bug**
Import workflow shows the list of fields that will be imported for each resource:

However the expor... | [
{
"content": "import logging\nimport warnings\n\nimport django\nfrom django import forms\nfrom django.conf import settings\nfrom django.contrib import admin, messages\nfrom django.contrib.admin.models import ADDITION, CHANGE, DELETION, LogEntry\nfrom django.contrib.auth import get_permission_codename\nfrom djan... | [
{
"content": "import logging\nimport warnings\n\nimport django\nfrom django import forms\nfrom django.conf import settings\nfrom django.contrib import admin, messages\nfrom django.contrib.admin.models import ADDITION, CHANGE, DELETION, LogEntry\nfrom django.contrib.auth import get_permission_codename\nfrom djan... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index f8079a83b..2a215ae2c 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -5,7 +5,7 @@ Changelog
------------------
- Added `CONTRIBUTING.md`
-
+- Show list of exported fields in Admin UI (#1685)
3.3.3 (2023-11-11)
------------------
diff --git a... |
dask__dask-895 | `dask.async.remote_exception` fails for some exception types
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-197e1ec89913> in <module>()
----> 1 model = build.build_all()
/Users/henriquealves/Co... | [
{
"content": "\"\"\"\nAsynchronous Shared-Memory Scheduler for Dask Graphs.\n\nThis scheduler coordinates several workers to execute tasks in a dask graph in\nparallel. It depends on an apply_async function as would be found in thread or\nprocess Pools and a corresponding Queue for worker-to-scheduler communic... | [
{
"content": "\"\"\"\nAsynchronous Shared-Memory Scheduler for Dask Graphs.\n\nThis scheduler coordinates several workers to execute tasks in a dask graph in\nparallel. It depends on an apply_async function as would be found in thread or\nprocess Pools and a corresponding Queue for worker-to-scheduler communic... | diff --git a/dask/async.py b/dask/async.py
index 5396bcdb4d2..f54a233034f 100644
--- a/dask/async.py
+++ b/dask/async.py
@@ -580,9 +580,13 @@ def remote_exception(exc, tb):
""" Metaclass that wraps exception type in RemoteException """
if type(exc) in exceptions:
typ = exceptions[type(exc)]
+ ... |
open-telemetry__opentelemetry-python-3162 | Additional context for `Mixed types x and y in attribute value sequence` warnings
**Is your feature request related to a problem?**
I'm getting a whole lot of warnings like
```
opentelemetry.attributes.Mixed types str and int in attribute value sequence
```
But they're missing context in order to resolve them.... | [
{
"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/opentelemetry-api/src/opentelemetry/attributes/__init__.py b/opentelemetry-api/src/opentelemetry/attributes/__init__.py
index 0b7d056da99..724c931c826 100644
--- a/opentelemetry-api/src/opentelemetry/attributes/__init__.py
+++ b/opentelemetry-api/src/opentelemetry/attributes/__init__.py
@@ -85,7 +85,8 @@ d... |
django-compressor__django-compressor-991 | Fix simple typo: compressable -> compressible
There is a small typo in compressor/contrib/sekizai.py.
Should read `compressible` rather than `compressable`.
| [
{
"content": "\"\"\"\n source: https://gist.github.com/1311010\n Get django-sekizai, django-compessor (and django-cms) playing nicely together\n re: https://github.com/ojii/django-sekizai/issues/4\n using: https://github.com/django-compressor/django-compressor.git\n and: https://github.com/ojii/django-sekizai.g... | [
{
"content": "\"\"\"\n source: https://gist.github.com/1311010\n Get django-sekizai, django-compessor (and django-cms) playing nicely together\n re: https://github.com/ojii/django-sekizai/issues/4\n using: https://github.com/django-compressor/django-compressor.git\n and: https://github.com/ojii/django-sekizai.g... | diff --git a/compressor/contrib/sekizai.py b/compressor/contrib/sekizai.py
index 88da30e90..4100d7085 100644
--- a/compressor/contrib/sekizai.py
+++ b/compressor/contrib/sekizai.py
@@ -20,7 +20,7 @@ def compress(context, data, name):
Name is either 'js' or 'css' (the sekizai namespace)
Basically passes the st... |
qtile__qtile-2650 | Cmus widget doesn't update when song title has an ampersand ("&")
# Issue description
Whenever a song comes up that has an ampersand in the title, the cmus widget stops updating, even after the song in particular ends. I don't know if it happens with any other symbols, or if it happens when the ampersand is in the art... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2015, Juan Riquelme González\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your ... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2015, Juan Riquelme González\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your ... | diff --git a/libqtile/widget/cmus.py b/libqtile/widget/cmus.py
index 9f3a2d7c8b..da82e877d7 100644
--- a/libqtile/widget/cmus.py
+++ b/libqtile/widget/cmus.py
@@ -17,6 +17,7 @@
import subprocess
from functools import partial
+from libqtile import pangocffi
from libqtile.widget import base
@@ -101,7 +102,7 @@ d... |
dbt-labs__dbt-core-1553 | Add materializations dirs to include paths for pg/redshift
## Issue
### Issue description
The 0.14.0-a1 pypi distribution of dbt does not include specific macro directories in its `package_data` list. As a result, dbt installed via pip from pypi does not ship with materialization overrides for archival. This manife... | [
{
"content": "#!/usr/bin/env python\nfrom setuptools import find_packages\nfrom distutils.core import setup\nimport os\n\npackage_name = \"dbt-postgres\"\npackage_version = \"0.14.0a1\"\ndescription = \"\"\"The postgres adpter plugin for dbt (data build tool)\"\"\"\n\nthis_directory = os.path.abspath(os.path.di... | [
{
"content": "#!/usr/bin/env python\nfrom setuptools import find_packages\nfrom distutils.core import setup\nimport os\n\npackage_name = \"dbt-postgres\"\npackage_version = \"0.14.0a1\"\ndescription = \"\"\"The postgres adpter plugin for dbt (data build tool)\"\"\"\n\nthis_directory = os.path.abspath(os.path.di... | diff --git a/plugins/postgres/setup.py b/plugins/postgres/setup.py
index 3f19b0d9d8d..d6d9331bb8f 100644
--- a/plugins/postgres/setup.py
+++ b/plugins/postgres/setup.py
@@ -25,6 +25,7 @@
'dbt': [
'include/postgres/dbt_project.yml',
'include/postgres/macros/*.sql',
+ 'includ... |
saleor__saleor-2368 | Cannot place order in saleor demo's storefront
### What I'm trying to achieve
Place an order on the demo store to reproduce another bug. :wink:
### Steps to reproduce the problem
1. Create a cart with an item;
2. Follow the checkout until the summary page;
3. Try to hit "Order & Pay";
4. A server error should o... | [
{
"content": "from ..checkout import AddressType\nfrom ..core.demo_obfuscators import obfuscate_address\n\n\ndef store_user_address(user, address, address_type):\n \"\"\"Add address to user address book and set as default one.\"\"\"\n address, _ = user.addresses.get_or_create(**address.as_data())\n\n #... | [
{
"content": "from ..checkout import AddressType\nfrom ..core.demo_obfuscators import obfuscate_address\n\n\ndef store_user_address(user, address, address_type):\n \"\"\"Add address to user address book and set as default one.\"\"\"\n # DEMO: obfuscate user address\n address = obfuscate_address(address... | diff --git a/saleor/account/utils.py b/saleor/account/utils.py
index af10998d753..83b5f2ab041 100644
--- a/saleor/account/utils.py
+++ b/saleor/account/utils.py
@@ -4,11 +4,11 @@
def store_user_address(user, address, address_type):
"""Add address to user address book and set as default one."""
- address, _ =... |
Cloud-CV__EvalAI-1211 | Show only approved by admin challenges in analytics dashboard.
Show the challenges `approved_by_admin` and `published` in **Challenges Analytics Home**.
| [
{
"content": "import csv\nimport logging\nimport random\nimport requests\nimport shutil\nimport string\nimport tempfile\nimport yaml\nimport zipfile\n\nfrom os.path import basename, isfile, join\n\nfrom django.core.files.base import ContentFile\nfrom django.db import transaction\nfrom django.http import HttpRes... | [
{
"content": "import csv\nimport logging\nimport random\nimport requests\nimport shutil\nimport string\nimport tempfile\nimport yaml\nimport zipfile\n\nfrom os.path import basename, isfile, join\n\nfrom django.core.files.base import ContentFile\nfrom django.db import transaction\nfrom django.http import HttpRes... | diff --git a/apps/challenges/views.py b/apps/challenges/views.py
index 091f016d30..cb3a9dd875 100644
--- a/apps/challenges/views.py
+++ b/apps/challenges/views.py
@@ -248,7 +248,7 @@ def get_challenge_by_pk(request, pk):
@permission_classes((permissions.IsAuthenticated, HasVerifiedEmail))
@authentication_classes((Exp... |
aws__aws-cli-4060 | --output text results in "None" while --output json gives correct result on cloudformation changesets
Hi,
the following gives "CREATE_COMPLETE" which is correct
`aws cloudformation describe-change-set --change-set-name website-production-alb-a-1-0-7 --stack-name website-production-alb-a`
while this gives "None... | [
{
"content": "# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n\n# http://aws.amazon.com/apache2.0/... | [
{
"content": "# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n\n# http://aws.amazon.com/apache2.0/... | diff --git a/awscli/formatter.py b/awscli/formatter.py
index 886017b23ce0..f163f3adba9e 100644
--- a/awscli/formatter.py
+++ b/awscli/formatter.py
@@ -231,8 +231,12 @@ def __call__(self, command_name, response, stream=None):
try:
if is_response_paginated(response):
result_keys = r... |
tiangolo__fastapi-856 | Support repeated key=value in form data
### Is your feature request related to a problem
Yes.
Given some URL encoded data like this...
```
choices=parrot&choices=spider
```
...only the last key=value wins.
This does not work like I expected:
```python
choices: list = Form(...)
```
You can only va... | [
{
"content": "import asyncio\nimport inspect\nfrom contextlib import contextmanager\nfrom copy import deepcopy\nfrom typing import (\n Any,\n Callable,\n Dict,\n List,\n Mapping,\n Optional,\n Sequence,\n Tuple,\n Type,\n Union,\n cast,\n)\n\nfrom fastapi import params\nfrom fas... | [
{
"content": "import asyncio\nimport inspect\nfrom contextlib import contextmanager\nfrom copy import deepcopy\nfrom typing import (\n Any,\n Callable,\n Dict,\n List,\n Mapping,\n Optional,\n Sequence,\n Tuple,\n Type,\n Union,\n cast,\n)\n\nfrom fastapi import params\nfrom fas... | diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py
index 956fffff472de..a1cc0b9808d4c 100644
--- a/fastapi/dependencies/utils.py
+++ b/fastapi/dependencies/utils.py
@@ -629,9 +629,9 @@ async def request_body_to_args(
for field in required_params:
value: Any = None
... |
WordPress__openverse-api-299 | Type errors in the ingestion server 'cleanup' step
## Description
<!-- Concisely describe the bug. -->
Recently in production, the cleanup steps on the ingestion server `INGEST_UPSTREAM` task failed with the following error output:
```shell
Traceback (most recent call last):
File "/usr/local/lib/python3.9/mu... | [
{
"content": "\"\"\"\nFunctions for processing data when it is imported into the catalog. This\nincludes cleaning up malformed URLs and filtering out undesirable tags.\n\"\"\"\n\nimport logging as log\nimport multiprocessing\nimport time\nimport uuid\nfrom urllib.parse import urlparse\n\nimport requests as re\n... | [
{
"content": "\"\"\"\nFunctions for processing data when it is imported into the catalog. This\nincludes cleaning up malformed URLs and filtering out undesirable tags.\n\"\"\"\n\nimport logging as log\nimport multiprocessing\nimport time\nimport uuid\nfrom urllib.parse import urlparse\n\nimport requests as re\n... | diff --git a/ingestion_server/ingestion_server/cleanup.py b/ingestion_server/ingestion_server/cleanup.py
index 751a67219..d7f3b7d6e 100644
--- a/ingestion_server/ingestion_server/cleanup.py
+++ b/ingestion_server/ingestion_server/cleanup.py
@@ -104,9 +104,9 @@ def cleanup_tags(tags):
return None
f... |
digitalfabrik__integreat-cms-1189 | `AttributeError` on unchecked link list
### Describe the Bug
<!-- A clear and concise description of what the bug is. -->
Unchecked links do not have a `status_message`, which causes an `AttributeError` on the unchecked link list
### Steps to Reproduce
1. Add unchecked links
2. Go to `/analytics/linkcheck/unch... | [
{
"content": "\"\"\"\nThis is a collection of tags and filters for strings.\n\"\"\"\nfrom django import template\n\nregister = template.Library()\n\n\n@register.filter(name=\"words\")\ndef words(text):\n \"\"\"\n Split the given text into a list of words, see :meth:`python:str.split`.\n\n :param text: ... | [
{
"content": "\"\"\"\nThis is a collection of tags and filters for strings.\n\"\"\"\nfrom django import template\nfrom django.utils.translation import ugettext as _\n\nregister = template.Library()\n\n\n@register.filter(name=\"words\")\ndef words(text):\n \"\"\"\n Split the given text into a list of words... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 29152891f4..c55a84e8c8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ UNRELEASED
* [ [#1166](https://github.com/digitalfabrik/integreat-cms/issues/1166) ] Fix creation of location from event form
* [ [#1172](https://github.com/digitalfabrik/integreat-cms/... |
cookiecutter__cookiecutter-django-18 | Checking if database is set fails
This check will never be True, since it returns a value object and not a dict.
``` Python
DATABASES = values.DatabaseURLValue()
if DATABASES == {'default': {}}:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nDjango settings for {{cookiecutter.project_name}} project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/dev/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/dev/ref/settings/\... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nDjango settings for {{cookiecutter.project_name}} project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/dev/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/dev/ref/settings/\... | diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py
index ccb3028e7e..75ef95f1c8 100644
--- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/config/settings.py
+++ b/{{cookiecutter.repo_name}}/{{cookiecut... |
mlflow__mlflow-9120 | Upgrade ruff to 0.0.279
Ruff 0.0.279 should be released soon. Once it's released we can update this line to install it:
https://github.com/mlflow/mlflow/blob/dc5885a80c06981379d9b5379506c4fc746b5412/requirements/lint-requirements.txt#L2
| [
{
"content": "import logging\nimport os\nimport pathlib\nimport subprocess\nimport posixpath\nimport shlex\nimport sys\nimport warnings\nimport ctypes\nimport signal\nfrom pathlib import Path\n\nfrom mlflow.models import FlavorBackend\nfrom mlflow.models.docker_utils import (\n _build_image,\n _generate_d... | [
{
"content": "import logging\nimport os\nimport pathlib\nimport subprocess\nimport posixpath\nimport shlex\nimport sys\nimport warnings\nimport ctypes\nimport signal\nfrom pathlib import Path\n\nfrom mlflow.models import FlavorBackend\nfrom mlflow.models.docker_utils import (\n _build_image,\n _generate_d... | diff --git a/mlflow/pyfunc/backend.py b/mlflow/pyfunc/backend.py
index bb8e8bf3387bf..035bc0227cb0b 100644
--- a/mlflow/pyfunc/backend.py
+++ b/mlflow/pyfunc/backend.py
@@ -380,14 +380,10 @@ def copy_model_into_container(dockerfile_context_dir):
env_manager=self._env_manager,
)
... |
google-parfait__tensorflow-federated-1128 | `tff.learning.from_keras_model` does not accept subclassed Keras model
**Describe the bug**
`tff.learning.from_keras_model()` does not accept subclassed keras model. See this [colab](https://colab.research.google.com/drive/1dPJlo3e6vVHXS9O4Pm3_Qq2c_h0VtRaP?usp=sharing).
**Environment (please complete the following ... | [
{
"content": "# Copyright 2019, The TensorFlow Federated 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# Unl... | [
{
"content": "# Copyright 2019, The TensorFlow Federated 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# Unl... | diff --git a/tensorflow_federated/python/learning/keras_utils.py b/tensorflow_federated/python/learning/keras_utils.py
index 1d9a8a9b9b..51ecfe95be 100644
--- a/tensorflow_federated/python/learning/keras_utils.py
+++ b/tensorflow_federated/python/learning/keras_utils.py
@@ -51,6 +51,11 @@ def from_keras_model(
which... |
keras-team__keras-12035 | Using flow_from_dataframe with predict_generator produces wrong ordering of filenames
flow_from_dataframe is a very useful function allowing flexibility that flow_from_directory lacks, for e.g, regression tasks.
But the problem with this function is it processes the dataframe's (filename) column in sorted way.
for ex... | [
{
"content": "\"\"\"Utilities for real-time data augmentation on image data.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom .. import backend\nfrom .. import utils\nfrom ..utils import generic_utils\n\nfrom keras_preprocessing impo... | [
{
"content": "\"\"\"Utilities for real-time data augmentation on image data.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom .. import backend\nfrom .. import utils\nfrom ..utils import generic_utils\n\nfrom keras_preprocessing impo... | diff --git a/keras/preprocessing/image.py b/keras/preprocessing/image.py
index f526717e89d5..b06d6a122076 100644
--- a/keras/preprocessing/image.py
+++ b/keras/preprocessing/image.py
@@ -102,6 +102,7 @@ class DirectoryIterator(image.DirectoryIterator, Iterator):
`None`: no targets get yielded (only input i... |
translate__translate-4283 | poterminology always generates FutureWarning about a regexp containing a nested set
Whenever I run poterminology on *any* PO file, using a command like this
poterminology test.po
it generates a FutureWarning:
/usr/lib/python3.8/site-packages/translate/tools/poterminology.py:88:
FutureWarning: Poss... | [
{
"content": "#\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, or\n# (at your option) any later version.\n#\n# tra... | [
{
"content": "#\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, or\n# (at your option) any later version.\n#\n# tra... | diff --git a/translate/tools/poterminology.py b/translate/tools/poterminology.py
index c3df76bdbc..e1da3745b9 100755
--- a/translate/tools/poterminology.py
+++ b/translate/tools/poterminology.py
@@ -102,7 +102,7 @@ def __init__(
r"%(?:\([^)]+\)|[0-9]+\$)?[-+#0]*[0-9.*]*(?:[hlLzjt][hl])?[EFGXc-ginoprsux]"
... |
pymedusa__Medusa-2817 | [Trakt Checker] AttributeError: 'NoneType' object has no attribute 'get_episode'
### Before submitting your issue:
Enable debug logging in Medusa settings, reproduce the error (be sure to disable after the bug is fixed)
**Branch/Commit:**
**OS:**
**What you did:**
**What happened:**
**What you expected:**
**... | [
{
"content": "# coding=utf-8\n# Author: Frank Fenton\n#\n# This file is part of Medusa.\n#\n# Medusa is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your op... | [
{
"content": "# coding=utf-8\n# Author: Frank Fenton\n#\n# This file is part of Medusa.\n#\n# Medusa is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your op... | diff --git a/medusa/trakt_checker.py b/medusa/trakt_checker.py
index c7fe0b2b81..8afed79d54 100644
--- a/medusa/trakt_checker.py
+++ b/medusa/trakt_checker.py
@@ -551,7 +551,8 @@ def sync_trakt_episodes(self):
if indexer_id not in added_shows:
self.add_show(trakt_default_indexer, i... |
ansible-collections__community.general-2204 | Can't create github repo
### Summary
When I try to create a github repo with community general 2.4.0 github_repo module, I got an assertion error related to port.
### Issue Type
Bug Report
### Component Name
github_repo
### Ansible Version
ansible 2.10.7
community.general 2.4.0
PyGithub 1.54.1
... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2021, Álvaro Torres Cogollo\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\nDOCUMENTATION = '''\... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2021, Álvaro Torres Cogollo\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\nDOCUMENTATION = '''\... | diff --git a/changelogs/fragments/2204-github_repo-fix-baseurl_port.yml b/changelogs/fragments/2204-github_repo-fix-baseurl_port.yml
new file mode 100644
index 00000000000..0df3bd8ece4
--- /dev/null
+++ b/changelogs/fragments/2204-github_repo-fix-baseurl_port.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - github_repo - PyGithub b... |
psychopy__psychopy-3990 | What's this error message exactly?
I'm wondering what that symbol between "or" and "no spaces" should mean?

| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Part of the PsychoPy library\n# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd.\n# Distributed under the terms of the GNU General Public License (GPL).\n\n\"\"\"Module containing validators for various parameters.\n\... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Part of the PsychoPy library\n# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd.\n# Distributed under the terms of the GNU General Public License (GPL).\n\n\"\"\"Module containing validators for various parameters.\n\... | diff --git a/psychopy/app/builder/validators.py b/psychopy/app/builder/validators.py
index e07117544e..818d80d970 100644
--- a/psychopy/app/builder/validators.py
+++ b/psychopy/app/builder/validators.py
@@ -391,7 +391,7 @@ def check(self, parent):
).format(used=_translate(used))
OK... |
psychopy__psychopy-3292 | View ~> Open theme folder not working on macOS latest
No errors, just nothing happens
| [
{
"content": "import os\nimport subprocess\nimport sys\n\nimport wx\nimport wx.lib.agw.aui as aui\nimport wx.stc as stc\nfrom psychopy.localization import _translate\nfrom wx import py\nimport keyword\nimport builtins\nfrom pathlib import Path\nfrom psychopy import prefs\nfrom psychopy import logging\nimport ps... | [
{
"content": "import os\nimport subprocess\nimport sys\n\nimport wx\nimport wx.lib.agw.aui as aui\nimport wx.stc as stc\nfrom psychopy.localization import _translate\nfrom wx import py\nimport keyword\nimport builtins\nfrom pathlib import Path\nfrom psychopy import prefs\nfrom psychopy import logging\nimport ps... | diff --git a/psychopy/app/themes/_themes.py b/psychopy/app/themes/_themes.py
index eb064a1c0e..e5c7295574 100644
--- a/psychopy/app/themes/_themes.py
+++ b/psychopy/app/themes/_themes.py
@@ -1053,7 +1053,15 @@ def __init__(self, frame):
frame.Bind(wx.EVT_MENU, self.openThemeFolder, item)
def openThemeFo... |
Textualize__textual-4082 | Windows duplicates Escape key input.
Have you checked closed issues? https://github.com/Textualize/textual/issues?q=is%3Aissue+is%3Aclosed
Please give a brief but clear explanation of the issue. If you can, include a complete working example that demonstrates the bug. **Check it can run without modifications.**
I... | [
{
"content": "from __future__ import annotations\n\nimport ctypes\nimport msvcrt\nimport sys\nimport threading\nfrom asyncio import AbstractEventLoop, run_coroutine_threadsafe\nfrom ctypes import Structure, Union, byref, wintypes\nfrom ctypes.wintypes import BOOL, CHAR, DWORD, HANDLE, SHORT, UINT, WCHAR, WORD\n... | [
{
"content": "from __future__ import annotations\n\nimport ctypes\nimport msvcrt\nimport sys\nimport threading\nfrom asyncio import AbstractEventLoop, run_coroutine_threadsafe\nfrom ctypes import Structure, Union, byref, wintypes\nfrom ctypes.wintypes import BOOL, CHAR, DWORD, HANDLE, SHORT, UINT, WCHAR, WORD\n... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 76006efc24..535ecdfaab 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -50,6 +50,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- ID and class validation was too lenient https://github.com/Textualize/textual/issues/3954
- Fixed CSS watcher cr... |
holoviz__panel-4441 | Panel 1.0: Divider takes 100% of window height
I'm on the current `main` branch of Panel. When I use the `Divider` it takes up 100% of the window height.
```python
import panel as pn
pn.extension(sizing_mode="stretch_width")
pn.panel("Header", styles={"background": "lightgray"}).servable()
pn.layout.Divider(... | [
{
"content": "\"\"\"\nSpacer components to add horizontal or vertical space to a layout.\n\"\"\"\n\nimport param\n\nfrom bokeh.models import Div as BkDiv, Spacer as BkSpacer\n\nfrom ..reactive import Reactive\n\n\nclass Spacer(Reactive):\n \"\"\"\n The `Spacer` layout is a very versatile component which m... | [
{
"content": "\"\"\"\nSpacer components to add horizontal or vertical space to a layout.\n\"\"\"\n\nimport param\n\nfrom bokeh.models import Div as BkDiv, Spacer as BkSpacer\n\nfrom ..reactive import Reactive\n\n\nclass Spacer(Reactive):\n \"\"\"\n The `Spacer` layout is a very versatile component which m... | diff --git a/panel/dist/css/divider.css b/panel/dist/css/divider.css
new file mode 100644
index 0000000000..1e6c600429
--- /dev/null
+++ b/panel/dist/css/divider.css
@@ -0,0 +1,10 @@
+:host{
+ width: 100%;
+}
+div.bk-clearfix{
+ width:100%;
+}
+hr{
+ margin:0px;
+ margin-bottom:3px;
+}
diff --git a/panel/la... |
ansible-collections__amazon.aws-1563 | elb_application_lb does not modify attributes on creation
### Summary
On creation of Application Load Balancer with elb_application_lb, it does not set attributes.
I have to run the same module a second time to get attributes set.
Example of attribute : `idle_timeout`
### Issue Type
Bug Report
### Component Nam... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: Contributors to the Ansible project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nDOCUMENTATION = r\"\"\"\n---\nmodule: elb_application_lb\nversion_added: 5.0.0\nshort_description: Manage ... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: Contributors to the Ansible project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nDOCUMENTATION = r\"\"\"\n---\nmodule: elb_application_lb\nversion_added: 5.0.0\nshort_description: Manage ... | diff --git a/changelogs/fragments/1510-elb_application_lb-fix-alb-specific-attributes-not-added-on-create.yml b/changelogs/fragments/1510-elb_application_lb-fix-alb-specific-attributes-not-added-on-create.yml
new file mode 100644
index 00000000000..763a71e2306
--- /dev/null
+++ b/changelogs/fragments/1510-elb_applicati... |
ansible-collections__amazon.aws-1568 | elb_application_lb does not modify attributes on creation
### Summary
On creation of Application Load Balancer with elb_application_lb, it does not set attributes.
I have to run the same module a second time to get attributes set.
Example of attribute : `idle_timeout`
### Issue Type
Bug Report
### Component Nam... | [
{
"content": "#!/usr/bin/python\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version... | [
{
"content": "#!/usr/bin/python\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version... | diff --git a/changelogs/fragments/1510-elb_application_lb-fix-alb-specific-attributes-not-added-on-create.yml b/changelogs/fragments/1510-elb_application_lb-fix-alb-specific-attributes-not-added-on-create.yml
new file mode 100644
index 00000000000..763a71e2306
--- /dev/null
+++ b/changelogs/fragments/1510-elb_applicati... |
ietf-tools__datatracker-6642 | AD milestones page crashes if any milestones have no due date
### Describe the issue
The milestones view at `/iesg/milestones/` throws a server error if there are `GroupMilestone` instances with null `due` fields in the display list. The error is
```
TypeError at /iesg/milestones/
'<' not supported between instan... | [
{
"content": "# Copyright The IETF Trust 2007-2020, All Rights Reserved\n# -*- coding: utf-8 -*-\n#\n# Portion Copyright (C) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).\n# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>\n#\n# Redistribution and use in source and binary forms, with... | [
{
"content": "# Copyright The IETF Trust 2007-2020, All Rights Reserved\n# -*- coding: utf-8 -*-\n#\n# Portion Copyright (C) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).\n# All rights reserved. Contact: Pasi Eronen <pasi.eronen@nokia.com>\n#\n# Redistribution and use in source and binary forms, with... | diff --git a/ietf/iesg/tests.py b/ietf/iesg/tests.py
index 53172e645f..ceda918bb2 100644
--- a/ietf/iesg/tests.py
+++ b/ietf/iesg/tests.py
@@ -20,7 +20,7 @@
from ietf.doc.models import Document, DocAlias, State, RelatedDocument
from ietf.doc.factories import WgDraftFactory, IndividualDraftFactory, ConflictReviewFacto... |
web2py__web2py-1682 | heroku ADAPTERS error
I'm looking to use Heroku for deployment of my web2py project. However, when I add
`from gluon.contrib.heroku import get_db`
`db = get_db(name=None, pool_size=myconf.get('db.pool_size'))`
I get a ticket with the error:
> File "/Users/huangyu/dev/web2py/gluon/contrib/heroku.py", line 10, i... | [
{
"content": "\"\"\"\nUsage: in web2py models/db.py\n\nfrom gluon.contrib.heroku import get_db\ndb = get_db()\n\n\"\"\"\nimport os\nfrom gluon import *\nfrom pydal.adapters import ADAPTERS, PostgreSQLAdapter\nfrom pydal.helpers.classes import UseDatabaseStoredFile\n\nclass HerokuPostgresAdapter(UseDatabaseStore... | [
{
"content": "\"\"\"\nUsage: in web2py models/db.py\n\nfrom gluon.contrib.heroku import get_db\ndb = get_db()\n\n\"\"\"\nimport os\nfrom gluon import *\nfrom pydal.adapters import adapters, PostgrePsyco\nfrom pydal.helpers.classes import DatabaseStoredFile\n\n@adapters.register_for('postgres')\nclass HerokuPost... | diff --git a/gluon/contrib/heroku.py b/gluon/contrib/heroku.py
index 382564782..a5b50b217 100644
--- a/gluon/contrib/heroku.py
+++ b/gluon/contrib/heroku.py
@@ -7,15 +7,13 @@
"""
import os
from gluon import *
-from pydal.adapters import ADAPTERS, PostgreSQLAdapter
-from pydal.helpers.classes import UseDatabaseStored... |
vispy__vispy-1654 | setup.py attempts to import numpy before installing it
On master `setup.py` imports numpy on line 46 even though numpy is a dependency of vispy so it is not guaranteed it will be installed yet.
This causes `pip install git+https://github.com/vispy/vispy.git` to fail unless you already have numpy installed.
| [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\" Vispy setup script.\n\nSteps to do a new release:\n\nPreparations:\n * Test on Windows, Linux, Mac\n * Make release notes\n ... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\" Vispy setup script.\n\nSteps to do a new release:\n\nPreparations:\n * Test on Windows, Linux, Mac\n * Make release notes\n ... | diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000000..8439b2d337
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,10 @@
+[build-system]
+requires = [
+ "wheel",
+ "setuptools",
+ "Cython>=0.29.2",
+ "numpy; python_version=='2.7'",
+ "numpy==1.13.3; python_version=='3.5'",
+ ... |
ibis-project__ibis-2558 | link to documentation on http://ibis-project.org/ is broken
Everything under /docs/ (including the tutorial) 404's as of 2020-12-02.
| [
{
"content": "\"\"\"Impala backend\"\"\"\nimport ibis.common.exceptions as com\nimport ibis.config\nfrom ibis.config import options\n\n# these objects are exposed in the public API and are not used in the module\nfrom .client import ( # noqa: F401\n ImpalaClient,\n ImpalaConnection,\n ImpalaDatabase,\... | [
{
"content": "\"\"\"Impala backend\"\"\"\nimport ibis.common.exceptions as com\nimport ibis.config\nfrom ibis.config import options\n\n# these objects are exposed in the public API and are not used in the module\nfrom .client import ( # noqa: F401\n ImpalaClient,\n ImpalaConnection,\n ImpalaDatabase,\... | diff --git a/docs/source/backends/impala.rst b/docs/source/backends/impala.rst
index 20658ca8eeac..5c0cad997f18 100644
--- a/docs/source/backends/impala.rst
+++ b/docs/source/backends/impala.rst
@@ -35,7 +35,7 @@ client using :func:`ibis.impala.connect`:
import ibis
- hdfs = ibis.hdfs_connect(host='impala', p... |
pypa__pipenv-842 | pipenv requirement resolution failure for the ipython package
I think that you are cutting off the resolution algorithm in `pipenv/patched/piptools/resolver.py` too soon. The three observations that lead me to this belief are:
(1) In a clean empty python27 pipenv, typing `pipenv install ipython` succeeds in instal... | [
{
"content": "# coding: utf-8\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\n\nimport copy\nfrom functools import partial\nfrom itertools import chain, count\nimport os\n\nfrom first import first\nfrom pip.req import InstallRequirement\n\nfrom . i... | [
{
"content": "# coding: utf-8\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\n\nimport copy\nfrom functools import partial\nfrom itertools import chain, count\nimport os\n\nfrom first import first\nfrom pip.req import InstallRequirement\n\nfrom . i... | diff --git a/pipenv/patched/piptools/resolver.py b/pipenv/patched/piptools/resolver.py
index 99f37f48ca..297f00f2a0 100755
--- a/pipenv/patched/piptools/resolver.py
+++ b/pipenv/patched/piptools/resolver.py
@@ -276,9 +276,12 @@ def _iter_dependencies(self, ireq):
return
elif ireq.markers:
... |
pytorch__ignite-2984 | Fix warning in fast_neural_style example
Here is another good first issue to improve the ignite project. Currently, we have a warning on this line: https://github.com/pytorch/ignite/blob/master/examples/fast_neural_style/vgg.py#L10 (fast neural style example)
/opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-... | [
{
"content": "from collections import namedtuple\n\nimport torch\nfrom torchvision import models\n\n\nclass Vgg16(torch.nn.Module):\n def __init__(self, requires_grad=False):\n super(Vgg16, self).__init__()\n vgg_pretrained_features = models.vgg16(pretrained=True).features\n self.slice1 ... | [
{
"content": "from collections import namedtuple\n\nimport torch\nfrom torchvision import models\nfrom torchvision.models.vgg import VGG16_Weights\n\n\nclass Vgg16(torch.nn.Module):\n def __init__(self, requires_grad=False):\n super(Vgg16, self).__init__()\n vgg_pretrained_features = models.vgg... | diff --git a/examples/fast_neural_style/vgg.py b/examples/fast_neural_style/vgg.py
index 2e9ad1f2d135..05950246f0ff 100644
--- a/examples/fast_neural_style/vgg.py
+++ b/examples/fast_neural_style/vgg.py
@@ -2,12 +2,13 @@
import torch
from torchvision import models
+from torchvision.models.vgg import VGG16_Weights
... |
nautobot__nautobot-5366 | Custom Fields Association with Git Repositories
<!--
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 start a
discussion instead: htt... | [
{
"content": "import inspect\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ValidationError\nfrom django.db.models.fields import TextField\nfrom django.f... | [
{
"content": "import inspect\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ValidationError\nfrom django.db.models.fields import TextField\nfrom django.f... | diff --git a/changes/5307.fixed b/changes/5307.fixed
new file mode 100644
index 00000000000..e2aa842fa3a
--- /dev/null
+++ b/changes/5307.fixed
@@ -0,0 +1 @@
+Fixed Custom Field form field(s) missing from git repository edit form.
diff --git a/nautobot/core/testing/views.py b/nautobot/core/testing/views.py
index 16640e... |
voxel51__fiftyone-1828 | [BUG] Classifications label bubbles not displayed correctly
When viewing a `Classifications` field in the App, the bubble that is shown displays the `label` attribute of the `Classifications` rather than each `label` of each individual `Classification` in the `Classifications` list.
```python
import fiftyone as fo
... | [
{
"content": "\"\"\"\nSession class for interacting with the FiftyOne App\n\n| Copyright 2017-2022, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\nfrom collections import defaultdict\nfrom functools import wraps\nimport logging\nfrom packaging.version import Version\nimport pkg_resources\nim... | [
{
"content": "\"\"\"\nSession class for interacting with the FiftyOne App\n\n| Copyright 2017-2022, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\nfrom collections import defaultdict\nfrom functools import wraps\nimport logging\nfrom packaging.version import Version\nimport pkg_resources\nim... | diff --git a/app/packages/app/schema.graphql b/app/packages/app/schema.graphql
index 3572df21cdc..b97476e9295 100644
--- a/app/packages/app/schema.graphql
+++ b/app/packages/app/schema.graphql
@@ -8,6 +8,7 @@ type AppConfig {
showConfidence: Boolean!
showIndex: Boolean!
showLabel: Boolean!
+ showSkeletons: Bo... |
wagtail__wagtail-11194 | Documentation dependency - Upgrade Myst Parser
Our current documentation uses myst-parser version 0.18
https://github.com/wagtail/wagtail/blob/f71ecd9a753d3fd6d824e06bd58e2c20e2d5dcf6/setup.py#L78
### Describe the solution you'd like
The latest version of this library comes with some improvements and it wou... | [
{
"content": "#!/usr/bin/env python\n\nfrom wagtail import __version__\nfrom wagtail.utils.setup import assets, check_bdist_egg, sdist\n\ntry:\n from setuptools import find_packages, setup\nexcept ImportError:\n from distutils.core import setup\n\n\n# Hack to prevent \"TypeError: 'NoneType' object is not ... | [
{
"content": "#!/usr/bin/env python\n\nfrom wagtail import __version__\nfrom wagtail.utils.setup import assets, check_bdist_egg, sdist\n\ntry:\n from setuptools import find_packages, setup\nexcept ImportError:\n from distutils.core import setup\n\n\n# Hack to prevent \"TypeError: 'NoneType' object is not ... | diff --git a/docs/advanced_topics/add_to_django_project.md b/docs/advanced_topics/add_to_django_project.md
index 4d316ee32799..75f0730d0bcf 100644
--- a/docs/advanced_topics/add_to_django_project.md
+++ b/docs/advanced_topics/add_to_django_project.md
@@ -1,6 +1,6 @@
# How to add Wagtail into an existing Django project... |
meltano__meltano-7198 | Proposed: Should we add explicit `virtualenv` dependency
Follows from:
- https://github.com/meltano/meltano/issues/6882
We used to recommend _first_ installing `virtualenv`, then using `virtualenv` to install Meltano. This meant that Meltano was able to use `virtualenv` for plugin installation even without any ex... | [
{
"content": "\"\"\"Manage Python virtual environments.\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport hashlib\nimport logging\nimport os\nimport platform\nimport shutil\nimport subprocess\nimport sys\nfrom asyncio.subprocess import Process\nfrom collections import namedtuple\nfrom collec... | [
{
"content": "\"\"\"Manage Python virtual environments.\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport hashlib\nimport logging\nimport os\nimport platform\nimport shutil\nimport subprocess\nimport sys\nfrom asyncio.subprocess import Process\nfrom collections import namedtuple\nfrom collec... | diff --git a/poetry.lock b/poetry.lock
index c7dd33369e..a90a680782 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -923,7 +923,7 @@ dev = ["PyTest", "PyTest (<5)", "PyTest-Cov", "PyTest-Cov (<2.6)", "bump2version
name = "distlib"
version = "0.3.6"
description = "Distribution utilities"
-category = "dev"
+category = "... |
scrapy__scrapy-3737 | Incorrect link mentioned in comments (scrapy.extensions.httpcache)
https://github.com/scrapy/scrapy/blob/92801850546121f2faf95fd21c923904fde35c28/scrapy/extensions/httpcache.py#L73
Link mentioned : https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec14.9.1
It should have been https://www.w3.org/Protocols/rfc... | [
{
"content": "from __future__ import print_function\nimport os\nimport gzip\nimport logging\nfrom six.moves import cPickle as pickle\nfrom importlib import import_module\nfrom time import time\nfrom weakref import WeakKeyDictionary\nfrom email.utils import mktime_tz, parsedate_tz\nfrom w3lib.http import headers... | [
{
"content": "from __future__ import print_function\nimport os\nimport gzip\nimport logging\nfrom six.moves import cPickle as pickle\nfrom importlib import import_module\nfrom time import time\nfrom weakref import WeakKeyDictionary\nfrom email.utils import mktime_tz, parsedate_tz\nfrom w3lib.http import headers... | diff --git a/scrapy/extensions/httpcache.py b/scrapy/extensions/httpcache.py
index 1b5e05b1b3d..03bba153019 100644
--- a/scrapy/extensions/httpcache.py
+++ b/scrapy/extensions/httpcache.py
@@ -70,7 +70,7 @@ def should_cache_request(self, request):
return True
def should_cache_response(self, response, re... |
chainer__chainer-3226 | document bug report: chainer.Link page has incorrect code.
https://docs.chainer.org/en/stable/reference/core/generated/chainer.Link.html?highlight=Link
there is an example:
```
import chainer
import chainer.functions as F
from chainer import initializers
import numpy as np
class LinearLayer(chainer.Link):
... | [
{
"content": "import collections\nimport contextlib\nimport copy\nimport warnings\n\nimport numpy\nimport six\n\nfrom chainer import cuda\nfrom chainer import initializers\nfrom chainer import variable\n\n\ndef _is_shape(value):\n if value is None:\n return True\n elif isinstance(value, collections... | [
{
"content": "import collections\nimport contextlib\nimport copy\nimport warnings\n\nimport numpy\nimport six\n\nfrom chainer import cuda\nfrom chainer import initializers\nfrom chainer import variable\n\n\ndef _is_shape(value):\n if value is None:\n return True\n elif isinstance(value, collections... | diff --git a/chainer/link.py b/chainer/link.py
index 280f985b92cb..57b3803bb210 100644
--- a/chainer/link.py
+++ b/chainer/link.py
@@ -102,9 +102,9 @@ def __init__(self, n_in, n_out):
super(LinearLayer, self).__init__()
with self.init_scope():
self.W = chaine... |
oobabooga__text-generation-webui-4851 | Chat output has no spaces between words
I'm just starting up and managed to download the model **codellama_CodeLlama-7b-Instruct-hf**. Whenever I write a chat message with the AI, I'm getting something but has no spaces between the words so I'm not sure if I missed something or there is something wrong with the model.
... | [
{
"content": "import ast\nimport copy\nimport html\nimport random\nimport re\nimport time\nimport traceback\n\nimport numpy as np\nimport torch\nimport transformers\nfrom transformers import LogitsProcessorList, is_torch_xpu_available\n\nimport modules.shared as shared\nfrom modules.callbacks import (\n Iter... | [
{
"content": "import ast\nimport copy\nimport html\nimport random\nimport re\nimport time\nimport traceback\n\nimport numpy as np\nimport torch\nimport transformers\nfrom transformers import LogitsProcessorList, is_torch_xpu_available\n\nimport modules.shared as shared\nfrom modules.callbacks import (\n Iter... | diff --git a/modules/text_generation.py b/modules/text_generation.py
index 417ac1943f..f292bf1ec0 100644
--- a/modules/text_generation.py
+++ b/modules/text_generation.py
@@ -265,9 +265,8 @@ def apply_stopping_strings(reply, all_stop_strings):
def get_reply_from_output_ids(output_ids, state, starting_from=0):
r... |
encode__uvicorn-459 | Feature Request: unix server support ssl
`config.ssl` is not passed to `create_unix_server`.
https://github.com/encode/uvicorn/blob/e0a77de6baf436d182868fa280cd5e2f0d66501c/uvicorn/main.py#L368
https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.create_unix_server
| [
{
"content": "import asyncio\nimport functools\nimport os\nimport signal\nimport socket\nimport ssl\nimport sys\nimport time\nimport typing\nfrom email.utils import formatdate\n\nimport click\n\nfrom uvicorn.config import (\n HTTP_PROTOCOLS,\n INTERFACES,\n LIFESPAN,\n LOG_LEVELS,\n LOOP_SETUPS,\... | [
{
"content": "import asyncio\nimport functools\nimport os\nimport signal\nimport socket\nimport ssl\nimport sys\nimport time\nimport typing\nfrom email.utils import formatdate\n\nimport click\n\nfrom uvicorn.config import (\n HTTP_PROTOCOLS,\n INTERFACES,\n LIFESPAN,\n LOG_LEVELS,\n LOOP_SETUPS,\... | diff --git a/uvicorn/main.py b/uvicorn/main.py
index 068c56e7f..0ddf6e5f7 100644
--- a/uvicorn/main.py
+++ b/uvicorn/main.py
@@ -365,7 +365,9 @@ async def startup(self, sockets=None):
uds_perms = 0o666
if os.path.exists(config.uds):
uds_perms = os.stat(config.uds).st_mode
- ... |
modin-project__modin-2240 | Row index does not match pandas on read_csv with skiprows and names on certain files
pandas has a very strange edge case here. The following conditions must be met:
* `skiprows` must be > 1
* `names` must not be `None`
* `index_col` must be `None`
* File must have different data types in each line above `skiprows... | [
{
"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ... | [
{
"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ... | diff --git a/modin/engines/base/io/text/csv_reader.py b/modin/engines/base/io/text/csv_reader.py
index 6243ef592e3..85a844c26c5 100644
--- a/modin/engines/base/io/text/csv_reader.py
+++ b/modin/engines/base/io/text/csv_reader.py
@@ -180,11 +180,6 @@ def _read(cls, filepath_or_buffer, **kwargs):
if index_col is... |
google__flax-217 | apply_gradient with no parameters gives ValueError
This issue is admittedly a corner case, but one we've run into. If we consider the following `flax.nn.Module`:
```python
class Identity(flax.nn.Module):
def apply(self, x):
return x
```
We won't be able to call `apply_gradient` since the output fr... | [
{
"content": "# Copyright 2020 The Flax 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 ap... | [
{
"content": "# Copyright 2020 The Flax 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 ap... | diff --git a/flax/optim/base.py b/flax/optim/base.py
index 4cf32473d..559099c25 100644
--- a/flax/optim/base.py
+++ b/flax/optim/base.py
@@ -134,7 +134,7 @@ def apply_gradient(self, hyper_params, params, state, grads):
out = [self.apply_param_gradient(step, hyper_params, param, state, grad)
for param, ... |
elastic__apm-agent-python-1155 | RemovedInDjango41Warning
**Describe the bug**: ...
```shell
../../../../.pyenv/versions/3.8.2/lib/python3.8/site-packages/django/apps/registry.py:91
/Users/mingyu.wu/.pyenv/versions/3.8.2/lib/python3.8/site-packages/django/apps/registry.py:91: RemovedInDjango41Warning: 'elasticapm.contrib.django' defines default... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | diff --git a/elasticapm/contrib/django/__init__.py b/elasticapm/contrib/django/__init__.py
index 7a1a32c5d..4eb1038d7 100644
--- a/elasticapm/contrib/django/__init__.py
+++ b/elasticapm/contrib/django/__init__.py
@@ -27,7 +27,9 @@
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR ... |
pymedusa__Medusa-9211 | [APP SUBMITTED]: TypeError: backlogShow() got an unexpected keyword argument 'showslug'
### INFO
**Python Version**: `3.6.8 (default, Feb 13 2019, 20:48:47) [GCC 4.7.3 20130102 (prerelease)]`
**Operating System**: `Linux-3.10.35-x86_64-with-glibc2.2.5`
**Locale**: `UTF-8`
**Branch**: [master](../tree/master)
**Databas... | [
{
"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\n\nimport datetime\nimport json\nimport os\nimport re\n\nfrom medusa import (\n app,\n db,\n helpers,\n image_cache,\n logger,\n network_timezones,\n sbdatetime,\n subtitles,\n ui,\n)\nfrom medusa.common import (\... | [
{
"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\n\nimport datetime\nimport json\nimport os\nimport re\n\nfrom medusa import (\n app,\n db,\n helpers,\n image_cache,\n logger,\n network_timezones,\n sbdatetime,\n subtitles,\n ui,\n)\nfrom medusa.common import (\... | diff --git a/medusa/server/web/manage/handler.py b/medusa/server/web/manage/handler.py
index 7875a93440..c01ea7e62e 100644
--- a/medusa/server/web/manage/handler.py
+++ b/medusa/server/web/manage/handler.py
@@ -369,9 +369,9 @@ def subtitleMissedPP(self):
return t.render(releases_in_pp=app.RELEASES_IN_PP,
... |
pytorch__text-280 | TypeError in Python 2.7
https://github.com/pytorch/text/blob/a2795e5731d1b7c0298a1b5087bb8142e1c39d0b/torchtext/datasets/imdb.py#L32
In python 2.7, it will report that `TypeError: 'encoding' is an invalid keyword argument for this function`.
I replace `open` with `io.open` to fix it.
| [
{
"content": "import os\nimport glob\n\nfrom .. import data\n\n\nclass IMDB(data.Dataset):\n\n urls = ['http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz']\n name = 'imdb'\n dirname = 'aclImdb'\n\n @staticmethod\n def sort_key(ex):\n return len(ex.text)\n\n def __init__(sel... | [
{
"content": "import os\nimport glob\nimport io\n\nfrom .. import data\n\n\nclass IMDB(data.Dataset):\n\n urls = ['http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz']\n name = 'imdb'\n dirname = 'aclImdb'\n\n @staticmethod\n def sort_key(ex):\n return len(ex.text)\n\n def _... | diff --git a/torchtext/datasets/imdb.py b/torchtext/datasets/imdb.py
index 6a51e85a1a..c704d758c3 100644
--- a/torchtext/datasets/imdb.py
+++ b/torchtext/datasets/imdb.py
@@ -1,5 +1,6 @@
import os
import glob
+import io
from .. import data
@@ -29,7 +30,7 @@ def __init__(self, path, text_field, label_field, **kwa... |
keras-team__keras-2986 | Why TF-IDF matrix generated by keras.preprocessing.text.Tokenizer() has negative values?
Say, if run the following script:
> > > import keras
> > > tk = keras.preprocessing.text.Tokenizer()
> > > texts = ['I love you.', 'I love you, too.']
> > > tk.fit_on_texts(texts)
> > > tk.texts_to_matrix(texts, mode='tfidf')
The... | [
{
"content": "# -*- coding: utf-8 -*-\n'''These preprocessing utilities would greatly benefit\nfrom a fast Cython rewrite.\n'''\nfrom __future__ import absolute_import\n\nimport string\nimport sys\nimport numpy as np\nfrom six.moves import range\nfrom six.moves import zip\n\nif sys.version_info < (3,):\n mak... | [
{
"content": "# -*- coding: utf-8 -*-\n'''These preprocessing utilities would greatly benefit\nfrom a fast Cython rewrite.\n'''\nfrom __future__ import absolute_import\n\nimport string\nimport sys\nimport numpy as np\nfrom six.moves import range\nfrom six.moves import zip\n\nif sys.version_info < (3,):\n mak... | diff --git a/keras/preprocessing/text.py b/keras/preprocessing/text.py
index 1300a7ef3994..4c4e45155057 100644
--- a/keras/preprocessing/text.py
+++ b/keras/preprocessing/text.py
@@ -209,8 +209,8 @@ def sequences_to_matrix(self, sequences, mode='binary'):
# Use weighting scheme 2 in
... |
open-telemetry__opentelemetry-python-contrib-1791 | Instantiating AsyncPGInstrumentor after .instrument has been called causes tracing to fail
**Describe your environment**
Python 3.11 on a M2 Mac.
**Steps to reproduce**
Run the following code (with `python -m asyncio` to allow top-level `async`/`await`):
```
import asyncpg
from opentelemetry.instrumentati... | [
{
"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 c0d73faa6a..3157bca33e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#2151](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2151))
- `opentelemetry-r... |
spyder-ide__spyder-9228 | Add icons for Latex file type
The icons are located here:
https://github.com/vscode-icons/vscode-icons/blob/master/icons/file_type_light_tex.svg
https://github.com/vscode-icons/vscode-icons/blob/master/icons/file_type_tex.svg
@juanis2112, the idea is to move both the black and white versions to our repo, make th... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n# Standard library imports\nimport os\nimport os.path as osp\nimport mimetypes as mime\nimport sys\n\n# Third party imports\nfrom qtpy.QtG... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n# Standard library imports\nimport os\nimport os.path as osp\nimport mimetypes as mime\nimport sys\n\n# Third party imports\nfrom qtpy.QtG... | diff --git a/NOTICE.txt b/NOTICE.txt
index 2293faf2502..62fb23ea89f 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -1675,6 +1675,39 @@ spyder/images/notebook_light.svg
spyder/images/notebook_dark.svg
+-------------------------------------------------------------------------------
+
+
+
+Latex Logo
+----------
+
+
+Co... |
ansible-collections__amazon.aws-1569 | elb_application_lb does not modify attributes on creation
### Summary
On creation of Application Load Balancer with elb_application_lb, it does not set attributes.
I have to run the same module a second time to get attributes set.
Example of attribute : `idle_timeout`
### Issue Type
Bug Report
### Component Nam... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: Contributors to the Ansible project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nDOCUMENTATION = r\"\"\"\n---\nmodule: elb_application_lb\nversion_added: 5.0.0\nshort_description: Manage ... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: Contributors to the Ansible project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nDOCUMENTATION = r\"\"\"\n---\nmodule: elb_application_lb\nversion_added: 5.0.0\nshort_description: Manage ... | diff --git a/changelogs/fragments/1510-elb_application_lb-fix-alb-specific-attributes-not-added-on-create.yml b/changelogs/fragments/1510-elb_application_lb-fix-alb-specific-attributes-not-added-on-create.yml
new file mode 100644
index 00000000000..763a71e2306
--- /dev/null
+++ b/changelogs/fragments/1510-elb_applicati... |
biopython__biopython-3442 | Pickling/unpickling `Bio.Align.substitution_matrices.Array` loses the `alphabet` attribute
### Setup
I am reporting a problem with Biopython version, Python version, and operating
system as follows:
```python
>>> import sys; print(sys.version)
3.8.6 (default, Sep 30 2020, 04:00:38)
[GCC 10.2.0]
>>> import p... | [
{
"content": "# Copyright 2019 by Michiel de Hoon.\n#\n# This file is part of the Biopython distribution and governed by your\n# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n# Please see the LICENSE file that should have been included as part of this\n# package.\n\n\"\"\"Subst... | [
{
"content": "# Copyright 2019 by Michiel de Hoon.\n#\n# This file is part of the Biopython distribution and governed by your\n# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n# Please see the LICENSE file that should have been included as part of this\n# package.\n\n\"\"\"Subst... | diff --git a/Bio/Align/substitution_matrices/__init__.py b/Bio/Align/substitution_matrices/__init__.py
index 35d95234164..feb066c9c4f 100644
--- a/Bio/Align/substitution_matrices/__init__.py
+++ b/Bio/Align/substitution_matrices/__init__.py
@@ -233,6 +233,22 @@ def __array_ufunc__(self, ufunc, method, *inputs, **kwargs... |
cocotb__cocotb-239 | IPython tab complete spews a bunch of _raise_testerror and stacktrace
If I start an embedded IPython shell in my sim and tab complete on dut, I get a bunch of cocotb ERROR messages.
And a stacktrace from the `_raise_testerror` function in `handle.py`.
I've stuck the output of my sim below.
This comes about as we're u... | [
{
"content": "#!/usr/bin/env python\n\n''' Copyright (c) 2013 Potential Ventures Ltd\nCopyright (c) 2013 SolarFlare Communications Inc\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n * R... | [
{
"content": "#!/usr/bin/env python\n\n''' Copyright (c) 2013 Potential Ventures Ltd\nCopyright (c) 2013 SolarFlare Communications Inc\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n * R... | diff --git a/cocotb/handle.py b/cocotb/handle.py
index 13e13c1161..79b8f93701 100644
--- a/cocotb/handle.py
+++ b/cocotb/handle.py
@@ -80,6 +80,10 @@ def __getattr__(self, name):
""" Query the simulator for a object with the specified name
and cache the result to build a tree
"""
+ ... |
mesonbuild__meson-5589 | meson_exe: Don't assert that we need an exe_wrapper when we say we do…
…n't need one
Fixes cross compiling mesa from x86_64 -> x86 on an x86_64 system.
Fixes #5567
| [
{
"content": "# Copyright 2013-2019 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless req... | [
{
"content": "# Copyright 2013-2019 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless req... | diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index f7b107ca838a..223e6dc71f6b 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -460,12 +460,12 @@ def _factory(cls, env, kwargs):
methods = cls._process_method_kw(kwargs)
candidates = []
... |
python-pillow__Pillow-3148 | PIL.ImageColor.getrgb add support for HSB/HSV format
The current `PIL.ImageColor.getrgb` does not support [HSB/HSV](https://en.wikipedia.org/wiki/HSL_and_HSV) format, only the related HSL, but for easier conversion of some coordinates it would be nice to have support for HSB/HSV also.
| [
{
"content": "#\n# The Python Imaging Library\n# $Id$\n#\n# map CSS3-style colour description strings to RGB\n#\n# History:\n# 2002-10-24 fl Added support for CSS-style color strings\n# 2002-12-15 fl Added RGBA support\n# 2004-03-27 fl Fixed remaining int() problems for Python 1.5.2\n# 2004-07-19 fl Fix... | [
{
"content": "#\n# The Python Imaging Library\n# $Id$\n#\n# map CSS3-style colour description strings to RGB\n#\n# History:\n# 2002-10-24 fl Added support for CSS-style color strings\n# 2002-12-15 fl Added RGBA support\n# 2004-03-27 fl Fixed remaining int() problems for Python 1.5.2\n# 2004-07-19 fl Fix... | diff --git a/Tests/test_imagecolor.py b/Tests/test_imagecolor.py
index 81ad179e6d4..0aac212784e 100644
--- a/Tests/test_imagecolor.py
+++ b/Tests/test_imagecolor.py
@@ -78,10 +78,21 @@ def test_functions(self):
self.assertEqual((255, 0, 0), ImageColor.getrgb("hsl(360,100%,50%)"))
self.assertEqual((0, ... |
chainer__chainer-3054 | Add order='C' option to `cupy.copy` calls using default order value.
Merge https://github.com/cupy/cupy/pull/159 first.
In https://github.com/cupy/cupy/pull/159, the default value of `cupy.copy`'s `order` argument is changed with breaking compatibility. We need to add `order='C'` option to `cupy.copy` calls with def... | [
{
"content": "import warnings\n\nimport numpy\nimport six\n\nfrom chainer import configuration\nfrom chainer import cuda\nfrom chainer.functions.math import identity\nfrom chainer import testing\nfrom chainer import variable\n\n\ndef _copy_arrays(xs):\n xp = cuda.get_array_module(*xs)\n return [xp.copy(x)... | [
{
"content": "import warnings\n\nimport numpy\nimport six\n\nfrom chainer import configuration\nfrom chainer import cuda\nfrom chainer.functions.math import identity\nfrom chainer import testing\nfrom chainer import variable\n\n\ndef _copy_arrays(xs):\n xp = cuda.get_array_module(*xs)\n return [xp.copy(x,... | diff --git a/chainer/functions/math/sqrt.py b/chainer/functions/math/sqrt.py
index 5eee51e731e6..b0e9fae3d8be 100644
--- a/chainer/functions/math/sqrt.py
+++ b/chainer/functions/math/sqrt.py
@@ -24,7 +24,7 @@ def forward(self, x):
def backward(self, x, gy):
xp = cuda.get_array_module(*gy)
- gx = ... |
matrix-org__synapse-8948 | /_synapse/admin/v1/users/<user_id>/joined_rooms should also work for remote users
As a server admin, whenever I investigate a troll (or worse), I need to know where they're on my server.
Currently, `/_synapse/admin/v1/users/<user_id>/joined_rooms` works for local users, but sometimes, trolls come from other servers.... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2019 The Matrix.org Foundation C.I.C.\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... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2019 The Matrix.org Foundation C.I.C.\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... | diff --git a/changelog.d/8948.feature b/changelog.d/8948.feature
new file mode 100644
index 000000000000..3b06cbfa222a
--- /dev/null
+++ b/changelog.d/8948.feature
@@ -0,0 +1 @@
+Update `/_synapse/admin/v1/users/<user_id>/joined_rooms` to work for both local and remote users.
diff --git a/docs/admin_api/user_admin_api.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.