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 ⌀ |
|---|---|---|---|---|
HypothesisWorks__hypothesis-3371 | copying falsifying example into `@example()` fails to reproduce test failure due to pprinter sorting dict keys
Some code depends on the order of dict iteration so sorting the keys before printing makes reproducing a failing test more difficult.
Related to #2913 ?
**Sample code**:
```
import hypothesis as h
im... | [
{
"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/AUTHORS.rst b/AUTHORS.rst
index e352772d9e..e33600b7a3 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -32,6 +32,7 @@ their individual contributions.
* `Chase Garner <https://www.github.com/chasegarner>`_ (chase@garner.red)
* `Cheuk Ting Ho <https://github.com/Cheukting>`_
* `Chris Down <https://chrisdow... |
celery__celery-4448 | chord_unlock isn't using the same queue as chord
I've created a tasks_queue and priority_task_queue. in addition to that i've set the tasks_queue to be used as default queue. Now every time i would like a task to be perfrom right away i use priority_queue which is generally empty most of the time. now, the problem arai... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Result backend base classes.\n\n- :class:`BaseBackend` defines the interface.\n\n- :class:`KeyValueStoreBackend` is a common base class\n using K/V semantics like _get and _put.\n\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport sys\nimpor... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Result backend base classes.\n\n- :class:`BaseBackend` defines the interface.\n\n- :class:`KeyValueStoreBackend` is a common base class\n using K/V semantics like _get and _put.\n\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport sys\nimpor... | diff --git a/celery/backends/base.py b/celery/backends/base.py
index 3e4dc588b20..fc4910555a4 100644
--- a/celery/backends/base.py
+++ b/celery/backends/base.py
@@ -415,8 +415,11 @@ def on_chord_part_return(self, request, state, result, **kwargs):
def fallback_chord_unlock(self, header_result, body, countdown=1,
... |
searxng__searxng-2825 | Bug: brave giving invalid links taken from ads
**Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG**
Repository: https://github.com/searxng/searxng
Branch: master
Version: 2023.9.17+b4e0d2eed
<!-- Check if these values are correct -->
**How did you install Se... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n# lint: pylint\n\"\"\"Brave supports the categories listed in :py:obj:`brave_category` (General,\nnews, videos, images). The support of :py:obj:`paging` and :py:obj:`time range\n<time_range_support>` is limited (see remarks).\n\nConfigured ``brave`` e... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n# lint: pylint\n\"\"\"Brave supports the categories listed in :py:obj:`brave_category` (General,\nnews, videos, images). The support of :py:obj:`paging` and :py:obj:`time range\n<time_range_support>` is limited (see remarks).\n\nConfigured ``brave`` e... | diff --git a/searx/engines/brave.py b/searx/engines/brave.py
index 13e262fa3b7..c713ffe5082 100644
--- a/searx/engines/brave.py
+++ b/searx/engines/brave.py
@@ -246,7 +246,7 @@ def _parse_search(resp):
url = eval_xpath_getindex(result, './/a[contains(@class, "h")]/@href', 0, default=None)
title_tag ... |
sql-machine-learning__elasticdl-354 | Fix TFExample codec
| [
{
"content": "",
"path": "record_codec/__init__.py"
},
{
"content": "from enum import Enum\nimport tensorflow as tf\n\n\nclass TFExampleCodec(object):\n def __init__(self, feature_columns):\n self._f_name2type = {}\n self._example_spec = tf.feature_column.make_parse_example_spec(fea... | [
{
"content": "from record_codec.tf_example_codec import TFExampleCodec\n\n__all__=[TFExampleCodec]\n",
"path": "record_codec/__init__.py"
},
{
"content": "from enum import Enum\nimport tensorflow as tf\n\n\nclass TFExampleCodec(object):\n def __init__(self, feature_columns):\n self._exampl... | diff --git a/record_codec/__init__.py b/record_codec/__init__.py
index e69de29bb..1b8d9942b 100644
--- a/record_codec/__init__.py
+++ b/record_codec/__init__.py
@@ -0,0 +1,3 @@
+from record_codec.tf_example_codec import TFExampleCodec
+
+__all__=[TFExampleCodec]
diff --git a/record_codec/tf_example_codec.py b/record_co... |
ansible-collections__community.general-3449 | GitLab API searches always return first found match
### Summary
When trying to add gitlab users to a gitlab group using the `gitlab_group_members` we found that the users were not assigned to the correct given group. Instead they were assigned on a totally different subgroup.
We traced down the problem and found that... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2020, Zainab Alsaffar <Zainab.Alsaffar@mail.rit.edu>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = typ... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2020, Zainab Alsaffar <Zainab.Alsaffar@mail.rit.edu>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = typ... | diff --git a/changelogs/fragments/3400-fix-gitLab-api-searches-always-return-first-found-match-3386.yml b/changelogs/fragments/3400-fix-gitLab-api-searches-always-return-first-found-match-3386.yml
new file mode 100644
index 00000000000..ab13b4adba7
--- /dev/null
+++ b/changelogs/fragments/3400-fix-gitLab-api-searches-a... |
streamlit__streamlit-7283 | Button / `st.session_state` bug introduced with 1.20?
### Checklist
- [X] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues.
- [X] I added a very descriptive title to this issue.
- [X] I have provided sufficient information below to help reproduce this issue.
### ... | [
{
"content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2... | [
{
"content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2... | diff --git a/lib/streamlit/runtime/state/session_state.py b/lib/streamlit/runtime/state/session_state.py
index f2dbd2bb0e3d..d31073f3266f 100644
--- a/lib/streamlit/runtime/state/session_state.py
+++ b/lib/streamlit/runtime/state/session_state.py
@@ -493,8 +493,8 @@ def on_script_will_rerun(self, latest_widget_states: ... |
sktime__sktime-5015 | [DOC] Add a copy button to the documentation to help copy pasting the documented examples
Currently, all the documented examples need to be manually copied by the users to try for their own. Adding a `copy` button can simplify this task for user convenience. [This](https://github.com/executablebooks/sphinx-copybutton) ... | [
{
"content": "#!/usr/bin/env python3\n\"\"\"Configuration file for the Sphinx documentation builder.\"\"\"\n\nimport os\nimport sys\nfrom importlib import import_module\n\nimport sktime\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document w... | [
{
"content": "#!/usr/bin/env python3\n\"\"\"Configuration file for the Sphinx documentation builder.\"\"\"\n\nimport os\nimport sys\nfrom importlib import import_module\n\nimport sktime\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document w... | diff --git a/docs/source/conf.py b/docs/source/conf.py
index 096017fb0a4..7fcf7ecb5cc 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -47,6 +47,7 @@
"nbsphinx", # integrates example notebooks
"sphinx_gallery.load_style",
"myst_parser",
+ "sphinx_copybutton",
"sphinx_design",
"... |
pypi__warehouse-2942 | Blocking of stdlib names has holes?
Hi!
Pull request #2409 introduced a blacklist of stdlib names to counter to protect against [pytosquatting](https://www.pytosquatting.org/), aiming to plug #2151.
I found a hole with it. While names like `xmlrpc.client` and `encodings.idna` are blocked because they appear in so... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/tests/unit/forklift/test_legacy.py b/tests/unit/forklift/test_legacy.py
index 688fa995ef35..ed93026db84a 100644
--- a/tests/unit/forklift/test_legacy.py
+++ b/tests/unit/forklift/test_legacy.py
@@ -882,6 +882,11 @@ def test_fails_with_invalid_names(self, pyramid_config, db_request, name):
... |
conan-io__conan-center-index-2103 | [package] <automake>/<1.16.2>: configure step fails because m4 is required
When m4 is not installed on your system creating the automake/1.16.2 (and 1.16.1) package will fail, see logs below.
When I add m4/1.4.18 as a requirement to the automake conan recipe, the error disappears.
I will create a pull request.
#... | [
{
"content": "import os\nfrom conans import AutoToolsBuildEnvironment, ConanFile, tools\n\n\nclass AutoconfConan(ConanFile):\n name = \"autoconf\"\n url = \"https://github.com/conan-io/conan-center-index\"\n homepage = \"https://www.gnu.org/software/autoconf/\"\n description = \"Autoconf is an exten... | [
{
"content": "import os\nfrom conans import AutoToolsBuildEnvironment, ConanFile, tools\n\n\nclass AutoconfConan(ConanFile):\n name = \"autoconf\"\n url = \"https://github.com/conan-io/conan-center-index\"\n homepage = \"https://www.gnu.org/software/autoconf/\"\n description = \"Autoconf is an exten... | diff --git a/recipes/autoconf/all/conanfile.py b/recipes/autoconf/all/conanfile.py
index 0d5bf33977ac5..aba1474238ac7 100644
--- a/recipes/autoconf/all/conanfile.py
+++ b/recipes/autoconf/all/conanfile.py
@@ -21,6 +21,11 @@ def source(self):
tools.get(**self.conan_data["sources"][self.version])
os.ren... |
pytorch__pytorch-4563 | RuntimeError: Unsupported op descriptor: thnn_batch_norm_forward-5-eps-momentum-training. File a bug report.
I started getting this with the latest code while using JIT:
RuntimeError: Unsupported op descriptor: thnn_batch_norm_forward-5-eps-momentum-training. File a bug report.
It did not happen 7 days ago and st... | [
{
"content": "import os\nimport argparse\nfrom itertools import count\nfrom ..autograd.utils import CodeTemplate, write\nfrom ..autograd.gen_autograd import load_aten_declarations\n\ntemplate_path = os.path.join(os.path.dirname(__file__), 'templates')\n\nATEN_DISPATCH_H = CodeTemplate.from_file(template_path + ... | [
{
"content": "import os\nimport argparse\nfrom itertools import count\nfrom ..autograd.utils import CodeTemplate, write\nfrom ..autograd.gen_autograd import load_aten_declarations\n\ntemplate_path = os.path.join(os.path.dirname(__file__), 'templates')\n\nATEN_DISPATCH_H = CodeTemplate.from_file(template_path + ... | diff --git a/tools/jit/gen_jit_dispatch.py b/tools/jit/gen_jit_dispatch.py
index a9888793d869f3..38fef24deb3dd5 100644
--- a/tools/jit/gen_jit_dispatch.py
+++ b/tools/jit/gen_jit_dispatch.py
@@ -49,7 +49,6 @@
def is_jit_op(decl):
return (not decl['api_name'].endswith('_') and
not decl['name'].endswit... |
great-expectations__great_expectations-2205 | Using a postgres expectation store fails in v0.13
**Describe the bug**
I can't get a postgres expectation store working in v0.13 -- I'm not sure if the format changed or if this is a bug, so I wanted to flag it here.
Existing docs for reference [here](https://docs.greatexpectations.io/en/latest/guides/how_to_guides... | [
{
"content": "import logging\nimport uuid\nfrom pathlib import Path\nfrom typing import Dict, Tuple\nfrom urllib.parse import urlparse\n\nimport great_expectations.exceptions as ge_exceptions\nfrom great_expectations.data_context.store.store_backend import StoreBackend\n\ntry:\n import sqlalchemy as sa\n ... | [
{
"content": "import logging\nimport uuid\nfrom pathlib import Path\nfrom typing import Dict, Tuple\nfrom urllib.parse import urlparse\n\nimport great_expectations.exceptions as ge_exceptions\nfrom great_expectations.data_context.store.store_backend import StoreBackend\n\ntry:\n import sqlalchemy as sa\n ... | diff --git a/great_expectations/data_context/store/database_store_backend.py b/great_expectations/data_context/store/database_store_backend.py
index c887cd67d682..9cf2bb58bae0 100644
--- a/great_expectations/data_context/store/database_store_backend.py
+++ b/great_expectations/data_context/store/database_store_backend.... |
chainer__chainer-5333 | PrintHook may fail
* Conditions
```
>>> chainer.print_runtime_info()
Platform: Darwin-17.7.0-x86_64-i386-64bit
Chainer: 5.0.0b4
NumPy: 1.16.0.dev0+591880b
CuPy: Not Available
```
* Code to reproduce
```
>>> x = chainer.Variable(np.random.rand(2, 3).astype('f'))
>>> lstm = chainer.links.LSTM(3)
>>> y = lstm(... | [
{
"content": "import sys\nimport warnings\n\nfrom chainer.backends import cuda\nfrom chainer import function_hook\nfrom chainer import variable\n\n\nclass PrintHook(function_hook.FunctionHook):\n \"\"\"Function hook that prints debug information.\n\n This function hook outputs the debug information of inp... | [
{
"content": "import sys\nimport warnings\n\nfrom chainer.backends import cuda\nfrom chainer import function_hook\nfrom chainer import variable\n\n\nclass PrintHook(function_hook.FunctionHook):\n \"\"\"Function hook that prints debug information.\n\n This function hook outputs the debug information of inp... | diff --git a/chainer/function_hooks/debug_print.py b/chainer/function_hooks/debug_print.py
index 4d7cd5333640..36dab22a9bc3 100644
--- a/chainer/function_hooks/debug_print.py
+++ b/chainer/function_hooks/debug_print.py
@@ -73,9 +73,12 @@ def _process(self, function, in_data, out_grad=None):
if out_grad is not ... |
carpentries__amy-2639 | Require email reschedule date/time to be in the future
Currently past date/time values are allowed.
| [
{
"content": "from django import forms\nfrom markdownx.fields import MarkdownxFormField\n\nfrom emails.models import EmailTemplate, ScheduledEmail\nfrom emails.signals import SignalNameEnum\nfrom workshops.forms import BootstrapHelper\n\n\nclass EmailTemplateCreateForm(forms.ModelForm):\n body = MarkdownxFor... | [
{
"content": "from datetime import UTC, datetime\n\nfrom django import forms\nfrom markdownx.fields import MarkdownxFormField\n\nfrom emails.models import EmailTemplate, ScheduledEmail\nfrom emails.signals import SignalNameEnum\nfrom workshops.forms import BootstrapHelper\n\n\nclass EmailTemplateCreateForm(form... | diff --git a/amy/emails/forms.py b/amy/emails/forms.py
index 0749ea42a..85e66509c 100644
--- a/amy/emails/forms.py
+++ b/amy/emails/forms.py
@@ -1,3 +1,5 @@
+from datetime import UTC, datetime
+
from django import forms
from markdownx.fields import MarkdownxFormField
@@ -87,6 +89,14 @@ class ScheduledEmailReschedul... |
django-cms__django-cms-2736 | i18n redirect_on_fallback=False and public=False bug
the combination of `redirect_on_fallback=False` with `public=False` creates undesired results.
``` python
LANGUAGE_CODE='de'
CMS_LANGUAGES = {
1: [
{
'code': 'de',
'name': _('German'),
},
{
'code': 'en'... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import with_statement\nimport hashlib\n\nfrom django.utils.encoding import iri_to_uri, force_text\nfrom django.contrib.auth.views import redirect_to_login\nfrom django.template.response import TemplateResponse\nfrom cms.apphook_pool import apphook_pool\nfro... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import with_statement\nimport hashlib\n\nfrom django.utils.encoding import iri_to_uri, force_text\nfrom django.contrib.auth.views import redirect_to_login\nfrom django.template.response import TemplateResponse\nfrom cms.apphook_pool import apphook_pool\nfro... | diff --git a/cms/tests/i18n.py b/cms/tests/i18n.py
index ef3fec41bc8..069196a38b9 100644
--- a/cms/tests/i18n.py
+++ b/cms/tests/i18n.py
@@ -1,3 +1,4 @@
+from cms import api
from cms.test_utils.testcases import SettingsOverrideTestCase
from cms.utils import i18n
@@ -270,3 +271,38 @@ def test_get_languages_undefined... |
ibis-project__ibis-5700 | bug: Combining union and order_by generates invalid BigQuery SQL
### What happened?
Hi Ibis team,
When applying union operation on table expression with order_by, it generates bad SQL.
A simple code piece can reproduce the issue:
```
import ibis
conn = ibis.bigquery.connect(
project_id='garrettwu-test-... | [
{
"content": "from __future__ import annotations\n\nimport abc\nfrom itertools import chain\n\nimport toolz\n\nimport ibis.expr.analysis as an\nimport ibis.expr.operations as ops\nfrom ibis import util\n\n\nclass DML(abc.ABC):\n @abc.abstractmethod\n def compile(self):\n pass\n\n\nclass DDL(abc.ABC... | [
{
"content": "from __future__ import annotations\n\nimport abc\nfrom itertools import chain\n\nimport toolz\n\nimport ibis.expr.analysis as an\nimport ibis.expr.operations as ops\nfrom ibis import util\n\n\nclass DML(abc.ABC):\n @abc.abstractmethod\n def compile(self):\n pass\n\n\nclass DDL(abc.ABC... | diff --git a/ibis/backends/base/sql/compiler/base.py b/ibis/backends/base/sql/compiler/base.py
index 4a7ca01b948a..3a6754ef707d 100644
--- a/ibis/backends/base/sql/compiler/base.py
+++ b/ibis/backends/base/sql/compiler/base.py
@@ -68,8 +68,12 @@ def _get_keyword_list(self):
return map(self.keyword, self.distin... |
acl-org__acl-anthology-2540 | Ingestion Request: {NoDaLiDa 2023 Workshop RESOURCEFUL}
### General information about this request
- [X] I confirm that I have read the [Information for Submitters](https://aclanthology.org/info/contrib/).
- [X] I am submitting a request for a **new venue** that does not exist in the ACL Anthology yet.
### Venue... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Copyright 2021, 2022 Xinru Yan <xinru1414@gmail.com>\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# ... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Copyright 2021, 2022 Xinru Yan <xinru1414@gmail.com>\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# ... | diff --git a/bin/ingest_aclpub2.py b/bin/ingest_aclpub2.py
index 120cf17de5..52144e7780 100644
--- a/bin/ingest_aclpub2.py
+++ b/bin/ingest_aclpub2.py
@@ -347,7 +347,7 @@ def process_procedding(
event_name = meta['event_name']
assert (
re.match(r'(.)* [Ww]orkshop', event_name) is None
- ... |
privacyidea__privacyidea-2383 | 2303/user obj in auth
@laclaro, please review this pull request, since you orginally posted the issue.
I added exactly the test case of a user with now token, who gets a token enrolled by a pre-event handler when logging in against /auth.
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# 2020-08-03 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Initial writeup\n#\n# License: AGPLv3\n# contact: http://www.privacyidea.org\n#\n# This code is free software; you can redistribute it and/or\n# modify it under the terms of the GNU AFFE... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# 2020-08-03 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Initial writeup\n#\n# License: AGPLv3\n# contact: http://www.privacyidea.org\n#\n# This code is free software; you can redistribute it and/or\n# modify it under the terms of the GNU AFFE... | diff --git a/privacyidea/lib/challengeresponsedecorators.py b/privacyidea/lib/challengeresponsedecorators.py
index d0c82ad30b..267ec579ce 100644
--- a/privacyidea/lib/challengeresponsedecorators.py
+++ b/privacyidea/lib/challengeresponsedecorators.py
@@ -62,7 +62,9 @@ def _create_pin_reset_challenge(token_obj, message,... |
nf-core__tools-1755 | Use of future functionality
### Description of the bug
The `shutil.copytree` argument [`dirs_exist_ok`](https://docs.python.org/3/library/shutil.html#shutil.copytree) is only available in Python version 3.8+ but nf-core tool still support Python 3.7
https://github.com/nf-core/tools/blob/b5400d84d307343353b6ab09aa... | [
{
"content": "\"\"\"\nCheck whether the content of a module has changed compared to the original repository\n\"\"\"\nimport shutil\nimport tempfile\nfrom pathlib import Path\n\nfrom nf_core.modules.modules_differ import ModulesDiffer\n\n\ndef module_changes(module_lint_object, module):\n \"\"\"\n Checks w... | [
{
"content": "\"\"\"\nCheck whether the content of a module has changed compared to the original repository\n\"\"\"\nimport shutil\nimport tempfile\nfrom pathlib import Path\n\nfrom nf_core.modules.modules_differ import ModulesDiffer\n\n\ndef module_changes(module_lint_object, module):\n \"\"\"\n Checks w... | diff --git a/nf_core/modules/lint/module_changes.py b/nf_core/modules/lint/module_changes.py
index 04a250d752..b6e9978198 100644
--- a/nf_core/modules/lint/module_changes.py
+++ b/nf_core/modules/lint/module_changes.py
@@ -25,7 +25,7 @@ def module_changes(module_lint_object, module):
# If the module is patched... |
mne-tools__mne-python-12371 | [ENH] Speed up `read_raw_neuralynx()` when Neuralynx recording has many gaps
### Describe the new feature or enhancement
Using a larger non-public dataset (~1.7GB, cca 1 hour recording at 32Khz) with a large number of missing samples, I noticed that `read_raw_neuralynx(..., preload=False)` was talking quite long to ... | [
{
"content": "# License: BSD-3-Clause\n# Copyright the MNE-Python contributors.\nimport glob\nimport os\n\nimport numpy as np\n\nfrom ..._fiff.meas_info import create_info\nfrom ..._fiff.utils import _mult_cal_one\nfrom ...annotations import Annotations\nfrom ...utils import _check_fname, _soft_import, fill_doc... | [
{
"content": "# License: BSD-3-Clause\n# Copyright the MNE-Python contributors.\nimport glob\nimport os\n\nimport numpy as np\n\nfrom ..._fiff.meas_info import create_info\nfrom ..._fiff.utils import _mult_cal_one\nfrom ...annotations import Annotations\nfrom ...utils import _check_fname, _soft_import, fill_doc... | diff --git a/doc/changes/devel/12371.newfeature.rst b/doc/changes/devel/12371.newfeature.rst
new file mode 100644
index 00000000000..4d28ff1f5ce
--- /dev/null
+++ b/doc/changes/devel/12371.newfeature.rst
@@ -0,0 +1 @@
+Speed up :func:`mne.io.read_raw_neuralynx` on large datasets with many gaps, by `Kristijan Armeni`_.
... |
learningequality__kolibri-7269 | Update profile modal displays to super admin account created with setup wizard
### Observed behavior
_(Wouldn't even know this might be an issue if I hadn't been reviewing super admin Gherkins all past week :blush:)_
According to the [Gherkin scenario](https://github.com/learningequality/kolibri/blob/release-v0.13... | [
{
"content": "\"\"\"\nDo all imports of the device settings model inside the function scope here,\nso as to allow these functions to be easily imported without worrying about\ncircular imports.\n\"\"\"\nfrom django.db.utils import OperationalError\nfrom django.db.utils import ProgrammingError\n\nLANDING_PAGE_SI... | [
{
"content": "\"\"\"\nDo all imports of the device settings model inside the function scope here,\nso as to allow these functions to be easily imported without worrying about\ncircular imports.\n\"\"\"\nfrom django.db.utils import OperationalError\nfrom django.db.utils import ProgrammingError\n\nLANDING_PAGE_SI... | diff --git a/kolibri/core/device/utils.py b/kolibri/core/device/utils.py
index aa5ef16d335..6380f04e677 100644
--- a/kolibri/core/device/utils.py
+++ b/kolibri/core/device/utils.py
@@ -90,11 +90,15 @@ def create_superuser(user_data, facility):
).exists():
raise ValidationError("An account with that userna... |
pallets__click-993 | Can't build documentation with python 3
```
> make html
...
Exception occurred:
File "/home/user/click-6.7/docs/clickdoctools.py", line 73, in isolation
if isinstance(input, unicode):
NameError: name 'unicode' is not defined
```
| [
{
"content": "import os\nimport sys\nimport click\nimport shutil\nimport tempfile\nimport contextlib\nimport subprocess\n\ntry:\n from StringIO import StringIO\nexcept ImportError:\n from io import StringIO\n\nfrom docutils import nodes\nfrom docutils.statemachine import ViewList\n\nfrom sphinx.domains im... | [
{
"content": "import os\nimport sys\nimport click\nimport shutil\nimport tempfile\nimport contextlib\nimport subprocess\n\ntry:\n from StringIO import StringIO\nexcept ImportError:\n from io import StringIO\n\nfrom docutils import nodes\nfrom docutils.statemachine import ViewList\n\nfrom sphinx.domains im... | diff --git a/docs/clickdoctools.py b/docs/clickdoctools.py
index 36723fa22..c3db195d0 100644
--- a/docs/clickdoctools.py
+++ b/docs/clickdoctools.py
@@ -17,6 +17,13 @@
from sphinx.domains import Domain
from sphinx.util.compat import Directive
+PY2 = sys.version_info[0] == 2
+
+if PY2:
+ text_type = unicode
+else... |
lnbits__lnbits-215 | No success message and URL returned with LNURLp links
As the title says, the neither the URL, nor the message are returned to the wallet making the payment. This used to work when I was still on the [latest `raspiblitz` tag](https://github.com/lnbits/lnbits/releases/tag/raspiblitz). Now on [this commit](https://github.... | [
{
"content": "import hashlib\nimport math\nfrom http import HTTPStatus\nfrom quart import jsonify, url_for, request\nfrom lnurl import LnurlPayResponse, LnurlPayActionResponse, LnurlErrorResponse # type: ignore\n\nfrom lnbits.core.services import create_invoice\nfrom lnbits.utils.exchange_rates import get_fiat... | [
{
"content": "import hashlib\nimport math\nfrom http import HTTPStatus\nfrom quart import jsonify, url_for, request\nfrom lnurl import LnurlPayResponse, LnurlPayActionResponse, LnurlErrorResponse # type: ignore\n\nfrom lnbits.core.services import create_invoice\nfrom lnbits.utils.exchange_rates import get_fiat... | diff --git a/lnbits/extensions/lnurlp/lnurl.py b/lnbits/extensions/lnurlp/lnurl.py
index d4f36e47ba..936d51f3f7 100644
--- a/lnbits/extensions/lnurlp/lnurl.py
+++ b/lnbits/extensions/lnurlp/lnurl.py
@@ -95,13 +95,17 @@ async def api_lnurl_callback(link_id):
extra={"tag": "lnurlp", "link": link.id, "comment": c... |
quantumlib__Cirq-4816 | Substates are separated after measurements, when measurements are ignored
**Description of the issue**
Density matrix separates qubit states after measurement when split_untanged_states=True. However when ignore_measurement_results=True, this should not happen, as the this changes the measurement into a dephase and ... | [
{
"content": "# Copyright 2021 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright 2021 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/cirq-core/cirq/sim/act_on_args_container.py b/cirq-core/cirq/sim/act_on_args_container.py
index 8e3d04c952d..9af69a42830 100644
--- a/cirq-core/cirq/sim/act_on_args_container.py
+++ b/cirq-core/cirq/sim/act_on_args_container.py
@@ -118,8 +118,9 @@ def _act_on_fallback_(
protocols.act_on(action, op... |
Parsl__parsl-1531 | Simple strategy is broken since PR #1519
**Describe the bug**
As of 6d66cab31bda9f0f7a3c0d081ce8cf658c10643a (PR #1519) the following exception has started being logged from the simple strategy, and I think probably simple strategy does not function properly.
```
2020-01-09 13:51:29.561 parsl.dataflow.flow_control... | [
{
"content": "import logging\nimport time\nimport math\n\nfrom parsl.executors import IPyParallelExecutor, HighThroughputExecutor, ExtremeScaleExecutor\nfrom parsl.providers.provider_base import JobState\n\nlogger = logging.getLogger(__name__)\n\n\nclass Strategy(object):\n \"\"\"FlowControl strategy.\n\n ... | [
{
"content": "import logging\nimport time\nimport math\n\nfrom parsl.executors import IPyParallelExecutor, HighThroughputExecutor, ExtremeScaleExecutor\nfrom parsl.providers.provider_base import JobState\n\nlogger = logging.getLogger(__name__)\n\n\nclass Strategy(object):\n \"\"\"FlowControl strategy.\n\n ... | diff --git a/parsl/dataflow/strategy.py b/parsl/dataflow/strategy.py
index cf8f6d6318..9e0d87de6a 100644
--- a/parsl/dataflow/strategy.py
+++ b/parsl/dataflow/strategy.py
@@ -189,8 +189,8 @@ def _strategy_simple(self, tasks, *args, kind=None, **kwargs):
nodes_per_block = executor.provider.nodes_per_block
... |
holoviz__holoviews-3958 | 'Pre' and 'post' step interpolations loose precision
When using `.step()` with datetime, it looses precisions.
This is especially noticeable when comparing the hover information of `.hvlplot()` and `.hvplot.step()`:
```python
import pandas as pd
import hvplot.pandas
index = pd.to_datetime([
... | [
{
"content": "\"\"\"\nCollection of either extremely generic or simple Operation\nexamples.\n\"\"\"\nfrom __future__ import division\n\nimport numpy as np\n\nimport param\nfrom param import _is_number\n\nfrom ..core import (Operation, NdOverlay, Overlay, GridMatrix,\n HoloMap, Dataset, Elemen... | [
{
"content": "\"\"\"\nCollection of either extremely generic or simple Operation\nexamples.\n\"\"\"\nfrom __future__ import division\n\nimport numpy as np\n\nimport param\nfrom param import _is_number\n\nfrom ..core import (Operation, NdOverlay, Overlay, GridMatrix,\n HoloMap, Dataset, Elemen... | diff --git a/holoviews/operation/element.py b/holoviews/operation/element.py
index 60ecca13b6..c785b23684 100644
--- a/holoviews/operation/element.py
+++ b/holoviews/operation/element.py
@@ -797,9 +797,9 @@ def _process_layer(self, element, key=None):
is_datetime = isdatetime(x)
if is_datetime:
... |
buildbot__buildbot-704 | cfg-www.rst: Fix some indentation.
| [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | diff --git a/master/buildbot/steps/shell.py b/master/buildbot/steps/shell.py
index b54c19b624d3..0423d8c2a205 100644
--- a/master/buildbot/steps/shell.py
+++ b/master/buildbot/steps/shell.py
@@ -68,7 +68,8 @@ class ShellCommand(buildstep.LoggingBuildStep):
name = "shell"
renderables = buildstep.LoggingBuildSt... |
codespell-project__codespell-76 | Any change of adding this to PyPi?
Our project installs tools via pip to keep things nice and clean and virtualenv friendly--It would be great if codespell was added to Pypi.
| [
{
"content": "#! /usr/bin/env python\n\n# adapted from mne-python\n\nimport os\nfrom os import path as op\n\ntry:\n import setuptools # noqa to allow --develop\nexcept Exception:\n pass\nfrom distutils.core import setup\n\nfrom codespell_lib import __version__\n\nDISTNAME = 'codespell'\nDESCRIPTION = \"\... | [
{
"content": "#! /usr/bin/env python\n\n# adapted from mne-python\n\nimport os\nfrom os import path as op\n\ntry:\n import setuptools # noqa to allow --develop\nexcept Exception:\n pass\nfrom distutils.core import setup\n\nfrom codespell_lib import __version__\n\nDISTNAME = 'codespell'\nDESCRIPTION = \"\... | diff --git a/Makefile b/Makefile
index 32505ae4f0..b541dc91ec 100644
--- a/Makefile
+++ b/Makefile
@@ -60,6 +60,9 @@ tar-sync: codespell-$(VERSION).tar.xz codespell-$(VERSION).tar.xz.asc
--name codespell-$(VERSION).tar.xz.asc \
--file codespell-$(VERSION).tar.xz.asc
+pypi:
+ python setup.py sdist register uploa... |
biolab__orange3-5962 | Silhouette plot should show statistics for groups
**What's your use case?**
A student who analyzed some data about habits and preferences of students wrote something to the effect of "all men are alike, while women differ from each other". This could be verified by Silhouette if it showed silhouette scores for each ... | [
{
"content": "import itertools\nimport enum\nfrom xml.sax.saxutils import escape\nfrom types import SimpleNamespace as namespace\n\nfrom typing import Optional, Union, Tuple, cast\n\nimport numpy as np\nimport sklearn.metrics\n\nfrom AnyQt.QtWidgets import (\n QGraphicsWidget, QGraphicsGridLayout,\n QGrap... | [
{
"content": "import itertools\nimport enum\nfrom xml.sax.saxutils import escape\nfrom types import SimpleNamespace as namespace\n\nfrom typing import Optional, Union, Tuple, cast\n\nimport numpy as np\nimport sklearn.metrics\n\nfrom AnyQt.QtWidgets import (\n QGraphicsWidget, QGraphicsGridLayout,\n QGrap... | diff --git a/Orange/widgets/visualize/owsilhouetteplot.py b/Orange/widgets/visualize/owsilhouetteplot.py
index 19513e44e4f..061df224dbc 100644
--- a/Orange/widgets/visualize/owsilhouetteplot.py
+++ b/Orange/widgets/visualize/owsilhouetteplot.py
@@ -762,9 +762,10 @@ def __setup(self):
if group.label:
... |
ivy-llc__ivy-21310 | adaptive_avg_pool2d
Close #20804
| [
{
"content": "\"\"\"Includes Mindspore Frontend functions listed in the TODO list\nhttps://github.com/unifyai/ivy/issues/14951.\"\"\"\n\n# local\nimport ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_supported_d... | [
{
"content": "\"\"\"Includes Mindspore Frontend functions listed in the TODO list\nhttps://github.com/unifyai/ivy/issues/14951.\"\"\"\n\n# local\nimport ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_supported_d... | diff --git a/ivy/functional/frontends/mindspore/ops/function/nn_func.py b/ivy/functional/frontends/mindspore/ops/function/nn_func.py
index 13795ddc3cccb..77f43411bec2a 100644
--- a/ivy/functional/frontends/mindspore/ops/function/nn_func.py
+++ b/ivy/functional/frontends/mindspore/ops/function/nn_func.py
@@ -40,4 +40,10... |
ansible__ansible-modules-extras-3033 | Ansible Reports Twilio Failure Yet SMS Sent Successfullly
<!--- Verify first that your issue/request is not already reported in GitHub -->
##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
- Bug Report
##### COMPONENT NAME
<!--- Name of the plugin/module/task -->
Twilio
##### ANSIBLE VERSION
<!--- Past... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2015, Matt Makai <matthew.makai@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Found... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2015, Matt Makai <matthew.makai@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Found... | diff --git a/notification/twilio.py b/notification/twilio.py
index 216520620f9..2c7275a3e9f 100644
--- a/notification/twilio.py
+++ b/notification/twilio.py
@@ -161,8 +161,12 @@ def main():
for number in to_number:
r, info = post_twilio_api(module, account_sid, auth_token, msg,
from_numbe... |
GoogleCloudPlatform__PerfKitBenchmarker-719 | cluster_boot seems to over-report boot time
The [code docs say that cluster_boot reports how long it takes for a VM to become responsive to SSH](https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/c1e4945ad34bd47c409ebb55d538d22f5463a643/perfkitbenchmarker/benchmarks/cluster_boot_benchmark.py#L48), but I exp... | [
{
"content": "# Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.... | [
{
"content": "# Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.... | diff --git a/perfkitbenchmarker/benchmark_spec.py b/perfkitbenchmarker/benchmark_spec.py
index 7c2b204b57..4f86daa340 100644
--- a/perfkitbenchmarker/benchmark_spec.py
+++ b/perfkitbenchmarker/benchmark_spec.py
@@ -325,11 +325,11 @@ def PrepareVm(self, vm):
Args:
vm: The BaseVirtualMachine object represen... |
spyder-ide__spyder-3619 | Error when connecting to external kernels
qt 4.8.7 does not have this bug, but qt5.6 with mac will have
```
Spyder Internal Console
This console is used to report application
internal errors and to inspect Spyder
internals with the following commands:
spy.app, spy.window, dir(spy)
Please don't use it to run your c... | [
{
"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\"\"\"\nWidget that handle communications between the IPython Console and\nthe Variable Explorer\n\"\"\"\n\nfrom qtpy.QtCore import QEvent... | [
{
"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\"\"\"\nWidget that handle communications between the IPython Console and\nthe Variable Explorer\n\"\"\"\n\nfrom qtpy.QtCore import QEvent... | diff --git a/spyder/widgets/ipythonconsole/namespacebrowser.py b/spyder/widgets/ipythonconsole/namespacebrowser.py
index b155585607c..a4a6b613c8b 100644
--- a/spyder/widgets/ipythonconsole/namespacebrowser.py
+++ b/spyder/widgets/ipythonconsole/namespacebrowser.py
@@ -179,8 +179,9 @@ def _handle_execute_reply(self, msg... |
huggingface__text-generation-inference-1081 | EETQ dependency not compiled for GQA/70b
### System Info
TGI 1.1.0, 70b model sharded across 2 - some system dependency didn't get added properly.
### Information
- [X] Docker
- [ ] The CLI directly
### Tasks
- [X] An officially supported command
- [ ] My own modifications
### Reproduction
Trying... | [
{
"content": "import os\nimport torch\n\nfrom loguru import logger\nfrom transformers.configuration_utils import PretrainedConfig\nfrom transformers.models.auto import modeling_auto\nfrom typing import Optional\n\nfrom text_generation_server.models.model import Model\nfrom text_generation_server.models.causal_l... | [
{
"content": "import os\nimport torch\n\nfrom loguru import logger\nfrom transformers.configuration_utils import PretrainedConfig\nfrom transformers.models.auto import modeling_auto\nfrom typing import Optional\n\nfrom text_generation_server.models.model import Model\nfrom text_generation_server.models.causal_l... | diff --git a/Dockerfile b/Dockerfile
index 56f4775b9f8..9c15f023e3d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -123,6 +123,13 @@ COPY server/Makefile-awq Makefile
# Build specific version of transformers
RUN TORCH_CUDA_ARCH_LIST="8.0;8.6+PTX" make build-awq
+# Build eetq kernels
+FROM kernel-builder as eetq-kernel... |
tinygrad__tinygrad-65 | EOFError: Ran out of input
When running example and solving "Can't import fetch from utils" issue, this one comes up:

| [
{
"content": "import numpy as np\n\ndef mask_like(like, mask_inx, mask_value = 1.0):\n mask = np.zeros_like(like).reshape(-1)\n mask[mask_inx] = mask_value\n return mask.reshape(like.shape)\n\ndef layer_init_uniform(*x):\n ret = np.random.uniform(-1., 1., size=x)/np.sqrt(np.prod(x))\n return ret.astype(np.... | [
{
"content": "import numpy as np\nimport os\n\ndef mask_like(like, mask_inx, mask_value = 1.0):\n mask = np.zeros_like(like).reshape(-1)\n mask[mask_inx] = mask_value\n return mask.reshape(like.shape)\n\ndef layer_init_uniform(*x):\n ret = np.random.uniform(-1., 1., size=x)/np.sqrt(np.prod(x))\n return ret... | diff --git a/tinygrad/utils.py b/tinygrad/utils.py
index e59f559a74be9..648a285b6917f 100644
--- a/tinygrad/utils.py
+++ b/tinygrad/utils.py
@@ -1,4 +1,5 @@
import numpy as np
+import os
def mask_like(like, mask_inx, mask_value = 1.0):
mask = np.zeros_like(like).reshape(-1)
@@ -12,7 +13,7 @@ def layer_init_unifo... |
getredash__redash-2071 | AttributeError: 'ApiUser' object has no attribute 'email'
### Issue Summary
API POST calls to /api/queries/###/refresh throw this error on 1.0.3+b2850
### Steps to Reproduce
1. Make a POST call to /api/queries/###/refresh
2. See error in api_error.log and 500 result
Full error with trace:
```
Exception... | [
{
"content": "from itertools import chain\n\nimport sqlparse\nfrom flask import jsonify, request\nfrom flask_login import login_required\nfrom flask_restful import abort\nfrom funcy import distinct, take\nfrom sqlalchemy.orm.exc import StaleDataError\n\nfrom redash import models, settings\nfrom redash.handlers.... | [
{
"content": "from itertools import chain\n\nimport sqlparse\nfrom flask import jsonify, request\nfrom flask_login import login_required\nfrom flask_restful import abort\nfrom funcy import distinct, take\nfrom sqlalchemy.orm.exc import StaleDataError\n\nfrom redash import models, settings\nfrom redash.handlers.... | diff --git a/redash/handlers/queries.py b/redash/handlers/queries.py
index 44d20a5ff3..8aff0beabb 100644
--- a/redash/handlers/queries.py
+++ b/redash/handlers/queries.py
@@ -266,6 +266,12 @@ def post(self, query_id):
Responds with query task details.
"""
+ # TODO: this should actually check ... |
flask-admin__flask-admin-1013 | Issue with Not-Nullable text fields: forms don't let you leave them empty
This will sound similar to [#1003](https://github.com/flask-admin/flask-admin/issues/1003), but the latter had to do with nullable fields, while this issue has to do with not-nullable fields.
For databases, `NULL` is not the same as an empty str... | [
{
"content": "import warnings\n\nfrom wtforms import fields, validators\nfrom sqlalchemy import Boolean, Column\n\nfrom flask_admin import form\nfrom flask_admin.model.form import (converts, ModelConverterBase,\n InlineModelConverterBase, FieldPlaceholder)\nfrom flask_admi... | [
{
"content": "import warnings\n\nfrom wtforms import fields, validators\nfrom sqlalchemy import Boolean, Column\n\nfrom flask_admin import form\nfrom flask_admin.model.form import (converts, ModelConverterBase,\n InlineModelConverterBase, FieldPlaceholder)\nfrom flask_admi... | diff --git a/flask_admin/contrib/sqla/form.py b/flask_admin/contrib/sqla/form.py
index 84649299d..f47af3547 100644
--- a/flask_admin/contrib/sqla/form.py
+++ b/flask_admin/contrib/sqla/form.py
@@ -205,7 +205,12 @@ def convert(self, model, mapper, prop, field_args, hidden_pk):
optional_types = getattr... |
flask-admin__flask-admin-1080 | Broken compatibility with flask-admin 1.1.0
Hi,
I had to make this change in my source code :
-from flask.ext.admin.form import rules
+from flask_admin.form import rules
Because in module flask_admin.form.rules line 403, we have this test :
if isinstance(r, BaseRule):
And it returns false if rule object was creat... | [
{
"content": "from jinja2 import Markup\n\nfrom flask_admin._compat import string_types\nfrom flask_admin import helpers\n\n\nclass BaseRule(object):\n \"\"\"\n Base form rule. All form formatting rules should derive from `BaseRule`.\n \"\"\"\n def __init__(self):\n self.parent = None\n ... | [
{
"content": "from jinja2 import Markup\n\nfrom flask_admin._compat import string_types\nfrom flask_admin import helpers\n\n\nclass BaseRule(object):\n \"\"\"\n Base form rule. All form formatting rules should derive from `BaseRule`.\n \"\"\"\n def __init__(self):\n self.parent = None\n ... | diff --git a/flask_admin/form/rules.py b/flask_admin/form/rules.py
index 10bfbf9a1..30a9bc3c8 100644
--- a/flask_admin/form/rules.py
+++ b/flask_admin/form/rules.py
@@ -400,12 +400,13 @@ def configure_rules(self, rules, parent=None):
result = []
for r in rules:
- if isinstance(r, BaseRule... |
sktime__sktime-1453 | [BUG] sktime.datatypes._panel._examples raises pandas.core.common.SettingWithCopyError
**Describe the bug**
Attempting to install [tsai](https://pypi.org/project/tsai/) as an upstream package also installs this package, but the install raises an error that traces to line 67 in "/opt/conda/lib/python3.8/site-packages/s... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Example generation for testing.\n\nExports dict of examples, useful for testing as fixtures.\n\nexample_dict: dict indexed by triple\n 1st element = mtype - str\n 2nd element = considered as this scitype - str\n 3rd element = int - index of example\nelements are d... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Example generation for testing.\n\nExports dict of examples, useful for testing as fixtures.\n\nexample_dict: dict indexed by triple\n 1st element = mtype - str\n 2nd element = considered as this scitype - str\n 3rd element = int - index of example\nelements are d... | diff --git a/.all-contributorsrc b/.all-contributorsrc
index 92b2860d594..708459bdb83 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -1243,8 +1243,16 @@
"contributions": [
"doc"
]
+ },
+ {
+ "login": "bobbys-dev",
+ "name": "bobbys",
+ "avatar_url": "https://avatars.g... |
rasterio__rasterio-1274 | rasterize produces holes for lists of GeometryCollection
<!--
WELCOME ABOARD!
Hi and welcome to the Rasterio project. We appreciate bug reports, questions
about documentation, and suggestions for new features. This issue template
isn't intended to ward you off; only to intercept and redirect one particular
cat... | [
{
"content": "\"\"\"Functions for working with features in a raster dataset.\"\"\"\n\n\nimport logging\nimport warnings\nimport numpy as np\n\nfrom rasterio._features import _shapes, _sieve, _rasterize, _bounds\nfrom rasterio.dtypes import validate_dtype, can_cast_dtype, get_minimum_dtype\nfrom rasterio.enums i... | [
{
"content": "\"\"\"Functions for working with features in a raster dataset.\"\"\"\n\n\nimport logging\nimport warnings\nimport numpy as np\n\nfrom rasterio._features import _shapes, _sieve, _rasterize, _bounds\nfrom rasterio.dtypes import validate_dtype, can_cast_dtype, get_minimum_dtype\nfrom rasterio.enums i... | diff --git a/rasterio/features.py b/rasterio/features.py
index b0513f219..031bba95a 100644
--- a/rasterio/features.py
+++ b/rasterio/features.py
@@ -259,7 +259,18 @@ def format_cast_error(param, dtype):
'Invalid geometry object at index {0}'.format(index)
)
- valid_shapes.append((... |
pypa__pipenv-5512 | Pipenv does not sync indexes to lockfile
### Issue description
When specifying an addtitional index as described [here](https://github.com/pypa/pipenv/blob/main/docs/advanced.rst), `pipenv install` does not synchronize the additional index to the lockfile, resulting in the following error:
```
...
Installing depe... | [
{
"content": "from __future__ import annotations\n\nimport base64\nimport fnmatch\nimport hashlib\nimport io\nimport json\nimport operator\nimport os\nimport re\nimport sys\nimport urllib.parse\nfrom json.decoder import JSONDecodeError\nfrom pathlib import Path\n\nimport click\n\nfrom pipenv.cmdparse import Scr... | [
{
"content": "from __future__ import annotations\n\nimport base64\nimport fnmatch\nimport hashlib\nimport io\nimport json\nimport operator\nimport os\nimport re\nimport sys\nimport urllib.parse\nfrom json.decoder import JSONDecodeError\nfrom pathlib import Path\n\nimport click\n\nfrom pipenv.cmdparse import Scr... | diff --git a/news/5508.bugfix.rst b/news/5508.bugfix.rst
new file mode 100644
index 0000000000..4599e6882c
--- /dev/null
+++ b/news/5508.bugfix.rst
@@ -0,0 +1 @@
+Fix regression: pipenv does not sync indexes to lockfile.
diff --git a/pipenv/project.py b/pipenv/project.py
index 6b28ccec1a..34f2ad3a3f 100644
--- a/pipenv... |
Kinto__kinto-2011 | DELETE /v1/accounts raises a 500
```
$ http DELETE https://natim.alwaysdata.net/v1/accounts --auth admin:admin
HTTP/1.1 500 Internal Server Error
Access-Control-Expose-Headers: Retry-After, Alert, Backoff, Content-Length
Content-Length: 177
Content-Type: application/json
Date: Mon, 28 Jan 2019 20:45:56 GMT
Via: ... | [
{
"content": "import colander\nfrom pyramid import httpexceptions\nfrom pyramid.decorator import reify\nfrom pyramid.security import Authenticated, Everyone\nfrom pyramid.settings import aslist\nfrom pyramid.events import subscriber\n\nfrom kinto.views import NameGenerator\nfrom kinto.core import resource, util... | [
{
"content": "import colander\nfrom pyramid import httpexceptions\nfrom pyramid.decorator import reify\nfrom pyramid.security import Authenticated, Everyone\nfrom pyramid.settings import aslist\nfrom pyramid.events import subscriber\n\nfrom kinto.views import NameGenerator\nfrom kinto.core import resource, util... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 2e22c4606..46eb22e7b 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -9,6 +9,8 @@ This document describes changes between each past release.
**Bug fixes**
- Fixed two potential bugs relating to mutable default values.
+- Fix crash on deleting multiple accounts (#20... |
getnikola__nikola-2287 | import_wordpress problem with php code in blogpost
```
$ nikola import_wordpress /Users/davidak/Downloads/davidakweblog.wordpress.2016-02-23.xml
[2016-02-23T17:06:37Z] NOTICE: Nikola: The folder new_site already exists - assuming that this is a already existing Nikola site.
Traceback (most recent call last):
File "/u... | [
{
"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/CHANGES.txt b/CHANGES.txt
index 8fe8cb1e7a..4a141ca6ec 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -16,6 +16,7 @@ Bugfixes
* Don’t display “Good link” messages in ``nikola check -l`` by default,
can be re-enabled with ``-v`` option (Issue #2268)
* Fix a format string in ``nikola check`` (Issue #2267... |
ros__ros_comm-333 | roslaunch dependency check test looks in manifest.xml for dependency
The `roslaunch_add_file_check` macro complains about missing dependency in manifest.xml file. It's not clear if the script is looking for the manifest.xml file (in which case it would fail under catkin) or if the dependency is truly missing (which I ... | [
{
"content": "# Software License Agreement (BSD License)\n#\n# Copyright (c) 2008, Willow Garage, Inc.\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\n# are met:\n#\n# * Redistributions of so... | [
{
"content": "# Software License Agreement (BSD License)\n#\n# Copyright (c) 2008, Willow Garage, Inc.\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\n# are met:\n#\n# * Redistributions of so... | diff --git a/tools/roslaunch/src/roslaunch/depends.py b/tools/roslaunch/src/roslaunch/depends.py
index f7bdc50555..a4dd880ac2 100644
--- a/tools/roslaunch/src/roslaunch/depends.py
+++ b/tools/roslaunch/src/roslaunch/depends.py
@@ -263,6 +263,13 @@ def calculate_missing(base_pkg, missing, file_deps):
contin... |
mkdocs__mkdocs-2073 | Absolute paths with backward slashes
@waylan Sorry you to bother you again on this, but I have one more small question.
On one of your postings you mentioned a difference between a path (all with "\\") and a link (all with "/").
In mkdocs I see now I've mixed them up completely for linking to -for example- local im... | [
{
"content": "import os\nimport datetime\nimport logging\nfrom urllib.parse import urlparse, urlunparse, urljoin\nfrom urllib.parse import unquote as urlunquote\n\nimport markdown\nfrom markdown.extensions import Extension\nfrom markdown.treeprocessors import Treeprocessor\nfrom markdown.util import AMP_SUBSTIT... | [
{
"content": "import os\nimport datetime\nimport logging\nfrom urllib.parse import urlparse, urlunparse, urljoin\nfrom urllib.parse import unquote as urlunquote\n\nimport markdown\nfrom markdown.extensions import Extension\nfrom markdown.treeprocessors import Treeprocessor\nfrom markdown.util import AMP_SUBSTIT... | diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md
index 392f533942..c9ab8bff3d 100644
--- a/docs/about/release-notes.md
+++ b/docs/about/release-notes.md
@@ -23,6 +23,7 @@ The current and past members of the MkDocs team.
## Version 1.1.1 (in development)
+* Bugfix: Ignore links which start wit... |
quantumlib__Cirq-1946 | pytest fails but travis says green
https://travis-ci.com/quantumlib/Cirq/jobs/225040090
```
4 failed, 7087 passed, 26 skipped, 3 warnings in 96.07 seconds
The command "check/pytest --ignore=cirq/contrib --benchmark-skip --actually-quiet" exited with 0.
```
| [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/check/pytest b/check/pytest
index ea2eeb123f9..5e1af16a53a 100755
--- a/check/pytest
+++ b/check/pytest
@@ -33,4 +33,5 @@ else
# Filter out lines like "...F....x... [ 42%]", with coloring.
pytest -q --color=yes "${PYTEST_ARGS[@]}" |
grep -Pv '^(.\[0m)?[\.FEsx]+(.\[36m)?\s+\[\s*\d+%\... |
urllib3__urllib3-3333 | Emscripten support emits an InsecureRequestWarning even when using HTTPS
This is a side-effect of us using JavaScript APIs instead of Python TLS and setting `is_verified` on the `EmscriptenHTTPConnection` so urllib3 is emitting an `InsecureRequestWarning` for every request, even ones that are using HTTPS.
* Set the ... | [
{
"content": "from __future__ import annotations\n\nimport os\nimport typing\n\n# use http.client.HTTPException for consistency with non-emscripten\nfrom http.client import HTTPException as HTTPException # noqa: F401\nfrom http.client import ResponseNotReady\n\nfrom ..._base_connection import _TYPE_BODY\nfrom ... | [
{
"content": "from __future__ import annotations\n\nimport os\nimport typing\n\n# use http.client.HTTPException for consistency with non-emscripten\nfrom http.client import HTTPException as HTTPException # noqa: F401\nfrom http.client import ResponseNotReady\n\nfrom ..._base_connection import _TYPE_BODY\nfrom ... | diff --git a/changelog/3331.bugfix.rst b/changelog/3331.bugfix.rst
new file mode 100644
index 0000000000..d309ee7b48
--- /dev/null
+++ b/changelog/3331.bugfix.rst
@@ -0,0 +1 @@
+Fixed issue where ``InsecureRequestWarning`` was emitted for HTTPS connections when using Emscripten.
diff --git a/src/urllib3/contrib/emscrip... |
pyro-ppl__pyro-1701 | Silent error when pyro.markov history is too small
## Problem
Higher-order markov processes require setting `pyro.markov(..., history=t)` for some `t>1`. However when setting `t=1`, Pyro does not notice the enumeration dim conflict.
## Proposed solution
During enumeration, if the newly allocated enum dimension... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport functools\nimport numbers\nimport random\nimport warnings\nfrom collections import defaultdict\nfrom contextlib2 import contextmanager\n\nimport graphviz\nimport torch\nfrom six.moves import zip_longest\n\nfrom pyro.poutine... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport functools\nimport numbers\nimport random\nimport warnings\nfrom collections import defaultdict\nfrom contextlib2 import contextmanager\n\nimport graphviz\nimport torch\nfrom six.moves import zip_longest\n\nfrom pyro.poutine... | diff --git a/pyro/util.py b/pyro/util.py
index 526ea950a6..1fdccbc880 100644
--- a/pyro/util.py
+++ b/pyro/util.py
@@ -261,7 +261,13 @@ def check_site_shape(site, max_plate_nesting):
'- .to_event(...) the distribution being sampled',
'- .permute() data dimensions']))
- # TODO Chec... |
dask__dask-1715 | Dataframe: to_csv doesn't allow "get"-keyword to set the scheduler, but respects global settings
What scheduler is used by to_csv cannot be infulenced with the get-keyword. Accordingly, the API does not mention the get keyword either. However, to_csv seems to respect the global scheduler settings, which can become conf... | [
{
"content": "from __future__ import print_function, division, absolute_import\n\nfrom io import BytesIO\nfrom warnings import warn, catch_warnings, simplefilter\nimport sys\n\ntry:\n import psutil\nexcept ImportError:\n psutil = None\n\nimport numpy as np\nimport pandas as pd\n\nfrom ...compatibility imp... | [
{
"content": "from __future__ import print_function, division, absolute_import\n\nfrom io import BytesIO\nfrom warnings import warn, catch_warnings, simplefilter\nimport sys\n\ntry:\n import psutil\nexcept ImportError:\n psutil = None\n\nimport numpy as np\nimport pandas as pd\n\nfrom ...compatibility imp... | diff --git a/dask/dataframe/io/csv.py b/dask/dataframe/io/csv.py
index 80ad3089103..e45b4e7df09 100644
--- a/dask/dataframe/io/csv.py
+++ b/dask/dataframe/io/csv.py
@@ -293,13 +293,13 @@ def _to_csv_chunk(df, **kwargs):
def to_csv(df, filename, name_function=None, compression=None, compute=True,
- **kwar... |
DistrictDataLabs__yellowbrick-1247 | Issue with classification_report function when there are missing labels during scoring
**Describe the bug**
Yellowbrick's classification_report function crashes when there are missing labels during scoring.
**To Reproduce**
```python
import numpy as np
from sklearn.linear_model import LogisticRegression
from ... | [
{
"content": "# yellowbrick.classifier.classification_report\n# Visual classification report for classifier scoring.\n#\n# Author: Rebecca Bilbro\n# Author: Benjamin Bengfort\n# Author: Neal Humphrey\n# Author: Allyssa Riley\n# Author: Larry Gray\n# Created: Wed May 3 18:15:42 2017 -0400\n#\n# Copyri... | [
{
"content": "# yellowbrick.classifier.classification_report\n# Visual classification report for classifier scoring.\n#\n# Author: Rebecca Bilbro\n# Author: Benjamin Bengfort\n# Author: Neal Humphrey\n# Author: Allyssa Riley\n# Author: Larry Gray\n# Created: Wed May 3 18:15:42 2017 -0400\n#\n# Copyri... | diff --git a/tests/test_classifier/test_classification_report.py b/tests/test_classifier/test_classification_report.py
index b126a85d3..956ccb1cd 100644
--- a/tests/test_classifier/test_classification_report.py
+++ b/tests/test_classifier/test_classification_report.py
@@ -327,6 +327,28 @@ def test_remove_color_bar(self... |
pretalx__pretalx-185 | Restructure CSS
- [x] Use `$brand_color`
- [ ] Break SCSS up into more files
| [
{
"content": "import hashlib\nimport os\n\nimport django_libsass\nimport sass\nfrom django.conf import settings\nfrom django.core.files.base import ContentFile\nfrom django.core.files.storage import default_storage\nfrom django.templatetags.static import static\n\nfrom pretalx.celery_app import app\nfrom pretal... | [
{
"content": "import hashlib\nimport os\n\nimport django_libsass\nimport sass\nfrom django.conf import settings\nfrom django.core.files.base import ContentFile\nfrom django.core.files.storage import default_storage\nfrom django.templatetags.static import static\n\nfrom pretalx.celery_app import app\nfrom pretal... | diff --git a/src/pretalx/agenda/templates/agenda/base.html b/src/pretalx/agenda/templates/agenda/base.html
index f9971245c2..feb2b139b0 100644
--- a/src/pretalx/agenda/templates/agenda/base.html
+++ b/src/pretalx/agenda/templates/agenda/base.html
@@ -4,20 +4,8 @@
{% load i18n %}
{% block custom_header %}
<link r... |
ioos__compliance-checker-458 | accessing OpenDAP on ESGF data archives
ESGF data archives provide OpenDAP to access climate data. But to access the data you need a certificate and an appropriate `.dodsrc` file. The python netcdf4 library is already able to handle this without modifications. See my notebook example:
https://github.com/cehbrecht/de... | [
{
"content": "\"\"\"\nCompliance Checker suite runner\n\"\"\"\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport sys\nimport os\nimport subprocess\nimport inspect\nimport itertools\nfrom operator import itemgetter\nimport json\nfrom netCDF4 import Dataset\nfrom lxml import... | [
{
"content": "\"\"\"\nCompliance Checker suite runner\n\"\"\"\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport sys\nimport os\nimport subprocess\nimport inspect\nimport itertools\nfrom operator import itemgetter\nimport json\nfrom netCDF4 import Dataset\nfrom lxml import... | diff --git a/compliance_checker/suite.py b/compliance_checker/suite.py
index 4b9967aa..c2251a2b 100644
--- a/compliance_checker/suite.py
+++ b/compliance_checker/suite.py
@@ -520,7 +520,7 @@ def load_dataset(self, ds_str):
if pr.netloc: # looks like a remote url
rhead = requests.head(ds_str,... |
sbi-dev__sbi-732 | Does multi-round SNPE work with RejectionPosterior as proposal?
Need to double check, have some worrying results that there might be a bug
| [
{
"content": "# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed\n# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.\n\n\nfrom typing import Callable, Dict, Optional, Union\n\nimport torch\nfrom pyknos.mdn.mdn import MultivariateGaussianMDN as m... | [
{
"content": "# This file is part of sbi, a toolkit for simulation-based inference. sbi is licensed\n# under the Affero General Public License v3, see <https://www.gnu.org/licenses/>.\n\n\nfrom typing import Callable, Dict, Optional, Union\n\nimport torch\nfrom pyknos.mdn.mdn import MultivariateGaussianMDN as m... | diff --git a/sbi/inference/snpe/snpe_c.py b/sbi/inference/snpe/snpe_c.py
index 34c53ab4b..65d3ac04f 100644
--- a/sbi/inference/snpe/snpe_c.py
+++ b/sbi/inference/snpe/snpe_c.py
@@ -161,7 +161,8 @@ def train(
# last proposal.
proposal = self._proposal_roundwise[-1]
self.use_non_ato... |
cisagov__manage.get.gov-1687 | Django Admin: Protect the link between Domain and Domain Application from being changed
### Issue description
1) Currently, on the “Change **domain information**” page, there's a dropdown to change the linked “domain application.” This should—in theory—never need to be changed and could have serious implications if ... | [
{
"content": "import logging\nfrom django import forms\nfrom django.db.models.functions import Concat\nfrom django.http import HttpResponse\nfrom django.shortcuts import redirect\nfrom django_fsm import get_available_FIELD_transitions\nfrom django.contrib import admin, messages\nfrom django.contrib.auth.admin i... | [
{
"content": "import logging\nfrom django import forms\nfrom django.db.models.functions import Concat\nfrom django.http import HttpResponse\nfrom django.shortcuts import redirect\nfrom django_fsm import get_available_FIELD_transitions\nfrom django.contrib import admin, messages\nfrom django.contrib.auth.admin i... | diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index 77d827d05..1bfda0b84 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -677,6 +677,7 @@ class DomainInformationAdmin(ListHeaderAdmin):
"type_of_work",
"more_organization_information",
"domain",
+ "doma... |
huggingface__text-generation-inference-609 | Can't load local flan-small models due to weight conversion failure
### System Info
OS Version:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
8 A-100 GPUS
Using latest text-generation-inference docker version.
I've run fine-tuning on a [Flan-T5-Sm... | [
{
"content": "import datetime\nimport torch\nimport os\n\nfrom loguru import logger\nfrom pathlib import Path\nfrom safetensors.torch import save_file, load_file, _find_shared_tensors, _is_complete\nfrom typing import List, Dict\nfrom collections import defaultdict\n\n\ndef _remove_duplicate_names(\n state_d... | [
{
"content": "import datetime\nimport torch\nimport os\n\nfrom loguru import logger\nfrom pathlib import Path\nfrom safetensors.torch import save_file, load_file, _find_shared_tensors, _is_complete\nfrom typing import List, Dict\nfrom collections import defaultdict\n\n\ndef _remove_duplicate_names(\n state_d... | diff --git a/server/text_generation_server/utils/convert.py b/server/text_generation_server/utils/convert.py
index 305263ba779..8d414ecac91 100644
--- a/server/text_generation_server/utils/convert.py
+++ b/server/text_generation_server/utils/convert.py
@@ -94,6 +94,14 @@ def convert_files(pt_files: List[Path], sf_files... |
kubeflow__pipelines-6035 | Kubeflow / AI Platform Pipelines runtime context missing when output is taken from cache
### What steps did you take:
1. deploy pipeline with one component
2. run pipeline with one component (👍 works)
3. add another component
4. run the pipeline (this time the output is taken from cache) (👎 fails)
### What h... | [
{
"content": "# Copyright 2019 The Kubeflow 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 b... | [
{
"content": "# Copyright 2019 The Kubeflow 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 b... | diff --git a/backend/metadata_writer/src/metadata_writer.py b/backend/metadata_writer/src/metadata_writer.py
index 62a7a502f99..4f31bc9dad8 100644
--- a/backend/metadata_writer/src/metadata_writer.py
+++ b/backend/metadata_writer/src/metadata_writer.py
@@ -114,8 +114,10 @@ def argo_artifact_to_uri(artifact: dict) -> st... |
kivy__python-for-android-2127 | Crashing on phone. SDL Error Could not load any libpythonXXX.so
**Versions**
- Python: 3.7
- OS: Android 9
- Kivy: 1.11.11
- Cython: 0.29.14
**Desription:**
So, my app builded, after that i installed app on my phone and when i run application it is crashing. I dont know why
Phone: Redmi note 7
OS: Android ... | [
{
"content": "from os.path import (\n abspath, join, realpath, dirname, expanduser, exists,\n split, isdir\n)\nfrom os import environ\nimport copy\nimport os\nimport glob\nimport sys\nimport re\nimport sh\nimport shutil\nimport subprocess\n\nfrom pythonforandroid.util import (\n current_directory, ensu... | [
{
"content": "from os.path import (\n abspath, join, realpath, dirname, expanduser, exists,\n split, isdir\n)\nfrom os import environ\nimport copy\nimport os\nimport glob\nimport sys\nimport re\nimport sh\nimport shutil\nimport subprocess\n\nfrom pythonforandroid.util import (\n current_directory, ensu... | diff --git a/pythonforandroid/build.py b/pythonforandroid/build.py
index e5c1f280b6..3d4428573a 100644
--- a/pythonforandroid/build.py
+++ b/pythonforandroid/build.py
@@ -576,10 +576,10 @@ def build_recipes(build_order, python_modules, ctx, project_dir,
info_main('Building {} for {}'.format(recipe.name, ar... |
dbt-labs__dbt-core-1515 | ref uses most recently referenced project rather than current
## Issue
The expected behavior for a reference with no specified project like `{{ref('model_one')}}` is that it will refer to the model "model_one" in the current project. However this is not the case when a ref earlier in the model specifies a project of i... | [
{
"content": "\nimport dbt.exceptions\nimport dbt.utils\nfrom dbt.node_types import NodeType\n\n\ndef docs(node, manifest, config, column_name=None):\n \"\"\"Return a function that will process `doc()` references in jinja, look\n them up in the manifest, and return the appropriate block contents.\n \"\... | [
{
"content": "\nimport dbt.exceptions\nimport dbt.utils\nfrom dbt.node_types import NodeType\n\n\ndef docs(node, manifest, config, column_name=None):\n \"\"\"Return a function that will process `doc()` references in jinja, look\n them up in the manifest, and return the appropriate block contents.\n \"\... | diff --git a/core/dbt/parser/util.py b/core/dbt/parser/util.py
index e05c13f3f7d..a17a7f87bd9 100644
--- a/core/dbt/parser/util.py
+++ b/core/dbt/parser/util.py
@@ -173,11 +173,11 @@ def process_docs(cls, manifest, current_project):
@classmethod
def process_refs_for_node(cls, manifest, current_project, node):... |
django__channels-1532 | v3 Consumers need as_view() equivalent.
From https://github.com/django/channels/pull/1528/commits/8b605e530bbef5bba6be8ae0af7c5000d34375e1 we need **consumer instances**:
```python
websocket_urlpatterns = [
re_path(r'ws/chat/(?P<room_name>\w+)/$', consumers.ChatConsumer()),
]
```
The router... | [
{
"content": "import functools\n\nfrom asgiref.sync import async_to_sync\n\nfrom . import DEFAULT_CHANNEL_LAYER\nfrom .db import database_sync_to_async\nfrom .exceptions import StopConsumer\nfrom .layers import get_channel_layer\nfrom .utils import await_many_dispatch\n\n\ndef get_handler_name(message):\n \"... | [
{
"content": "import functools\n\nfrom asgiref.sync import async_to_sync\n\nfrom . import DEFAULT_CHANNEL_LAYER\nfrom .db import database_sync_to_async\nfrom .exceptions import StopConsumer\nfrom .layers import get_channel_layer\nfrom .utils import await_many_dispatch\n\n\ndef get_handler_name(message):\n \"... | diff --git a/channels/consumer.py b/channels/consumer.py
index df9a3239f..85543d6cd 100644
--- a/channels/consumer.py
+++ b/channels/consumer.py
@@ -80,6 +80,26 @@ async def send(self, message):
"""
await self.base_send(message)
+ @classmethod
+ def as_asgi(cls, **initkwargs):
+ """
+ ... |
pypa__pipenv-537 | Pipfile syntax invalid when installing editable requirements with extras_require flag.
For given command:
```bash
pipenv install "git+https://github.com/requests/requests.git@master#egg=requests[security]"
```
that executes successfully, the produced Pipfile is unfortunately not valid.
```toml
[[source]]
url ... | [
{
"content": "# -*- coding: utf-8 -*-\nimport os\nimport hashlib\nimport tempfile\n\nfrom piptools.resolver import Resolver\nfrom piptools.repositories.pypi import PyPIRepository\nfrom piptools.scripts.compile import get_pip_command\nfrom piptools import logging\n\nimport delegator\nimport requests\nimport pars... | [
{
"content": "# -*- coding: utf-8 -*-\nimport os\nimport hashlib\nimport tempfile\n\nfrom piptools.resolver import Resolver\nfrom piptools.repositories.pypi import PyPIRepository\nfrom piptools.scripts.compile import get_pip_command\nfrom piptools import logging\n\nimport delegator\nimport requests\nimport pars... | diff --git a/pipenv/utils.py b/pipenv/utils.py
index d2828e6939..f6b7ed2460 100644
--- a/pipenv/utils.py
+++ b/pipenv/utils.py
@@ -162,8 +162,11 @@ def convert_deps_from_pip(dep):
'dependencies. Please install remote dependency '
'in the form {0}#egg=<package-... |
cookiecutter__cookiecutter-639 | Explicitly set encoding for reading history file.
Fixes build in C locale. Otherwise I see:
Traceback (most recent call last):
File "setup.py", line 24, in <module>
history = history_file.read().replace('.. :changelog:', '')
File "/usr/pkg/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs... | [
{
"content": "#!/usr/bin/env python\n\nimport os\nimport sys\n\nfrom setuptools import setup\n\nversion = \"1.3.0\"\n\nif sys.argv[-1] == 'publish':\n os.system('python setup.py sdist upload')\n os.system('python setup.py bdist_wheel upload')\n sys.exit()\n\nif sys.argv[-1] == 'tag':\n os.system(\"g... | [
{
"content": "#!/usr/bin/env python\n\nimport os\nimport io\nimport sys\n\nfrom setuptools import setup\n\nversion = \"1.3.0\"\n\nif sys.argv[-1] == 'publish':\n os.system('python setup.py sdist upload')\n os.system('python setup.py bdist_wheel upload')\n sys.exit()\n\nif sys.argv[-1] == 'tag':\n os... | diff --git a/setup.py b/setup.py
index 5991d014e..40d80dd97 100755
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
+import io
import sys
from setuptools import setup
@@ -17,10 +18,10 @@
os.system("git push --tags")
sys.exit()
-with open('README.rst') as readme_file:
+wi... |
ipython__ipython-12980 | %rerun prints a misleading error when 0 lines are requested
## Steps to reproduce
* Execute `%rerun -l 0`
## Expected result
Nothing rerun, nothing printed
## Actual result
Nothing rerun, but the following is printed
```
No lines in history match specification
```
## Comment
This error message is rel... | [
{
"content": "\"\"\"Implementation of magic functions related to History.\n\"\"\"\n#-----------------------------------------------------------------------------\n# Copyright (c) 2012, IPython Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the fi... | [
{
"content": "\"\"\"Implementation of magic functions related to History.\n\"\"\"\n#-----------------------------------------------------------------------------\n# Copyright (c) 2012, IPython Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the fi... | diff --git a/IPython/core/magics/history.py b/IPython/core/magics/history.py
index 3b95ee7d7d3..87716672c5c 100644
--- a/IPython/core/magics/history.py
+++ b/IPython/core/magics/history.py
@@ -301,6 +301,14 @@ def rerun(self, parameter_s=''):
opts, args = self.parse_options(parameter_s, 'l:g:', mode='string')
... |
zestedesavoir__zds-site-2869 | La page de maintenance ne fonctionne plus
Je ne sais pas ce qui a été modifié sur la conf nginx, mais la page de maintenance ne fonctionne visiblement plus, vu comment tout le monde a gueulé pendant la MEP de la v1.7c.
| [
{
"content": "# coding: utf-8\n\nimport os\nimport sys\n\nfrom django.contrib.messages import constants as message_constants\nfrom django.utils.http import urlquote\nfrom django.utils.translation import gettext_lazy as _\n\n# Changes the default encoding of python to UTF-8.\n# Theses instructions don't change e... | [
{
"content": "# coding: utf-8\n\nimport os\nimport sys\n\nfrom django.contrib.messages import constants as message_constants\nfrom django.utils.http import urlquote\nfrom django.utils.translation import gettext_lazy as _\n\n# Changes the default encoding of python to UTF-8.\n# Theses instructions don't change e... | diff --git a/doc/source/install/deploy-in-production.rst b/doc/source/install/deploy-in-production.rst
index 0769945348..fccbcb8eb0 100644
--- a/doc/source/install/deploy-in-production.rst
+++ b/doc/source/install/deploy-in-production.rst
@@ -158,61 +158,65 @@ Installer nginx. Sous Debian, la configuration est splittée... |
projectmesa__mesa-281 | Bug with building docs - Readme is not correct
I was just trying to follow the [Readme.md](https://github.com/projectmesa/mesa/blob/master/docs/README.md) to build the docs, and I get the following error:
```
mesa/docs [git fix-docs] $ make html
sphinx-build -b html -d _build/doctrees . _build/html
Running Sphinx v... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Mesa documentation build configuration file, created by\n# sphinx-quickstart on Sun Jan 4 23:34:09 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration val... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Mesa documentation build configuration file, created by\n# sphinx-quickstart on Sun Jan 4 23:34:09 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration val... | diff --git a/docs/conf.py b/docs/conf.py
index 29a1edff87a..a1f1ac36924 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -17,19 +17,6 @@
import os
-# Adding mock imports to see if this builds
-from unittest.mock import MagicMock
-
-class Mock(MagicMock):
- @classmethod
- def __getattr__(cls, name):
- ... |
pre-commit__pre-commit-86 | UnicodeDecodeError in staged_files_only
```
$ pre-commit
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to .../.pre-commit-files/patch1397853050.
Traceback (most recent call last):
File ".../bin/pre-commit", line 9, in <module>
load_entry_point('pre-commit==0.0.0', 'console_scripts', 'pre-commi... | [
{
"content": "import contextlib\nimport logging\nimport time\n\nfrom pre_commit.prefixed_command_runner import CalledProcessError\n\n\nlogger = logging.getLogger('pre_commit')\n\n\n@contextlib.contextmanager\ndef staged_files_only(cmd_runner):\n \"\"\"Clear any unstaged changes from the git working directory... | [
{
"content": "import contextlib\nimport io\nimport logging\nimport time\n\nfrom pre_commit.prefixed_command_runner import CalledProcessError\n\n\nlogger = logging.getLogger('pre_commit')\n\n\n@contextlib.contextmanager\ndef staged_files_only(cmd_runner):\n \"\"\"Clear any unstaged changes from the git workin... | diff --git a/pre_commit/staged_files_only.py b/pre_commit/staged_files_only.py
index 8d27d9da4..751a84b7c 100644
--- a/pre_commit/staged_files_only.py
+++ b/pre_commit/staged_files_only.py
@@ -1,4 +1,5 @@
import contextlib
+import io
import logging
import time
@@ -28,7 +29,7 @@ def staged_files_only(cmd_runner):
... |
AnalogJ__lexicon-374 | DNSimple crash with team member that does not have a plan
Here's the error I get (I have redacted my account number, domain and auth token)
```sh
$ lexicon dnsimple --auth-token REDACTED list REDACTED A
Traceback (most recent call last):
File "/usr/local/bin/lexicon", line 11, in <module>
sys.exit(main())
... | [
{
"content": "\"\"\"Module provider for DNS Simple\"\"\"\nfrom __future__ import absolute_import\nimport json\nimport logging\n\nimport requests\nfrom lexicon.providers.base import Provider as BaseProvider\n\n\nLOGGER = logging.getLogger(__name__)\n\nNAMESERVER_DOMAINS = ['dnsimple.com']\n\n\ndef provider_parse... | [
{
"content": "\"\"\"Module provider for DNS Simple\"\"\"\nfrom __future__ import absolute_import\nimport json\nimport logging\n\nimport requests\nfrom lexicon.providers.base import Provider as BaseProvider\n\n\nLOGGER = logging.getLogger(__name__)\n\nNAMESERVER_DOMAINS = ['dnsimple.com']\n\n\ndef provider_parse... | diff --git a/lexicon/providers/dnsimple.py b/lexicon/providers/dnsimple.py
index 8c4d6347c..d89ae1f46 100644
--- a/lexicon/providers/dnsimple.py
+++ b/lexicon/providers/dnsimple.py
@@ -42,6 +42,13 @@ def _authenticate(self):
raise Exception('No account id found')
for account in payload:
+ ... |
huggingface__text-generation-inference-822 | Unexpected results occur when using –rope-factor 2 –rope-scaling dynamic.
When I use -rope-factor 2 -rope-scaling dynamic to get LLaMA to achieve a 4k context length, the results are far worse on both long and short inputs than when I do not use these parameters (in the Chinese scene, some garbled text even appears). W... | [
{
"content": "import os\nimport torch\nimport torch.distributed\n\nfrom torch import nn\nfrom torch.nn import functional as F\nfrom typing import List\n\nHAS_BITS_AND_BYTES = True\ntry:\n import bitsandbytes as bnb\n from bitsandbytes.nn import Int8Params, Params4bit\n\nexcept ImportError:\n HAS_BITS_A... | [
{
"content": "import os\nimport torch\nimport torch.distributed\n\nfrom torch import nn\nfrom torch.nn import functional as F\nfrom typing import List\n\nHAS_BITS_AND_BYTES = True\ntry:\n import bitsandbytes as bnb\n from bitsandbytes.nn import Int8Params\n\nexcept ImportError:\n HAS_BITS_AND_BYTES = F... | diff --git a/server/text_generation_server/utils/layers.py b/server/text_generation_server/utils/layers.py
index d7b4c0cc848..a80a1e49eea 100644
--- a/server/text_generation_server/utils/layers.py
+++ b/server/text_generation_server/utils/layers.py
@@ -502,8 +502,6 @@ def _update_cos_sin_cache(self, dtype, device, seql... |
spyder-ide__spyder-3550 | Console/Editor lose focus when auto-connected to help
## Description of your problem
1. Open spyder
2. Enable automatic connection to help in settings
3. Type in editor or console until the help connects, either by function(, or function? in the console
Expected behaviour is for the help for that function to show and ... | [
{
"content": "# -*- coding: utf-8 -*-\r\n#\r\n# Copyright © Spyder Project Contributors\r\n# Licensed under the terms of the MIT License\r\n# (see spyder/__init__.py for details)\r\n\r\n\"\"\"Simple web browser widget\"\"\"\r\n\r\n# Standard library imports\r\nimport sys\r\n\r\n# Third party imports\r\nfrom qtp... | [
{
"content": "# -*- coding: utf-8 -*-\r\n#\r\n# Copyright © Spyder Project Contributors\r\n# Licensed under the terms of the MIT License\r\n# (see spyder/__init__.py for details)\r\n\r\n\"\"\"Simple web browser widget\"\"\"\r\n\r\n# Standard library imports\r\nimport sys\r\n\r\n# Third party imports\r\nfrom qtp... | diff --git a/spyder/widgets/browser.py b/spyder/widgets/browser.py
index d4a171fa84c..319c6c0958e 100644
--- a/spyder/widgets/browser.py
+++ b/spyder/widgets/browser.py
@@ -142,7 +142,22 @@ def contextMenuEvent(self, event):
add_actions(menu, actions)
menu.popup(event.globalPos())
event.acc... |
freedomofpress__securedrop-5370 | Add v2 deprecation warning to securedrop-admin
As we're implementing an official deprecation timeline for v2 Onion Services (see #5302), as a standard practice for deprecation warnings, we should display appropriate warnings in CLI tooling as well. This includes `securedrop-admin sdconfig`, and possibly `securedrop-adm... | [
{
"content": "# -*- mode: python; coding: utf-8 -*-\n#\n# Copyright (C) 2013-2018 Freedom of the Press Foundation & al\n# Copyright (C) 2018 Loic Dachary <loic@dachary.org>\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... | [
{
"content": "# -*- mode: python; coding: utf-8 -*-\n#\n# Copyright (C) 2013-2018 Freedom of the Press Foundation & al\n# Copyright (C) 2018 Loic Dachary <loic@dachary.org>\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... | diff --git a/admin/securedrop_admin/__init__.py b/admin/securedrop_admin/__init__.py
index 760b228ba2..4d2e298035 100755
--- a/admin/securedrop_admin/__init__.py
+++ b/admin/securedrop_admin/__init__.py
@@ -410,7 +410,9 @@ def __init__(self, args):
str.split,
lambda config: True],
... |
rucio__rucio-6034 | Use GFAL’s create_parent transfer parameter
Motivation
----------
The implementation here can be simplified:
https://github.com/rucio/rucio/blob/master/lib/rucio/rse/protocols/gfal.py#L398
*This should not be done until GFAL 2.16.4 reaches EPEL.*
Modification
------------
Do not make a separate call to G... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright European Organization for Nuclear Research (CERN) since 2012\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://w... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright European Organization for Nuclear Research (CERN) since 2012\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://w... | diff --git a/lib/rucio/rse/protocols/gfal.py b/lib/rucio/rse/protocols/gfal.py
index 6734e51ee2..43b8887b3c 100644
--- a/lib/rucio/rse/protocols/gfal.py
+++ b/lib/rucio/rse/protocols/gfal.py
@@ -445,13 +445,8 @@ def __gfal2_copy(self, src, dest, src_spacetoken=None, dest_spacetoken=None, tra
params.timeout... |
ansible__awx-13080 | [api] Confusing error when trying to sync project set to scm_type Manual
### Please confirm the following
- [X] I agree to follow this project's [code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
- [X] I have checked the [current issues](https://github.com/ansible/awx/issues) fo... | [
{
"content": "#!/usr/bin/python\n# coding: utf-8 -*-\n\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n\n__metaclass__ = type\n\nANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview']... | [
{
"content": "#!/usr/bin/python\n# coding: utf-8 -*-\n\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n\n__metaclass__ = type\n\nANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview']... | diff --git a/awx_collection/plugins/modules/project_update.py b/awx_collection/plugins/modules/project_update.py
index 6ccdca1fdb3c..38b55c8e3c35 100644
--- a/awx_collection/plugins/modules/project_update.py
+++ b/awx_collection/plugins/modules/project_update.py
@@ -114,7 +114,12 @@ def main():
# Update the projec... |
cupy__cupy-7709 | Installation with pip results in broken installation
### Description
This is reopening #7253 since it still persists with CUDA 12.1 and cupy-cuda12x on Python 3.11 in a fresh environment. CC @kmaehashi
Importing `cupy` fails with an `ImportError`:
```
In [1]: import cupy
--------------------------------------... | [
{
"content": "\"\"\"\nThis file must not depend on any other CuPy modules.\n\"\"\"\n\nimport ctypes\nimport json\nimport os\nimport os.path\nimport shutil\nimport sys\nfrom typing import Any, Dict, Optional\nimport warnings\n\n\n# '' for uninitialized, None for non-existing\n_cuda_path = ''\n_nvcc_path = ''\n_r... | [
{
"content": "\"\"\"\nThis file must not depend on any other CuPy modules.\n\"\"\"\n\nimport ctypes\nimport json\nimport os\nimport os.path\nimport shutil\nimport sys\nfrom typing import Any, Dict, Optional\nimport warnings\n\n\n# '' for uninitialized, None for non-existing\n_cuda_path = ''\n_nvcc_path = ''\n_r... | diff --git a/cupy/_environment.py b/cupy/_environment.py
index fc646b667d0..397cdff493f 100644
--- a/cupy/_environment.py
+++ b/cupy/_environment.py
@@ -200,8 +200,10 @@ def _setup_win32_dll_directory():
# Setup DLL directory to load CUDA Toolkit libs and shared libraries
# added during the build process.
... |
piskvorky__gensim-681 | KeyError: Popping a non-existing value from `_keywords`
OS X 10.11.1
Python 2.7.10
gensim 0.12.4
To reproduce this in Python shell:
```
>>> import gensim.summarization
>>> t = "Victor S. Sage Compare Sage 50c Editions Find accounting software that's right for your business Every product comes with anytime, anywhere o... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\nfrom gensim.summarization.pagerank_weighted import pagerank_weighted as _pagerank\nfrom gensim.summarization.textcleaner import clean_text_by_word as _clean_text_by_word... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\nfrom gensim.summarization.pagerank_weighted import pagerank_weighted as _pagerank\nfrom gensim.summarization.textcleaner import clean_text_by_word as _clean_text_by_word... | diff --git a/gensim/summarization/keywords.py b/gensim/summarization/keywords.py
index b66f096263..3bb7cee100 100644
--- a/gensim/summarization/keywords.py
+++ b/gensim/summarization/keywords.py
@@ -164,7 +164,7 @@ def _get_combined_keywords(_keywords, split_text):
result.append(word) # appends last ... |
pallets__click-1646 | click.launch(wait=True) does not appear to work
### Expected Behavior
When calling `click.launch(wait=True)`, if I interpret the documentation correctly, `click.launch(wait=True)` should wait (block) for the user to close the launched program.
From https://click.palletsprojects.com/en/7.x/api/#click.launch:
> wa... | [
{
"content": "import inspect\nimport io\nimport itertools\nimport os\nimport struct\nimport sys\n\nfrom ._compat import DEFAULT_COLUMNS\nfrom ._compat import get_winterm_size\nfrom ._compat import is_bytes\nfrom ._compat import isatty\nfrom ._compat import strip_ansi\nfrom ._compat import WIN\nfrom .exceptions ... | [
{
"content": "import inspect\nimport io\nimport itertools\nimport os\nimport struct\nimport sys\n\nfrom ._compat import DEFAULT_COLUMNS\nfrom ._compat import get_winterm_size\nfrom ._compat import is_bytes\nfrom ._compat import isatty\nfrom ._compat import strip_ansi\nfrom ._compat import WIN\nfrom .exceptions ... | diff --git a/src/click/termui.py b/src/click/termui.py
index 44e0b8038..1eb9ed804 100644
--- a/src/click/termui.py
+++ b/src/click/termui.py
@@ -658,7 +658,9 @@ def launch(url, wait=False, locate=False):
.. versionadded:: 2.0
:param url: URL or filename of the thing to launch.
- :param wait: waits for th... |
bids-standard__pybids-1016 | BUG: null metadata results in indexing failure
```python
sdcflows/conftest.py:39: in <module>
layouts = {
sdcflows/conftest.py:40: in <dictcomp>
p.name: BIDSLayout(str(p), validate=False, derivatives=True)
/usr/share/miniconda/envs/test/lib/python3.10/site-packages/bids/layout/layout.py:177: in __init__
... | [
{
"content": "\"\"\"File-indexing functionality. \"\"\"\n\nimport os\nimport json\nimport re\nfrom collections import defaultdict\nfrom pathlib import Path\nfrom functools import partial, lru_cache\n\nfrom bids_validator import BIDSValidator\n\nfrom ..utils import listify, make_bidsfile\nfrom ..exceptions impor... | [
{
"content": "\"\"\"File-indexing functionality. \"\"\"\n\nimport os\nimport json\nimport re\nfrom collections import defaultdict\nfrom pathlib import Path\nfrom functools import partial, lru_cache\n\nfrom bids_validator import BIDSValidator\n\nfrom ..utils import listify, make_bidsfile\nfrom ..exceptions impor... | diff --git a/bids/layout/index.py b/bids/layout/index.py
index 62cbec26..38800d0e 100644
--- a/bids/layout/index.py
+++ b/bids/layout/index.py
@@ -465,6 +465,10 @@ def create_association_pair(src, dst, kind, kind2=None):
# Create Tag <-> Entity mappings, and any newly discovered Entities
for... |
pyinstaller__pyinstaller-4326 | soundfile hook has osx/windows specific behaviour
hook-soundfile.py was added in 3.5 but it blows up on linux as follows
9727 INFO: Loading module hook "hook-soundfile.py"...
Unable to find "/home/matt/.virtualenvs/beqdesigner-entpycF3/lib/python3.7/site-packages/_soundfile_data" when adding binary and data... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2016-2019, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING.... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2016-2019, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING.... | diff --git a/PyInstaller/hooks/hook-soundfile.py b/PyInstaller/hooks/hook-soundfile.py
index 8020cd61ad..99c27bacfc 100644
--- a/PyInstaller/hooks/hook-soundfile.py
+++ b/PyInstaller/hooks/hook-soundfile.py
@@ -13,11 +13,20 @@
"""
import os
+
+from PyInstaller.compat import is_win, is_darwin
from PyInstaller.utils... |
saleor__saleor-624 | Allocated line items should be computed while changing line quantity
A user makes an order for 5 items of the same product.
Now we have this stock situation: Quantity: 6, Allocated:5
Go to the dashboard order page.
If we try to change the line quantity to 2-6 inside the dashboard we'll get an error: "Only 1 remaini... | [
{
"content": "from __future__ import unicode_literals\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.shortcuts import get_object_or_404\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.utils.translation import pgettext_lazy\nfrom django_prices.forms import PriceF... | [
{
"content": "from __future__ import unicode_literals\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.shortcuts import get_object_or_404\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.utils.translation import pgettext_lazy\nfrom django_prices.forms import PriceF... | diff --git a/saleor/dashboard/order/forms.py b/saleor/dashboard/order/forms.py
index 4595b82282c..ac2259fd5e1 100644
--- a/saleor/dashboard/order/forms.py
+++ b/saleor/dashboard/order/forms.py
@@ -149,10 +149,11 @@ def __init__(self, *args, **kwargs):
def clean_quantity(self):
quantity = self.cleaned_da... |
rasterio__rasterio-2390 | Dead links
<!--
WELCOME ABOARD!
Hi and welcome to the Rasterio project. We appreciate bug reports, questions
about documentation, and suggestions for new features. This issue template
isn't intended to ward you off; only to intercept and redirect some particular
categories of reports, and to collect a few impo... | [
{
"content": "\"\"\"Rasterio\"\"\"\n\nfrom collections import namedtuple\nfrom contextlib import ExitStack\nimport logging\nfrom logging import NullHandler\nimport os\n\nimport rasterio._loading\nwith rasterio._loading.add_gdal_dll_directories():\n from rasterio._base import gdal_version\n from rasterio.c... | [
{
"content": "\"\"\"Rasterio\"\"\"\n\nfrom collections import namedtuple\nfrom contextlib import ExitStack\nimport logging\nfrom logging import NullHandler\nimport os\n\nimport rasterio._loading\nwith rasterio._loading.add_gdal_dll_directories():\n from rasterio._base import gdal_version\n from rasterio.c... | diff --git a/docs/topics/reproject.rst b/docs/topics/reproject.rst
index 8c1fdb43a..cc2da22a0 100644
--- a/docs/topics/reproject.rst
+++ b/docs/topics/reproject.rst
@@ -57,7 +57,7 @@ transform.
See `examples/reproject.py <https://github.com/rasterio/rasterio/blob/master/examples/reproject.py>`__
for code that writes ... |
apache__airflow-24142 | Migrate MySQL example DAGs to new design
There is a new design of system tests that was introduced by the [AIP-47](https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-47+New+design+of+Airflow+System+Tests).
All current example dags need to be migrated and converted into system tests, so they can be run in the CI p... | [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | [
{
"content": null,
"path": "airflow/providers/mysql/example_dags/__init__.py"
}
] | diff --git a/airflow/providers/mysql/example_dags/__init__.py b/airflow/providers/mysql/example_dags/__init__.py
deleted file mode 100644
index 217e5db960782..0000000000000
--- a/airflow/providers/mysql/example_dags/__init__.py
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under ... |
sanic-org__sanic-2899 | Can't use optional CLI arguments
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
When I try `sanic module:app` it works.
When I try `sanic -d module:app` it doesn't. Trying --dev doesn't work. I can run with `-r and --debug` separately.
```
$ sanic testa... | [
{
"content": "import concurrent.futures\nimport sys\nimport threading\nimport time\nimport traceback\n\nfrom ast import PyCF_ALLOW_TOP_LEVEL_AWAIT\nfrom asyncio import iscoroutine, new_event_loop\nfrom code import InteractiveConsole\nfrom types import FunctionType\nfrom typing import Any, Dict, NamedTuple, Opti... | [
{
"content": "import concurrent.futures\nimport sys\nimport threading\nimport time\nimport traceback\n\nfrom ast import PyCF_ALLOW_TOP_LEVEL_AWAIT\nfrom asyncio import iscoroutine, new_event_loop\nfrom code import InteractiveConsole\nfrom types import FunctionType\nfrom typing import Any, Dict, NamedTuple, Opti... | diff --git a/sanic/cli/console.py b/sanic/cli/console.py
index e5cd7f38b2..1ff6e1d81d 100644
--- a/sanic/cli/console.py
+++ b/sanic/cli/console.py
@@ -130,7 +130,6 @@ def __init__(self, app: Sanic, start: Optional[Default] = None):
f" - {Colors.BOLD + Colors.SANIC}client{Colors.END}: A client to acces... |
SCons__scons-3896 | Building versioned shared library fails when using MinGW
This issue was originally created at: 2016-11-15 18:47:49.
This issue was reported by: `yarmond`.
yarmond said at 2016-11-15 18:47:49
>Specifying a value for SHLIBVERSION in order to generate a versioned shared
>library fails when compiling with MinGW. A min... | [
{
"content": "# MIT License\n#\n# Copyright The SCons Foundation\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the right... | [
{
"content": "# MIT License\n#\n# Copyright The SCons Foundation\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the right... | diff --git a/CHANGES.txt b/CHANGES.txt
index 1f985b6065..ed5ece859d 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -13,6 +13,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
It will now allow callables with expected args, and any extra args as long as they
have default arguments. Additionally functions wi... |
Parsl__parsl-2324 | parsl-visualize creates invalid monitoring.db SQL schema
**Describe the bug**
Hi there, and thanks for your support. I'm using HighThroughputExecutor+SlurmProvider to manage my workflow, and I sometimes encounter an unexpected OperationalError when including a MonitoringHub in my Config, which then breaks the monitori... | [
{
"content": "from flask_sqlalchemy import SQLAlchemy\n\n\nWORKFLOW = 'workflow' # Workflow table includes workflow metadata\nTASK = 'task' # Task table includes task metadata\nSTATUS = 'status' # Status table includes task status\nRESOURCE = 'resource' # Resource table includes task res... | [
{
"content": "from flask_sqlalchemy import SQLAlchemy\n\n\nWORKFLOW = 'workflow' # Workflow table includes workflow metadata\nTASK = 'task' # Task table includes task metadata\nSTATUS = 'status' # Status table includes task status\nRESOURCE = 'resource' # Resource table includes task res... | diff --git a/parsl/monitoring/visualization/models.py b/parsl/monitoring/visualization/models.py
index 87e85fb2bb..79459260ea 100644
--- a/parsl/monitoring/visualization/models.py
+++ b/parsl/monitoring/visualization/models.py
@@ -58,6 +58,8 @@ class Task(db.Model):
run_id = db.Column('run_id', db.Text, nullable=F... |
getnikola__nikola-492 | Only render the last index page
The render_indexes plugin only renders the last index page.
To reproduce, set the 'use_in_feed' parameter to True in more than one directory of posts.
I provide the patch in a pull request (it's a little identation modification)
| [
{
"content": "# Copyright (c) 2012 Roberto Alsina y otros.\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 without limitation\n# the rights to... | [
{
"content": "# Copyright (c) 2012 Roberto Alsina y otros.\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 without limitation\n# the rights to... | diff --git a/nikola/plugins/task_indexes.py b/nikola/plugins/task_indexes.py
index 4483899519..7ea71a3710 100644
--- a/nikola/plugins/task_indexes.py
+++ b/nikola/plugins/task_indexes.py
@@ -135,7 +135,7 @@ def gen_tasks(self):
template_name,
... |
HypothesisWorks__hypothesis-2492 | setuptools 49.2.0 will warn if distutils is imported first
xref pypa/setuptools#2261, numpy/numpy#16851
We are trying to understand why pytest-xdist is failing to run after updating setuptools to 49.2.0. I think one problem might be [this import](https://github.com/HypothesisWorks/hypothesis/blob/master/hypothesis-p... | [
{
"content": "# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Most of this work is copyright (C) 2013-2020 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full list of people who ma... | [
{
"content": "# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Most of this work is copyright (C) 2013-2020 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full list of people who ma... | diff --git a/hypothesis-python/RELEASE.rst b/hypothesis-python/RELEASE.rst
new file mode 100644
index 0000000000..a75f1c963e
--- /dev/null
+++ b/hypothesis-python/RELEASE.rst
@@ -0,0 +1,5 @@
+RELEASE_TYPE: patch
+
+This patch removes an internal use of ``distutils`` in order to avoid
+`this setuptools warning <https://... |
pyro-ppl__numpyro-1255 | Improving error message when using NeutraReparam
Here is a snippet
```python
import numpy as np
import jax
import jax.numpy as jnp
import numpyro
import numpyro.distributions as dist
import numpyro.infer.autoguide as autoguide
from numpyro.infer import Predictive, SVI, Trace_ELBO, TraceMeanField_ELBO
from... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom abc import ABC, abstractmethod\nimport math\n\nimport jax.numpy as jnp\n\nimport numpyro\nimport numpyro.distributions as dist\nfrom numpyro.distributions import biject_to, constraints\nfrom numpyro.distri... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom abc import ABC, abstractmethod\nimport math\n\nimport jax.numpy as jnp\n\nimport numpyro\nimport numpyro.distributions as dist\nfrom numpyro.distributions import biject_to, constraints\nfrom numpyro.distri... | diff --git a/numpyro/infer/reparam.py b/numpyro/infer/reparam.py
index 290997465..107a5195d 100644
--- a/numpyro/infer/reparam.py
+++ b/numpyro/infer/reparam.py
@@ -235,10 +235,12 @@ def __init__(self, guide, params):
self._x_unconstrained = {}
def _reparam_config(self, site):
- if site["name"] i... |
DataDog__dd-trace-py-1465 | gRPC server interceptor raises AttributeError
When a gRPC service is not found, the Datadog interceptor raises an AttributeError:
```
ERROR grpc._server:_server.py:732 Exception servicing handler: 'NoneType' object has no attribute '_pin'
...
File "/src/ddtrace/contrib/grpc/server_interceptor.py", line 153, ... | [
{
"content": "import grpc\nfrom ddtrace.vendor import wrapt\n\nfrom ddtrace import config\nfrom ddtrace.ext import errors\nfrom ddtrace.compat import to_unicode\n\nfrom ...constants import ANALYTICS_SAMPLE_RATE_KEY, SPAN_MEASURED_KEY\nfrom ...ext import SpanTypes\nfrom ...propagation.http import HTTPPropagator\... | [
{
"content": "import grpc\nfrom ddtrace.vendor import wrapt\n\nfrom ddtrace import config\nfrom ddtrace.ext import errors\nfrom ddtrace.compat import to_unicode\n\nfrom ...constants import ANALYTICS_SAMPLE_RATE_KEY, SPAN_MEASURED_KEY\nfrom ...ext import SpanTypes\nfrom ...propagation.http import HTTPPropagator\... | diff --git a/ddtrace/contrib/grpc/server_interceptor.py b/ddtrace/contrib/grpc/server_interceptor.py
index ab5bef869ae..c632eeb1503 100644
--- a/ddtrace/contrib/grpc/server_interceptor.py
+++ b/ddtrace/contrib/grpc/server_interceptor.py
@@ -18,7 +18,15 @@ def interceptor_function(continuation, handler_call_details):
... |
hpcaitech__ColossalAI-5287 | [tensor] fix some unittests
[tensor] fix some unittests
[tensor] fix some unittests
| [
{
"content": "import argparse\nimport os\nimport resource\nfrom contextlib import nullcontext\nfrom functools import partial\nfrom typing import Optional, Tuple\n\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\nfrom attn import SUPPORT_XFORMERS, replace_xformers\nfrom data_utils import l... | [
{
"content": "import argparse\nimport os\nimport resource\nfrom contextlib import nullcontext\nfrom functools import partial\nfrom typing import Optional, Tuple\n\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\nfrom attn import SUPPORT_XFORMERS, replace_xformers\nfrom data_utils import l... | diff --git a/examples/language/llama2/pretrain.py b/examples/language/llama2/pretrain.py
index bb10f7a00e8a..8d5b7c8db05d 100644
--- a/examples/language/llama2/pretrain.py
+++ b/examples/language/llama2/pretrain.py
@@ -273,11 +273,10 @@ def main():
dataloader.sampler.set_start_index(sampler_start_idx)
for epo... |
Miserlou__Zappa-2049 | Syntax warning due to comparison of literals using is in Python 3.8
## Context
Syntax warning due to comparison of literals using is.
## Possible Fix
Use == and != as suggested in the warning
## Steps to Reproduce
```
find . -iname '*.py' | xargs -P 4 -I{} python -Walways -m py_compile {}
./zappa/c... | [
{
"content": "\"\"\"\nCopyright 2015-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with the License. A copy of the License is located at\n http://aws.amazon.com/apache2.0/\nor in... | [
{
"content": "\"\"\"\nCopyright 2015-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with the License. A copy of the License is located at\n http://aws.amazon.com/apache2.0/\nor in... | diff --git a/example/authmodule.py b/example/authmodule.py
index 200c3c943..9517e4b12 100644
--- a/example/authmodule.py
+++ b/example/authmodule.py
@@ -75,7 +75,7 @@ class AuthPolicy:
"""The principal used for the policy, this should be a unique identifier for the end user."""
version = "2012-10-17"
"""... |
jupyterhub__jupyterhub-1220 | Error messages about managed cull-idle server
Lots of messages in log about
```
[E 2017-07-14 03:18:49.501 JupyterHub proxy:319] Service <Service(name=cull-idle managed)> has no server, but wasn't filtered out.
```
Not sure why - the cull-idle service doesn't make an entry into the proxy...
| [
{
"content": "\"\"\"API for JupyterHub's proxy.\n\nCustom proxy implementations can subclass :class:`Proxy`\nand register in JupyterHub config:\n\n.. sourcecode:: python\n\n from mymodule import MyProxy\n c.JupyterHub.proxy_class = MyProxy\n\nRoute Specification:\n\n- A routespec is a URL prefix ([host]/p... | [
{
"content": "\"\"\"API for JupyterHub's proxy.\n\nCustom proxy implementations can subclass :class:`Proxy`\nand register in JupyterHub config:\n\n.. sourcecode:: python\n\n from mymodule import MyProxy\n c.JupyterHub.proxy_class = MyProxy\n\nRoute Specification:\n\n- A routespec is a URL prefix ([host]/p... | diff --git a/jupyterhub/proxy.py b/jupyterhub/proxy.py
index ae72226236..27204e1e47 100644
--- a/jupyterhub/proxy.py
+++ b/jupyterhub/proxy.py
@@ -308,8 +308,7 @@ def check_routes(self, user_dict, service_dict, routes=None):
# check service routes
service_routes = {r['data']['service']
... |
hpcaitech__ColossalAI-5645 | [tensor] fix some unittests
[tensor] fix some unittests
[tensor] fix some unittests
| [
{
"content": "import random\nfrom typing import List, Optional, Tuple, Union\n\nimport torch\nfrom torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss\nfrom transformers.modeling_attn_mask_utils import _prepare_4d_causal_attention_mask\nfrom transformers.modeling_outputs import (\n BaseModelOutputWi... | [
{
"content": "import random\nfrom typing import List, Optional, Tuple, Union\n\nimport torch\nfrom torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss\nfrom transformers.modeling_attn_mask_utils import _prepare_4d_causal_attention_mask\nfrom transformers.modeling_outputs import (\n BaseModelOutputWi... | diff --git a/colossalai/shardformer/modeling/opt.py b/colossalai/shardformer/modeling/opt.py
index 8f841c8a6615..81521c30b1a2 100644
--- a/colossalai/shardformer/modeling/opt.py
+++ b/colossalai/shardformer/modeling/opt.py
@@ -58,20 +58,6 @@ class OPTPipelineForwards:
under pipeline setting.
"""
- @stati... |
ESMCI__cime-3378 | Domain filename being stripped from input_data_list
In doing release testing, I ran into an issue where the domain filename was being stripped from the full path of the domain file. For example
domain1 = /glade/scratch/fischer/inputdata/atm/datm7/
Should be
domain1 = /glade/scratch/fischer/inputdata/atm/d... | [
{
"content": "\"\"\"Class for generating component namelists.\"\"\"\n\n# Typically ignore this.\n# pylint: disable=invalid-name\n\n# Disable these because this is our standard setup\n# pylint: disable=wildcard-import,unused-wildcard-import\n\nimport datetime\nimport re\nimport hashlib\n\nfrom CIME.XML.standard_... | [
{
"content": "\"\"\"Class for generating component namelists.\"\"\"\n\n# Typically ignore this.\n# pylint: disable=invalid-name\n\n# Disable these because this is our standard setup\n# pylint: disable=wildcard-import,unused-wildcard-import\n\nimport datetime\nimport re\nimport hashlib\n\nfrom CIME.XML.standard_... | diff --git a/scripts/lib/CIME/nmlgen.py b/scripts/lib/CIME/nmlgen.py
index 84a27cd65ce..d1c2162c422 100644
--- a/scripts/lib/CIME/nmlgen.py
+++ b/scripts/lib/CIME/nmlgen.py
@@ -493,7 +493,7 @@ def create_stream_file_and_update_shr_strdata_nml(self, config, caseroot, #pylin
continue
... |
sanic-org__sanic-647 | what have done to static.py?
On last Friday,everything is ok,my static file test works fine.
Today,when I pip install sanic==0.5.1
It raise 404 error.
when I pip install sanic==0.5.0
everything is ok again.
seems like the code blow has some problem?
if not file_path.startswith(root_path):
raise... | [
{
"content": "from mimetypes import guess_type\nfrom os import path\nfrom re import sub\nfrom time import strftime, gmtime\nfrom urllib.parse import unquote\n\nfrom aiofiles.os import stat\n\nfrom sanic.exceptions import (\n ContentRangeError,\n FileNotFound,\n HeaderNotFound,\n InvalidUsage,\n)\nfr... | [
{
"content": "from mimetypes import guess_type\nfrom os import path\nfrom re import sub\nfrom time import strftime, gmtime\nfrom urllib.parse import unquote\n\nfrom aiofiles.os import stat\n\nfrom sanic.exceptions import (\n ContentRangeError,\n FileNotFound,\n HeaderNotFound,\n InvalidUsage,\n)\nfr... | diff --git a/sanic/static.py b/sanic/static.py
index 24fce4ff67..64166d4657 100644
--- a/sanic/static.py
+++ b/sanic/static.py
@@ -56,7 +56,7 @@ async def _handler(request, file_uri=None):
# URL decode the path sent by the browser otherwise we won't be able to
# match filenames which got encoded (file... |
numpy__numpy-13177 | Wrong std for implicitly complex input
<!-- Please describe the issue in detail here, and fill in the fields below -->
Standart deviation formula could give unexpected result (e.g. imaginary values) when input is implicitly complex.
### Reproducing code example:
<!-- A short code example that reproduces the pr... | [
{
"content": "\"\"\"\nArray methods which are called by both the C-code for the method\nand the Python code for the NumPy-namespace function\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\nimport warnings\n\nfrom numpy.core import multiarray as mu\nfrom numpy.core import umath as ... | [
{
"content": "\"\"\"\nArray methods which are called by both the C-code for the method\nand the Python code for the NumPy-namespace function\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\nimport warnings\n\nfrom numpy.core import multiarray as mu\nfrom numpy.core import umath as ... | diff --git a/numpy/core/_methods.py b/numpy/core/_methods.py
index 51362c7614ee..953e7e1b84c2 100644
--- a/numpy/core/_methods.py
+++ b/numpy/core/_methods.py
@@ -115,10 +115,11 @@ def _var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False):
# Note that x may not be inexact and that we need it to be an ar... |
ephios-dev__ephios-815 | Send custom mails for events to responsibles as well
As a planner, I want to receive a copy of any custom mail that is sent out for this event so that I stay informed what has been communicated,
| [
{
"content": "from typing import List\nfrom urllib.parse import urljoin\n\nfrom django.conf import settings\nfrom django.contrib.auth.tokens import default_token_generator\nfrom django.template.loader import render_to_string\nfrom django.urls import reverse\nfrom django.utils.encoding import force_bytes\nfrom d... | [
{
"content": "from typing import List\nfrom urllib.parse import urljoin\n\nfrom django.conf import settings\nfrom django.contrib.auth.tokens import default_token_generator\nfrom django.template.loader import render_to_string\nfrom django.urls import reverse\nfrom django.utils.encoding import force_bytes\nfrom d... | diff --git a/ephios/core/services/notifications/types.py b/ephios/core/services/notifications/types.py
index eee6dd53b..fedf4f2b3 100644
--- a/ephios/core/services/notifications/types.py
+++ b/ephios/core/services/notifications/types.py
@@ -466,6 +466,21 @@ def send(cls, event: Event, content: str):
... |
google__fuzzbench-1466 | Write a validator to prevent issues requesting bug experiments
https://github.com/google/fuzzbench/commit/da5fab4dfcabcd856e0247b90122bb577f0c734e#diff-c89bd86bcf4447f199973358896b7a69d69d92f258653f28e77583ee8967dd13R49 has happened twice now, time to prevent it.
| [
{
"content": "#!/usr/bin/env python3\n# Copyright 2020 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# Unl... | [
{
"content": "#!/usr/bin/env python3\n# Copyright 2020 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# Unl... | diff --git a/service/automatic_run_experiment.py b/service/automatic_run_experiment.py
index 545992552..44c38bc23 100644
--- a/service/automatic_run_experiment.py
+++ b/service/automatic_run_experiment.py
@@ -143,6 +143,18 @@ def _validate_individual_experiment_requests(experiment_requests):
e... |
encode__django-rest-framework-1763 | API browser checks some custom permissions inconsistently compared to real API endpoints.
The API browser makes use of an `override_method` context manager to change the request method on a view so that it can check permissions for different endpoints (than the current request) and determine whether or not a form shoul... | [
{
"content": "\"\"\"\nThe Request class is used as a wrapper around the standard request object.\n\nThe wrapped request then offers a richer API, in particular :\n\n - content automatically parsed according to `Content-Type` header,\n and available as `request.DATA`\n - full support of PUT method, in... | [
{
"content": "\"\"\"\nThe Request class is used as a wrapper around the standard request object.\n\nThe wrapped request then offers a richer API, in particular :\n\n - content automatically parsed according to `Content-Type` header,\n and available as `request.DATA`\n - full support of PUT method, in... | diff --git a/rest_framework/request.py b/rest_framework/request.py
index 40467c03d0..735a928852 100644
--- a/rest_framework/request.py
+++ b/rest_framework/request.py
@@ -42,12 +42,16 @@ def __init__(self, view, request, method):
self.view = view
self.request = request
self.method = method
+ ... |
aws__aws-cli-1847 | groff 1.22.3 on smartos won't parse help text
Due to the way the latest groff 1.22.3 is installed on smartos (through pkgsrc), the traditional
`groff -man` will not parse man format pages correctly. I think this may be related to groff 1.22.3 in general, not the particular installation on smartos (illumos), but I do n... | [
{
"content": "# Copyright 2012-2015 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.... | [
{
"content": "# Copyright 2012-2015 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.... | diff --git a/awscli/help.py b/awscli/help.py
index 0a8166ed2842..67f39f521d47 100644
--- a/awscli/help.py
+++ b/awscli/help.py
@@ -106,7 +106,7 @@ def _convert_doc_content(self, contents):
man_contents = publish_string(contents, writer=manpage.Writer())
if not self._exists_on_path('groff'):
... |
encode__django-rest-framework-7724 | Rendering of Nested Serializer fails if no dictionary is parsed
## Checklist
- [ ] I have verified that that issue exists against the `master` branch of Django REST framework.
- [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [x] This is not a usage question. (... | [
{
"content": "from collections import OrderedDict\nfrom collections.abc import MutableMapping\n\nfrom django.utils.encoding import force_str\n\nfrom rest_framework.utils import json\n\n\nclass ReturnDict(OrderedDict):\n \"\"\"\n Return object from `serializer.data` for the `Serializer` class.\n Include... | [
{
"content": "from collections import OrderedDict\nfrom collections.abc import Mapping, MutableMapping\n\nfrom django.utils.encoding import force_str\n\nfrom rest_framework.utils import json\n\n\nclass ReturnDict(OrderedDict):\n \"\"\"\n Return object from `serializer.data` for the `Serializer` class.\n ... | diff --git a/rest_framework/utils/serializer_helpers.py b/rest_framework/utils/serializer_helpers.py
index b18fbe0df9..cd0373adcb 100644
--- a/rest_framework/utils/serializer_helpers.py
+++ b/rest_framework/utils/serializer_helpers.py
@@ -1,5 +1,5 @@
from collections import OrderedDict
-from collections.abc import Mut... |
facebookresearch__fairscale-830 | shard_model does not respect shard_count.
## 🐛 Bug
`autoshard.shard_model()` does not respect `shard_count`. See [comments](https://github.com/facebookresearch/fairscale/pull/817/files#r733237403) in https://github.com/facebookresearch/fairscale/pull/817 for more context and how to reproduce.
| [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport logging\nfrom typing import Dict, List, Set\n\nimport torch\nimport torch.fx\nfrom torch.fx.node import Node... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport logging\nfrom typing import Dict, List, Set\n\nimport torch\nimport torch.fx\nfrom torch.fx.node import Node... | diff --git a/fairscale/experimental/nn/auto_shard.py b/fairscale/experimental/nn/auto_shard.py
index 1810a1bf7..8866db267 100644
--- a/fairscale/experimental/nn/auto_shard.py
+++ b/fairscale/experimental/nn/auto_shard.py
@@ -52,8 +52,7 @@ def _split_nodes(traced_graph_module: torch.fx.GraphModule, shard_count: int = 3
... |
evennia__evennia-2000 | [BUG] `Msg` objects not rendering correctly with external sender
#### Describe the bug
The `Msg` object seems to make a presumption that senders will always have a `key` attribute when rendering the object for display.
#### To Reproduce
```
def test_render_external_sender(self):
from evennia.utils.create... | [
{
"content": "\"\"\"\nModels for the in-game communication system.\n\nThe comm system could take the form of channels, but can also be\nadopted for storing tells or in-game mail.\n\nThe comsystem's main component is the Message (Msg), which carries the\nactual information between two parties. Msgs are stored i... | [
{
"content": "\"\"\"\nModels for the in-game communication system.\n\nThe comm system could take the form of channels, but can also be\nadopted for storing tells or in-game mail.\n\nThe comsystem's main component is the Message (Msg), which carries the\nactual information between two parties. Msgs are stored i... | diff --git a/evennia/comms/models.py b/evennia/comms/models.py
index 8026a664ce0..886843b69d6 100644
--- a/evennia/comms/models.py
+++ b/evennia/comms/models.py
@@ -400,9 +400,10 @@ def __hide_from_del(self):
def __str__(self):
"This handles what is shown when e.g. printing the message"
- senders... |
TabbycatDebate__tabbycat-1477 | Improve feedback introduction/explanation
The current feedback introduction/explanation field only allows you to enter a "single" line of text rather than a paragraph of text.
It would be preferable to provide a richer text editor here to allow more instructions to be provided.
An inter-related issue would be all... | [
{
"content": "from django.core.validators import MinValueValidator, validate_slug\nfrom django.forms import ValidationError\nfrom django.utils.encoding import force_text\nfrom django.utils.translation import gettext_lazy as _\nfrom django_summernote.widgets import SummernoteWidget\nfrom dynamic_preferences.pref... | [
{
"content": "from django.core.validators import MinValueValidator, validate_slug\nfrom django.forms import ValidationError\nfrom django.utils.encoding import force_text\nfrom django.utils.translation import gettext_lazy as _\nfrom django_summernote.widgets import SummernoteWidget\nfrom dynamic_preferences.pref... | diff --git a/.github/CHANGELOG.rst b/.github/CHANGELOG.rst
index 5a7181a9af5..40fb8a4cdd2 100644
--- a/.github/CHANGELOG.rst
+++ b/.github/CHANGELOG.rst
@@ -10,6 +10,7 @@ Change Log
- Added support for Russian, and shortened the language selector
- Renamed 'test score' to 'base score', as well as 'venue' to 'room'
-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.