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
⌀
getsentry__sentry-4564
BrowserExtensionsFilter: _gCrWeb autofill error in iOS Chrome not ignored This seems to be a relatively well-known issue on Chrome for iOS. It seems this could be ignored safely by the filter as well. Source: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-discuss/7VU0_VvC7mE
[ { "content": "from __future__ import absolute_import\n\nfrom .base import Filter\n\nimport re\n\nEXTENSION_EXC_VALUES = re.compile('|'.join((re.escape(x) for x in (\n # Random plugins/extensions\n 'top.GLOBALS',\n # See: http://blog.errorception.com/2012/03/tale-of-unfindable-js-error. html\n 'origi...
[ { "content": "from __future__ import absolute_import\n\nfrom .base import Filter\n\nimport re\n\nEXTENSION_EXC_VALUES = re.compile('|'.join((re.escape(x) for x in (\n # Random plugins/extensions\n 'top.GLOBALS',\n # See: http://blog.errorception.com/2012/03/tale-of-unfindable-js-error. html\n 'origi...
diff --git a/src/sentry/filters/browser_extensions.py b/src/sentry/filters/browser_extensions.py index 75253fe109fc01..80e63ad55dba5d 100644 --- a/src/sentry/filters/browser_extensions.py +++ b/src/sentry/filters/browser_extensions.py @@ -24,6 +24,8 @@ # See http://stackoverflow.com/questions/4113268 'bmi_Saf...
common-workflow-language__cwltool-1592
Bizarre javascript error when running CWL with no javascript I am trying to run the cat-tool-shortcut conformance test that has been packed using `cwlpack --json --add-ids`: ```json { "baseCommand": [ "cat" ], "class": "CommandLineTool", "cwlVersion": "v1.2", "id": "cat-tool-shortcut.cwl", "i...
[ { "content": "\"\"\"Loads a CWL document.\"\"\"\n\nimport copy\nimport hashlib\nimport logging\nimport os\nimport re\nimport urllib\nimport uuid\nfrom typing import (\n Any,\n Dict,\n List,\n MutableMapping,\n MutableSequence,\n Optional,\n Tuple,\n Union,\n cast,\n)\n\nfrom ruamel.ya...
[ { "content": "\"\"\"Loads a CWL document.\"\"\"\n\nimport copy\nimport hashlib\nimport logging\nimport os\nimport re\nimport urllib\nimport uuid\nfrom typing import (\n Any,\n Dict,\n List,\n MutableMapping,\n MutableSequence,\n Optional,\n Tuple,\n Union,\n cast,\n)\n\nfrom ruamel.ya...
diff --git a/cwltool/load_tool.py b/cwltool/load_tool.py index 06b312d67..7f4512c67 100644 --- a/cwltool/load_tool.py +++ b/cwltool/load_tool.py @@ -207,7 +207,7 @@ def _convert_stdstreams_to_files( else: workflowobj["stdin"] = ( "$(inputs.%s.pa...
lutris__lutris-3295
Lutris will not launch **Describe the bug** If I try to launch Lutris I get following output: ~$ lutris 2020-11-14 19:10:46,776: MAME XML generation launched in the background, not returning anything this time 2020-11-14 19:10:46,776: Getting full game list from MAME... 2020-11-14 19:10:46,778: MAME isn't inst...
[ { "content": "\"\"\"DBus backed display management for Mutter\"\"\"\nfrom collections import namedtuple\n\nimport dbus\n\nfrom lutris.util.log import logger\n\nDisplayConfig = namedtuple(\"DisplayConfig\", (\"monitors\", \"name\", \"position\", \"transform\", \"primary\", \"scale\"))\n\n\nclass Output:\n\n \...
[ { "content": "\"\"\"DBus backed display management for Mutter\"\"\"\nfrom collections import namedtuple\n\nimport dbus\n\nfrom lutris.util.log import logger\n\nDisplayConfig = namedtuple(\"DisplayConfig\", (\"monitors\", \"name\", \"position\", \"transform\", \"primary\", \"scale\"))\n\n\nclass Output:\n\n \...
diff --git a/lutris/util/graphics/displayconfig.py b/lutris/util/graphics/displayconfig.py index 21c9716d9e..0c819db4a5 100644 --- a/lutris/util/graphics/displayconfig.py +++ b/lutris/util/graphics/displayconfig.py @@ -113,12 +113,12 @@ def winsys_id(self): @property def width(self): """width in phys...
ckan__ckan-5999
DB INIT error when using usernames with non-alphanumeric chars **CKAN version** Master 713716b0689bf848865f05acd328ded29f041c5a (2.9.something) **Describe the bug** DB usernames with non alphanum chars will terminate in error the command `ckan db init`. **Steps to reproduce** Create a pg user with for in...
[ { "content": "# encoding: utf-8\n\nimport warnings\nimport logging\nimport os\nimport re\nfrom time import sleep\nfrom os.path import splitext\n\nfrom sqlalchemy import MetaData, __version__ as sqav, Table\nfrom sqlalchemy.exc import ProgrammingError\n\nfrom alembic.command import (\n upgrade as alembic_upgr...
[ { "content": "# encoding: utf-8\n\nimport warnings\nimport logging\nimport os\nimport re\nfrom time import sleep\nfrom os.path import splitext\n\nfrom sqlalchemy import MetaData, __version__ as sqav, Table\nfrom sqlalchemy.exc import ProgrammingError\n\nfrom alembic.command import (\n upgrade as alembic_upgr...
diff --git a/ckan/model/__init__.py b/ckan/model/__init__.py index 03f3c13fff9..99817371958 100644 --- a/ckan/model/__init__.py +++ b/ckan/model/__init__.py @@ -266,7 +266,7 @@ def setup_migration_version_control(self): self.reset_alembic_output() alembic_config = AlembicConfig(self._alembic_ini) ...
microsoft__knossos-ksc-465
Zero vectors check is slow The `vec` class used in ksc-generated code contains an `is_zero_` flag which optimizes the case of all-zero vectors. But this adds overhead in cases where all-zero never happens, e.g. GMM objective function is approximately 50% slower when compared to not having the flag (tested with GCC 7). ...
[ { "content": "from collections import namedtuple\nimport importlib.util\nimport os\nimport numpy as np\nimport subprocess\nimport sys\nfrom tempfile import NamedTemporaryFile\n\nfrom ksc.type import Type\n\ndef ensure_list_of_lists(l):\n \"\"\"return input, wrapped in a singleton list if its first element is...
[ { "content": "from collections import namedtuple\nimport importlib.util\nimport os\nimport numpy as np\nimport subprocess\nimport sys\nfrom tempfile import NamedTemporaryFile\n\nfrom ksc.type import Type\n\ndef ensure_list_of_lists(l):\n \"\"\"return input, wrapped in a singleton list if its first element is...
diff --git a/src/python/ksc/utils.py b/src/python/ksc/utils.py index f10b0ea3b..ed87b45bd 100644 --- a/src/python/ksc/utils.py +++ b/src/python/ksc/utils.py @@ -148,7 +148,6 @@ def generate_and_compile_cpp_from_ks(ks_str, name_to_call, arg_types, pybind11_p py::class_<Class>(m, pyclass_name.c_str(), py::module_local...
Flexget__Flexget-2206
Letterboxd plugin does not paginate correctly ### Expected behaviour: When using a letterboxd list as input, lists with more than 100 entries should produce more than 100 entries in flexget. ### Actual behaviour: Letterboxd input is only able to generate <=100 entries. ### Steps to reproduce: - Step 1: Con...
[ { "content": "from __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # noqa pylint: disable=unused-import, redefined-builtin\n\nimport logging\n\nfrom flexget import plugin\nfrom flexget.entry import Entry\nfrom flexget.event import event\nfrom flexget.utils.cached_input imp...
[ { "content": "from __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # noqa pylint: disable=unused-import, redefined-builtin\n\nimport logging\n\nfrom flexget import plugin\nfrom flexget.entry import Entry\nfrom flexget.event import event\nfrom flexget.utils.cached_input imp...
diff --git a/flexget/plugins/input/letterboxd.py b/flexget/plugins/input/letterboxd.py index d13bc5b243..63c33ce791 100644 --- a/flexget/plugins/input/letterboxd.py +++ b/flexget/plugins/input/letterboxd.py @@ -134,7 +134,7 @@ def on_task_input(self, task, config=None): if 'max_results' in config: ...
streamlit__streamlit-2248
Request for tar file for lib in pypi. _(Note, you don't have to fill out every section here. They're just here for guidance. That said, nicely detailed feature requests are more likely to get eng attention sooner)_ ### Problem As of now for streamlit , we have only wheels file in pypi. Can the streamlit team add ...
[ { "content": "import os\nimport platform\nimport setuptools\nimport subprocess\nimport sys\n\nfrom pipenv.project import Project\nfrom pipenv.utils import convert_deps_to_pip\nfrom setuptools.command.install import install\n\nVERSION = \"0.69.2\" # PEP-440\n\nNAME = \"streamlit\"\n\nDESCRIPTION = \"The fastest...
[ { "content": "import os\nimport platform\nimport setuptools\nimport subprocess\nimport sys\n\nfrom setuptools.command.install import install\n\ntry:\n from pipenv.project import Project\n from pipenv.utils import convert_deps_to_pip\nexcept:\n exit_msg = (\n \"pipenv is required to package Strea...
diff --git a/Makefile b/Makefile index 9a264d5ea271..0cd337b527b9 100644 --- a/Makefile +++ b/Makefile @@ -157,17 +157,22 @@ install: develop: cd lib ; python setup.py develop -.PHONY: wheel -# Create a Python wheel file in dist/. -wheel: +.PHONY: distribution +# Create Python distribution files in dist/. +distrib...
scrapy__scrapy-5497
Command parse unhandled error :AttributeError: 'NoneType' object has no attribute 'start_requests' Scrapy version :1.5.0 When i run the command **scrapy parse http://www.baidu.com**, and the url www.baidu.com dosn't have spider matched , then i got the error: > 2018-03-11 16:23:35 [scrapy.utils.log] INFO: Scrapy 1...
[ { "content": "import json\nimport logging\nfrom typing import Dict\n\nfrom itemadapter import is_item, ItemAdapter\nfrom w3lib.url import is_url\n\nfrom scrapy.commands import BaseRunSpiderCommand\nfrom scrapy.http import Request\nfrom scrapy.utils import display\nfrom scrapy.utils.spider import iterate_spider_...
[ { "content": "import json\nimport logging\nfrom typing import Dict\n\nfrom itemadapter import is_item, ItemAdapter\nfrom w3lib.url import is_url\n\nfrom scrapy.commands import BaseRunSpiderCommand\nfrom scrapy.http import Request\nfrom scrapy.utils import display\nfrom scrapy.utils.spider import iterate_spider_...
diff --git a/scrapy/commands/parse.py b/scrapy/commands/parse.py index a3f6b96f420..99fc8f955ba 100644 --- a/scrapy/commands/parse.py +++ b/scrapy/commands/parse.py @@ -146,7 +146,8 @@ def set_spidercls(self, url, opts): def _start_requests(spider): yield self.prepare_request(spider, Request(url...
cupy__cupy-4289
Enhancement: enable CUB backend for ReductionKernel Currently the CUB reduction is disabled for `ReductionKernel` (by the last `False` argument): https://github.com/cupy/cupy/blob/c1bf1aab6eb79a1cfcd5bb374460082d8eb2f3ca/cupy/core/_reduction.pyx#L724-L727 But we should revisit this at some point.
[ { "content": "import string\n\nimport numpy\n\nfrom cupy.core._fusion_variable import _TraceVariable\nfrom cupy.core._fusion_variable import _TraceArray\nfrom cupy.core._fusion_variable import _VariableSet\nfrom cupy.core import _fusion_thread_local\nfrom cupy.core import _fusion_emit_code\nfrom cupy.core impor...
[ { "content": "import string\n\nimport numpy\n\nfrom cupy.core._fusion_variable import _TraceVariable\nfrom cupy.core._fusion_variable import _TraceArray\nfrom cupy.core._fusion_variable import _VariableSet\nfrom cupy.core import _fusion_thread_local\nfrom cupy.core import _fusion_emit_code\nfrom cupy.core impor...
diff --git a/cupy/core/_cub_reduction.pxd b/cupy/core/_cub_reduction.pxd index 9145ef044fb..c6a41b8c0de 100644 --- a/cupy/core/_cub_reduction.pxd +++ b/cupy/core/_cub_reduction.pxd @@ -1,10 +1,12 @@ from cupy.core._carray cimport shape_t +from cupy.core._kernel cimport _TypeMap from cupy.core.core cimport ndarray ...
lightly-ai__lightly-408
MoCo tutorial accuracy fails with pl # MoCo tutorial accuracy fails with pl Pytorch-lightning expects probabilities for the accuracy calculation, see https://github.com/PyTorchLightning/pytorch-lightning/blob/cf5dc04db4a84e31d8c360c350b3896b67b38aeb/pytorch_lightning/metrics/classification/helpers.py#L55 Our M...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n\n.. _lightly-moco-tutorial-2:\n\nTutorial 2: Train MoCo on CIFAR-10\n==============================================\n\nIn this tutorial, we will train a model based on the MoCo Paper\n`Momentum Contrast for Unsupervised Visual Representation Learning <https://arxi...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n\n.. _lightly-moco-tutorial-2:\n\nTutorial 2: Train MoCo on CIFAR-10\n==============================================\n\nIn this tutorial, we will train a model based on the MoCo Paper\n`Momentum Contrast for Unsupervised Visual Representation Learning <https://arxi...
diff --git a/docs/source/tutorials_source/package/tutorial_moco_memory_bank.py b/docs/source/tutorials_source/package/tutorial_moco_memory_bank.py index 34f718ed5..9c0a3f032 100644 --- a/docs/source/tutorials_source/package/tutorial_moco_memory_bank.py +++ b/docs/source/tutorials_source/package/tutorial_moco_memory_ban...
facebookresearch__hydra-1661
Double printed config Hey everybody, I have the problem that each log message is printed out twice. Once with the module name and once with HYDRA (see example output): ``` [2021-06-08 08:14:54,738][HYDRA] config initialized [2021-06-08 08:14:54,738][soundmap.util.config][INFO] - config initialized [2021-06-08 ...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nfrom dataclasses import dataclass, field\nfrom typing import Any, Dict, List, Optional\n\nfrom omegaconf import MISSING\n\nfrom hydra.core.config_store import ConfigStore\n\n\n@dataclass\nclass HelpConf:\n app_name: str = M...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nfrom dataclasses import dataclass, field\nfrom typing import Any, Dict, List, Optional\n\nfrom omegaconf import MISSING\n\nfrom hydra.core.config_store import ConfigStore\n\n\n@dataclass\nclass HelpConf:\n app_name: str = M...
diff --git a/hydra/conf/__init__.py b/hydra/conf/__init__.py index c3eaaac462b..14f1559a970 100644 --- a/hydra/conf/__init__.py +++ b/hydra/conf/__init__.py @@ -125,9 +125,9 @@ class HydraConf: # Multi-run output configuration sweep: SweepDir = SweepDir() # Logging configuration for Hydra - hydra_logg...
chainer__chainer-7448
CUDNN_STATUS_BAD_PARAM raised when dilate=0 in L.Convolution2D The sample code I tried: ``` import numpy as np import chainer import chainer.links as L # cpu link = L.Convolution2D(in_channels=1, out_channels=64, ksize=3, stride=(1, 1), pad=(0, 0), nobias=False, dilate=(0, 0), groups=1) data = np.random.rando...
[ { "content": "import numpy\n\nimport chainer\nfrom chainer import backend\nfrom chainer.backends import cuda\nfrom chainer.backends import intel64\nfrom chainer import configuration\nfrom chainer import function_node\nimport chainer.functions\nfrom chainer.utils import argument\nfrom chainer.utils import conv\n...
[ { "content": "import numpy\n\nimport chainer\nfrom chainer import backend\nfrom chainer.backends import cuda\nfrom chainer.backends import intel64\nfrom chainer import configuration\nfrom chainer import function_node\nimport chainer.functions\nfrom chainer.utils import argument\nfrom chainer.utils import conv\n...
diff --git a/chainer/functions/connection/convolution_2d.py b/chainer/functions/connection/convolution_2d.py index 4570153f4336..f7a4778191e6 100644 --- a/chainer/functions/connection/convolution_2d.py +++ b/chainer/functions/connection/convolution_2d.py @@ -53,6 +53,10 @@ def __init__(self, stride=1, pad=0, cover_all=...
cloud-custodian__cloud-custodian-1212
ASG suspend not working for ASG with 0 instances Not sure if this is a feature but **suspend** action on ASG does not suspend processes if there is no running instance. ``` (custodian)~/dev/git-repos/CloudCustodian/policies master $ custodian run -c test-asg-suspend-noEC2.yml -s ~/tmp/logs-custodian/ -v --cache-perio...
[ { "content": "# Copyright 2016 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 required b...
[ { "content": "# Copyright 2016 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 required b...
diff --git a/c7n/resources/asg.py b/c7n/resources/asg.py index 0cd5b0b0ca4..9723b07f7fb 100644 --- a/c7n/resources/asg.py +++ b/c7n/resources/asg.py @@ -1149,10 +1149,6 @@ class Suspend(Action): ASG_PROCESSES = set(ASG_PROCESSES) def process(self, asgs): - original_count = len(asgs) - asgs = [...
paperless-ngx__paperless-ngx-5320
Configuration: User-Arguments are mandatory ### Description See the following Screenshot. ![image](https://github.com/paperless-ngx/paperless-ngx/assets/88422038/b2bc5f45-b45d-43c5-99f7-076ae4c6764d) I don't think, user args should be mandatory, since the documentation says "additionally specify arguments". ...
[ { "content": "import logging\n\nfrom django.contrib.auth.models import Group\nfrom django.contrib.auth.models import Permission\nfrom django.contrib.auth.models import User\nfrom rest_framework import serializers\n\nfrom paperless.models import ApplicationConfiguration\n\nlogger = logging.getLogger(\"paperless....
[ { "content": "import logging\n\nfrom django.contrib.auth.models import Group\nfrom django.contrib.auth.models import Permission\nfrom django.contrib.auth.models import User\nfrom rest_framework import serializers\n\nfrom paperless.models import ApplicationConfiguration\n\nlogger = logging.getLogger(\"paperless....
diff --git a/src/documents/tests/test_api_app_config.py b/src/documents/tests/test_api_app_config.py new file mode 100644 index 00000000000..ed3a4b12f7e --- /dev/null +++ b/src/documents/tests/test_api_app_config.py @@ -0,0 +1,100 @@ +import json + +from django.contrib.auth.models import User +from rest_framework impor...
Gallopsled__pwntools-1735
opcode LIST_EXTEND not allowed Python 3.9.0 brings new opcode [`LIST_EXTEND`](https://docs.python.org/3/library/dis.html#opcode-LIST_EXTEND), which leads to an error during `pwn` import: ``` $ cat ~/.pwn.conf [context] terminal = ['alacritty', '-e', 'sh', '-c'] $ ipython Python 3.9.0 (default, Oct 7 2020, 23:0...
[ { "content": "from __future__ import division\n\n_const_codes = [\n 'POP_TOP','ROT_TWO','ROT_THREE','ROT_FOUR','DUP_TOP',\n 'BUILD_LIST','BUILD_MAP','BUILD_TUPLE','BUILD_SET',\n 'LOAD_CONST','RETURN_VALUE','STORE_SUBSCR', 'STORE_MAP'\n ]\n\n_expr_codes = _const_codes + [\n 'UNARY_POSITIVE','UNARY...
[ { "content": "from __future__ import division\n\n_const_codes = [\n 'POP_TOP','ROT_TWO','ROT_THREE','ROT_FOUR','DUP_TOP',\n 'BUILD_LIST','BUILD_MAP','BUILD_TUPLE','BUILD_SET',\n 'BUILD_CONST_KEY_MAP', 'BUILD_STRING',\n 'LOAD_CONST','RETURN_VALUE','STORE_SUBSCR', 'STORE_MAP',\n 'LIST_TO_TUPLE', 'L...
diff --git a/CHANGELOG.md b/CHANGELOG.md index a44e15392..5281d12a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,9 +60,11 @@ The table below shows which release corresponds to each branch, and what date th - [#1261][1261] Misc `run_in_new_terminal` improvements (notably gdb terminated by default) - [#1695][1...
cookiecutter__cookiecutter-django-2503
Improve mail service + cloud provider combinations ## Description See #2435, if a user selects no cloud provider & Amazon SES to send emails, the project will result in a broken setup: the Anymail backend for SES requires the AWS credentials to be present in the environment, but that won't be the case. ## Possibl...
[ { "content": "\"\"\"\nNOTE:\n the below code is to be maintained Python 2.x-compatible\n as the whole Cookiecutter Django project initialization\n can potentially be run in Python 2.x environment.\n\nTODO: ? restrict Cookiecutter Django project initialization to Python 3.x environments only\n\"\"\"\nfr...
[ { "content": "\"\"\"\nNOTE:\n the below code is to be maintained Python 2.x-compatible\n as the whole Cookiecutter Django project initialization\n can potentially be run in Python 2.x environment.\n\nTODO: ? restrict Cookiecutter Django project initialization to Python 3.x environments only\n\"\"\"\nfr...
diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index 87ae90b1db..8abeda9b94 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -73,15 +73,15 @@ cloud_provider: mail_service: Select an email service that Django-Anymail provides - ...
PennyLaneAI__pennylane-4009
`Wires(0)` and `Wires(tensor(0))` are not treated the same Submitting on behalf of @kshyatt-aws `DoubleExcitation` and `SingleExcitation` breaks when passing an `pennylane.numpy.ndarray`. The code works as expected when removing the `np.array` wrap of `excitations`. ```python import pennylane as qml import pen...
[ { "content": "# Copyright 2018-2021 Xanadu Quantum Technologies 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\n# Unle...
[ { "content": "# Copyright 2018-2021 Xanadu Quantum Technologies 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\n# Unle...
diff --git a/doc/introduction/circuits.rst b/doc/introduction/circuits.rst index c8809ff2fc3..6e97380e77c 100644 --- a/doc/introduction/circuits.rst +++ b/doc/introduction/circuits.rst @@ -147,6 +147,12 @@ Allowed wire labels can be of any type that is hashable, which allows two wires The iterable of labels passed...
carpentries__amy-2513
Test-amy2: update login through github It's still set up for test-amy.
[ { "content": "\"\"\"\nDjango settings for AMY project.\n\"\"\"\n\nfrom pathlib import Path\nfrom typing import cast\n\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.utils.translation import gettext_lazy as _\nimport environ\n\nROOT_DIR = Path(__file__).parent.parent # amy/\nAPPS_DIR = RO...
[ { "content": "\"\"\"\nDjango settings for AMY project.\n\"\"\"\n\nfrom pathlib import Path\nfrom typing import cast\n\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.utils.translation import gettext_lazy as _\nimport environ\n\nROOT_DIR = Path(__file__).parent.parent # amy/\nAPPS_DIR = RO...
diff --git a/config/settings.py b/config/settings.py index 061d6d442..a569bee83 100644 --- a/config/settings.py +++ b/config/settings.py @@ -197,6 +197,7 @@ # Github API token (optional). Setting this token reduces limits and quotes # on Github API. GITHUB_API_TOKEN = env("AMY_GITHUB_API_TOKEN") +SOCIAL_AUTH_REDIREC...
ivy-llc__ivy-26276
t
[ { "content": "# local\nimport ivy\nimport ivy.functional.frontends.paddle as paddle_frontend\nfrom ivy.func_wrapper import (\n with_supported_dtypes,\n with_unsupported_dtypes,\n)\nfrom ivy.functional.frontends.paddle.func_wrapper import _to_ivy_array\n\n\nclass Tensor:\n def __init__(self, array, dtyp...
[ { "content": "# local\nimport ivy\nimport ivy.functional.frontends.paddle as paddle_frontend\nfrom ivy.func_wrapper import (\n with_supported_dtypes,\n with_unsupported_dtypes,\n)\nfrom ivy.functional.frontends.paddle.func_wrapper import _to_ivy_array\n\n\nclass Tensor:\n def __init__(self, array, dtyp...
diff --git a/ivy/functional/frontends/paddle/tensor/tensor.py b/ivy/functional/frontends/paddle/tensor/tensor.py index 3f906531b6073..17e8f595c9930 100644 --- a/ivy/functional/frontends/paddle/tensor/tensor.py +++ b/ivy/functional/frontends/paddle/tensor/tensor.py @@ -796,6 +796,11 @@ def less_equal(self, y, name=None)...
Lightning-AI__pytorch-lightning-1396
RuntimeError: Unimplemented backend XLA on TPU ## 🐛 Bug `RuntimeError: Unimplemented backend XLA` raised for `self.batch_loss_value.append(loss)` line in `trainer/training_loop.py` file when running MNIST on TPU. I think it was introduced in 31b7148. ### To Reproduce Steps to reproduce the behavior: 1. Go ...
[ { "content": "import torch\n\n\nclass TensorRunningMean(object):\n \"\"\"\n Tracks a running mean without graph references.\n Round robbin for the mean\n\n Examples:\n >>> accum = TensorRunningMean(5)\n >>> accum.last(), accum.mean()\n (None, None)\n >>> accum.append(torc...
[ { "content": "import torch\n\n\nclass TensorRunningMean(object):\n \"\"\"\n Tracks a running mean without graph references.\n Round robbin for the mean\n\n Examples:\n >>> accum = TensorRunningMean(5)\n >>> accum.last(), accum.mean()\n (None, None)\n >>> accum.append(torc...
diff --git a/CHANGELOG.md b/CHANGELOG.md index e7a5bbf4fc491..0ae8550fdf36a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Added support for `IterableDataset` when `val_check_interval=1.0` (default), this will trigger val...
netbox-community__netbox-10200
#10031 precludes the use of Content-Type: multipart/form-data ### NetBox version v3.3.1 ### Python version 3.8 ### Steps to Reproduce I recently deployed Netbox v3.3.1 to my dev environment, where I have scripts to rebuild the environment from scratch. One of the scripts `POST` images to the `/extras/image-att...
[ { "content": "import hashlib\nimport importlib\nimport logging\nimport os\nimport platform\nimport re\nimport socket\nimport sys\nimport warnings\nfrom urllib.parse import urlsplit\n\nimport sentry_sdk\nfrom django.contrib.messages import constants as messages\nfrom django.core.exceptions import ImproperlyConfi...
[ { "content": "import hashlib\nimport importlib\nimport logging\nimport os\nimport platform\nimport re\nimport socket\nimport sys\nimport warnings\nfrom urllib.parse import urlsplit\n\nimport sentry_sdk\nfrom django.contrib.messages import constants as messages\nfrom django.core.exceptions import ImproperlyConfi...
diff --git a/docs/release-notes/version-3.3.md b/docs/release-notes/version-3.3.md index 42d043e8fea..b5555af19de 100644 --- a/docs/release-notes/version-3.3.md +++ b/docs/release-notes/version-3.3.md @@ -7,6 +7,7 @@ * [#10155](https://github.com/netbox-community/netbox/issues/10155) - Fix rear port display when editi...
iterative__dvc-5571
state: incompatible across different python versions ### Steps to reproduce ```bash python3.9 -m dvc diff -v python3.6 -m dvc diff -v ``` #### Output ```console $ python3.9 -m dvc diff -v 2021-03-08 16:09:20,120 DEBUG: Check for update is disabled. 2021-03-08 16:09:20,202 DEBUG: state save (24563398, 161...
[ { "content": "\"\"\"Manages state database used for checksum caching.\"\"\"\n\nimport logging\nimport os\nimport re\nfrom abc import ABC, abstractmethod\nfrom urllib.parse import urlencode, urlunparse\n\nfrom dvc.exceptions import DvcException\nfrom dvc.fs.local import LocalFileSystem\nfrom dvc.hash_info import...
[ { "content": "\"\"\"Manages state database used for checksum caching.\"\"\"\n\nimport logging\nimport os\nimport re\nfrom abc import ABC, abstractmethod\nfrom urllib.parse import urlencode, urlunparse\n\nfrom dvc.exceptions import DvcException\nfrom dvc.fs.local import LocalFileSystem\nfrom dvc.hash_info import...
diff --git a/dvc/state.py b/dvc/state.py index 3d7b4a3076..219c4ca7da 100644 --- a/dvc/state.py +++ b/dvc/state.py @@ -76,7 +76,10 @@ def __init__(self, root_dir=None, tmp_dir=None): if not tmp_dir: return - config = {"eviction_policy": "least-recently-used"} + config = { + ...
LMFDB__lmfdb-5417
Knowl category links not working If you go to https://www.lmfdb.org/knowledge/ and click on a category link (e.g. `artin(23)`) nothing happens. The href in this case is ``` <a href="#" onclick="$('#catinp').val('artin'); $('#knowl-search').submit(); return false;">artin(23) </a> ``` Tested on chrome and firefox.
[ { "content": "# -*- coding: utf-8 -*-\n# This Blueprint is about adding a Knowledge Base to the LMFDB website.\n# referencing content, dynamically inserting information into the website, …\n#\n# This is more than just a web of entries in a wiki, because content is \"transcluded\".\n# Transclusion is an actual c...
[ { "content": "# -*- coding: utf-8 -*-\n# This Blueprint is about adding a Knowledge Base to the LMFDB website.\n# referencing content, dynamically inserting information into the website, …\n#\n# This is more than just a web of entries in a wiki, because content is \"transcluded\".\n# Transclusion is an actual c...
diff --git a/lmfdb/knowledge/main.py b/lmfdb/knowledge/main.py index 3f260206a9..1a62326037 100644 --- a/lmfdb/knowledge/main.py +++ b/lmfdb/knowledge/main.py @@ -300,17 +300,6 @@ def get_bread(breads=[]): return bc -def searchbox(q="", clear=False): - """returns the searchbox""" - searchbox = u"""\ - ...
Kinto__kinto-386
Activate POST on collections ``` $ curl -H "Content-Type: application/json" \ -X POST -d '{"data": {"test": "some_data"}}' --user testuser:abc123 \ https://kinto.dev.mozaws.net/v1/buckets/test_bucket/collections {"errno":115,"message":"Method not allowed on this endpoint.","code":405,"error":"Metho...
[ { "content": "import colander\nimport jsonschema\nfrom cliquet import resource\nfrom jsonschema import exceptions as jsonschema_exceptions\n\nfrom kinto.views import NameGenerator\n\n\nclass JSONSchemaMapping(colander.SchemaNode):\n def schema_type(self, **kw):\n return colander.Mapping(unknown='prese...
[ { "content": "import colander\nimport jsonschema\nfrom cliquet import resource\nfrom jsonschema import exceptions as jsonschema_exceptions\n\nfrom kinto.views import NameGenerator\n\n\nclass JSONSchemaMapping(colander.SchemaNode):\n def schema_type(self, **kw):\n return colander.Mapping(unknown='prese...
diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 3028ddb50..2f5bd91a8 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -14,3 +14,4 @@ Contributors * Shweta Oak <oakshweta11@gmail.com> * Sofia Utsch <sofia.utsch@gmail.com> * Tarek Ziade <tarek@mozilla.com> +* John Giannelos <jgiannelos@mozilla.com> diff ...
dask__distributed-1331
ValueError / hang on LocalCluster startup I'm loading my conda environment off NAS storage, and when usage is heavy, there can be long delays in loading things, which I believe can exceed the default timeout (five seconds) here: https://github.com/dask/distributed/blob/master/distributed/client.py#L428 As a resul...
[ { "content": "from __future__ import print_function, division, absolute_import\n\nimport atexit\nfrom datetime import timedelta\nfrom functools import partial\nimport json\nimport logging\nimport os\nimport shutil\nimport signal\nfrom sys import exit\nfrom time import sleep\n\nimport click\nfrom distributed imp...
[ { "content": "from __future__ import print_function, division, absolute_import\n\nimport atexit\nfrom datetime import timedelta\nfrom functools import partial\nimport json\nimport logging\nimport os\nimport shutil\nimport signal\nfrom sys import exit\nfrom time import sleep\n\nimport click\nfrom distributed imp...
diff --git a/distributed/cli/dask_worker.py b/distributed/cli/dask_worker.py index ef6dab6bc91..243e5070105 100755 --- a/distributed/cli/dask_worker.py +++ b/distributed/cli/dask_worker.py @@ -211,11 +211,9 @@ def handle_signal(signum, frame): signal.signal(signal.SIGINT, handle_signal) signal.signal(signal.S...
mathesar-foundation__mathesar-2609
Issues with installation process that connects an existing DB - [x] Tester Marius reports (server credentials in Upwork) - [ ] It seems that even if you select existing database, it still tries to start a docker container for the database, creating a conflict? - [x] Tester Mohammad reports an error as well ([detail...
[ { "content": "from sqlalchemy import text\nfrom sqlalchemy.exc import OperationalError\n\nfrom db import engine\nfrom db.types import install\n\n\ndef install_mathesar(\n database_name, username, password, hostname, port, skip_confirm\n):\n \"\"\"Create database and install Mathesar on it.\"\"\"\n ...
[ { "content": "from sqlalchemy import text\nfrom sqlalchemy.exc import OperationalError\n\nfrom db import engine\nfrom db.types import install\n\n\ndef install_mathesar(\n database_name, username, password, hostname, port, skip_confirm\n):\n \"\"\"Create database and install Mathesar on it.\"\"\"\n ...
diff --git a/db/install.py b/db/install.py index 8f6bacb216..8a15429bdd 100644 --- a/db/install.py +++ b/db/install.py @@ -53,7 +53,7 @@ def _create_database(database_name, hostname, username, password, port, skip_con ) with root_db_engine.connect() as conn: conn.execution_options(isolati...
vispy__vispy-1383
Wrong install location for docs From `setup.py`: ``` setup( [...] package_data={ 'vispy': [op.join('io', '_data', '*'), op.join('html', 'static', 'js', '*'), op.join('app', 'tests', 'qt-designer.ui'), op.join('..', 'doc', '*'), ...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\" Vispy setup script.\n\nSteps to do a new release:\n\nPreparations:\n * Test on Windows, Linux, Mac\n * Make release notes\n ...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\" Vispy setup script.\n\nSteps to do a new release:\n\nPreparations:\n * Test on Windows, Linux, Mac\n * Make release notes\n ...
diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000000..db9ca5aba9 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,7 @@ +# Add documentation to the source tarball but not in the installation +include doc/Makefile doc/.nojekyll doc/conf.py +include doc/*.rst +recursive-include doc/ext * +recursive-inclu...
freedomofpress__securedrop-3311
[RFE] Remove the sizegrip from the statusbar of the GUI tool # Feature request ## Description There should not be any sizegrip available in the statusbar of the GUI tool as suggested in https://github.com/freedomofpress/securedrop/pull/3300#discussion_r184066922
[ { "content": "#!/usr/bin/python\nfrom PyQt5 import QtGui, QtWidgets\nfrom PyQt5.QtCore import QThread, pyqtSignal\nimport subprocess\nimport os\nimport pexpect\n\nfrom journalist_gui import updaterUI, strings, resources_rc # noqa\n\n\nLOCK_LOCATION = \"/home/amnesia/Persistent/securedrop/securedrop_update.lock...
[ { "content": "#!/usr/bin/python\nfrom PyQt5 import QtGui, QtWidgets\nfrom PyQt5.QtCore import QThread, pyqtSignal\nimport subprocess\nimport os\nimport pexpect\n\nfrom journalist_gui import updaterUI, strings, resources_rc # noqa\n\n\nLOCK_LOCATION = \"/home/amnesia/Persistent/securedrop/securedrop_update.lock...
diff --git a/journalist_gui/journalist_gui/SecureDropUpdater.py b/journalist_gui/journalist_gui/SecureDropUpdater.py index 279b869e88..875a6934ca 100644 --- a/journalist_gui/journalist_gui/SecureDropUpdater.py +++ b/journalist_gui/journalist_gui/SecureDropUpdater.py @@ -130,6 +130,7 @@ class UpdaterApp(QtWidgets.QMainW...
pytorch__ignite-2196
ConfusionMatrix axis - labels I am looking at the [ConfusionMatrix documentation](https://pytorch.org/ignite/generated/ignite.metrics.confusion_matrix.ConfusionMatrix.html ) and I can't understand what axis corresponds to the _predicted values_ and which one to the _actual values_. In other words, which one of the t...
[ { "content": "import numbers\nfrom typing import Callable, Optional, Sequence, Tuple, Union\n\nimport torch\n\nfrom ignite.exceptions import NotComputableError\nfrom ignite.metrics.metric import Metric, reinit__is_reduced, sync_all_reduce\nfrom ignite.metrics.metrics_lambda import MetricsLambda\n\n__all__ = [\"...
[ { "content": "import numbers\nfrom typing import Callable, Optional, Sequence, Tuple, Union\n\nimport torch\n\nfrom ignite.exceptions import NotComputableError\nfrom ignite.metrics.metric import Metric, reinit__is_reduced, sync_all_reduce\nfrom ignite.metrics.metrics_lambda import MetricsLambda\n\n__all__ = [\"...
diff --git a/ignite/metrics/confusion_matrix.py b/ignite/metrics/confusion_matrix.py index f90069105698..a500aa15fe44 100644 --- a/ignite/metrics/confusion_matrix.py +++ b/ignite/metrics/confusion_matrix.py @@ -61,6 +61,11 @@ def binary_one_hot_output_transform(output): model, metrics=metrics, output_t...
oobabooga__text-generation-webui-2383
extension/openai chat/completion endpoint IndexError: string index out of range ### Describe the bug openai extension /completion endpoint works correctly whilst /chat/completion returns IndexError: string index out of range in the logs and obviously no result in the API. The issue seems at line 318 when checking i...
[ { "content": "import base64\nimport json\nimport os\nimport time\nimport requests\nimport yaml\nfrom http.server import BaseHTTPRequestHandler, ThreadingHTTPServer\nfrom threading import Thread\n\nimport numpy as np\n\nfrom modules import shared\nfrom modules.text_generation import encode, generate_reply\n\npar...
[ { "content": "import base64\nimport json\nimport os\nimport time\nimport requests\nimport yaml\nfrom http.server import BaseHTTPRequestHandler, ThreadingHTTPServer\nfrom threading import Thread\n\nimport numpy as np\n\nfrom modules import shared\nfrom modules.text_generation import encode, generate_reply\n\npar...
diff --git a/extensions/openai/script.py b/extensions/openai/script.py index d41592a35a..25a6981466 100644 --- a/extensions/openai/script.py +++ b/extensions/openai/script.py @@ -315,7 +315,7 @@ def do_POST(self): # can't really truncate the system messages system_msg = '\n'.join(sys...
jazzband__django-debug-toolbar-1722
Postgresql Raw Query Tuple Parameter 500 error on explain statement I've got a .raw query with the following filter on a JSONB column named `data`: `WHERE data ->> 'key' IN %s` The `%s` is populated by taking the list and passing it in as follows: `ModelName.objects.raw(query_with_params, [tuple(list_of_values)])`...
[ { "content": "import contextvars\nimport datetime\nimport json\nfrom time import time\n\nfrom django.utils.encoding import force_str\n\nfrom debug_toolbar import settings as dt_settings\nfrom debug_toolbar.utils import get_stack_trace, get_template_info\n\ntry:\n from psycopg2._json import Json as PostgresJs...
[ { "content": "import contextvars\nimport datetime\nimport json\nfrom time import time\n\nfrom django.utils.encoding import force_str\n\nfrom debug_toolbar import settings as dt_settings\nfrom debug_toolbar.utils import get_stack_trace, get_template_info\n\ntry:\n from psycopg2._json import Json as PostgresJs...
diff --git a/debug_toolbar/panels/sql/tracking.py b/debug_toolbar/panels/sql/tracking.py index b166e592d..9fda4eba5 100644 --- a/debug_toolbar/panels/sql/tracking.py +++ b/debug_toolbar/panels/sql/tracking.py @@ -120,6 +120,8 @@ def _quote_params(self, params): return params if isinstance(params, ...
Lightning-AI__pytorch-lightning-530
Training with DDP could fail at startup due to FileExistsError In multi-GPU mode with DDP, starting the training can fail with the following error: ``` Traceback (most recent call last): File "train.py", line 109, in <module> main(hyperparams) File "train.py", line 62, in main trainer.fit(model) ...
[ { "content": "import os\nimport shutil\nimport logging\nimport warnings\nimport numpy as np\n\nfrom pytorch_lightning.pt_overrides.override_data_parallel import LightningDistributedDataParallel\n\n\nclass Callback(object):\n \"\"\"Abstract base class used to build new callbacks.\n # Properties\n pa...
[ { "content": "import os\nimport shutil\nimport logging\nimport warnings\nimport numpy as np\n\nfrom pytorch_lightning.pt_overrides.override_data_parallel import LightningDistributedDataParallel\n\n\nclass Callback(object):\n \"\"\"Abstract base class used to build new callbacks.\n # Properties\n pa...
diff --git a/pytorch_lightning/callbacks/pt_callbacks.py b/pytorch_lightning/callbacks/pt_callbacks.py index a08f359aed111..71d1bd8fad8e4 100644 --- a/pytorch_lightning/callbacks/pt_callbacks.py +++ b/pytorch_lightning/callbacks/pt_callbacks.py @@ -198,8 +198,7 @@ def __init__(self, filepath, monitor='val_loss', verbos...
aws-cloudformation__cfn-lint-402
${aws:username} now fails *cfn-lint version: 0.8 E1029 Found an embedded parameter outside of an "Fn::Sub" at Resources/ForceMFAPolicy/Properties/PolicyDocument/Statement/3/Resource/0/arn:aws:iam::*:mfa/${aws:username} It looks like the IAM variables are now being detected as embedded parameters in cfn-lint. ...
[ { "content": "\"\"\"\n Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w...
[ { "content": "\"\"\"\n Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w...
diff --git a/src/cfnlint/rules/functions/SubNeeded.py b/src/cfnlint/rules/functions/SubNeeded.py index 7b8f4bc3be..a6310ee502 100644 --- a/src/cfnlint/rules/functions/SubNeeded.py +++ b/src/cfnlint/rules/functions/SubNeeded.py @@ -27,7 +27,7 @@ class SubNeeded(CloudFormationLintRule): tags = ['functions', 'sub'] ...
vyperlang__vyper-3197
`TypeError` when iterating on an empty literal array ### Version Information * vyper Version (output of `vyper --version`): 0.3.8+commit.6020b8bb * OS: OSX * Python Version (output of `python --version`): 3.8.0 ### What's your issue about? Although it is completely useless, trying to iterate over an empty li...
[ { "content": "from typing import Optional\n\nfrom vyper import ast as vy_ast\nfrom vyper.ast.validation import validate_call_args\nfrom vyper.exceptions import (\n ExceptionList,\n FunctionDeclarationException,\n ImmutableViolation,\n InvalidLiteral,\n InvalidOperation,\n InvalidType,\n Ite...
[ { "content": "from typing import Optional\n\nfrom vyper import ast as vy_ast\nfrom vyper.ast.validation import validate_call_args\nfrom vyper.exceptions import (\n ExceptionList,\n FunctionDeclarationException,\n ImmutableViolation,\n InvalidLiteral,\n InvalidOperation,\n InvalidType,\n Ite...
diff --git a/tests/parser/features/iteration/test_for_in_list.py b/tests/parser/features/iteration/test_for_in_list.py index 2f574798af..bfd960a787 100644 --- a/tests/parser/features/iteration/test_for_in_list.py +++ b/tests/parser/features/iteration/test_for_in_list.py @@ -658,6 +658,20 @@ def foo(): for i in ran...
conda-forge__conda-smithy-296
Don't run as root Some recipes have been doing things to the system that normal conda users don't necessarily have the permissions to do (e.g. modifying `/var/` or `/etc/`) - if we ran as a non-root user in the docker container, we would be able to protect against these kinds of recipes automatically.
[ { "content": "from __future__ import print_function, unicode_literals\n\nfrom collections import OrderedDict as odict\nfrom contextlib import contextmanager\nimport os\nimport shutil\nimport stat\nimport textwrap\nimport yaml\nimport warnings\n\nimport conda.api\nimport conda.config\n\ntry:\n # Try conda's A...
[ { "content": "from __future__ import print_function, unicode_literals\n\nfrom collections import OrderedDict as odict\nfrom contextlib import contextmanager\nimport os\nimport shutil\nimport stat\nimport textwrap\nimport yaml\nimport warnings\n\nimport conda.api\nimport conda.config\n\ntry:\n # Try conda's A...
diff --git a/conda_smithy/configure_feedstock.py b/conda_smithy/configure_feedstock.py index 39aa86318..46f8e27f7 100755 --- a/conda_smithy/configure_feedstock.py +++ b/conda_smithy/configure_feedstock.py @@ -159,7 +159,7 @@ def render_circle(jinja_env, forge_config, forge_dir): # "recipe/yum_requireme...
boto__botocore-1164
Fix for date parsing in AssumeRoleProvider _is_expired check The current AssumeRoleProvider._is_expired check will pull the expiration date time from cache when checking the expiration. The expiration is stored as a datetime however the method attempts to parse it as a string. The resolution is to use the credentials._...
[ { "content": "# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/\n# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the L...
[ { "content": "# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/\n# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the L...
diff --git a/botocore/credentials.py b/botocore/credentials.py index 1572e7016c..4a1c5efc48 100644 --- a/botocore/credentials.py +++ b/botocore/credentials.py @@ -834,7 +834,7 @@ def _load_creds_from_cache(self): return None def _is_expired(self, credentials): - end_time = parse(credentials['...
python-pillow__Pillow-1152
After upgrading Pillow 2.3.0 to 2.7.0 .eps-files are not recognized anymore After updating to version 2.7.0 Pillow fails to recognize an input .eps-file. After downgrading to 2.3.0 again the file is read like intended. The Error Message: ``` Traceback (most recent call last): File "img_pil.py", line 25, in <module...
[ { "content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# EPS file handling\n#\n# History:\n# 1995-09-01 fl Created (0.1)\n# 1996-05-18 fl Don't choke on \"atend\" fields, Ghostscript interface (0.2)\n# 1996-08-22 fl Don't choke on floating point BoundingBox values\n# 1996-08-23 fl Handle files from ...
[ { "content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# EPS file handling\n#\n# History:\n# 1995-09-01 fl Created (0.1)\n# 1996-05-18 fl Don't choke on \"atend\" fields, Ghostscript interface (0.2)\n# 1996-08-22 fl Don't choke on floating point BoundingBox values\n# 1996-08-23 fl Handle files from ...
diff --git a/PIL/EpsImagePlugin.py b/PIL/EpsImagePlugin.py index d077ca1ab82..83024b63f15 100644 --- a/PIL/EpsImagePlugin.py +++ b/PIL/EpsImagePlugin.py @@ -275,13 +275,13 @@ def _open(self): s = fp.readline().strip('\r\n') - if s[0] != "%": + if s[:1] != "%": bre...
wagtail__wagtail-940
Dropping Python 3.2 support Python 3.2 is quite old and many projects are dropping support for it (`libsass` and `treebeard` both have already). Should we consider dropping support as well?
[ { "content": "#!/usr/bin/env python\n\nimport sys, os\n\nfrom wagtail.wagtailcore import __version__\n\n\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from distutils.core import setup\n\n\n# Hack to prevent \"TypeError: 'NoneType' object is not callable\" error\n# in multiproc...
[ { "content": "#!/usr/bin/env python\n\nimport sys, os\n\nfrom wagtail.wagtailcore import __version__\n\n\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from distutils.core import setup\n\n\n# Hack to prevent \"TypeError: 'NoneType' object is not callable\" error\n# in multiproc...
diff --git a/README.rst b/README.rst index 7a725c4dc94e..f7ce07a97efe 100644 --- a/README.rst +++ b/README.rst @@ -52,7 +52,7 @@ Available at `wagtail.readthedocs.org <http://wagtail.readthedocs.org/>`_ and al Compatibility ~~~~~~~~~~~~~ -Wagtail supports Django 1.7.0+ on Python 2.7, 3.2, 3.3 and 3.4. +Wagtail supp...
encode__httpx-1120
Should we support bare hostnames in `ALL_PROXY`,`HTTP_PROXY`, `HTTPS_PROXY`? ### Checklist <!-- Please make sure you check all these items before submitting your bug report. --> - [x] The bug is reproducible against the latest release and/or `master`. - [x] There are no similar issues or pull requests to fix it ...
[ { "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/httpx/_utils.py b/httpx/_utils.py index c2dc6a453b..b09aebcfd7 100644 --- a/httpx/_utils.py +++ b/httpx/_utils.py @@ -311,7 +311,8 @@ def get_environment_proxies() -> typing.Dict[str, typing.Optional[str]]: for scheme in ("http", "https", "all"): if proxy_info.get(scheme): - moun...
openai__gym-2879
[Bug Report] Environment Step Check doesn't allow NumPy integer rewards. **Describe the bug** Some environments return the rewards in the form of a _NumPy integer_ (ex. `np.int32`). However, the _passive environment step check_ doesn't allow NumPy integer rewards, as it allows only Python built-in `float` & `int` dat...
[ { "content": "\"\"\"A set of functions for passively checking environment implementations.\"\"\"\nimport inspect\n\nimport numpy as np\n\nfrom gym import error, logger, spaces\n\n\ndef _check_box_observation_space(observation_space: spaces.Box):\n \"\"\"Checks that a :class:`Box` observation space is defined...
[ { "content": "\"\"\"A set of functions for passively checking environment implementations.\"\"\"\nimport inspect\n\nimport numpy as np\n\nfrom gym import error, logger, spaces\n\n\ndef _check_box_observation_space(observation_space: spaces.Box):\n \"\"\"Checks that a :class:`Box` observation space is defined...
diff --git a/gym/utils/passive_env_checker.py b/gym/utils/passive_env_checker.py index d49ea7faf8f..147d360e8d0 100644 --- a/gym/utils/passive_env_checker.py +++ b/gym/utils/passive_env_checker.py @@ -276,7 +276,7 @@ def passive_env_step_check(env, action): logger.warn("Encountered inf value in observations.")...
openai__gym-2601
[Bug Report] FrozenLake RGB rendering returns None FrozenLake `render()` method in mode human always returns `None` and lacks an `rgb_array` render mode. For reference, Blackjack has recently been converted to pygame and implements these features correctly. @younik I believe you converted FrozenLake to pygame?
[ { "content": "from contextlib import closing\nfrom io import StringIO\nfrom os import path\nfrom typing import Optional\nimport pygame\nfrom pygame.constants import SRCALPHA\nimport numpy as np\n\nfrom gym import Env, spaces, utils\nfrom gym.envs.toy_text.utils import categorical_sample\n\nLEFT = 0\nDOWN = 1\nR...
[ { "content": "from contextlib import closing\nfrom io import StringIO\nfrom os import path\nfrom typing import Optional\nimport pygame\nfrom pygame.constants import SRCALPHA\nimport numpy as np\n\nfrom gym import Env, spaces, utils\nfrom gym.envs.toy_text.utils import categorical_sample\n\nLEFT = 0\nDOWN = 1\nR...
diff --git a/gym/envs/toy_text/frozen_lake.py b/gym/envs/toy_text/frozen_lake.py index 90ee6a16231..6c23d759498 100644 --- a/gym/envs/toy_text/frozen_lake.py +++ b/gym/envs/toy_text/frozen_lake.py @@ -230,10 +230,10 @@ def reset( def render(self, mode="human"): desc = self.desc.tolist() - if mode...
Kinto__kinto-1064
If-Match:* behaviour is unclear (and crashes) with existing record On 5.2 it would raise a "400" on existing record. On current master, it will crash in "500" as it's not handled by `kinto.core.resource` anymore, but it's considered a valid header value by deserialization. I think we should set the behavior to ju...
[ { "content": "import re\nimport functools\n\nimport colander\nimport venusian\nimport six\nfrom pyramid import exceptions as pyramid_exceptions\nfrom pyramid.decorator import reify\nfrom pyramid.security import Everyone\nfrom pyramid.httpexceptions import (HTTPNotModified, HTTPPreconditionFailed,\n ...
[ { "content": "import re\nimport functools\n\nimport colander\nimport venusian\nimport six\nfrom pyramid import exceptions as pyramid_exceptions\nfrom pyramid.decorator import reify\nfrom pyramid.security import Everyone\nfrom pyramid.httpexceptions import (HTTPNotModified, HTTPPreconditionFailed,\n ...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 22ebd43aa..db9430332 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,6 +13,7 @@ This document describes changes between each past release. **Bug fixes** - Prevent injections in the PostgreSQL permission backend +- Fix crash on ``If-Match: *`` **Internal chan...
aio-libs__aiohttp-1500
Webscockets client timeout when connecting to Kodi ## Long story short There is an incompatibility causing a timeout in aiohttp when connecting to the Kodi websockets interface. Kodi is working with the `websockets` python library. This is very possibly some poor behavior on Kodi's part. Background: https://githu...
[ { "content": "\"\"\"Http related parsers and protocol.\"\"\"\n\nimport collections\nimport functools\nimport http.server\nimport re\nimport string\nimport sys\nimport zlib\nfrom abc import ABC, abstractmethod\nfrom wsgiref.handlers import format_date_time\n\nfrom multidict import CIMultiDict, istr\n\nimport aio...
[ { "content": "\"\"\"Http related parsers and protocol.\"\"\"\n\nimport collections\nimport functools\nimport http.server\nimport re\nimport string\nimport sys\nimport zlib\nfrom abc import ABC, abstractmethod\nfrom wsgiref.handlers import format_date_time\n\nfrom multidict import CIMultiDict, istr\n\nimport aio...
diff --git a/aiohttp/protocol.py b/aiohttp/protocol.py index 4ff12662ec2..01ae34b4d2f 100644 --- a/aiohttp/protocol.py +++ b/aiohttp/protocol.py @@ -684,7 +684,7 @@ def _add_default_headers(self): # set the connection header connection = None if self.upgrade: - connection = 'upgrad...
networkx__networkx-1908
maximal_matching and self loops `maximal_matching` does allow self-loops ``` py >>> G = nx.Graph([[1,1]]) >>> nx.matching.maximal_matching(G) {(1, 1)} ``` whereas `max_weight_matching` does not ``` py >>> nx.matching.max_weight_matching(G) {} ``` Is this expected behaviour? If not, a simple `u != v` check should fi...
[ { "content": "\"\"\"\n********\nMatching\n********\n\"\"\"\n# Copyright (C) 2004-2016 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\n# Copyright (C) 2011 by\n# Nicholas Mancuso <nick.mancus...
[ { "content": "\"\"\"\n********\nMatching\n********\n\"\"\"\n# Copyright (C) 2004-2016 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\n# Copyright (C) 2011 by\n# Nicholas Mancuso <nick.mancus...
diff --git a/networkx/algorithms/matching.py b/networkx/algorithms/matching.py index afc505e5fbc..6bb064dee95 100644 --- a/networkx/algorithms/matching.py +++ b/networkx/algorithms/matching.py @@ -46,7 +46,7 @@ def maximal_matching(G): for u,v in G.edges(): # If the edge isn't covered, add it to the match...
ansible__ansible-40819
ios_config incorrectly claims success when commands fail ##### ISSUE TYPE <!--- Pick one below and delete the rest: --> - Bug Report ##### COMPONENT NAME <!--- Name of the module/plugin/task/feature --> ios_config ##### ANSIBLE VERSION <!--- Paste verbatim output from "ansible --version" between quotes belo...
[ { "content": "#\n# (c) 2016 Red Hat Inc.\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any l...
[ { "content": "#\n# (c) 2016 Red Hat Inc.\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any l...
diff --git a/lib/ansible/plugins/terminal/ios.py b/lib/ansible/plugins/terminal/ios.py index 61927bda9067dc..dfdb5e5e4fd79c 100644 --- a/lib/ansible/plugins/terminal/ios.py +++ b/lib/ansible/plugins/terminal/ios.py @@ -46,7 +46,8 @@ class TerminalModule(TerminalBase): re.compile(br"Bad mask", re.I), r...
Cloud-CV__EvalAI-1082
A challenge should not be published directly when challenge host creates it. Once the `challenge_host `creates a challenge then it should not be published directly. **The administrator must approve the challenge before it is published.** **Solution:** Add a query parameter `approved_by_admin=True` in `get_all_challe...
[ { "content": "from django.utils import timezone\n\nfrom rest_framework import permissions, status\nfrom rest_framework.decorators import (api_view,\n authentication_classes,\n permission_classes,\n ...
[ { "content": "from django.utils import timezone\n\nfrom rest_framework import permissions, status\nfrom rest_framework.decorators import (api_view,\n authentication_classes,\n permission_classes,\n ...
diff --git a/apps/challenges/views.py b/apps/challenges/views.py index f40e36d3d9..dfc7b71f06 100644 --- a/apps/challenges/views.py +++ b/apps/challenges/views.py @@ -181,7 +181,7 @@ def get_all_challenges(request, challenge_time): response_data = {'error': 'Wrong url pattern!'} return Response(respon...
google__pytype-20
python -m pip install -U . doesn't work. It ought to be possible to install pytype using pip by running ``` python -m pip install -U . ``` but doing so causes an error message.
[ { "content": "#!/usr/bin/env python\n\n# pylint: disable=bad-indentation\n\nfrom distutils.core import setup\n\nimport glob\nimport os\n\n\ndef scan_package_data(path, pattern):\n result = []\n for subdir, _, _ in os.walk(path):\n full_pattern = os.path.join(subdir, pattern)\n if glob.glob(f...
[ { "content": "#!/usr/bin/env python\n\n# pylint: disable=bad-indentation\n\nfrom distutils.core import setup\n\nimport glob\nimport os\n\n\ndef scan_package_data(path, pattern):\n result = []\n for subdir, _, _ in os.walk(path):\n full_pattern = os.path.join(subdir, pattern)\n if glob.glob(f...
diff --git a/setup.py b/setup.py index 142ce559d..2a6065709 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,8 @@ def scan_package_data(path, pattern): ], scripts=['scripts/pytype', 'scripts/pytd'], package_data={'pytype': ['pytd/builtins/*', - 'pytd/stdlib/*', + ...
meltano__meltano-8249
bug: Select doesn't show % characters ### Meltano Version 3.1.0 ### Python Version 3.10 ### Bug scope CLI (options, error messages, logging, etc.) ### Operating System Ubuntu 20.04 (WSL) ### Description I have a tap with properties that have a "%" in the name Example ``` visch@DESKTOP-9BDPA9T:~/git/mel...
[ { "content": "from __future__ import annotations\n\nimport fnmatch\nimport logging\nimport re\nimport typing as t\nfrom collections import OrderedDict\nfrom enum import Enum, auto\nfrom functools import singledispatch\n\nfrom meltano.core.behavior.visitor import visit_with\n\nNode = t.Dict[str, t.Any]\nT = t.Ty...
[ { "content": "from __future__ import annotations\n\nimport fnmatch\nimport logging\nimport re\nimport typing as t\nfrom collections import OrderedDict\nfrom enum import Enum, auto\nfrom functools import singledispatch\n\nfrom meltano.core.behavior.visitor import visit_with\n\nNode = t.Dict[str, t.Any]\nT = t.Ty...
diff --git a/src/meltano/core/plugin/singer/catalog.py b/src/meltano/core/plugin/singer/catalog.py index aff9433fcb..6de043acd4 100644 --- a/src/meltano/core/plugin/singer/catalog.py +++ b/src/meltano/core/plugin/singer/catalog.py @@ -247,7 +247,7 @@ def path_property(path: str) -> str: stream[0].properties.list...
feast-dev__feast-3608
Could not import module 'feast.infra.offline_stores.snowflake' while attempting to load class 'SnowflakeOfflineStoreConfig' ## Expected Behavior feast apply with snowflake as offline store failing ## Current Behavior feast apply fails with exception Could not import module 'feast.infra.offline_stores.snowflake' w...
[ { "content": "# Copyright 2019 The Feast 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 a...
[ { "content": "# Copyright 2019 The Feast 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 a...
diff --git a/sdk/python/requirements/py3.10-ci-requirements.txt b/sdk/python/requirements/py3.10-ci-requirements.txt index 4cb250531f7..a696e973973 100644 --- a/sdk/python/requirements/py3.10-ci-requirements.txt +++ b/sdk/python/requirements/py3.10-ci-requirements.txt @@ -28,6 +28,10 @@ anyio==3.6.2 # watchfiles...
bokeh__bokeh-4754
Typo in categorical example plot title File examples/plotting/file/categorical.py contains a typo in plot name.
[ { "content": "from bokeh.layouts import row\nfrom bokeh.plotting import figure, show, output_file\n\nfactors = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\"]\nx = [50, 40, 65, 10, 25, 37, 80, 60]\n\ndot = figure(title=\"Catgorical Dot Plot\", tools=\"\", toolbar_location=None,\n y_range=fa...
[ { "content": "from bokeh.layouts import row\nfrom bokeh.plotting import figure, show, output_file\n\nfactors = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\"]\nx = [50, 40, 65, 10, 25, 37, 80, 60]\n\ndot = figure(title=\"Categorical Dot Plot\", tools=\"\", toolbar_location=None,\n y_range=f...
diff --git a/examples/plotting/file/categorical.py b/examples/plotting/file/categorical.py index 364d0c06331..5f68efc116f 100644 --- a/examples/plotting/file/categorical.py +++ b/examples/plotting/file/categorical.py @@ -4,7 +4,7 @@ factors = ["a", "b", "c", "d", "e", "f", "g", "h"] x = [50, 40, 65, 10, 25, 37, 80, ...
saulpw__visidata-1629
save_xlsx: null values become the string "None" **Small description** Setting `--null-value` in either direction doesn't help, so I suspect it isn't just that `options.null_value` is set to `None`. I found this during the batch conversion. There's code below. **Expected result** An empty string (or the `opt...
[ { "content": "import itertools\nimport copy\n\nfrom visidata import VisiData, vd, Sheet, Column, Progress, IndexSheet, ColumnAttr, SequenceSheet, AttrDict, AttrColumn, date, datetime\n\n\nvd.option('xlsx_meta_columns', False, 'include columns for cell objects, font colors, and fill colors', replay=True)\n\n@Vis...
[ { "content": "import itertools\nimport copy\n\nfrom visidata import VisiData, vd, Sheet, Column, Progress, IndexSheet, ColumnAttr, SequenceSheet, AttrDict, AttrColumn, date, datetime\n\n\nvd.option('xlsx_meta_columns', False, 'include columns for cell objects, font colors, and fill colors', replay=True)\n\n@Vis...
diff --git a/visidata/loaders/xlsx.py b/visidata/loaders/xlsx.py index 742408bc6..6ce01db10 100644 --- a/visidata/loaders/xlsx.py +++ b/visidata/loaders/xlsx.py @@ -138,7 +138,9 @@ def save_xlsx(vd, p, *sheets): row = [] for col, v in dispvals.items(): - if col.type == date: +...
getnikola__nikola-1994
nikola no longer has all-nocdn.* I started using `nikola` today for a gallery. The generated pages make reference to `all-nocdn.css` and `all-nocdn.js`, but they're not (longer?) part of `nikola`'s code: ``` bash mdione@diablo:~/src/projects/nikola$ git remote show origin * remote origin Fetch URL: https://github.co...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2015 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2015 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi...
diff --git a/CHANGES.txt b/CHANGES.txt index 56f8010151..f8e927f15a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -28,6 +28,7 @@ Features Bugfixes -------- +* If webassets is not installed, use unbundled assets (Issue #1992) * Check links in Atom and sitemap files (Issue #1993) * Link checker should check all ab...
zigpy__zha-device-handlers-2997
Tuya switch unsupported TS0601 _TZE204_ptaqh9tk ### Problem description Has someone manage to get a tuya switch TS0601 _TZE204_ptaqh9tk working with conbee zigbee in Home Assistant? It is a single switch I have bought . There is no entity for the switch to put it on or off. ### Solution description A quirk that sup...
[ { "content": "\"\"\"Tuya DP based switches.\"\"\"\nfrom zigpy.profiles import zgp, zha\nfrom zigpy.zcl.clusters.general import Basic, GreenPowerProxy, Groups, Ota, Scenes, Time\n\nfrom zhaquirks.const import (\n DEVICE_TYPE,\n ENDPOINTS,\n INPUT_CLUSTERS,\n MODELS_INFO,\n OUTPUT_CLUSTERS,\n PR...
[ { "content": "\"\"\"Tuya DP based switches.\"\"\"\nfrom zigpy.profiles import zgp, zha\nfrom zigpy.zcl.clusters.general import Basic, GreenPowerProxy, Groups, Ota, Scenes, Time\n\nfrom zhaquirks.const import (\n DEVICE_TYPE,\n ENDPOINTS,\n INPUT_CLUSTERS,\n MODELS_INFO,\n OUTPUT_CLUSTERS,\n PR...
diff --git a/zhaquirks/tuya/ts0601_switch.py b/zhaquirks/tuya/ts0601_switch.py index d7ab0e9618..9e48692af7 100644 --- a/zhaquirks/tuya/ts0601_switch.py +++ b/zhaquirks/tuya/ts0601_switch.py @@ -128,6 +128,7 @@ class TuyaSingleSwitch_GP(TuyaSwitch): MODELS_INFO: [ ("_TZE200_gbagoilo", "TS0601"), ...
optuna__optuna-4275
Constrained single-objective TPE always throws unnecessary warnings when `constant_liar=True` ### Expected behavior It should not throw warnings. ### Environment - Optuna version: v3.0.2 - Python version: any - OS: any - (Optional) Other libraries and their versions: ### Error messages, stack traces, o...
[ { "content": "import math\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Container\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typing import Sequence\nfrom typing import Tuple\nfrom typing import Union\nimport warnings\n\nimport numpy as np\n\nf...
[ { "content": "import math\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Container\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typing import Sequence\nfrom typing import Tuple\nfrom typing import Union\nimport warnings\n\nimport numpy as np\n\nf...
diff --git a/optuna/samplers/_tpe/sampler.py b/optuna/samplers/_tpe/sampler.py index a1b5445c2f..19c0f3772d 100644 --- a/optuna/samplers/_tpe/sampler.py +++ b/optuna/samplers/_tpe/sampler.py @@ -670,7 +670,7 @@ def _get_observation_pairs( param_value = None values[param_name].append(param_...
mdn__kuma-6250
Macro search results are mangled for non-en-US locales See for example https://wiki.developer.mozilla.org/en-US/search?locale=*&kumascript_macros=WebExtAllExamples&topic=none This lists all pages that call WebExtAllExamples, across all locales. One entry looks like: <img width="893" alt="Screen Shot 2019-11-21 at...
[ { "content": "from django.conf import settings\nfrom rest_framework import serializers\n\nfrom kuma.core.urlresolvers import reverse\n\n\nclass SearchQueryField(serializers.ReadOnlyField):\n \"\"\"\n Field that returns the search query of the current request.\n \"\"\"\n def __init__(self, *args, **k...
[ { "content": "from django.conf import settings\nfrom rest_framework import serializers\n\nfrom kuma.core.urlresolvers import reverse\n\n\nclass SearchQueryField(serializers.ReadOnlyField):\n \"\"\"\n Field that returns the search query of the current request.\n \"\"\"\n def __init__(self, *args, **k...
diff --git a/kuma/search/fields.py b/kuma/search/fields.py index e80783e05e4..f85cb0fcedb 100644 --- a/kuma/search/fields.py +++ b/kuma/search/fields.py @@ -37,5 +37,4 @@ def to_representation(self, value): args = [getattr(value, arg) for arg in self.args] kwargs = {arg: getattr(value, arg) for arg in...
nilearn__nilearn-1916
Change iframe call for rendering in Jupyter Book <!-- Hi! If you have: -1 Questions about how to use Nilearn or -2 Need analysis suggestions & recommendations? A bunch of fMRI researchers hang out at Neurostars (http://neurostars.org/). Post those questions there. Add the tag `nilearn` (we get an email ...
[ { "content": "\"\"\"\nHelper functions for views, i.e. interactive plots from html_surface and\nhtml_connectome.\n\"\"\"\n\nimport os\nimport base64\nimport webbrowser\nimport tempfile\nimport warnings\nimport subprocess\nfrom string import Template\nimport weakref\ntry:\n from html import escape # Unavaila...
[ { "content": "\"\"\"\nHelper functions for views, i.e. interactive plots from html_surface and\nhtml_connectome.\n\"\"\"\n\nimport os\nimport base64\nimport webbrowser\nimport tempfile\nimport warnings\nimport subprocess\nfrom string import Template\nimport weakref\ntry:\n from html import escape # Unavaila...
diff --git a/nilearn/plotting/js_plotting_utils.py b/nilearn/plotting/js_plotting_utils.py index f32040a729..cad247b36d 100644 --- a/nilearn/plotting/js_plotting_utils.py +++ b/nilearn/plotting/js_plotting_utils.py @@ -123,7 +123,7 @@ def get_iframe(self, width=None, height=None): if height is None: ...
pydantic__pydantic-8110
`CallableDiscriminator` isn't in the docs -- note in release notes (it's `Discriminator`) ### Initial Checks - [X] I have searched Google & GitHub for similar requests and couldn't find anything - [X] I have read and followed [the docs](https://docs.pydantic.dev) and still think this feature is missing ### Descriptio...
[ { "content": "from __future__ import annotations as _annotations\n\nimport inspect\nfrom dataclasses import dataclass\nfrom functools import partial\nfrom typing import Any, Awaitable, Callable\n\nimport pydantic_core\n\nfrom ..config import ConfigDict\nfrom ..plugin._schema_validator import create_schema_valid...
[ { "content": "from __future__ import annotations as _annotations\n\nimport inspect\nfrom dataclasses import dataclass\nfrom functools import partial\nfrom typing import Any, Awaitable, Callable\n\nimport pydantic_core\n\nfrom ..config import ConfigDict\nfrom ..plugin._schema_validator import create_schema_valid...
diff --git a/HISTORY.md b/HISTORY.md index 6806e0f8f3d..c7340980ab4 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -21,6 +21,7 @@ The code released in v2.5.0 is functionally identical to that of v2.5.0b1. * Added `validation_error_cause` to config by @zakstucke in [#7626](https://github.com/pydantic/pydantic/pull/7626) ...
piskvorky__gensim-2570
loading a vocab file doesn't seem to support unicode_errors #### Problem description Hi, thank you for providing gensim, which is an amzing lib, for us! When I tried to read a vocab file generated by native word2vec command, I got an error. ```python >>> model = gensim.models.KeyedVectors.load_word2vec_format("...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Author: Shiva Manne <s.manne@rare-technologies.com>\n# Copyright (C) 2018 RaRe Technologies s.r.o.\n\n\"\"\"General functions used for any2vec models.\n\nOne of the goals of this module is to provide an abstraction over the Cython\nextensions fo...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Author: Shiva Manne <s.manne@rare-technologies.com>\n# Copyright (C) 2018 RaRe Technologies s.r.o.\n\n\"\"\"General functions used for any2vec models.\n\nOne of the goals of this module is to provide an abstraction over the Cython\nextensions fo...
diff --git a/gensim/models/utils_any2vec.py b/gensim/models/utils_any2vec.py index 90d2f60fbc..c47567c939 100644 --- a/gensim/models/utils_any2vec.py +++ b/gensim/models/utils_any2vec.py @@ -335,7 +335,7 @@ def _load_word2vec_format(cls, fname, fvocab=None, binary=False, encoding='utf8' counts = {} wi...
comic__grand-challenge.org-1845
Not setting `USER` directive in processor Dockerfile fails silently Building a processor image without setting `USER` directive in Dockerfile will result in the container never being marked as ready and triggers a (silent) error in sentry: https://sentry.io/organizations/grand-challenge/issues/2396054397/?project=303...
[ { "content": "import json\nimport tarfile\nimport uuid\nfrom datetime import timedelta\nfrom typing import Dict\n\nfrom billiard.exceptions import SoftTimeLimitExceeded, TimeLimitExceeded\nfrom celery import shared_task\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.core.exceptions...
[ { "content": "import json\nimport tarfile\nimport uuid\nfrom datetime import timedelta\nfrom typing import Dict\n\nfrom billiard.exceptions import SoftTimeLimitExceeded, TimeLimitExceeded\nfrom celery import shared_task\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.core.exceptions...
diff --git a/app/grandchallenge/components/tasks.py b/app/grandchallenge/components/tasks.py index 0b1f3e6642..4f23019351 100644 --- a/app/grandchallenge/components/tasks.py +++ b/app/grandchallenge/components/tasks.py @@ -66,7 +66,9 @@ def _validate_docker_image_manifest(*, model, instance) -> str: ) config ...
arviz-devs__arviz-343
Docs are broken Looks like one of the examples still uses `n_eff`. From travis: ``` Exception occurred: File "/home/travis/build/arviz-devs/arviz/examples/plot_forest_ridge.py", line 20, in <module> n_eff=False) TypeError: plot_forest() got an unexpected keyword argument 'n_eff' ```
[ { "content": "\"\"\"\nRidgeplot\n=========\n\n_thumb: .8, .5\n\"\"\"\nimport arviz as az\n\naz.style.use('arviz-darkgrid')\n\nnon_centered_data = az.load_arviz_data('non_centered_eight')\nfig, axes = az.plot_forest(non_centered_data,\n kind='ridgeplot',\n var_...
[ { "content": "\"\"\"\nRidgeplot\n=========\n\n_thumb: .8, .5\n\"\"\"\nimport arviz as az\n\naz.style.use('arviz-darkgrid')\n\nnon_centered_data = az.load_arviz_data('non_centered_eight')\nfig, axes = az.plot_forest(non_centered_data,\n kind='ridgeplot',\n var_...
diff --git a/examples/plot_forest_ridge.py b/examples/plot_forest_ridge.py index 1ca0d83946..3fbcaf7feb 100644 --- a/examples/plot_forest_ridge.py +++ b/examples/plot_forest_ridge.py @@ -15,7 +15,5 @@ combined=True, textsize=11, ridgepl...
liqd__a4-meinberlin-4916
#6963 Too many codes in 1 package URL: https://meinberlin-dev.liqd.net/dashboard/modules/burgerinnenhaushalt-3-phasen-21/download-codes/ user: admin, initiator expected behaviour: Each code-package should contain a max. of 1.000.000 codes. ~~The wording of the helptext should have also the right number of 1.000.000 c...
[ { "content": "from background_task import background\n\nfrom adhocracy4.modules.models import Module\nfrom meinberlin.apps.votes.models import VotingToken\nfrom meinberlin.apps.votes.models import get_token_12\n\n# Number of tokens to insert into database per bulk_create\nBATCH_SIZE = 1000000\n# Max number of t...
[ { "content": "from background_task import background\n\nfrom adhocracy4.modules.models import Module\nfrom meinberlin.apps.votes.models import VotingToken\nfrom meinberlin.apps.votes.models import get_token_12\n\n# Number of tokens to insert into database per bulk_create\nBATCH_SIZE = 100000\n# Max number of to...
diff --git a/meinberlin/apps/votes/tasks.py b/meinberlin/apps/votes/tasks.py index aa5b64737b..7254ad1fb9 100644 --- a/meinberlin/apps/votes/tasks.py +++ b/meinberlin/apps/votes/tasks.py @@ -5,9 +5,9 @@ from meinberlin.apps.votes.models import get_token_12 # Number of tokens to insert into database per bulk_create ...
cal-itp__benefits-999
Remove agency index pass-through With the new Courtesy Card designs, we have a better context-setting Agency Index (homepage). Let's remove the auto-pass-through that currently sends the user straight to Eligibility Start. ## Acceptance Criteria <!-- Remember to consider edge cases --> - [ ] A user lands on th...
[ { "content": "\"\"\"\nThe core application: view definition for the root of the webapp.\n\"\"\"\nfrom django.http import HttpResponse, HttpResponseBadRequest, HttpResponseNotFound, HttpResponseServerError\nfrom django.shortcuts import redirect\nfrom django.template import loader\nfrom django.template.response i...
[ { "content": "\"\"\"\nThe core application: view definition for the root of the webapp.\n\"\"\"\nfrom django.http import HttpResponse, HttpResponseBadRequest, HttpResponseNotFound, HttpResponseServerError\nfrom django.shortcuts import redirect\nfrom django.template import loader\nfrom django.template.response i...
diff --git a/benefits/core/views.py b/benefits/core/views.py index a932f222cd..26ef5bccab 100644 --- a/benefits/core/views.py +++ b/benefits/core/views.py @@ -52,9 +52,6 @@ def agency_index(request, agency): session.reset(request) session.update(request, agency=agency, origin=agency.index_url) - if len(a...
googleapis__python-bigquery-672
AttributeError in `resource_name_to_date()` samples fixture See this samples [test run](https://source.cloud.google.com/results/invocations/e5c424d5-84a6-4505-ae44-3bc70fa94e44/targets/cloud-devrel%2Fclient-libraries%2Fpython%2Fgoogleapis%2Fpython-bigquery%2Fsamples%2Fpython3.6%2Fpresubmit/log). A bug in [this fixture]...
[ { "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 applicabl...
[ { "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 applicabl...
diff --git a/samples/snippets/conftest.py b/samples/snippets/conftest.py index 0d0299ee5..cb11eb68f 100644 --- a/samples/snippets/conftest.py +++ b/samples/snippets/conftest.py @@ -33,7 +33,7 @@ def resource_prefix() -> str: def resource_name_to_date(resource_name: str): start_date = len(RESOURCE_PREFIX) + 1 ...
vyperlang__vyper-3805
`payable` decorator in interface functions not enforced by `implements` ### Version Information * vyper Version (output of `vyper --version`): `0.3.11+commit.819de669` * OS: `linux` * Python Version (output of `python --version`): `3.11.3` ### What's your issue about? If an interface function (in a `.vyi` fi...
[ { "content": "import re\nimport warnings\nfrom dataclasses import dataclass\nfrom functools import cached_property\nfrom typing import Any, Dict, List, Optional, Tuple\n\nfrom vyper import ast as vy_ast\nfrom vyper.ast.validation import validate_call_args\nfrom vyper.exceptions import (\n ArgumentException,\...
[ { "content": "import re\nimport warnings\nfrom dataclasses import dataclass\nfrom functools import cached_property\nfrom typing import Any, Dict, List, Optional, Tuple\n\nfrom vyper import ast as vy_ast\nfrom vyper.ast.validation import validate_call_args\nfrom vyper.exceptions import (\n ArgumentException,\...
diff --git a/examples/tokens/ERC1155ownable.vy b/examples/tokens/ERC1155ownable.vy index 9e07234fc8..b8513243d4 100644 --- a/examples/tokens/ERC1155ownable.vy +++ b/examples/tokens/ERC1155ownable.vy @@ -393,7 +393,7 @@ def setContractURI(contractUri: String[MAX_URI_LENGTH]): self.contractURI = contractUri log...
tinygrad__tinygrad-800
Broadcasting discrepancies ```python import torch from tinygrad.tensor import Tensor A = torch.ones(4, 3) B = torch.ones(1, 3, 3, 3) C = A @ B # torch torch.Size([1, 3, 4, 3]) print('torch', C.shape) D = Tensor.ones(4, 3) E = Tensor.ones(1, 3, 3, 3) F = D @ E # tinygrad (4, 9) print('tinygrad', F....
[ { "content": "# inspired by https://github.com/karpathy/micrograd/blob/master/micrograd/engine.py\nfrom __future__ import annotations\nimport math, functools, itertools\nimport numpy as np\nfrom typing import List, Tuple, Callable, Optional, ClassVar, Type, Union, Sequence\nfrom tinygrad.helpers import prod, ar...
[ { "content": "# inspired by https://github.com/karpathy/micrograd/blob/master/micrograd/engine.py\nfrom __future__ import annotations\nimport math, functools, itertools\nimport numpy as np\nfrom typing import List, Tuple, Callable, Optional, ClassVar, Type, Union, Sequence\nfrom tinygrad.helpers import prod, ar...
diff --git a/test/test_ops.py b/test/test_ops.py index e5e0711f17146..b8b2aafc0a851 100644 --- a/test/test_ops.py +++ b/test/test_ops.py @@ -186,6 +186,14 @@ def test_matmul_simple(self): helper_test_op([(4), (4,4)], lambda x,y: x.matmul(y), Tensor.dot, atol=1e-4) def test_matmul(self): helper_test_op([(64...
common-workflow-language__cwltool-1504
Error when building subgraph with --target Hello, I am trying to use `--target` option with this very simple workflow ``` cwltool --target step2 --debug --print-subgraph wf.cwl > subgraph.cwl ``` However I get an error `TypeError: unhashable type: 'CommentedMap'` Thanks! --- ## Expected Behavior **su...
[ { "content": "import urllib\nfrom collections import namedtuple\nfrom typing import (\n Any,\n Dict,\n List,\n Mapping,\n MutableMapping,\n MutableSequence,\n Optional,\n Set,\n Tuple,\n cast,\n)\n\nfrom ruamel.yaml.comments import CommentedMap\n\nfrom .utils import CWLObjectType, ...
[ { "content": "import urllib\nfrom collections import namedtuple\nfrom typing import (\n Any,\n Dict,\n List,\n Mapping,\n MutableMapping,\n MutableSequence,\n Optional,\n Set,\n Tuple,\n cast,\n)\n\nfrom ruamel.yaml.comments import CommentedMap\n\nfrom .utils import CWLObjectType, ...
diff --git a/Makefile b/Makefile index 0e07cff3e..dbe02adeb 100644 --- a/Makefile +++ b/Makefile @@ -177,7 +177,7 @@ mypy: $(filter-out setup.py gittagger.py,$(PYSOURCES)) mypyc: $(PYSOURCES) MYPYPATH=typeshed CWLTOOL_USE_MYPYC=1 pip install --verbose -e . \ - && pytest ${PYTEST_EXTRA} + && pytest -vv ${PYTEST...
matrix-org__synapse-5930
Add a m.id_access_token flag to unstable_features For https://github.com/matrix-org/synapse/issues/5786#issuecomment-523879040
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2016 OpenMarket Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2016 OpenMarket Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#...
diff --git a/changelog.d/5930.misc b/changelog.d/5930.misc new file mode 100644 index 000000000000..81dcc10e6d43 --- /dev/null +++ b/changelog.d/5930.misc @@ -0,0 +1 @@ +Add temporary flag to /versions in unstable_features to indicate this Synapse supports receiving id_access_token parameters on calls to identity serve...
sanic-org__sanic-2754
Improve type of `MiddlewareType` ### Is there an existing issue for this? - [X] I have searched the existing issues ### Is your feature request related to a problem? Please describe. When using a custom Request class and type hinting the middleware with that custom Request class, type checkers complain that the argu...
[ { "content": "from asyncio.events import AbstractEventLoop\nfrom typing import Any, Callable, Coroutine, Optional, TypeVar, Union\n\nimport sanic\n\nfrom sanic.request import Request\nfrom sanic.response import BaseHTTPResponse, HTTPResponse\n\n\nSanic = TypeVar(\"Sanic\", bound=\"sanic.Sanic\")\n\nMiddlewareRe...
[ { "content": "from asyncio.events import AbstractEventLoop\nfrom typing import Any, Callable, Coroutine, Optional, TypeVar, Union\n\nimport sanic\n\nfrom sanic import request\nfrom sanic.response import BaseHTTPResponse, HTTPResponse\n\n\nSanic = TypeVar(\"Sanic\", bound=\"sanic.Sanic\")\nRequest = TypeVar(\"Re...
diff --git a/sanic/models/handler_types.py b/sanic/models/handler_types.py index 4a0fbfa607..7d123d0b63 100644 --- a/sanic/models/handler_types.py +++ b/sanic/models/handler_types.py @@ -3,11 +3,12 @@ import sanic -from sanic.request import Request +from sanic import request from sanic.response import BaseHTTPRes...
openstates__openstates-scrapers-2221
VA failing since at least 2018-03-21 VA has been failing since 2018-03-21 Based on automated runs it appears that VA has not run successfully in 3 days (2018-03-21). ``` 00:06:18 INFO scrapelib: GET - http://lis.virginia.gov/cgi-bin/legp604.exe?182+sbj+062 00:06:20 INFO scrapelib: GET - http://lis.virginia.gov/cgi...
[ { "content": "import re\nimport pytz\nimport datetime\n\nimport lxml.html\nfrom pupa.scrape import Person\nfrom pupa.scrape import Scraper\nfrom pupa.scrape import Organization\nfrom spatula import Page, Spatula\n\nfrom .common import SESSION_SITE_IDS\n\n\nCHAMBER_MOVES = {\n \"A. Benton \\\"Ben\\\" Chafin-E...
[ { "content": "import re\nimport pytz\nimport datetime\n\nimport lxml.html\nfrom pupa.scrape import Person\nfrom pupa.scrape import Scraper\nfrom pupa.scrape import Organization\nfrom spatula import Page, Spatula\n\nfrom .common import SESSION_SITE_IDS\n\n\nCHAMBER_MOVES = {\n \"A. Benton \\\"Ben\\\" Chafin-E...
diff --git a/openstates/va/people.py b/openstates/va/people.py index 649bb8d0fe..61ed646c43 100644 --- a/openstates/va/people.py +++ b/openstates/va/people.py @@ -76,7 +76,7 @@ def get_committees(self, item): self.obj.add_membership( self.kwargs['committees'][key], start_d...
LMFDB__lmfdb-4875
P-adic Galois group in gaga box incorrectly formatted I haven't looked into this at all, but I see on pages like https://www.lmfdb.org/padicField/2.12.30.284 that the gaga box "Galois group" property misrenders `galois_group[tex_name]`.
[ { "content": "import re\nfrom collections import defaultdict\n\nfrom lmfdb import db\n\nfrom sage.all import ZZ, gap, cached_function\n\nfrom lmfdb.utils import list_to_latex_matrix\nfrom lmfdb.groups.abstract.main import abstract_group_namecache, abstract_group_display_knowl\n\ndef knowl_cache(galois_labels):\...
[ { "content": "import re\nfrom collections import defaultdict\n\nfrom lmfdb import db\n\nfrom sage.all import ZZ, gap, cached_function\n\nfrom lmfdb.utils import list_to_latex_matrix\nfrom lmfdb.groups.abstract.main import abstract_group_namecache, abstract_group_display_knowl\n\ndef knowl_cache(galois_labels):\...
diff --git a/lmfdb/galois_groups/transitive_group.py b/lmfdb/galois_groups/transitive_group.py index 25c3ba034e..69307d8f14 100644 --- a/lmfdb/galois_groups/transitive_group.py +++ b/lmfdb/galois_groups/transitive_group.py @@ -115,7 +115,7 @@ def display_short(self, emptyifnotpretty=False): gp_label = f"{self....
dbt-labs__dbt-core-9763
[Bug] Unhandled exception for failing `on-run-*` hooks in `source freshness` ### Is this a new bug in dbt-core? - [X] I believe this is a new bug in dbt-core - [X] I have searched the existing issues, and I could not find an existing issue for this bug ### Current Behavior _follow up to https://github.com/dbt...
[ { "content": "from dataclasses import dataclass, field\nfrom typing import Dict, Any, Sequence, List, Union, Optional\nfrom datetime import datetime\n\nfrom dbt.artifacts.resources import FreshnessThreshold\nfrom dbt.artifacts.schemas.results import ExecutionResult, FreshnessStatus, NodeResult, TimingInfo\nfrom...
[ { "content": "from dataclasses import dataclass, field\nfrom typing import Dict, Any, Sequence, List, Union, Optional\nfrom datetime import datetime\n\nfrom dbt.artifacts.resources import FreshnessThreshold\nfrom dbt.artifacts.schemas.results import ExecutionResult, FreshnessStatus, NodeResult, TimingInfo\nfrom...
diff --git a/.changes/unreleased/Fixes-20240316-231152.yaml b/.changes/unreleased/Fixes-20240316-231152.yaml new file mode 100644 index 00000000000..725d8bbc3c5 --- /dev/null +++ b/.changes/unreleased/Fixes-20240316-231152.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: Handle exceptions for failing on-run-* hooks in source f...
alltheplaces__alltheplaces-4515
Homebase spider webpage regex is too restrictive The homebase_gb_ie.py spider contains a regex in sitemap_rules to restrict things to store pages: `sitemap_rules = [(r"https:\/\/store\.homebase\.co\.uk\/[-\w]+\/[-.\w]+$", "parse_sd")]` This regex is slightly too strict, as there's a store with a "." in the place le...
[ { "content": "from scrapy.spiders import SitemapSpider\n\nfrom locations.structured_data_spider import StructuredDataSpider\n\n\nclass HomebaseGBIESpider(SitemapSpider, StructuredDataSpider):\n name = \"homebase_gb_ie\"\n item_attributes = {\"brand\": \"Homebase\", \"brand_wikidata\": \"Q9293447\"}\n s...
[ { "content": "from scrapy.spiders import SitemapSpider\n\nfrom locations.structured_data_spider import StructuredDataSpider\n\n\nclass HomebaseGBIESpider(SitemapSpider, StructuredDataSpider):\n name = \"homebase_gb_ie\"\n item_attributes = {\"brand\": \"Homebase\", \"brand_wikidata\": \"Q9293447\"}\n s...
diff --git a/locations/spiders/homebase_gb_ie.py b/locations/spiders/homebase_gb_ie.py index d06ac5ca45f..4db83acfd9e 100644 --- a/locations/spiders/homebase_gb_ie.py +++ b/locations/spiders/homebase_gb_ie.py @@ -7,5 +7,5 @@ class HomebaseGBIESpider(SitemapSpider, StructuredDataSpider): name = "homebase_gb_ie" ...
python-pillow__Pillow-3822
UnboundLocalError: local variable 'err_code' referenced before assignment ### What did you do? Load a GIF and attempted to save each frame to a file ### What did you expect to happen? Each frame of the gif is saved to a different image file in a directory ### What actually happened? The loop errored before complet...
[ { "content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# GIF file handling\n#\n# History:\n# 1995-09-01 fl Created\n# 1996-12-14 fl Added interlace support\n# 1996-12-30 fl Added animation support\n# 1997-01-05 fl Added write support, fixed local colour map bug\n# 1997-02-23 fl Make sure to load r...
[ { "content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# GIF file handling\n#\n# History:\n# 1995-09-01 fl Created\n# 1996-12-14 fl Added interlace support\n# 1996-12-30 fl Added animation support\n# 1997-01-05 fl Added write support, fixed local colour map bug\n# 1997-02-23 fl Make sure to load r...
diff --git a/Tests/images/test_extents.gif b/Tests/images/test_extents.gif new file mode 100644 index 00000000000..03c436435d6 Binary files /dev/null and b/Tests/images/test_extents.gif differ diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py index 8388949888d..f9c31212469 100644 --- a/Tests/test_file_gif.py...
holoviz__holoviews-6237
Bug with hvplot plotly violin plots using 'by' argument Violin plots on hvplot with the plotly extension do not work properly when using the 'by' argument to make a violin for each category. Instead of one violin per category as expected, only the first letter of each category is used, and violins of categories with th...
[ { "content": "import param\n\nfrom ..mixins import MultiDistributionMixin\nfrom .chart import ChartPlot\nfrom .element import ColorbarPlot, ElementPlot\nfrom .selection import PlotlyOverlaySelectionDisplay\n\n\nclass BivariatePlot(ChartPlot, ColorbarPlot):\n\n filled = param.Boolean(default=False)\n\n nco...
[ { "content": "import param\n\nfrom ..mixins import MultiDistributionMixin\nfrom .chart import ChartPlot\nfrom .element import ColorbarPlot, ElementPlot\nfrom .selection import PlotlyOverlaySelectionDisplay\n\n\nclass BivariatePlot(ChartPlot, ColorbarPlot):\n\n filled = param.Boolean(default=False)\n\n nco...
diff --git a/holoviews/plotting/plotly/stats.py b/holoviews/plotting/plotly/stats.py index 2907d7653d..5414e9d70b 100644 --- a/holoviews/plotting/plotly/stats.py +++ b/holoviews/plotting/plotly/stats.py @@ -87,6 +87,8 @@ def get_data(self, element, ranges, style, **kwargs): axis = 'x' if self.invert_axes else ...
cowrie__cowrie-1357
Programming errors in the InfluxDB plugin Something definitely seems wrong with the InfluxDB output plugin... I can see at least two possible problems: 1. The error handling ```python except InfluxDBClientError as e: log.msg("output_influx: I/O error({0}): '{1}'".format( e.e...
[ { "content": "import re\n\nfrom influxdb import InfluxDBClient\nfrom influxdb.exceptions import InfluxDBClientError\n\nfrom twisted.python import log\n\nimport cowrie.core.output\nfrom cowrie.core.config import CowrieConfig\n\n\nclass Output(cowrie.core.output.Output):\n \"\"\"\n influx output\n \"\"\"...
[ { "content": "import re\n\nfrom influxdb import InfluxDBClient\nfrom influxdb.exceptions import InfluxDBClientError\n\nfrom twisted.python import log\n\nimport cowrie.core.output\nfrom cowrie.core.config import CowrieConfig\n\n\nclass Output(cowrie.core.output.Output):\n \"\"\"\n influx output\n \"\"\"...
diff --git a/src/cowrie/output/influx.py b/src/cowrie/output/influx.py index a708901cdb..83ad3eb098 100644 --- a/src/cowrie/output/influx.py +++ b/src/cowrie/output/influx.py @@ -23,7 +23,7 @@ def start(self): self.client = InfluxDBClient(host=host, port=port, ssl=ssl, verify_ssl=ssl) except Influ...
fossasia__open-event-server-8942
Adjust the Server to the Changes in Gender Options The server needs to be changed slightly in order to work with the new client after implementing [feature no 8842](https://github.com/fossasia/open-event-frontend/issues/8842) in the frontend.
[ { "content": "import json\n\nfrom sqlalchemy.event import listens_for\nfrom sqlalchemy.schema import UniqueConstraint\n\nfrom app.api.helpers.utilities import to_snake_case\nfrom app.models import db\n\nSESSION_FORM = {\n \"title\": {\"include\": 1, \"require\": 1},\n \"subtitle\": {\"include\": 0, \"requ...
[ { "content": "import json\n\nfrom sqlalchemy.event import listens_for\nfrom sqlalchemy.schema import UniqueConstraint\n\nfrom app.api.helpers.utilities import to_snake_case\nfrom app.models import db\n\nSESSION_FORM = {\n \"title\": {\"include\": 1, \"require\": 1},\n \"subtitle\": {\"include\": 0, \"requ...
diff --git a/app/models/custom_form.py b/app/models/custom_form.py index 3fd702fa08..4c8ed2f838 100644 --- a/app/models/custom_form.py +++ b/app/models/custom_form.py @@ -145,7 +145,7 @@ "github": "GitHub", "linkedin": "LinkedIn", "instagram": "Instagram", - "gender": "Gender", + "gender": "Which o...
conda__conda-build-2309
conda build --output doesn't respect --output-folder I'm using conda 4.3.24 on Python 3.5. When I run `conda build mypackage --output-folder pkgs/ --output`, the path conda returns is the filename the package would have if I hadn't specified the `--output-folder`, i.e., it points to the default conda-build `root-dir...
[ { "content": "# (c) 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\nfrom __future__ import absolute_import, division, print_function\n\nfrom co...
[ { "content": "# (c) 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\nfrom __future__ import absolute_import, division, print_function\n\nfrom co...
diff --git a/conda_build/render.py b/conda_build/render.py index 0b76ad06f2..70c59fafb6 100644 --- a/conda_build/render.py +++ b/conda_build/render.py @@ -39,8 +39,8 @@ def bldpkg_path(m): ''' Returns path to built package's tarball given its ``Metadata``. ''' - output_dir = 'noarch' if m.noarch or m....
flairNLP__flair-664
TextClassifier label predictions always have score 1.0 Hi guys, I have trained my own TextClassifier following this tutorial: https://github.com/zalandoresearch/flair/blob/master/resources/docs/TUTORIAL_7_TRAINING_A_MODEL.md I am using the option multi_label=False, as each sentence should be assigned only one lab...
[ { "content": "import warnings\nimport logging\nfrom pathlib import Path\nfrom typing import List, Union\n\nimport torch\nimport torch.nn as nn\n\nimport flair.nn\nimport flair.embeddings\nfrom flair.data import Dictionary, Sentence, Label\nfrom flair.file_utils import cached_path\nfrom flair.training_utils impo...
[ { "content": "import warnings\nimport logging\nfrom pathlib import Path\nfrom typing import List, Union\n\nimport torch\nimport torch.nn as nn\n\nimport flair.nn\nimport flair.embeddings\nfrom flair.data import Dictionary, Sentence, Label\nfrom flair.file_utils import cached_path\nfrom flair.training_utils impo...
diff --git a/flair/models/text_classification_model.py b/flair/models/text_classification_model.py index d3971aed6b..20962e7350 100644 --- a/flair/models/text_classification_model.py +++ b/flair/models/text_classification_model.py @@ -252,7 +252,8 @@ def _get_multi_label(self, label_scores) -> List[Label]: ret...
django-helpdesk__django-helpdesk-519
Admin page for follow ups doesn't show enough information What happens: The admin page only shows the **str** of the followup ; ![helpdesk](https://cloud.githubusercontent.com/assets/17169553/16551313/407f26ee-420b-11e6-9e35-a8d99f8f37db.png) This makes it almost impossible to find a particular followup amongst the lis...
[ { "content": "from django.contrib import admin\nfrom django.utils.translation import ugettext_lazy as _\nfrom helpdesk.models import Queue, Ticket, FollowUp, PreSetReply, KBCategory\nfrom helpdesk.models import EscalationExclusion, EmailTemplate, KBItem\nfrom helpdesk.models import TicketChange, Attachment, Ign...
[ { "content": "from django.contrib import admin\nfrom django.utils.translation import ugettext_lazy as _\nfrom helpdesk.models import Queue, Ticket, FollowUp, PreSetReply, KBCategory\nfrom helpdesk.models import EscalationExclusion, EmailTemplate, KBItem\nfrom helpdesk.models import TicketChange, Attachment, Ign...
diff --git a/helpdesk/admin.py b/helpdesk/admin.py index 3ff8c8579..0c56da9ff 100644 --- a/helpdesk/admin.py +++ b/helpdesk/admin.py @@ -40,6 +40,12 @@ class AttachmentInline(admin.StackedInline): @admin.register(FollowUp) class FollowUpAdmin(admin.ModelAdmin): inlines = [TicketChangeInline, AttachmentInline] + ...
getsentry__sentry-6091
After upgrading to 8.21, Sentry upgrade wizard hangs on auth.allow-registration When upgrading my onpremise installation form 8.20 to 8.21 (using docker-compose), the wizard prompted me to set the “Anonymize Beacon” option. When clicking “Continue”, the following error message pops up: > An invalid value for (auth.all...
[ { "content": "\"\"\"\nsentry.utils.types\n~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2016 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\nfrom __future__ import absolute_import, print_function\n\nimport six\n\nfrom yaml.parser import ParserError\nfrom yam...
[ { "content": "\"\"\"\nsentry.utils.types\n~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2016 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\nfrom __future__ import absolute_import, print_function\n\nimport six\n\nfrom yaml.parser import ParserError\nfrom yam...
diff --git a/src/sentry/static/sentry/app/components/forms/form.jsx b/src/sentry/static/sentry/app/components/forms/form.jsx index e387255a13b9f6..15c18c37d923f1 100644 --- a/src/sentry/static/sentry/app/components/forms/form.jsx +++ b/src/sentry/static/sentry/app/components/forms/form.jsx @@ -83,11 +83,11 @@ export de...
encode__django-rest-framework-2535
Duplicate results of `ManyToManyField` when using `SearchFilter`. I have two models: <pre> class Course(models.Model): name = models.CharField(max_length=255) class Teacher(models.Model): name = models.CharField(max_length=255) courses = models.ManyToManyField('schools.Course') </pre> The serializer are:...
[ { "content": "\"\"\"\nProvides generic filtering backends that can be used to filter the results\nreturned by list views.\n\"\"\"\nfrom __future__ import unicode_literals\n\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.db import models\nfrom django.utils import six\nfrom rest_framework.c...
[ { "content": "\"\"\"\nProvides generic filtering backends that can be used to filter the results\nreturned by list views.\n\"\"\"\nfrom __future__ import unicode_literals\n\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.db import models\nfrom django.utils import six\nfrom rest_framework.c...
diff --git a/rest_framework/filters.py b/rest_framework/filters.py index d188a2d1ec..d3f55a447a 100644 --- a/rest_framework/filters.py +++ b/rest_framework/filters.py @@ -104,7 +104,7 @@ def filter_queryset(self, request, queryset, view): for search_term in self.get_search_terms(request): or_queri...
pyinstaller__pyinstaller-6029
inconsistencies for Darwin in v4.4 leads to Bad CPU type in executable <!-- Welcome to the PyInstaller issue tracker! Before creating an issue, please heed the following: 1. This tracker should only be used to report bugs and request features / enhancements to PyInstaller - For questions and general support, ...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2021, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2021, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
diff --git a/PyInstaller/compat.py b/PyInstaller/compat.py index f042c8cfe0..b125061b04 100644 --- a/PyInstaller/compat.py +++ b/PyInstaller/compat.py @@ -522,7 +522,7 @@ def __wrap_python(args, kwargs): # It is necessary to run binaries with 'arch' command. if is_darwin: if architecture == '64bit': ...
pantsbuild__pants-15602
--black-skip breaks fmt goal on isort exception **Describe the bug** There are a few related bugs, but the breaking behaviour is the most important I think. I've tested on 2.11, and everything works as expected, so this appears to only be a pre-release/dev bug. While writing a plugin, I started implementing and tes...
[ { "content": "# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport itertools\nimport logging\nfrom collections import defaultdict\nfrom dataclasses import dataclass\nfrom typing import ...
[ { "content": "# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport itertools\nimport logging\nfrom collections import defaultdict\nfrom dataclasses import dataclass\nfrom typing import ...
diff --git a/src/python/pants/core/goals/fmt.py b/src/python/pants/core/goals/fmt.py index 96d825b336a..713ba7b5abf 100644 --- a/src/python/pants/core/goals/fmt.py +++ b/src/python/pants/core/goals/fmt.py @@ -286,7 +286,8 @@ async def fmt_language(language_fmt_request: _LanguageFmtRequest) -> _LanguageFm c...
google__osv.dev-1021
Maven 'zero' versions causes errors when comparing Maven versions that are 'zero' (e.g. `0.0.0` and `0.0.0-X.Y.Z`) cause assertion errors when comparing with non-zero versions, because the comparisons assume there's always an initial token without a `.` or `-` 'prefix'. This seems to be causing some of the missing v...
[ { "content": "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
[ { "content": "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
diff --git a/osv/ecosystems/maven.py b/osv/ecosystems/maven.py index 2e16a56039d..a9ddb90f4ff 100644 --- a/osv/ecosystems/maven.py +++ b/osv/ecosystems/maven.py @@ -221,7 +221,7 @@ def from_string(cls, str_version): # Then, starting from the end of the version, the trailing "null" values # (0, "", "final", "g...
ethereum__web3.py-460
Add field name of formatter failure to apply_formatters_to_dict * Version: 3.x & 4.x * Python: 2.7/3.4/3.5 * OS: osx/linux/win ### What was wrong? When applying formatters to a dict, if one of the values fails, it's impossible to tell from the trace which one did. ### How can it be fixed? Catch ValueErr...
[ { "content": "from collections import (\n Iterable,\n Mapping,\n)\nimport sys\n\nfrom cytoolz.functoolz import (\n curry,\n compose,\n)\n\nfrom eth_utils import (\n is_string,\n to_list,\n to_dict,\n)\n\nfrom web3.utils.decorators import (\n reject_recursive_repeats,\n)\n\n\ndef hex_to_i...
[ { "content": "from collections import (\n Iterable,\n Mapping,\n)\nimport sys\n\nfrom cytoolz.functoolz import (\n curry,\n compose,\n)\n\nfrom eth_utils import (\n is_string,\n to_list,\n to_dict,\n)\n\nfrom web3.utils.decorators import (\n reject_recursive_repeats,\n)\n\n\ndef hex_to_i...
diff --git a/tests/core/utilities/test_formatters.py b/tests/core/utilities/test_formatters.py index ee86d000f4..3107c4bc25 100644 --- a/tests/core/utilities/test_formatters.py +++ b/tests/core/utilities/test_formatters.py @@ -2,6 +2,7 @@ import pytest from web3.utils.formatters import ( + apply_formatters_to_di...
tensorflow__addons-687
Time distributed WeightNormalization result in incompatible shape **System information** - OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04.4 LTS - TensorFlow version and how it was installed (source or binary): tensorflow-gpu 2.0.0, binary - TensorFlow-Addons version and how it was installed (s...
[ { "content": "# Copyright 2019 The TensorFlow 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\...
[ { "content": "# Copyright 2019 The TensorFlow 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\...
diff --git a/tensorflow_addons/layers/wrappers.py b/tensorflow_addons/layers/wrappers.py index badc6596df..5ba4d12fbc 100644 --- a/tensorflow_addons/layers/wrappers.py +++ b/tensorflow_addons/layers/wrappers.py @@ -62,7 +62,8 @@ def __init__(self, layer, data_init=True, **kwargs): def build(self, input_shape): ...
pulp__pulpcore-4968
Unawaited cache coroutine throws warnings We're seeing the following error on pulpcore 3.45.0: ``` /venv/lib/python3.9/site-packages/pulpcore/cache/cache.py:386: RuntimeWarning: coroutine 'AsyncCache.delete' was never awaited ```
[ { "content": "import enum\nimport json\nimport time\n\nfrom functools import wraps\n\nfrom django.http import HttpResponseRedirect, HttpResponse, FileResponse as ApiFileResponse\n\nfrom rest_framework.request import Request as ApiRequest\n\nfrom aiohttp.web import FileResponse, Response, HTTPSuccessful, Request...
[ { "content": "import enum\nimport json\nimport time\n\nfrom functools import wraps\n\nfrom django.http import HttpResponseRedirect, HttpResponse, FileResponse as ApiFileResponse\n\nfrom rest_framework.request import Request as ApiRequest\n\nfrom aiohttp.web import FileResponse, Response, HTTPSuccessful, Request...
diff --git a/CHANGES/4967.bugfix b/CHANGES/4967.bugfix new file mode 100644 index 0000000000..6f8cc82300 --- /dev/null +++ b/CHANGES/4967.bugfix @@ -0,0 +1,2 @@ +Fixed a warning that gets raised when cache is enabled: ``RuntimeWarning: coroutine +'AsyncCache.delete' was never awaited``. diff --git a/pulpcore/cache/cach...
lutris__lutris-3976
Lutris cannot find a submited file on `file:N/A` if it has brackets on its name ### Bug description While using `file: N/A:Please select the .zip archive.`, if the supplied file has a name that contains brackets, that is, the characters `[` and `]`, it will fail saying the file "does not exist", even if it does exist....
[ { "content": "\"\"\"Commands for installer scripts\"\"\"\nimport glob\nimport json\nimport multiprocessing\nimport os\nimport shlex\nimport shutil\nfrom gettext import gettext as _\nfrom pathlib import Path\n\nfrom gi.repository import GLib\n\nfrom lutris import runtime\nfrom lutris.cache import get_cache_path\...
[ { "content": "\"\"\"Commands for installer scripts\"\"\"\nimport glob\nimport json\nimport multiprocessing\nimport os\nimport shlex\nimport shutil\nfrom gettext import gettext as _\nfrom pathlib import Path\n\nfrom gi.repository import GLib\n\nfrom lutris import runtime\nfrom lutris.cache import get_cache_path\...
diff --git a/lutris/installer/commands.py b/lutris/installer/commands.py index c1a67b34ed..fe5bca2f4e 100644 --- a/lutris/installer/commands.py +++ b/lutris/installer/commands.py @@ -158,7 +158,10 @@ def extract(self, data): src_param = data.get("file") or data.get("src") filespec = self._get_file(src...
pymedusa__Medusa-5623
Show count over 1000 gives some issues. When you have db with more than 1000 shows the following issues arise: * displayShow page does not display the shows that are above 1000 count (when sorted "alphabetically") - so for example if "Still Game" is your `#1000` show the show "The Young Ones" does not show data o...
[ { "content": "# coding=utf-8\n\"\"\"Base module for request handlers.\"\"\"\nfrom __future__ import division\nfrom __future__ import unicode_literals\n\nimport base64\nimport collections\nimport json\nimport logging\nimport operator\nimport traceback\nfrom builtins import object\nfrom collections import Ordered...
[ { "content": "# coding=utf-8\n\"\"\"Base module for request handlers.\"\"\"\nfrom __future__ import division\nfrom __future__ import unicode_literals\n\nimport base64\nimport collections\nimport json\nimport logging\nimport operator\nimport traceback\nfrom builtins import object\nfrom collections import Ordered...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b90844edc..3b06532515 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - Fixed guessit exception when parsing release without title ([#5569](https://github.com/pymedusa/Medusa/pull/5569)) - Fixed Download Station BraceAdapter exception ([#5573](https://git...
plone__Products.CMFPlone-3360
Index location doesn't work for Dexterity content ## BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE) ### What I did: - I created a Dexterity type with the `location` field. - I created a `location` index of type ZCTextIndex in portal_catalog. - I created an object of the content type that had the `location` field....
[ { "content": "# -*- coding: utf-8 -*-\nfrom AccessControl import ClassSecurityInfo\nfrom AccessControl.PermissionRole import rolesForPermissionOn\nfrom AccessControl.Permissions import manage_zcatalog_entries as ManageZCatalogEntries # noqa\nfrom AccessControl.Permissions import search_zcatalog as SearchZCatal...
[ { "content": "# -*- coding: utf-8 -*-\nfrom AccessControl import ClassSecurityInfo\nfrom AccessControl.PermissionRole import rolesForPermissionOn\nfrom AccessControl.Permissions import manage_zcatalog_entries as ManageZCatalogEntries # noqa\nfrom AccessControl.Permissions import search_zcatalog as SearchZCatal...
diff --git a/Products/CMFPlone/CatalogTool.py b/Products/CMFPlone/CatalogTool.py index c85c0a8a1f..5606847b6f 100644 --- a/Products/CMFPlone/CatalogTool.py +++ b/Products/CMFPlone/CatalogTool.py @@ -276,9 +276,14 @@ def mime_type(obj): return aq_base(obj).getPrimaryField().getContentType(obj) -@indexer(Interfa...
nvaccess__nvda-9983
Routing cursor don't work <!-- Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files. Issues may be closed if the required information is not present. https://github.com/nvaccess/nvda/wiki/Github-issue-template-explanation-and-examples --> ### Ste...
[ { "content": "#brailleDisplayDrivers/papenmeier_serial.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n#Copyright (C) 2012-2017 Tobias Platen, Halim Sahin, Ali-Riza Ciftcioglu, NV Access Limited, Davy Kage...
[ { "content": "#brailleDisplayDrivers/papenmeier_serial.py\r\n#A part of NonVisual Desktop Access (NVDA)\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n#Copyright (C) 2012-2017 Tobias Platen, Halim Sahin, Ali-Riza Ciftcioglu, NV Access Limited, Davy Kage...
diff --git a/source/brailleDisplayDrivers/papenmeier_serial.py b/source/brailleDisplayDrivers/papenmeier_serial.py index a708f6b00b6..c542a66d3c5 100644 --- a/source/brailleDisplayDrivers/papenmeier_serial.py +++ b/source/brailleDisplayDrivers/papenmeier_serial.py @@ -182,8 +182,8 @@ def _handleKeyPresses(self): #calle...
geopandas__geopandas-2289
TST: test_value_counts breaking against pandas latest Recent CI builds on 38-dev.yaml are all failing due to geopandas/tests/test_pandas_methods.py::test_value_counts, which fails with the output: ``` ______________________________ test_value_counts _______________________________ 3536 [gw0] linux -- Python 3.8.12 ...
[ { "content": "import contextlib\nfrom distutils.version import LooseVersion\nimport importlib\nimport os\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nimport pyproj\nimport shapely\nimport shapely.geos\n\n\n# -----------------------------------------------------------------------------\n# pandas ...
[ { "content": "import contextlib\nfrom distutils.version import LooseVersion\nimport importlib\nimport os\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nimport pyproj\nimport shapely\nimport shapely.geos\n\n\n# -----------------------------------------------------------------------------\n# pandas ...
diff --git a/geopandas/_compat.py b/geopandas/_compat.py index e5ac045df7..000db2a602 100644 --- a/geopandas/_compat.py +++ b/geopandas/_compat.py @@ -19,6 +19,7 @@ PANDAS_GE_11 = str(pd.__version__) >= LooseVersion("1.1.0") PANDAS_GE_115 = str(pd.__version__) >= LooseVersion("1.1.5") PANDAS_GE_12 = str(pd.__version...
angr__angr-3624
Bug in SimEngineRDVEX: Some memory stores are ignored ### Description The `if.. elif` construct for handling stores fails to consider addresses which are bitvectors. As a result such stores are ignored and this results in an incomplete dependency graph. ### Steps to reproduce the bug This binary can be used to repro...
[ { "content": "from itertools import chain\nfrom typing import Optional, Iterable, Set, Union, TYPE_CHECKING\nimport logging\n\nimport pyvex\nimport claripy\nfrom cle import Symbol\n\nfrom ...storage.memory_mixins.paged_memory.pages.multi_values import MultiValues\nfrom ...engines.light import SimEngineLight, Si...
[ { "content": "from itertools import chain\nfrom typing import Optional, Iterable, Set, Union, TYPE_CHECKING\nimport logging\n\nimport pyvex\nimport claripy\nfrom cle import Symbol\n\nfrom ...storage.memory_mixins.paged_memory.pages.multi_values import MultiValues\nfrom ...engines.light import SimEngineLight, Si...
diff --git a/angr/analyses/reaching_definitions/engine_vex.py b/angr/analyses/reaching_definitions/engine_vex.py index ce9c42b8e82..6a679d3b979 100644 --- a/angr/analyses/reaching_definitions/engine_vex.py +++ b/angr/analyses/reaching_definitions/engine_vex.py @@ -218,6 +218,11 @@ def _store_core(self, addr: Iterable[U...
cupy__cupy-3335
`around` result is different compared to numpy ``` >>> np.__version__ '1.16.4' >>> np.around([2.5]) array([2.]) >>> cupy.__version__ '7.0.0a1' >>> cupy.around([2.5]) array([3.]) ``` NumPy seems to round to even.
[ { "content": "from cupy import core\nfrom cupy.core import fusion\nfrom cupy.math import ufunc\n\n\ndef around(a, decimals=0, out=None):\n \"\"\"Rounds to the given number of decimals.\n\n Args:\n a (cupy.ndarray): The source array.\n decimals (int): umber of decimal places to round to (defa...
[ { "content": "from cupy import core\nfrom cupy.core import fusion\nfrom cupy.math import ufunc\n\n\ndef around(a, decimals=0, out=None):\n \"\"\"Rounds to the given number of decimals.\n\n Args:\n a (cupy.ndarray): The source array.\n decimals (int): Number of decimal places to round to (def...
diff --git a/cupy/core/core.pyx b/cupy/core/core.pyx index 6ec11482018..674f9dfb87c 100644 --- a/cupy/core/core.pyx +++ b/cupy/core/core.pyx @@ -1902,17 +1902,19 @@ template<typename T> __device__ T pow10(long long n){ cdef _round_float = ''' if (in1 == 0) { - out0 = round(in0); + out0 = rint(in0); } else { ...
zulip__zulip-22505
Clean up /static/images/ directory To clean up the `/static/images/` directory and therefore make it easier to understand what images we have, we should: - [ ] Move 400art.svg, 500art.svg and timehout_hourglass.png into `/static/images/errors` - [ ] Move loader-black.svg, loader-white.svg, loading-ellipsis.svg and ...
[ { "content": "import os\nfrom dataclasses import dataclass, field\nfrom typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Sequence, Tuple\n\nfrom django.contrib.staticfiles.storage import staticfiles_storage\nfrom django.urls import URLResolver, path\nfrom django.utils.module_loading import impo...
[ { "content": "import os\nfrom dataclasses import dataclass, field\nfrom typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Sequence, Tuple\n\nfrom django.contrib.staticfiles.storage import staticfiles_storage\nfrom django.urls import URLResolver, path\nfrom django.utils.module_loading import impo...
diff --git a/static/html/5xx.html b/static/html/5xx.html index 7270824701305..164fd73e269f7 100644 --- a/static/html/5xx.html +++ b/static/html/5xx.html @@ -27,7 +27,7 @@ <div class="container"> <div class="row-fluid"> - <img src="/static/images/500art.svg" alt=""/> + ...
scrapy__scrapy-6334
'json' selector type not documented https://docs.scrapy.org/en/latest/topics/selectors.html `type defines the selector type, it can be "html", "xml" or None (default).` But my tests are now failing because it's returning `json` type for actual json docs now.
[ { "content": "\"\"\"\nXPath selectors based on lxml\n\"\"\"\n\nfrom typing import Any, Optional, Type, Union\n\nfrom parsel import Selector as _ParselSelector\n\nfrom scrapy.http import HtmlResponse, TextResponse, XmlResponse\nfrom scrapy.utils.python import to_bytes\nfrom scrapy.utils.response import get_base_...
[ { "content": "\"\"\"\nXPath selectors based on lxml\n\"\"\"\n\nfrom typing import Any, Optional, Type, Union\n\nfrom parsel import Selector as _ParselSelector\n\nfrom scrapy.http import HtmlResponse, TextResponse, XmlResponse\nfrom scrapy.utils.python import to_bytes\nfrom scrapy.utils.response import get_base_...
diff --git a/scrapy/selector/unified.py b/scrapy/selector/unified.py index aa9581fcd9b..e852aadc7e2 100644 --- a/scrapy/selector/unified.py +++ b/scrapy/selector/unified.py @@ -47,7 +47,7 @@ class Selector(_ParselSelector, object_ref): ``response`` isn't available. Using ``text`` and ``response`` together is ...
tensorflow__addons-2572
Documentation for Snake activation function is incorrect **System information** - OS Platform and Distribution (e.g., Linux Ubuntu 16.04): NA - TensorFlow version and how it was installed (source or binary): NA - TensorFlow-Addons version and how it was installed (source or binary): NA - Python version: NA - Is G...
[ { "content": "# Copyright 2020 The TensorFlow 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\...
[ { "content": "# Copyright 2020 The TensorFlow 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\...
diff --git a/tensorflow_addons/activations/snake.py b/tensorflow_addons/activations/snake.py index 057adde978..c96f389b76 100644 --- a/tensorflow_addons/activations/snake.py +++ b/tensorflow_addons/activations/snake.py @@ -25,7 +25,7 @@ def snake(x: types.TensorLike, frequency: types.Number = 1) -> tf.Tensor: Comp...
rasterio__rasterio-2062
Can't access requester pays buckets with `rio --aws-requester-pays info <url>` cli tool ## Expected behavior and actual behavior. Should be able to run something like this if correct AWS credentials are available ```bash rio --aws-requester-pays \ info \ s3://usgs-landsat/collection02/level-2/standard/oli-t...
[ { "content": "\"\"\"\nMain command group for Rasterio's CLI.\n\nSubcommands developed as a part of the Rasterio package have their own\nmodules under ``rasterio.rio`` (like ``rasterio/rio/info.py``) and are\nregistered in the 'rasterio.rio_commands' entry point group in\nRasterio's ``setup.py``:\n\n entry_po...
[ { "content": "\"\"\"\nMain command group for Rasterio's CLI.\n\nSubcommands developed as a part of the Rasterio package have their own\nmodules under ``rasterio.rio`` (like ``rasterio/rio/info.py``) and are\nregistered in the 'rasterio.rio_commands' entry point group in\nRasterio's ``setup.py``:\n\n entry_po...
diff --git a/rasterio/rio/main.py b/rasterio/rio/main.py index c7be62e46..7c1cf2c7e 100644 --- a/rasterio/rio/main.py +++ b/rasterio/rio/main.py @@ -92,7 +92,7 @@ def main_group( ctx.obj["verbosity"] = verbosity ctx.obj["aws_profile"] = aws_profile envopts = {"CPL_DEBUG": (verbosity > 2)} - if aws_pro...
scoutapp__scout_apm_python-340
SQLAlchemy executemany not detected in hooks In the Django ORM integration, we record `executemany` calls as the `SQL/Many` operation, but this is missing in the SQLAlchemy integration.
[ { "content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom sqlalchemy import event\n\nfrom scout_apm.core.tracked_request import TrackedRequest\n\n\ndef before_cursor_execute(conn, cursor, statement, parameters, context, executemany):\n tracked_re...
[ { "content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom sqlalchemy import event\n\nfrom scout_apm.core.tracked_request import TrackedRequest\n\n\ndef before_cursor_execute(conn, cursor, statement, parameters, context, executemany):\n if execute...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c263b56..9db38c2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ library](https://wrapt.readthedocs.io/en/latest/) which is more transparent ([PR #324](https://github.com/scoutapp/scout_apm_python/pull/324)). +### Fixed + +- Track SQL Alchemy `execu...
conda__conda-build-1348
Conda convert to windows does not create `Scripts/*-script.py` With the older versions of `conda-build`, converting a linux package to `win-64` created `Scripts/foobar-script.py` in addition to `Scripts/foobar.bat` for an entry point `foobar`. However, with the latest version of `conda-build` (v2.0.1), those files are ...
[ { "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\n\"\"\"\nTools for converting conda packages\n\n\"\"\"\nfrom __fut...
[ { "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\n\"\"\"\nTools for converting conda packages\n\n\"\"\"\nfrom __fut...
diff --git a/conda_build/convert.py b/conda_build/convert.py index 04ecb573e9..063c7bd2f1 100644 --- a/conda_build/convert.py +++ b/conda_build/convert.py @@ -269,8 +269,9 @@ def get_pure_py_file_map(t, platform): file_map[oldpath] = None file_map[newpath] = newmember ...