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 ⌀ |
|---|---|---|---|---|
open-telemetry__opentelemetry-python-contrib-1435 | ASGI Instrumentation ValueError: too many values to unpack (expected 2) during JaegerPropagator
**Describe your environment**
- python:3.11-slim docker image
- OTEL
```bash
opentelemetry-api 1.14.0
opentelemetry-exporter-jaeger-thrift 1.14.0
opentelemetry-instrumentation ... | [
{
"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 f779f3f109..f60d4041f2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#1507](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1507))
- Fix pymongo to c... |
biolab__orange3-3095 | Widget: Distance matrix -> no output
<!--
This is an issue template. Please fill in the relevant details in the
sections below.
Wrap code and verbatim terminal window output into triple backticks, see:
https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code
If you're raising an issue... | [
{
"content": "from math import isnan\nimport itertools\n\nimport numpy as np\n\nfrom AnyQt.QtWidgets import QTableView, QItemDelegate, QHeaderView\nfrom AnyQt.QtGui import QColor, QPen, QBrush\nfrom AnyQt.QtCore import Qt, QAbstractTableModel, QModelIndex, \\\n QItemSelectionModel, QItemSelection, QSize\n\nf... | [
{
"content": "from math import isnan\nimport itertools\n\nimport numpy as np\n\nfrom AnyQt.QtWidgets import QTableView, QItemDelegate, QHeaderView\nfrom AnyQt.QtGui import QColor, QPen, QBrush\nfrom AnyQt.QtCore import Qt, QAbstractTableModel, QModelIndex, \\\n QItemSelectionModel, QItemSelection, QSize\n\nf... | diff --git a/Orange/widgets/tests/workflows/3_14_0_distance_matrix.ows b/Orange/widgets/tests/workflows/3_14_0_distance_matrix.ows
new file mode 100644
index 00000000000..e97268bc20e
--- /dev/null
+++ b/Orange/widgets/tests/workflows/3_14_0_distance_matrix.ows
@@ -0,0 +1,78 @@
+<?xml version='1.0' encoding='utf-8'?>
+<... |
pwndbg__pwndbg-948 | Context fails when a particular value is present in any register
### Description
If a particular value is present in any register ctx throws
```
Cannot access memory at address 0x7ffffffff000
```
It seems to happen at 128TB split but curiously only with unaligned addresses that would cause a qword read to cross 12... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nGiven an address in memory which does not contain a pointer elsewhere\ninto memory, attempt to describe the data as best as possible.\n\nCurrently prints out code, integers, or strings, in a best-effort manner\ndependent on page permissions, ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nGiven an address in memory which does not contain a pointer elsewhere\ninto memory, attempt to describe the data as best as possible.\n\nCurrently prints out code, integers, or strings, in a best-effort manner\ndependent on page permissions, ... | diff --git a/pwndbg/enhance.py b/pwndbg/enhance.py
index b98bd33b096..70fb180183d 100644
--- a/pwndbg/enhance.py
+++ b/pwndbg/enhance.py
@@ -106,6 +106,10 @@ def enhance(value, code = True):
if szval:
szval = E.string(repr(szval))
+ # Fix for case we can't read the end address anyway (#946)
+ if v... |
abey79__vpype-127 | SVGDesc has no attribute 'values'
When processing SVG files from https://plotter.vision/ the `<desc>` tag appears to be causing a problem for vpype:
```
% vpype --version
vpype 1.1.0
% vpype read ~/Downloads/bunny-3d.svg
/home/hudson/.local/lib/python3.6/site-packages/matplotlib/backends/qt_editor/figureoptions.... | [
{
"content": "\"\"\"File import/export functions.\n\"\"\"\nimport copy\nimport datetime\nimport math\nimport re\nfrom typing import Iterator, List, Optional, TextIO, Tuple, Union\nfrom xml.etree import ElementTree\n\nimport click\nimport numpy as np\nimport svgelements\nimport svgwrite\nfrom multiprocess import... | [
{
"content": "\"\"\"File import/export functions.\n\"\"\"\nimport copy\nimport datetime\nimport math\nimport re\nfrom typing import Iterator, List, Optional, TextIO, Tuple, Union\nfrom xml.etree import ElementTree\n\nimport click\nimport numpy as np\nimport svgelements\nimport svgwrite\nfrom multiprocess import... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 19345f1f..a044caf2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,10 +6,7 @@ New features and improvements:
* A Windows installer is now available (#120)
Bug fixes:
-* ...
-
-API changes:
-* ...
+* Fixed crash for SVG with <desc> element (#127)
#### 1.1 (2020-... |
napari__napari-3247 | Layer right-click menu in 3D viewing mode: 'linear' is not a valid interpolation
## 🐛 Bug
Hi all,
I'm just testing napari 0.4.11rc1. I really ❤️ the new right-click menu on layers. However, there is a little bug: An exception is raised when doing a projection while one is looking at a dataset in 3D mode.
## ... | [
{
"content": "\"\"\"This module contains actions (functions) that operate on layers.\n\nAmong other potential uses, these will populate the menu when you right-click\non a layer in the LayerList.\n\"\"\"\nfrom __future__ import annotations\n\nfrom functools import partial\nfrom typing import (\n TYPE_CHECKIN... | [
{
"content": "\"\"\"This module contains actions (functions) that operate on layers.\n\nAmong other potential uses, these will populate the menu when you right-click\non a layer in the LayerList.\n\"\"\"\nfrom __future__ import annotations\n\nfrom functools import partial\nfrom typing import (\n TYPE_CHECKIN... | diff --git a/napari/layers/_layer_actions.py b/napari/layers/_layer_actions.py
index 72200a71378..7deb543318d 100644
--- a/napari/layers/_layer_actions.py
+++ b/napari/layers/_layer_actions.py
@@ -71,7 +71,6 @@ def _project(ll: LayerList, axis: int = 0, mode='max'):
**layer._get_base_state(),
'name': ... |
interactions-py__interactions.py-191 | Pressing a Button sent by current bot causes exception in on_socket_response
When your bot sent a message with new discord buttons - upon pressing on button, following exception arises in console (not critical, but annoying and suboptimal):
```
Ignoring exception in on_socket_response
Traceback (most recent call las... | [
{
"content": "import copy\nimport logging\nimport typing\nimport discord\nfrom inspect import iscoroutinefunction, getdoc\nfrom contextlib import suppress\nfrom discord.ext import commands\nfrom . import http\nfrom . import model\nfrom . import error\nfrom . import context\nfrom .utils import manage_commands\n\... | [
{
"content": "import copy\nimport logging\nimport typing\nimport discord\nfrom inspect import iscoroutinefunction, getdoc\nfrom contextlib import suppress\nfrom discord.ext import commands\nfrom . import http\nfrom . import model\nfrom . import error\nfrom . import context\nfrom .utils import manage_commands\n\... | diff --git a/discord_slash/client.py b/discord_slash/client.py
index 7078521af..bb054d2ef 100644
--- a/discord_slash/client.py
+++ b/discord_slash/client.py
@@ -887,6 +887,9 @@ async def on_socket_response(self, msg):
to_use = msg["d"]
+ if to_use["type"] not in (1, 2):
+ return # to onl... |
mdn__kuma-5972 | AttributeError: 'NoneType' object has no attribute 'sites'
**Summary**
_What is the problem?_
I was installing `Kuma` on my computer.
When I run the command `docker-compose exec web ./manage.py configure_github_social`, console desk show the Error `AttributeError: 'NoneType' object has no attribute 'sites'`.
**St... | [
{
"content": "import fileinput\nimport os\nimport sys\n\nfrom allauth.socialaccount.models import SocialApp\nfrom django.conf import settings\nfrom django.contrib.sites.models import Site\nfrom django.core.management.base import BaseCommand\n\ntry:\n input = raw_input\nexcept NameError:\n # Python3's inpu... | [
{
"content": "import fileinput\nimport os\nimport sys\n\nfrom allauth.socialaccount.models import SocialApp\nfrom django.conf import settings\nfrom django.contrib.sites.models import Site\nfrom django.core.management.base import BaseCommand\n\ntry:\n input = raw_input\nexcept NameError:\n # Python3's inpu... | diff --git a/kuma/attachments/management/commands/configure_github_social.py b/kuma/attachments/management/commands/configure_github_social.py
index a431e22025c..6709ec82e6c 100644
--- a/kuma/attachments/management/commands/configure_github_social.py
+++ b/kuma/attachments/management/commands/configure_github_social.py... |
lightly-ai__lightly-620 | Update swav collate example
The swav collate example uses moco collate by accident:
https://github.com/lightly-ai/lightly/blob/c01ac6cbff2085df604c4fd7f62e77f62e3b05cc/lightly/data/collate.py#L435-L438
| [
{
"content": "\"\"\" Collate Functions \"\"\"\n\n# Copyright (c) 2020. Lightly AG and its affiliates.\n# All Rights Reserved\n\nimport torch\nimport torch.nn as nn\n\nfrom typing import List\n\nimport torchvision\nimport torchvision.transforms as T\nfrom lightly.transforms import GaussianBlur\nfrom lightly.tran... | [
{
"content": "\"\"\" Collate Functions \"\"\"\n\n# Copyright (c) 2020. Lightly AG and its affiliates.\n# All Rights Reserved\n\nimport torch\nimport torch.nn as nn\n\nfrom typing import List\n\nimport torchvision\nimport torchvision.transforms as T\nfrom lightly.transforms import GaussianBlur\nfrom lightly.tran... | diff --git a/lightly/data/collate.py b/lightly/data/collate.py
index 12f0cb65f..bb747924f 100644
--- a/lightly/data/collate.py
+++ b/lightly/data/collate.py
@@ -433,7 +433,7 @@ class SwaVCollateFunction(MultiCropCollateFunction):
>>> collate_fn = SwaVCollateFunction()
>>>
>>> # SwaV w/ 2x160... |
gammapy__gammapy-3910 | Change the first dataset name in `.info_table()`
**Is your feature request related to a problem? Please describe.**
When the method `.info_table()` is used in a Datasets object, the name of the first dataset in the output table is always "stacked". This rename is done even if the parameter `cumulative` of `.info_table... | [
{
"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport abc\nimport collections.abc\nimport copy\nimport logging\nimport numpy as np\nfrom astropy import units as u\nfrom astropy.table import Table, vstack\nfrom gammapy.data import GTI\nfrom gammapy.modeling.models import DatasetMo... | [
{
"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport abc\nimport collections.abc\nimport copy\nimport logging\nimport numpy as np\nfrom astropy import units as u\nfrom astropy.table import Table, vstack\nfrom gammapy.data import GTI\nfrom gammapy.modeling.models import DatasetMo... | diff --git a/gammapy/datasets/core.py b/gammapy/datasets/core.py
index 468d261f21..35dbb3ebb8 100644
--- a/gammapy/datasets/core.py
+++ b/gammapy/datasets/core.py
@@ -484,7 +484,8 @@ def info_table(self, cumulative=False):
if not self.is_all_same_type:
raise ValueError("Info table not supported fo... |
localstack__localstack-6512 | New localstack is not comaptible with python < 3.10
https://github.com/localstack/localstack/blob/e7efc768a20e75feafe3702a5a6e477a233feff2/localstack/utils/aws/aws_stack.py#L904
```
File "/usr/local/lib/python3.8/site-packages/localstack/services/generic_proxy.py", line 50, in <module>
from localstack.utils.aws im... | [
{
"content": "import json\nimport logging\nimport os\nimport re\nimport socket\nimport sys\nimport threading\nfrom functools import lru_cache\nfrom typing import Dict, Optional, Union\nfrom urllib.parse import urlparse\n\nfrom localstack.aws.accounts import get_aws_account_id, get_ctx_aws_access_key_id\n\nif sy... | [
{
"content": "import json\nimport logging\nimport os\nimport re\nimport socket\nimport sys\nimport threading\nfrom functools import lru_cache\nfrom typing import Dict, Optional, Union\nfrom urllib.parse import urlparse\n\nfrom localstack.aws.accounts import get_aws_account_id, get_ctx_aws_access_key_id\n\nif sy... | diff --git a/localstack/utils/aws/aws_stack.py b/localstack/utils/aws/aws_stack.py
index ccb2d474088cd..fb57b6941136d 100644
--- a/localstack/utils/aws/aws_stack.py
+++ b/localstack/utils/aws/aws_stack.py
@@ -901,7 +901,7 @@ def kinesis_stream_name(kinesis_arn):
def mock_aws_request_headers(
service="dynamodb",... |
interlegis__sapl-1971 | Data de filiação é preenchida automaticamente ao editar filiação partidária
olá. Há um problema na tela de Filiação Partidária. Ao se editar uma filiação partidária já existente, o campo Data de Filiação é automaticamente alterado para a data atual, substituindo a data digitada anteriormente.
| [
{
"content": "from datetime import timedelta\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Fieldset, Layout\nfrom django import forms\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group, User\nfrom django.contrib.contenttypes.models impo... | [
{
"content": "from datetime import timedelta\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Fieldset, Layout\nfrom django import forms\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group, User\nfrom django.contrib.contenttypes.models impo... | diff --git a/sapl/parlamentares/forms.py b/sapl/parlamentares/forms.py
index a7e042037..36ce94c3a 100644
--- a/sapl/parlamentares/forms.py
+++ b/sapl/parlamentares/forms.py
@@ -261,6 +261,8 @@ class Meta:
fields = ['partido',
'data',
'data_desfiliacao']
+ widgets = ... |
cloud-custodian__cloud-custodian-5005 | Failed to validate policy 'copy-related-tag' is not one of ['invoke-lambda']
Need help understanding why the `copy-related-tag` action for the resource `ebs-snapshot` is not getting validated.
**Policy**
team-tag-ebs-snapshot-audit.yml
```
policies:
- name: team-tag-ebs-snapshot-audit
resource: ebs-sn... | [
{
"content": "# Copyright 2016-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 2016-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/schema.py b/c7n/schema.py
index 278b1d42b9f..5d8e3cf7528 100644
--- a/c7n/schema.py
+++ b/c7n/schema.py
@@ -114,7 +114,7 @@ def specific_error(error):
if r is not None:
found = None
for idx, v in enumerate(error.validator_value):
- if v['$ref'].rsplit('/', 2)[1].endswi... |
scipy__scipy-11582 | Wrongly typed comparison in integrate.quad
I believe there is an trivial typo in the `integrate.quad` implementation:
https://github.com/scipy/scipy/blob/832bdf3b0378f05bd0f74ff5f00464524729c6d8/scipy/integrate/quadpack.py#L385
The comparison to `a` should be a `a == - Inf`. After
https://github.com/scipy/scip... | [
{
"content": "# Author: Travis Oliphant 2001\n# Author: Nathan Woods 2013 (nquad &c)\nfrom __future__ import division, print_function, absolute_import\n\nimport sys\nimport warnings\nfrom functools import partial\n\nfrom . import _quadpack\nimport numpy\nfrom numpy import Inf\n\n__all__ = ['quad', 'dblquad', 't... | [
{
"content": "# Author: Travis Oliphant 2001\n# Author: Nathan Woods 2013 (nquad &c)\nfrom __future__ import division, print_function, absolute_import\n\nimport sys\nimport warnings\nfrom functools import partial\n\nfrom . import _quadpack\nimport numpy\nfrom numpy import Inf\n\n__all__ = ['quad', 'dblquad', 't... | diff --git a/scipy/integrate/quadpack.py b/scipy/integrate/quadpack.py
index 1a110d609056..dacc454bd8d6 100644
--- a/scipy/integrate/quadpack.py
+++ b/scipy/integrate/quadpack.py
@@ -387,7 +387,7 @@ def quad(func, a, b, args=(), full_output=0, epsabs=1.49e-8, epsrel=1.49e-8,
if ier in [1,2,3,4,5,7]:
if ... |
fal-ai__dbt-fal-344 | Make fal scripts __name__ == '__main__'
**Context**
When users test scripts they will normally have a
```py
if __name__ == '__main__':
main()
```
and the `main()` function will be where the whole script lives.
When a script is associated with a model, it is executed "directly". So it could be considered... | [
{
"content": "import os\nimport json\nfrom typing import Dict, Any, List, Optional, Union\nfrom pathlib import Path\nfrom functools import partial\nfrom dataclasses import dataclass\nfrom deprecation import deprecated\n\nfrom faldbt.parse import normalize_path\nfrom faldbt.project import DbtModel, FalDbt\nimpor... | [
{
"content": "import os\nimport json\nfrom typing import Dict, Any, List, Optional, Union\nfrom pathlib import Path\nfrom functools import partial\nfrom dataclasses import dataclass\nfrom deprecation import deprecated\n\nfrom faldbt.parse import normalize_path\nfrom faldbt.project import DbtModel, FalDbt\nimpor... | diff --git a/integration_tests/features/main_module.feature b/integration_tests/features/main_module.feature
new file mode 100644
index 000000000..1b620c29e
--- /dev/null
+++ b/integration_tests/features/main_module.feature
@@ -0,0 +1,13 @@
+Feature: __name__ should be __main__
+ Background: Project Setup
+ Given t... |
numba__numba-6083 | list of list (nested build_list) fails on master
<!--
Thanks for opening an issue! To help the Numba team handle your information
efficiently, please first ensure that there is no other issue present that
already describes the issue you have
(search at https://github.com/numba/numba/issues?&q=is%3Aissue).
-->
... | [
{
"content": "from collections import namedtuple\nfrom collections.abc import Iterable\nfrom types import MappingProxyType\n\nfrom .abstract import (\n ConstSized,\n Container,\n Hashable,\n MutableSequence,\n Sequence,\n Type,\n TypeRef,\n Literal,\n InitialValue,\n Poison,\n)\nfr... | [
{
"content": "from collections import namedtuple\nfrom collections.abc import Iterable\nfrom types import MappingProxyType\n\nfrom .abstract import (\n ConstSized,\n Container,\n Hashable,\n MutableSequence,\n Sequence,\n Type,\n TypeRef,\n Literal,\n InitialValue,\n Poison,\n)\nfr... | diff --git a/numba/core/types/containers.py b/numba/core/types/containers.py
index 67baead13ab..87f4258c9dc 100644
--- a/numba/core/types/containers.py
+++ b/numba/core/types/containers.py
@@ -442,7 +442,7 @@ def unify(self, typingctx, other):
use = siv
if siv is None:
... |
encode__django-rest-framework-1117 | model serializer's 'id' field returns null
re-posted from stackoverflow (http://stackoverflow.com/questions/18886171/django-rest-framework-serializer-datas-id-field-returns-null/18895869?noredirect=1#18895869)
Here's a failing test case
**models.py**
```
class SomeModel(models.Model):
field = models.CharField(max_... | [
{
"content": "\"\"\"\nSerializers and ModelSerializers are similar to Forms and ModelForms.\nUnlike forms, they are not constrained to dealing with HTML output, and\nform encoded input.\n\nSerialization in REST framework is a two-phase process:\n\n1. Serializers marshal between complex types like model instance... | [
{
"content": "\"\"\"\nSerializers and ModelSerializers are similar to Forms and ModelForms.\nUnlike forms, they are not constrained to dealing with HTML output, and\nform encoded input.\n\nSerialization in REST framework is a two-phase process:\n\n1. Serializers marshal between complex types like model instance... | diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py
index a63c7f6c29..8d2e0feb8a 100644
--- a/rest_framework/serializers.py
+++ b/rest_framework/serializers.py
@@ -518,6 +518,9 @@ def save(self, **kwargs):
"""
Save the deserialized object and return it.
"""
+ # C... |
comic__grand-challenge.org-1232 | Workstation names are blank in dropdown
Update a reader study or algorithm, blank choices for workstations.
| [
{
"content": "import logging\nfrom datetime import datetime, timedelta\nfrom urllib.parse import unquote, urljoin\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import Group\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.core.validators import MaxValueValidator, RegexV... | [
{
"content": "import logging\nfrom datetime import datetime, timedelta\nfrom urllib.parse import unquote, urljoin\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import Group\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.core.validators import MaxValueValidator, RegexV... | diff --git a/app/grandchallenge/workstations/models.py b/app/grandchallenge/workstations/models.py
index 7a392a9962..6bcfd7c520 100644
--- a/app/grandchallenge/workstations/models.py
+++ b/app/grandchallenge/workstations/models.py
@@ -90,7 +90,8 @@ def latest_ready_image(self):
)
def __str__(self):
- ... |
piskvorky__gensim-1547 | LdaSeqModel word probabilities (too rough rounding)
***Problem:*** Probabilities of words don't sum up to 1 because we have `round(_, 3)` in `print_topic` method
***Solution:*** Remove `round` from `print_topic` from [here](https://github.com/RaRe-Technologies/gensim/blob/develop/gensim/models/ldaseqmodel.py#L361)
... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n# Based on Copyright (C) 2016 Radim Rehurek <radimrehurek@seznam.cz>\n\n\n\"\"\"\n\nInspired by the Blei's original DTM code and paper.\nOriginal DTM C/C++ code: https://g... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n# Based on Copyright (C) 2016 Radim Rehurek <radimrehurek@seznam.cz>\n\n\n\"\"\"\n\nInspired by the Blei's original DTM code and paper.\nOriginal DTM C/C++ code: https://g... | diff --git a/gensim/models/ldaseqmodel.py b/gensim/models/ldaseqmodel.py
index 1544aed84e..f6a512e3b4 100644
--- a/gensim/models/ldaseqmodel.py
+++ b/gensim/models/ldaseqmodel.py
@@ -358,7 +358,7 @@ def print_topic(self, topic, time=0, top_terms=20):
topic = np.exp(topic[time])
topic = topic / topic.s... |
geopandas__geopandas-2680 | BUG: pd.concat crs warning when geometry column is missing from one of the arguments
@martinfleis thanks for the quick reply, it took me a while but I think I found the problem, it's not directly related I guess but it comes from my use of ``sjoin_nearest`` with saved geometries.
The shortest MWE I could come up wit... | [
{
"content": "import numbers\nimport operator\nimport warnings\nimport inspect\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.extensions import (\n ExtensionArray,\n ExtensionDtype,\n register_extension_dtype,\n)\n\nimport shapely\nimport shapely.affinity\nimport shapely.geometry\nfrom sha... | [
{
"content": "import numbers\nimport operator\nimport warnings\nimport inspect\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.extensions import (\n ExtensionArray,\n ExtensionDtype,\n register_extension_dtype,\n)\n\nimport shapely\nimport shapely.affinity\nimport shapely.geometry\nfrom sha... | diff --git a/geopandas/array.py b/geopandas/array.py
index 9f366612d7..5f4723330c 100644
--- a/geopandas/array.py
+++ b/geopandas/array.py
@@ -1394,6 +1394,9 @@ def __contains__(self, item):
def _get_common_crs(arr_seq):
+ # mask out all None arrays with no crs (most likely auto generated by pandas
+ # from ... |
voicepaw__so-vits-svc-fork-64 | How to resume training from checkpoint?
Right now if the training gets interrupted, I have to start over from scratch. Is there a way to continue training from the latest checkpoint?
| [
{
"content": "from __future__ import annotations\n\nimport json\nimport re\nfrom itertools import groupby\nfrom logging import getLogger\nfrom pathlib import Path\nfrom typing import Any, Literal\n\nimport numpy as np\nimport requests\nimport torch\nimport torchcrepe\nfrom numpy import dtype, float32, ndarray\n... | [
{
"content": "from __future__ import annotations\n\nimport json\nimport re\nfrom itertools import groupby\nfrom logging import getLogger\nfrom pathlib import Path\nfrom typing import Any, Literal\n\nimport numpy as np\nimport requests\nimport torch\nimport torchcrepe\nfrom numpy import dtype, float32, ndarray\n... | diff --git a/src/so_vits_svc_fork/utils.py b/src/so_vits_svc_fork/utils.py
index 132b815b..b8cff712 100644
--- a/src/so_vits_svc_fork/utils.py
+++ b/src/so_vits_svc_fork/utils.py
@@ -476,7 +476,9 @@ def summarize(
def latest_checkpoint_path(dir_path: Path | str, regex: str = "G_*.pth"):
- return list(sorted(Pat... |
nautobot__nautobot-2279 | Installed Plugins NavMenuItem not adhering to `is_staff` permission
<!--
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
This form is only for reporting reproducible bugs. If you need assistance
with Nautobot installation, or if you have a general question, please start a
dis... | [
{
"content": "import logging\nfrom collections import defaultdict\n\nfrom django.conf import settings\nfrom django.contrib.auth.backends import (\n ModelBackend,\n RemoteUserBackend as _RemoteUserBackend,\n)\nfrom django.contrib.auth.models import Group\nfrom django.db.models import Q\n\nfrom nautobot.use... | [
{
"content": "import logging\nfrom collections import defaultdict\n\nfrom django.conf import settings\nfrom django.contrib.auth.backends import (\n ModelBackend,\n RemoteUserBackend as _RemoteUserBackend,\n)\nfrom django.contrib.auth.models import Group\nfrom django.db.models import Q\n\nfrom nautobot.use... | diff --git a/nautobot/core/authentication.py b/nautobot/core/authentication.py
index 58ce3bd9147..19115f1bd9d 100644
--- a/nautobot/core/authentication.py
+++ b/nautobot/core/authentication.py
@@ -48,7 +48,7 @@ def get_object_permissions(self, user_obj):
def has_perm(self, user_obj, perm, obj=None):
if ... |
cupy__cupy-805 | Setting CUPY_SEED or CHAINER_SEED raises a TypeError
If `CUPY_SEED` or `CHAINER_SEED` is set, `cupy.random` raises a TypeError. I guess it is due to this commit: https://github.com/cupy/cupy/commit/03b2145fbec95166832de56506d8fbc256406e39#diff-bdf8bf88a45064e9d8d316ebd0d0f6fb
```
$ python -c "import cupy; print(cup... | [
{
"content": "import atexit\nimport binascii\nimport functools\nimport operator\nimport os\nimport time\n\nimport numpy\nimport six\n\nimport cupy\nfrom cupy import core\nfrom cupy import cuda\nfrom cupy.cuda import curand\nfrom cupy.cuda import device\n\n\n_gumbel_kernel = None\n\n\ndef _get_gumbel_kernel():\n... | [
{
"content": "import atexit\nimport binascii\nimport functools\nimport operator\nimport os\nimport time\n\nimport numpy\nimport six\n\nimport cupy\nfrom cupy import core\nfrom cupy import cuda\nfrom cupy.cuda import curand\nfrom cupy.cuda import device\n\n\n_gumbel_kernel = None\n\n\ndef _get_gumbel_kernel():\n... | diff --git a/cupy/random/generator.py b/cupy/random/generator.py
index d75d51eea86..dbce568398a 100644
--- a/cupy/random/generator.py
+++ b/cupy/random/generator.py
@@ -489,6 +489,8 @@ def get_random_state():
seed = os.getenv('CUPY_SEED')
if seed is None:
seed = os.getenv('CHAINER_SEED')
... |
oppia__oppia-19587 | [Feature Request]: Improve the experience of adding concept cards in the exploration editor.
### Is your feature request related to a problem? Please describe.
The experience of adding skill concept cards in the exploration editor has a number of issues:
- The highlighted text in the RTE does not get transferred ... | [
{
"content": "# coding: utf-8\n#\n# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licen... | [
{
"content": "# coding: utf-8\n#\n# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licen... | diff --git a/assets/rich_text_components_definitions.ts b/assets/rich_text_components_definitions.ts
index b8ead7a0102ab..f7585e7c7dae9 100644
--- a/assets/rich_text_components_definitions.ts
+++ b/assets/rich_text_components_definitions.ts
@@ -35,6 +35,7 @@ export default {
"schema": {
"type": "unicode... |
ansible__ansible-38326 | The mysql_db module needs to use the --one-database flag for imports
- Bug Report
##### COMPONENT NAME
mysql_db
##### ANSIBLE VERSION
This issue was discovered with 2.4.
```
ansible 2.6.0 (devel 45b5a486c6) last updated 2018/04/04 15:11:32 (GMT -400)
config file = /cygdrive/c/git/projects/project-bi... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2012, Mark Theunissen <mark.theunissen@gmail.com>\n# Sponsored by Four Kitchens http://fourkitchens.com.\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_i... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2012, Mark Theunissen <mark.theunissen@gmail.com>\n# Sponsored by Four Kitchens http://fourkitchens.com.\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_i... | diff --git a/lib/ansible/modules/database/mysql/mysql_db.py b/lib/ansible/modules/database/mysql/mysql_db.py
index caac19b7566d50..457dcdf36ef7e6 100644
--- a/lib/ansible/modules/database/mysql/mysql_db.py
+++ b/lib/ansible/modules/database/mysql/mysql_db.py
@@ -265,7 +265,7 @@ def db_import(module, host, user, passwor... |
django-oscar__django-oscar-1913 | Exceptions when price_excl_tax is unset
The Oscar product admin allows the `price_excl_tax` field to be left unset, however an exception occurs when adding a product to the basket if this field is empty.
Similarly, if I have a product in my cart, and then clear the `price_excl_tax` field, an exception occurs when I tr... | [
{
"content": "from collections import namedtuple\nfrom decimal import Decimal as D\n\nfrom oscar.core.compat import user_is_authenticated\nfrom oscar.core.loading import get_class\n\nUnavailable = get_class('partner.availability', 'Unavailable')\nAvailable = get_class('partner.availability', 'Available')\nStock... | [
{
"content": "from collections import namedtuple\nfrom decimal import Decimal as D\n\nfrom oscar.core.compat import user_is_authenticated\nfrom oscar.core.loading import get_class\n\nUnavailable = get_class('partner.availability', 'Unavailable')\nAvailable = get_class('partner.availability', 'Available')\nStock... | diff --git a/src/oscar/apps/partner/strategy.py b/src/oscar/apps/partner/strategy.py
index 1cb9b82f104..36e73825ccb 100644
--- a/src/oscar/apps/partner/strategy.py
+++ b/src/oscar/apps/partner/strategy.py
@@ -210,7 +210,7 @@ class StockRequired(object):
"""
def availability_policy(self, product, stockrecord... |
Cog-Creators__Red-DiscordBot-3815 | [Admin] Serverlock doesn't function.
# Command bugs
<!--
Did you find a bug with a command? Fill out the following:
-->
#### Command name
!serverlock
#### What cog is this command from?
[Admin] Cog
#### What were you expecting to happen?
For people not being able to invite the bot into their ser... | [
{
"content": "import logging\nfrom typing import Tuple\n\nimport discord\n\nfrom redbot.core import Config, checks, commands\nfrom redbot.core.i18n import Translator, cog_i18n\nfrom redbot.core.utils.chat_formatting import box\nfrom .announcer import Announcer\nfrom .converters import SelfRole\n\nlog = logging.... | [
{
"content": "import logging\nfrom typing import Tuple\n\nimport discord\n\nfrom redbot.core import Config, checks, commands\nfrom redbot.core.i18n import Translator, cog_i18n\nfrom redbot.core.utils.chat_formatting import box\nfrom .announcer import Announcer\nfrom .converters import SelfRole\n\nlog = logging.... | diff --git a/redbot/cogs/admin/admin.py b/redbot/cogs/admin/admin.py
index 9c0c43ebd70..80fad158770 100644
--- a/redbot/cogs/admin/admin.py
+++ b/redbot/cogs/admin/admin.py
@@ -467,6 +467,7 @@ async def serverlock(self, ctx: commands.Context):
await ctx.send(_("The bot is now serverlocked."))
# regi... |
spacetelescope__jwql-167 | logging_functions should write logs from dev & test VMs to dev/
Currently `logging_functions.py` will write new log files to the `dev/` directory if the script being executed is not being executed from the admin account. This should be extended to write to `dev/` when the script is run from personal accounts from the ... | [
{
"content": "\n\"\"\" Logging functions for the ``jwql`` automation platform.\n\nThis module provides decorators to log the execution of modules. Log\nfiles are written to the ``logs/`` directory in the ``jwql`` central\nstorage area, named by module name and timestamp, e.g.\n``monitor_filesystem/monitor_file... | [
{
"content": "\n\"\"\" Logging functions for the ``jwql`` automation platform.\n\nThis module provides decorators to log the execution of modules. Log\nfiles are written to the ``logs/`` directory in the ``jwql`` central\nstorage area, named by module name and timestamp, e.g.\n``monitor_filesystem/monitor_file... | diff --git a/jwql/utils/logging_functions.py b/jwql/utils/logging_functions.py
index 8a9277485..589907896 100644
--- a/jwql/utils/logging_functions.py
+++ b/jwql/utils/logging_functions.py
@@ -135,8 +135,7 @@ def make_log_file(module, production_mode=True, path='./'):
admin_account = settings['admin_account']
... |
pypi__warehouse-2813 | [Request] Package documentation link(s)
I'm following up [this issue on ReadTheDocs about browsing docs offline with 3rd party apps](https://github.com/rtfd/readthedocs.org/issues/662) - it looks like no one asked anyone here for help, but the issue is still outstanding.
There's currently no way to map from here to do... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/tests/unit/packaging/test_models.py b/tests/unit/packaging/test_models.py
index 7529f31a6658..b6fa00a1bd53 100644
--- a/tests/unit/packaging/test_models.py
+++ b/tests/unit/packaging/test_models.py
@@ -159,6 +159,14 @@ def test_has_meta_false(self, db_session):
("Source Code", "https:/... |
intel__dffml-529 | docs: Enable hiding of Python prompts
This will be very helpful for copy pasting examples.
References:
- https://github.com/readthedocs/sphinx_rtd_theme/issues/167
| [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup --------------------------------------------------------------... | [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup --------------------------------------------------------------... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 48eb676804..c8cdfb2f4b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
... |
Lightning-AI__pytorch-lightning-1423 | Use isinstance() instead of type() in trainer.distrib_parts.check_gpus_data_type
<!--
### Common bugs:
1. Tensorboard not showing in Jupyter-notebook see [issue 79](https://github.com/PyTorchLightning/pytorch-lightning/issues/79).
2. PyTorch 1.1.0 vs 1.2.0 support [see FAQ](https://github.com/PyTorchLightning/p... | [
{
"content": "\"\"\"\nLightning makes multi-gpu training and 16 bit training trivial.\n\n.. note:: None of the flags below require changing anything about your lightningModel definition.\n\nChoosing a backend\n==================\n\nLightning supports two backends. DataParallel and DistributedDataParallel.\n Bot... | [
{
"content": "\"\"\"\nLightning makes multi-gpu training and 16 bit training trivial.\n\n.. note:: None of the flags below require changing anything about your lightningModel definition.\n\nChoosing a backend\n==================\n\nLightning supports two backends. DataParallel and DistributedDataParallel.\n Bot... | diff --git a/pytorch_lightning/trainer/distrib_parts.py b/pytorch_lightning/trainer/distrib_parts.py
index fb47ad2116eaf..5e26d49902eeb 100644
--- a/pytorch_lightning/trainer/distrib_parts.py
+++ b/pytorch_lightning/trainer/distrib_parts.py
@@ -566,7 +566,7 @@ def check_gpus_data_type(gpus):
:return: return unmodi... |
meltano__meltano-7642 | bug: Cloud CLI schedule help has same text for describe and list
### Meltano Version
2.18.0
### Python Version
3.10
### Bug scope
CLI (options, error messages, logging, etc.)
### Operating System
Mac M1
### Description
```
❯ meltano-cloud schedule --help
Usage: meltano-cloud schedule [OPTIONS] COMMAND [ARGS]... | [
{
"content": "\"\"\"Meltano Cloud `schedules` command.\"\"\"\n\nfrom __future__ import annotations\n\nimport itertools as it\nimport json\nimport typing as t\nfrom datetime import datetime, timedelta, timezone\nfrom http import HTTPStatus\n\nimport click\nimport tabulate\nfrom croniter import croniter, croniter... | [
{
"content": "\"\"\"Meltano Cloud `schedules` command.\"\"\"\n\nfrom __future__ import annotations\n\nimport itertools as it\nimport json\nimport typing as t\nfrom datetime import datetime, timedelta, timezone\nfrom http import HTTPStatus\n\nimport click\nimport tabulate\nfrom croniter import croniter, croniter... | diff --git a/src/cloud-cli/meltano/cloud/cli/schedule.py b/src/cloud-cli/meltano/cloud/cli/schedule.py
index 85441158a5..b2b080831f 100644
--- a/src/cloud-cli/meltano/cloud/cli/schedule.py
+++ b/src/cloud-cli/meltano/cloud/cli/schedule.py
@@ -380,7 +380,7 @@ async def describe_schedule(
only_upcoming: bool,
n... |
napari__napari-553 | Menu bar focus on Mac
## 🐛 Bug
We've now added a menubar, but you need to toggle focus in and out of napari before it becomes active on the mac. This bug has been encountered in other Qt apps, but we still need to look into fixing.
See here - https://github.com/robotology/yarp/issues/457
| [
{
"content": "\"\"\"\nCustom Qt widgets that serve as native objects that the public-facing elements\nwrap.\n\"\"\"\n# set vispy to use same backend as qtpy\nfrom qtpy import API_NAME\nfrom vispy import app\n\napp.use_app(API_NAME)\ndel app\n\nfrom qtpy.QtWidgets import (\n QMainWindow,\n QWidget,\n QH... | [
{
"content": "\"\"\"\nCustom Qt widgets that serve as native objects that the public-facing elements\nwrap.\n\"\"\"\n# set vispy to use same backend as qtpy\nfrom qtpy import API_NAME\nfrom vispy import app\n\napp.use_app(API_NAME)\ndel app\n\nfrom qtpy.QtWidgets import (\n QMainWindow,\n QWidget,\n QH... | diff --git a/napari/_qt/qt_main_window.py b/napari/_qt/qt_main_window.py
index f1a14a35e68..0d5dba36baa 100644
--- a/napari/_qt/qt_main_window.py
+++ b/napari/_qt/qt_main_window.py
@@ -146,7 +146,6 @@ def show(self):
"""
self._qt_window.resize(self._qt_window.layout().sizeHint())
self._qt_win... |
celery__celery-5795 | Celery does not consider authMechanism on mongodb backend URLs
<!--
Please fill this template entirely and do not erase parts of it.
We reserve the right to close without a response
bug reports which are incomplete.
-->
# Checklist
<!--
To check an item on the list replace [ ] with [x].
-->
- [x] I have read... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"MongoDB result store backend.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nfrom datetime import datetime, timedelta\n\nfrom kombu.exceptions import EncodeError\nfrom kombu.utils.objects import cached_property\nfrom kombu.utils.url import maybe_s... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"MongoDB result store backend.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nfrom datetime import datetime, timedelta\n\nfrom kombu.exceptions import EncodeError\nfrom kombu.utils.objects import cached_property\nfrom kombu.utils.url import maybe_s... | diff --git a/celery/backends/mongodb.py b/celery/backends/mongodb.py
index dd698007241..8d551bca802 100644
--- a/celery/backends/mongodb.py
+++ b/celery/backends/mongodb.py
@@ -157,6 +157,10 @@ def _get_connection(self):
# don't change self.options
conf = dict(self.options)
conf['... |
netket__netket-1193 | Bose-Hubbard model fails in extended Hilbert space for newer versions
Hello,
we are working on an extended Hilbert space in order to calculate the ground state energy of the Bose-Hubbard model. We added spin 1/2 sites between every boson site in the one-dimensional chain, but we left the Hamiltonian unchanged. We exp... | [
{
"content": "# Copyright 2022 The NetKet Authors - All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | [
{
"content": "# Copyright 2022 The NetKet Authors - All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 011c41b443..3d4e3b1cce 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,7 +18,7 @@
### Bug Fixes
* Several _type promotion_ bugs that would end up promoting single-precision models to double-precision have been squashed. Those involved `nk.operator.Ising` and `nk.op... |
openai__gym-2576 | [Proposal] Add license to the license field in the setup.py file
### Proposal
Add license to the license field in the setup.py file.
### Motivation
The license field is defined but not completed in the setup.py file.
Some package dependency scanners will block the usage of this package as the license is n... | [
{
"content": "import os.path\nimport sys\nimport itertools\n\nfrom setuptools import find_packages, setup\n\n# Don't import gym module here, since deps may not be installed\nsys.path.insert(0, os.path.join(os.path.dirname(__file__), \"gym\"))\nfrom version import VERSION\n\n# Environment-specific dependencies.\... | [
{
"content": "import os.path\nimport sys\nimport itertools\n\nfrom setuptools import find_packages, setup\n\n# Don't import gym module here, since deps may not be installed\nsys.path.insert(0, os.path.join(os.path.dirname(__file__), \"gym\"))\nfrom version import VERSION\n\n# Environment-specific dependencies.\... | diff --git a/setup.py b/setup.py
index 0ee2256e1a9..1ca48516cc5 100644
--- a/setup.py
+++ b/setup.py
@@ -42,7 +42,7 @@
url="https://github.com/openai/gym",
author="Gym Community",
author_email="jkterry@umd.edu",
- license="",
+ license="MIT",
packages=[package for package in find_packages() if... |
esphome__esphome-docs-1181 | Add airquality wp6003 + am312 tutorial
Add air quality + am312 tutorial
## Description:
**Related issue (if applicable):** fixes <link to issue>
**Pull request in [esphome](https://github.com/esphome/esphome) with YAML changes (if applicable):** esphome/esphome#<esphome PR number goes here>
## Checklist:
... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# esphome documentation build configuration file, created by\n# sphinx-quickstart on Mon Jan 22 21:44:07 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration ... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# esphome documentation build configuration file, created by\n# sphinx-quickstart on Mon Jan 22 21:44:07 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration ... | diff --git a/Doxygen b/Doxygen
index 31fa5d55d9..9730911cb6 100644
--- a/Doxygen
+++ b/Doxygen
@@ -38,7 +38,7 @@ PROJECT_NAME = "ESPHome"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 1.17.2
+PROJECT_NUMBER = 1.18.... |
pyqtgraph__pyqtgraph-1940 | Log mode broken in 0.12.2
<!-- In the following, please describe your issue in detail! -->
<!-- If some of the sections do not apply, just remove them. -->
### Short description
Log mode shows wrong sign in the exponent, completely wrong numbers, and inverted axis.
Everything works as expected in 0.12.1
### Co... | [
{
"content": "# -*- coding: utf-8 -*-\nimport warnings\nimport math\nimport numpy as np\nfrom ..Qt import QtCore\nfrom .GraphicsObject import GraphicsObject\nfrom .PlotCurveItem import PlotCurveItem\nfrom .ScatterPlotItem import ScatterPlotItem\nfrom .. import functions as fn\nfrom .. import debug as debug\nfro... | [
{
"content": "# -*- coding: utf-8 -*-\nimport warnings\nimport math\nimport numpy as np\nfrom ..Qt import QtCore\nfrom .GraphicsObject import GraphicsObject\nfrom .PlotCurveItem import PlotCurveItem\nfrom .ScatterPlotItem import ScatterPlotItem\nfrom .. import functions as fn\nfrom .. import debug as debug\nfro... | diff --git a/pyqtgraph/graphicsItems/PlotDataItem.py b/pyqtgraph/graphicsItems/PlotDataItem.py
index 97c8cb55ba..0c6b68a80a 100644
--- a/pyqtgraph/graphicsItems/PlotDataItem.py
+++ b/pyqtgraph/graphicsItems/PlotDataItem.py
@@ -701,7 +701,7 @@ def getData(self):
eps = np.finfo(y.dtype).eps
... |
scikit-image__scikit-image-3806 | Update draw.polygon example
## Description
This SO question shows that polygons are considered closed by default by `draw.polygon`, but our docstring example repeats the first vertex for no good reason, which is confusing:
https://stackoverflow.com/questions/55114005/skimage-polygon-function-why-does-the-last-ver... | [
{
"content": "import numpy as np\n\nfrom .._shared._geometry import polygon_clip\nfrom ._draw import (_coords_inside_image, _line, _line_aa,\n _polygon, _ellipse_perimeter,\n _circle_perimeter, _circle_perimeter_aa,\n _bezier_curve)\n\n\ndef _ellipse_in_s... | [
{
"content": "import numpy as np\n\nfrom .._shared._geometry import polygon_clip\nfrom ._draw import (_coords_inside_image, _line, _line_aa,\n _polygon, _ellipse_perimeter,\n _circle_perimeter, _circle_perimeter_aa,\n _bezier_curve)\n\n\ndef _ellipse_in_s... | diff --git a/skimage/draw/draw.py b/skimage/draw/draw.py
index c15a06638cb..7cbc3ed67d8 100644
--- a/skimage/draw/draw.py
+++ b/skimage/draw/draw.py
@@ -432,8 +432,8 @@ def polygon(r, c, shape=None):
--------
>>> from skimage.draw import polygon
>>> img = np.zeros((10, 10), dtype=np.uint8)
- >>> r = n... |
qutebrowser__qutebrowser-2518 | Close stdin for processes called from qutebrowser
When running this as userscript:
```bash
#!/bin/bash
buku --debug --add "$QUTE_URL"
echo "message-info 'Bookmark added to Buku!'" >> "$QUTE_FIFO"
```
[buku](https://github.com/jarun/Buku) just hangs, without producing any output (not even when adding `&> /tmp/... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2015-2016 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 2015-2016 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/misc/guiprocess.py b/qutebrowser/misc/guiprocess.py
index eb0a036e554..8f986d1b156 100644
--- a/qutebrowser/misc/guiprocess.py
+++ b/qutebrowser/misc/guiprocess.py
@@ -142,6 +142,7 @@ def start(self, cmd, args, mode=None):
self._proc.start(cmd, args)
else:
sel... |
weni-ai__bothub-engine-140 | Intents field in repository serializer return blank item
| [
{
"content": "import uuid\nimport base64\nimport requests\n\nfrom functools import reduce\n\nfrom django.db import models\nfrom django.utils.translation import gettext as _\nfrom django.utils import timezone\nfrom django.conf import settings\nfrom django.core.validators import RegexValidator, _lazy_re_compile\n... | [
{
"content": "import uuid\nimport base64\nimport requests\n\nfrom functools import reduce\n\nfrom django.db import models\nfrom django.utils.translation import gettext as _\nfrom django.utils import timezone\nfrom django.conf import settings\nfrom django.core.validators import RegexValidator, _lazy_re_compile\n... | diff --git a/bothub/common/models.py b/bothub/common/models.py
index abab5eff..a3e165db 100644
--- a/bothub/common/models.py
+++ b/bothub/common/models.py
@@ -181,9 +181,10 @@ def votes_sum(self):
@property
def intents(self):
return list(set(self.examples(
- deleted=False).values_list(
- ... |
tornadoweb__tornado-1910 | Lookup Error: unknown encoding: latin1
I'm trying to benchmark a simple Tornado Server made using tornado.httpserver and I get the following error, when using apache bench with 1000 or more concurrent connections on a Solaris machine.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/to... | [
{
"content": "#!/usr/bin/env python\n#\n# Copyright 2011 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle... | [
{
"content": "#!/usr/bin/env python\n#\n# Copyright 2011 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle... | diff --git a/tornado/netutil.py b/tornado/netutil.py
index 7bf9321393..20b4bdd63f 100644
--- a/tornado/netutil.py
+++ b/tornado/netutil.py
@@ -96,6 +96,9 @@
# thread now.
u'foo'.encode('idna')
+# For undiagnosed reasons, 'latin1' codec may also need to be preloaded.
+u'foo'.encode('latin1')
+
# These errnos indica... |
aws__aws-cli-565 | documentation: Show reduced redundancy option in "aws s3 cp help"
When a user types `aws s3 cp help` it describes this option:
```
--storage-class The type of storage to use for the object. Defaults to
'STANDARD'
```
It would be super-helpful to list the string the user should specify here if they want reduced redun... | [
{
"content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#... | [
{
"content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#... | diff --git a/awscli/customizations/s3/description.py b/awscli/customizations/s3/description.py
index bb4f8106381f..969f26709360 100644
--- a/awscli/customizations/s3/description.py
+++ b/awscli/customizations/s3/description.py
@@ -107,6 +107,7 @@ def add_param_descriptions(params_dict):
params_dict['storage-clas... |
svthalia__concrexit-1361 | Profile page crashes when not logged in
Sentry Issue: [CONCREXIT-40](https://sentry.io/organizations/thalia/issues/1976140555/?referrer=github_integration)
```
AttributeError: 'NoneType' object has no attribute 'pk'
File "django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
Fi... | [
{
"content": "\"\"\"Views provided by the members package\"\"\"\nimport json\nfrom datetime import date, datetime\n\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.messages.views import SuccessMessageMixin\nfrom django.db.models import Q, QuerySet\nfrom django.http import Http404... | [
{
"content": "\"\"\"Views provided by the members package\"\"\"\nimport json\nfrom datetime import date, datetime\n\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.messages.views import SuccessMessageMixin\nfrom django.db.models import Q, QuerySet\nfrom django.http import Http404... | diff --git a/website/members/views.py b/website/members/views.py
index f88a035f3..4dc3d4a3a 100644
--- a/website/members/views.py
+++ b/website/members/views.py
@@ -170,7 +170,7 @@ class ProfileDetailView(DetailView):
template_name = "members/user/profile.html"
def setup(self, request, *args, **kwargs) -> N... |
ranaroussi__yfinance-941 | Ticker.history: history's index is not of type DateTimeIndex when dividend and split tables are empty
**Issue**:
Ticker.history (line 295):
> df.index = df.index.tz_localize("UTC").tz_convert(data["chart"]["result"][0]["meta"]["exchangeTimezoneName"])
E AttributeError: 'Index' object has no attribute '... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# yfinance - market data downloader\n# https://github.com/ranaroussi/yfinance\n#\n# Copyright 2017-2019 Ran Aroussi\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# yfinance - market data downloader\n# https://github.com/ranaroussi/yfinance\n#\n# Copyright 2017-2019 Ran Aroussi\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the ... | diff --git a/yfinance/utils.py b/yfinance/utils.py
index 581293d97..0eef535cd 100644
--- a/yfinance/utils.py
+++ b/yfinance/utils.py
@@ -197,8 +197,8 @@ def parse_quotes(data, tz=None):
def parse_actions(data, tz=None):
- dividends = _pd.DataFrame(columns=["Dividends"])
- splits = _pd.DataFrame(columns=["Sto... |
pretalx__pretalx-509 | cannot create organiser
## Expected Behavior
As an admin, I'd like to create new organizers.
## Current Behavior

## Steps to Reproduce
1. go to `/orga/organiser/new`
2. enter data into all non-d... | [
{
"content": "from django import forms\nfrom django.conf import settings\nfrom django.db.models import Q\nfrom django.utils.translation import ugettext_lazy as _\nfrom i18nfield.forms import I18nModelForm\n\nfrom pretalx.common.mixins.forms import ReadOnlyFlag\nfrom pretalx.event.models import Event, Organiser,... | [
{
"content": "from django import forms\nfrom django.conf import settings\nfrom django.db.models import Q\nfrom django.utils.translation import ugettext_lazy as _\nfrom i18nfield.forms import I18nModelForm\n\nfrom pretalx.common.mixins.forms import ReadOnlyFlag\nfrom pretalx.event.models import Event, Organiser,... | diff --git a/src/pretalx/event/forms.py b/src/pretalx/event/forms.py
index 4aa52bcac8..fac60aef98 100644
--- a/src/pretalx/event/forms.py
+++ b/src/pretalx/event/forms.py
@@ -44,7 +44,9 @@ class Meta:
class OrganiserForm(ReadOnlyFlag, I18nModelForm):
def __init__(self, *args, **kwargs):
super().__init__(... |
streamlit__streamlit-285 | On rerun, faded elements are becoming opaque one by one. Instead they become opaque all at once.
Steps to repro:
1. Run `examples/reference.py`
2. When done, rerun it.
**Expected:** on rerun, all elements fade out and then become opaque one by one even before the run is done.
**Actual:** on rerun, all elements fa... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2018-2019 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2018-2019 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n... | diff --git a/lib/streamlit/hello.py b/lib/streamlit/hello.py
index 1e25c7967bd8..b28740799cde 100644
--- a/lib/streamlit/hello.py
+++ b/lib/streamlit/hello.py
@@ -68,8 +68,9 @@ def mapping_demo():
@st.cache
def from_data_file(filename):
- GITHUB_DATA = "https://raw.githubusercontent.com/streamlit/str... |
dotkom__onlineweb4-486 | API should not show marks publicly
The API shows all marks for all users publicly. Should be unregistered from API if it is not utterly necessary by some client-side ajax call.
| [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom django.conf.urls import patterns, url, include\n\nfrom tastypie.api import Api\n\nfrom apps.api.v0.article import ArticleResource, ArticleLatestResource\nfrom apps.api.v0.authentication import UserResource\nfrom apps.api.v0.events import EventResource, AttendanceEve... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom django.conf.urls import patterns, url, include\n\nfrom tastypie.api import Api\n\nfrom apps.api.v0.article import ArticleResource, ArticleLatestResource\nfrom apps.api.v0.authentication import UserResource\nfrom apps.api.v0.events import EventResource, AttendanceEve... | diff --git a/apps/api/v0/urls.py b/apps/api/v0/urls.py
index aa3d88f75..eab9c8bec 100755
--- a/apps/api/v0/urls.py
+++ b/apps/api/v0/urls.py
@@ -26,10 +26,10 @@
v0_api.register(ArticleLatestResource())
# marks
-v0_api.register(MarkResource())
-v0_api.register(EntryResource())
-v0_api.register(MyMarksResource())
-v0... |
vacanza__python-holidays-1694 | Fix Carnival date of the "Portugal" calendar
Currently, the package incorrectly indicates that the Carnival "holiday" is on the Monday before the actual date, which in 2024 is 2024/02/13 (YYYY/MM/DD).
It's clear from the method name `_add_carnival_monday()`.
This seems to be the problematic area.
<img width="504" ... | [
{
"content": "# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# specific sets of holidays on the fly. It aims to make determining whether a\n# specific date is a holiday as fast and flexible as possible.\n#\n# Authors: dr-prodigy <dr.pro... | [
{
"content": "# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# specific sets of holidays on the fly. It aims to make determining whether a\n# specific date is a holiday as fast and flexible as possible.\n#\n# Authors: dr-prodigy <dr.pro... | diff --git a/holidays/countries/portugal.py b/holidays/countries/portugal.py
index 063159535..6e0cb9a9f 100644
--- a/holidays/countries/portugal.py
+++ b/holidays/countries/portugal.py
@@ -145,7 +145,7 @@ def _populate_optional_holidays(self):
# - get Holidays that occur on Thursday and add Friday (+1 day)
... |
google__fuzzbench-1244 | Dockerfile error in ffmpeg_ffmpeg_demuxer_fuzzer
There is an issue in the Dockerfile to build ffmpeg_ffmpeg_demuxer_fuzzer at this line:
https://github.com/google/fuzzbench/blob/master/benchmarks/ffmpeg_ffmpeg_demuxer_fuzzer/Dockerfile#L17
Consequently you cannot build this benchmark. I tried to fix it by using o... | [
{
"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 applicable la... | [
{
"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 applicable la... | diff --git a/benchmarks/ffmpeg_ffmpeg_demuxer_fuzzer/Dockerfile b/benchmarks/ffmpeg_ffmpeg_demuxer_fuzzer/Dockerfile
index d050b2f4c..4935f7f0a 100644
--- a/benchmarks/ffmpeg_ffmpeg_demuxer_fuzzer/Dockerfile
+++ b/benchmarks/ffmpeg_ffmpeg_demuxer_fuzzer/Dockerfile
@@ -14,7 +14,7 @@
#
#################################... |
coala__coala-6149 | Linter.py: Include the memory location in all __repr__
The default `__repr__` on CPython emits the memory location of the object. This should also be done for the coala overrides of `__repr__` in `Linter`.
| [
{
"content": "from contextlib import contextmanager\nfrom functools import partial, partialmethod\nimport logging\nimport inspect\nfrom itertools import chain\nimport re\nimport shutil\nfrom subprocess import check_call, CalledProcessError, DEVNULL\nfrom types import MappingProxyType\n\nfrom cli_helpers.utils i... | [
{
"content": "from contextlib import contextmanager\nfrom functools import partial, partialmethod\nimport logging\nimport inspect\nfrom itertools import chain\nimport re\nimport shutil\nfrom subprocess import check_call, CalledProcessError, DEVNULL\nfrom types import MappingProxyType\n\nfrom cli_helpers.utils i... | diff --git a/coalib/bearlib/abstractions/Linter.py b/coalib/bearlib/abstractions/Linter.py
index a22b801ad9..fe1a07f7d5 100644
--- a/coalib/bearlib/abstractions/Linter.py
+++ b/coalib/bearlib/abstractions/Linter.py
@@ -167,8 +167,8 @@ def _create_linter(klass, options):
class LinterMeta(type):
def __rep... |
adamchainz__django-mysql-354 | "manage.py dumpdata" uses str instead of json.dumps on JSONField
Summary: Running ./manage.py dumpdata dumps the the JSONField as a Python dictionary string instead of a JSON string.
e.g.
```json
[
{
"model": "myapp.mymodel",
"pk": 1,
"fields": {
"my_json_field": "{'f... | [
{
"content": "# -*- coding:utf-8 -*-\nfrom __future__ import (\n absolute_import, division, print_function, unicode_literals\n)\n\nimport json\n\nimport django\nfrom django.core import checks\nfrom django.db import connections\nfrom django.db.models import Field, IntegerField, Transform\nfrom django.utils im... | [
{
"content": "# -*- coding:utf-8 -*-\nfrom __future__ import (\n absolute_import, division, print_function, unicode_literals\n)\n\nimport json\n\nimport django\nfrom django.core import checks\nfrom django.db import connections\nfrom django.db.models import Field, IntegerField, Transform\nfrom django.utils im... | diff --git a/HISTORY.rst b/HISTORY.rst
index 7a66330d..5883c0ee 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -12,6 +12,8 @@ Pending
standalone package.
* Added ``JSONSet`` database function that wraps the ``JSON_SET`` function from
MySQL 5.7.
+* Fixed ``JSONField`` to work with Django's serializer framework, as... |
jazzband__django-simple-history-822 | djangorestframework 3.12.3 introduced bug where HistoricalModel cannot be used with OrderingFilter
**Describe the bug**
When using a historical model in djangorestframework versions 3.12.3 and newer you cannot use `OrderingFilter` for the `ListAPIView`. If so an exception get raised in the serializer.
**To Reprod... | [
{
"content": "import copy\nimport importlib\nimport uuid\nimport warnings\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.contrib.auth import get_user_model\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db import models\nfrom... | [
{
"content": "import copy\nimport importlib\nimport uuid\nimport warnings\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.contrib.auth import get_user_model\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db import models\nfrom... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index a1663243c..cdbdb09fb 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -49,6 +49,7 @@ Authors
- Hamish Downer
- Hanyin Zhang
- Hernan Esteves (`sevetseh28 <https://github.com/sevetseh28>`_)
+- Hielke Walinga (`hwalinga <https://github.com/hwalinga>`_)
- Jack Cushman (`jcushm... |
qtile__qtile-1896 | Rogue windows left after Qtile restart after killing Keepassxc window
# Issue description
When I use `lazy.window.kill()` to kill Keepassxc' window and then restart Qtile, a rogue window is present and stuck to all screens, does not get managed by Qtile, and absorbs the pixels from the last thing that was above it. ... | [
{
"content": "# Copyright (c) 2019 Aldo Cortesi\n# Copyright (c) 2019 Sean Vig\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitatio... | [
{
"content": "# Copyright (c) 2019 Aldo Cortesi\n# Copyright (c) 2019 Sean Vig\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitatio... | diff --git a/libqtile/backend/x11/xcore.py b/libqtile/backend/x11/xcore.py
index 4b6ebd500c..eab298d85c 100644
--- a/libqtile/backend/x11/xcore.py
+++ b/libqtile/backend/x11/xcore.py
@@ -209,6 +209,7 @@ def scan(self) -> None:
if attrs and attrs.map_state == xcffib.xproto.MapState.Unmapped:
... |
rotki__rotki-2288 | Rotki premium DB upload does not respect user setting
## Problem Definition
It seems that rotki users who use premium experienced encrypted DB uploads even with the setting off. 2 versions back we broke the functionality and made it always upload.
## Task
Fix it
| [
{
"content": "import base64\nimport logging\nimport shutil\nfrom enum import Enum\nfrom typing import Any, Dict, NamedTuple, Optional, Tuple\n\nfrom typing_extensions import Literal\n\nfrom rotkehlchen.data_handler import DataHandler\nfrom rotkehlchen.errors import (\n PremiumAuthenticationError,\n Remote... | [
{
"content": "import base64\nimport logging\nimport shutil\nfrom enum import Enum\nfrom typing import Any, Dict, NamedTuple, Optional, Tuple\n\nfrom typing_extensions import Literal\n\nfrom rotkehlchen.data_handler import DataHandler\nfrom rotkehlchen.errors import (\n PremiumAuthenticationError,\n Remote... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index 1d133d1c17..4da41b7844 100755
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -2,13 +2,14 @@
Changelog
=========
+* :bug:`2287` Rotki encrypted DB upload for premium users should now respect the user setting.
+
* :release:`1.13.1 <2021-02-04>`
* :bug... |
jazzband__django-debug-toolbar-1447 | Slower than necessary start up (import) times
Hi,
I am digging into slow start up times of a Django app at the moment. I used `` to see which imports are slow and the `debug_toolbar` package is among them. But it would not have to be slow if we could get rid of the `pkg_resources` import.
```
$ PYTHONPROFILEIMPORT... | [
{
"content": "__all__ = [\"VERSION\"]\n\n\ntry:\n import pkg_resources\n\n VERSION = pkg_resources.get_distribution(\"django-debug-toolbar\").version\nexcept Exception:\n VERSION = \"unknown\"\n\n\n# Code that discovers files or modules in INSTALLED_APPS imports this module.\n\nurls = \"debug_toolbar.t... | [
{
"content": "__all__ = [\"VERSION\"]\n\n\n# Do not use pkg_resources to find the version but set it here directly!\n# see issue #1446\nVERSION = \"3.2\"\n\n# Code that discovers files or modules in INSTALLED_APPS imports this module.\n\nurls = \"debug_toolbar.toolbar\", \"djdt\"\n\ndefault_app_config = \"debug... | diff --git a/debug_toolbar/__init__.py b/debug_toolbar/__init__.py
index 844da1a5b..ddee48b62 100644
--- a/debug_toolbar/__init__.py
+++ b/debug_toolbar/__init__.py
@@ -1,13 +1,9 @@
__all__ = ["VERSION"]
-try:
- import pkg_resources
-
- VERSION = pkg_resources.get_distribution("django-debug-toolbar").version... |
ethereum__web3.py-3235 | web3.eth.getTransaction with EthereumTesterProvider return data instead of input
* Version: 4.3.0
* Python: 3.6
* OS: osx
### What was wrong?
I am using `web3.eth.getTransaction` to check transaction data in my tests. If I use geth node as HTTPProvider I got:
```
AttributeDict({'blockHash': HexBytes('0xc9dd4255... | [
{
"content": "import operator\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Dict,\n Optional,\n)\n\nfrom eth_typing import (\n ChecksumAddress,\n)\nfrom eth_utils import (\n is_dict,\n is_hex,\n is_string,\n)\nfrom eth_utils.curried import (\n apply_formatter_if,\n ... | [
{
"content": "import operator\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Dict,\n Optional,\n)\n\nfrom eth_typing import (\n ChecksumAddress,\n)\nfrom eth_utils import (\n is_dict,\n is_hex,\n is_string,\n)\nfrom eth_utils.curried import (\n apply_formatter_if,\n ... | diff --git a/newsfragments/3235.breaking.rst b/newsfragments/3235.breaking.rst
new file mode 100644
index 0000000000..f7b90fcfb3
--- /dev/null
+++ b/newsfragments/3235.breaking.rst
@@ -0,0 +1 @@
+``EthereumTesterProvider`` now returns ``input`` for `eth_getTransaction*` for better consistency with JSON-RPC spec.
diff -... |
conda__conda-2604 | install.package_cache() broken with cache directory does not exist
I just ran into this bug when building a package with `conda-build`. Before building the package, I cleaned out removed the cache directory `pkgs`. The trachback is as follows:
```
Traceback (most recent call last):
File "/home/ilan/minonda/bin/con... | [
{
"content": "# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\"\"\" This module contains:\n * all low-level code for extracting... | [
{
"content": "# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\"\"\" This module contains:\n * all low-level code for extracting... | diff --git a/conda/install.py b/conda/install.py
index bc4ca4030a4..d491810161d 100644
--- a/conda/install.py
+++ b/conda/install.py
@@ -689,8 +689,9 @@ def package_cache():
add_cached_package(pdir, url)
except IOError:
pass
- for fn in os.listdir(pdir):
- ad... |
chainer__chainer-458 | Restore cuda.init
Older versions of Chainer have `cuda.init`, which is missing in newest version (v1.3.2). For backward compatibility, we should add this (deprecated) API, in which actually do nothing.
| [
{
"content": "\"\"\"Device, context and memory management on CuPy.\n\nChainer uses CuPy (with very thin wrapper) to exploit the speed of GPU\ncomputation. Following modules and classes are imported to :mod:`cuda`\nmodule for convenience (refer to this table when reading chainer's source\ncodes).\n\n============... | [
{
"content": "\"\"\"Device, context and memory management on CuPy.\n\nChainer uses CuPy (with very thin wrapper) to exploit the speed of GPU\ncomputation. Following modules and classes are imported to :mod:`cuda`\nmodule for convenience (refer to this table when reading chainer's source\ncodes).\n\n============... | diff --git a/chainer/cuda.py b/chainer/cuda.py
index 028aba7d14e0..39faef4d253e 100644
--- a/chainer/cuda.py
+++ b/chainer/cuda.py
@@ -60,6 +60,15 @@ class ndarray(object):
_resolution_error = e
+def init(arg=None):
+ warnings.warn(
+ 'chainer.cuda.init is deprecated. You need to call nothing to ... |
quantumlib__Cirq-2296 | bug in supremacy test circuit
I ran the function
```
generate_boixo_2018_supremacy_circuits_v2_bristlecone(
n_rows: int, cz_depth: int, seed: int) -> circuits.Circuit
```
in `cirq.experiments.google_v2_supremacy_circuit` with `n_rows = 1` and got trapped in infinite loops.
I think this is because when w... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/cirq/experiments/google_v2_supremacy_circuit.py b/cirq/experiments/google_v2_supremacy_circuit.py
index 8725bd6f899..5a46909b502 100644
--- a/cirq/experiments/google_v2_supremacy_circuit.py
+++ b/cirq/experiments/google_v2_supremacy_circuit.py
@@ -132,7 +132,7 @@ def count_neighbors(qubits, qubit):
... |
celery__celery-7652 | add_periodic_task function does not trigger the task
## Checklist
* [x] I have included the output of ``celery -A proj report`` in the issue.
(if you are not able to do this, then at least specify the Celery
version affected).
* [x] I have verified that the issue exists against the `master` branch of Celer... | [
{
"content": "\"\"\"Actual App instance implementation.\"\"\"\nimport inspect\nimport os\nimport sys\nimport threading\nimport warnings\nfrom collections import UserDict, defaultdict, deque\nfrom datetime import datetime\nfrom operator import attrgetter\n\nfrom click.exceptions import Exit\nfrom kombu import po... | [
{
"content": "\"\"\"Actual App instance implementation.\"\"\"\nimport inspect\nimport os\nimport sys\nimport threading\nimport warnings\nfrom collections import UserDict, defaultdict, deque\nfrom datetime import datetime\nfrom operator import attrgetter\n\nfrom click.exceptions import Exit\nfrom kombu import po... | diff --git a/celery/app/base.py b/celery/app/base.py
index c21e290ed74..6ca3eaf5ada 100644
--- a/celery/app/base.py
+++ b/celery/app/base.py
@@ -253,7 +253,7 @@ def __init__(self, main=None, loader=None, backend=None,
self._pending_periodic_tasks = deque()
self.finalized = False
- self._final... |
python__typeshed-8843 | scripts/create_baseline_stubs.py instructions are outdated
I would prefer:
```
1. Manually review the generated stubs in {stub_dir}
2. Run tests locally if you want (see CONTRIBUTING.md)
3. Commit the changes on a new branch and create a typeshed PR
```
The CI will check everything anyway, and is set up so... | [
{
"content": "#!/usr/bin/env python3\n\n\"\"\"Script to generate unannotated baseline stubs using stubgen.\n\nBasic usage:\n$ python3 scripts/create_baseline_stubs.py <project on PyPI>\n\nRun with -h for more help.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport os\nimport re\nimport su... | [
{
"content": "#!/usr/bin/env python3\n\n\"\"\"Script to generate unannotated baseline stubs using stubgen.\n\nBasic usage:\n$ python3 scripts/create_baseline_stubs.py <project on PyPI>\n\nRun with -h for more help.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport argparse\nimport os\nimport re\nimport su... | diff --git a/scripts/create_baseline_stubs.py b/scripts/create_baseline_stubs.py
index 518806f13cbe..097bf611af3e 100755
--- a/scripts/create_baseline_stubs.py
+++ b/scripts/create_baseline_stubs.py
@@ -47,7 +47,7 @@ def get_installed_package_info(project: str) -> tuple[str, str] | None:
def run_stubgen(package: str... |
kartoza__prj.app-321 | More menu navigation cleanups
<img width="834" alt="screen shot 2016-06-22 at 00 00 38" src="https://cloud.githubusercontent.com/assets/178003/16247917/6d784382-380c-11e6-91f6-29423d263b8c.png">
- [ ] Make project icon and name clickable - click should take you to e.g. /en/qgis/
- [ ] Changelogs -> Changelog
- [ ] Remo... | [
{
"content": "import markdown\nfrom django import template\nfrom django.template.defaultfilters import stringfilter\nfrom django.utils.encoding import force_unicode\nfrom django.utils.safestring import mark_safe\n\nregister = template.Library()\n\n\n@register.filter(name='base_markdown', is_safe=True)\n@stringf... | [
{
"content": "import markdown\nfrom django import template\nfrom django.template.defaultfilters import stringfilter\nfrom django.utils.encoding import force_unicode\nfrom django.utils.safestring import mark_safe\n\nregister = template.Library()\n\n\n@register.filter(name='base_markdown', is_safe=True)\n@stringf... | diff --git a/django_project/base/templates/button_span.html b/django_project/base/templates/button_span.html
new file mode 100644
index 000000000..bd3ac4e38
--- /dev/null
+++ b/django_project/base/templates/button_span.html
@@ -0,0 +1 @@
+<span class="{{ button_icon }}"></span>
\ No newline at end of file
diff --git a/... |
quantumlib__Cirq-1794 | QubitOrder.explicit fails when given an iterator
Also affects `QubitOrder.as_qubit_order()`. I believe the issue is on line 77 of cirq/ops/qubit_order.py.
Example:
```
cirq.QubitOrder.as_qubit_order(reversed(cirq.LineQubit.range(5))).order_for(
(cirq.LineQubit(3),))
```
The example raises `ValueError: Un... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/cirq/ops/qubit_order.py b/cirq/ops/qubit_order.py
index b9dcb18ba52..4be8b3501a3 100644
--- a/cirq/ops/qubit_order.py
+++ b/cirq/ops/qubit_order.py
@@ -74,7 +74,7 @@ def explicit(fixed_qubits: Iterable[raw_types.Qid],
'Qubits appear in fixed_order twice: {}.'.format(result))
def... |
lmfit__lmfit-py-949 | Sys.module needs to be copied before being iterated over
#### Description
According to https://docs.python.org/3/library/sys.html#sys.modules, one needs to copy `sys.module` to iterate over it. This function [in this file](https://github.com/lmfit/lmfit-py/blob/8781a2dc33288b25fae6f3139595402155e4968b/lmfit/jsonutils.... | [
{
"content": "\"\"\"JSON utilities.\"\"\"\n\nfrom base64 import b64decode, b64encode\nfrom io import StringIO\nimport sys\nimport warnings\n\nimport dill\nimport numpy as np\nimport uncertainties\n\nHAS_DILL = True\n\ntry:\n from pandas import DataFrame, Series, read_json\nexcept ImportError:\n DataFrame ... | [
{
"content": "\"\"\"JSON utilities.\"\"\"\n\nfrom base64 import b64decode, b64encode\nfrom io import StringIO\nimport sys\nimport warnings\n\nimport dill\nimport numpy as np\nimport uncertainties\n\nHAS_DILL = True\n\ntry:\n from pandas import DataFrame, Series, read_json\nexcept ImportError:\n DataFrame ... | diff --git a/lmfit/jsonutils.py b/lmfit/jsonutils.py
index cd2a4da2..c5145cfd 100644
--- a/lmfit/jsonutils.py
+++ b/lmfit/jsonutils.py
@@ -24,7 +24,7 @@
def find_importer(obj):
"""Find importer of an object."""
oname = obj.__name__
- for modname, module in sys.modules.items():
+ for modname, module in ... |
joke2k__faker-1046 | Fake ISBN10 causes "Registrant/Publication not found"
In rare cases the `fake.isbn10` method throws an exception with the following message: `Exception: Registrant/Publication not found in registrant rule list. `
A full exception message:
```
/usr/local/lib/python3.6/site-packages/faker/providers/isbn/__init__.py:... | [
{
"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\nfrom .. import BaseProvider\nfrom .isbn import ISBN, ISBN10, ISBN13\nfrom .rules import RULES\n\n\nclass Provider(BaseProvider):\n \"\"\" Generates fake ISBNs. ISBN rules vary across languages/regions\n so this class makes no attempt... | [
{
"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\nfrom .. import BaseProvider\nfrom .isbn import ISBN, ISBN10, ISBN13\nfrom .rules import RULES\n\n\nclass Provider(BaseProvider):\n \"\"\" Generates fake ISBNs. ISBN rules vary across languages/regions\n so this class makes no attempt... | diff --git a/faker/providers/isbn/__init__.py b/faker/providers/isbn/__init__.py
index ada84898fe..2d6ace9c30 100644
--- a/faker/providers/isbn/__init__.py
+++ b/faker/providers/isbn/__init__.py
@@ -52,7 +52,7 @@ def _registrant_publication(reg_pub, rules):
:returns: A (registrant, publication) tuple of string... |
dask__dask-10888 | Tests for dummy data generation failing
Looks like there are some tests failing for the dummy data generation
https://dask.github.io/dask/test_short_report.html
https://github.com/dask/dask/actions/runs/7650514559/job/20846717103
| [
{
"content": "from __future__ import annotations\n\nimport random\n\nfrom packaging.version import Version\n\nfrom dask.utils import import_required\n\n\ndef timeseries(\n start=\"2000-01-01\",\n end=\"2000-01-31\",\n freq=\"1s\",\n partition_freq=\"1d\",\n dtypes=None,\n seed=None,\n **kwa... | [
{
"content": "from __future__ import annotations\n\nimport random\n\nfrom packaging.version import Version\n\nfrom dask.utils import import_required\n\n\ndef timeseries(\n start=\"2000-01-01\",\n end=\"2000-01-31\",\n freq=\"1s\",\n partition_freq=\"1d\",\n dtypes=None,\n seed=None,\n **kwa... | diff --git a/continuous_integration/environment-3.10.yaml b/continuous_integration/environment-3.10.yaml
index d917a078158..82f301b36cf 100644
--- a/continuous_integration/environment-3.10.yaml
+++ b/continuous_integration/environment-3.10.yaml
@@ -23,7 +23,7 @@ dependencies:
- pytest-xdist
- moto<5
# Optional... |
kivy__python-for-android-2123 | TestGetSystemPythonExecutable.test_virtualenv test fail
The `TestGetSystemPythonExecutable.test_virtualenv` and `TestGetSystemPythonExecutable.test_venv` tests started failing all of a sudden.
Error was:
```
ModuleNotFoundError: No module named \'pytoml\'\n'
```
This ca be reproduced in local via:
```sh
pytest t... | [
{
"content": "from os.path import join\n\nfrom pythonforandroid.recipe import Recipe\nfrom pythonforandroid.util import current_directory\nfrom pythonforandroid.logger import shprint\nimport sh\n\n\nclass OpenSSLRecipe(Recipe):\n '''\n The OpenSSL libraries for python-for-android. This recipe will generat... | [
{
"content": "from os.path import join\n\nfrom pythonforandroid.recipe import Recipe\nfrom pythonforandroid.util import current_directory\nfrom pythonforandroid.logger import shprint\nimport sh\n\n\nclass OpenSSLRecipe(Recipe):\n '''\n The OpenSSL libraries for python-for-android. This recipe will generat... | diff --git a/README.md b/README.md
index 692007bdf3..c3d421873e 100644
--- a/README.md
+++ b/README.md
@@ -107,7 +107,7 @@ years. These **unified python recipes** require a **minimum target api level of
api level below 21, you should use an older version of python-for-android
(<=0.7.1).
-On March of 2020 we dropped... |
scikit-hep__pyhf-860 | Add Python 3.8 to CI
# Description
The branch [`ci/add-Python-3.8-to-CI`](https://github.com/diana-hep/pyhf/compare/ci/add-Python-3.8-to-CI) adds Python 3.8 to the CI. However, as [PyTorch won't have a Python 3.8 wheel until the next release](https://github.com/pytorch/pytorch/issues/21741#issuecomment-541242504) th... | [
{
"content": "from setuptools import setup, find_packages\nfrom pathlib import Path\n\nthis_directory = Path(__file__).parent.resolve()\nwith open(Path(this_directory).joinpath('README.rst'), encoding='utf-8') as readme_rst:\n long_description = readme_rst.read()\n\nextras_require = {\n 'tensorflow': ['te... | [
{
"content": "from setuptools import setup, find_packages\nfrom pathlib import Path\n\nthis_directory = Path(__file__).parent.resolve()\nwith open(Path(this_directory).joinpath('README.rst'), encoding='utf-8') as readme_rst:\n long_description = readme_rst.read()\n\nextras_require = {\n 'tensorflow': ['te... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f7b4cec431..56afa8add3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
- python-version: [3.6, 3.7]
+ python-version:... |
angr__angr-1267 | VariableRecovery fails with "AttributeError: value"
```
import angr
p = angr.Project('/tmp/a.out')
cfg = p.analyses.CFG()
vr = p.analyses.VariableRecovery(cfg.functions.function(name='main'))
```
for the following code
```
.globl main
main:
mov (%rbx),%rsi
mov %rbx,%rdi
... | [
{
"content": "import logging\nfrom collections import defaultdict\nfrom functools import reduce\n\nimport angr # type annotations; pylint: disable=unused-import\n\nfrom .. import Analysis\n\nfrom .annotations import StackLocationAnnotation\nfrom ..code_location import CodeLocation\nfrom ..forward_analysis impor... | [
{
"content": "import logging\nfrom collections import defaultdict\nfrom functools import reduce\n\nimport angr # type annotations; pylint: disable=unused-import\n\nfrom .. import Analysis\n\nfrom .annotations import StackLocationAnnotation\nfrom ..code_location import CodeLocation\nfrom ..forward_analysis impor... | diff --git a/angr/analyses/variable_recovery/variable_recovery.py b/angr/analyses/variable_recovery/variable_recovery.py
index e20cf86691b..4454585d9fb 100644
--- a/angr/analyses/variable_recovery/variable_recovery.py
+++ b/angr/analyses/variable_recovery/variable_recovery.py
@@ -483,7 +483,7 @@ def _run_on_node(self, ... |
encode__httpx-1127 | On `proxies={"http": ...}` vs. `proxies={"http://": ...}`
Currently we're in line with `requests` in supporting "all", "http", and "https" as valid proxy keys.
Internally we handle those as URL patterns that we can match against, and eg. `"http"` is *actually* mapped to `"http://"`.
I'm wondering if we might have... | [
{
"content": "import codecs\nimport collections\nimport logging\nimport mimetypes\nimport netrc\nimport os\nimport re\nimport sys\nimport typing\nimport warnings\nfrom datetime import timedelta\nfrom pathlib import Path\nfrom time import perf_counter\nfrom types import TracebackType\nfrom urllib.request import ... | [
{
"content": "import codecs\nimport collections\nimport logging\nimport mimetypes\nimport netrc\nimport os\nimport re\nimport sys\nimport typing\nimport warnings\nfrom datetime import timedelta\nfrom pathlib import Path\nfrom time import perf_counter\nfrom types import TracebackType\nfrom urllib.request import ... | diff --git a/docs/advanced.md b/docs/advanced.md
index 51544e5547..cf9ab94bc3 100644
--- a/docs/advanced.md
+++ b/docs/advanced.md
@@ -284,8 +284,8 @@ For more advanced use cases, pass a proxies `dict`. For example, to route HTTP a
```python
proxies = {
- "http": "http://localhost:8030",
- "https": "http://lo... |
esphome__esphome-docs-1150 | Add airquality wp6003 + am312 tutorial
Add air quality + am312 tutorial
## Description:
**Related issue (if applicable):** fixes <link to issue>
**Pull request in [esphome](https://github.com/esphome/esphome) with YAML changes (if applicable):** esphome/esphome#<esphome PR number goes here>
## Checklist:
... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# esphome documentation build configuration file, created by\n# sphinx-quickstart on Mon Jan 22 21:44:07 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration ... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# esphome documentation build configuration file, created by\n# sphinx-quickstart on Mon Jan 22 21:44:07 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration ... | diff --git a/Doxygen b/Doxygen
index 31fa5d55d9..5f634dfbd2 100644
--- a/Doxygen
+++ b/Doxygen
@@ -38,7 +38,7 @@ PROJECT_NAME = "ESPHome"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 1.17.2
+PROJECT_NUMBER = 1.18.... |
openvinotoolkit__datumaro-319 | Potential integer overflow
In the code below we see that `img` can be of type `uint8`, then `img` is multiplied by 2<sup>8</sup> and 2<sup>16</sup>, but `uint8` cannot store such large numbers.
https://github.com/openvinotoolkit/datumaro/blob/5209d42348b001b2f07a917d5dd7b76f3469c7ce/datumaro/util/mask_tools.py#L116-L1... | [
{
"content": "\n# Copyright (C) 2019-2020 Intel Corporation\n#\n# SPDX-License-Identifier: MIT\n\nfrom itertools import chain\nimport numpy as np\n\nfrom datumaro.util.image import lazy_image, load_image\n\n\ndef generate_colormap(length=256):\n \"\"\"\n Generates colors using PASCAL VOC algorithm.\n\n ... | [
{
"content": "\n# Copyright (C) 2019-2020 Intel Corporation\n#\n# SPDX-License-Identifier: MIT\n\nfrom itertools import chain\nimport numpy as np\n\nfrom datumaro.util.image import lazy_image, load_image\n\n\ndef generate_colormap(length=256):\n \"\"\"\n Generates colors using PASCAL VOC algorithm.\n\n ... | diff --git a/datumaro/util/mask_tools.py b/datumaro/util/mask_tools.py
index bd763dffea..cbe477054f 100644
--- a/datumaro/util/mask_tools.py
+++ b/datumaro/util/mask_tools.py
@@ -114,8 +114,8 @@ def make_binary_mask(mask):
return mask.astype(bool)
def bgr2index(img):
- if img.dtype.kind not in {'b', 'i', 'u'... |
geopandas__geopandas-2065 | BUG: inconsistent sjoin suffix
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [x] (optional) I have confirmed this bug exists on the master branch of geopandas.
---
#### Code Sample, a copy-pastable example
... | [
{
"content": "import warnings\n\nimport pandas as pd\n\nfrom geopandas import GeoDataFrame\nfrom geopandas.array import _check_crs, _crs_mismatch_warn\n\n\ndef sjoin(\n left_df, right_df, how=\"inner\", op=\"intersects\", lsuffix=\"left\", rsuffix=\"right\"\n):\n \"\"\"Spatial join of two GeoDataFrames.\n... | [
{
"content": "import warnings\n\nimport pandas as pd\n\nfrom geopandas import GeoDataFrame\nfrom geopandas.array import _check_crs, _crs_mismatch_warn\n\n\ndef sjoin(\n left_df, right_df, how=\"inner\", op=\"intersects\", lsuffix=\"left\", rsuffix=\"right\"\n):\n \"\"\"Spatial join of two GeoDataFrames.\n... | diff --git a/geopandas/tools/sjoin.py b/geopandas/tools/sjoin.py
index da5b94cf32..e1a4b8d7d7 100644
--- a/geopandas/tools/sjoin.py
+++ b/geopandas/tools/sjoin.py
@@ -319,6 +319,7 @@ def _frame_join(indices, left_df, right_df, how, lsuffix, rsuffix):
left_index=True,
right_on="_key_lef... |
modin-project__modin-4515 | Logging mode leaves a hanging thread in interactive python session
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: MacOS Monterey
- **Modin version** (`modin.__version__`): latest source
- **Python version**: 3.9.12
- **Code we can use to reproduce**:
In ipython, run
```... | [
{
"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ... | [
{
"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ... | diff --git a/docs/release_notes/release_notes-0.15.0.rst b/docs/release_notes/release_notes-0.15.0.rst
index a51f1312357..970e66e2bc2 100644
--- a/docs/release_notes/release_notes-0.15.0.rst
+++ b/docs/release_notes/release_notes-0.15.0.rst
@@ -24,6 +24,7 @@ Key Features and Updates
* FIX-#4449: Drain the call queue... |
biolab__orange3-2914 | OWDistributions: Legend layout
Legend items in the distribution widget have too much vertical spacing and cover entire plot when labels are long.
##### Orange version
3.5.0.dev0+fce22ac (master)
##### Expected behavior
The problem doesn't always occur, the vertical spacing seems dependent on the label length (d... | [
{
"content": "from collections import Counter\nimport sys\nimport itertools\nfrom xml.sax.saxutils import escape\nfrom math import log10, floor, ceil\n\nimport numpy as np\nfrom scipy.stats import linregress\n\nfrom AnyQt.QtCore import Qt, QObject, QEvent, QRectF, QPointF, QSize\nfrom AnyQt.QtGui import (\n ... | [
{
"content": "from collections import Counter\nimport sys\nimport itertools\nfrom xml.sax.saxutils import escape\nfrom math import log10, floor, ceil\n\nimport numpy as np\nfrom scipy.stats import linregress\n\nfrom AnyQt.QtCore import Qt, QObject, QEvent, QRectF, QPointF, QSize\nfrom AnyQt.QtGui import (\n ... | diff --git a/Orange/widgets/visualize/owscatterplotgraph.py b/Orange/widgets/visualize/owscatterplotgraph.py
index ae0042f684a..764e85e4152 100644
--- a/Orange/widgets/visualize/owscatterplotgraph.py
+++ b/Orange/widgets/visualize/owscatterplotgraph.py
@@ -83,7 +83,6 @@ def __init__(self, size=None, offset=None, pen=No... |
beeware__toga-2356 | On GTK, `App.current_window` returns the last active window even when all windows are hidden
### Describe the bug
On Cocoa and WinForms, it returns `None` in this situation, which I think makes more sense.
### Environment
- Software versions:
- Toga: main (536a60f)
| [
{
"content": "import asyncio\nimport signal\nimport sys\nfrom pathlib import Path\n\nimport gbulb\n\nimport toga\nfrom toga import App as toga_App\nfrom toga.command import Command, Separator\n\nfrom .keys import gtk_accel\nfrom .libs import TOGA_DEFAULT_STYLES, Gdk, Gio, GLib, Gtk\nfrom .window import Window\n... | [
{
"content": "import asyncio\nimport signal\nimport sys\nfrom pathlib import Path\n\nimport gbulb\n\nimport toga\nfrom toga import App as toga_App\nfrom toga.command import Command, Separator\n\nfrom .keys import gtk_accel\nfrom .libs import TOGA_DEFAULT_STYLES, Gdk, Gio, GLib, Gtk\nfrom .window import Window\n... | diff --git a/changes/2211.bugfix.rst b/changes/2211.bugfix.rst
new file mode 100644
index 0000000000..dd26dd9947
--- /dev/null
+++ b/changes/2211.bugfix.rst
@@ -0,0 +1 @@
+`App.current_window` on Gtk now returns `None` when all windows are hidden.
diff --git a/gtk/src/toga_gtk/app.py b/gtk/src/toga_gtk/app.py
index 6b4... |
bookwyrm-social__bookwyrm-2314 | Normalize stored ISNI
The `ISNI` field should always be in the same format (without spaces), but right now sometimes the field is stored with spaces between the digits. There should be validation when the author is saved that cleans this value, similar to how ISBNs are validated
| [
{
"content": "\"\"\" database schema for info about authors \"\"\"\nimport re\nfrom django.contrib.postgres.indexes import GinIndex\nfrom django.core.cache import cache\nfrom django.core.cache.utils import make_template_fragment_key\nfrom django.db import models\n\nfrom bookwyrm import activitypub\nfrom bookwyr... | [
{
"content": "\"\"\" database schema for info about authors \"\"\"\nimport re\nfrom django.contrib.postgres.indexes import GinIndex\nfrom django.core.cache import cache\nfrom django.core.cache.utils import make_template_fragment_key\nfrom django.db import models\n\nfrom bookwyrm import activitypub\nfrom bookwyr... | diff --git a/bookwyrm/models/author.py b/bookwyrm/models/author.py
index 78d153a211..7d2a0e62ba 100644
--- a/bookwyrm/models/author.py
+++ b/bookwyrm/models/author.py
@@ -42,6 +42,11 @@ def save(self, *args, **kwargs):
for book in self.book_set.values_list("id", flat=True)
]
c... |
psf__black-2678 | Bug on regular expression with black-21.12b0
<!--
Please make sure that the bug is not already fixed either in newer versions or the
current development version. To confirm this, you have three options:
1. Update Black's version if a newer release exists: `pip install -U black`
2. Use the online formatter at <htt... | [
{
"content": "import asyncio\nfrom json.decoder import JSONDecodeError\nimport json\nfrom concurrent.futures import Executor, ThreadPoolExecutor, ProcessPoolExecutor\nfrom contextlib import contextmanager\nfrom datetime import datetime\nfrom enum import Enum\nimport io\nfrom multiprocessing import Manager, free... | [
{
"content": "import asyncio\nfrom json.decoder import JSONDecodeError\nimport json\nfrom concurrent.futures import Executor, ThreadPoolExecutor, ProcessPoolExecutor\nfrom contextlib import contextmanager\nfrom datetime import datetime\nfrom enum import Enum\nimport io\nfrom multiprocessing import Manager, free... | diff --git a/CHANGES.md b/CHANGES.md
index 9e13ef438cb..37248202750 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,11 @@
# Change Log
+## Unreleased
+
+### _Black_
+
+- Improve error message for invalid regular expression (#2678)
+
## 21.12b0
### _Black_
diff --git a/src/black/__init__.py b/src/black/__init... |
AUTOMATIC1111__stable-diffusion-webui-10524 | [Bug]: X/Y/Z plot load different model if model names are similar
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
After last update [9aba26abdf] X/Y/Z plot load different model than picked in settings.
This is generation f... | [
{
"content": "from collections import namedtuple\r\nfrom copy import copy\r\nfrom itertools import permutations, chain\r\nimport random\r\nimport csv\r\nfrom io import StringIO\r\nfrom PIL import Image\r\nimport numpy as np\r\n\r\nimport modules.scripts as scripts\r\nimport gradio as gr\r\n\r\nfrom modules impo... | [
{
"content": "from collections import namedtuple\r\nfrom copy import copy\r\nfrom itertools import permutations, chain\r\nimport random\r\nimport csv\r\nfrom io import StringIO\r\nfrom PIL import Image\r\nimport numpy as np\r\n\r\nimport modules.scripts as scripts\r\nimport gradio as gr\r\n\r\nfrom modules impo... | diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py
index a725d74a3b3..db768fd2aa6 100644
--- a/scripts/xyz_grid.py
+++ b/scripts/xyz_grid.py
@@ -86,7 +86,7 @@ def apply_checkpoint(p, x, xs):
info = modules.sd_models.get_closet_checkpoint_match(x)
if info is None:
raise RuntimeError(f"Unknown ch... |
Mailu__Mailu-744 | Why a print statement in this code?
@kaiyou, according git blame this is yours. I wonder if it was included for debugging purposes and not taken out anymore?
https://github.com/Mailu/Mailu/blob/5c2439011413a114c470862f95206f8487fa4568/core/admin/mailu/internal/views/dovecot.py#L18
| [
{
"content": "from mailu import models\nfrom mailu.internal import internal\nfrom flask import current_app as app\n\nimport flask\nimport socket\nimport os\n\n@internal.route(\"/dovecot/passdb/<user_email>\")\ndef dovecot_passdb_dict(user_email):\n user = models.User.query.get(user_email) or flask.abort(404)... | [
{
"content": "from mailu import models\nfrom mailu.internal import internal\nfrom flask import current_app as app\n\nimport flask\nimport socket\nimport os\n\n@internal.route(\"/dovecot/passdb/<user_email>\")\ndef dovecot_passdb_dict(user_email):\n user = models.User.query.get(user_email) or flask.abort(404)... | diff --git a/core/admin/mailu/internal/views/dovecot.py b/core/admin/mailu/internal/views/dovecot.py
index 762bd9414..463ecc20d 100644
--- a/core/admin/mailu/internal/views/dovecot.py
+++ b/core/admin/mailu/internal/views/dovecot.py
@@ -13,7 +13,6 @@ def dovecot_passdb_dict(user_email):
allow_nets.append(app.confi... |
google__jax-17962 | ⚠️ Nightly upstream-dev CI failed ⚠️
[Workflow Run URL](https://github.com/google/jax/actions/runs/6431383221)
<details><summary>Summary of Failures</summary>
```
tests/lax_numpy_test.py::NumpyUfuncTests::testUfuncInputTypes11: jaxlib.mlir._mlir_libs._site_initialize.<locals>.MLIRError: Verification failed:
error: "ji... | [
{
"content": "# Copyright 2018 The JAX Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | [
{
"content": "# Copyright 2018 The JAX Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | diff --git a/jax/_src/numpy/ufuncs.py b/jax/_src/numpy/ufuncs.py
index 61fa45330fe3..b70752910aa2 100644
--- a/jax/_src/numpy/ufuncs.py
+++ b/jax/_src/numpy/ufuncs.py
@@ -201,7 +201,7 @@ def arccosh(x: ArrayLike, /) -> Array:
@jit
def bitwise_count(x: ArrayLike, /) -> Array:
# Following numpy we take the absolute ... |
zigpy__zha-device-handlers-506 | [BUG] Osram switch mini
**Describe the bug**
Adding a OSRAM Lightify Switch Mini to my network is not working out after quirk was added some time ago.
Before quirk: I picked up zha_events.
After quirk: The remote switches everything(switched bulbs cover) in my network on and off.
**To Reproduce**
Step... | [
{
"content": "\"\"\"Osram Smart+ Switch Mini device.\"\"\"\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomDevice\nfrom zigpy.zcl.clusters.general import (\n Basic,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n PowerConfiguration,\n Scenes,\n PollControl,\n)\... | [
{
"content": "\"\"\"Osram Smart+ Switch Mini device.\"\"\"\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomDevice\nfrom zigpy.zcl.clusters.general import (\n Basic,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n PowerConfiguration,\n Scenes,\n PollControl,\n)\... | diff --git a/tests/test_quirks.py b/tests/test_quirks.py
new file mode 100644
index 0000000000..dfe0701a99
--- /dev/null
+++ b/tests/test_quirks.py
@@ -0,0 +1,23 @@
+"""General quirk tests."""
+
+import pytest
+import zigpy.quirks as zq
+import zhaquirks # noqa: F401, E402
+from zhaquirks.const import ENDPOINTS
+
+ALL... |
conda__conda-8998 | Conda <=4.7.10 does not respect repodata_fns condarc setting
<!--
Hi! Read this; it's important.
This is an issue tracker for conda -- the package manager. File feature requests
for conda here, as well as bug reports about something conda has messed up.
If your issue is a bug report for:
* a specific conda... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2012 Anaconda, Inc\n# SPDX-License-Identifier: BSD-3-Clause\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom logging import getLogger\nimport os\nfrom os.path import abspath, basename, exists, isdir, isfile, join\n... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2012 Anaconda, Inc\n# SPDX-License-Identifier: BSD-3-Clause\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom logging import getLogger\nimport os\nfrom os.path import abspath, basename, exists, isdir, isfile, join\n... | diff --git a/conda/cli/install.py b/conda/cli/install.py
index 91af67652d9..c1c4fe75401 100644
--- a/conda/cli/install.py
+++ b/conda/cli/install.py
@@ -225,8 +225,8 @@ def install(args, parser, command='install'):
repodata_fns = args.repodata_fns
if not repodata_fns:
- repodata_fns = ["current_repod... |
pallets__werkzeug-1564 | Detect opera as browser in user_agent
### Expected Behavior
`user_agent.browser` is reported as `opera` and `user_agent.version` as `60` when browsing using Opera 60 in MacOs 10.13.5.
```python
@web.route('/test')
def test():
browser = request.user_agent.browser
version = request.user_agent.version an... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.useragents\n ~~~~~~~~~~~~~~~~~~~\n\n This module provides a helper to inspect user agent strings. This module\n is far from complete but should work for most of the currently available\n browsers.\n\n\n :copyright: 2007 Pallets\n :li... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.useragents\n ~~~~~~~~~~~~~~~~~~~\n\n This module provides a helper to inspect user agent strings. This module\n is far from complete but should work for most of the currently available\n browsers.\n\n\n :copyright: 2007 Pallets\n :li... | diff --git a/src/werkzeug/useragents.py b/src/werkzeug/useragents.py
index 9416b0d7a..720a952ae 100644
--- a/src/werkzeug/useragents.py
+++ b/src/werkzeug/useragents.py
@@ -46,7 +46,7 @@ class UserAgentParser(object):
("yahoo", "yahoo"),
("ask jeeves", "ask"),
(r"aol|america\s+online\s+browse... |
opsdroid__opsdroid-233 | [Docker] DEFAULT_ROOT_PATH should be created if it does not exist
I have tried to run opsdroid in a Docker container, in the following environment:
```
OS: Ubuntu 16.04.3 LTS
Docker version: 17.06.2-ce
Docker API version: 1.30
```
The process I followed is the following:
1. `docker pull opsdroid/opsdroid:l... | [
{
"content": "\"\"\"Starts opsdroid.\"\"\"\n\nimport os\nimport sys\nimport logging\nimport argparse\n\nfrom opsdroid.core import OpsDroid\nfrom opsdroid.const import DEFAULT_LOG_FILENAME, EXAMPLE_CONFIG_FILE\nfrom opsdroid.web import Web\n\n\n_LOGGER = logging.getLogger(\"opsdroid\")\n\n\ndef configure_logging... | [
{
"content": "\"\"\"Starts opsdroid.\"\"\"\n\nimport os\nimport sys\nimport logging\nimport argparse\n\nfrom opsdroid.core import OpsDroid\nfrom opsdroid.const import DEFAULT_LOG_FILENAME, EXAMPLE_CONFIG_FILE\nfrom opsdroid.web import Web\n\n\n_LOGGER = logging.getLogger(\"opsdroid\")\n\n\ndef configure_logging... | diff --git a/opsdroid/__main__.py b/opsdroid/__main__.py
index be3e088c6..cd99f0b17 100644
--- a/opsdroid/__main__.py
+++ b/opsdroid/__main__.py
@@ -48,6 +48,9 @@ def configure_logging(config):
pass
if logfile_path:
+ logdir = os.path.dirname(os.path.realpath(logfile_path))
+ if not os.pat... |
getmoto__moto-705 | S3 multipart upload failure due to ETag mismatch with boto3
A basic multipart upload on S3 with a script as follows work on unmocked S3:
```
import logging
import boto3
import moto
logging.basicConfig(level='WARNING')
def multipart_upload():
bucket = 'mytestbucket'
key = 'uploaded'
s3 = boto3.client(... | [
{
"content": "from __future__ import unicode_literals\n\nimport re\n\nimport six\nfrom six.moves.urllib.parse import parse_qs, urlparse\nimport xmltodict\n\nfrom moto.core.responses import _TemplateEnvironmentMixin\n\nfrom moto.s3bucket_path.utils import bucket_name_from_url as bucketpath_bucket_name_from_url, ... | [
{
"content": "from __future__ import unicode_literals\n\nimport re\n\nimport six\nfrom six.moves.urllib.parse import parse_qs, urlparse\nimport xmltodict\n\nfrom moto.core.responses import _TemplateEnvironmentMixin\n\nfrom moto.s3bucket_path.utils import bucket_name_from_url as bucketpath_bucket_name_from_url, ... | diff --git a/moto/s3/responses.py b/moto/s3/responses.py
index 0a7566538681..b07b50fa6674 100644
--- a/moto/s3/responses.py
+++ b/moto/s3/responses.py
@@ -400,6 +400,7 @@ def _key_response_get(self, bucket_name, query, key_name, headers):
return 200, headers, template.render(obj=key)
headers.upd... |
mitmproxy__mitmproxy-2875 | Mitmproxy crashes, when we try to write a value from file into grideditor cell
##### Steps to reproduce the problem:
1. Create a file. Put inside:
```
abc
```
2. Run mitmproxy.
3. Press `n` -> `Enter` -> `Enter` -> `e` -> `cookies`. You will get into `cookies` grideditor.
4. Press `a` -> `Esc` -> `r` (or `R`, ... | [
{
"content": "\"\"\"\nWelcome to the encoding dance!\n\nIn a nutshell, text columns are actually a proxy class for byte columns,\nwhich just encode/decodes contents.\n\"\"\"\n\nfrom mitmproxy.tools.console import signals\nfrom mitmproxy.tools.console.grideditor import col_bytes\n\n\nclass Column(col_bytes.Colum... | [
{
"content": "\"\"\"\nWelcome to the encoding dance!\n\nIn a nutshell, text columns are actually a proxy class for byte columns,\nwhich just encode/decodes contents.\n\"\"\"\n\nfrom mitmproxy.tools.console import signals\nfrom mitmproxy.tools.console.grideditor import col_bytes\n\n\nclass Column(col_bytes.Colum... | diff --git a/mitmproxy/tools/console/grideditor/col_text.py b/mitmproxy/tools/console/grideditor/col_text.py
index 3251867043..576c33acce 100644
--- a/mitmproxy/tools/console/grideditor/col_text.py
+++ b/mitmproxy/tools/console/grideditor/col_text.py
@@ -28,7 +28,7 @@ def blank(self):
class EncodingMixin:
def __i... |
AlexsLemonade__refinebio-1365 | GSE56035: refinebio_age isn't quite right
### Context
The harmonization on some metadata isn't correct due to the weirdness of how the metadata was written.
### Problem or idea
For GSE56035, there are two columns `age` and `age (yrs)`. refinebio_age is populated only with the values in `age` so it looks like there... | [
{
"content": "import csv\nimport random\nimport requests\nimport string\n\nfrom io import StringIO\nfrom typing import Dict, List\n\nfrom data_refinery_common.logging import get_and_configure_logger\nfrom data_refinery_common.models import Sample\nfrom data_refinery_foreman.surveyor.utils import requests_retry_... | [
{
"content": "import csv\nimport random\nimport requests\nimport string\n\nfrom io import StringIO\nfrom typing import Dict, List\n\nfrom data_refinery_common.logging import get_and_configure_logger\nfrom data_refinery_common.models import Sample\nfrom data_refinery_foreman.surveyor.utils import requests_retry_... | diff --git a/foreman/data_refinery_foreman/surveyor/harmony.py b/foreman/data_refinery_foreman/surveyor/harmony.py
index 9049dd8af..f11d5c721 100644
--- a/foreman/data_refinery_foreman/surveyor/harmony.py
+++ b/foreman/data_refinery_foreman/surveyor/harmony.py
@@ -349,6 +349,7 @@ def harmonize(metadata: List) -> Dict:
... |
digitalfabrik__integreat-cms-515 | Language tree node form not working
### Describe the Bug
<!-- A clear and concise description of what the bug is. -->
Since commit 928dec60b79ba47366099ca4227b2abe0acb2de7, the language node form is not working anymore.
### Steps to Reproduce
1. Go to a region
2. Open language tree
3. Open language tree node
... | [
{
"content": "import logging\n\nfrom django import forms\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom ...models import Language, LanguageTreeNode\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass LanguageField(forms.ModelChoiceField):\n \"\"\"\n Form field helper class to overwrite ... | [
{
"content": "import logging\n\nfrom django import forms\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom ...models import Language, LanguageTreeNode\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass LanguageField(forms.ModelChoiceField):\n \"\"\"\n Form field helper class to overwrite ... | diff --git a/src/cms/forms/language_tree/language_tree_node_form.py b/src/cms/forms/language_tree/language_tree_node_form.py
index 87b4db257c..52d7d2818c 100644
--- a/src/cms/forms/language_tree/language_tree_node_form.py
+++ b/src/cms/forms/language_tree/language_tree_node_form.py
@@ -48,7 +48,7 @@ def __init__(self, ... |
magenta__magenta-541 | documentation: missing dependencies
I installed magenta from scratch on a clean Mac using the README and some tests from`bazel test //magenta/...` were failing because of the missing dependencies:
```
pip install IPython
pip install intervaltree
```
The other failures are related to https://github.com/tensorfl... | [
{
"content": "# Copyright 2016 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | [
{
"content": "# Copyright 2016 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | diff --git a/magenta/tools/pip/setup.py b/magenta/tools/pip/setup.py
index fa18a80f98..85320dbb23 100644
--- a/magenta/tools/pip/setup.py
+++ b/magenta/tools/pip/setup.py
@@ -24,13 +24,14 @@
REQUIRED_PACKAGES = [
+ 'IPython',
+ 'Pillow >= 3.4.2',
'intervaltree >= 2.1.0',
+ 'matplotlib >= 1.5.3',
... |
wemake-services__wemake-python-styleguide-2342 | AttributeError: 'Raise' object has no attribute 'value'
### What's wrong
```
Traceback (most recent call last):
File "site-packages/wemake_python_styleguide/checker.py", line 154, in run
visitor.run()
File "site-packages/wemake_python_styleguide/visitors/base.py", line 191, in run
self.visit(self.tree... | [
{
"content": "\"\"\"\nCounts annotation complexity by getting the nesting level of nodes.\n\nSo ``List[int]`` complexity is 2\nand ``Tuple[List[Optional[str]], int]`` is 4.\n\nAdapted from: https://github.com/best-doctor/flake8-annotations-complexity\n\"\"\"\n\nimport ast\nfrom typing import Union\n\nfrom wemak... | [
{
"content": "\"\"\"\nCounts annotation complexity by getting the nesting level of nodes.\n\nSo ``List[int]`` complexity is 2\nand ``Tuple[List[Optional[str]], int]`` is 4.\n\nAdapted from: https://github.com/best-doctor/flake8-annotations-complexity\n\"\"\"\n\nimport ast\nfrom typing import Union\n\nfrom wemak... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 421c9cea7..18a9a8d76 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,13 @@ Semantic versioning in our case means:
change the client facing API, change code conventions significantly, etc.
+## 0.16.1 WIP
+
+### Bugfixes
+
+- Fixes crash on `'Literal["raise"... |
flask-admin__flask-admin-2190 | WTForms 3.0.0 breaks DateTimeField format compatibility
When using flask-admin v1.5.8 and WTForms 3.0.0 the form doesn't validate on submit when a `DateTimeField` is used with a custom format. The error message `Not a valid datetime value.` appears below the field.
To reproduce it just configure a `DateTimeField` wi... | [
{
"content": "import time\nimport datetime\nimport json\n\nfrom wtforms import fields\nfrom flask_admin.babel import gettext\nfrom flask_admin._compat import text_type, as_unicode\n\nfrom . import widgets as admin_widgets\n\n\"\"\"\nAn understanding of WTForms's Custom Widgets is helpful for understanding this ... | [
{
"content": "import time\nimport datetime\nimport json\n\nfrom wtforms import fields\nfrom flask_admin.babel import gettext\nfrom flask_admin._compat import text_type, as_unicode\n\nfrom . import widgets as admin_widgets\n\n\"\"\"\nAn understanding of WTForms's Custom Widgets is helpful for understanding this ... | diff --git a/flask_admin/form/fields.py b/flask_admin/form/fields.py
index b31cc38d3..f1b0c71c7 100644
--- a/flask_admin/form/fields.py
+++ b/flask_admin/form/fields.py
@@ -36,9 +36,8 @@ def __init__(self, label=None, validators=None, format=None, **kwargs):
:param kwargs:
Any additional p... |
beetbox__beets-4833 | KeyError in new pseudo-release extraction path
Beets is crashing currently when running mbsync on the whole library as well as attempting imports on some albums. It seems to be a problem that was introduced with #4714 with the assumption that res['release'] will be a dict contatining a 'status' key.. This has rendered ... | [
{
"content": "# 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, including\n# without limita... | [
{
"content": "# 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, including\n# without limita... | diff --git a/beets/autotag/mb.py b/beets/autotag/mb.py
index c7dba1bc8d..2f0f99ff18 100644
--- a/beets/autotag/mb.py
+++ b/beets/autotag/mb.py
@@ -746,7 +746,7 @@ def album_for_id(releaseid: str) -> Optional[beets.autotag.hooks.AlbumInfo]:
# resolve linked release relations
actual_res = None
- ... |
Parsl__parsl-618 | Error building docs with new env
```
Running Sphinx v1.8.1
loading pickled environment... failed: build environment version not current
Theme error:
sphinx_rtd_theme is no longer a hard dependency since version 1.4.0. Please install it manually.(pip install sphinx_rtd_theme)
```
| [
{
"content": "from setuptools import setup, find_packages\n\nwith open('parsl/version.py') as f:\n exec(f.read())\n\nwith open('requirements.txt') as f:\n install_requires = f.readlines()\n\nsetup(\n name='parsl',\n version=VERSION,\n description='Simple data dependent workflows in Python',\n ... | [
{
"content": "from setuptools import setup, find_packages\n\nwith open('parsl/version.py') as f:\n exec(f.read())\n\nwith open('requirements.txt') as f:\n install_requires = f.readlines()\n\nsetup(\n name='parsl',\n version=VERSION,\n description='Simple data dependent workflows in Python',\n ... | diff --git a/setup.py b/setup.py
index 89d03a4397..3dd46d4bb5 100755
--- a/setup.py
+++ b/setup.py
@@ -26,7 +26,7 @@
'aws' : ['boto3'],
'jetstream' : ['python-novaclient'],
'extreme_scale' : ['mpi4py'],
- 'docs' : ['nbsphinx'],
+ 'docs' : ['nbsphinx', 'sphinx_rtd_theme'],
... |
dotkom__onlineweb4-1514 | Show price on event before attending
| [
{
"content": "# -*- coding: utf-8 -*-\n\nimport uuid\n\nfrom django.conf import settings\nfrom django.contrib.contenttypes.fields import GenericForeignKey\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db import models\nfrom django.utils import timezone\nfrom django.utils.translation i... | [
{
"content": "# -*- coding: utf-8 -*-\n\nimport uuid\n\nfrom django.conf import settings\nfrom django.contrib.contenttypes.fields import GenericForeignKey\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db import models\nfrom django.utils import timezone\nfrom django.utils.translation i... | diff --git a/apps/payment/models.py b/apps/payment/models.py
index 7dd45f073..99406c7fa 100644
--- a/apps/payment/models.py
+++ b/apps/payment/models.py
@@ -136,6 +136,10 @@ def check_refund(self, payment_relation):
def prices(self):
return self.paymentprice_set.all()
+ def price(self):
+ # TO... |
kubeflow__pipelines-7364 | [sample] Error running xgboost_training_cm.py
### Environment
* How did you deploy Kubeflow Pipelines (KFP)? GCP marketplace
<!-- For more information, see an overview of KFP installation options: https://www.kubeflow.org/docs/pipelines/installation/overview/. -->
* KFP version: 1.7.1
<!-- Specify the versio... | [
{
"content": "# Copyright 2018 The Kubeflow Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b... | [
{
"content": "# Copyright 2018 The Kubeflow Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b... | diff --git a/components/gcp/container/component_sdk/python/kfp_component/google/common/_utils.py b/components/gcp/container/component_sdk/python/kfp_component/google/common/_utils.py
index 239d525f576..9491c838303 100644
--- a/components/gcp/container/component_sdk/python/kfp_component/google/common/_utils.py
+++ b/com... |
open-telemetry__opentelemetry-python-167 | Host docs, build on release
Decide where to host generated docs, configure CI to generate (and possibly upload) new docs on each release.
See #6 for CI bootstrapping.
| [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup --------------------------------------------------------------... | [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup --------------------------------------------------------------... | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 00000000000..423396ea8d7
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,23 @@
+name: Docs
+
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ docs:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions... |
huggingface__trl-474 | SFTTrainer: passing a PeftModel as a model argument without passing the config breaks
[https://github.com/lvwerra/trl/blob/main/trl/trainer/sft_trainer.py#L127C36-L127C47](https://github.com/lvwerra/trl/blob/main/trl/trainer/sft_trainer.py#L127C36-L127C47) Requires that you pass a PEFT config even though you've already... | [
{
"content": "# Copyright 2023 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | [
{
"content": "# Copyright 2023 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | diff --git a/trl/trainer/sft_trainer.py b/trl/trainer/sft_trainer.py
index 91374f7f4f..9e90912be3 100644
--- a/trl/trainer/sft_trainer.py
+++ b/trl/trainer/sft_trainer.py
@@ -144,7 +144,7 @@ def __init__(
if callbacks is None:
callbacks = [PeftSavingCallback]
- elif not isinstance... |
mkdocs__mkdocs-1656 | url filter gives the wrong path to local anchor links
When passed "#internal-anchor" on a page other than the top-level index, the `url` filter returns a relative path to the top-level index.
Like, if I have a page `about.md` and the page.url is `about/`; if I pass "#internal-anchor" to the `url` filter, I get `../#... | [
{
"content": "# coding: utf-8\n\n\"\"\"\nStandalone file utils.\n\nNothing in this module should have an knowledge of config or the layout\nand structure of the site and pages in the site.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport os\nimport pkg_resources\nimport shutil\nimpor... | [
{
"content": "# coding: utf-8\n\n\"\"\"\nStandalone file utils.\n\nNothing in this module should have an knowledge of config or the layout\nand structure of the site and pages in the site.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport os\nimport pkg_resources\nimport shutil\nimpor... | diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md
index 211ffd761a..207a9263ed 100644
--- a/docs/about/release-notes.md
+++ b/docs/about/release-notes.md
@@ -54,6 +54,10 @@ your global navigation uses more than one level, things will likely be broken.
[Bootswatch 4.1]: https://getbootstrap.com/doc... |
saleor__saleor-3153 | No way to upload or remove category background
At this moment API has no mutation that would allow category background image management.
| [
{
"content": "import graphene\nfrom django.template.defaultfilters import slugify\nfrom graphene.types import InputObjectType\nfrom graphql_jwt.decorators import permission_required\n\nfrom ....product import models\nfrom ....product.utils.attributes import get_name_from_attributes\nfrom ...core.mutations impor... | [
{
"content": "import graphene\nfrom django.template.defaultfilters import slugify\nfrom graphene.types import InputObjectType\nfrom graphql_jwt.decorators import permission_required\n\nfrom ....product import models\nfrom ....product.utils.attributes import get_name_from_attributes\nfrom ...core.mutations impor... | diff --git a/saleor/graphql/product/mutations/products.py b/saleor/graphql/product/mutations/products.py
index 2d2557e394b..b8fc820a9dd 100644
--- a/saleor/graphql/product/mutations/products.py
+++ b/saleor/graphql/product/mutations/products.py
@@ -24,6 +24,7 @@ class CategoryInput(graphene.InputObjectType):
c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.