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 ⌀ |
|---|---|---|---|---|
Zeroto521__my-data-toolkit-413 | DEV: rename master to main
https://github.com/github/renaming
| [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options.\n# For a full list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n\n# -- Project information --------------------------------... | [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options.\n# For a full list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n\n# -- Project information --------------------------------... | diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml
index 85321de1a..5dead9ef5 100644
--- a/.github/workflows/branch.yml
+++ b/.github/workflows/branch.yml
@@ -2,7 +2,7 @@ name: branch
on:
push:
- branches: [master]
+ branches: [main]
jobs:
branch:
diff --git a/.github/workflows/c... |
biolab__orange3-4098 | File: conversion to string destroys datetime
**Describe the bug**
File widget does not convert datetime to string appropriately.
**To Reproduce**
File (open any dataset with datetime)
Convert datetime into text.
Observe the result in Data Table.
**Orange version:**
3.23.dev
**Expected behavior**
String v... | [
{
"content": "from itertools import chain\nfrom copy import deepcopy\n\nimport numpy as np\nimport scipy.sparse as sp\n\nfrom AnyQt.QtCore import Qt, QAbstractTableModel\nfrom AnyQt.QtGui import QColor, QFont\nfrom AnyQt.QtWidgets import QComboBox, QTableView, QSizePolicy\n\nfrom Orange.data import DiscreteVari... | [
{
"content": "from itertools import chain\nfrom copy import deepcopy\n\nimport numpy as np\nimport scipy.sparse as sp\n\nfrom AnyQt.QtCore import Qt, QAbstractTableModel\nfrom AnyQt.QtGui import QColor, QFont\nfrom AnyQt.QtWidgets import QComboBox, QTableView, QSizePolicy\n\nfrom Orange.data import DiscreteVari... | diff --git a/Orange/widgets/utils/domaineditor.py b/Orange/widgets/utils/domaineditor.py
index 795481920a0..3ce1d2ae2d9 100644
--- a/Orange/widgets/utils/domaineditor.py
+++ b/Orange/widgets/utils/domaineditor.py
@@ -313,7 +313,7 @@ def numbers_are_round(var, col_data):
col_data = self._to_column(col_d... |
googleapis__python-bigquery-643 | deps: expand extras to support pyarrow v4
We're actually already testing with pyarrow v4 in some of the samples tests, so this should be safe to expand in our `setup.py`
| [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | diff --git a/setup.py b/setup.py
index 607ffb63f..6a6202ef9 100644
--- a/setup.py
+++ b/setup.py
@@ -47,10 +47,10 @@
# grpc.Channel.close() method isn't added until 1.32.0.
# https://github.com/grpc/grpc/pull/15254
"grpcio >= 1.32.0, < 2.0dev",
- "pyarrow >= 1.0.0, < 4.0dev",
+ ... |
mitmproxy__mitmproxy-2041 | Add PyInstaller indicator to `mitmproxy --version`
We currently cannot distinguish if users use our precompiled binaries or if they installed mitmproxy using pip/brew/$packagemanager. It would be very useful to output if we are running the precompiled PyInstaller binary.
https://pythonhosted.org/PyInstaller/runtime... | [
{
"content": "import gc\nimport os\nimport sys\nimport threading\nimport signal\nimport platform\nimport traceback\nimport subprocess\n\nfrom mitmproxy import version\nfrom mitmproxy import utils\n\nfrom OpenSSL import SSL\n\n\ndef dump_system_info():\n git_describe = 'release version'\n with utils.chdir(... | [
{
"content": "import gc\nimport os\nimport sys\nimport threading\nimport signal\nimport platform\nimport traceback\nimport subprocess\n\nfrom mitmproxy import version\nfrom mitmproxy import utils\n\nfrom OpenSSL import SSL\n\n\ndef dump_system_info():\n git_describe = 'release version'\n with utils.chdir(... | diff --git a/mitmproxy/utils/debug.py b/mitmproxy/utils/debug.py
index ff98b86cf1..c2eee2b6c0 100644
--- a/mitmproxy/utils/debug.py
+++ b/mitmproxy/utils/debug.py
@@ -37,8 +37,12 @@ def dump_system_info():
except:
pass
+ bin_indicator = "" # PyInstaller builds indicator, if using precompiled... |
google__osv.dev-487 | Make ecosystem counts in UI more accurate.
Currently these counts include withdrawn/invalid entries.
Context: https://github.com/google/osv/issues/468#issuecomment-1169755263
| [
{
"content": "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/gcp/appengine/frontend_handlers.py b/gcp/appengine/frontend_handlers.py
index ce85557f228..7b0452ef2ad 100644
--- a/gcp/appengine/frontend_handlers.py
+++ b/gcp/appengine/frontend_handlers.py
@@ -217,12 +217,15 @@ def osv_get_ecosystem_counts():
counts = {}
ecosystems = osv_get_ecosystems()
for ec... |
bentoml__BentoML-4257 | bug: unable to start BentoML container in RayServe
### Describe the bug
followed instructions at https://docs.bentoml.org/en/latest/integrations/ray.html
ray serve attempts to instantiate container, but trips up:
2023-10-30 23:45:22,446 INFO scripts.py:471 -- Running import path: 'bento_ray:classifier'.
Traceba... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\nfrom functools import partial\n\nimport requests\n\nfrom ._internal.utils import pkg\n\nif pkg.pkg_version_info(\"ray\")[:2] >= (2, 5):\n from ray.serve._private.http_util import BufferedASGISender as ASGIHTTPSender\nelse:\n from ray.... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\nfrom functools import partial\n\nimport requests\n\nfrom ..._internal.utils import pkg\n\nif pkg.pkg_version_info(\"ray\")[:2] >= (2, 5):\n from ray.serve._private.http_util import BufferedASGISender as ASGIHTTPSender\nelse:\n from ra... | diff --git a/src/bentoml/_internal/ray/__init__.py b/src/bentoml/_internal/ray/__init__.py
index a13d09ce194..9d947a44871 100644
--- a/src/bentoml/_internal/ray/__init__.py
+++ b/src/bentoml/_internal/ray/__init__.py
@@ -5,7 +5,7 @@
import requests
-from ._internal.utils import pkg
+from ..._internal.utils import ... |
celery__celery-8806 | Celery beat UnicodeDecodeError (Python 3.4) issue
I am using Python 3.4 with Celery 3.1.19
Running without beat it works properly:
```
celery worker --app worker --config=celeryconfig --loglevel=info
```
But with celery beat:
```
celery worker --app worker -B --config=celeryconfig --loglevel=info
```
I got this ex... | [
{
"content": "\"\"\"The periodic task scheduler.\"\"\"\n\nimport copy\nimport errno\nimport heapq\nimport os\nimport shelve\nimport sys\nimport time\nimport traceback\nfrom calendar import timegm\nfrom collections import namedtuple\nfrom functools import total_ordering\nfrom threading import Event, Thread\n\nfr... | [
{
"content": "\"\"\"The periodic task scheduler.\"\"\"\n\nimport copy\nimport errno\nimport heapq\nimport os\nimport shelve\nimport sys\nimport time\nimport traceback\nfrom calendar import timegm\nfrom collections import namedtuple\nfrom functools import total_ordering\nfrom threading import Event, Thread\n\nfr... | diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index e0a8394bc6f..6159effcc3a 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -295,4 +295,5 @@ JoonHwan Kim, 2022/08/01
Kaustav Banerjee, 2022/11/10
Austin Snoeyink 2022/12/06
Jeremy Z. Othieno 2023/07/27
-Tomer Nosrati, 2022/17/07
\ No newline at end of file... |
arviz-devs__arviz-1001 | Clarify usage of `plot_joint`
## Short Description
The description of how to use `plot_joint` is not very clear about the use and meaning of parameters.
This is partly a usage question and partly a request for documentation improvement.
## Code Example or link
Looking at the docs for `arviz.plot_joint`, I s... | [
{
"content": "\"\"\"Joint scatter plot of two variables.\"\"\"\nfrom ..data import convert_to_dataset\nfrom .plot_utils import _scale_fig_size, xarray_var_iter, get_coords, get_plotting_function\nfrom ..utils import _var_names\n\n\ndef plot_joint(\n data,\n var_names=None,\n coords=None,\n figsize=N... | [
{
"content": "\"\"\"Joint scatter plot of two variables.\"\"\"\nfrom ..data import convert_to_dataset\nfrom .plot_utils import _scale_fig_size, xarray_var_iter, get_coords, get_plotting_function\nfrom ..utils import _var_names\n\n\ndef plot_joint(\n data,\n var_names=None,\n coords=None,\n figsize=N... | diff --git a/arviz/plots/jointplot.py b/arviz/plots/jointplot.py
index 7f0e366037..b73f350b41 100644
--- a/arviz/plots/jointplot.py
+++ b/arviz/plots/jointplot.py
@@ -29,8 +29,9 @@ def plot_joint(
data : obj
Any object that can be converted to an az.InferenceData object
Refer to documentation of ... |
archlinux__archinstall-860 | Don't check if file path ends with .json
When trying to use a path to a file that does not end with `.json`, the script interprets it as a json string, rather then a file path.
Relevant code: https://github.com/archlinux/archinstall/blob/7f0e031c66e3f5adb1cf72542b1fde7e86aa5116/examples/guided.py#L54
Quoted from ... | [
{
"content": "import json\nimport logging\nimport os\nimport pathlib\nimport time\n\nimport archinstall\n\nif archinstall.arguments.get('help'):\n\tprint(\"See `man archinstall` for help.\")\n\texit(0)\nif os.getuid() != 0:\n\tprint(\"Archinstall requires root privileges to run. See --help for more.\")\n\texit(... | [
{
"content": "import json\nimport logging\nimport os\nimport pathlib\nimport time\n\nimport archinstall\n\nif archinstall.arguments.get('help'):\n\tprint(\"See `man archinstall` for help.\")\n\texit(0)\nif os.getuid() != 0:\n\tprint(\"Archinstall requires root privileges to run. See --help for more.\")\n\texit(... | diff --git a/examples/guided.py b/examples/guided.py
index 760866fc4f..36e9f7dfe9 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -51,7 +51,7 @@ def load_config():
if archinstall.arguments.get('servers', None) is not None:
archinstall.storage['_selected_servers'] = archinstall.arguments.get('servers', ... |
googleapis__python-bigquery-833 | Expand pyarrow to support 5.x releases
Changelog: https://raw.githubusercontent.com/apache/arrow/4591d76fce2846a29dac33bf01e9ba0337b118e9/CHANGELOG.md
| [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | diff --git a/setup.py b/setup.py
index 0ca19b576..e9deaf117 100644
--- a/setup.py
+++ b/setup.py
@@ -54,10 +54,10 @@
# grpc.Channel.close() method isn't added until 1.32.0.
# https://github.com/grpc/grpc/pull/15254
"grpcio >= 1.38.1, < 2.0dev",
- "pyarrow >= 1.0.0, < 5.0dev",
+ ... |
ivy-llc__ivy-15998 | multiply
| [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@with_unsupported_dtypes({\"2.4.2 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_array... | [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@with_unsupported_dtypes({\"2.4.2 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_array... | diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py
index 085686e55f612..ecaa4bbc1979d 100644
--- a/ivy/functional/frontends/paddle/tensor/math.py
+++ b/ivy/functional/frontends/paddle/tensor/math.py
@@ -66,6 +66,24 @@ def divide(x, y, name=None):
return ivy... |
open-telemetry__opentelemetry-python-2303 | _OTEL_METRICS_EXPORTER env var should be OTEL_METRICS_EXPORTER
The environment variable `_OTEL_METRICS_EXPORTER` is prefixed with an underscore, but there's no need for it as that environment variable is marked as stable in the specification https://github.com/open-telemetry/opentelemetry-specification/blob/main/specif... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c7e3c2fce16..36772a49eb2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Adds Aggregation and instruments as part of Metrics SDK
([#2234](https://github.com/open-telemetry... |
microsoft__playwright-python-547 | Port the postData fix
https://github.com/microsoft/playwright/pull/5736
| [
{
"content": "# Copyright (c) Microsoft Corporation.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | diff --git a/playwright/_impl/_network.py b/playwright/_impl/_network.py
index 66c8a7275..3f42da657 100644
--- a/playwright/_impl/_network.py
+++ b/playwright/_impl/_network.py
@@ -85,11 +85,12 @@ def post_data_json(self) -> Optional[Any]:
if not post_data:
return None
content_type = self... |
spyder-ide__spyder-7168 | Add Astropy to default UMR blacklist for Python 2.7 due to resulting bug
## Problem Description
Need a place to document known Spyder issue with Astropy. There is a PR at astropy/astropy#7374 but we feel it belongs more to your documentation over here. Please advise.
### What steps will reproduce the problem?
... | [
{
"content": "#\r\n# Copyright (c) Spyder Project Contributors)\r\n# Licensed under the terms of the MIT License)\r\n# (see spyder/__init__.py for details)\r\n#\r\n# IMPORTANT NOTE: Don't add a coding line here! It's not necessary for\r\n# site files\r\n#\r\n# Spyder consoles sitecustomize\r\n#\r\n\r\nimport bd... | [
{
"content": "#\r\n# Copyright (c) Spyder Project Contributors)\r\n# Licensed under the terms of the MIT License)\r\n# (see spyder/__init__.py for details)\r\n#\r\n# IMPORTANT NOTE: Don't add a coding line here! It's not necessary for\r\n# site files\r\n#\r\n# Spyder consoles sitecustomize\r\n#\r\n\r\nimport bd... | diff --git a/spyder/utils/site/sitecustomize.py b/spyder/utils/site/sitecustomize.py
index dc9769f8e79..08857d24afe 100644
--- a/spyder/utils/site/sitecustomize.py
+++ b/spyder/utils/site/sitecustomize.py
@@ -555,7 +555,13 @@ def __init__(self, namelist=None, pathlist=None):
namelist = []
spy_mod... |
google__fuzzbench-1604 | trials not launching in local experiment
I'm running into an issue running local experiments: the dispatcher fails to launch any of the individual trials. Even waiting for hours, no trials are launched, though the system appears to still be checking for coverage data in the measurement loop from the logs.
This happe... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/common/gcloud.py b/common/gcloud.py
index f213e7773..f2c0d3cfb 100644
--- a/common/gcloud.py
+++ b/common/gcloud.py
@@ -130,10 +130,9 @@ def run_local_instance(startup_script: Optional[str] = None) -> bool:
"""Does the equivalent of "create_instance" for local experiments, runs
|startup_script| i... |
django-wiki__django-wiki-961 | (1048, "Column 'revision_number' cannot be null") Wiki_images plugin
This is my first git-issue post so go easy
**dev computer: Django=2.1.7, Python 3.7.3
Server: Django=2.1.7 Python 3.5.3
Tried both latest and stable versions of Django-wiki**
When trying to upload images via the Django admin, I'm faced wit... | [
{
"content": "import os.path\n\nfrom django.conf import settings as django_settings\nfrom django.db import models\nfrom django.db.models import signals\nfrom django.utils.translation import gettext, gettext_lazy as _\nfrom wiki.models.pluginbase import RevisionPlugin, RevisionPluginRevision\n\nfrom . import set... | [
{
"content": "import os.path\n\nfrom django.conf import settings as django_settings\nfrom django.db import models\nfrom django.db.models import signals\nfrom django.utils.translation import gettext, gettext_lazy as _\nfrom wiki.models.pluginbase import RevisionPlugin, RevisionPluginRevision\n\nfrom . import set... | diff --git a/docs/release_notes.rst b/docs/release_notes.rst
index 912234e16..7872ac209 100644
--- a/docs/release_notes.rst
+++ b/docs/release_notes.rst
@@ -11,6 +11,15 @@ Release plan
* **0.5** should remove Django 1.11 support and target Bootstrap v4, if you are interested in this work, please get in touch on Github... |
spyder-ide__spyder-9436 | Only require PyWebEngine on Python 3+ to avoid blocking py2 compat in pip wheels
<!--- **PLEASE READ:** When submitting here, please ensure you've completed the following checklist and checked the boxes to confirm. Issue reports without it may be closed. Thanks! --->
## Problem Description
Currently, Spyder 3.3.4... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"\nSpyder\n======\n\nThe Scientific Python Development Environment\n\nSpyder is a powerful scientific environment written in Python, ... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"\nSpyder\n======\n\nThe Scientific Python Development Environment\n\nSpyder is a powerful scientific environment written in Python, ... | diff --git a/setup.py b/setup.py
index 6b90e7aa1b3..9334c2f914f 100644
--- a/setup.py
+++ b/setup.py
@@ -241,7 +241,7 @@ def run(self):
'pyqt5<5.13;python_version>="3"',
# pyqt5 5.12 split WebEngine into the
# pyqtwebengine module
- 'pyqtwebengine<5.13'
+ 'pyqtwebengine<5.13;python_version>="3"'
]... |
GPflow__GPflow-1355 | setup.py depends on external dataclasses package for python >= 3.8
Setup.py has a check
```python
is_py37 = sys.version_info.major == 3 and sys.version_info.minor == 7
```
and adds the PyPI `dataclasses` package to the requirements when `not is_py37`. (`dataclasses` has been incorporated in the stdlib in python 3.7... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# pylint: skip-file\n\nimport os\nimport sys\nfrom pathlib import Path\n\nfrom pkg_resources import parse_version\nfrom setuptools import find_packages, setup\n\nis_py37 = sys.version_info.major == 3 and sys.version_info.minor == 7\non_rtd = os.env... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# pylint: skip-file\n\nimport os\nimport sys\nfrom pathlib import Path\n\nfrom pkg_resources import parse_version\nfrom setuptools import find_packages, setup\n\non_rtd = os.environ.get(\"READTHEDOCS\", None) == \"True\" # copied from the docs\n\n... | diff --git a/setup.py b/setup.py
index 388ce3aac..ed0ff45a1 100644
--- a/setup.py
+++ b/setup.py
@@ -10,13 +10,13 @@
from pkg_resources import parse_version
from setuptools import find_packages, setup
-is_py37 = sys.version_info.major == 3 and sys.version_info.minor == 7
on_rtd = os.environ.get("READTHEDOCS", None... |
scverse__scanpy-1188 | normalize_total throws ValueError when passed a large view
When I run sc.pp.normalize_total(adata, target_sum=1e4),I got the error:ValueError: could not convert integer scalar,and How can I fixed this issue?
| [
{
"content": "from typing import Optional, Union, Iterable, Dict\n\nimport numpy as np\nfrom anndata import AnnData\nfrom scipy.sparse import issparse\nfrom sklearn.utils import sparsefuncs\n\nfrom .. import logging as logg\nfrom .._compat import Literal\n\n\ndef _normalize_data(X, counts, after=None, copy=Fals... | [
{
"content": "from typing import Optional, Union, Iterable, Dict\n\nimport numpy as np\nfrom anndata import AnnData\nfrom scipy.sparse import issparse\nfrom sklearn.utils import sparsefuncs\n\nfrom .. import logging as logg\nfrom .._compat import Literal\nfrom .._utils import view_to_actual\n\n\ndef _normalize_... | diff --git a/scanpy/preprocessing/_normalization.py b/scanpy/preprocessing/_normalization.py
index 2b0f4d71bc..8c0a90aa2a 100644
--- a/scanpy/preprocessing/_normalization.py
+++ b/scanpy/preprocessing/_normalization.py
@@ -7,6 +7,7 @@
from .. import logging as logg
from .._compat import Literal
+from .._utils impor... |
DataBiosphere__toil-562 | Need `toil --version`
Need `toil --version`
| [
{
"content": "from __future__ import absolute_import, print_function\nimport os\nimport sys\n\ndef main():\n modules = loadModules()\n try:\n command = sys.argv[1]\n except IndexError:\n printHelp(modules)\n else:\n if command == '--help':\n printHelp(modules)\n ... | [
{
"content": "from __future__ import absolute_import, print_function\nfrom toil.version import version\nimport pkg_resources\nimport os\nimport sys\n\ndef main():\n modules = loadModules()\n try:\n command = sys.argv[1]\n except IndexError:\n printHelp(modules)\n else:\n if comm... | diff --git a/src/toil/utils/toilMain.py b/src/toil/utils/toilMain.py
index cab32ce901..01dbfcb57e 100755
--- a/src/toil/utils/toilMain.py
+++ b/src/toil/utils/toilMain.py
@@ -1,4 +1,6 @@
from __future__ import absolute_import, print_function
+from toil.version import version
+import pkg_resources
import os
import sy... |
psychopy__psychopy-3761 | Cedrus buttonbox not working in Builder
I noticed today, playing with Cedrus component in the Builder (PsychoPy 2021.1.4), that it does not work, resulting in an error exit of the procedure.
After compiling the code, the problem seems to be a faulty generation of the buttonbox variable name:
```python
cedrusBox_0.... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Part of the PsychoPy library\n# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd.\n# Distributed under the terms of the GNU General Public License (GPL).\n\nfrom __future__ import absolute_import, print_function\n\nfro... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Part of the PsychoPy library\n# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd.\n# Distributed under the terms of the GNU General Public License (GPL).\n\nfrom __future__ import absolute_import, print_function\n\nfro... | diff --git a/psychopy/experiment/components/cedrusBox/__init__.py b/psychopy/experiment/components/cedrusBox/__init__.py
index 60d1200399..6244336c76 100755
--- a/psychopy/experiment/components/cedrusBox/__init__.py
+++ b/psychopy/experiment/components/cedrusBox/__init__.py
@@ -82,7 +82,7 @@ def __init__(self, exp, par... |
vega__altair-2106 | Options of `point` argument
Documentation of `point` argument in marks isn't very easily discoverable.
Recently I tried to create a chart with colored line and points. My first try was with `mark_line(color="red", point=True)`, similarly to [this example](https://altair-viz.github.io/gallery/line_chart_with_points.h... | [
{
"content": "\"\"\"\nLine Chart with Points\n----------------------\nThis chart shows a simple line chart with points marking each value.\n\"\"\"\n# category: line charts\nimport altair as alt\nimport numpy as np\nimport pandas as pd\n\nx = np.arange(100)\nsource = pd.DataFrame({\n 'x': x,\n 'f(x)': np.sin(x... | [
{
"content": "\"\"\"\nLine Chart with Points\n----------------------\nThis chart shows a simple line chart with points marking each value. Use\n``point=True`` for points with default appearance or customize it with\n``OverlayMarkDef()``.\n\"\"\"\n# category: line charts\nimport altair as alt\nimport numpy as np... | diff --git a/altair/examples/line_chart_with_points.py b/altair/examples/line_chart_with_points.py
index 715f6c923..26bd54310 100644
--- a/altair/examples/line_chart_with_points.py
+++ b/altair/examples/line_chart_with_points.py
@@ -1,7 +1,9 @@
"""
Line Chart with Points
----------------------
-This chart shows a si... |
yt-project__yt-4094 | BUG: regression with future MPL
### Bug report
**Bug summary**
with #3849 + MPL dev branch, we have one broken test, even after including fixes from #4092
**Code for reproduction**
```shell
pip install git+https://github.com/matplotlib/matplotlib.git
pytest yt/visualization/tests/test_particle_plot.py::test_p... | [
{
"content": "import sys\nimport weakref\nfrom numbers import Real\nfrom typing import Any, Dict, List, Optional, Tuple, Type, Union\n\nimport numpy as np\nimport unyt as un\nfrom matplotlib.colors import Colormap, LogNorm, Normalize, SymLogNorm\nfrom packaging.version import Version\n\nfrom yt._typing import Q... | [
{
"content": "import sys\nimport weakref\nfrom numbers import Real\nfrom typing import Any, Dict, List, Optional, Tuple, Type, Union\n\nimport numpy as np\nimport unyt as un\nfrom matplotlib.colors import Colormap, LogNorm, Normalize, SymLogNorm\nfrom packaging.version import Version\n\nfrom yt._typing import Q... | diff --git a/yt/visualization/_handlers.py b/yt/visualization/_handlers.py
index 78bca696f9e..e0935db6c77 100644
--- a/yt/visualization/_handlers.py
+++ b/yt/visualization/_handlers.py
@@ -321,7 +321,11 @@ def get_norm(self, data: np.ndarray, *args, **kw) -> Normalize:
dvmax = 1 * getattr(data, "units", 1)... |
ESMCI__cime-2281 | "ERROR: locked" when .config_files.xml is present in SRCROOT
If a `.config_files.xml` file is present in `SRCROOT` (as is the case for a standalone CTSM checkout), I'm getting `ERROR: locked` when trying to create a case from cime master:
```
git clone git@github.com:ESCOMP/ctsm.git
cd ctsm
./manage_externals/che... | [
{
"content": "\"\"\"\nCommon interface to XML files which follow the entry id format,\nthis is an abstract class and is expected to\nbe used by other XML interface modules and not directly.\n\"\"\"\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.utils import expect, convert_to_string, convert_to_type\n... | [
{
"content": "\"\"\"\nCommon interface to XML files which follow the entry id format,\nthis is an abstract class and is expected to\nbe used by other XML interface modules and not directly.\n\"\"\"\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.utils import expect, convert_to_string, convert_to_type\n... | diff --git a/scripts/lib/CIME/XML/entry_id.py b/scripts/lib/CIME/XML/entry_id.py
index 4061bcf1ee8..38c18a93e2b 100644
--- a/scripts/lib/CIME/XML/entry_id.py
+++ b/scripts/lib/CIME/XML/entry_id.py
@@ -435,7 +435,11 @@ def overwrite_existing_entries(self):
if len(samenodes) > 1:
expect(len(... |
conan-io__conan-14167 | [feature] Add '--strip' option to cmake install
### What is your suggestion?
Can you add a parameter to `cmake.install` function in order to be able to strip binaries before install ?
install and strip were added to CMake about 4 years ago, and if I got it correctly in version 3.15
https://gitlab.kitware.com/cmake... | [
{
"content": "import os\n\nfrom conan.tools.build import build_jobs\nfrom conan.tools.cmake.presets import load_cmake_presets\nfrom conan.tools.cmake.utils import is_multi_configuration\nfrom conan.tools.files import chdir, mkdir\nfrom conan.tools.microsoft.msbuild import msbuild_verbosity_cmd_line_arg\nfrom co... | [
{
"content": "import os\n\nfrom conan.tools.build import build_jobs\nfrom conan.tools.cmake.presets import load_cmake_presets\nfrom conan.tools.cmake.utils import is_multi_configuration\nfrom conan.tools.files import chdir, mkdir\nfrom conan.tools.microsoft.msbuild import msbuild_verbosity_cmd_line_arg\nfrom co... | diff --git a/conan/tools/cmake/cmake.py b/conan/tools/cmake/cmake.py
index d52a8ecb450..6dd77ac823c 100644
--- a/conan/tools/cmake/cmake.py
+++ b/conan/tools/cmake/cmake.py
@@ -147,6 +147,10 @@ def install(self, build_type=None, component=None):
arg_list = ["--install", build_folder, build_config, "--prefix", ... |
microsoft__torchgeo-422 | Datasets that subclass from RasterDataset will have their custom cmaps overridden
If I have:
```
CustomDataset(RasterDataset):
filename_glob = "my_tiff_that_has_a_weird_embedded_colormap.tif"
cmap = { # some sane colors
0: (...),
...
}
```
then the constructor of RasterDataset will overr... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"Base classes for all :mod:`torchgeo` datasets.\"\"\"\n\nimport abc\nimport functools\nimport glob\nimport os\nimport re\nimport sys\nfrom typing import Any, Callable, Dict, List, Optional, Seque... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"Base classes for all :mod:`torchgeo` datasets.\"\"\"\n\nimport abc\nimport functools\nimport glob\nimport os\nimport re\nimport sys\nfrom typing import Any, Callable, Dict, List, Optional, Seque... | diff --git a/torchgeo/datasets/geo.py b/torchgeo/datasets/geo.py
index 109bd50daba..ddd6dbff2cf 100644
--- a/torchgeo/datasets/geo.py
+++ b/torchgeo/datasets/geo.py
@@ -348,10 +348,11 @@ def __init__(
try:
with rasterio.open(filepath) as src:
# See if file ... |
pytorch__PiPPy-155 | local_test_ddp + CUDA failure
Log [here](https://gist.github.com/kwen2501/1dc2bee00e5e3bcc56ec9c28174b5d1d)
```
RuntimeError: DDP Pickling/Unpickling are only supported when using DDP with the default process group. That is, when you have called init_process_group and have not passed process_group argument to DDP con... | [
{
"content": "# Copyright (c) Meta Platforms, Inc. and affiliates\nimport logging\nimport operator\nimport threading\nimport time\nimport warnings\nfrom enum import Enum\nfrom inspect import Parameter, Signature\nfrom typing import Any, Callable, Dict, List, Tuple, Optional\n\nimport torch\nimport torch.distrib... | [
{
"content": "# Copyright (c) Meta Platforms, Inc. and affiliates\nimport logging\nimport operator\nimport threading\nimport time\nimport warnings\nfrom enum import Enum\nfrom inspect import Parameter, Signature\nfrom typing import Any, Callable, Dict, List, Tuple, Optional\n\nimport torch\nimport torch.distrib... | diff --git a/pippy/PipelineDriver.py b/pippy/PipelineDriver.py
index b8cb0b2ba..279aa1ca7 100644
--- a/pippy/PipelineDriver.py
+++ b/pippy/PipelineDriver.py
@@ -399,6 +399,13 @@ def __init__(self, stage_id, mod, rank_worker, dp_pg_cb, pp_rank):
self.peer_executors : Dict[int, torch._C._distributed_rpc.PyRRef... |
twisted__twisted-891 | `parent` attribute of IService is not documented anywhere
|[<img alt="moshez's avatar" src="https://avatars.githubusercontent.com/u/422703?s=50" width="50" height="50">](https://github.com/moshez)| @moshez reported|
|-|-|
|Trac ID|trac#7922|
|Type|defect|
|Created|2015-06-01 01:54:25Z|
|Branch|https://github.com/twiste... | [
{
"content": "# -*- test-case-name: twisted.application.test.test_service -*-\n# Copyright (c) Twisted Matrix Laboratories.\n# See LICENSE for details.\n\n\"\"\"\nService architecture for Twisted.\n\nServices are arranged in a hierarchy. At the leafs of the hierarchy,\nthe services which actually interact with ... | [
{
"content": "# -*- test-case-name: twisted.application.test.test_service -*-\n# Copyright (c) Twisted Matrix Laboratories.\n# See LICENSE for details.\n\n\"\"\"\nService architecture for Twisted.\n\nServices are arranged in a hierarchy. At the leafs of the hierarchy,\nthe services which actually interact with ... | diff --git a/src/twisted/application/service.py b/src/twisted/application/service.py
index 4079f8da027..c6da29bf61e 100644
--- a/src/twisted/application/service.py
+++ b/src/twisted/application/service.py
@@ -92,13 +92,17 @@ class IService(Interface):
A service.
Run start-up and shut-down code at the approp... |
scikit-image__scikit-image-5131 | pre builds broken by scipy 1.6.0rc1
## Description
The release of scipy 1.6.0rc1 has broken our builds, see e.g. [here](https://github.com/scikit-image/scikit-image/pull/5129/checks?check_run_id=1540462654#step:5:442). The failing test is `skimage/segmentation/tests/test_boundaries.py::test_mark_boundaries_subpixel... | [
{
"content": "\nimport numpy as np\nfrom scipy import ndimage as ndi\nfrom ..morphology import dilation, erosion, square\nfrom ..util import img_as_float, view_as_windows\nfrom ..color import gray2rgb\n\n\ndef _find_boundaries_subpixel(label_img):\n \"\"\"See ``find_boundaries(..., mode='subpixel')``.\n\n ... | [
{
"content": "\nimport numpy as np\nfrom scipy import ndimage as ndi\nfrom ..morphology import dilation, erosion, square\nfrom ..util import img_as_float, view_as_windows\nfrom ..color import gray2rgb\n\n\ndef _find_boundaries_subpixel(label_img):\n \"\"\"See ``find_boundaries(..., mode='subpixel')``.\n\n ... | diff --git a/skimage/segmentation/boundaries.py b/skimage/segmentation/boundaries.py
index 9c9d23e0b31..562387c2ee5 100644
--- a/skimage/segmentation/boundaries.py
+++ b/skimage/segmentation/boundaries.py
@@ -221,7 +221,7 @@ def mark_boundaries(image, label_img, color=(1, 1, 0),
# the RGB information. ``ndi.zo... |
redis__redis-py-2210 | v4.3.2 contains backwards incompatible change to `redis.lock.Lock`
**Version**: 4.3.2
**Platform**: Python 3.9 (applicable to all)
**Description**: PR #2137 converted [several arguments](https://github.com/redis/redis-py/pull/2137/files#diff-2fde47ac5b94240803faba932c3e886043bcf9018470ecb4a218fd6533611914R80) to... | [
{
"content": "#!/usr/bin/env python\nfrom setuptools import find_packages, setup\n\nsetup(\n name=\"redis\",\n description=\"Python client for Redis database and key-value store\",\n long_description=open(\"README.md\").read().strip(),\n long_description_content_type=\"text/markdown\",\n keywords... | [
{
"content": "#!/usr/bin/env python\nfrom setuptools import find_packages, setup\n\nsetup(\n name=\"redis\",\n description=\"Python client for Redis database and key-value store\",\n long_description=open(\"README.md\").read().strip(),\n long_description_content_type=\"text/markdown\",\n keywords... | diff --git a/redis/lock.py b/redis/lock.py
index c509f7d9db..650d0ae56c 100644
--- a/redis/lock.py
+++ b/redis/lock.py
@@ -77,7 +77,6 @@ def __init__(
self,
redis,
name: str,
- *,
timeout: Optional[Number] = None,
sleep: Number = 0.1,
blocking: bool = True,
d... |
ros__ros_comm-1178 | Inconsistent exit codes of tools in error cases
I just noticed that the console tools (`rosnode`, `rostopic`, ...) are inconsistent in their return code in case of errors.
The case I tested was running them without a running roscore (using kinetic):
* `rostopic list` --> exit code 1
* `rosservice list` --> exit co... | [
{
"content": "#!/usr/bin/env python\n# Software License Agreement (BSD License)\n#\n# Copyright (c) 2008, Willow Garage, Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# ... | [
{
"content": "#!/usr/bin/env python\n# Software License Agreement (BSD License)\n#\n# Copyright (c) 2008, Willow Garage, Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# ... | diff --git a/tools/rosnode/src/rosnode/__init__.py b/tools/rosnode/src/rosnode/__init__.py
index 44917fb117..54dc0d3732 100644
--- a/tools/rosnode/src/rosnode/__init__.py
+++ b/tools/rosnode/src/rosnode/__init__.py
@@ -808,9 +808,12 @@ def rosnodemain(argv=None):
_fullusage()
except socket.error:
... |
inventree__InvenTree-7119 | [FR] Increase Length of URL limit on import
### Please verify that this feature request has NOT been suggested before.
- [X] I checked and didn't find a similar feature request
### Problem statement
See [Discussion 7078](https://github.com/inventree/InvenTree/discussions/7078)
### Suggested solution
Possible opt... | [
{
"content": "\"\"\"Company database model definitions.\"\"\"\n\nimport os\nfrom datetime import datetime\nfrom decimal import Decimal\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.core.exceptions import ValidationError\nfrom django.core.validators import MinValueValidator\nfrom... | [
{
"content": "\"\"\"Company database model definitions.\"\"\"\n\nimport os\nfrom datetime import datetime\nfrom decimal import Decimal\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.core.exceptions import ValidationError\nfrom django.core.validators import MinValueValidator\nfrom... | diff --git a/src/backend/InvenTree/company/models.py b/src/backend/InvenTree/company/models.py
index b891b5b06543..eea0aa511a17 100644
--- a/src/backend/InvenTree/company/models.py
+++ b/src/backend/InvenTree/company/models.py
@@ -513,6 +513,7 @@ def get_api_url():
null=True,
verbose_name=_('Link'),
... |
pypa__pip-5921 | Add pre-released package upgrade hints
Before this commit when querying for an installed package using pip if
the package that was returned contained a pre-released version of the
package it was not intuitive that the pre-released version of the
package could not be directly upgraded to without the `--pre` flag.
... | [
{
"content": "from __future__ import absolute_import\n\nimport logging\nimport sys\nimport textwrap\nfrom collections import OrderedDict\n\nfrom pip._vendor import pkg_resources\nfrom pip._vendor.packaging.version import parse as parse_version\n# NOTE: XMLRPC Client is not annotated in typeshed as on 2017-07-17... | [
{
"content": "from __future__ import absolute_import\n\nimport logging\nimport sys\nimport textwrap\nfrom collections import OrderedDict\n\nfrom pip._vendor import pkg_resources\nfrom pip._vendor.packaging.version import parse as parse_version\n# NOTE: XMLRPC Client is not annotated in typeshed as on 2017-07-17... | diff --git a/news/5169.feature b/news/5169.feature
new file mode 100644
index 00000000000..49efa997db6
--- /dev/null
+++ b/news/5169.feature
@@ -0,0 +1 @@
+Display hint on installing with --pre when search results include pre-release versions.
\ No newline at end of file
diff --git a/src/pip/_internal/commands/search.p... |
weni-ai__bothub-engine-187 | Repository examples method ignore deleted when language is setted
Check this line..
https://github.com/Ilhasoft/bothub-engine/blob/master/bothub/common/models.py#L218
| [
{
"content": "from setuptools import setup, find_packages\n\n\nsetup(\n name='bothub',\n version='1.14.2',\n description='bothub',\n packages=find_packages(),\n install_requires=[\n 'python-decouple',\n 'requests',\n 'django==2.0.6',\n 'djangorestframework==3.7.7',\n ... | [
{
"content": "from setuptools import setup, find_packages\n\n\nsetup(\n name='bothub',\n version='1.14.3',\n description='bothub',\n packages=find_packages(),\n install_requires=[\n 'python-decouple',\n 'requests',\n 'django==2.0.6',\n 'djangorestframework==3.7.7',\n ... | diff --git a/Makefile b/Makefile
index 53a3216b..769f305f 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,8 @@ test:
@make check_environment
@make migrate CHECK_ENVIRONMENT=false
@make collectstatic CHECK_ENVIRONMENT=false
- @SUPPORTED_LANGUAGES="en|pt" pipenv run python manage.py test && pipenv run coverage re... |
goauthentik__authentik-6745 | FreeIPA LDAP sync broken in 2023.8.*
**Describe the bug**
After upgrading Authentik to `2023.8.0` (and `2023.8.1`), the LDAP sync with FreeIPA seems to be broken. The `ldap_sync:freeipa:groups` tasks complete without issues, but the `ldap_sync:freeipa:users` task fails:
```
ldap_sync:freeipa:users:cd24b105-15d6-4d... | [
{
"content": "\"\"\"FreeIPA specific\"\"\"\nfrom datetime import datetime\nfrom typing import Any, Generator\n\nfrom pytz import UTC\n\nfrom authentik.core.models import User\nfrom authentik.sources.ldap.sync.base import BaseLDAPSynchronizer\n\n\nclass FreeIPA(BaseLDAPSynchronizer):\n \"\"\"FreeIPA-specific ... | [
{
"content": "\"\"\"FreeIPA specific\"\"\"\nfrom datetime import datetime\nfrom typing import Any, Generator\n\nfrom pytz import UTC\n\nfrom authentik.core.models import User\nfrom authentik.sources.ldap.sync.base import BaseLDAPSynchronizer\n\n\nclass FreeIPA(BaseLDAPSynchronizer):\n \"\"\"FreeIPA-specific ... | diff --git a/authentik/sources/ldap/sync/vendor/freeipa.py b/authentik/sources/ldap/sync/vendor/freeipa.py
index 2eff854f6b3b..8ac6361a1078 100644
--- a/authentik/sources/ldap/sync/vendor/freeipa.py
+++ b/authentik/sources/ldap/sync/vendor/freeipa.py
@@ -45,7 +45,11 @@ def check_nsaccountlock(self, attributes: dict[str... |
blakeblackshear__frigate-5532 | [Support]: Frigate crashes on ARM64 after upgrade to beta 8
### Describe the problem you are having
On ARM64 machine, frigate crashes while trying to start go2rtc.
Looking for the "ELF load command alignment not page-aligned" error, I found this: https://github.com/numpy/numpy/issues/16677
I assume the problem i... | [
{
"content": "import logging\nimport importlib\nimport pkgutil\nfrom typing import Union\nfrom typing_extensions import Annotated\nfrom enum import Enum\nfrom pydantic import Field\n\nfrom . import plugins\nfrom .detection_api import DetectionApi\nfrom .detector_config import BaseDetectorConfig\n\n\nlogger = lo... | [
{
"content": "import logging\nimport importlib\nimport pkgutil\nfrom typing import Union\nfrom typing_extensions import Annotated\nfrom enum import Enum\nfrom pydantic import Field\n\nfrom . import plugins\nfrom .detection_api import DetectionApi\nfrom .detector_config import BaseDetectorConfig\n\n\nlogger = lo... | diff --git a/frigate/detectors/detector_types.py b/frigate/detectors/detector_types.py
index 1e2269c941..5c96b2e16b 100644
--- a/frigate/detectors/detector_types.py
+++ b/frigate/detectors/detector_types.py
@@ -13,12 +13,19 @@
logger = logging.getLogger(__name__)
-plugin_modules = [
- importlib.import_module(na... |
Lightning-Universe__lightning-flash-1404 | Docs for using `output` with `ObjectDetector`
## 🐛 Bug
I'am trying to use FiftyOneDetectionLabelsOutput output for Object detection but i got the following error
model = model_type.model(backbone=backbone, num_classes=num_classes, **kwargs)
TypeError: model() got an unexpected keyword argument 'output'
How c... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | diff --git a/flash/image/detection/model.py b/flash/image/detection/model.py
index a6af3ec112..15def3da8f 100644
--- a/flash/image/detection/model.py
+++ b/flash/image/detection/model.py
@@ -39,7 +39,6 @@ class ObjectDetector(AdapterTask):
optimizer: Optimizer to use for training.
lr_scheduler: The LR... |
pytorch__ignite-2217 | Improve doc examples rendering
Currently we are rendering our examples in the docs like this https://pytorch.org/ignite/generated/ignite.engine.engine.Engine.html#ignite.engine.engine.Engine which is not very neat.
What we want to do is to find a better way to make it more good looking, and update our docs examples
... | [
{
"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# -- Path setup ------------------------------... | [
{
"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# -- Path setup ------------------------------... | diff --git a/docs/requirements.txt b/docs/requirements.txt
index 1276fce2a839..774744bb021a 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -1,3 +1,4 @@
sphinx==3.4.3
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
sphinxcontrib-katex
+sphinx-copybutton==0.4.0
di... |
spack__spack-10145 | Installation issue: lmod -- build error with patch for libbsd on rhel7
Sorry I'm very new to spack, and I'm running into some patch issues trying to install lmod to a rhel7 machine.
### Steps to reproduce the issue
```console
$ vagrant init generic/rhel7
$ vagrant ssh
$ cd opt;
$ git clone https://github.c... | [
{
"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 Libbsd(AutotoolsPackage):\n \"\"\"This library provides usefu... | [
{
"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 Libbsd(AutotoolsPackage):\n \"\"\"This library provides usefu... | diff --git a/var/spack/repos/builtin/packages/libbsd/package.py b/var/spack/repos/builtin/packages/libbsd/package.py
index beca774fad2cc1..8695ea823bab0f 100644
--- a/var/spack/repos/builtin/packages/libbsd/package.py
+++ b/var/spack/repos/builtin/packages/libbsd/package.py
@@ -17,6 +17,8 @@ class Libbsd(AutotoolsPacka... |
beetbox__beets-3209 | program abortion due to exception in fnmatch_all()
Sorry about not knowing much how to compose this kind of messages!
In the duplicates init.py, under _def prune_dirs(),_ I've added a try-except-clause in order to avoid error and aborted run
It now looks like this:
```
for directory in ancestors:
directory =... | [
{
"content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in... | [
{
"content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in... | diff --git a/beets/util/__init__.py b/beets/util/__init__.py
index f3dedcb411..f5ad2da220 100644
--- a/beets/util/__init__.py
+++ b/beets/util/__init__.py
@@ -283,13 +283,13 @@ def prune_dirs(path, root=None, clutter=('.DS_Store', 'Thumbs.db')):
continue
clutter = [bytestring_path(c) for c in clut... |
pydantic__pydantic-2451 | Missing downwards compatibility and bug with custom root types
```py
from typing import Generic
from typing import TypeVar
from typing import List
from pydantic.generics import GenericModel
from pydantic import BaseModel
T = TypeVar("T")
class BaseList(GenericModel, Generic[T]):
__root__: List[T]
clas... | [
{
"content": "import json\nimport sys\nimport warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n Dic... | [
{
"content": "import json\nimport sys\nimport warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n Dic... | diff --git a/changes/2449-PrettyWood.md b/changes/2449-PrettyWood.md
new file mode 100644
index 00000000000..1568805daa1
--- /dev/null
+++ b/changes/2449-PrettyWood.md
@@ -0,0 +1 @@
+fix validation with a `BaseModel` field and a custom root type
diff --git a/pydantic/main.py b/pydantic/main.py
index 5fd83f7bb9c..91e012... |
keras-team__keras-5995 | Can't load `Sequential` with custom layers
Now `Sequeltial.from_config` doesn't have `cutsom_objects` argument.
`Sequential` with custom layers can create config, but can't restore from it.
Is it a specification?
And if I save/load such model, `Sequential.from_config` is called internally [here](https://github.com... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nimport warnings\nimport copy\nimport json\nimport os\nimport yaml\nimport numpy as np\n\nfrom . import backend as K\nfrom . import optimizers\nfrom . import layers as layer_module\nfrom .utils... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import print_function\n\nimport warnings\nimport copy\nimport json\nimport os\nimport yaml\nimport numpy as np\n\nfrom . import backend as K\nfrom . import optimizers\nfrom . import layers as layer_module\nfrom .utils... | diff --git a/keras/models.py b/keras/models.py
index eb8d864638b4..2c7bb44a3af1 100644
--- a/keras/models.py
+++ b/keras/models.py
@@ -1180,13 +1180,13 @@ def get_config(self):
return copy.deepcopy(config)
@classmethod
- def from_config(cls, config):
+ def from_config(cls, config, custom_objects=N... |
DDMAL__CantusDB-273 | Sources should automatically have segments
From #257:
> A source should always have a segment. It is either "Cantus Database" or "Sequence Database". It's a foreign key field. In cases where a source doesn't have a segment, it is probably a test source that we created.
> Desired behaviour: when creating a source, a... | [
{
"content": "from django.db import models\nfrom main_app.models import BaseModel\nfrom django.contrib.auth import get_user_model\n\n\nclass Source(BaseModel):\n cursus_choices = [(\"Monastic\", \"Monastic\"), (\"Secular\", \"Secular\")]\n source_status_choices = [\n (\n \"Editing proces... | [
{
"content": "from django.db import models\nfrom main_app.models import BaseModel, Segment\nfrom django.contrib.auth import get_user_model\n\n\nclass Source(BaseModel):\n cursus_choices = [(\"Monastic\", \"Monastic\"), (\"Secular\", \"Secular\")]\n source_status_choices = [\n (\n \"Editi... | diff --git a/django/cantusdb_project/main_app/models/source.py b/django/cantusdb_project/main_app/models/source.py
index 615fde0f9..a862be8e7 100644
--- a/django/cantusdb_project/main_app/models/source.py
+++ b/django/cantusdb_project/main_app/models/source.py
@@ -1,5 +1,5 @@
from django.db import models
-from main_ap... |
mindsdb__mindsdb-1799 | Connection to CocroachDB is not possible
| [
{
"content": "from contextlib import closing\nimport pg8000\n\nfrom lightwood.api import dtype\nfrom mindsdb.integrations.base import Integration\nfrom mindsdb.utilities.log import log\n\n\nclass PostgreSQLConnectionChecker:\n def __init__(self, **kwargs):\n self.host = kwargs.get('host')\n sel... | [
{
"content": "from contextlib import closing\nimport pg8000\n\nfrom lightwood.api import dtype\nfrom mindsdb.integrations.base import Integration\nfrom mindsdb.utilities.log import log\n\n\nclass PostgreSQLConnectionChecker:\n def __init__(self, **kwargs):\n self.host = kwargs.get('host')\n sel... | diff --git a/mindsdb/integrations/postgres/postgres.py b/mindsdb/integrations/postgres/postgres.py
index 6cb947cc9be..019b7942acb 100644
--- a/mindsdb/integrations/postgres/postgres.py
+++ b/mindsdb/integrations/postgres/postgres.py
@@ -15,12 +15,16 @@ def __init__(self, **kwargs):
self.database = kwargs.get('... |
sagemath__sage-36122 | Missing __hash__ function for elements of FundamentalGroupOfExtendedAffineWeylGroup
### Steps To Reproduce
1. Build the latest version of sagemath from source (though the issue persists in any version of sagemath I encountered over the past years)
2. Open a sagemath console
3. Create an `ExtendedAffineWeylGroup`, e.... | [
{
"content": "r\"\"\"\nFundamental Group of an Extended Affine Weyl Group\n\nAUTHORS:\n\n- Mark Shimozono (2013) initial version\n\"\"\"\n# ****************************************************************************\n# Copyright (C) 2013 Mark Shimozono <mshimo at math.vt.edu>\n#\n# This program is free s... | [
{
"content": "r\"\"\"\nFundamental Group of an Extended Affine Weyl Group\n\nAUTHORS:\n\n- Mark Shimozono (2013) initial version\n\"\"\"\n# ****************************************************************************\n# Copyright (C) 2013 Mark Shimozono <mshimo at math.vt.edu>\n#\n# This program is free s... | diff --git a/src/sage/combinat/root_system/fundamental_group.py b/src/sage/combinat/root_system/fundamental_group.py
index f42acd0a44a..afcd5b83bf2 100644
--- a/src/sage/combinat/root_system/fundamental_group.py
+++ b/src/sage/combinat/root_system/fundamental_group.py
@@ -324,6 +324,21 @@ def act_on_affine_lattice(self... |
ManimCommunity__manim-1363 | Suggestion to improve user experience w.r.t InCodeTexTemplate example
## Enhancement proposal
At present on macOS (with MacTex latest or even older installations) if you run InCodeTexTemplate from example_scenes/customtex.py it would fail for quite a lot of people with the following error
:\n \"\"\"This scene uses a custom TexTemplate file.\n The path of the TexTemplate _must_ be passed with the command line\n argument `--tex_template <path to template>`.\n For this scene, you can use the custom_template.tex file n... | [
{
"content": "from manim import *\n\n\nclass TexTemplateFromCLI(Scene):\n \"\"\"This scene uses a custom TexTemplate file.\n The path of the TexTemplate _must_ be passed with the command line\n argument `--tex_template <path to template>`.\n For this scene, you can use the custom_template.tex file n... | diff --git a/example_scenes/customtex.py b/example_scenes/customtex.py
index a4f9a0146f..62c37c5b3b 100644
--- a/example_scenes/customtex.py
+++ b/example_scenes/customtex.py
@@ -31,8 +31,8 @@ def construct(self):
# Set the compiler and output format (default: latex and .dvi)
# possible tex compilers:... |
mathesar-foundation__mathesar-513 | Implement schema list page
**Problem**
<!-- Please provide a clear and concise description of the problem that this feature request is designed to solve.-->
Users should be able to create a new schema, edit schema names, and delete schemas.
**Proposed solution**
<!-- A clear and concise description of your propos... | [
{
"content": "from django.urls import include, path\nfrom rest_framework_nested import routers\n\nfrom mathesar.views import api, frontend\n\n\nrouter = routers.DefaultRouter()\nrouter.register(r'tables', api.TableViewSet, basename='table')\nrouter.register(r'schemas', api.SchemaViewSet, basename='schema')\nrou... | [
{
"content": "from django.urls import include, path, re_path\nfrom rest_framework_nested import routers\n\nfrom mathesar.views import api, frontend\n\n\nrouter = routers.DefaultRouter()\nrouter.register(r'tables', api.TableViewSet, basename='table')\nrouter.register(r'schemas', api.SchemaViewSet, basename='sche... | diff --git a/mathesar/urls.py b/mathesar/urls.py
index 6e4984b578..65963b4934 100644
--- a/mathesar/urls.py
+++ b/mathesar/urls.py
@@ -1,4 +1,4 @@
-from django.urls import include, path
+from django.urls import include, path, re_path
from rest_framework_nested import routers
from mathesar.views import api, frontend... |
cleanlab__cleanlab-563 | Docs: Fix math in EMA docstring
I may have broken the math display format in EMA label-score docstring by adding extra slashes, but the docs build was also broken the way it was before with a single slash (there was some complaint about escaping this character that I don't precisely recall).
 2017-2022 Cleanlab Inc.\n# This file is part of cleanlab.\n#\n# cleanlab is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as published\n# by the Free Software Foundation, either version 3 of the License, or\n# (... | [
{
"content": "# Copyright (C) 2017-2022 Cleanlab Inc.\n# This file is part of cleanlab.\n#\n# cleanlab is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as published\n# by the Free Software Foundation, either version 3 of the License, or\n# (... | diff --git a/cleanlab/internal/multilabel_scorer.py b/cleanlab/internal/multilabel_scorer.py
index dd9a56e069..fd4c60bca2 100644
--- a/cleanlab/internal/multilabel_scorer.py
+++ b/cleanlab/internal/multilabel_scorer.py
@@ -165,11 +165,11 @@ def exponential_moving_average(
.. math::
- \\text{EMA}_t = \\a... |
cloud-custodian__cloud-custodian-3464 | Tagging CloudFormation - Error: Parameters must have value
Initially the stack is created with an input parameter.
**c7n policy**
```
policies:
- name: add-cfn-tag
resource: cfn
filters:
- "tag:testcfn": present
actions:
- type: tag
value: abc
key: BusinessUnit
``... | [
{
"content": "# Copyright 2015-2017 Capital One Services, 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 requi... | [
{
"content": "# Copyright 2015-2017 Capital One Services, 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 requi... | diff --git a/c7n/resources/cfn.py b/c7n/resources/cfn.py
index 4a79698645b..04f515cd0f6 100644
--- a/c7n/resources/cfn.py
+++ b/c7n/resources/cfn.py
@@ -145,9 +145,14 @@ def process_resource_set(self, stacks, tags):
self.manager.session_factory).client('cloudformation')
def _tag_stacks(s):
+ ... |
zestedesavoir__zds-site-3664 | Notification permanante
Bonjour,
Depuis le forum,
> Je me suis désabonné à un sujet (ne plus suivre) alors que j'avais une notification de se sujet.
>
> Désormais j'ai en permanence 1 notification. Même si je me réabonne, elle ne disparaît plus ^^"
> Ce bug se combine également avec celui-ci [[v18] Date incorrecte ... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db import models\n\nfrom zds.forum.models import Topic\nfrom zds.utils import get_current_user\n\n\nclass SubscriptionManager(models.Manager):\n ... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db import models\n\nfrom zds.forum.models import Topic\nfrom zds.notification import signals\nfrom zds.utils import get_current_user\n\n\nclass Su... | diff --git a/zds/notification/managers.py b/zds/notification/managers.py
index e3330a5d27..2bcdfdad9f 100644
--- a/zds/notification/managers.py
+++ b/zds/notification/managers.py
@@ -4,6 +4,7 @@
from django.db import models
from zds.forum.models import Topic
+from zds.notification import signals
from zds.utils imp... |
praw-dev__praw-1422 | Timeout not converted to int
**Describe the bug**
<!-- A clear and concise description of what the bug is. -->
No request can be made with the current code. The timeout specified has to be an int, but the config stores it as a string.
**To Reproduce**
Steps to reproduce the behavior:
```python
reddit.reques... | [
{
"content": "\"\"\"Provides the code to load PRAW's configuration file `praw.ini`.\"\"\"\nimport configparser\nimport os\nimport sys\nfrom threading import Lock\nfrom typing import Optional\n\nfrom .exceptions import ClientException\n\n\nclass _NotSet:\n def __bool__(self):\n return False\n\n __no... | [
{
"content": "\"\"\"Provides the code to load PRAW's configuration file `praw.ini`.\"\"\"\nimport configparser\nimport os\nimport sys\nfrom threading import Lock\nfrom typing import Optional\n\nfrom .exceptions import ClientException\n\n\nclass _NotSet:\n def __bool__(self):\n return False\n\n __no... | diff --git a/praw/config.py b/praw/config.py
index ca075f62c..47508a08e 100644
--- a/praw/config.py
+++ b/praw/config.py
@@ -139,3 +139,16 @@ def _initialize_attributes(self):
for required_attribute in ("oauth_url", "reddit_url", "timeout"):
setattr(self, required_attribute, self._fetch(required... |
wagtail__wagtail-11223 | Report pages performance regression
### Issue Summary
Various report pages have a performance regression in Wagtail 5.2, which I've tracked down to:
https://github.com/wagtail/wagtail/commit/7ba1afb8a402a09be5838a026523be78f08ea877
https://github.com/wagtail/wagtail/pull/10822
On a few sites we've upgraded to... | [
{
"content": "from django.utils.translation import gettext_lazy as _\n\nfrom wagtail.admin.views.generic.models import IndexView\n\n\nclass ReportView(IndexView):\n template_name = \"wagtailadmin/reports/base_report.html\"\n title = \"\"\n paginate_by = 50\n\n def get_filtered_queryset(self):\n ... | [
{
"content": "from django.utils.translation import gettext_lazy as _\n\nfrom wagtail.admin.views.generic.models import IndexView\n\n\nclass ReportView(IndexView):\n template_name = \"wagtailadmin/reports/base_report.html\"\n title = \"\"\n paginate_by = 50\n\n def get_filtered_queryset(self):\n ... | diff --git a/wagtail/admin/tests/test_reports_views.py b/wagtail/admin/tests/test_reports_views.py
index 28537b216067..b98af56f8792 100644
--- a/wagtail/admin/tests/test_reports_views.py
+++ b/wagtail/admin/tests/test_reports_views.py
@@ -1,5 +1,6 @@
import datetime
from io import BytesIO
+from unittest import mock
... |
conan-io__conan-5052 | MSBuild should allow "do not adjust PlatformToolset" with an argument
Hey,
In https://github.com/conan-io/conan/pull/4250 the default behavior of VisualStudio's toolset selection was changed to compile the whole solution using the same toolset (the `/p:PlatformToolset` is always set - see discussion here https://git... | [
{
"content": "import copy\nimport os\nimport re\nimport subprocess\n\nfrom conans.client import tools\nfrom conans.client.build.visual_environment import (VisualStudioBuildEnvironment,\n vs_build_type_flags, vs_std_cpp)\nfrom conans.client.tools.oss import cpu_... | [
{
"content": "import copy\nimport os\nimport re\nimport subprocess\n\nfrom conans.client import tools\nfrom conans.client.build.visual_environment import (VisualStudioBuildEnvironment,\n vs_build_type_flags, vs_std_cpp)\nfrom conans.client.tools.oss import cpu_... | diff --git a/conans/client/build/msbuild.py b/conans/client/build/msbuild.py
index 4123d2a1eb0..2e7edebb7a7 100644
--- a/conans/client/build/msbuild.py
+++ b/conans/client/build/msbuild.py
@@ -104,7 +104,8 @@ def get_command(self, project_file, props_file_path=None, targets=None, upgrade_
build_type = build_... |
sql-machine-learning__elasticdl-1483 | Error when running training on the worker
When working to let the model zoo support both running on SQLFlow and ElasticDL: https://github.com/sql-machine-learning/models/pull/27
I've encountered this error:
```
...
[2019-11-18 15:12:08,390] [INFO] [worker.py:642:_process_minibatch] Loss is 1.647733
[2019-11-18... | [
{
"content": "import os\nimport time\nimport traceback\n\nimport numpy as np\nimport tensorflow as tf\nfrom google.protobuf import empty_pb2\n\nfrom elasticdl.proto import elasticdl_pb2, elasticdl_pb2_grpc\nfrom elasticdl.python.common.constants import (\n JobType,\n MetricsDictKey,\n Mode,\n SaveMo... | [
{
"content": "import os\nimport time\nimport traceback\n\nimport numpy as np\nimport tensorflow as tf\nfrom google.protobuf import empty_pb2\n\nfrom elasticdl.proto import elasticdl_pb2, elasticdl_pb2_grpc\nfrom elasticdl.python.common.constants import (\n JobType,\n MetricsDictKey,\n Mode,\n SaveMo... | diff --git a/elasticdl/python/worker/worker.py b/elasticdl/python/worker/worker.py
index 192adcff1..384217305 100644
--- a/elasticdl/python/worker/worker.py
+++ b/elasticdl/python/worker/worker.py
@@ -698,7 +698,12 @@ def _process_save_model_task_if_needed(self):
dataset,
) = self._task_data_servi... |
kserve__kserve-2899 | Make poetry version plugin to update the pyproject.toml as well not just the build
/kind bug
**What steps did you take and what happened:**
[A clear and concise description of what the bug is.]
Currently the poetry plugin updates the version during the build, install phases but does not update the pyproject.toml
... | [
{
"content": "import ast\nimport subprocess\nfrom pathlib import Path\nfrom typing import Any, Dict, Optional\n\nfrom cleo.io.io import IO\nfrom poetry.plugins.plugin import Plugin\nfrom poetry.poetry import Poetry\nfrom poetry.core.utils.helpers import module_name\n\n\nclass VersionPlugin(Plugin): # type: ign... | [
{
"content": "import ast\nimport subprocess\nfrom pathlib import Path\nfrom typing import Any, Dict, Optional\n\nfrom cleo.io.io import IO\nfrom poetry.plugins.plugin import Plugin\nfrom poetry.poetry import Poetry\nfrom poetry.core.utils.helpers import module_name\n\n\nclass VersionPlugin(Plugin): # type: ign... | diff --git a/hack/python-release.sh b/hack/python-release.sh
new file mode 100755
index 00000000000..799a7fb213e
--- /dev/null
+++ b/hack/python-release.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+set -e
+
+cd ./python
+
+echo "Installing poetry version plugin"
+pip install plugin/poetry-version-plugin
+
+packages=$(find . -maxd... |
zestedesavoir__zds-site-5493 | [PDF] Problème lien de la licence
Sur la première page le lien de la licence peut être cassé : https://zestedesavoir.com/articles/pdf/2905/conferences-et-seminaires-scientifiques-a-paris-et-ailleurs.pdf (CC 0)
https://zestedesavoir.com/articles/pdf/2652/recap-communautaire-5.pdf ici aussi ? Ou c'est parce que c'est ... | [
{
"content": "import contextlib\nimport copy\nimport logging\nimport os\nimport shutil\nimport subprocess\nimport zipfile\nfrom datetime import datetime\nfrom os import makedirs, path\nfrom pathlib import Path\n\nimport requests\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.template.loader... | [
{
"content": "import contextlib\nimport copy\nimport logging\nimport os\nimport shutil\nimport subprocess\nimport zipfile\nfrom datetime import datetime\nfrom os import makedirs, path\nfrom pathlib import Path\n\nimport requests\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.template.loader... | diff --git a/fixtures/licences.yaml b/fixtures/licences.yaml
index accd74a417..a8d5f3349d 100644
--- a/fixtures/licences.yaml
+++ b/fixtures/licences.yaml
@@ -16,3 +16,9 @@
code : Tous droits réservés
title : Tous droits réservés
description : Droit d'auteur pur et dur.
+- model: utils.Lic... |
arviz-devs__arviz-1713 | NumPyroConverter makes too many assumptions about the model
The following code is not always runnable:
https://github.com/arviz-devs/arviz/blob/7ebedd2d1494f07513bc7b9ea21962bc11399a94/arviz/data/io_numpyro.py#L126-L133
This will fail for a model involving `ImproperUniform`, as sampling for it is not defined.
... | [
{
"content": "\"\"\"NumPyro-specific conversion code.\"\"\"\nimport logging\nfrom typing import Callable, Optional\n\nimport numpy as np\n\nfrom .. import utils\nfrom ..rcparams import rcParams\nfrom .base import dict_to_dataset, requires\nfrom .inference_data import InferenceData\n\n_log = logging.getLogger(__... | [
{
"content": "\"\"\"NumPyro-specific conversion code.\"\"\"\nimport logging\nfrom typing import Callable, Optional\n\nimport numpy as np\n\nfrom .. import utils\nfrom ..rcparams import rcParams\nfrom .base import dict_to_dataset, requires\nfrom .inference_data import InferenceData\n\n_log = logging.getLogger(__... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7301fce3ae..9b57b798af 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,7 @@
* Add dtype parsing and setting in all Stan converters ([1632](https://github.com/arviz-devs/arviz/pull/1632))
### Maintenance and fixes
+* Fix conversion for numpyro models with Impr... |
conda__conda-build-1834 | conda install --yes flag ignored when --use-local set with conda-build 2.1.6
Trying to execute `conda install --yes --use-local {package}` from a package built with `conda-build` ignores the `--yes` flag and waits for user input. This [has](https://travis-ci.org/choderalab/openmmtools/jobs/209789665#L951) put a [halt](... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom functools import partial\nimport os\nfrom os import lstat\nfrom pkg_resources import parse_version\nfrom enum import Enum\n\nfrom conda import __version__ as CONDA_VERSION\n\nfrom co... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom functools import partial\nimport os\nfrom os import lstat\nfrom pkg_resources import parse_version\nfrom enum import Enum\n\nfrom conda import __version__ as CONDA_VERSION\n\n\ntry:\... | diff --git a/conda_build/conda_interface.py b/conda_build/conda_interface.py
index ddc077c0b3..41097e982e 100644
--- a/conda_build/conda_interface.py
+++ b/conda_build/conda_interface.py
@@ -9,6 +9,17 @@
from conda import __version__ as CONDA_VERSION
+
+try:
+ # This monkey patch is addressed at #1825. The ensu... |
mitmproxy__mitmproxy-2946 | It is difficult to get information from request/response/detail tab, if url is very-very long
##### Steps to reproduce the problem:
1. Run mitmproxy.
2. Make a request with pathoc: `pathoc -c example.com:80 localhost:8080 'get:/SOMETHING VERY LONG'`
3. Enter the corresponding flow.
You won't be able to see reques... | [
{
"content": "import math\nimport sys\nfrom functools import lru_cache\nfrom typing import Optional, Union # noqa\n\nimport urwid\n\nfrom mitmproxy import contentviews\nfrom mitmproxy import http\nfrom mitmproxy.tools.console import common\nfrom mitmproxy.tools.console import layoutwidget\nfrom mitmproxy.tools... | [
{
"content": "import math\nimport sys\nfrom functools import lru_cache\nfrom typing import Optional, Union # noqa\n\nimport urwid\n\nfrom mitmproxy import contentviews\nfrom mitmproxy import http\nfrom mitmproxy.tools.console import common\nfrom mitmproxy.tools.console import layoutwidget\nfrom mitmproxy.tools... | diff --git a/mitmproxy/tools/console/flowview.py b/mitmproxy/tools/console/flowview.py
index 9420c10592..650a936654 100644
--- a/mitmproxy/tools/console/flowview.py
+++ b/mitmproxy/tools/console/flowview.py
@@ -30,12 +30,14 @@ def __init__(
self.focus_changed()
def focus_changed(self):
+ cols, _ ... |
praw-dev__praw-1788 | SQLite Import Error on 7.3.0
I'm now getting a
`ModuleNotFoundError: No module named '_sqlite3'`
error right upon import. Is there a way to catch this?
| [
{
"content": "\"\"\"Token Manager classes.\n\nThere should be a 1-to-1 mapping between an instance of a subclass of\n:class:`.BaseTokenManager` and a :class:`.Reddit` instance.\n\nA few proof of concept token manager classes are provided here, but it is expected that\nPRAW users will create their own token mana... | [
{
"content": "\"\"\"Token Manager classes.\n\nThere should be a 1-to-1 mapping between an instance of a subclass of\n:class:`.BaseTokenManager` and a :class:`.Reddit` instance.\n\nA few proof of concept token manager classes are provided here, but it is expected that\nPRAW users will create their own token mana... | diff --git a/CHANGES.rst b/CHANGES.rst
index 5a43a47b4..279aa4834 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -14,6 +14,11 @@ Unreleased
- :meth:`.user_selectable` to get available subreddit link flairs.
- Automatic RateLimit handling will support errors with millisecond resolution.
+**Fixed**
+
+- An import erro... |
qutebrowser__qutebrowser-3249 | Yank value directly from completion menu
Some completion categories (e.g. anything with a url) could benefit from a `yank_cur_item` similar to `delete_cur_item`. Pressing (say) `<ctrl-y>` would place the first column of the selected completion item on the clipboard.
| [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2017 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-2017 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/completion/completionwidget.py b/qutebrowser/completion/completionwidget.py
index 43ebffa8478..a5f8e51b5bd 100644
--- a/qutebrowser/completion/completionwidget.py
+++ b/qutebrowser/completion/completionwidget.py
@@ -377,3 +377,17 @@ def completion_item_del(self):
if not index.isValid()... |
aws-cloudformation__cfn-lint-1185 | Cors in serverless transform trips error
*cfn-lint version: 0.24.8
*Description of issue.*
Attempting to use CORS in API resource causes error.
E0001 Error transforming template: Resource with id [myserviceAwsUserApi] is invalid. Cors works only with inline Swagger specified in 'DefinitionBody' property
templa... | [
{
"content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w... | [
{
"content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w... | diff --git a/src/cfnlint/transform.py b/src/cfnlint/transform.py
index 217cfaf155..a8cdd90688 100644
--- a/src/cfnlint/transform.py
+++ b/src/cfnlint/transform.py
@@ -92,7 +92,7 @@ def _replace_local_codeuri(self):
Transform._update_to_s3_uri('Location', resource_dict)
if resource_type... |
ibis-project__ibis-6717 | bug: Bigquery backend Table init does not respect the fully qualified table name input
### What happened?
In the case to initialize a Bigquery backend table object with a fully qualified name, e.g. `project.dataset.table_name`, the connection object will append its default project and dataset. This cause the wrong t... | [
{
"content": "\"\"\"BigQuery public API.\"\"\"\n\nfrom __future__ import annotations\n\nimport contextlib\nfrom typing import TYPE_CHECKING, Any, Callable, Iterable, Mapping\nfrom urllib.parse import parse_qs, urlparse\n\nimport google.auth.credentials\nimport google.cloud.bigquery as bq\nimport google.cloud.bi... | [
{
"content": "\"\"\"BigQuery public API.\"\"\"\n\nfrom __future__ import annotations\n\nimport contextlib\nfrom typing import TYPE_CHECKING, Any, Callable, Iterable, Mapping\nfrom urllib.parse import parse_qs, urlparse\n\nimport google.auth.credentials\nimport google.cloud.bigquery as bq\nimport google.cloud.bi... | diff --git a/ibis/backends/bigquery/__init__.py b/ibis/backends/bigquery/__init__.py
index 7f9dd0e53104..164da2e28790 100644
--- a/ibis/backends/bigquery/__init__.py
+++ b/ibis/backends/bigquery/__init__.py
@@ -234,8 +234,8 @@ def dataset_id(self):
def table(self, name: str, database: str | None = None) -> ir.Tabl... |
comic__grand-challenge.org-2551 | Flatpages and Redirects broken when using ASGI
Examples:
- https://grand-challenge.org/about/ (flatpage, exists)
- https://grand-challenge.org/about (should redirect to https://grand-challenge.org/about/)
- https://parse2022.grand-challenge.org/Participation (should redirect to https://parse2022.grand-challenge.or... | [
{
"content": "from allauth_2fa.middleware import BaseRequire2FAMiddleware\r\nfrom django.urls import Resolver404, get_resolver\r\nfrom django.utils.deprecation import MiddlewareMixin\r\n\r\n\r\nclass RequireStaffAndSuperuser2FAMiddleware(BaseRequire2FAMiddleware):\r\n def require_2fa(self, request):\r\n ... | [
{
"content": "from allauth_2fa.middleware import BaseRequire2FAMiddleware\r\nfrom django.urls import Resolver404, get_resolver\r\nfrom django.utils.deprecation import MiddlewareMixin\r\n\r\n\r\nclass RequireStaffAndSuperuser2FAMiddleware(BaseRequire2FAMiddleware):\r\n def require_2fa(self, request):\r\n ... | diff --git a/app/grandchallenge/core/middleware.py b/app/grandchallenge/core/middleware.py
index 286f4cb2f7..f440d07dd2 100644
--- a/app/grandchallenge/core/middleware.py
+++ b/app/grandchallenge/core/middleware.py
@@ -17,9 +17,6 @@ class TwoFactorMiddleware(MiddlewareMixin):
half logged in by mistake.
"""
... |
aws-cloudformation__cfn-lint-1493 | False positive E1029 on API GW Stage Variables with dot syntax
*cfn-lint version: 0.29.6*
In #511 you fixed a false positive when referencing API GW Stage Variables via the syntax `${stageVariables['variableName']}`, but they can also be referenced using dot syntax: `${stageVariables.variableName}`.
```
Reques... | [
{
"content": "\"\"\"\nCopyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport re\nimport six\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\n\n\nclass SubNeeded(CloudFormationLintRule):\n \"\"\"Check if a ... | [
{
"content": "\"\"\"\nCopyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport re\nimport six\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\n\n\nclass SubNeeded(CloudFormationLintRule):\n \"\"\"Check if a ... | diff --git a/src/cfnlint/rules/functions/SubNeeded.py b/src/cfnlint/rules/functions/SubNeeded.py
index 9af3f7f793..506d1354bf 100644
--- a/src/cfnlint/rules/functions/SubNeeded.py
+++ b/src/cfnlint/rules/functions/SubNeeded.py
@@ -22,7 +22,7 @@ class SubNeeded(CloudFormationLintRule):
excludes = ['UserData', 'ZipF... |
piskvorky__gensim-3115 | lsi_dispatcher is not working from command-line when not specifying maxsize argument
#### Problem description
When running `lsi_dispatcher` from the command-line, if you don't specify the `maxsize` argument explicitly, you get an error for the missing positional argument:
```
usage: lsi_dispatcher.py [-h] maxsiz... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\"\"\"Dispatcher process which orchestrates distributed :class:`~gensim.models.lsimodel.LsiModel` computatio... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\"\"\"Dispatcher process which orchestrates distributed :class:`~gensim.models.lsimodel.LsiModel` computatio... | diff --git a/gensim/models/lsi_dispatcher.py b/gensim/models/lsi_dispatcher.py
index b593e94cd3..2265dc7811 100755
--- a/gensim/models/lsi_dispatcher.py
+++ b/gensim/models/lsi_dispatcher.py
@@ -278,7 +278,11 @@ def exit(self):
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s', level=logging.I... |
modin-project__modin-794 | pyarrow is a dependency but is not in `install_requires`
### Describe the problem
<!-- Describe the problem clearly here. -->
The source comes from this file: https://github.com/modin-project/modin/blob/master/modin/experimental/engines/pyarrow_on_ray/io.py#L4-L5
### Source code / logs
<!-- Include any logs or ... | [
{
"content": "from io import BytesIO\n\nimport pandas\nimport pyarrow as pa\nimport pyarrow.csv as csv\n\nfrom modin.backends.pyarrow.query_compiler import PyarrowQueryCompiler\nfrom modin.data_management.utils import get_default_chunksize\nfrom modin.engines.ray.generic.io import RayIO\nfrom modin.experimental... | [
{
"content": "from io import BytesIO\n\nimport pandas\n\nfrom modin.backends.pyarrow.query_compiler import PyarrowQueryCompiler\nfrom modin.data_management.utils import get_default_chunksize\nfrom modin.engines.ray.generic.io import RayIO\nfrom modin.experimental.engines.pyarrow_on_ray.frame.data import Pyarrow... | diff --git a/modin/experimental/engines/pyarrow_on_ray/io.py b/modin/experimental/engines/pyarrow_on_ray/io.py
index bef3ae3d630..e9a3fc953c2 100644
--- a/modin/experimental/engines/pyarrow_on_ray/io.py
+++ b/modin/experimental/engines/pyarrow_on_ray/io.py
@@ -1,8 +1,6 @@
from io import BytesIO
import pandas
-impor... |
ivy-llc__ivy-28353 | fix `complex` dtype support at `paddle backend` in `ivy.maximum`
| [
{
"content": "# global\nimport math\nfrom typing import Optional, Union\n\nimport paddle\n\nimport ivy\nimport ivy.functional.backends.paddle as paddle_backend\nfrom ivy import promote_types_of_inputs\nfrom ivy.func_wrapper import (\n with_supported_device_and_dtypes,\n with_supported_dtypes,\n with_un... | [
{
"content": "# global\nimport math\nfrom typing import Optional, Union\n\nimport paddle\n\nimport ivy\nimport ivy.functional.backends.paddle as paddle_backend\nfrom ivy import promote_types_of_inputs\nfrom ivy.func_wrapper import (\n with_supported_device_and_dtypes,\n with_supported_dtypes,\n with_un... | diff --git a/ivy/functional/backends/paddle/elementwise.py b/ivy/functional/backends/paddle/elementwise.py
index 48763d3bdf157..0c0ddeb016fec 100644
--- a/ivy/functional/backends/paddle/elementwise.py
+++ b/ivy/functional/backends/paddle/elementwise.py
@@ -1122,7 +1122,13 @@ def maximum(
) -> paddle.Tensor:
x1, x... |
cognitedata__cognite-sdk-python-486 | Full update on multiple items fails if a CogniteResourceList is passed.
Right now I'm doing it like this:
```tsList = c.time_series.retrieve_multiple(external_ids=ex_ids)
for ts in tsList:
ts.description = "new description"
c.time_series.update(ts)
```
For big lists this is ofc super slow. So preferab... | [
{
"content": "import gzip\nimport json as _json\nimport logging\nimport os\nimport re\nfrom typing import Any, Dict, List, Union\n\nimport requests.utils\nfrom requests import Response, Session\nfrom requests.adapters import HTTPAdapter\nfrom requests.packages.urllib3 import Retry\nfrom requests.structures impo... | [
{
"content": "import gzip\nimport json as _json\nimport logging\nimport os\nimport re\nfrom collections import UserList\nfrom typing import Any, Dict, List, Union\n\nimport requests.utils\nfrom requests import Response, Session\nfrom requests.adapters import HTTPAdapter\nfrom requests.packages.urllib3 import Re... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index fe7de0f26e..9a56a5973f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,7 @@ Changes are grouped as follows
### Fixed
- Sequence POST queries are retried if safe (e.g. search)
+- .update in the different APIs now correctly acceps a CogniteResourceList
### A... |
django-oscar__django-oscar-1200 | add_metaclass breaks Django 1.6 compatibilty
Commit 0bdf1d3105d41276cea4b2ff65a60d988a620d88 adds `add_metaclass` that is not available for Django 1.6:
```
# Create database
sites/sandbox/manage.py syncdb --noinput
Traceback (most recent call last):
File "sites/sandbox/manage.py", line 10, in <module>
execute_fr... | [
{
"content": "from six import add_metaclass\n\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.db.models.fields import CharField, DecimalField, Field\nfrom django.db.models import SubfieldBase\nfrom django.utils import six\nfrom django.utils.translation import ugettext_lazy as _\nfrom djang... | [
{
"content": "from django.core.exceptions import ImproperlyConfigured\nfrom django.db.models.fields import CharField, DecimalField, Field\nfrom django.db.models import SubfieldBase\nfrom django.utils import six\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.core.validators import MaxLengt... | diff --git a/oscar/models/fields.py b/oscar/models/fields.py
index b9f40be845a..b4f073b0a29 100644
--- a/oscar/models/fields.py
+++ b/oscar/models/fields.py
@@ -1,5 +1,3 @@
-from six import add_metaclass
-
from django.core.exceptions import ImproperlyConfigured
from django.db.models.fields import CharField, DecimalFi... |
Parsl__parsl-392 | Consider removing emphasis on the `DataFlowKernel` in the docs
We might want to relegate discussion of the DFK to the more advanced section of the docs. For many applications, simply running `parsl.load` is sufficient. I strongly feel that as part of the class-based configuration shuffling we're doing, it will be simpl... | [
{
"content": "\"\"\"This module implements the AppFutures.\n\n We have two basic types of futures:\n 1. DataFutures which represent data objects\n 2. AppFutures which represent the futures on App/Leaf tasks.\n\n\"\"\"\n\nfrom concurrent.futures import Future\nimport logging\nimport threading\n\nfrom pa... | [
{
"content": "\"\"\"This module implements the AppFutures.\n\nWe have two basic types of futures:\n 1. DataFutures which represent data objects\n 2. AppFutures which represent the futures on App/Leaf tasks.\n\n\"\"\"\n\nfrom concurrent.futures import Future\nimport logging\nimport threading\n\nfrom parsl.... | diff --git a/docs/devguide/changelog.rst b/docs/devguide/changelog.rst
index af2762a76d..d4d4a120be 100644
--- a/docs/devguide/changelog.rst
+++ b/docs/devguide/changelog.rst
@@ -1,6 +1,137 @@
Changelog
=========
+Parsl 0.6.0
+-----------
+
+Pending Release. ``Alpha``
+
+New functionality
+^^^^^^^^^^^^^^^^^
+
+* Sw... |
python-poetry__poetry-8970 | Poetry 1.7.1 Pipx Installation thinks pipx venv is system env
<!--
Hi there! Thank you for submitting a bug report!
Before you submit your issue, please review and follow the instructions at
https://python-poetry.org/docs/contributing/#reporting-bugs. Fully fill out the template below; insufficient
... | [
{
"content": "from __future__ import annotations\n\nimport base64\nimport hashlib\nimport os\nimport plistlib\nimport re\nimport shutil\nimport subprocess\nimport sys\n\nfrom functools import cached_property\nfrom pathlib import Path\nfrom subprocess import CalledProcessError\nfrom typing import TYPE_CHECKING\n... | [
{
"content": "from __future__ import annotations\n\nimport base64\nimport hashlib\nimport os\nimport plistlib\nimport re\nimport shutil\nimport subprocess\nimport sys\n\nfrom functools import cached_property\nfrom pathlib import Path\nfrom subprocess import CalledProcessError\nfrom typing import TYPE_CHECKING\n... | diff --git a/src/poetry/utils/env/env_manager.py b/src/poetry/utils/env/env_manager.py
index 660b02ca1bf..12eaac57e8b 100644
--- a/src/poetry/utils/env/env_manager.py
+++ b/src/poetry/utils/env/env_manager.py
@@ -728,17 +728,7 @@ def get_system_env(cls, naive: bool = False) -> Env:
prefix, base_prefix = Path(s... |
mitmproxy__mitmproxy-2757 | console: shift+tab is broken in WSL for some Windows terminals
See https://github.com/Microsoft/WSL/issues/1770. This seems to affect some but not all Windows terminals.
We use shift+tab by default to switch to the next pane in the console app. We can:
- Say that this is not our problem, and wait for upstream to... | [
{
"content": "\ndef map(km):\n km.add(\":\", \"console.command \", [\"global\"], \"Command prompt\")\n km.add(\"?\", \"console.view.help\", [\"global\"], \"View help\")\n km.add(\"B\", \"browser.start\", [\"global\"], \"Start an attached browser\")\n km.add(\"C\", \"console.view.commands\", [\"globa... | [
{
"content": "\ndef map(km):\n km.add(\":\", \"console.command \", [\"global\"], \"Command prompt\")\n km.add(\"?\", \"console.view.help\", [\"global\"], \"View help\")\n km.add(\"B\", \"browser.start\", [\"global\"], \"Start an attached browser\")\n km.add(\"C\", \"console.view.commands\", [\"globa... | diff --git a/mitmproxy/tools/console/defaultkeys.py b/mitmproxy/tools/console/defaultkeys.py
index 084ef26223..c787628824 100644
--- a/mitmproxy/tools/console/defaultkeys.py
+++ b/mitmproxy/tools/console/defaultkeys.py
@@ -11,6 +11,7 @@ def map(km):
km.add("q", "console.view.pop", ["global"], "Exit the current vie... |
OpenNMT__OpenNMT-tf-525 | TypeError: 'NoneType' object is not iterable
OpenNMT-tf v2.1.0
Python v3.5.2
tensorflow-gpu v2.0.0
```
model_dir: toy_enru_transformer_withalign
data:
train_features_file: data/train.en
train_labels_file: data/train.ru
train_alignments: data/train.align
eval_features_file: data/valid.en
eval_lab... | [
{
"content": "\"\"\"Base class for models.\"\"\"\n\nfrom __future__ import print_function\n\nimport abc\nimport os\nimport tempfile\nimport six\n\nimport tensorflow as tf\n\nfrom opennmt import optimizers\nfrom opennmt import schedules\nfrom opennmt.utils import losses\nfrom opennmt.utils import misc\n\n\n@six.... | [
{
"content": "\"\"\"Base class for models.\"\"\"\n\nfrom __future__ import print_function\n\nimport abc\nimport os\nimport tempfile\nimport six\n\nimport tensorflow as tf\n\nfrom opennmt import optimizers\nfrom opennmt import schedules\nfrom opennmt.utils import losses\nfrom opennmt.utils import misc\n\n\n@six.... | diff --git a/opennmt/models/model.py b/opennmt/models/model.py
index ad68ad807..2dc58e21b 100644
--- a/opennmt/models/model.py
+++ b/opennmt/models/model.py
@@ -268,7 +268,7 @@ def create_variables(self, optimizer=None):
[dim or 1 for dim in spec.shape.as_list()[1:]],
tf.constant("" if spec.dt... |
fedora-infra__bodhi-2359 | Cannot run database migrations on the 3.7 branch
I built a beta out of the ```HEAD``` of the ```3.7``` branch, and the migrations fail to run:
```
[root@bodhi-backend01 bowlofeggs][STG]# /usr/bin/alembic -c /etc/bodhi/alembic.ini upgrade head
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [a... | [
{
"content": "# Copyright (c) 2018 Red Hat, Inc.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your o... | [
{
"content": "# Copyright (c) 2018 Red Hat, Inc.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your o... | diff --git a/bodhi/server/migrations/versions/59c0f5fbc1b2_add_a_greenwave_unsatisfied_.py b/bodhi/server/migrations/versions/59c0f5fbc1b2_add_a_greenwave_unsatisfied_.py
index 6b3f561b90..7b9b60da9e 100644
--- a/bodhi/server/migrations/versions/59c0f5fbc1b2_add_a_greenwave_unsatisfied_.py
+++ b/bodhi/server/migrations... |
ytdl-org__youtube-dl-26507 | https://cnn.iprima.cz - Broken site support
<!--
######################################################################
WARNING!
IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################
-->
## Checklist
<!--
Ca... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\nimport time\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n determine_ext,\n js_to_json,\n)\n\n\nclass IPrimaIE(InfoExtractor):\n _VALID_URL = r'https?://(?:[^/]+)\\.iprima\\.cz/(?:[^/]+/)*(?P<id>[^/?#&]+... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nimport re\nimport time\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n determine_ext,\n js_to_json,\n)\n\n\nclass IPrimaIE(InfoExtractor):\n _VALID_URL = r'https?://(?:[^/]+)\\.iprima\\.cz/(?:[^/]+/)*(?P<id>[^/?#&]+... | diff --git a/youtube_dl/extractor/iprima.py b/youtube_dl/extractor/iprima.py
index 53a550c11e4..648ae6741f1 100644
--- a/youtube_dl/extractor/iprima.py
+++ b/youtube_dl/extractor/iprima.py
@@ -86,7 +86,8 @@ def _real_extract(self, url):
(r'<iframe[^>]+\bsrc=["\'](?:https?:)?//(?:api\.play-backend\.iprima\.... |
internetarchive__openlibrary-8688 | Re-enable autofill on add new book form
<!-- What problem are we solving? What does the experience look like today? What are the symptoms? -->
At some point it seems auto-fill was disabled on the title field of the add new book form. It's quite handy when adding books from a series that have similar titles with small ... | [
{
"content": "\"\"\"Handlers for adding and editing books.\"\"\"\n\nimport io\nimport web\nimport json\nimport csv\nimport datetime\n\nfrom typing import Literal, overload, NoReturn\n\nfrom infogami import config\nfrom infogami.core.db import ValidationException\nfrom infogami.utils import delegate\nfrom infoga... | [
{
"content": "\"\"\"Handlers for adding and editing books.\"\"\"\n\nimport io\nimport web\nimport json\nimport csv\nimport datetime\n\nfrom typing import Literal, overload, NoReturn\n\nfrom infogami import config\nfrom infogami.core.db import ValidationException\nfrom infogami.utils import delegate\nfrom infoga... | diff --git a/openlibrary/plugins/upstream/addbook.py b/openlibrary/plugins/upstream/addbook.py
index 0d64cd23663..e59fd533fbc 100644
--- a/openlibrary/plugins/upstream/addbook.py
+++ b/openlibrary/plugins/upstream/addbook.py
@@ -219,6 +219,7 @@ def has_permission(self) -> bool:
def POST(self):
i = web.inp... |
medtagger__MedTagger-145 | Race condition between API & Worker containers that updates fixtures on start
## Expected Behavior
Containers should start without any issues.
## Actual Behavior
Any of these two containers may fail to start due to unexpected exceptions while applying fixtures.
## Steps to Reproduce the Problem
1. Run ... | [
{
"content": "\"\"\"Insert all database fixtures.\"\"\"\nimport logging.config\n\nfrom sqlalchemy import exists\n\nfrom medtagger.database import db_session\nfrom medtagger.database.models import ScanCategory, Role\n\nlogging.config.fileConfig('logging.conf')\nlogger = logging.getLogger(__name__)\n\nCATEGORIES ... | [
{
"content": "\"\"\"Insert all database fixtures.\"\"\"\nimport logging.config\n\nfrom sqlalchemy import exists\nfrom sqlalchemy.exc import IntegrityError\n\nfrom medtagger.database import db_session\nfrom medtagger.database.models import ScanCategory, Role\n\nlogging.config.fileConfig('logging.conf')\nlogger =... | diff --git a/backend/medtagger/database/fixtures.py b/backend/medtagger/database/fixtures.py
index e9aec3b6..e8194f02 100644
--- a/backend/medtagger/database/fixtures.py
+++ b/backend/medtagger/database/fixtures.py
@@ -2,6 +2,7 @@
import logging.config
from sqlalchemy import exists
+from sqlalchemy.exc import Integ... |
mlcommons__GaNDLF-729 | Model saving is calling on `git` which causes an issue when the `subprocess` library is from the system
**Describe the bug**
When the `subprocess` library is called from the system installation of python, `git` invocation does not work, since there is no git repo for the system python installation.
**To Reproduce*... | [
{
"content": "import hashlib\nimport os\nimport subprocess\nfrom typing import Any, Dict\n\nimport torch\n\nfrom ..version import __version__\nfrom .generic import get_unique_timestamp\n\n# these are the base keys for the model dictionary to save\nmodel_dict_full = {\n \"epoch\": 0,\n \"model_state_dict\"... | [
{
"content": "import hashlib\nimport os\nimport subprocess\nfrom typing import Any, Dict\n\nimport torch\n\nfrom ..version import __version__\nfrom .generic import get_unique_timestamp\n\n# these are the base keys for the model dictionary to save\nmodel_dict_full = {\n \"epoch\": 0,\n \"model_state_dict\"... | diff --git a/GANDLF/utils/modelio.py b/GANDLF/utils/modelio.py
index 92f4a404f..23556b206 100644
--- a/GANDLF/utils/modelio.py
+++ b/GANDLF/utils/modelio.py
@@ -155,13 +155,14 @@ def save_model(
model_dict["parameters"] = params
try:
+ # this will try to encode the git hash of the current GaNDLF code... |
mitmproxy__mitmproxy-3801 | Addons: TypeError: unexpected object
#### Problem Description
I'm trying to set up [zerorpc](https://github.com/0rpc/zerorpc-python) inside an addon. It does work but mitmproxy spits out a stack trace when it encounters a reference to an instance of `zerorpc.Client` anywhere.
#### Steps to reproduce the behavior:
... | [
{
"content": "\"\"\"\n This module manages and invokes typed commands.\n\"\"\"\nimport functools\nimport inspect\nimport sys\nimport textwrap\nimport types\nimport typing\n\nimport mitmproxy.types\nfrom mitmproxy import exceptions, command_lexer\nfrom mitmproxy.command_lexer import unquote\n\n\ndef verify_ar... | [
{
"content": "\"\"\"\n This module manages and invokes typed commands.\n\"\"\"\nimport functools\nimport inspect\nimport sys\nimport textwrap\nimport types\nimport typing\n\nimport mitmproxy.types\nfrom mitmproxy import exceptions, command_lexer\nfrom mitmproxy.command_lexer import unquote\n\n\ndef verify_ar... | diff --git a/mitmproxy/command.py b/mitmproxy/command.py
index bfec47e11d..49cb959eb2 100644
--- a/mitmproxy/command.py
+++ b/mitmproxy/command.py
@@ -149,9 +149,10 @@ def collect_commands(self, addon):
if not i.startswith("__"):
o = getattr(addon, i)
try:
- ... |
open-telemetry__opentelemetry-python-contrib-381 | aiopg instrumentation creating nested traces
**Describe your environment**
Python 3.6.12
Macos 11.1
opentelemetry-python-contrib: Tried released version, as well as `main`.
aiohttp==3.7.3
aiopg==1.1.0
Describe any aspect of your environment relevant to the problem, including your Python version, [platform](htt... | [
{
"content": "import typing\n\nimport wrapt\nfrom aiopg.utils import _ContextManager, _PoolAcquireContextManager\n\nfrom opentelemetry.instrumentation.dbapi import (\n CursorTracer,\n DatabaseApiIntegration,\n)\nfrom opentelemetry.trace import SpanKind\n\n\n# pylint: disable=abstract-method\nclass AsyncPr... | [
{
"content": "import typing\n\nimport wrapt\nfrom aiopg.utils import _ContextManager, _PoolAcquireContextManager\n\nfrom opentelemetry.instrumentation.dbapi import (\n CursorTracer,\n DatabaseApiIntegration,\n)\nfrom opentelemetry.trace import SpanKind\n\n\n# pylint: disable=abstract-method\nclass AsyncPr... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 82b0fb6cd3..0fc28a168a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#350](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/350))
- `opentelemetry-exp... |
openshift__openshift-ansible-5874 | installer status callback plugin should be scoped to installer playbooks
#### Description
> When running non-install playbooks (health checks, re-certs, restarts, upgrades...) the callback still displays as if there is an install in progress. This could be confusing for users.
##### Version
origin master
... | [
{
"content": "\"\"\"Ansible callback plugin to print a summary completion status of installation\nphases.\n\"\"\"\nfrom ansible.plugins.callback import CallbackBase\nfrom ansible import constants as C\n\nDOCUMENTATION = '''\n\n'''\n\nEXAMPLES = '''\n---------------------------------------------\nExample display... | [
{
"content": "\"\"\"Ansible callback plugin to print a summary completion status of installation\nphases.\n\"\"\"\nfrom ansible.plugins.callback import CallbackBase\nfrom ansible import constants as C\n\nDOCUMENTATION = '''\n\n'''\n\nEXAMPLES = '''\n---------------------------------------------\nExample display... | diff --git a/roles/installer_checkpoint/callback_plugins/installer_checkpoint.py b/roles/installer_checkpoint/callback_plugins/installer_checkpoint.py
index 25f9405af5f..4b15e3bbc16 100644
--- a/roles/installer_checkpoint/callback_plugins/installer_checkpoint.py
+++ b/roles/installer_checkpoint/callback_plugins/install... |
ephios-dev__ephios-635 | Switching from signup method with requested state to one w/o breaks disposition
```
2021-12-03 14:39:00,166 DEBG 'uwsgi' stderr output:
Traceback (most recent call last):
File "/home/juhsp/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
2021-12-03 14:39:00,167 DEBG 'uw... | [
{
"content": "from django import forms\nfrom django.http import Http404\nfrom django.shortcuts import redirect\nfrom django.utils.translation import gettext_lazy as _\nfrom django.views import View\nfrom django.views.generic import TemplateView\nfrom django.views.generic.base import TemplateResponseMixin\nfrom ... | [
{
"content": "from django import forms\nfrom django.http import Http404\nfrom django.shortcuts import redirect\nfrom django.utils.translation import gettext_lazy as _\nfrom django.views import View\nfrom django.views.generic import TemplateView\nfrom django.views.generic.base import TemplateResponseMixin\nfrom ... | diff --git a/ephios/core/signup/disposition.py b/ephios/core/signup/disposition.py
index 9a9919cd7..3e2f0d921 100644
--- a/ephios/core/signup/disposition.py
+++ b/ephios/core/signup/disposition.py
@@ -239,6 +239,13 @@ def get_context_data(self, **kwargs):
"participant_template",
self.object.si... |
mars-project__mars-1931 | [BUG] Failed to run train_test_split in distributed environment
**Describe the bug**
When running ``train_test_split`` in distributed environment, ``'NoneType' object is not callable`` is reported.
**To Reproduce**
```python
rs = np.random.RandomState(0)
df_raw = pd.DataFrame(rs.rand(10, 4))
df = md.DataFrame... | [
{
"content": "# Copyright 1999-2020 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-2020 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/learn/model_selection/tests/integrated/__init__.py b/mars/learn/model_selection/tests/integrated/__init__.py
new file mode 100644
index 0000000000..76080e6852
--- /dev/null
+++ b/mars/learn/model_selection/tests/integrated/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 1999-2020 Alibaba Group Holding Ltd.
... |
mne-tools__mne-python-2970 | Memory consumption / scipy fft
`time_frequency/plot_epochs_spectra.py` consumes over 2GB of memory. I tracked it down to https://github.com/mne-tools/mne-python/blob/master/mne/time_frequency/multitaper.py#L440
Then I tried breaking it to parts so that one signal at a time is transformed. That reduced the memory consu... | [
{
"content": "# Author : Martin Luessi mluessi@nmr.mgh.harvard.edu (2012)\n# License : BSD 3-clause\n\n# Parts of this code were copied from NiTime http://nipy.sourceforge.net/nitime\n\nimport numpy as np\nfrom scipy import fftpack, linalg\n\nfrom ..parallel import parallel_func\nfrom ..utils import verbose, su... | [
{
"content": "# Author : Martin Luessi mluessi@nmr.mgh.harvard.edu (2012)\n# License : BSD 3-clause\n\n# Parts of this code were copied from NiTime http://nipy.sourceforge.net/nitime\n\nimport numpy as np\nfrom scipy import fftpack, linalg\n\nfrom ..parallel import parallel_func\nfrom ..utils import verbose, su... | diff --git a/mne/time_frequency/multitaper.py b/mne/time_frequency/multitaper.py
index bbe6af47659..53c02157de2 100644
--- a/mne/time_frequency/multitaper.py
+++ b/mne/time_frequency/multitaper.py
@@ -437,7 +437,13 @@ def _mt_spectra(x, dpss, sfreq, n_fft=None):
# remove mean (do not use in-place subtraction as ... |
PaddlePaddle__PaddleSeg-109 | labelme2seg.py工具生成的png文件是全黑的
您好,我使用labelme进行标注,然后使用labelme2seg.py生成数据集,但是生成的png文件打开之后是全黑的,看不到标注的物体,麻烦帮忙看看原因,谢谢。
下面附上labelme生成的json文件:
{
"version": "3.16.7",
"flags": {},
"shapes": [
{
"label": "test",
"line_color": null,
"fill_color": null,
"points": [
[
... | [
{
"content": "# coding: utf8\n# copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.\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/licen... | [
{
"content": "# coding: utf8\n# copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.\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/licen... | diff --git a/docs/annotation/jingling_demo/outputs/annotations/aa63d7e6db0d03137883772c246c6761fc201059.png b/docs/annotation/jingling_demo/outputs/annotations/aa63d7e6db0d03137883772c246c6761fc201059.png
index 8dfbff7b73..526acefdcd 100644
Binary files a/docs/annotation/jingling_demo/outputs/annotations/aa63d7e6db0d03... |
pyqtgraph__pyqtgraph-1060 | Flowchart context menu shows redundant submenu.
<!-- In the following, please describe your issue in detail! -->
<!-- If some of the sections do not apply, just remove them. -->
### Short description
<!-- This should summarize the issue. -->
The flowchart widget's context menu shows some useless submenu. It is ca... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom ..Qt import QtCore, QtGui, QT_LIB\nfrom .Node import *\nfrom ..pgcollections import OrderedDict\nfrom ..widgets.TreeWidget import *\nfrom .. import FileDialog, DataTreeWidget\n\n## pyside and pyqt use incompatible ui files.\nif QT_LIB == 'PySide':\n from . import F... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom ..Qt import QtCore, QtGui, QT_LIB\nfrom .Node import *\nfrom ..pgcollections import OrderedDict\nfrom ..widgets.TreeWidget import *\nfrom .. import FileDialog, DataTreeWidget\n\n## pyside and pyqt use incompatible ui files.\nif QT_LIB == 'PySide':\n from . import F... | diff --git a/pyqtgraph/flowchart/Flowchart.py b/pyqtgraph/flowchart/Flowchart.py
index 5aeeac38e4..2e7ed0ebb1 100644
--- a/pyqtgraph/flowchart/Flowchart.py
+++ b/pyqtgraph/flowchart/Flowchart.py
@@ -834,9 +834,9 @@ def reloadLibrary(self):
def buildMenu(self, pos=None):
def buildSubMenu(node, rootMenu, su... |
horovod__horovod-3263 | Fix flaky spark integration tests
Several Spark tests have been disabled in https://github.com/horovod/horovod/pull/3259, we should address the underlying flakiness and re-enable.
| [
{
"content": "import argparse\nimport os\nimport subprocess\nimport sys\nfrom distutils.version import LooseVersion\n\nimport numpy as np\n\nimport pyspark\nimport pyspark.sql.types as T\nfrom pyspark import SparkConf\nfrom pyspark.ml.evaluation import MulticlassClassificationEvaluator\nif LooseVersion(pyspark.... | [
{
"content": "import argparse\nimport os\nimport subprocess\nimport sys\nfrom distutils.version import LooseVersion\n\nimport numpy as np\n\nimport pyspark\nimport pyspark.sql.types as T\nfrom pyspark import SparkConf\nfrom pyspark.ml.evaluation import MulticlassClassificationEvaluator\nif LooseVersion(pyspark.... | diff --git a/.buildkite/gen-pipeline.sh b/.buildkite/gen-pipeline.sh
index c203324ae3..9b5532d0b1 100755
--- a/.buildkite/gen-pipeline.sh
+++ b/.buildkite/gen-pipeline.sh
@@ -300,7 +300,7 @@ run_gloo_integration() {
run_test "${test}" "${queue}" \
":factory: Elastic Spark TensorFlow Tests (${test})" \
... |
kymatio__kymatio-188 | [BUG] __all__ in scattering2d.py
another bug I found while eyeballing at pyflakes
https://github.com/kymatio/kymatio/blob/master/kymatio/scattering2d/scattering2d.py#L5
`Scattering` should read as `Scattering2D`
this affects the behavior of `from kymatio.scattering2d import *`
EDIT: the reason why it does w... | [
{
"content": "# Authors: Edouard Oyallon\n# Scientific Ancestry: Edouard Oyallon, Laurent Sifre, Joan Bruna\n\n\n__all__ = ['Scattering']\n\nimport warnings\nimport torch\nfrom .backend import cdgmm, Modulus, SubsampleFourier, fft, Pad, unpad\nfrom .filter_bank import filter_bank\nfrom .utils import compute_pad... | [
{
"content": "# Authors: Edouard Oyallon\n# Scientific Ancestry: Edouard Oyallon, Laurent Sifre, Joan Bruna\n\n\n__all__ = ['Scattering2D']\n\nimport warnings\nimport torch\nfrom .backend import cdgmm, Modulus, SubsampleFourier, fft, Pad, unpad\nfrom .filter_bank import filter_bank\nfrom .utils import compute_p... | diff --git a/kymatio/scattering1d/scattering1d.py b/kymatio/scattering1d/scattering1d.py
index 4de3d363a..40b62f0ee 100644
--- a/kymatio/scattering1d/scattering1d.py
+++ b/kymatio/scattering1d/scattering1d.py
@@ -7,6 +7,8 @@
import warnings
+__all__ = ['Scattering1D']
+
from .backend import pad, unpad, real, subs... |
pyodide__pyodide-4269 | [Discussion] Drop support for Node versions that passed endoflife
## Proposal
Drop support for Node < 18 from the next Pyodide major release (0.25.0)
## Background
The endoflife of [Node.js 14 and 16 passed a few days ago](https://nodejs.dev/en/about/releases/). We just finished a major release, so I think thi... | [
{
"content": "import shutil\nimport subprocess\nfrom pathlib import Path\n\nfrom .build_env import (\n get_build_flag,\n get_pyodide_root,\n get_unisolated_packages,\n)\nfrom .common import exit_with_stdio\nfrom .logger import logger\nfrom .recipe import load_all_recipes\n\n\ndef _copy_xbuild_files(\n ... | [
{
"content": "import shutil\nimport subprocess\nfrom pathlib import Path\n\nfrom .build_env import (\n get_build_flag,\n get_pyodide_root,\n get_unisolated_packages,\n)\nfrom .common import exit_with_stdio\nfrom .logger import logger\nfrom .recipe import load_all_recipes\n\n\ndef _copy_xbuild_files(\n ... | diff --git a/.circleci/config.yml b/.circleci/config.yml
index fed767481f0..23756bf5c46 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -255,7 +255,6 @@ jobs:
command: |
pip install -r requirements.txt
pip install -e ./pyodide-build
- npm install -g node-f... |
openai__evals-1517 | Getting started example doesn't work - oieval attempts to update a None type object
### Describe the bug
When running the example provided in https://github.com/openai/evals/blob/main/docs/run-evals.md: `oaieval gpt-3.5-turbo test-match`, the following error is encountered out of the box:
```
File "/Users/juliewang... | [
{
"content": "\"\"\"\nThis file defines the `oaieval` CLI for running evals.\n\"\"\"\nimport argparse\nimport logging\nimport shlex\nimport sys\nfrom typing import Any, Mapping, Optional, Union, cast\n\nimport evals\nimport evals.api\nimport evals.base\nimport evals.record\nfrom evals.eval import Eval\nfrom eva... | [
{
"content": "\"\"\"\nThis file defines the `oaieval` CLI for running evals.\n\"\"\"\nimport argparse\nimport logging\nimport shlex\nimport sys\nfrom typing import Any, Mapping, Optional, Union, cast\n\nimport evals\nimport evals.api\nimport evals.base\nimport evals.record\nfrom evals.eval import Eval\nfrom eva... | diff --git a/evals/cli/oaieval.py b/evals/cli/oaieval.py
index e9cd432c75..ec89455167 100644
--- a/evals/cli/oaieval.py
+++ b/evals/cli/oaieval.py
@@ -155,7 +155,11 @@ def to_number(x: str) -> Union[int, float, str]:
return {k: to_number(v) for k, v in str_dict.items()}
extra_eval_params = parse_extra_e... |
strawberry-graphql__strawberry-1728 | Mypy 0.940 x Python 3.10 `scalar`overload
```
$ mypy strawberry/scalars.py
strawberry/scalars.py:9: error: No overload variant of "scalar" matches argument types "NewType", "str", "str", "Callable[[Any], Any]", "Callable[[Any], Any]" [call-overload]
strawberry/scalars.py:9: note: Possible overload variants:
strawb... | [
{
"content": "from dataclasses import dataclass\nfrom typing import Any, Callable, Mapping, Optional, Type, TypeVar, Union, overload\n\nfrom graphql import GraphQLScalarType\n\nfrom strawberry.type import StrawberryType\n\nfrom .utils.str_converters import to_camel_case\n\n\n_T = TypeVar(\"_T\", bound=type)\n\n... | [
{
"content": "import sys\nfrom dataclasses import dataclass\nfrom typing import (\n Any,\n Callable,\n Mapping,\n NewType,\n Optional,\n Type,\n TypeVar,\n Union,\n overload,\n)\n\nfrom graphql import GraphQLScalarType\n\nfrom strawberry.type import StrawberryType\n\nfrom .utils.str_c... | diff --git a/RELEASE.md b/RELEASE.md
new file mode 100644
index 0000000000..f98da21312
--- /dev/null
+++ b/RELEASE.md
@@ -0,0 +1,3 @@
+Release type: patch
+
+This release adds support for MyPy 0.941 under Python 3.10
diff --git a/poetry.lock b/poetry.lock
index dca86d65b3..190ac48236 100644
--- a/poetry.lock
+++ b/poet... |
gratipay__gratipay.com-2167 | connecting via twitter - cryptic screen
I have no idea what this screen means. what's the red thing ? what are the boxes on the right ?
What am I suppose to do ?

| [
{
"content": "\"\"\"*Participant* is the name Gittip gives to people and groups that are known\nto Gittip. We've got a ``participants`` table in the database, and a\n:py:class:`Participant` class that we define here. We distinguish several kinds\nof participant, based on certain properties.\n\n - *Stub* partici... | [
{
"content": "\"\"\"*Participant* is the name Gittip gives to people and groups that are known\nto Gittip. We've got a ``participants`` table in the database, and a\n:py:class:`Participant` class that we define here. We distinguish several kinds\nof participant, based on certain properties.\n\n - *Stub* partici... | diff --git a/gittip/models/participant.py b/gittip/models/participant.py
index 38f44e2783..f19aa0225d 100644
--- a/gittip/models/participant.py
+++ b/gittip/models/participant.py
@@ -721,7 +721,7 @@ def take_over(self, account, have_confirmation=False):
ever decide to join Gittip).
In certain circum... |
PaddlePaddle__models-4236 | resnet50 训练报错
机器环境:linux_centos_cuda10_cudnn7_c++
paddle版本:release1.6
报错信息:
[21:49:25]W: [Step 1/1] Traceback (most recent call last):
[21:49:25]W: [Step 1/1] File "train.py", line 293, in <module>
[21:49:25]W: [Step 1/1] main()
[21:49:25]W: [Step 1/1] File "train.py", line 289, in main
[... | [
{
"content": "# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.\n#\n#Licensed under the Apache License, Version 2.0 (the \"License\");\n#you may not use this file except in compliance with the License.\n#You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\... | [
{
"content": "# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.\n#\n#Licensed under the Apache License, Version 2.0 (the \"License\");\n#you may not use this file except in compliance with the License.\n#You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\... | diff --git a/PaddleCV/image_classification/utils/utility.py b/PaddleCV/image_classification/utils/utility.py
index 5abd0c7d6e..46de720468 100644
--- a/PaddleCV/image_classification/utils/utility.py
+++ b/PaddleCV/image_classification/utils/utility.py
@@ -521,7 +521,12 @@ def best_strategy_compiled(args,
return... |
jupyterhub__zero-to-jupyterhub-k8s-1156 | cost estimator fails to run
To reproduce:
- Launch the cost estimator on binder https://mybinder.org/v2/gh/jupyterhub/zero-to-jupyterhub-k8s/master?filepath=doc/ntbk/draw_function.ipynb
- Run the first cell
- Observe a traceback similar to the following:
```
----------------------------------------------------... | [
{
"content": "import numpy as np\nfrom datetime import datetime as py_dtime\nfrom datetime import timedelta\nimport pandas as pd\nimport requests\nfrom bs4 import BeautifulSoup as bs4\n\nfrom bqplot import LinearScale, Axis, Lines, Figure, DateScale\nfrom bqplot.interacts import HandDraw\nfrom ipywidgets import... | [
{
"content": "import numpy as np\nfrom datetime import datetime as py_dtime\nfrom datetime import timedelta\nimport pandas as pd\nimport requests\nfrom bs4 import BeautifulSoup as bs4\n\nfrom bqplot import LinearScale, Axis, Lines, Figure, DateScale\nfrom bqplot.interacts import HandDraw\nfrom ipywidgets import... | diff --git a/doc/ntbk/z2jh/cost.py b/doc/ntbk/z2jh/cost.py
index 7239914aa1..33b83c1e02 100644
--- a/doc/ntbk/z2jh/cost.py
+++ b/doc/ntbk/z2jh/cost.py
@@ -15,16 +15,16 @@
locale.setlocale(locale.LC_ALL, '')
# --- MACHINE COSTS ---
-http = requests.get('https://cloud.google.com/compute/pricing')
-http = bs4(http.tex... |
ansible-collections__community.aws-283 | ec2_win_password returns success when it fails to decode the password
### SUMMARY
An unsuccessful decode call returns:
```
ok: [localhost] => {
"changed": false,
"invocation": {
"module_args": {
[trimmed]
}
},
"win_password": ""
}
... | [
{
"content": "#!/usr/bin/python\n# Copyright: Ansible Project\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\n\nDOCUMENTATION = '''\n---\nmodule: ec2_win_password\nversion_a... | [
{
"content": "#!/usr/bin/python\n# Copyright: Ansible Project\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\n\nDOCUMENTATION = '''\n---\nmodule: ec2_win_password\nversion_a... | diff --git a/changelogs/fragments/283-fixed-ec2_win_password-return-state.yaml b/changelogs/fragments/283-fixed-ec2_win_password-return-state.yaml
new file mode 100644
index 00000000000..bacacd603bb
--- /dev/null
+++ b/changelogs/fragments/283-fixed-ec2_win_password-return-state.yaml
@@ -0,0 +1,3 @@
+bugfixes:
+ - ec2... |
sunpy__sunpy-5975 | PSP/ISOIS CDF data via CDAWeb: Download works, but to_dataframe() fails
### Describe the bug
I try to obtain Parker Solar Probe (PSP) in-situ particle data of the ISOIS instrument from CDAWeb via Sunpy's new CDAWeb client (#5558). The actual data files are CDF's, so I guess the new CDF option (#5435) is used (both b... | [
{
"content": "import cdflib\nimport pandas as pd\nfrom cdflib.epochs import CDFepoch\n\nimport astropy.units as u\n\nfrom sunpy import log\nfrom sunpy.timeseries import GenericTimeSeries\nfrom sunpy.util.exceptions import warn_user\n\n__all__ = ['read_cdf']\n\n\ndef read_cdf(fname):\n \"\"\"\n Read a CDF ... | [
{
"content": "import cdflib\nimport pandas as pd\nfrom cdflib.epochs import CDFepoch\n\nimport astropy.units as u\n\nfrom sunpy import log\nfrom sunpy.timeseries import GenericTimeSeries\nfrom sunpy.util.exceptions import warn_user\n\n__all__ = ['read_cdf']\n\n\ndef read_cdf(fname):\n \"\"\"\n Read a CDF ... | diff --git a/changelog/5975.bugfix.rst b/changelog/5975.bugfix.rst
new file mode 100644
index 00000000000..1ef0e58f804
--- /dev/null
+++ b/changelog/5975.bugfix.rst
@@ -0,0 +1 @@
+Fixed reading CDF files when a variable has more than 2 dimensions. If this is the case the variable will be ignored, and a user warning is ... |
projectmesa__mesa-430 | [Bug Report] Wrong result got from get_distance method for torus continuous space
```
def get_distance(self, pos_1, pos_2):
""" Get the distance between two point, accounting for toroidal space.
Args:
pos_1, pos_2: Coordinate tuples for both points.
"""
pos_1 = ... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nMesa Space Module\n=================\n\nObjects used to add a spatial component to a model.\n\nGrid: base grid, a simple list-of-lists.\nSingleGrid: grid which strictly enforces one object per cell.\nMultiGrid: extension to Grid where each cell is a set of objects.... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nMesa Space Module\n=================\n\nObjects used to add a spatial component to a model.\n\nGrid: base grid, a simple list-of-lists.\nSingleGrid: grid which strictly enforces one object per cell.\nMultiGrid: extension to Grid where each cell is a set of objects.... | diff --git a/mesa/space.py b/mesa/space.py
index 2db3f1db5e7..528df09563d 100644
--- a/mesa/space.py
+++ b/mesa/space.py
@@ -572,12 +572,15 @@ def get_distance(self, pos_1, pos_2):
pos_1, pos_2: Coordinate tuples for both points.
"""
- pos_1 = np.array(pos_1)
- pos_2 = np.array(pos... |
freqtrade__freqtrade-3641 | ValueError: 'pair' is both an index level and a column label, which is ambiguous
<!--
Have you searched for similar issues before posting it?
If you have discovered a bug in the bot, please [search our issue tracker](https://github.com/freqtrade/freqtrade/issues?q=is%3Aissue).
If it hasn't been reported, please ... | [
{
"content": "# pragma pylint: disable=W0603\n\"\"\" Edge positioning package \"\"\"\nimport logging\nfrom typing import Any, Dict, List, NamedTuple\n\nimport arrow\nimport numpy as np\nimport utils_find_1st as utf1st\nfrom pandas import DataFrame\n\nfrom freqtrade.configuration import TimeRange\nfrom freqtrade... | [
{
"content": "# pragma pylint: disable=W0603\n\"\"\" Edge positioning package \"\"\"\nimport logging\nfrom typing import Any, Dict, List, NamedTuple\n\nimport arrow\nimport numpy as np\nimport utils_find_1st as utf1st\nfrom pandas import DataFrame\n\nfrom freqtrade.configuration import TimeRange\nfrom freqtrade... | diff --git a/freqtrade/edge/edge_positioning.py b/freqtrade/edge/edge_positioning.py
index 41252ee512d..1993eded361 100644
--- a/freqtrade/edge/edge_positioning.py
+++ b/freqtrade/edge/edge_positioning.py
@@ -281,8 +281,8 @@ def _process_expectancy(self, results: DataFrame) -> Dict[str, Any]:
#
# Remo... |
conan-io__conan-9073 | [bug] CMakeDeps generator: component and package with the same name
Hi!
During refactoring #8971 behavior of `tvalue` [macro](https://github.com/conan-io/conan/blob/80e99ca9a7d730e95adbc8bde5aa33da4f4fbb44/conan/tools/cmake/cmakedeps/templates/target_configuration.py#L35) was changed by adding some special case when... | [
{
"content": "import textwrap\n\nfrom conan.tools.cmake.cmakedeps.templates import CMakeDepsFileTemplate, get_component_alias, \\\n get_target_namespace\n\n\"\"\"\n\nFooTarget-release.cmake\n\n\"\"\"\n\n\nclass TargetConfigurationTemplate(CMakeDepsFileTemplate):\n\n @property\n def filename(self):\n ... | [
{
"content": "import textwrap\n\nfrom conan.tools.cmake.cmakedeps.templates import CMakeDepsFileTemplate, get_component_alias, \\\n get_target_namespace\n\n\"\"\"\n\nFooTarget-release.cmake\n\n\"\"\"\n\n\nclass TargetConfigurationTemplate(CMakeDepsFileTemplate):\n\n @property\n def filename(self):\n ... | diff --git a/conan/tools/cmake/cmakedeps/templates/target_configuration.py b/conan/tools/cmake/cmakedeps/templates/target_configuration.py
index 7d3af3a3708..95d8ce35b54 100644
--- a/conan/tools/cmake/cmakedeps/templates/target_configuration.py
+++ b/conan/tools/cmake/cmakedeps/templates/target_configuration.py
@@ -33,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.