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 ⌀ |
|---|---|---|---|---|
conda__conda-build-3118 | Can't get conda index to work with channel_name
From the updated docs on 3.14.0, `channel_name` is now a positional argument. However, when I do
```bash
$ conda index <build_dir> <channel_name>
```
I get
```
(...)
FileNotFoundError: [Errno 2] No such file or directory: '<path_prefix>/<channel_name>'
```
instea... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport logging\nimport os\nimport sys\n\nfrom conda_build.conda_interface import ArgumentParser\n\nfrom conda_build import api\nfrom conda_build.index import DEFAULT_SUBDIRS, MAX_THREADS_DEFAULT\n\nlogging.basicConfig(level=loggin... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport logging\nimport os\nimport sys\n\nfrom conda_build.conda_interface import ArgumentParser\n\nfrom conda_build import api\nfrom conda_build.index import DEFAULT_SUBDIRS, MAX_THREADS_DEFAULT\n\nlogging.basicConfig(level=loggin... | diff --git a/conda_build/cli/main_index.py b/conda_build/cli/main_index.py
index d2663186b5..97ac3851e2 100644
--- a/conda_build/cli/main_index.py
+++ b/conda_build/cli/main_index.py
@@ -30,10 +30,8 @@ def parse_args(args):
package's metadata needs to be updated.""",
)
p.add_argument(
- 'chann... |
cupy__cupy-4509 | cupy.random.uniform(low=low, high=high) returns high
```python
import cupy as cp
cp.random.seed(seed=13)
high = 2**32 - 1
low = 2**32 - 3
size = 100000000
(cp.random.uniform(low=low, high=high, size=size) == high).sum()
```
returns `array(11)`, while `array(0)` is expected, as "Samples are drawn from a unifor... | [
{
"content": "import cupy\nfrom cupy.random import _generator\nfrom cupy import _util\n\n\n# TODO(beam2d): Implement many distributions\n\n\ndef beta(a, b, size=None, dtype=float):\n \"\"\"Beta distribution.\n\n Returns an array of samples drawn from the beta distribution. Its\n probability density fun... | [
{
"content": "import cupy\nfrom cupy.random import _generator\nfrom cupy import _util\n\n\n# TODO(beam2d): Implement many distributions\n\n\ndef beta(a, b, size=None, dtype=float):\n \"\"\"Beta distribution.\n\n Returns an array of samples drawn from the beta distribution. Its\n probability density fun... | diff --git a/cupy/random/_distributions.py b/cupy/random/_distributions.py
index c3364b6c56d..e6f022ad188 100644
--- a/cupy/random/_distributions.py
+++ b/cupy/random/_distributions.py
@@ -834,7 +834,8 @@ def uniform(low=0.0, high=1.0, size=None, dtype=float):
"""Returns an array of uniformly-distributed samples o... |
qutebrowser__qutebrowser-4296 | closing tab or opening it in background shows tab bar with tabs.show = never
Updated to new version. I dont use tab bar at all but now it always appears anytime I close tab or open a new tab in background.
| [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py
index 9a8fdbc6417..165052e7865 100644
--- a/qutebrowser/mainwindow/tabwidget.py
+++ b/qutebrowser/mainwindow/tabwidget.py
@@ -225,8 +225,8 @@ def _toggle_visibility(self):
non-visible. To avoid flickering, disable repaint up... |
mozilla__pontoon-2777 | Drop contributor profile URL with email addresses
We should drop support for accessing contributor profiles by using user email addresses in the URLs. This feature, while not used internally in the app, leaks otherwise hidden user email addressed on sites like on web.archive.org index.
This is particularly problemat... | [
{
"content": "from django.urls import path, register_converter\nfrom django.urls.converters import StringConverter\nfrom django.views.generic import RedirectView\n\nfrom . import views\n\n\nclass EmailConverter(StringConverter):\n regex = r\"[\\w.%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}\"\n\n\nclass UsernameConv... | [
{
"content": "from django.urls import path, register_converter\nfrom django.urls.converters import StringConverter\nfrom django.views.generic import RedirectView\n\nfrom . import views\n\n\nclass EmailConverter(StringConverter):\n regex = r\"[\\w.%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}\"\n\n\nclass UsernameConv... | diff --git a/pontoon/contributors/tests/test_views.py b/pontoon/contributors/tests/test_views.py
index 02e39c0caf..fb77aa3bb3 100644
--- a/pontoon/contributors/tests/test_views.py
+++ b/pontoon/contributors/tests/test_views.py
@@ -142,14 +142,6 @@ def test_profile_view_contributor_profile_by_username(member, mock_profi... |
tensorflow__tfx-3864 | Update tensorflow-hub requirement to allow 0.12.0?
If the feature is related to a specific library below, please raise an issue in
the respective repo directly:
[TensorFlow Data Validation Repo](https://github.com/tensorflow/data-validation/issues)
[TensorFlow Model Analysis Repo](https://github.com/tensorflow/m... | [
{
"content": "# Copyright 2019 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | [
{
"content": "# Copyright 2019 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | diff --git a/RELEASE.md b/RELEASE.md
index aade7d78ac..0eae3f8d2d 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -66,6 +66,7 @@
* Depends on `tensorflow-serving-api>=1.15,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3`.
* Depends on `tensorflow-transform>=1.0.0,<1.1.0`.
* Depends on `tfx-bsl>=1.0.0,<1.1.0`.
+* Depe... |
django-cms__django-filer-521 | make_folder without _popup= argument causes a 500 error
The make_folder view generates a 500 error when no arguments are passed to it (specifically the _popup=1). I believe that this is because the admin/filer/folder/new_folder_form.html template, which inherits admin/change_form.html, does not have opts defined in i... | [
{
"content": "#-*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django import forms\nfrom django.contrib.admin import widgets\nfrom django.contrib.auth.decorators import login_required\nfrom django.core.exceptions import PermissionDenied\nfrom django.http import HttpResponseRedirect\nfrom ... | [
{
"content": "#-*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django import forms\nfrom django.contrib.admin import widgets\nfrom django.contrib.auth.decorators import login_required\nfrom django.core.exceptions import PermissionDenied\nfrom django.http import HttpResponseRedirect\nfrom ... | diff --git a/filer/tests/admin.py b/filer/tests/admin.py
index 04ddb76d6..62cdae411 100644
--- a/filer/tests/admin.py
+++ b/filer/tests/admin.py
@@ -36,6 +36,10 @@ def test_filer_make_root_folder_get(self):
response = self.client.get(reverse('admin:filer-directory_listing-make_root_folder')+"?_popup=1")
... |
mitmproxy__mitmproxy-5695 | mitmdump jumps to 100% CPU when parent process exits
#### Problem Description
It took me two days to make this reproduce in isolation. I hope someone with Python skills can figure out what is happening here. Depending on what the root cause is this might not even be related to my funny architecture.
I'm spawning ... | [
{
"content": "from __future__ import annotations\nimport asyncio\nimport logging\nfrom typing import IO\n\nimport sys\n\nfrom mitmproxy import ctx, log\nfrom mitmproxy.utils import vt_codes\n\n\nclass TermLog:\n def __init__(\n self,\n out: IO[str] | None = None\n ):\n self.logger = T... | [
{
"content": "from __future__ import annotations\nimport asyncio\nimport logging\nfrom typing import IO\n\nimport sys\n\nfrom mitmproxy import ctx, log\nfrom mitmproxy.utils import vt_codes\n\n\nclass TermLog:\n def __init__(\n self,\n out: IO[str] | None = None\n ):\n self.logger = T... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9c2cf20f1e..64d70370f0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
## Unreleased: mitmproxy next
+* Hard exit when mitmproxy cannot write logs, fixes endless loop when parent process exits
+ ([#4669](https://github.com/mitmproxy/mitmproxy/issues/4669... |
espnet__espnet-3149 | Espnet2 ASR DataParallel API mismatching?
In `espnet/espnet2/train/trainer.py:250,17`
It seems that `torch.nn.parallel.DataParallel` doesn't have a parameter `find_unused_parameters`.
Is it a bug?
| [
{
"content": "import argparse\nfrom contextlib import contextmanager\nimport dataclasses\nfrom dataclasses import is_dataclass\nfrom distutils.version import LooseVersion\nimport logging\nfrom pathlib import Path\nimport time\nfrom typing import Dict\nfrom typing import Iterable\nfrom typing import List\nfrom t... | [
{
"content": "import argparse\nfrom contextlib import contextmanager\nimport dataclasses\nfrom dataclasses import is_dataclass\nfrom distutils.version import LooseVersion\nimport logging\nfrom pathlib import Path\nimport time\nfrom typing import Dict\nfrom typing import Iterable\nfrom typing import List\nfrom t... | diff --git a/espnet2/train/trainer.py b/espnet2/train/trainer.py
index 019c93e385b..5d86bbb7d45 100644
--- a/espnet2/train/trainer.py
+++ b/espnet2/train/trainer.py
@@ -247,7 +247,6 @@ def run(
dp_model = torch.nn.parallel.DataParallel(
model,
device_ids=list(range(distrib... |
sosreport__sos-3458 | [transport] saltstack causes a final error trying to parse the package list from down nodes
Down nodes for saltstack transport cause a final error for each down host after not being able to connect early on.
Similar to the control_persist transport error:
```
[store-2:__init__] Unable to open remote session: Timeo... | [
{
"content": "# Copyright Red Hat 2022, Trevor Benson <trevor.benson@gmail.com>\n\n# This file is part of the sos project: https://github.com/sosreport/sos\n#\n# This copyrighted material is made available to anyone wishing to use,\n# modify, copy, or redistribute it subject to the terms and conditions of\n# ve... | [
{
"content": "# Copyright Red Hat 2022, Trevor Benson <trevor.benson@gmail.com>\n\n# This file is part of the sos project: https://github.com/sosreport/sos\n#\n# This copyrighted material is made available to anyone wishing to use,\n# modify, copy, or redistribute it subject to the terms and conditions of\n# ve... | diff --git a/sos/collector/transports/saltstack.py b/sos/collector/transports/saltstack.py
index 3691a36392..f0660c8aa1 100644
--- a/sos/collector/transports/saltstack.py
+++ b/sos/collector/transports/saltstack.py
@@ -106,6 +106,8 @@ def _connect(self, password=None):
self.log_info("Transport is locally suppo... |
flask-admin__flask-admin-412 | Peewee: InlineModelFormList initialises InlineModelFormField with 3 positional args, but only 2 are allowed
When adding a simple inline model to my Peewee modelview, flask-admin threw a "wrong-number-of-arguments" error at me.
I tracked the cause down: [peewee/forms.py, L35](https://github.com/mrjoes/flask-admin/blob/... | [
{
"content": "from wtforms import fields\n\nfrom peewee import (DateTimeField, DateField, TimeField,\n PrimaryKeyField, ForeignKeyField, BaseModel)\n\nfrom wtfpeewee.orm import ModelConverter, model_form\n\nfrom flask.ext.admin import form\nfrom flask.ext.admin._compat import iteritems, iterv... | [
{
"content": "from wtforms import fields\n\nfrom peewee import (DateTimeField, DateField, TimeField,\n PrimaryKeyField, ForeignKeyField, BaseModel)\n\nfrom wtfpeewee.orm import ModelConverter, model_form\n\nfrom flask.ext.admin import form\nfrom flask.ext.admin._compat import iteritems, iterv... | diff --git a/flask_admin/contrib/peewee/form.py b/flask_admin/contrib/peewee/form.py
index b071c3b53..ab7265d8c 100644
--- a/flask_admin/contrib/peewee/form.py
+++ b/flask_admin/contrib/peewee/form.py
@@ -31,8 +31,7 @@ def __init__(self, form, model, prop, inline_view, **kwargs):
self.inline_view = inline_view... |
webkom__lego-2085 | Emails should contain a link to edit email preferences
Should be to just add a link to the base email template, as well as add a link to mails sent by restricted.
| [
{
"content": "from copy import deepcopy\nfrom email.message import Message\nfrom email.mime.text import MIMEText\n\nfrom django.conf import settings\nfrom django.core.mail import get_connection\n\nfrom channels.db import database_sync_to_async\nfrom structlog import get_logger\n\nfrom lego.apps.action_handlers.... | [
{
"content": "from copy import deepcopy\nfrom email.message import Message\nfrom email.mime.text import MIMEText\n\nfrom django.conf import settings\nfrom django.core.mail import get_connection\n\nfrom structlog import get_logger\n\nfrom lego.apps.action_handlers.registry import get_handler\nfrom lego.apps.rest... | diff --git a/lego/apps/restricted/message_processor.py b/lego/apps/restricted/message_processor.py
index 7c420ddf5..1ec4ee933 100644
--- a/lego/apps/restricted/message_processor.py
+++ b/lego/apps/restricted/message_processor.py
@@ -149,6 +149,9 @@ def decorate(message, hide_sender, sender):
)
els... |
kymatio__kymatio-310 | BUG Encoding issues
I'm getting encoding issues when trying to build the docs (on my laptop [Ubuntu], but not on my desktop [CentOS]). Looks like the reason is that someone has accents in their name...
One solution would be to explicitly define the source files to be UTF-8 (which they are, from what I understand). A... | [
{
"content": "#!/usr/bin/env python\nimport csv\nimport importlib\nimport os\nimport shutil\nimport sys\nfrom setuptools import setup, find_packages\n\n# Constants\nDISTNAME = 'kymatio'\nDESCRIPTION = 'Wavelet scattering transforms in Python with GPU acceleration'\nURL = 'https://www.kymat.io'\nLICENSE = 'BSD-3... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport csv\nimport importlib\nimport os\nimport shutil\nimport sys\nfrom setuptools import setup, find_packages\n\n# Constants\nDISTNAME = 'kymatio'\nDESCRIPTION = 'Wavelet scattering transforms in Python with GPU acceleration'\nURL = 'https://www.... | diff --git a/kymatio/scattering1d/scattering1d.py b/kymatio/scattering1d/scattering1d.py
index bd911c9f4..dd8b801f3 100644
--- a/kymatio/scattering1d/scattering1d.py
+++ b/kymatio/scattering1d/scattering1d.py
@@ -1,5 +1,5 @@
-# Authors: Mathieu Andreux, Joakim Andén, Edouard Oyallon
-# Scientific Ancestry: Joakim Andén... |
dbt-labs__dbt-core-2407 | Running dbt with a duplicate test name gives an unhelpful error
### Describe the bug
Running `dbt run` when there are multiple tests with the same name leads to an unhelpful error `local variable 'get_func' referenced before assignment`
### Steps To Reproduce
1. Create two tests with the same name (in different fo... | [
{
"content": "import builtins\nimport functools\nfrom typing import NoReturn, Optional, Mapping, Any\n\nfrom dbt.logger import GLOBAL_LOGGER as logger\nfrom dbt.node_types import NodeType\nimport dbt.flags\n\nimport hologram\n\n\ndef validator_error_message(exc):\n \"\"\"Given a hologram.ValidationError (whi... | [
{
"content": "import builtins\nimport functools\nfrom typing import NoReturn, Optional, Mapping, Any\n\nfrom dbt.logger import GLOBAL_LOGGER as logger\nfrom dbt.node_types import NodeType\nimport dbt.flags\n\nimport hologram\n\n\ndef validator_error_message(exc):\n \"\"\"Given a hologram.ValidationError (whi... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5f7a2387daf..2c0b12568f0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
### Fixes
- When tracking is disabled due to errors, do not reset the invocation ID ([#2398](https://github.com/fishtown-analytics/dbt/issues/2398), [#2400](https://github.com/fishtow... |
googleapis__python-bigquery-964 | feat: repr of QueryJob (and other jobs) should include job reference info (project ID, location, job ID)
Without a job ID, there's not much I can do to follow-up with an investigation into test flakes. Project ID, location, and job ID are the first things backend engineers request if there is a problem with a query job... | [
{
"content": "# Copyright 2015 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
{
"content": "# Copyright 2015 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | diff --git a/google/cloud/bigquery/job/base.py b/google/cloud/bigquery/job/base.py
index e5fc592a6..72db5a63c 100644
--- a/google/cloud/bigquery/job/base.py
+++ b/google/cloud/bigquery/job/base.py
@@ -722,6 +722,14 @@ def cancelled(self):
and self.error_result.get("reason") == _STOPPED_REASON
)
... |
jupyterhub__jupyterhub-3293 | AttributeError: 'Service' object has no attribute 'groups'
Hi,
[Running 1.2.0b1]
I am running the following code in a service to get information about my user:
```py
import requests
api_url = os.environ['JUPYTERHUB_API_URL']
api_token = os.environ['JUPYTERHUB_API_TOKEN']
r = requests.get(api_url + '/user', h... | [
{
"content": "\"\"\"User handlers\"\"\"\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport asyncio\nimport json\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom datetime import timezone\n\nfrom async_generator import aclosing\nfrom ... | [
{
"content": "\"\"\"User handlers\"\"\"\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport asyncio\nimport json\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom datetime import timezone\n\nfrom async_generator import aclosing\nfrom ... | diff --git a/jupyterhub/apihandlers/users.py b/jupyterhub/apihandlers/users.py
index 0297537110..f427455dec 100644
--- a/jupyterhub/apihandlers/users.py
+++ b/jupyterhub/apihandlers/users.py
@@ -36,7 +36,11 @@ async def get(self):
user = self.get_current_user_oauth_token()
if user is None:
... |
DjangoGirls__djangogirls-922 | AttributeError: 'str' object has no attribute 'year'
Sentry Issue: [DJANGO-GIRLS-WEBSITE-5V](https://django-girls.sentry.io/issues/4544799187/?referrer=github_integration)
```
AttributeError: 'str' object has no attribute 'year'
(1 additional frame(s) were not displayed)
...
File "applications/views.py", line 21, in... | [
{
"content": "from datetime import date, datetime, timedelta\n\nimport requests\nfrom django.utils import timezone\nfrom django_date_extensions.fields import ApproximateDate\n\nfrom .models import Event\n\nNOMINATIM_URL = \"https://nominatim.openstreetmap.org/search\"\n\n\ndef get_coordinates_for_city(city, cou... | [
{
"content": "from datetime import date, datetime, timedelta\n\nimport requests\nfrom django.utils import timezone\nfrom django_date_extensions.fields import ApproximateDate\n\nfrom .models import Event\n\nNOMINATIM_URL = \"https://nominatim.openstreetmap.org/search\"\n\n\ndef get_coordinates_for_city(city, cou... | diff --git a/core/utils.py b/core/utils.py
index b6800a327..3d5963c8a 100644
--- a/core/utils.py
+++ b/core/utils.py
@@ -31,7 +31,10 @@ def get_event(page_url, is_user_authenticated, is_preview):
event = Event.objects.filter(page_url=page_url).order_by("-date").first()
if not (is_user_authenticated or i... |
xonsh__xonsh-3307 | xonsh should return a non-zero exit code when a script cannot be found
Currently xonsh returns a zero exit code when the script cannot be found:
```
$ xonsh xx.xsh && echo "OK"
xonsh: xx.xsh: No such file or directory.
OK
```
That seems like a bug. Compared to bash, which returns a non-zero exit code:
```
$ bas... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"The main xonsh script.\"\"\"\nimport os\nimport sys\nimport enum\nimport argparse\nimport builtins\nimport contextlib\nimport signal\nimport traceback\n\nfrom xonsh import __version__\nfrom xonsh.timings import setup_timings\nfrom xonsh.lazyasd import lazyobject\nfro... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"The main xonsh script.\"\"\"\nimport os\nimport sys\nimport enum\nimport argparse\nimport builtins\nimport contextlib\nimport signal\nimport traceback\n\nfrom xonsh import __version__\nfrom xonsh.timings import setup_timings\nfrom xonsh.lazyasd import lazyobject\nfro... | diff --git a/news/fnf_exit_1.rst b/news/fnf_exit_1.rst
new file mode 100644
index 0000000000..b23582d12d
--- /dev/null
+++ b/news/fnf_exit_1.rst
@@ -0,0 +1,31 @@
+**Added:**
+
+* <news item>
+
+**Changed:**
+
+* <news item>
+
+**Deprecated:**
+
+* <news item>
+
+**Removed:**
+
+* <news item>
+
+**Fixed:**
+
+* ``xonsh`... |
getredash__redash-4638 | error running query : ** '>' is not supported between instance of NoneType and 'int'
Issue Summary:
Database = Oracle 12c
`select count(*) from table `
throwing the following error
`error running query : ** '>' is not supported between instance of NoneType and 'int'`
Redash v9.0.0-alpha(dev)
| [
{
"content": "import logging\n\nfrom redash.utils import json_dumps, json_loads\nfrom redash.query_runner import *\n\ntry:\n import cx_Oracle\n\n TYPES_MAP = {\n cx_Oracle.DATETIME: TYPE_DATETIME,\n cx_Oracle.CLOB: TYPE_STRING,\n cx_Oracle.LOB: TYPE_STRING,\n cx_Oracle.FIXED_CH... | [
{
"content": "import logging\n\nfrom redash.utils import json_dumps, json_loads\nfrom redash.query_runner import *\n\ntry:\n import cx_Oracle\n\n TYPES_MAP = {\n cx_Oracle.DATETIME: TYPE_DATETIME,\n cx_Oracle.CLOB: TYPE_STRING,\n cx_Oracle.LOB: TYPE_STRING,\n cx_Oracle.FIXED_CH... | diff --git a/redash/query_runner/oracle.py b/redash/query_runner/oracle.py
index 4a675836e4..e079c297a7 100644
--- a/redash/query_runner/oracle.py
+++ b/redash/query_runner/oracle.py
@@ -35,7 +35,11 @@ class Oracle(BaseSQLQueryRunner):
@classmethod
def get_col_type(cls, col_type, scale):
if col_type ... |
projectmesa__mesa-1697 | Fix codespell build for tutorial docs
Not sure if this is possible, but codespell will pick up image text and try to suggest text edits and says the build is broken.
Hoping there is a setting somewhere that we can add to ignore the image text.
Here is an example: https://github.com/projectmesa/mesa/pull/1656/file... | [
{
"content": "#!/usr/bin/env python\nimport os\nimport re\nimport shutil\nimport urllib.request\nimport zipfile\nfrom codecs import open\n\nfrom setuptools import find_packages, setup\n\nrequires = [\"click\", \"cookiecutter\", \"networkx\", \"numpy\", \"pandas\", \"tornado\", \"tqdm\"]\n\nextras_require = {\n ... | [
{
"content": "#!/usr/bin/env python\nimport os\nimport re\nimport shutil\nimport urllib.request\nimport zipfile\nfrom codecs import open\n\nfrom setuptools import find_packages, setup\n\nrequires = [\"click\", \"cookiecutter\", \"networkx\", \"numpy\", \"pandas\", \"tornado\", \"tqdm\"]\n\nextras_require = {\n ... | diff --git a/docs/README.md b/docs/README.md
index 854106731c6..0a85e858703 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -9,21 +9,13 @@ This folder contains the docs that build the docs for the core mesa code on read
Updating docs can be confusing. Here are the basic setups.
-#### Create the rST files from ... |
napari__napari-1757 | Bug with non-orthogonal slicing
## 🐛 Bug
As was maybe feared, we've got some problems with our non-orthogonal slicing during real world usage. I'm looking at some light sheet data - script is a follows
```python
import numpy as np
import napari
from napari.utils.transforms import shear_matrix_from_angle
from... | [
{
"content": "import itertools\nimport warnings\nfrom typing import List, Optional\n\nimport numpy as np\n\nfrom ..layers import Layer\nfrom ..utils.list import ListModel\nfrom ..utils.naming import inc_name_count\n\n\ndef _add(event):\n \"\"\"When a layer is added, set its name.\"\"\"\n layers = event.so... | [
{
"content": "import itertools\nimport warnings\nfrom typing import List, Optional\n\nimport numpy as np\n\nfrom ..layers import Layer\nfrom ..utils.list import ListModel\nfrom ..utils.naming import inc_name_count\n\n\ndef _add(event):\n \"\"\"When a layer is added, set its name.\"\"\"\n layers = event.so... | diff --git a/napari/components/_tests/test_layers_list.py b/napari/components/_tests/test_layers_list.py
index 8b676dfc8e0..7f29952e84b 100644
--- a/napari/components/_tests/test_layers_list.py
+++ b/napari/components/_tests/test_layers_list.py
@@ -578,6 +578,22 @@ def test_world_extent_mixed_ndim():
np.testing.as... |
enthought__chaco-892 | traits.trait_errors.TraitError: Cannot set the undefined 'format' attribute of a 'RangeEditor' object. when running chaco/chaco/examples/demo/nonlinear_color_mapping.py
**Problem Description**
When running example chaco/chaco/examples/demo/nonlinear_color_mapping.py, a traits.trait_errors.TraitError: Cannot set the un... | [
{
"content": "#!/usr/bin/env python\n\"\"\"\n Demonstrates usage of the TransformColorMapper class.\n - The colorbar is zoomable and panable.\n\"\"\"\n\n# Major library imports\nfrom numpy import linspace, meshgrid, pi, cos, sin, log10\n\n# Enthought library imports\nfrom enable.api import Component, Comp... | [
{
"content": "#!/usr/bin/env python\n\"\"\"\n Demonstrates usage of the TransformColorMapper class.\n - The colorbar is zoomable and panable.\n\"\"\"\n\n# Major library imports\nfrom numpy import linspace, meshgrid, pi, cos, sin, log10\n\n# Enthought library imports\nfrom enable.api import Component, Comp... | diff --git a/chaco/examples/demo/nonlinear_color_mapping.py b/chaco/examples/demo/nonlinear_color_mapping.py
index 492bec86c..569e4bf9e 100644
--- a/chaco/examples/demo/nonlinear_color_mapping.py
+++ b/chaco/examples/demo/nonlinear_color_mapping.py
@@ -195,7 +195,7 @@ class DataGridView(HasTraits):
Item("c... |
Lightning-AI__pytorch-lightning-1954 | `TrainerDDPMixin.resolve_root_node_address` fails if the host name contains a dash
## 🐛 Bug
When running under SLURM, if the nodes host names contains `-`, `MASTER_ADDR` omits the number part of the master host name (which of course makes everything else fail).
if `MASTER_ADDR` is not given, pl infers it from th... | [
{
"content": "\"\"\"\nLightning supports model training on a cluster managed by SLURM in the following cases:\n\n1. Training on a single cpu or single GPU.\n2. Train on multiple GPUs on the same node using DataParallel or DistributedDataParallel\n3. Training across multiple GPUs on multiple different nodes via ... | [
{
"content": "\"\"\"\nLightning supports model training on a cluster managed by SLURM in the following cases:\n\n1. Training on a single cpu or single GPU.\n2. Train on multiple GPUs on the same node using DataParallel or DistributedDataParallel\n3. Training across multiple GPUs on multiple different nodes via ... | diff --git a/pytorch_lightning/trainer/distrib_data_parallel.py b/pytorch_lightning/trainer/distrib_data_parallel.py
index 3844896ba2e90..34c0404fefe7c 100644
--- a/pytorch_lightning/trainer/distrib_data_parallel.py
+++ b/pytorch_lightning/trainer/distrib_data_parallel.py
@@ -426,8 +426,8 @@ def load_spawn_weights(self... |
google-deepmind__optax-329 | `_bias_correction` forces recompilation of `integer_pow`
This might be related to #197, but I don't have enough knowledge to confirm it.
In short, while using `optax` with `flax.linen`, `optimizer.update` forces jit-recompilation of the `integer_pow` jax primitive.
I get these results on a GPU backend.
```python... | [
{
"content": "# Copyright 2019 DeepMind Technologies Limited. 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/LICEN... | [
{
"content": "# Copyright 2019 DeepMind Technologies Limited. 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/LICEN... | diff --git a/optax/_src/transform.py b/optax/_src/transform.py
index 15ad3392d..268730dd7 100644
--- a/optax/_src/transform.py
+++ b/optax/_src/transform.py
@@ -109,9 +109,8 @@ def orderth_norm(g):
def bias_correction(moment, decay, count):
"""Perform bias correction. This becomes a no-op as count goes to infinit... |
Showndarya__Hacktoberfest-545 | Make JSON linting more verbose ?
Currently we simply check :
1. json is valid
2. json contains the keys we want
3. those keys are not empty
the problem is with step 1, it's not very helpful if people have no idea what the JSON spec is.
One fix is :
1. add a link to jsonlint.com or such a service in the print ... | [
{
"content": "import json\nimport os\nimport re\nimport subprocess\n\n# Get a diff between master and current.\ntry:\n commit_range = os.environ[\"TRAVIS_COMMIT_RANGE\"]\n changed_files = subprocess.check_output([\"git\", \"diff\", \"--name-only\", commit_range])\nexcept KeyError:\n print(\"🔥 This sho... | [
{
"content": "import json\nimport os\nimport re\nimport subprocess\n\n# Get a diff between master and current.\ntry:\n commit_range = os.environ[\"TRAVIS_COMMIT_RANGE\"]\n changed_files = subprocess.check_output([\"git\", \"diff\", \"--name-only\", commit_range])\nexcept KeyError:\n print(\"🔥 This sho... | diff --git a/.travis.py b/.travis.py
index 5150dbcd3..f7544e3d9 100644
--- a/.travis.py
+++ b/.travis.py
@@ -34,7 +34,7 @@
file_content = json.loads(data_file.read())
except json.decoder.JSONDecodeError:
there_was_an_error = True
- print("🔥 JSON could not be parsed.")
+ print(f... |
pymedusa__Medusa-6822 | [Medusa WebUI Crashes] Uncaught exception in APIv2: UnboundLocalError("local variable 'show_dir' referenced before assignment")
**Describe the bug**
Medusa tornado services crashes after refreshing files from any show, it medusa continues to run in background but all WebUI access is dead keeps saying unable to connect... | [
{
"content": "# coding=utf-8\n\"\"\"Helper functions to get info about running schedulers.\"\"\"\nfrom __future__ import unicode_literals\n\nfrom medusa import app\nfrom medusa.generic_queue import QueuePriorities\nfrom medusa.helpers.utils import timedelta_in_milliseconds\nfrom medusa.show_queue import ShowQue... | [
{
"content": "# coding=utf-8\n\"\"\"Helper functions to get info about running schedulers.\"\"\"\nfrom __future__ import unicode_literals\n\nfrom medusa import app\nfrom medusa.generic_queue import QueuePriorities\nfrom medusa.helpers.utils import timedelta_in_milliseconds\nfrom medusa.show_queue import ShowQue... | diff --git a/medusa/system/schedulers.py b/medusa/system/schedulers.py
index 08998ab10d..3cbd0e2896 100644
--- a/medusa/system/schedulers.py
+++ b/medusa/system/schedulers.py
@@ -131,7 +131,9 @@ def generate_show_queue():
if not app.show_queue_scheduler:
return []
- queue = app.show_queue_scheduler.a... |
mlflow__mlflow-9536 | [BUG] basic-auth init on remote database
### Describe the problem
Same issue #9399 happened when trying to initialize database which invokes this function [migrate_if_needed](https://github.com/mlflow/mlflow/blob/master/mlflow/server/auth/db/utils.py#L30)
Suggestion: Apply the same fix #9410 to force SqlAlchemy t... | [
{
"content": "from pathlib import Path\n\nfrom alembic.command import upgrade\nfrom alembic.config import Config\nfrom alembic.migration import MigrationContext\nfrom alembic.script import ScriptDirectory\nfrom sqlalchemy.engine.base import Engine\n\n\ndef _get_alembic_dir() -> str:\n return Path(__file__).p... | [
{
"content": "from pathlib import Path\n\nfrom alembic.command import upgrade\nfrom alembic.config import Config\nfrom alembic.migration import MigrationContext\nfrom alembic.script import ScriptDirectory\nfrom sqlalchemy.engine.base import Engine\n\n\ndef _get_alembic_dir() -> str:\n return Path(__file__).p... | diff --git a/mlflow/server/auth/db/utils.py b/mlflow/server/auth/db/utils.py
index 0c0a5beded89c..6f15fd0c56423 100644
--- a/mlflow/server/auth/db/utils.py
+++ b/mlflow/server/auth/db/utils.py
@@ -28,7 +28,7 @@ def migrate(engine: Engine, revision: str) -> None:
def migrate_if_needed(engine: Engine, revision: str)... |
Parsl__parsl-930 | Log app args
For easier debugging, we should log the arguments apps are called with.
Requested by @mjwilde
| [
{
"content": "import logging\nfrom functools import update_wrapper\nfrom inspect import signature, Parameter\n\nfrom parsl.app.errors import wrap_error\nfrom parsl.app.futures import DataFuture\nfrom parsl.app.app import AppBase\nfrom parsl.dataflow.dflow import DataFlowKernelLoader\n\nlogger = logging.getLogge... | [
{
"content": "import logging\nfrom functools import update_wrapper\nfrom inspect import signature, Parameter\n\nfrom parsl.app.errors import wrap_error\nfrom parsl.app.futures import DataFuture\nfrom parsl.app.app import AppBase\nfrom parsl.dataflow.dflow import DataFlowKernelLoader\n\nlogger = logging.getLogge... | diff --git a/parsl/app/bash.py b/parsl/app/bash.py
index 604245d8d0..6cc19fe788 100644
--- a/parsl/app/bash.py
+++ b/parsl/app/bash.py
@@ -77,6 +77,9 @@ def open_std_fd(fdname):
std_err = open_std_fd('stderr')
timeout = kwargs.get('walltime')
+ if std_err is not None:
+ print('--> executable follo... |
microsoft__ptvsd-1079 | Jython - Internal error detected.
@kostermw commented on [Sat Dec 15 2018](https://github.com/Microsoft/vscode-python/issues/3715)
<!--
Do you have a question instead of a bug report or enhancement request? Please ask it on https://stackoverflow.com/questions/tagged/visual-studio-code+python.
Unable to install a... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See LICENSE in the project root\n# for license information.\n\nimport atexit\nimport os\nimport platform\nimport signal\n\n\nclass AlreadyInstalledError(RuntimeError):\n \"\"\"Exit handlers were alrea... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See LICENSE in the project root\n# for license information.\n\nimport atexit\nimport os\nimport platform\nimport signal\n\n\nclass AlreadyInstalledError(RuntimeError):\n \"\"\"Exit handlers were alrea... | diff --git a/src/ptvsd/exit_handlers.py b/src/ptvsd/exit_handlers.py
index 95a49c62d..3ca963183 100644
--- a/src/ptvsd/exit_handlers.py
+++ b/src/ptvsd/exit_handlers.py
@@ -28,7 +28,7 @@ def kill_current_proc(signum=signal.SIGTERM):
class ExitHandlers(object):
"""Manages signal and atexit handlers."""
- if p... |
pytorch__audio-940 | Out of date link to librosa
https://pytorch.org/audio/transforms.html
There is a link in the description of AmplitudeToDB
https://librosa.github.io/librosa/_modules/librosa/core/spectrum.html
This link no longer works
| [
{
"content": "# -*- coding: utf-8 -*-\n\nimport math\nfrom typing import Callable, Optional\nfrom warnings import warn\n\nimport torch\nfrom torch import Tensor\nfrom torchaudio import functional as F\nfrom torchaudio.compliance import kaldi\n\n\n__all__ = [\n 'Spectrogram',\n 'GriffinLim',\n 'Amplitud... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport math\nfrom typing import Callable, Optional\nfrom warnings import warn\n\nimport torch\nfrom torch import Tensor\nfrom torchaudio import functional as F\nfrom torchaudio.compliance import kaldi\n\n\n__all__ = [\n 'Spectrogram',\n 'GriffinLim',\n 'Amplitud... | diff --git a/torchaudio/transforms.py b/torchaudio/transforms.py
index ef0a58e637..2e7e4f37ee 100644
--- a/torchaudio/transforms.py
+++ b/torchaudio/transforms.py
@@ -198,7 +198,8 @@ def __init__(self, stype: str = 'power', top_db: Optional[float] = None) -> None
def forward(self, x: Tensor) -> Tensor:
... |
biopython__biopython-583 | Genepop parsing error
Currently, when using the example stated in the [wiki](http://biopython.org/wiki/PopGen_Genepop) for controlling Genpop, at least one of the example fails:
`loci_map = ctrl.test_hw_pop(1, "excess")`
The error is the following:
``` python
Traceback (most recent call last):
File "BioGenepop.py"... | [
{
"content": "# Copyright 2009 by Tiago Antao <tiagoantao@gmail.com>. All rights reserved.\n# This code is part of the Biopython distribution and governed by its\n# license. Please see the LICENSE file that should have been included\n# as part of this package.\n\n\"\"\"\nThis module allows to control GenePop.... | [
{
"content": "# Copyright 2009 by Tiago Antao <tiagoantao@gmail.com>. All rights reserved.\n# This code is part of the Biopython distribution and governed by its\n# license. Please see the LICENSE file that should have been included\n# as part of this package.\n\n\"\"\"\nThis module allows to control GenePop.... | diff --git a/Bio/PopGen/GenePop/Controller.py b/Bio/PopGen/GenePop/Controller.py
index a2ee5606b94..5c9c574ed74 100644
--- a/Bio/PopGen/GenePop/Controller.py
+++ b/Bio/PopGen/GenePop/Controller.py
@@ -122,7 +122,7 @@ def _hw_func(stream, is_locus, has_fisher=False):
# loci might mean pop if hook="Locus "
... |
zostera__django-bootstrap4-135 | XSS in placeholder values
Placeholder values are run through `mark_safe` when building form widgets. That's not a good idea, as it permits XSS content. As placeholders are often generated automatically from labels, and labels are properly escaped, this is unexpected behaviour.
This behaviour was introduced in 5b98fd... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\ntry:\n # If Django is set up without a database, importing this widget gives RuntimeError\n from django.contrib.auth.forms import ReadOnlyPasswordHashWidget\nexcept RuntimeError:\n ReadOnlyPasswordHashWidget = None\n\nfro... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\ntry:\n # If Django is set up without a database, importing this widget gives RuntimeError\n from django.contrib.auth.forms import ReadOnlyPasswordHashWidget\nexcept RuntimeError:\n ReadOnlyPasswordHashWidget = None\n\nfro... | diff --git a/bootstrap4/renderers.py b/bootstrap4/renderers.py
index afe4e514..0574ac3b 100644
--- a/bootstrap4/renderers.py
+++ b/bootstrap4/renderers.py
@@ -266,7 +266,7 @@ def __init__(self, field, *args, **kwargs):
# Or just set it to empty
self.placeholder = ""
if self.placeholde... |
pyodide__pyodide-689 | Typo?
Wondering what "wv" means or if this should read "more complex things."
https://github.com/iodide-project/pyodide/blob/163ab43b64180223d010cdcdcdecd17307cc5a45/pyodide_build/mkpkg.py#L77-L79
| [
{
"content": "#!/usr/bin/env python3\n\nimport argparse\nimport json\nimport os\nimport shutil\nimport urllib.request\nfrom pathlib import Path\n\nPACKAGES_ROOT = Path(__file__).parent.parent / 'packages'\n\nSDIST_EXTENSIONS = []\n\n\ndef get_sdist_extensions():\n if SDIST_EXTENSIONS:\n return SDIST_E... | [
{
"content": "#!/usr/bin/env python3\n\nimport argparse\nimport json\nimport os\nimport shutil\nimport urllib.request\nfrom pathlib import Path\n\nPACKAGES_ROOT = Path(__file__).parent.parent / 'packages'\n\nSDIST_EXTENSIONS = []\n\n\ndef get_sdist_extensions():\n if SDIST_EXTENSIONS:\n return SDIST_E... | diff --git a/pyodide_build/mkpkg.py b/pyodide_build/mkpkg.py
index b2990d1be09..93f0d015414 100755
--- a/pyodide_build/mkpkg.py
+++ b/pyodide_build/mkpkg.py
@@ -75,7 +75,7 @@ def make_package(package, version=None):
def make_parser(parser):
parser.description = '''
Make a new pyodide package. Creates a simple te... |
pre-commit__pre-commit-803 | `stages: [commit]` hooks will run with `pre-commit run otherhookid`
minor logic bug, good new-contributor ticket
Easy to reproduce on pre-commit itself:
```diff
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index a146bd2..7bb382d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.y... | [
{
"content": "from __future__ import unicode_literals\n\nimport logging\nimport os\nimport re\nimport subprocess\nimport sys\n\nfrom identify.identify import tags_from_path\n\nfrom pre_commit import color\nfrom pre_commit import git\nfrom pre_commit import output\nfrom pre_commit.output import get_hook_message\... | [
{
"content": "from __future__ import unicode_literals\n\nimport logging\nimport os\nimport re\nimport subprocess\nimport sys\n\nfrom identify.identify import tags_from_path\n\nfrom pre_commit import color\nfrom pre_commit import git\nfrom pre_commit import output\nfrom pre_commit.output import get_hook_message\... | diff --git a/pre_commit/commands/run.py b/pre_commit/commands/run.py
index b1549d413..dbf564102 100644
--- a/pre_commit/commands/run.py
+++ b/pre_commit/commands/run.py
@@ -256,7 +256,7 @@ def run(runner, store, args, environ=os.environ):
for _, hook in repo.hooks:
if (
... |
mindsdb__lightwood-40 | ModuleNotFoundError: No module named '_lzma'
I've tried to test lightwood with [home rentals
example](https://github.com/mindsdb/lightwood/blob/master/docs/examples/home_rentals.py) but got ModuleNotFoundError: No module named '_lzma'.
Screenshot:
.
| [
{
"content": "from setuptools import setup\nfrom setuptools import find_packages\n\n\nversion = '0.26.0.dev0'\n\n# Remember to update local-oldest-requirements.txt when changing the minimum\n# acme/certbot version.\ninstall_requires = [\n # This plugin works with an older version of acme, but Certbot does no... | [
{
"content": "from setuptools import setup\nfrom setuptools import find_packages\n\n\nversion = '0.26.0.dev0'\n\n# Remember to update local-oldest-requirements.txt when changing the minimum\n# acme/certbot version.\ninstall_requires = [\n 'acme>=0.25.0',\n 'certbot>0.21.1',\n 'mock',\n 'PyOpenSSL',\... | diff --git a/certbot-nginx/local-oldest-requirements.txt b/certbot-nginx/local-oldest-requirements.txt
index 65f5a758ea0..e70ac0c7f2d 100644
--- a/certbot-nginx/local-oldest-requirements.txt
+++ b/certbot-nginx/local-oldest-requirements.txt
@@ -1,2 +1,2 @@
--e acme[dev]
+acme[dev]==0.25.0
-e .[dev]
diff --git a/certbo... |
searxng__searxng-3485 | Google: Improve support for results with missing keywords
**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
Yes, result descriptions that come from Google include the "Missing: [Keyword] | Show resul... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n\"\"\"This is the implementation of the Google WEB engine. Some of this\nimplementations (manly the :py:obj:`get_google_info`) are shared by other\nengines:\n\n- :ref:`google images engine`\n- :ref:`google news engine`\n- :ref:`google videos engine`\n... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n\"\"\"This is the implementation of the Google WEB engine. Some of this\nimplementations (manly the :py:obj:`get_google_info`) are shared by other\nengines:\n\n- :ref:`google images engine`\n- :ref:`google news engine`\n- :ref:`google videos engine`\n... | diff --git a/searx/engines/google.py b/searx/engines/google.py
index fd59a0e2e37..ef82a057b50 100644
--- a/searx/engines/google.py
+++ b/searx/engines/google.py
@@ -62,7 +62,7 @@
results_xpath = './/div[contains(@jscontroller, "SC7lYd")]'
title_xpath = './/a/h3[1]'
href_xpath = './/a[h3]/@href'
-content_xpath = './/... |
OpenNMT__OpenNMT-tf-997 | Make timeout value configurable while searching for an optimal batch size
In the `_auto_tune_batch_size`, the timeout value is hard coded to 15 minutes. For very large amounts of data, the workaround is to manually find a batch size by trying different values. Would be nice, if we could increase the timeout value by se... | [
{
"content": "\"\"\"Main library entrypoint.\"\"\"\n\nimport copy\nimport math\nimport os\nimport random\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\n\nimport numpy as np\nimport tensorflow as tf\nimport yaml\n\nfrom opennmt import config as config_util\nfrom opennmt import evaluation, infere... | [
{
"content": "\"\"\"Main library entrypoint.\"\"\"\n\nimport copy\nimport math\nimport os\nimport random\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\n\nimport numpy as np\nimport tensorflow as tf\nimport yaml\n\nfrom opennmt import config as config_util\nfrom opennmt import evaluation, infere... | diff --git a/opennmt/runner.py b/opennmt/runner.py
index ff10c1254..b88292c59 100644
--- a/opennmt/runner.py
+++ b/opennmt/runner.py
@@ -157,6 +157,7 @@ def _finalize_config(self, training=False, num_replicas=1, num_devices=1):
num_devices=num_devices,
scaling_factor=train_conf... |
comic__grand-challenge.org-2384 | Viewing of "file"-kind of CIV in archive items leads to 403
I created an archive item and added a file type CIV but when trying to view the file it leads to a permission denied error. It seems that the permission check when serving a CIV file is missing a check for archive item viewing. It only checks for algorithm job... | [
{
"content": "import posixpath\n\nfrom django.conf import settings\nfrom django.core.exceptions import MultipleObjectsReturned, PermissionDenied\nfrom django.db.models import F, Q\nfrom django.http import Http404, HttpResponseRedirect\nfrom django.utils._os import safe_join\nfrom guardian.shortcuts import get_o... | [
{
"content": "import posixpath\n\nfrom django.conf import settings\nfrom django.core.exceptions import MultipleObjectsReturned, PermissionDenied\nfrom django.db.models import F, Q\nfrom django.http import Http404, HttpResponseRedirect\nfrom django.utils._os import safe_join\nfrom guardian.shortcuts import get_o... | diff --git a/app/grandchallenge/serving/views.py b/app/grandchallenge/serving/views.py
index c3c60131dc..ccf90020d7 100644
--- a/app/grandchallenge/serving/views.py
+++ b/app/grandchallenge/serving/views.py
@@ -115,6 +115,16 @@ def serve_component_interface_value(
.exists()
):
return protected_st... |
mathesar-foundation__mathesar-3047 | Add OpenAPI Specification for /databases/ endpoint
## Problem
In order to ensure the accuracy of the specs generated by drf-spectacular for /databases/ endpoint , we will generate an OpenAPI Specification specifically for this endpoint. This will allow us to verify its correctness by comparing it with the existing te... | [
{
"content": "def custom_preprocessing_hook(endpoints):\n filtered = []\n for (path, path_regex, method, callback) in endpoints:\n # Remove all but DRF API endpoints\n if path.startswith(\"/api/db/v0/data_files/\"):\n filtered.append((path, path_regex, method, callback))\n retu... | [
{
"content": "def custom_preprocessing_hook(endpoints):\n filtered = []\n for (path, path_regex, method, callback) in endpoints:\n # Remove all but DRF API endpoints\n if path.startswith(\"/api/db/v0/databases/\") or path.startswith(\"/api/db/v0/data_files/\"):\n filtered.append((... | diff --git a/config/settings/openapi.py b/config/settings/openapi.py
index ca68c91810..5cf4ecb967 100644
--- a/config/settings/openapi.py
+++ b/config/settings/openapi.py
@@ -2,7 +2,7 @@ def custom_preprocessing_hook(endpoints):
filtered = []
for (path, path_regex, method, callback) in endpoints:
# R... |
python-telegram-bot__python-telegram-bot-1989 | [BUG] Upate.to_dict includes Update._effective_message
### Steps to reproduce
1. Send a message to the bot.
2.
```python
import json
from telegram import Bot
update = Bot('TOKEN').get_updates()[-1]
update.effective_chat
update.effective_user
update.effective_message
print(json.dumps(update.to_dict(), inde... | [
{
"content": "#!/usr/bin/env python\n#\n# A library that provides a Python interface to the Telegram Bot API\n# Copyright (C) 2015-2020\n# Leandro Toledo de Souza <devs@python-telegram-bot.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser Pub... | [
{
"content": "#!/usr/bin/env python\n#\n# A library that provides a Python interface to the Telegram Bot API\n# Copyright (C) 2015-2020\n# Leandro Toledo de Souza <devs@python-telegram-bot.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser Pub... | diff --git a/telegram/base.py b/telegram/base.py
index 3431396c95c..65c43678e6d 100644
--- a/telegram/base.py
+++ b/telegram/base.py
@@ -57,12 +57,7 @@ def to_dict(self):
data = dict()
for key in iter(self.__dict__):
- if key in ('bot',
- '_id_attrs',
- ... |
chainer__chainer-4026 | Adam-based training with resumed trainer changes even if randomness is removed
A trainer with Adam has been run until the end and it did snapshot at a middle checkpoint.
After that, if I run a trainer which is resumed with the snapshot, its (future) result is different from the end. Even if random seed is fixed and ot... | [
{
"content": "import collections\nimport copy\nimport warnings\n\nimport numpy\nimport six\n\nfrom chainer.backends import cuda\nfrom chainer import link as link_module\nfrom chainer import serializer as serializer_module\nfrom chainer import variable\n\n\ndef _sum_sqnorm(arr):\n sq_sum = collections.default... | [
{
"content": "import collections\nimport copy\nimport warnings\n\nimport numpy\nimport six\n\nfrom chainer.backends import cuda\nfrom chainer import link as link_module\nfrom chainer import serializer as serializer_module\nfrom chainer import variable\n\n\ndef _sum_sqnorm(arr):\n sq_sum = collections.default... | diff --git a/chainer/optimizer.py b/chainer/optimizer.py
index 4c6a9c262ef0..70589d91cf5f 100644
--- a/chainer/optimizer.py
+++ b/chainer/optimizer.py
@@ -274,6 +274,7 @@ def serialize(self, serializer):
serializer (~chainer.AbstractSerializer): Serializer object.
"""
+ self.t = serialize... |
django-cms__django-cms-846 | using Django-CMS hover httpS - admin / front-end editor issue
In HTTPS mode the Django-CMS run but some action don't work.
Some GET request are send in HTTP and NOT in HTTPS protocol.
example that don't work:
- in admin page editor - action > add page, save page
- in front-end editor with tinymce - action > show HT... | [
{
"content": "from setuptools import setup, find_packages\nimport os, fnmatch\nimport cms\n\nmedia_files = []\n\nfor dirpath, dirnames, filenames in os.walk(os.path.join('cms', 'media')):\n for filename in filenames:\n filepath = os.path.join(dirpath, filename)\n failed = False\n for pat... | [
{
"content": "from setuptools import setup, find_packages\nimport os, fnmatch\nimport cms\n\nmedia_files = []\n\nfor dirpath, dirnames, filenames in os.walk(os.path.join('cms', 'media')):\n for filename in filenames:\n filepath = os.path.join(dirpath, filename)\n failed = False\n for pat... | diff --git a/cms/templates/admin/cms/mail/base.html b/cms/templates/admin/cms/mail/base.html
index e3daed8f7d8..e74e27d3dbb 100644
--- a/cms/templates/admin/cms/mail/base.html
+++ b/cms/templates/admin/cms/mail/base.html
@@ -53,7 +53,7 @@ <h1>{{ title }}</h1>
<tr>
<td class="content">
<p>{% blocktrans %}Log... |
dask__distributed-6789 | `SpillBuffer.spilled_total` appears to return incorrect results
When spilling data to disk, the `SpillBuffer` appears to return the incorrect size of the data on disk. For example, when spilling an ~8 MB random matrix onto disk, the `data` file created by the `SpillBuffer` is also ~8 MB in size, yet the SpillBuffer on... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport time\nfrom collections.abc import Iterator, Mapping, MutableMapping, Sized\nfrom contextlib import contextmanager\nfrom functools import partial\nfrom typing import Any, Literal, NamedTuple, Protocol, cast\n\nfrom packaging.version impor... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport time\nfrom collections.abc import Iterator, Mapping, MutableMapping, Sized\nfrom contextlib import contextmanager\nfrom functools import partial\nfrom typing import Any, Literal, NamedTuple, Protocol, cast\n\nfrom packaging.version impor... | diff --git a/distributed/spill.py b/distributed/spill.py
index e7c025e58e2..13ba8e572cd 100644
--- a/distributed/spill.py
+++ b/distributed/spill.py
@@ -287,7 +287,10 @@ def __setitem__(self, key: str, value: Any) -> None:
# which will then unwrap it.
raise PickleError(key, e)
- pickl... |
mitmproxy__mitmproxy-6373 | Outfile -w cannot be loaded
#### Problem Description
When the dump file is getting bigger, about 100mb it's not loaded anymore.
#### Steps to reproduce the behavior:
Make a big outfile and try to open it with an new instance of mitmweb.
#### System Information
Mitmweb Windows 10 6.0.2
mitmweb Not loading my saved flo... | [
{
"content": "import errno\nimport logging\n\nimport tornado.httpserver\nimport tornado.ioloop\n\nfrom mitmproxy import addons\nfrom mitmproxy import flow\nfrom mitmproxy import log\nfrom mitmproxy import master\nfrom mitmproxy import options\nfrom mitmproxy import optmanager\nfrom mitmproxy.addons import error... | [
{
"content": "import errno\nimport logging\n\nimport tornado.httpserver\nimport tornado.ioloop\n\nfrom mitmproxy import addons\nfrom mitmproxy import flow\nfrom mitmproxy import log\nfrom mitmproxy import master\nfrom mitmproxy import options\nfrom mitmproxy import optmanager\nfrom mitmproxy.addons import error... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b0924b0dd7..0c1c4bae40 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,8 @@
* Add support for reading HAR files using the existing flow loading APIs, e.g. `mitmproxy -r example.har`.
([#6335](https://github.com/mitmproxy/mitmproxy/pull/6335), @stanleygvi)
+* ... |
lutris__lutris-964 | System wine not being detected
This bug appears when using lutris from the next branch on github.
When configuring the Wine runner (or configuring the runner options for a wine game) the dropdown menu for selecting the desired wine version doesn't show system wine as an option.
After reverting back to 86383e097ad... | [
{
"content": "\"\"\"Wine runner module\"\"\"\nimport os\nimport time\nimport shlex\nimport shutil\nfrom functools import lru_cache\nfrom collections import OrderedDict\n\nfrom lutris import runtime\nfrom lutris import settings\nfrom lutris.config import LutrisConfig\nfrom lutris.util import datapath, display, s... | [
{
"content": "\"\"\"Wine runner module\"\"\"\nimport os\nimport time\nimport shlex\nimport shutil\nfrom functools import lru_cache\nfrom collections import OrderedDict\n\nfrom lutris import runtime\nfrom lutris import settings\nfrom lutris.config import LutrisConfig\nfrom lutris.util import datapath, display, s... | diff --git a/lutris/runners/wine.py b/lutris/runners/wine.py
index 780f277ac8..9ba3a615d9 100644
--- a/lutris/runners/wine.py
+++ b/lutris/runners/wine.py
@@ -444,7 +444,7 @@ def get_default_version():
@lru_cache(maxsize=10)
def get_system_wine_version(wine_path="wine"):
"""Return the version of Wine installed o... |
ansible-collections__community.general-6644 | The DependencyMixin is being deprecated.
### Summary
When I use the module to blacklist a kernel module, a warning appears.
### Issue Type
Bug Report
### Component Name
kernel_blacklist
### Ansible Version
```console (paste below)
$ansible --version
ansible [core 2.15.0]
config file = None
... | [
{
"content": "# -*- coding: utf-8 -*-\n# (c) 2020, Alexei Znamensky <russoz@gmail.com>\n# Copyright (c) 2020, Ansible Project\n# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause)\n# SPDX-License-Identifier: BSD-2-Clause\n\nfrom __future__ import absolute_impo... | [
{
"content": "# -*- coding: utf-8 -*-\n# (c) 2020, Alexei Znamensky <russoz@gmail.com>\n# Copyright (c) 2020, Ansible Project\n# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause)\n# SPDX-License-Identifier: BSD-2-Clause\n\nfrom __future__ import absolute_impo... | diff --git a/changelogs/fragments/6644-dependencymixin-fix.yml b/changelogs/fragments/6644-dependencymixin-fix.yml
new file mode 100644
index 00000000000..3b757583037
--- /dev/null
+++ b/changelogs/fragments/6644-dependencymixin-fix.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - MH DependencyMixin module utils - deprecation notic... |
tornadoweb__tornado-2549 | RequestHandler.finish() future not resolving
Just tried Tornado 5.1 for the first time and am wondering if I'm doing something wrong when waiting for the future of the `finish` method:
```python
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
async def get(self):
... | [
{
"content": "#\n# Copyright 2014 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "#\n# Copyright 2014 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/tornado/http1connection.py b/tornado/http1connection.py
index 10402b4bf2..0413fd9a6a 100644
--- a/tornado/http1connection.py
+++ b/tornado/http1connection.py
@@ -492,7 +492,7 @@ def write(self, chunk: bytes) -> "Future[None]":
else:
future = self._write_future = Future()
... |
cornellius-gp__gpytorch-1811 | [Bug] `Kernel.__getitem__` modifies `self`
# 🐛 Bug
<!-- A clear and concise description of what the bug is. -->
Even though `Kernel.__getitem__` returns a copy, it still [modifies itself](https://github.com/cornellius-gp/gpytorch/blob/c96965c8aefac1874652fb44321541f5972eaa88/gpytorch/kernels/kernel.py#L436). That ... | [
{
"content": "#!/usr/bin/env python3\n\nimport warnings\nfrom abc import abstractmethod\nfrom copy import deepcopy\n\nimport torch\nfrom torch.nn import ModuleList\n\nfrom .. import settings\nfrom ..constraints import Positive\nfrom ..lazy import LazyEvaluatedKernelTensor, ZeroLazyTensor, delazify, lazify\nfrom... | [
{
"content": "#!/usr/bin/env python3\n\nimport warnings\nfrom abc import abstractmethod\nfrom copy import deepcopy\n\nimport torch\nfrom torch.nn import ModuleList\n\nfrom .. import settings\nfrom ..constraints import Positive\nfrom ..lazy import LazyEvaluatedKernelTensor, ZeroLazyTensor, delazify, lazify\nfrom... | diff --git a/gpytorch/kernels/kernel.py b/gpytorch/kernels/kernel.py
index 7c70bbfbb..da377b3cd 100644
--- a/gpytorch/kernels/kernel.py
+++ b/gpytorch/kernels/kernel.py
@@ -433,7 +433,7 @@ def __getitem__(self, index):
new_kernel.batch_shape = new_kernel._parameters[param_name].shape[:new_batch_shape_len]
... |
Pycord-Development__pycord-828 | NameError: name 'PartialMessageable' is not defined
### Summary
Interaction on DMs causes bot to crash
### Reproduction Steps
Create an interaction on DMs (like a button or dropdown) and click on it after commit a25833ec0745ca8bb4980a997107a11269bbd16c
Doing this should result into a name error:
NameError: name ... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto dea... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto dea... | diff --git a/discord/interactions.py b/discord/interactions.py
index 4a4f9b6f16..239d04ac89 100644
--- a/discord/interactions.py
+++ b/discord/interactions.py
@@ -31,7 +31,7 @@
from . import utils
from .enums import try_enum, InteractionType, InteractionResponseType
from .errors import InteractionResponded, ClientEx... |
fal-ai__dbt-fal-798 | Context test column name is None
<!-- *** Make sure you have searched for an existing bug report for this issue *** -->
**Describe the bug**
When accessing `context.current_model.tests` the column name is None if the tests are defined on table level instead of column level. For example these two tests below are doi... | [
{
"content": "from collections import defaultdict\nimport os.path\nfrom dataclasses import dataclass, field\nfrom functools import partialmethod\nfrom typing import (\n Dict,\n Iterable,\n List,\n Any,\n Optional,\n Tuple,\n Sequence,\n TYPE_CHECKING,\n)\nfrom pathlib import Path\n\nimpo... | [
{
"content": "from collections import defaultdict\nimport os.path\nfrom dataclasses import dataclass, field\nfrom functools import partialmethod\nfrom typing import (\n Dict,\n Iterable,\n List,\n Any,\n Optional,\n Tuple,\n Sequence,\n TYPE_CHECKING,\n)\nfrom pathlib import Path\n\nimpo... | diff --git a/projects/fal/src/faldbt/project.py b/projects/fal/src/faldbt/project.py
index 6da5dd207..60941b06f 100644
--- a/projects/fal/src/faldbt/project.py
+++ b/projects/fal/src/faldbt/project.py
@@ -132,6 +132,10 @@ def __post_init__(self):
assert isinstance(self.node, GenericTestNode)
self.colu... |
interlegis__sapl-1337 | Migração: problema em Generic Relation em Autores
No momento que o script de migração exclui stubs de parlamentares, há exclusão em cascata, causando a exclusão também de autores.
A solução talvez seria verificar a relação entre eles, contudo a relação inversa não está funcionando, pois o campo parlamentar_set (https:... | [
{
"content": "import re\nfrom datetime import date\nfrom subprocess import PIPE, call\n\nimport pkg_resources\nimport reversion\nimport yaml\nfrom django.apps import apps\nfrom django.apps.config import AppConfig\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group\nfrom... | [
{
"content": "import re\nfrom datetime import date\nfrom subprocess import PIPE, call\n\nimport pkg_resources\nimport reversion\nimport yaml\nfrom django.apps import apps\nfrom django.apps.config import AppConfig\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group\nfrom... | diff --git a/sapl/legacy/migration.py b/sapl/legacy/migration.py
index 8878d3522..b5e16e282 100644
--- a/sapl/legacy/migration.py
+++ b/sapl/legacy/migration.py
@@ -327,6 +327,9 @@ def obj_desnecessario(obj):
if (f.one_to_many or f.one_to_one) and f.auto_created]
sem_referencia = not any(rr.related_model.... |
dbt-labs__dbt-core-7973 | [CT-2753] [Bug] dbt-core 1.3 and pre versions would create non-json log when
| [
{
"content": "from colorama import Style\nimport dbt.events.functions as this # don't worry I hate it too.\nfrom dbt.events.base_types import NoStdOut, Event, NoFile, ShowException, Cache\nfrom dbt.events.types import T_Event, MainReportVersion, EmptyLine, EventBufferFull\nimport dbt.flags as flags\nfrom dbt.c... | [
{
"content": "from colorama import Style\nimport dbt.events.functions as this # don't worry I hate it too.\nfrom dbt.events.base_types import NoStdOut, Event, NoFile, ShowException, Cache\nfrom dbt.events.types import T_Event, MainReportVersion, EmptyLine, EventBufferFull\nimport dbt.flags as flags\nfrom dbt.c... | diff --git a/.changes/unreleased/Fixes-20230627-224355.yaml b/.changes/unreleased/Fixes-20230627-224355.yaml
new file mode 100644
index 00000000000..ac396f7e993
--- /dev/null
+++ b/.changes/unreleased/Fixes-20230627-224355.yaml
@@ -0,0 +1,6 @@
+kind: Fixes
+body: Fix producing non json log when log format is json
+time... |
bookwyrm-social__bookwyrm-1982 | Reviews of delete user still show up
**Describe the bug**
I have a username (treaz) which I've used to import my GoodReads book initially, but then I removed it completely.
With my current username (horiaconstantin), I redid the import again and I see that I have a doubled review.
**To Reproduce**
Steps to reprod... | [
{
"content": "\"\"\" models for storing different kinds of Activities \"\"\"\nfrom dataclasses import MISSING\nimport re\n\nfrom django.apps import apps\nfrom django.core.cache import cache\nfrom django.core.exceptions import PermissionDenied\nfrom django.core.validators import MaxValueValidator, MinValueValida... | [
{
"content": "\"\"\" models for storing different kinds of Activities \"\"\"\nfrom dataclasses import MISSING\nimport re\n\nfrom django.apps import apps\nfrom django.core.cache import cache\nfrom django.core.exceptions import PermissionDenied\nfrom django.core.validators import MaxValueValidator, MinValueValida... | diff --git a/bookwyrm/models/status.py b/bookwyrm/models/status.py
index 29b3ba9cc4..17fcd45874 100644
--- a/bookwyrm/models/status.py
+++ b/bookwyrm/models/status.py
@@ -227,7 +227,7 @@ def raise_not_editable(self, viewer):
@classmethod
def privacy_filter(cls, viewer, privacy_levels=None):
queryset ... |
getsentry__sentry-17282 | Unclear instructions for GitLab integration setup
> Step 1: Create a Sentry App in GitLab
> To configure GitLab with Sentry, you will need to create a Sentry app in your GitLab instance.
> You'll also need to be a maintainer or owner in GitLab. Projects owned by users are not supported.
> Navigate to the **Use... | [
{
"content": "from __future__ import absolute_import\n\nimport six\nfrom six.moves.urllib.parse import urlparse\nfrom django.utils.translation import ugettext_lazy as _\nfrom django import forms\n\nfrom sentry.web.helpers import render_to_response\nfrom sentry.identity.pipeline import IdentityProviderPipeline\n... | [
{
"content": "from __future__ import absolute_import\n\nimport six\nfrom six.moves.urllib.parse import urlparse\nfrom django.utils.translation import ugettext_lazy as _\nfrom django import forms\n\nfrom sentry.web.helpers import render_to_response\nfrom sentry.identity.pipeline import IdentityProviderPipeline\n... | diff --git a/src/sentry/integrations/gitlab/integration.py b/src/sentry/integrations/gitlab/integration.py
index 1565491424c0c0..00061f641b9a98 100644
--- a/src/sentry/integrations/gitlab/integration.py
+++ b/src/sentry/integrations/gitlab/integration.py
@@ -175,6 +175,10 @@ def clean_url(self):
class InstallationCo... |
google__timesketch-1910 | Sigma analyzer creates saved search and story even with 0 results
The Sigma analyzer will create a story and saved search even if there are no results from the analyzer.
Fix: Only create saved search and story if there was any events tagged.
| [
{
"content": "\"\"\"Index analyzer plugin for sigma.\"\"\"\nfrom __future__ import unicode_literals\n\nimport logging\nimport time\nimport elasticsearch\n\nfrom flask import current_app\n\nfrom timesketch.lib.analyzers import utils\n\nfrom timesketch.lib.analyzers import interface\nfrom timesketch.lib.analyzers... | [
{
"content": "\"\"\"Index analyzer plugin for sigma.\"\"\"\nfrom __future__ import unicode_literals\n\nimport logging\nimport time\nimport elasticsearch\n\nfrom flask import current_app\n\nfrom timesketch.lib.analyzers import utils\n\nfrom timesketch.lib.analyzers import interface\nfrom timesketch.lib.analyzers... | diff --git a/timesketch/lib/analyzers/sigma_tagger.py b/timesketch/lib/analyzers/sigma_tagger.py
index 8414ce495b..dd78991f55 100644
--- a/timesketch/lib/analyzers/sigma_tagger.py
+++ b/timesketch/lib/analyzers/sigma_tagger.py
@@ -110,7 +110,7 @@ def run(self):
total_tagged_events = sum(tags_applied.values())
... |
internetarchive__openlibrary-8280 | Add generalized de-dupe function for ISBN and LCCN for edit edition form
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
### Describe the problem that you'd like solved
<!-- A clear and concise description of what you want to happen. -->
After completion of #80... | [
{
"content": "import logging\nimport re\nfrom functools import cached_property\n\nimport sys\nimport web\n\nfrom collections import defaultdict\nfrom isbnlib import canonical, mask, NotValidISBNError\n\nfrom infogami import config\nfrom infogami.infobase import client\nfrom infogami.utils.view import safeint\nf... | [
{
"content": "import logging\nimport re\nfrom functools import cached_property\n\nimport sys\nimport web\n\nfrom collections import defaultdict\nfrom isbnlib import canonical, mask, NotValidISBNError\n\nfrom infogami import config\nfrom infogami.infobase import client\nfrom infogami.utils.view import safeint\nf... | diff --git a/openlibrary/plugins/openlibrary/js/edit.js b/openlibrary/plugins/openlibrary/js/edit.js
index 35c3fafcd38..5c216e84bc8 100644
--- a/openlibrary/plugins/openlibrary/js/edit.js
+++ b/openlibrary/plugins/openlibrary/js/edit.js
@@ -6,7 +6,8 @@ import {
isChecksumValidIsbn13,
isFormatValidIsbn10,
... |
MongoEngine__mongoengine-1862 | Name of text index
Is it possible to set name of text index?
I have nearly 10 fields which I want to use in text index and I can't, because limited by length of index name (see: https://docs.mongodb.com/v3.2/reference/limits/#Index-Name-Length)
Also, I don't want to use Wildcard index (btw, is it possible in mong... | [
{
"content": "from contextlib import contextmanager\nfrom pymongo.write_concern import WriteConcern\nfrom mongoengine.common import _import_class\nfrom mongoengine.connection import DEFAULT_CONNECTION_NAME, get_db\n\n\n__all__ = ('switch_db', 'switch_collection', 'no_dereference',\n 'no_sub_classes', ... | [
{
"content": "from contextlib import contextmanager\nfrom pymongo.write_concern import WriteConcern\nfrom mongoengine.common import _import_class\nfrom mongoengine.connection import DEFAULT_CONNECTION_NAME, get_db\n\n\n__all__ = ('switch_db', 'switch_collection', 'no_dereference',\n 'no_sub_classes', ... | diff --git a/docs/guide/defining-documents.rst b/docs/guide/defining-documents.rst
index 2a8d5418c..366d12c7d 100644
--- a/docs/guide/defining-documents.rst
+++ b/docs/guide/defining-documents.rst
@@ -513,6 +513,9 @@ If a dictionary is passed then the following options are available:
Allows you to automatically ex... |
privacyidea__privacyidea-1602 | Setting and then Clearing 'User Cache expiration in seconds' Breaks Authentication
# What did you try to do?
Clear/delete value for 'User Cache expiration in seconds' under System Config.
# What outcome did you expect?
Value reset to default of 0.
# What outcome did you experience?
Authentication breaks ... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# 2017-03-30 Friedrich Weber <friedrich.weber@netknights.it>\n# First ideas for a user cache to improve performance\n#\n# This code is free software; you can redistribute it and/or\n# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE\n#... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# 2017-03-30 Friedrich Weber <friedrich.weber@netknights.it>\n# First ideas for a user cache to improve performance\n#\n# This code is free software; you can redistribute it and/or\n# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE\n#... | diff --git a/privacyidea/lib/usercache.py b/privacyidea/lib/usercache.py
index 44133c6274..8c9716783c 100644
--- a/privacyidea/lib/usercache.py
+++ b/privacyidea/lib/usercache.py
@@ -70,7 +70,12 @@ def get_cache_time():
:return: UserCacheExpiration config value as a timedelta
:rtype: timedelta
"""
- s... |
Textualize__textual-2568 | Pasting in Input with an empty string crashes the program
Pressing middle mouse button to paste causes this error in `Input._on_paste` if the clipboard is empty of text:
```
╭───────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────... | [
{
"content": "from __future__ import annotations\n\nimport re\nfrom typing import ClassVar\n\nfrom rich.cells import cell_len, get_character_cell_size\nfrom rich.console import Console, ConsoleOptions, RenderableType, RenderResult\nfrom rich.highlighter import Highlighter\nfrom rich.segment import Segment\nfrom... | [
{
"content": "from __future__ import annotations\n\nimport re\nfrom typing import ClassVar\n\nfrom rich.cells import cell_len, get_character_cell_size\nfrom rich.console import Console, ConsoleOptions, RenderableType, RenderResult\nfrom rich.highlighter import Highlighter\nfrom rich.segment import Segment\nfrom... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1e7cdebf4a..5991f818d6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Fixed `TreeNode.collapse` and `TreeNode.collapse_all` not posting a `Tree.NodeCollapsed` message https://github.c... |
PaddlePaddle__PaddleNLP-1422 | fix perf and sample code
<!-- Demo: https://github.com/PaddlePaddle/PaddleNLP/pull/26 -->
### PR types
<!-- One of [ New features | Bug fixes | Function optimization | Performance optimization | Breaking changes | Others ] -->
Others
### PR changes
<!-- One of [ Models | APIs | Docs | Others ] -->
APIs
### Descr... | [
{
"content": "# Copyright (c) 2021 PaddlePaddle 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 (c) 2021 PaddlePaddle 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/paddlenlp/ops/faster_transformer/transformer/faster_transformer.py b/paddlenlp/ops/faster_transformer/transformer/faster_transformer.py
index c7f040b91383..ff1b7ffb5ed6 100644
--- a/paddlenlp/ops/faster_transformer/transformer/faster_transformer.py
+++ b/paddlenlp/ops/faster_transformer/transformer/faster_... |
Lightning-AI__torchmetrics-1572 | 0.11.2 and 0.11.3 not released on PyPI
The 0.11.2 and 0.11.3 releases have both been released on GitHub, but haven't yet been released on PyPI. Is this planned for the future, or is the release process broken?
| [
{
"content": "#!/usr/bin/env python\nimport glob\nimport os\nimport re\nfrom functools import partial\nfrom importlib.util import module_from_spec, spec_from_file_location\nfrom itertools import chain\nfrom pathlib import Path\nfrom typing import Any, Iterable, Iterator, List, Optional, Tuple, Union\n\nfrom pkg... | [
{
"content": "#!/usr/bin/env python\nimport glob\nimport os\nimport re\nfrom functools import partial\nfrom importlib.util import module_from_spec, spec_from_file_location\nfrom itertools import chain\nfrom pathlib import Path\nfrom typing import Any, Iterable, Iterator, List, Optional, Tuple, Union\n\nfrom pkg... | diff --git a/.azure/gpu-pipeline.yml b/.azure/gpu-pipeline.yml
index b07ca430195..dd40baf7176 100644
--- a/.azure/gpu-pipeline.yml
+++ b/.azure/gpu-pipeline.yml
@@ -101,11 +101,13 @@ jobs:
displayName: 'Sanity check'
- bash: |
+ printf "cache location: $(TORCH_HOME)\n"
+ mkdir -p $(TORCH_HOM... |
kornia__kornia-1690 | Missing `f` prefix on f-strings
Some strings looks like they're meant to be f-strings but are missing the `f` prefix meaning variable interpolation won't happen.
https://github.com/kornia/kornia/blob/9f9544de123b56155486df5b69b4cab81bcf3006/kornia/enhance/equalization.py#L359
I found this issue automatically. I'm a b... | [
{
"content": "\"\"\"In this module several equalization methods are exposed: he, ahe, clahe.\"\"\"\n\nimport math\nfrom typing import Tuple\n\nimport torch\nimport torch.nn.functional as F\n\nfrom kornia.utils.helpers import _torch_histc_cast\nfrom kornia.utils.image import perform_keep_shape_image\n\nfrom .his... | [
{
"content": "\"\"\"In this module several equalization methods are exposed: he, ahe, clahe.\"\"\"\n\nimport math\nfrom typing import Tuple\n\nimport torch\nimport torch.nn.functional as F\n\nfrom kornia.utils.helpers import _torch_histc_cast\nfrom kornia.utils.image import perform_keep_shape_image\n\nfrom .his... | diff --git a/kornia/enhance/equalization.py b/kornia/enhance/equalization.py
index 5287d8ee63..9e433e411a 100644
--- a/kornia/enhance/equalization.py
+++ b/kornia/enhance/equalization.py
@@ -356,7 +356,7 @@ def equalize_clahe(input: torch.Tensor,
raise TypeError("Input grid_size type is not valid, must be a Tu... |
huggingface__transformers-7720 | Trainer callback breaks old code
https://github.com/huggingface/transformers/blob/ba4bbd92bcb55febbfa06aaa1551738388ec7eb0/src/transformers/trainer_callback.py#L438-L447
Currently it depends on the fact that evaluate() will first call `self.prediction_loop` https://github.com/huggingface/transformers/blob/ba4bbd92bc... | [
{
"content": "# coding=utf-8\n# Copyright 2020-present the HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENS... | [
{
"content": "# coding=utf-8\n# Copyright 2020-present the HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENS... | diff --git a/src/transformers/trainer_callback.py b/src/transformers/trainer_callback.py
index bc14d99f25e1..c3057f882501 100644
--- a/src/transformers/trainer_callback.py
+++ b/src/transformers/trainer_callback.py
@@ -443,7 +443,8 @@ def on_prediction_step(self, args, state, control, eval_dataloader=None, **kwarg
... |
sql-machine-learning__elasticdl-1830 | worker pod crashes when get task
```
2020-03-12 22:03:32.300671: W tensorflow/core/kernels/data/generator_dataset_op.cc:103] Error occurred when finalizing GeneratorDataset iterator: Cancelled: Operation was cancelled
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_a... | [
{
"content": "import threading\nimport time\nfrom collections import deque\n\nimport tensorflow as tf\n\nfrom elasticdl.proto import elasticdl_pb2\nfrom elasticdl.python.common.constants import TaskExecCounterKey\nfrom elasticdl.python.common.log_utils import default_logger as logger\nfrom elasticdl.python.data... | [
{
"content": "import threading\nimport time\nfrom collections import deque\n\nimport tensorflow as tf\n\nfrom elasticdl.proto import elasticdl_pb2\nfrom elasticdl.python.common.constants import TaskExecCounterKey\nfrom elasticdl.python.common.log_utils import default_logger as logger\nfrom elasticdl.python.data... | diff --git a/elasticdl/python/worker/task_data_service.py b/elasticdl/python/worker/task_data_service.py
index 2fe6a79c2..a47035e17 100644
--- a/elasticdl/python/worker/task_data_service.py
+++ b/elasticdl/python/worker/task_data_service.py
@@ -83,6 +83,9 @@ def report_record_done(self, count, err_msg=""):
if ... |
deepset-ai__haystack-6503 | `TransformersSimilarityRanker` breaks when `documents` list consists of a single document
**Describe the bug**
`TransformersSimilarityRanker` throws an error if its input for `documents` consists of a list containing only a single Document.
**Error message**
```
Traceback (most recent call last):
File "/Users/... | [
{
"content": "import logging\nfrom pathlib import Path\nfrom typing import List, Union, Dict, Any, Optional\n\nfrom haystack import ComponentError, Document, component, default_to_dict\nfrom haystack.lazy_imports import LazyImport\n\nlogger = logging.getLogger(__name__)\n\n\nwith LazyImport(message=\"Run 'pip i... | [
{
"content": "import logging\nfrom pathlib import Path\nfrom typing import List, Union, Dict, Any, Optional\n\nfrom haystack import ComponentError, Document, component, default_to_dict\nfrom haystack.lazy_imports import LazyImport\n\nlogger = logging.getLogger(__name__)\n\n\nwith LazyImport(message=\"Run 'pip i... | diff --git a/haystack/components/rankers/transformers_similarity.py b/haystack/components/rankers/transformers_similarity.py
index ce77d2324c..cf849f5824 100644
--- a/haystack/components/rankers/transformers_similarity.py
+++ b/haystack/components/rankers/transformers_similarity.py
@@ -123,7 +123,7 @@ def run(self, que... |
statsmodels__statsmodels-3508 | Running cythonize failed
Hello
I am trying to upgrade my statsmodel package from 0.6.0 to 0.8.0 via github.
This is what I did cloned **https://github.com/statsmodels/statsmodels.git** and cd in to that folder
did python setup.py install and am getting this error
> 'git' is not recognized as an internal o... | [
{
"content": "\"\"\"\nMuch of the build system code was adapted from work done by the pandas\ndevelopers [1], which was in turn based on work done in pyzmq [2] and lxml [3].\n\n[1] http://pandas.pydata.org\n[2] http://zeromq.github.io/pyzmq/\n[3] http://lxml.de/\n\"\"\"\n\nimport os\nfrom os.path import relpath... | [
{
"content": "\"\"\"\nMuch of the build system code was adapted from work done by the pandas\ndevelopers [1], which was in turn based on work done in pyzmq [2] and lxml [3].\n\n[1] http://pandas.pydata.org\n[2] http://zeromq.github.io/pyzmq/\n[3] http://lxml.de/\n\"\"\"\n\nimport os\nfrom os.path import relpath... | diff --git a/setup.py b/setup.py
index 4ee4aeb6502..2f060efc14e 100644
--- a/setup.py
+++ b/setup.py
@@ -450,7 +450,8 @@ def run(self):
except ImportError:
for name, data in statespace_ext_data.items():
path = '.'.join([data["name"].split('.')[0], 'pyx.in'])
- append_cython_exclusion(path, CYTHON_... |
nf-core__tools-1720 | modules info broken in dev
### Description of the bug
Running `nf-core modules info` on `nf-core/tools version 2.5.dev0` produces a `TypeError`
### Command used and terminal output
```console
nf-core modules info
TypeError: __init__() takes 6 positional arguments but 7 were given
/Users/arthurgymer/.pyenv/ver... | [
{
"content": "import logging\nimport os\n\nimport questionary\nimport yaml\nfrom rich import box\nfrom rich.console import Group\nfrom rich.markdown import Markdown\nfrom rich.panel import Panel\nfrom rich.table import Table\nfrom rich.text import Text\n\nimport nf_core.utils\n\nfrom .module_utils import get_re... | [
{
"content": "import logging\nimport os\n\nimport questionary\nimport yaml\nfrom rich import box\nfrom rich.console import Group\nfrom rich.markdown import Markdown\nfrom rich.panel import Panel\nfrom rich.table import Table\nfrom rich.text import Text\n\nimport nf_core.utils\n\nfrom .module_utils import get_re... | diff --git a/nf_core/modules/info.py b/nf_core/modules/info.py
index dd99162b08..7dac5067bb 100644
--- a/nf_core/modules/info.py
+++ b/nf_core/modules/info.py
@@ -20,8 +20,8 @@
class ModuleInfo(ModuleCommand):
- def __init__(self, pipeline_dir, tool, remote_url, branch, no_pull):
- super().__init__(pipel... |
netbox-community__netbox-15611 | Empty search entries are being created for device asset tags
### Deployment Type
NetBox Cloud
### NetBox Version
v3.7.4
### Python Version
3.11
### Steps to Reproduce
1. Create a new device and note its database ID
2. In the NetBox shell, inspect all search entries associated with it:
```python
ct = Content... | [
{
"content": "from collections import namedtuple\n\nfrom django.db import models\n\nfrom ipam.fields import IPAddressField, IPNetworkField\nfrom netbox.registry import registry\n\nObjectFieldValue = namedtuple('ObjectFieldValue', ('name', 'type', 'weight', 'value'))\n\n\nclass FieldTypes:\n FLOAT = 'float'\n... | [
{
"content": "from collections import namedtuple\n\nfrom django.db import models\n\nfrom ipam.fields import IPAddressField, IPNetworkField\nfrom netbox.registry import registry\n\nObjectFieldValue = namedtuple('ObjectFieldValue', ('name', 'type', 'weight', 'value'))\n\n\nclass FieldTypes:\n FLOAT = 'float'\n... | diff --git a/netbox/netbox/search/__init__.py b/netbox/netbox/search/__init__.py
index 590188f21e5..7537c04197e 100644
--- a/netbox/netbox/search/__init__.py
+++ b/netbox/netbox/search/__init__.py
@@ -59,9 +59,10 @@ def get_field_type(instance, field_name):
@staticmethod
def get_field_value(instance, field_na... |
bokeh__bokeh-9682 | [DOCUMENTATION] typo in texas.py
Superfluous parenthesis on [line 34 of texas.py](https://github.com/bokeh/bokeh/blob/aa60b9c9d554fbd349a21da37d616c5b8eda8c09/examples/plotting/file/texas.py#L34). Shows up in the hover tool tip.
Not sure whether you want a PR for something so small? So far I haven't found any other ... | [
{
"content": "from bokeh.io import show\nfrom bokeh.models import LogColorMapper\nfrom bokeh.palettes import Viridis6 as palette\nfrom bokeh.plotting import figure\nfrom bokeh.sampledata.unemployment import data as unemployment\nfrom bokeh.sampledata.us_counties import data as counties\n\npalette = tuple(revers... | [
{
"content": "from bokeh.io import show\nfrom bokeh.models import LogColorMapper\nfrom bokeh.palettes import Viridis6 as palette\nfrom bokeh.plotting import figure\nfrom bokeh.sampledata.unemployment import data as unemployment\nfrom bokeh.sampledata.us_counties import data as counties\n\npalette = tuple(revers... | diff --git a/examples/plotting/file/texas.py b/examples/plotting/file/texas.py
index 2e8ccfb8f8c..be379c2c1b4 100644
--- a/examples/plotting/file/texas.py
+++ b/examples/plotting/file/texas.py
@@ -31,7 +31,7 @@
title="Texas Unemployment, 2009", tools=TOOLS,
x_axis_location=None, y_axis_location=None,
too... |
Project-MONAI__MONAI-1906 | ConvertToMultiChannelBasedOnBratsClasses should support channel first input
**Describe the bug**
Currently, `ConvertToMultiChannelBasedOnBratsClasses` transform expects the input data has no channel dim, should also support channel-first data.
| [
{
"content": "# Copyright 2020 - 2021 MONAI Consortium\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by appli... | [
{
"content": "# Copyright 2020 - 2021 MONAI Consortium\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by appli... | diff --git a/monai/transforms/utility/array.py b/monai/transforms/utility/array.py
index be8f40c526..4ad0676fba 100644
--- a/monai/transforms/utility/array.py
+++ b/monai/transforms/utility/array.py
@@ -659,6 +659,10 @@ class ConvertToMultiChannelBasedOnBratsClasses(Transform):
"""
def __call__(self, img: n... |
ansible__ansible-lint-477 | False positive EANSIBLE0014 also flags vars in shell task
# Issue Type
- Bug report
# Ansible and Ansible Lint details
```
ansible --version
ansible 2.3.0.0
ansible-lint --version
ansible-lint 3.4.13
```
- ansible installation method: pip
- ansible-lint installation method: pip
# Desired Behaviour
E... | [
{
"content": "# Copyright (c) 2016 Will Thames <will@thames.id.au>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights... | [
{
"content": "# Copyright (c) 2016 Will Thames <will@thames.id.au>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights... | diff --git a/lib/ansiblelint/rules/EnvVarsInCommandRule.py b/lib/ansiblelint/rules/EnvVarsInCommandRule.py
index a6ddaa97ba..ec5d26cc0c 100644
--- a/lib/ansiblelint/rules/EnvVarsInCommandRule.py
+++ b/lib/ansiblelint/rules/EnvVarsInCommandRule.py
@@ -38,7 +38,7 @@ class EnvVarsInCommandRule(AnsibleLintRule):
... |
pallets__werkzeug-2643 | Stream argument to ProfilerMiddleware is not typed hinted correctly
The profiler middleware `src/werkzeug/middleware/profiler.py:80` documentation and implementation states that the argument `stream` can be set to `None` to disable output.
However the type hints specifies `stream: t.IO[str] = sys.stdout,` which is ... | [
{
"content": "\"\"\"\nApplication Profiler\n====================\n\nThis module provides a middleware that profiles each request with the\n:mod:`cProfile` module. This can help identify bottlenecks in your code\nthat may be slowing down your application.\n\n.. autoclass:: ProfilerMiddleware\n\n:copyright: 2007 ... | [
{
"content": "\"\"\"\nApplication Profiler\n====================\n\nThis module provides a middleware that profiles each request with the\n:mod:`cProfile` module. This can help identify bottlenecks in your code\nthat may be slowing down your application.\n\n.. autoclass:: ProfilerMiddleware\n\n:copyright: 2007 ... | diff --git a/CHANGES.rst b/CHANGES.rst
index 237d0235f..680a583d7 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -114,6 +114,8 @@ Unreleased
use UTF-8. :issue:`2602`
- Header values that have charset information only allow ASCII, UTF-8, and ISO-8859-1.
:pr:`2614, 2640`
+- Update type annotation for ``Prof... |
ansible__ansible-43032 | Exception with `ansible_port` on delegate task result
##### SUMMARY
If we have a task that delegate to localhost, we have an exception thrown :
````
ERROR! Unexpected Exception, this is probably a bug: 'ansible_port'
````
##### ISSUE TYPE
This seems to be related to #42577. Reverting this commit fix the issu... | [
{
"content": "# Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>\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__metaclass__ = type\n\nfrom copy import deepcopy\n\nfrom ans... | [
{
"content": "# Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>\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__metaclass__ = type\n\nfrom copy import deepcopy\n\nfrom ans... | diff --git a/lib/ansible/executor/task_result.py b/lib/ansible/executor/task_result.py
index f0b20f844ba99a..ba5bc93f2d47f3 100644
--- a/lib/ansible/executor/task_result.py
+++ b/lib/ansible/executor/task_result.py
@@ -126,7 +126,8 @@ def clean_copy(self):
if sub in self._result:
x... |
biolab__orange3-6306 | "CN2Classifier object has no attribute params" shows if I press "report" menu of an OWRuleViewer
Here is my environment:
Python 3.9
PyQt5
Orange3
here is my code, you can run this code directly
```from PyQt5 import QtWidgets, QtGui, QtCore
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from ... | [
{
"content": "import numpy as np\n\nfrom AnyQt.QtCore import (\n Qt, QLineF, QSize, QAbstractTableModel, QModelIndex, QSortFilterProxyModel\n)\nfrom AnyQt.QtGui import QPainter, QPen, QBrush, QColor\nfrom AnyQt.QtWidgets import (\n QItemDelegate, QHeaderView, QPushButton, QApplication\n)\n\nfrom Orange.da... | [
{
"content": "import numpy as np\n\nfrom AnyQt.QtCore import (\n Qt, QLineF, QSize, QAbstractTableModel, QModelIndex, QSortFilterProxyModel\n)\nfrom AnyQt.QtGui import QPainter, QPen, QBrush, QColor\nfrom AnyQt.QtWidgets import (\n QItemDelegate, QHeaderView, QPushButton, QApplication\n)\n\nfrom Orange.da... | diff --git a/Orange/widgets/visualize/owruleviewer.py b/Orange/widgets/visualize/owruleviewer.py
index a36c4e759bb..6f518f690ca 100644
--- a/Orange/widgets/visualize/owruleviewer.py
+++ b/Orange/widgets/visualize/owruleviewer.py
@@ -174,7 +174,6 @@ def commit(self):
def send_report(self):
if self.classifi... |
pypa__pip-1986 | pip fails because of space in user name on Windows in temp/pip-build-username
Hi,
I'm trying to install scipy using pip on Windows 7. I have all the requirements as far as I can see (mingw, blas etc.) and that part works fine. It runs into trouble when it's trying to pass to gfortran.exe the path to the temp folder co... | [
{
"content": "\"\"\"Locations where we look for configs, install stuff, etc\"\"\"\n\nimport sys\nimport site\nimport os\nimport tempfile\nfrom distutils.command.install import install, SCHEME_KEYS\nimport getpass\nfrom pip.backwardcompat import get_python_lib, get_path_uid, user_site\nimport pip.exceptions\n\n\... | [
{
"content": "\"\"\"Locations where we look for configs, install stuff, etc\"\"\"\n\nimport sys\nimport site\nimport os\nimport tempfile\nfrom distutils.command.install import install, SCHEME_KEYS\nimport getpass\nfrom pip.backwardcompat import get_python_lib, get_path_uid, user_site\nimport pip.exceptions\n\n\... | diff --git a/pip/locations.py b/pip/locations.py
index 1d402651689..4d5d872f3e9 100644
--- a/pip/locations.py
+++ b/pip/locations.py
@@ -62,7 +62,7 @@ def __get_username():
def _get_build_prefix():
""" Returns a safe build_prefix """
path = os.path.join(tempfile.gettempdir(), 'pip_build_%s' %
- __get_... |
numba__numba-5548 | `platform.linux_distribution` is deprecated
I was looking into the output of `numba -s` and found that the code is using `platform.linux_distribution` which is now [deprecated](https://bugs.python.org/issue1322).
The issue is located in [`numba_entry.py` line 98](https://github.com/numba/numba/blob/2b613798cf548e247... | [
{
"content": "import sys\nimport argparse\nimport os\nimport subprocess\n\n\ndef get_sys_info():\n # delay these imports until now as they are only needed in this\n # function which then exits.\n import platform\n import json\n import multiprocessing\n from numba.core import config\n from n... | [
{
"content": "import sys\nimport argparse\nimport os\nimport subprocess\n\n\ndef get_sys_info():\n # delay these imports until now as they are only needed in this\n # function which then exits.\n import platform\n import json\n import multiprocessing\n from numba.core import config\n from n... | diff --git a/numba/misc/numba_entry.py b/numba/misc/numba_entry.py
index 9adf8f6f719..112a5c4a474 100644
--- a/numba/misc/numba_entry.py
+++ b/numba/misc/numba_entry.py
@@ -95,7 +95,7 @@ def scrape_lines(loc):
print(fmt % ("Version", platform.version()))
try:
if system_name == 'Linux':
- ... |
spack__spack-13717 | spack find : always prompt 0 installed packages
On a clean `develop` checkout :
```
$ git clone https://github.com/LLNL/spack.git
Cloning into 'spack'...
remote: Counting objects: 25613, done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 25613 (delta 12), reused 3 (delta 3), pack-reused 25557
Receiv... | [
{
"content": "# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Mgis(CMakePackage):\n \"\"\"\n The MFrontGenericInterfaceS... | [
{
"content": "# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Mgis(CMakePackage):\n \"\"\"\n The MFrontGenericInterfaceS... | diff --git a/var/spack/repos/builtin/packages/mgis/package.py b/var/spack/repos/builtin/packages/mgis/package.py
index d51327c3c06f3f..a31fd6db8dbc56 100644
--- a/var/spack/repos/builtin/packages/mgis/package.py
+++ b/var/spack/repos/builtin/packages/mgis/package.py
@@ -46,7 +46,7 @@ class Mgis(CMakePackage):
depe... |
ESMCI__cime-875 | cloning: stream files are not copied
Using cime5.2.0-alpha.7
Custom stream files
`user_datm.streams.txt.* `
are not copied when doing a ./create_clone
| [
{
"content": "\"\"\"\nWrapper around all env XML for a case.\n\nAll interaction with and between the module files in XML/ takes place\nthrough the Case module.\n\"\"\"\nfrom copy import deepcopy\nimport glob, os, shutil, traceback, math\nfrom CIME.XML.standard_module_setup import *\n\nfrom CIME.utils ... | [
{
"content": "\"\"\"\nWrapper around all env XML for a case.\n\nAll interaction with and between the module files in XML/ takes place\nthrough the Case module.\n\"\"\"\nfrom copy import deepcopy\nimport glob, os, shutil, traceback, math\nfrom CIME.XML.standard_module_setup import *\n\nfrom CIME.utils ... | diff --git a/share/csm_share/shr/shr_file_mod.F90 b/share/csm_share/shr/shr_file_mod.F90
index 3054bbf2065..c8c662b0a10 100644
--- a/share/csm_share/shr/shr_file_mod.F90
+++ b/share/csm_share/shr/shr_file_mod.F90
@@ -766,7 +766,7 @@ SUBROUTINE shr_file_stdioReadNL( model, filename, dirOut, stdinOut, stdoutOut, &
!-... |
avocado-framework__avocado-4119 | Job: warn when running jobs without test suites
Currently, when creating a Job through the API, without test suites, the Job will not warn the user about it.
We should either present a warning, or the `RESULT` line with all `0`s, or both.
| [
{
"content": "# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope t... | [
{
"content": "# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope t... | diff --git a/avocado/core/job.py b/avocado/core/job.py
index ddd9ada86a..687717ad88 100644
--- a/avocado/core/job.py
+++ b/avocado/core/job.py
@@ -591,6 +591,11 @@ def run_tests(self):
self._log_job_debug_info()
jobdata.record(self, sys.argv)
+ if self.size == 0:
+ msg = ("Unable t... |
ibis-project__ibis-9052 | bug: Throw FIELD_NOT_FOUND exception when lift a struct
### What happened?
Here is my step:
1. Zip two arrays to array<struct>
2. Unnest the array<struct> to struct
3. Lift the struct throw the exception
```python
import ibis
from pyspark.sql import SparkSession
ibis.options.interactive = True
spark = ... | [
{
"content": "from __future__ import annotations\n\nimport calendar\nimport itertools\nimport re\n\nimport sqlglot as sg\nimport sqlglot.expressions as sge\nfrom public import public\n\nimport ibis\nimport ibis.common.exceptions as com\nimport ibis.expr.datatypes as dt\nimport ibis.expr.operations as ops\nfrom ... | [
{
"content": "from __future__ import annotations\n\nimport calendar\nimport itertools\nimport re\n\nimport sqlglot as sg\nimport sqlglot.expressions as sge\nfrom public import public\n\nimport ibis\nimport ibis.common.exceptions as com\nimport ibis.expr.datatypes as dt\nimport ibis.expr.operations as ops\nfrom ... | diff --git a/ibis/backends/pyspark/compiler.py b/ibis/backends/pyspark/compiler.py
index d8e5323093b9..94a6113e89e3 100644
--- a/ibis/backends/pyspark/compiler.py
+++ b/ibis/backends/pyspark/compiler.py
@@ -349,7 +349,7 @@ def visit_MapGet(self, op, *, arg, key, default):
return self.if_(self.f.map_contain... |
hylang__hy-1916 | Can't `hy.eval` a `require` form in Python
I'm getting an error when doing a `require` using the `hy.eval` functionality.
The version of python works when hy is loaded:
```
hy 0.18.0 using CPython(default) 3.7.5 on Darwin ... | [
{
"content": "# Copyright 2020 the authors.\n# This file is part of Hy, which is free software licensed under the Expat\n# license. See the LICENSE.\nimport sys\nimport importlib\nimport inspect\nimport pkgutil\nimport traceback\n\nfrom contextlib import contextmanager\n\nfrom hy._compat import reraise, PY38\nf... | [
{
"content": "# Copyright 2020 the authors.\n# This file is part of Hy, which is free software licensed under the Expat\n# license. See the LICENSE.\nimport sys\nimport importlib\nimport inspect\nimport pkgutil\nimport traceback\n\nfrom contextlib import contextmanager\n\nfrom hy._compat import reraise, PY38\nf... | diff --git a/AUTHORS b/AUTHORS
index aa9ce4b76..eda7ad9c5 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -99,4 +99,5 @@
* Raymund MARTINEZ <zhaqenl@protonmail.com>
* Zepeng Zhang <redraiment@gmail.com>
* Joseph Egan <joseph.s.egan@gmail.com>
-* Xi Jin <xij@usc.edu>
\ No newline at end of file
+* Xi Jin <xij@usc.edu>
+* Alexe... |
cocotb__cocotb-1430 | Compile error in VhpiCbHdl.cpp: expected ‘)’ before ‘PRIu32’
I'm getting the following error:
```
In file included from cocotb/share/include/gpi.h:60,
from cocotb/share/lib/vhpi/../gpi/gpi_priv.h:32,
from cocotb/share/lib/vhpi/VhpiImpl.h:31,
from cocotb/sh... | [
{
"content": "# Copyright cocotb contributors\n# Licensed under the Revised BSD License, see LICENSE for details.\n# SPDX-License-Identifier: BSD-3-Clause\n\nimport os\nimport sys\nimport sysconfig\nimport logging\nimport distutils\nimport subprocess\n\nfrom setuptools import Extension\nfrom distutils.spawn imp... | [
{
"content": "# Copyright cocotb contributors\n# Licensed under the Revised BSD License, see LICENSE for details.\n# SPDX-License-Identifier: BSD-3-Clause\n\nimport os\nimport sys\nimport sysconfig\nimport logging\nimport distutils\nimport subprocess\n\nfrom setuptools import Extension\nfrom distutils.spawn imp... | diff --git a/cocotb/_build_libs.py b/cocotb/_build_libs.py
index 652d00f4f8..d9fc228d34 100755
--- a/cocotb/_build_libs.py
+++ b/cocotb/_build_libs.py
@@ -166,6 +166,9 @@ def _get_python_lib():
_extra_cc_compile_args = ["-std=gnu99"] + _cc_warns
_extra_cxx_compile_args = ["-std=c++11"] + _ccx_warns
+# Make PRI* for... |
googleapis__google-cloud-python-8440 | Storage: Client.download_blob_to_file fails.
`Client.download_blob_to_file()` does not work properly when passing a URI because the parsed path which is passed as a blob name has the initial `/` .
https://github.com/googleapis/google-cloud-python/blob/master/storage/google/cloud/storage/client.py#L389-L395
It sho... | [
{
"content": "# Copyright 2015 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
{
"content": "# Copyright 2015 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | diff --git a/storage/google/cloud/storage/client.py b/storage/google/cloud/storage/client.py
index 7452d7adcd2b..14643e27b3c8 100644
--- a/storage/google/cloud/storage/client.py
+++ b/storage/google/cloud/storage/client.py
@@ -390,7 +390,7 @@ def download_blob_to_file(self, blob_or_uri, file_obj, start=None, end=None):... |
internetarchive__openlibrary-6994 | Pagination broken on trending pages
```
<class 'TypeError'> at /trending/daily
unsupported operand type(s) for -: 'str' and 'int'
```
### Evidence / Screenshot (if possible)

### Relevant url?
- eg h... | [
{
"content": "import logging\nfrom datetime import date\nfrom typing import Literal, Optional, cast\nfrom collections.abc import Iterable\n\nfrom openlibrary.utils.dateutil import DATE_ONE_MONTH_AGO, DATE_ONE_WEEK_AGO\n\nfrom . import db\n\nlogger = logging.getLogger(__name__)\n\n\nclass Bookshelves(db.CommonEx... | [
{
"content": "import logging\nfrom datetime import date\nfrom typing import Literal, Optional, cast\nfrom collections.abc import Iterable\n\nfrom openlibrary.utils.dateutil import DATE_ONE_MONTH_AGO, DATE_ONE_WEEK_AGO\n\nfrom . import db\n\nlogger = logging.getLogger(__name__)\n\n\nclass Bookshelves(db.CommonEx... | diff --git a/openlibrary/core/bookshelves.py b/openlibrary/core/bookshelves.py
index a1f74849f26..6c24bfec280 100644
--- a/openlibrary/core/bookshelves.py
+++ b/openlibrary/core/bookshelves.py
@@ -88,6 +88,7 @@ def most_logged_books(
users. This query is limited to a specific shelf_id (e.g. 1
for "Wan... |
open-telemetry__opentelemetry-python-551 | Flask instrumentation example doesn't work
**Describe your environment**
Running on MacOS against the latest `mater` version of the `opentelemetry-*` packages.
**Steps to reproduce**
Instrument the app as described in the [docs](https://open-telemetry.github.io/opentelemetry-python/ext/flask/flask.html) and [docst... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/docs/getting-started.rst b/docs/getting-started.rst
index bbd696015fb..47c19e32fcc 100644
--- a/docs/getting-started.rst
+++ b/docs/getting-started.rst
@@ -184,12 +184,14 @@ And let's write a small Flask application that sends an HTTP request, activating
.. code-block:: python
# flask_example.py
+ ... |
google__jax-2616 | jax_debug_nans does not work with complex numbers
Running with flag --jax_debug_nans:
With this this, I get no error (but I do get nans):
```
@jax.jit
def fn(x):
return (x * 0.) / jnp.zeros_like(x)
print(fn(1j * jnp.ones([2, 3])))
```
but with this, I get an error (as expected):
```
@jax.jit
... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/jax/interpreters/xla.py b/jax/interpreters/xla.py
index 6c9680063fb2..b1cd5ac9b234 100644
--- a/jax/interpreters/xla.py
+++ b/jax/interpreters/xla.py
@@ -279,7 +279,7 @@ def check_nans(prim, bufs):
def _check_nans(name, xla_shape, buf):
assert not xla_shape.is_tuple()
- if dtypes.issubdtype(xla_shap... |
obspy__obspy-3127 | IRIS federator routing client does not match https:// URLs — affects RASPISHAKE
### Avoid duplicates
- [X] I searched existing issues
### Bug Summary
I noticed that the `RoutingClient('iris-federator')` was never returning stations / data from the RASPISHAKE data center. Digging in, I found this line in the **... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nRouting client for the IRIS federator routing service.\n\n:copyright:\n The ObsPy Development Team (devs@obspy.org)\n Celso G Reyes, 2017\n IRIS-DMC\n:license:\n GNU Lesser General Public License, Version 3\n (https://www.gnu.org/copyleft/lesser.html... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nRouting client for the IRIS federator routing service.\n\n:copyright:\n The ObsPy Development Team (devs@obspy.org)\n Celso G Reyes, 2017\n IRIS-DMC\n:license:\n GNU Lesser General Public License, Version 3\n (https://www.gnu.org/copyleft/lesser.html... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index e28ecb3d6a0..c7129c61006 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -11,6 +11,9 @@ Changes:
intersection of equator and prime meridian (see #3067)
- obspy.clients.fdsn:
* add URL mapping 'EIDA' for http://eida-federator.ethz.ch (see #3050)
+ * Fix is... |
spack__spack-3415 | bison doesn't find m4 at run time
While building `flex`, I had `bison` fail because it could not execute `m4`. The reason was that I had uninstalled the `m4` package (via Spack) which `bison` installed as its build dependency. Then, `bison` failed since this `m4` executable did not exist any more.
I think `m4` needs... | [
{
"content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ... | [
{
"content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ... | diff --git a/var/spack/repos/builtin/packages/autoconf/package.py b/var/spack/repos/builtin/packages/autoconf/package.py
index 3dcf8f36b5f03e..694622fe8069fe 100644
--- a/var/spack/repos/builtin/packages/autoconf/package.py
+++ b/var/spack/repos/builtin/packages/autoconf/package.py
@@ -36,7 +36,9 @@ class Autoconf(Auto... |
Textualize__textual-2981 | `Switch` should stop the `Click` event from bubbling
At the moment `Switch` handles `Click` but then lets it bubble; there's no good reason to do that and it also stops the ability to write something like this:
```python
from textual.app import App, ComposeResult
from textual.containers import Horizontal
f... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, ClassVar\n\nfrom rich.console import RenderableType\n\nfrom ..binding import Binding, BindingType\nfrom ..events import Click\nfrom ..geometry import Size\nfrom ..message import Message\nfrom ..reactive import reactive\nfrom .... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, ClassVar\n\nfrom rich.console import RenderableType\n\nfrom ..binding import Binding, BindingType\nfrom ..events import Click\nfrom ..geometry import Size\nfrom ..message import Message\nfrom ..reactive import reactive\nfrom .... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6d9b2b2171..bf9a3b79b2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- Fixed a crash when a `SelectionList` had a prompt wider than itself https://github.com/Textualize/te... |
Kinto__kinto-1001 | Add a Total-Records header to delete on plural endpoints
For consistency with GET, now that we support pagination on DELETE.
| [
{
"content": "import re\nimport functools\n\nimport colander\nimport venusian\nimport six\nfrom pyramid import exceptions as pyramid_exceptions\nfrom pyramid.decorator import reify\nfrom pyramid.security import Everyone\nfrom pyramid.httpexceptions import (HTTPNotModified, HTTPPreconditionFailed,\n ... | [
{
"content": "import re\nimport functools\n\nimport colander\nimport venusian\nimport six\nfrom pyramid import exceptions as pyramid_exceptions\nfrom pyramid.decorator import reify\nfrom pyramid.security import Everyone\nfrom pyramid.httpexceptions import (HTTPNotModified, HTTPPreconditionFailed,\n ... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 3fa009c32..e6919764b 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -13,6 +13,11 @@ This document describes changes between each past release.
Protocol is now at version **1.14**. See `API changelog`_.
+**Bug fixes**
+
+- Add missing ``Total-Records`` field on ``... |
modin-project__modin-4553 | TEST: "build docs" CI action is broken with SphinxWarning: Invalid configuration value found: 'language = None'.
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: macOS Monterey
- **Modin version** (`modin.__version__`): 0477c688972bee89250d75835ff543db27f2e0d5
- **Python version*... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/stable/config\n\n# -- Project information ---------------------... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/stable/config\n\n# -- Project information ---------------------... | diff --git a/docs/conf.py b/docs/conf.py
index 368cb96e900..78b31fba39e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -98,7 +98,7 @@ def noop_decorator(*args, **kwargs):
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
-la... |
nf-core__tools-2075 | Lint linter config for Python < 3.6 and issue warning if Actions are using Python 3.6 and older
### Description of the bug
```
Run nf-core -l lint_log.txt lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md
```
```python
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.6.15/x64/bin... | [
{
"content": "#!/usr/bin/env python\n\nfrom setuptools import find_packages, setup\n\nversion = \"2.7dev\"\n\nwith open(\"README.md\") as f:\n readme = f.read()\n\nwith open(\"requirements.txt\") as f:\n required = f.read().splitlines()\n\nsetup(\n name=\"nf-core\",\n version=version,\n descripti... | [
{
"content": "#!/usr/bin/env python\n\nfrom setuptools import find_packages, setup\n\nversion = \"2.7dev\"\n\nwith open(\"README.md\") as f:\n readme = f.read()\n\nwith open(\"requirements.txt\") as f:\n required = f.read().splitlines()\n\nsetup(\n name=\"nf-core\",\n version=version,\n descripti... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 462ad0699e..2036117041 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -40,6 +40,7 @@
- Don't print source file + line number on logging messages (except when verbose) ([#2015](https://github.com/nf-core/tools/pull/2015))
- Extended the chat notifications to Slack ([#182... |
mars-project__mars-2524 | [BUG] df.loc failed when df is empty: RuntimeError: generator raised StopIteration
<!--
Thank you for your contribution!
Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue.
-->
**Describe the bug**
df.loc failed when df is empty: RuntimeError: generator ra... | [
{
"content": "# Copyright 1999-2021 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | [
{
"content": "# Copyright 1999-2021 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | diff --git a/mars/dataframe/indexing/index_lib.py b/mars/dataframe/indexing/index_lib.py
index 130c0f3d0c..b5ad90aa9d 100644
--- a/mars/dataframe/indexing/index_lib.py
+++ b/mars/dataframe/indexing/index_lib.py
@@ -786,8 +786,8 @@ def process(self,
chunk_labels = chunk_index_to_labels[i]
size ... |
python__typeshed-10667 | Stubsabot failed on Wed Sep 06 2023
Stubsabot runs are listed here: https://github.com/python/typeshed/actions/workflows/stubsabot.yml
| [
{
"content": "#!/usr/bin/env python3\nfrom __future__ import annotations\n\nimport argparse\nimport asyncio\nimport contextlib\nimport datetime\nimport enum\nimport functools\nimport io\nimport os\nimport re\nimport subprocess\nimport sys\nimport tarfile\nimport textwrap\nimport urllib.parse\nimport zipfile\nfr... | [
{
"content": "#!/usr/bin/env python3\nfrom __future__ import annotations\n\nimport argparse\nimport asyncio\nimport contextlib\nimport datetime\nimport enum\nimport functools\nimport io\nimport os\nimport re\nimport subprocess\nimport sys\nimport tarfile\nimport textwrap\nimport urllib.parse\nimport zipfile\nfr... | diff --git a/scripts/stubsabot.py b/scripts/stubsabot.py
index f58ee5e5a953..52d160080228 100644
--- a/scripts/stubsabot.py
+++ b/scripts/stubsabot.py
@@ -223,7 +223,7 @@ def get_updated_version_spec(spec: str, version: packaging.version.Version) -> s
spec="1.1.1.*", version="1.2.3" -> "1.2.3.*"
"""
if n... |
jazzband__django-oauth-toolkit-653 | Cannot revoke OAuth2 RefreshToken without related Token
##### SUMMARY
Django-OAuth-Toolkit supports deleting a token, but does not cascade on delete for it's RefreshToken anymore as of DOT 1.1.2. This creates an issue when you try to revoke a RefreshToken that no longer has an associated AccessToken. This will cause... | [
{
"content": "from datetime import timedelta\nfrom urllib.parse import parse_qsl, urlparse\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.db import models, transaction\nfrom django.urls import reverse\nfrom django.utils imp... | [
{
"content": "from datetime import timedelta\nfrom urllib.parse import parse_qsl, urlparse\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.db import models, transaction\nfrom django.urls import reverse\nfrom django.utils imp... | diff --git a/oauth2_provider/models.py b/oauth2_provider/models.py
index 0afd8f89d..6f7cc096e 100644
--- a/oauth2_provider/models.py
+++ b/oauth2_provider/models.py
@@ -377,7 +377,10 @@ def revoke(self):
if not self:
return
- access_token_model.objects.get(id=self.access_token... |
conan-io__conan-8605 | [bug] conan config install skips files if ".git" is in the path
I had set my `CONAN_USER_HOME` env-var to "$HOME/.gitlab-conan" (doesn't matter why).
Later, I ran the `conan config install` command, providing a git repo that stores shared-company config, but that command has appeared to silently fail, or do nothing ... | [
{
"content": "import json\nimport os\nimport shutil\n\nfrom datetime import datetime\nfrom dateutil.tz import gettz\n\nfrom contextlib import contextmanager\nfrom six.moves.urllib.parse import urlparse\n\nfrom conans import load\nfrom conans.client import tools\nfrom conans.client.cache.remote_registry import l... | [
{
"content": "import json\nimport os\nimport shutil\n\nfrom datetime import datetime\nfrom dateutil.tz import gettz\n\nfrom contextlib import contextmanager\nfrom six.moves.urllib.parse import urlparse\n\nfrom conans import load\nfrom conans.client import tools\nfrom conans.client.cache.remote_registry import l... | diff --git a/conans/client/conf/config_installer.py b/conans/client/conf/config_installer.py
index 7c0f4e48d5d..a2aae34fdb4 100644
--- a/conans/client/conf/config_installer.py
+++ b/conans/client/conf/config_installer.py
@@ -130,8 +130,6 @@ def _process_folder(config, folder, cache, output):
folder = os.path.j... |
xonsh__xonsh-2172 | script that calls ssh gets interrupted
```
laerus@xonsh$ cat autossh
ssh laerus@192.168.1.10
laerus@xonsh$ ./autossh
^Z <--- didn't press anything here, this comes from xonsh or ssh
```
tried again with a non-lan remote
```
laerus@xonsh$ ./autossh
^Z
tcsetattr: Interrupted system call
```
| [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"The xonsh built-ins.\n\nNote that this module is named 'built_ins' so as not to be confused with the\nspecial Python builtins module.\n\"\"\"\nimport io\nimport os\nimport re\nimport sys\nimport time\nimport types\nimport shlex\nimport signal\nimport atexit\nimport p... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"The xonsh built-ins.\n\nNote that this module is named 'built_ins' so as not to be confused with the\nspecial Python builtins module.\n\"\"\"\nimport io\nimport os\nimport re\nimport sys\nimport time\nimport types\nimport shlex\nimport signal\nimport atexit\nimport p... | diff --git a/news/xonsh-script-fix.rst b/news/xonsh-script-fix.rst
new file mode 100644
index 0000000000..e42eeec3ed
--- /dev/null
+++ b/news/xonsh-script-fix.rst
@@ -0,0 +1,13 @@
+**Added:** None
+
+**Changed:** None
+
+**Deprecated:** None
+
+**Removed:** None
+
+**Fixed:**
+
+* Fixed a ``tcsetattr: Interrupted syste... |
fedora-infra__bodhi-2399 | search box doesn't sanitize trailing spaces
when one searches for a package and mistakenly hits an extra space after the package name, the search box doesn't sanitize. On the other hand, the URL if is passed with search=foo<some space> gets sanitized automatically.
| [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright © 2013-2017 Red Hat, Inc. and others.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either ve... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright © 2013-2017 Red Hat, Inc. and others.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either ve... | diff --git a/bodhi/server/schemas.py b/bodhi/server/schemas.py
index c0f40ca36a..33335de382 100644
--- a/bodhi/server/schemas.py
+++ b/bodhi/server/schemas.py
@@ -281,12 +281,14 @@ class SearchableSchema(colander.MappingSchema):
colander.String(),
location="querystring",
missing=None,
+ ... |
conda-forge__conda-smithy-16 | Calling conda smithy github-create with --user raises exception
When I invoke `oncda smithy` to create a github repo (after setting the token correctly) I get this:
``` python
$ conda smithy github-create --user mwcraig mrjob-feedstock/
Traceback (most recent call last):
File "/Users/mcraig/miniconda/bin/conda-smith... | [
{
"content": "#!/usr/bin/env python\nfrom __future__ import print_function, absolute_import\n\nimport os\nimport requests\nimport subprocess\nimport sys\nimport argparse\n\nfrom conda_build.metadata import MetaData\n\nimport conda_smithy.configure_circle_ci as configure_circle_ci\nimport conda_smithy.configure_... | [
{
"content": "#!/usr/bin/env python\nfrom __future__ import print_function, absolute_import\n\nimport os\nimport requests\nimport subprocess\nimport sys\nimport argparse\n\nfrom conda_build.metadata import MetaData\n\nimport conda_smithy.configure_circle_ci as configure_circle_ci\nimport conda_smithy.configure_... | diff --git a/conda_smithy/conda_smithy.py b/conda_smithy/conda_smithy.py
index 7f7149c60..24577ddf1 100755
--- a/conda_smithy/conda_smithy.py
+++ b/conda_smithy/conda_smithy.py
@@ -91,7 +91,7 @@ def __call__(self, args):
if args.user is not None:
pass
# User has been defined, and orga... |
networkx__networkx-768 | Pajek exporter should not write first line "*network NetworkX"
Currently, the first line of a pajek file created by networkx looks like:
```
*network NetworkX
```
Many programs that import pajek files crash, because they expect the first line to be
```
*vertices 762
```
Given that the `*network NetworkX` serves no... | [
{
"content": "\"\"\"\n*****\nPajek\n*****\nRead graphs in Pajek format.\n\nThis implementation handles directed and undirected graphs including\nthose with self loops and parallel edges. \n\nFormat\n------\nSee http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm\nfor format information.\n\"\"\"\n# ... | [
{
"content": "\"\"\"\n*****\nPajek\n*****\nRead graphs in Pajek format.\n\nThis implementation handles directed and undirected graphs including\nthose with self loops and parallel edges. \n\nFormat\n------\nSee http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm\nfor format information.\n\"\"\"\n# ... | diff --git a/networkx/readwrite/pajek.py b/networkx/readwrite/pajek.py
index f36f969808b..ffc36414c29 100644
--- a/networkx/readwrite/pajek.py
+++ b/networkx/readwrite/pajek.py
@@ -37,10 +37,12 @@ def generate_pajek(G):
for format information.
"""
if G.name=='':
- name='NetworkX'
+ name='Ne... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.