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
ansible__ansible-32912
packet_device not working with ipxe_script_url set ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME modules/cloud/packet ##### ANSIBLE VERSION ``` ansible 2.4.1.0 config file = /home/krist/.ansible.cfg configured module search path = [u'/home/krist/.ansible/plugins/modules', u'/usr/share/ansibl...
[ { "content": "#!/usr/bin/python\n# (c) 2016, Tomas Karasek <tom.to.the.k@gmail.com>\n# (c) 2016, Matt Baldwin <baldwin@stackpointcloud.com>\n# (c) 2016, Thibaud Morel l'Horset <teebes@gmail.com>\n#\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ i...
[ { "content": "#!/usr/bin/python\n# (c) 2016, Tomas Karasek <tom.to.the.k@gmail.com>\n# (c) 2016, Matt Baldwin <baldwin@stackpointcloud.com>\n# (c) 2016, Thibaud Morel l'Horset <teebes@gmail.com>\n#\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ i...
diff --git a/lib/ansible/modules/cloud/packet/packet_device.py b/lib/ansible/modules/cloud/packet/packet_device.py index b2879cb04a2c49..3ae8065e42e26b 100644 --- a/lib/ansible/modules/cloud/packet/packet_device.py +++ b/lib/ansible/modules/cloud/packet/packet_device.py @@ -458,7 +458,9 @@ def create_single_device(modu...
open-telemetry__opentelemetry-python-1813
OpenTelemetry distro as a default distro for OpenTelemetry Instrumentation The `opentelemetry-instrumentation` auto instrumentation doesn't work without installing `opentelemetry-distro` as the components initialisation is done in distro package. How does a regular user know about this and shouldn't openetemetry distro...
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
diff --git a/docs/examples/auto-instrumentation/README.rst b/docs/examples/auto-instrumentation/README.rst index 9298c9bef2f..23fb47b3964 100644 --- a/docs/examples/auto-instrumentation/README.rst +++ b/docs/examples/auto-instrumentation/README.rst @@ -45,7 +45,7 @@ Manually instrumented server return "ser...
translate__translate-3683
setcontext is not working correctly for mounit Calling setcontext on mounit does currently nothing as it inherits code from base class: ``` python def setcontext(self, context): """Set the message context""" pass ``` I'd expect it to properly update context as it does for other storages.
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2007 Zuza Software Foundation\n#\n# the function \"serialize\" was derived from Python v2.4\n# (Tools/i18n/msgfmt.py - function \"generate\"):\n# Written by Martin v. Löwis <loewis@informatik.hu-berlin.de>\n# Copyright (c) 2001, 2002, 2003, 2004, 2...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2007 Zuza Software Foundation\n#\n# the function \"serialize\" was derived from Python v2.4\n# (Tools/i18n/msgfmt.py - function \"generate\"):\n# Written by Martin v. Löwis <loewis@informatik.hu-berlin.de>\n# Copyright (c) 2001, 2002, 2003, 2004, 2...
diff --git a/translate/storage/mo.py b/translate/storage/mo.py index ad20515162..2a538fcc72 100644 --- a/translate/storage/mo.py +++ b/translate/storage/mo.py @@ -118,6 +118,9 @@ def getcontext(self): return None return "".join(self.msgctxt) + def setcontext(self, context): + self.msgc...
mit-ll-responsible-ai__hydra-zen-615
Bump actions/upload-artifact from 3 to 4 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's releases</a>.</em></p> <blockquote> <h2...
[ { "content": "# Copyright (c) 2023 Massachusetts Institute of Technology\n# SPDX-License-Identifier: MIT\n# pyright: strict\nfrom dataclasses import MISSING\nfrom functools import partial\nfrom typing import TYPE_CHECKING, Any, Type, Union\n\nfrom typing_extensions import TypeGuard\n\nfrom hydra_zen.funcs impor...
[ { "content": "# Copyright (c) 2023 Massachusetts Institute of Technology\n# SPDX-License-Identifier: MIT\n# pyright: strict\nfrom dataclasses import MISSING\nfrom functools import partial\nfrom typing import TYPE_CHECKING, Any, Type, Union\n\nfrom typing_extensions import TypeGuard\n\nfrom hydra_zen.funcs impor...
diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml index 578201ed8..2c220e552 100644 --- a/.github/workflows/pypi_publish.yml +++ b/.github/workflows/pypi_publish.yml @@ -22,7 +22,7 @@ jobs: pip install build python -m build - name: Upload artifacts - uses: ...
kivy__python-for-android-2399
Pymunk,kivy apk crashing on Android 5.1 <!-- The issue tracker is a tool to address bugs NOT a support platform. Please use the Discord community or Stack Overflow for support questions, more information at https://github.com/kivy/python-for-android#support --> ### Checklist - [ ] the issue is indeed a bug a...
[ { "content": "from pythonforandroid.recipe import CompiledComponentsPythonRecipe\n\n\nclass PymunkRecipe(CompiledComponentsPythonRecipe):\n name = \"pymunk\"\n version = \"6.0.0\"\n url = \"https://pypi.python.org/packages/source/p/pymunk/pymunk-{version}.zip\"\n depends = [\"cffi\", \"setuptools\"]...
[ { "content": "from pythonforandroid.recipe import CompiledComponentsPythonRecipe\n\n\nclass PymunkRecipe(CompiledComponentsPythonRecipe):\n name = \"pymunk\"\n version = \"6.0.0\"\n url = \"https://pypi.python.org/packages/source/p/pymunk/pymunk-{version}.zip\"\n depends = [\"cffi\", \"setuptools\"]...
diff --git a/pythonforandroid/recipes/pymunk/__init__.py b/pythonforandroid/recipes/pymunk/__init__.py index bf7cb5541c..a982098f26 100644 --- a/pythonforandroid/recipes/pymunk/__init__.py +++ b/pythonforandroid/recipes/pymunk/__init__.py @@ -10,7 +10,8 @@ class PymunkRecipe(CompiledComponentsPythonRecipe): def ...
hpcaitech__ColossalAI-2777
[tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests [BUG]: Wrong import in `zero/sharded_optim/_utils.py` ### 🐛 Describe the bug In issue #2774 , thanks @malfet for pointing out that we should not use `torch._six` to import `inf` and use `torch` to import `inf` instead, however, the...
[ { "content": "import math\nfrom typing import Optional\n\nimport torch\nimport torch.distributed as dist\nfrom torch.six import inf\nfrom torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors\n\nfrom colossalai.tensor import ColoParameter\nfrom colossalai.utils import is_model_parallel_parameter\...
[ { "content": "import math\nfrom typing import Optional\n\nimport torch\nimport torch.distributed as dist\nfrom torch import inf\nfrom torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors\n\nfrom colossalai.tensor import ColoParameter\nfrom colossalai.utils import is_model_parallel_parameter\n\n\...
diff --git a/colossalai/zero/sharded_optim/_utils.py b/colossalai/zero/sharded_optim/_utils.py index 68928b232660..9ca2fdf5aa06 100644 --- a/colossalai/zero/sharded_optim/_utils.py +++ b/colossalai/zero/sharded_optim/_utils.py @@ -3,7 +3,7 @@ import torch import torch.distributed as dist -from torch.six import inf ...
systemd__mkosi-1956
[Meta] declare a policy about adding new distributions Before people start creating issues asking to support their favorite distribution, I think that mkosi should declare its policy regarding new distributions support. The policy should state in which terms (if any) you will be willing to support a new distribution...
[ { "content": "# SPDX-License-Identifier: LGPL-2.1+\n\nimport enum\nimport importlib\nimport re\nfrom collections.abc import Sequence\nfrom typing import TYPE_CHECKING, Optional, cast\n\nfrom mkosi.architecture import Architecture\nfrom mkosi.util import StrEnum, read_os_release\n\nif TYPE_CHECKING:\n from mk...
[ { "content": "# SPDX-License-Identifier: LGPL-2.1+\n\nimport enum\nimport importlib\nimport re\nfrom collections.abc import Sequence\nfrom typing import TYPE_CHECKING, Optional, cast\n\nfrom mkosi.architecture import Architecture\nfrom mkosi.util import StrEnum, read_os_release\n\nif TYPE_CHECKING:\n from mk...
diff --git a/docs/distribution-policy.md b/docs/distribution-policy.md new file mode 100644 index 000000000..458b5d57d --- /dev/null +++ b/docs/distribution-policy.md @@ -0,0 +1,32 @@ +# Adding new distributions + +Merging support for a new distribution in mkosi depends on a few +factors. Not all of these are required ...
activeloopai__deeplake-1447
[BUG] hub.read failing with h265 videos Hi, hub.read() fails to decompress h265 videos right. I get unreadable videos with a higher number of frames (x10). When converting it to h264 first, hub.read() seems to work fine.
[ { "content": "import hub\nfrom hub.util.exceptions import (\n SampleCompressionError,\n SampleDecompressionError,\n UnsupportedCompressionError,\n CorruptedSampleError,\n)\nfrom hub.compression import (\n get_compression_type,\n BYTE_COMPRESSION,\n IMAGE_COMPRESSION,\n VIDEO_COMPRESSION,...
[ { "content": "import hub\nfrom hub.util.exceptions import (\n SampleCompressionError,\n SampleDecompressionError,\n UnsupportedCompressionError,\n CorruptedSampleError,\n)\nfrom hub.compression import (\n get_compression_type,\n BYTE_COMPRESSION,\n IMAGE_COMPRESSION,\n VIDEO_COMPRESSION,...
diff --git a/hub/core/compression.py b/hub/core/compression.py index b2bff7a6d1..52528e9d70 100644 --- a/hub/core/compression.py +++ b/hub/core/compression.py @@ -827,7 +827,7 @@ def _get_video_info(file: Union[bytes, memoryview, str]) -> dict: "-select_streams", "v:0", "-show_entries", - ...
plone__Products.CMFPlone-690
adding site with default language 'de-at' breaks With current Plone 5 beta 1 and the merged language control panel, adding a site with a language like 'de-at' breaks and gives the following traceback: ``` 2015-04-01 20:25:30 ERROR Zope.SiteErrorLog 1427912730.490.962488456232 http://localhost:8888/@@plone-addsite Trac...
[ { "content": "# -*- coding: utf-8 -*-\nfrom plone.supermodel import model\nfrom Products.CMFPlone import PloneMessageFactory as _ # NOQA\nfrom Products.CMFPlone.utils import validate_json\nfrom basetool import IPloneBaseTool\nfrom plone.locking.interfaces import ILockSettings\nfrom zope import schema\nfrom zop...
[ { "content": "# -*- coding: utf-8 -*-\nfrom plone.supermodel import model\nfrom Products.CMFPlone import PloneMessageFactory as _ # NOQA\nfrom Products.CMFPlone.utils import validate_json\nfrom basetool import IPloneBaseTool\nfrom plone.locking.interfaces import ILockSettings\nfrom zope import schema\nfrom zop...
diff --git a/CHANGES.rst b/CHANGES.rst index 5cf42666d3..9e7842d370 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,9 @@ Changelog 5.0b3 (unreleased) ------------------ +- Fix adding a new Plone site with country specific language. Refs #411. + [jaroel] + - fix plone-logged-in bundle not using global jquery...
netbox-community__netbox-1403
Device interface shows twice on IP Addresses page Python version: 2.7.5 NetBox version: 2.1.2 On the "IP addresses" page the device interface is showing up in both the "Device" column and the Interface Column. I am able to replicate this issue with any link to the "IP Addresses" page. I dont see any purpose in ...
[ { "content": "from __future__ import unicode_literals\n\nimport django_tables2 as tables\nfrom django_tables2.utils import Accessor\n\nfrom utilities.tables import BaseTable, ToggleColumn\nfrom .models import Aggregate, IPAddress, Prefix, RIR, Role, VLAN, VLANGroup, VRF\n\n\nRIR_UTILIZATION = \"\"\"\n<div class...
[ { "content": "from __future__ import unicode_literals\n\nimport django_tables2 as tables\nfrom django_tables2.utils import Accessor\n\nfrom utilities.tables import BaseTable, ToggleColumn\nfrom .models import Aggregate, IPAddress, Prefix, RIR, Role, VLAN, VLANGroup, VRF\n\n\nRIR_UTILIZATION = \"\"\"\n<div class...
diff --git a/netbox/ipam/tables.py b/netbox/ipam/tables.py index 65ab5b2e407..af82042dd00 100644 --- a/netbox/ipam/tables.py +++ b/netbox/ipam/tables.py @@ -80,7 +80,6 @@ IPADDRESS_DEVICE = """ {% if record.interface %} <a href="{{ record.interface.device.get_absolute_url }}">{{ record.interface.device }}</a> - ...
google__flax-628
After update from 0.2.0: AttributeError: module 'jax.core' has no attribute 'eval_context' After updating from flax 0.2.0 to flax 0.2.2 I get the above error message. Downgrading to 0.2.0 solves this, so the error source is located. I'm working with the now deprecated flax.nn package if backward-compatibility might be ...
[ { "content": "# Copyright 2020 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap...
[ { "content": "# Copyright 2020 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap...
diff --git a/setup.py b/setup.py index 58bfe451a..7a6cf9292 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ install_requires = [ "numpy>=1.12", - "jax>=0.1.59", + "jax>=0.1.77", "matplotlib", # only needed for tensorboard export "dataclasses;python_version<'3.7'", # will only install on ...
django-haystack__django-haystack-1831
Update extras_require in setup.py to support Elasticsearch 7 Pipenv failed to generate lock file with `elasticsearch>=7.0.0` due to the bounded version in `setup.py`. Should adjust bounded version in `extras_require` so that `Pipfile.lock` can be generated ![](https://user-images.githubusercontent.com/16464044/14...
[ { "content": "#!/usr/bin/env python\nfrom setuptools import setup\n\ninstall_requires = [\"Django>=2.2\"]\n\ntests_require = [\n \"pysolr>=3.7.0\",\n \"whoosh>=2.5.4,<3.0\",\n \"python-dateutil\",\n \"geopy==2.0.0\",\n \"nose\",\n \"coverage\",\n \"requests\",\n]\n\nsetup(\n name=\"djang...
[ { "content": "#!/usr/bin/env python\nfrom setuptools import setup\n\ninstall_requires = [\"Django>=2.2\"]\n\ntests_require = [\n \"pysolr>=3.7.0\",\n \"whoosh>=2.5.4,<3.0\",\n \"python-dateutil\",\n \"geopy==2.0.0\",\n \"nose\",\n \"coverage\",\n \"requests\",\n]\n\nsetup(\n name=\"djang...
diff --git a/setup.py b/setup.py index 6033e8dfd..3224ed2a1 100644 --- a/setup.py +++ b/setup.py @@ -55,7 +55,7 @@ install_requires=install_requires, tests_require=tests_require, extras_require={ - "elasticsearch": ["elasticsearch>=5,<6"], + "elasticsearch": ["elasticsearch>=5,<8"], },...
Gallopsled__pwntools-1660
SSL Timeout Error immediately when switching to interactive #### PoC ``` from pwn import * r = remote('google.com', 443, ssl=True) r.interactive() r.close() ``` It immediately results in: ``` [+] Opening connection to google.com on port 443: Done [*] Switching to interactive mode Exception in thread Thread-2...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\n\nimport errno\nimport select\nimport six\nimport socket\n\nfrom pwnlib.log import getLogger\nfrom pwnlib.tubes.tube import tube\n\nlog = getLogger(__name__)\n\nclass sock(tube):\n \"\"\"Base type used for :class:`.tubes.r...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\n\nimport errno\nimport select\nimport six\nimport socket\n\nfrom pwnlib.log import getLogger\nfrom pwnlib.tubes.tube import tube\n\nlog = getLogger(__name__)\n\nclass sock(tube):\n \"\"\"Base type used for :class:`.tubes.r...
diff --git a/pwnlib/tubes/sock.py b/pwnlib/tubes/sock.py index f25419836..f2a4adf54 100644 --- a/pwnlib/tubes/sock.py +++ b/pwnlib/tubes/sock.py @@ -48,6 +48,8 @@ def recv_raw(self, numb, *a): raise EOFError elif e.errno == errno.EINTR: continue + ...
pymodbus-dev__pymodbus-1443
StartAsyncSerialServer doesn't work pymodbus version 3.2 ### Discussed in https://github.com/pymodbus-dev/pymodbus/discussions/1433 <sup>Originally posted by **dlmoffett** March 13, 2023</sup> ### Versions - Python: 3.9 - OS: Windows - Pymodbus: 3.2.0 - Modbus Hardware (if used): USB to RS458 ### Pymodbu...
[ { "content": "\"\"\"Implementation of a Threaded Modbus Server.\"\"\"\n# pylint: disable=missing-type-doc\nimport asyncio\nimport ssl\nimport time\nimport traceback\nfrom typing import Union\n\nfrom pymodbus.client.serial_asyncio import create_serial_connection\nfrom pymodbus.constants import Defaults\nfrom pym...
[ { "content": "\"\"\"Implementation of a Threaded Modbus Server.\"\"\"\n# pylint: disable=missing-type-doc\nimport asyncio\nimport ssl\nimport time\nimport traceback\nfrom typing import Union\n\nfrom pymodbus.client.serial_asyncio import create_serial_connection\nfrom pymodbus.constants import Defaults\nfrom pym...
diff --git a/pymodbus/server/async_io.py b/pymodbus/server/async_io.py index 11024fc9f..ce78ec446 100644 --- a/pymodbus/server/async_io.py +++ b/pymodbus/server/async_io.py @@ -1225,6 +1225,7 @@ async def StartAsyncSerialServer( # pylint: disable=invalid-name,dangerous-defa server = ModbusSerialServer( c...
gratipay__gratipay.com-2699
support@gittip.com still linked several places Should be support@gratipay.com, right? ;-)
[ { "content": "\"\"\"\nThis module contains exceptions shared across application code.\n\"\"\"\n\nfrom __future__ import print_function, unicode_literals\n\n\nclass ProblemChangingUsername(Exception):\n def __str__(self):\n return self.msg.format(self.args[0])\n\nclass UsernameIsEmpty(ProblemChangingUs...
[ { "content": "\"\"\"\nThis module contains exceptions shared across application code.\n\"\"\"\n\nfrom __future__ import print_function, unicode_literals\n\n\nclass ProblemChangingUsername(Exception):\n def __str__(self):\n return self.msg.format(self.args[0])\n\nclass UsernameIsEmpty(ProblemChangingUs...
diff --git a/gratipay/exceptions.py b/gratipay/exceptions.py index 9e1bd1d340..9695ad9ef4 100644 --- a/gratipay/exceptions.py +++ b/gratipay/exceptions.py @@ -30,7 +30,7 @@ def __str__(self): return self.msg class HasBigTips(ProblemChangingNumber): - msg = "You receive tips too large for an individual. P...
getpelican__pelican-2065
Quickstart locale error: 'NoneType' object has no attribute 'split' Pelican version: 594b9c96 (installed with `pip install -e "git+https://github.com/getpelican/pelican.git#egg=pelican"`) Python: 2.7.12 Windows x64 (within a virtual environment) Using: > blinker (1.4) docutils (0.12) feedgenerator (1.9) Jinja2 (2...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals\n\nimport argparse\nimport codecs\nimport locale\nimport os\nimport string\nimport sys\n\nimport pytz\n\ntry:\n import tzlocal\n _DEFAULT_TIMEZONE = tzlocal.get_localzone().zone\nexcept:\n...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function, unicode_literals\n\nimport argparse\nimport codecs\nimport locale\nimport os\nimport string\nimport sys\n\nimport pytz\n\ntry:\n import tzlocal\n _DEFAULT_TIMEZONE = tzlocal.get_localzone().zone\nexcept:\n...
diff --git a/pelican/tools/pelican_quickstart.py b/pelican/tools/pelican_quickstart.py index 6b4eb5a56..ecbc35103 100755 --- a/pelican/tools/pelican_quickstart.py +++ b/pelican/tools/pelican_quickstart.py @@ -21,6 +21,8 @@ from pelican import __version__ +if (sys.version_info.major == 2): + locale.setlocale(loc...
aio-libs__aiohttp-4057
TypeError: 'ABCMeta' aiohttp==3.6.0, Python 3.6.9 ## Long story short Cant import aiohttp pip freeze gives: aiohttp==3.6.0 python3 version: Python 3.6.9 import aiohttp Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.6/site-packages/aiohttp/__init__.py...
[ { "content": "import codecs\nimport os\nimport pathlib\nimport re\nimport sys\nfrom distutils.command.build_ext import build_ext\nfrom distutils.errors import (CCompilerError, DistutilsExecError,\n DistutilsPlatformError)\n\nfrom setuptools import Extension, setup\n\n\nif sys.versio...
[ { "content": "import codecs\nimport os\nimport pathlib\nimport re\nimport sys\nfrom distutils.command.build_ext import build_ext\nfrom distutils.errors import (CCompilerError, DistutilsExecError,\n DistutilsPlatformError)\n\nfrom setuptools import Extension, setup\n\n\nif sys.versio...
diff --git a/CHANGES/4057.bugfix b/CHANGES/4057.bugfix new file mode 100644 index 00000000000..990694930eb --- /dev/null +++ b/CHANGES/4057.bugfix @@ -0,0 +1 @@ +Update multidict requirement to >= 4.5 diff --git a/setup.py b/setup.py index 6d87f90b991..2cff742fd67 100644 --- a/setup.py +++ b/setup.py @@ -78,7 +78,7 @@ ...
falconry__falcon-1946
Deprecate falcon.api_helpers See https://github.com/falconry/falcon/issues/1902. Starting with 3.1, mark `falcon.api_helpers` as deprecated. We could employ module-level `__getattr__` or redecorate re-imported functions.
[ { "content": "from .app_helpers import * # NOQA\n\n# TODO deprecate\n# import warnings\n# from .util.deprecation import DeprecatedWarning\n\n# warnings.warn('The api_helpers module was renamed to app_helpers.', DeprecatedWarning)\n", "path": "falcon/api_helpers.py" } ]
[ { "content": "import warnings\n\nfrom .app_helpers import * # NOQA\nfrom .util.deprecation import DeprecatedWarning\n\nwarnings.warn('The api_helpers module was renamed to app_helpers.', DeprecatedWarning)\n", "path": "falcon/api_helpers.py" } ]
diff --git a/falcon/api_helpers.py b/falcon/api_helpers.py index 3093856e1..23328b347 100644 --- a/falcon/api_helpers.py +++ b/falcon/api_helpers.py @@ -1,7 +1,6 @@ -from .app_helpers import * # NOQA +import warnings -# TODO deprecate -# import warnings -# from .util.deprecation import DeprecatedWarning +from .app_h...
ansible-collections__community.aws-389
UnboundLocalError in sqs_queue <!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY Copied the "Create FIFO queue" exam...
[ { "content": "#!/usr/bin/python\n# Copyright: Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: sqs_queue\nversion_added: 1...
[ { "content": "#!/usr/bin/python\n# Copyright: Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: sqs_queue\nversion_added: 1...
diff --git a/changelogs/fragments/389-sqs-queue-UnboundLocalError.yml b/changelogs/fragments/389-sqs-queue-UnboundLocalError.yml new file mode 100644 index 00000000000..8b1b371428f --- /dev/null +++ b/changelogs/fragments/389-sqs-queue-UnboundLocalError.yml @@ -0,0 +1,2 @@ +bugfixes: +- sqs_queue - fix UnboundLocalErro...
roboflow__supervision-430
Fix `sv.ByteTrack.tracker_id` return value when `sv.Detections` is empty ### Bug When `sv.Detections` is empty (`len(detections) == 0`) `sv.ByteTrack` returns `tracker_id` equal `None`. Correct that behavior, make it more consistent, and return `np.array([], dtype=int)`. ### Fix Add `else` statement here: http...
[ { "content": "from typing import List, Tuple\n\nimport numpy as np\n\nfrom supervision.detection.core import Detections\nfrom supervision.tracker.byte_tracker import matching\nfrom supervision.tracker.byte_tracker.basetrack import BaseTrack, TrackState\nfrom supervision.tracker.byte_tracker.kalman_filter import...
[ { "content": "from typing import List, Tuple\n\nimport numpy as np\n\nfrom supervision.detection.core import Detections\nfrom supervision.tracker.byte_tracker import matching\nfrom supervision.tracker.byte_tracker.basetrack import BaseTrack, TrackState\nfrom supervision.tracker.byte_tracker.kalman_filter import...
diff --git a/supervision/tracker/byte_tracker/core.py b/supervision/tracker/byte_tracker/core.py index 466b587ea..34a901385 100644 --- a/supervision/tracker/byte_tracker/core.py +++ b/supervision/tracker/byte_tracker/core.py @@ -249,6 +249,8 @@ def update_with_detections(self, detections: Detections) -> Detections: ...
safe-global__safe-config-service-23
Set port numbers in docker compose via environment variables To provide more flexibility when setting up the ports for a given environment, we should not use static ports in `docker-compose`. Instead those ports should be extracted to the `.env` file.
[ { "content": "import multiprocessing\nimport os\nfrom distutils.util import strtobool\n\nbind = f\"0.0.0.0:{os.getenv('PORT', '8000')}\"\naccesslog = \"-\"\n\nworkers = int(os.getenv(\"WEB_CONCURRENCY\", multiprocessing.cpu_count() * 2))\nthreads = int(os.getenv(\"PYTHON_MAX_THREADS\", 1))\n\nreload = bool(strt...
[ { "content": "import multiprocessing\nimport os\nfrom distutils.util import strtobool\n\nbind = f\"0.0.0.0:{os.getenv('GUNICORN_BIND_PORT', '8000')}\"\naccesslog = \"-\"\n\nworkers = int(os.getenv(\"WEB_CONCURRENCY\", multiprocessing.cpu_count() * 2))\nthreads = int(os.getenv(\"PYTHON_MAX_THREADS\", 1))\n\nrelo...
diff --git a/.env.example b/.env.example index 00e52f0e..77bb7992 100644 --- a/.env.example +++ b/.env.example @@ -28,7 +28,14 @@ ALLOWED_HOSTS=".localhost,127.0.0.1,[::1]" # Be warned that if you change this value you'll need to change 8000 in both # your Dockerfile and in a few spots in docker-compose.yml due to th...
freqtrade__freqtrade-2082
plot_dataframe.py ## Step 1: Have you search for this issue before posting it? Couldn't find similar issue, so starting a new issue. ## Step 2: Describe your environment * Python Version: Python 3.6.8 * CCXT version: ccxt==1.18.992 * Branch: Master * Last Commit ID: b8713a515e960f1ffadcf1c7ee62c4be...
[ { "content": "\"\"\"\nHelpers when analyzing backtest data\n\"\"\"\nimport logging\nfrom pathlib import Path\nfrom typing import Dict\n\nimport numpy as np\nimport pandas as pd\nimport pytz\n\nfrom freqtrade import persistence\nfrom freqtrade.misc import json_load\nfrom freqtrade.persistence import Trade\n\nlog...
[ { "content": "\"\"\"\nHelpers when analyzing backtest data\n\"\"\"\nimport logging\nfrom pathlib import Path\nfrom typing import Dict\n\nimport numpy as np\nimport pandas as pd\nimport pytz\n\nfrom freqtrade import persistence\nfrom freqtrade.misc import json_load\nfrom freqtrade.persistence import Trade\n\nlog...
diff --git a/freqtrade/data/btanalysis.py b/freqtrade/data/btanalysis.py index f2356c34b0f..5865d56a7fb 100644 --- a/freqtrade/data/btanalysis.py +++ b/freqtrade/data/btanalysis.py @@ -30,7 +30,7 @@ def load_backtest_data(filename) -> pd.DataFrame: filename = Path(filename) if not filename.is_file(): - ...
projectmesa__mesa-1844
jupyterviz checkbox input change is not propagated
[ { "content": "import threading\n\nimport matplotlib.pyplot as plt\nimport networkx as nx\nimport reacton.ipywidgets as widgets\nimport solara\nfrom matplotlib.figure import Figure\nfrom matplotlib.ticker import MaxNLocator\n\nimport mesa\n\n# Avoid interactive backend\nplt.switch_backend(\"agg\")\n\n\n@solara.c...
[ { "content": "import threading\n\nimport matplotlib.pyplot as plt\nimport networkx as nx\nimport reacton.ipywidgets as widgets\nimport solara\nfrom matplotlib.figure import Figure\nfrom matplotlib.ticker import MaxNLocator\n\nimport mesa\n\n# Avoid interactive backend\nplt.switch_backend(\"agg\")\n\n\n@solara.c...
diff --git a/mesa/experimental/jupyter_viz.py b/mesa/experimental/jupyter_viz.py index 3408ba11c6a..de207bf2926 100644 --- a/mesa/experimental/jupyter_viz.py +++ b/mesa/experimental/jupyter_viz.py @@ -228,6 +228,7 @@ def change_handler(value, name=name): elif input_type == "Checkbox": solara.Check...
hylang__hy-885
Exclamation mark ! is not mangled I noticed that https://github.com/hylang/hyway/blob/master/conway.hy uses "!" in `set!` and `get!`, but Hy doesn't mangle "!" into something else. The variable is added to the module as-is. That means it'll be hard to reach it from normal Python code. Also, hy2py on Hy code with `se...
[ { "content": "# Copyright (c) 2013 Nicolas Dandrimont <nicolas.dandrimont@crans.org>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without restriction, including without lim...
[ { "content": "# Copyright (c) 2013 Nicolas Dandrimont <nicolas.dandrimont@crans.org>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without restriction, including without lim...
diff --git a/hy/lex/parser.py b/hy/lex/parser.py index a63be3e33..22aaf26b3 100644 --- a/hy/lex/parser.py +++ b/hy/lex/parser.py @@ -308,6 +308,9 @@ def mangle(p): if p.endswith("?") and p != "?": p = "is_%s" % (p[:-1]) + if p.endswith("!") and p != "!": + p = "%s_bang" % (p[:-...
mozilla__bugbug-598
Use new 'everchanged' operator instead of changedafter 1970 Depends on https://bugzilla.mozilla.org/show_bug.cgi?id=1546624.
[ { "content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport argparse\nimport csv\nimport sys\n\nimport requests\n\n\ndef p...
[ { "content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport argparse\nimport csv\nimport sys\n\nimport requests\n\n\ndef p...
diff --git a/scripts/get_type_labels.py b/scripts/get_type_labels.py index 83d482c571..a7a179d95a 100644 --- a/scripts/get_type_labels.py +++ b/scripts/get_type_labels.py @@ -27,8 +27,7 @@ def main(args): "order": "bug_id", "j_top": "OR", "f1": "bug_type", - "o1": "changedafter", - ...
nipy__nipype-2827
Python 3.4 tests failing on Travis ### Summary Looks like either a pytest or a pytest-xdist problem. Perhaps one of them stopped supporting 3.4. From [#6217.17](https://travis-ci.org/nipy/nipype/jobs/467617939): ``` $ py.test -v --cov nipype --cov-config .coveragerc --cov-report xml:cov.xml -c nipype/pytest.i...
[ { "content": "\"\"\" This file contains defines parameters for nipy that we use to fill\nsettings in setup.py, the nipy top-level docstring, and for building the\ndocs. In setup.py in particular, we exec this file, so it cannot import nipy\n\"\"\"\nfrom __future__ import (print_function, division, unicode_lite...
[ { "content": "\"\"\" This file contains defines parameters for nipy that we use to fill\nsettings in setup.py, the nipy top-level docstring, and for building the\ndocs. In setup.py in particular, we exec this file, so it cannot import nipy\n\"\"\"\nfrom __future__ import (print_function, division, unicode_lite...
diff --git a/nipype/info.py b/nipype/info.py index 1cf361c40c..be6edb713f 100644 --- a/nipype/info.py +++ b/nipype/info.py @@ -108,7 +108,7 @@ def get_nipype_gitversion(): SCIPY_MIN_VERSION = '0.14' TRAITS_MIN_VERSION = '4.6' DATEUTIL_MIN_VERSION = '2.2' -PYTEST_MIN_VERSION = '3.0' +PYTEST_MIN_VERSION = '3.6' FUTUR...
Chia-Network__chia-blockchain-14904
[Bug] Windows CLI waits for passphrase input but no longer prompts for it in 1.7.1 ### What happened? When using the CLI to start the wallet (or indeed any service) - the prompt `(Unlock Keyring) Passphrase:` is no longer shown until *after* the passphrase is entered. The daemon will display `Starting daemon` and t...
[ { "content": "from __future__ import annotations\n\nimport os\nimport sys\nimport time\nfrom getpass import getpass\nfrom io import TextIOWrapper\nfrom pathlib import Path\nfrom typing import Any, Dict, Optional, Tuple\n\nimport colorama\n\nfrom chia.daemon.client import acquire_connection_to_daemon\nfrom chia....
[ { "content": "from __future__ import annotations\n\nimport os\nimport sys\nimport time\nfrom getpass import getpass\nfrom io import TextIOWrapper\nfrom pathlib import Path\nfrom typing import Any, Dict, Optional, Tuple\n\nimport colorama\n\nfrom chia.daemon.client import acquire_connection_to_daemon\nfrom chia....
diff --git a/chia/cmds/passphrase_funcs.py b/chia/cmds/passphrase_funcs.py index 98c5fe243c8c..69ca4f14059e 100644 --- a/chia/cmds/passphrase_funcs.py +++ b/chia/cmds/passphrase_funcs.py @@ -91,7 +91,7 @@ def verify_passphrase_meets_requirements( def prompt_for_passphrase(prompt: str) -> str: if sys.platform ==...
ivy-llc__ivy-18252
broadcast_to
[ { "content": "# global\nimport ivy\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\nfrom ivy.func_wrapper import (\n with_unsupported_dtypes,\n with_supported_dtypes,\n)\n\n\n@to_ivy_arrays_and_back\ndef reshape(x, shape):\n return ivy.reshape(x, shape)\n\n\n...
[ { "content": "# global\nimport ivy\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\nfrom ivy.func_wrapper import (\n with_unsupported_dtypes,\n with_supported_dtypes,\n)\n\n\n@to_ivy_arrays_and_back\ndef reshape(x, shape):\n return ivy.reshape(x, shape)\n\n\n...
diff --git a/ivy/functional/frontends/paddle/tensor/manipulation.py b/ivy/functional/frontends/paddle/tensor/manipulation.py index adb24100b6e7c..7ef098a2c71d3 100644 --- a/ivy/functional/frontends/paddle/tensor/manipulation.py +++ b/ivy/functional/frontends/paddle/tensor/manipulation.py @@ -78,3 +78,12 @@ def squeeze(...
cobbler__cobbler-1265
build_reporting fails if empty string in ignorelist The default configuration in the ubuntu 12.04 cobbler 2.6.5 package has the following in `/etc/settings`: ``` build_reporting_ignorelist = [""] ``` The code that reads this value is in `install_post_report.py`, and the condition that determines whether to send a bui...
[ { "content": "# (c) 2008-2009\n# Jeff Schroeder <jeffschroeder@computer.org>\n# Michael DeHaan <michael.dehaan AT gmail>\n#\n# License: GPLv2+\n\n# Post install trigger for cobbler to\n# send out a pretty email report that\n# contains target information.\n\nimport distutils.sysconfig\nimport sys\nimport os\nimp...
[ { "content": "# (c) 2008-2009\n# Jeff Schroeder <jeffschroeder@computer.org>\n# Michael DeHaan <michael.dehaan AT gmail>\n#\n# License: GPLv2+\n\n# Post install trigger for cobbler to\n# send out a pretty email report that\n# contains target information.\n\nimport distutils.sysconfig\nimport sys\nimport os\nimp...
diff --git a/cobbler/modules/install_post_report.py b/cobbler/modules/install_post_report.py index 052dfb149e..4f9401bbfc 100755 --- a/cobbler/modules/install_post_report.py +++ b/cobbler/modules/install_post_report.py @@ -91,7 +91,7 @@ def run(api, args, logger): sendmail = True for prefix in settings.buil...
mathesar-foundation__mathesar-673
IndexError when deleting a column ## Description <!-- A clear and concise description of what the bug is. --> An indexError occurs when deleting a column through the API. Most of the time the error occurs when deleting the first or second column of a table. Deleting the last columns in a table does not seem to produc...
[ { "content": "import warnings\n\nfrom sqlalchemy import Table, MetaData, and_, select, text, func\n\nfrom db.tables.operations.select import reflect_table_from_oid\nfrom db.utils import execute_statement\n\n\ndef get_column_index_from_name(table_oid, column_name, engine, connection_to_use=None):\n with warni...
[ { "content": "import warnings\n\nfrom sqlalchemy import Table, MetaData, and_, select, text, func\n\nfrom db.tables.operations.select import reflect_table_from_oid\nfrom db.utils import execute_statement\n\n\ndef get_column_index_from_name(table_oid, column_name, engine, connection_to_use=None):\n with warni...
diff --git a/db/columns/operations/select.py b/db/columns/operations/select.py index 8b60cc1d2d..800fc2fc88 100644 --- a/db/columns/operations/select.py +++ b/db/columns/operations/select.py @@ -22,6 +22,7 @@ def get_column_index_from_name(table_oid, column_name, engine, connection_to_use sel = ( select(f...
falconry__falcon-676
Request.client_accepts_msgpack only supports 'application/x-msgpack' The use of the 'x-' prefix is now discouraged for media types. We should update this Request property to also return True for 'application/msgpack', and verify the change with additional tests.
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, so...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, so...
diff --git a/falcon/request.py b/falcon/request.py index 54be8c069..bd832279b 100644 --- a/falcon/request.py +++ b/falcon/request.py @@ -353,7 +353,8 @@ def client_accepts_json(self): @property def client_accepts_msgpack(self): - return self.client_accepts('application/x-msgpack') + return (se...
frappe__frappe-14120
Problems while using translations via Globe Symbol ## Description / Context information (for bug reports) There are 2 issues - **Issue - 1** While updating translations using Globe Symbol, system generates duplicate rows of translations for records added in Description https://user-images.githubusercont...
[ { "content": "# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\nfrom __future__ import unicode_literals, print_function\n\nfrom six import iteritems, text_type, string_types, PY2\n\nfrom frappe.utils import cstr\n\n\"\"\"\n\tfrappe.translate\n\t~~~~~~~~~~~~~...
[ { "content": "# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\nfrom __future__ import unicode_literals, print_function\n\nfrom six import iteritems, text_type, string_types, PY2\n\nfrom frappe.utils import cstr\n\n\"\"\"\n\tfrappe.translate\n\t~~~~~~~~~~~~~...
diff --git a/frappe/public/js/frappe/form/controls/base_control.js b/frappe/public/js/frappe/form/controls/base_control.js index 8c2c5c433866..2ee6246393ab 100644 --- a/frappe/public/js/frappe/form/controls/base_control.js +++ b/frappe/public/js/frappe/form/controls/base_control.js @@ -131,7 +131,7 @@ frappe.ui.form.Co...
goauthentik__authentik-3299
Get username from mailcow source **Is your feature request related to a problem? Please describe.** I like to get a username from mailcow. With username the enrollment for new users is more simple. **Describe the solution you'd like** Set username to full_name provided by mailcow oauths source. **Additional con...
[ { "content": "\"\"\"Mailcow OAuth Views\"\"\"\nfrom typing import Any, Optional\n\nfrom requests.exceptions import RequestException\nfrom structlog.stdlib import get_logger\n\nfrom authentik.sources.oauth.clients.oauth2 import OAuth2Client\nfrom authentik.sources.oauth.types.manager import MANAGER, SourceType\n...
[ { "content": "\"\"\"Mailcow OAuth Views\"\"\"\nfrom typing import Any, Optional\n\nfrom requests.exceptions import RequestException\nfrom structlog.stdlib import get_logger\n\nfrom authentik.sources.oauth.clients.oauth2 import OAuth2Client\nfrom authentik.sources.oauth.types.manager import MANAGER, SourceType\n...
diff --git a/authentik/sources/oauth/types/mailcow.py b/authentik/sources/oauth/types/mailcow.py index a296b9efaf7b..93999f5d254e 100644 --- a/authentik/sources/oauth/types/mailcow.py +++ b/authentik/sources/oauth/types/mailcow.py @@ -52,6 +52,7 @@ def get_user_enroll_context( info: dict[str, Any], ) -> d...
bookwyrm-social__bookwyrm-1855
Let admins set default interface language Right now, BookWyrm's interface language is determined by, in order of preference: 1. The language selected in the user's settings 2. The language requested by the browser, if it's available in the app 3. English Admin should be able to set the default display language of...
[ { "content": "\"\"\" bookwyrm settings and configuration \"\"\"\nimport os\nfrom environs import Env\n\nimport requests\nfrom django.utils.translation import gettext_lazy as _\n\n\nenv = Env()\nenv.read_env()\nDOMAIN = env(\"DOMAIN\")\nVERSION = \"0.2.0\"\n\nPAGE_LENGTH = env(\"PAGE_LENGTH\", 15)\nDEFAULT_LANGU...
[ { "content": "\"\"\" bookwyrm settings and configuration \"\"\"\nimport os\nfrom environs import Env\n\nimport requests\nfrom django.utils.translation import gettext_lazy as _\n\n\nenv = Env()\nenv.read_env()\nDOMAIN = env(\"DOMAIN\")\nVERSION = \"0.2.0\"\n\nPAGE_LENGTH = env(\"PAGE_LENGTH\", 15)\nDEFAULT_LANGU...
diff --git a/.env.example b/.env.example index 2000a7165c..ca6f65bb78 100644 --- a/.env.example +++ b/.env.example @@ -8,6 +8,8 @@ USE_HTTPS=true DOMAIN=your.domain.here EMAIL=your@email.here +# Instance defualt language (see options at bookwyrm/settings.py "LANGUAGES" +LANGUAGE_CODE="en-us" # Used for deciding wh...
pytest-dev__pytest-django-820
Test re-ordering breaks Pytest's --failed-first and --stepwise options The test re-ordering introduced in response to #214 seems to execute after pytest's own `--failed-first`, `--new-first`, `--stepwise`, etc. ordering options, breaking them. We ran across this in mdn/kuma#6531, where even with `--failed-first` pyt...
[ { "content": "\"\"\"A pytest plugin which helps testing Django applications\n\nThis plugin handles creating and destroying the test environment and\ntest database and provides some useful text fixtures.\n\"\"\"\n\nimport contextlib\nimport inspect\nfrom functools import reduce\nimport os\nimport sys\nimport typ...
[ { "content": "\"\"\"A pytest plugin which helps testing Django applications\n\nThis plugin handles creating and destroying the test environment and\ntest database and provides some useful text fixtures.\n\"\"\"\n\nimport contextlib\nimport inspect\nfrom functools import reduce\nimport os\nimport sys\nimport typ...
diff --git a/pytest_django/plugin.py b/pytest_django/plugin.py index e54a900ee..4deca87f3 100644 --- a/pytest_django/plugin.py +++ b/pytest_django/plugin.py @@ -415,6 +415,7 @@ def pytest_runtest_setup(item): _disable_class_methods(item.cls) +@pytest.hookimpl(tryfirst=True) def pytest_collection_modif...
CTFd__CTFd-1800
Invalid model identifier https://github.com/CTFd/CTFd/blob/master/CTFd/themes/core/templates/scoreboard.html#L26 This should change depending on the mode of the CTF
[ { "content": "import glob\nimport importlib\nimport os\nfrom collections import namedtuple\n\nfrom flask import current_app as app\nfrom flask import send_file, send_from_directory, url_for\n\nfrom CTFd.utils.config.pages import get_pages\nfrom CTFd.utils.decorators import admins_only as admins_only_wrapper\nfr...
[ { "content": "import glob\nimport importlib\nimport os\nfrom collections import namedtuple\n\nfrom flask import current_app as app\nfrom flask import send_file, send_from_directory, url_for\n\nfrom CTFd.utils.config.pages import get_pages\nfrom CTFd.utils.decorators import admins_only as admins_only_wrapper\nfr...
diff --git a/CTFd/plugins/__init__.py b/CTFd/plugins/__init__.py index a53892450..889002d16 100644 --- a/CTFd/plugins/__init__.py +++ b/CTFd/plugins/__init__.py @@ -151,7 +151,6 @@ def get_user_page_menu_bar(): route = p.route else: route = url_for("views.static_html", route=p.route) ...
svthalia__concrexit-2710
Cannot create new shifts: ValueError: 'Shift' instance needs to have a primary key value before this relationship can be used. Sentry Issue: [CONCREXIT-KK](https://sentry.io/organizations/thalia/issues/3788518453/?referrer=github_integration) ``` ValueError: 'Shift' instance needs to have a primary key value before th...
[ { "content": "from django.core.exceptions import ValidationError\nfrom django.db import models\nfrom django.db.models import Count, Q, Sum\nfrom django.db.models.expressions import Value\nfrom django.db.models.functions import Coalesce\nfrom django.utils import timezone\nfrom django.utils.translation import get...
[ { "content": "from django.core.exceptions import ValidationError\nfrom django.db import models\nfrom django.db.models import Count, Q, Sum\nfrom django.db.models.expressions import Value\nfrom django.db.models.functions import Coalesce\nfrom django.utils import timezone\nfrom django.utils.translation import get...
diff --git a/website/sales/models/shift.py b/website/sales/models/shift.py index 7d71aed94..261990639 100644 --- a/website/sales/models/shift.py +++ b/website/sales/models/shift.py @@ -66,7 +66,7 @@ def clean(self): super().clean() errors = {} - if self.orders.filter(created_at__lt=self.start...
ivy-llc__ivy-22632
amin
[ { "content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\...
[ { "content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_unsupported_dtypes({\"2.5.1 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\...
diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py index 75242ca8e62a4..4df4724f52019 100644 --- a/ivy/functional/frontends/paddle/tensor/math.py +++ b/ivy/functional/frontends/paddle/tensor/math.py @@ -502,3 +502,10 @@ def tanh(x, name=None): @to_ivy_arrays_an...
spack__spack-5099
spack find : always prompt 0 installed packages On a clean `develop` checkout : ``` $ git clone https://github.com/LLNL/spack.git Cloning into 'spack'... remote: Counting objects: 25613, done. remote: Compressing objects: 100% (42/42), done. remote: Total 25613 (delta 12), reused 3 (delta 3), pack-reused 25557 Receiv...
[ { "content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ...
[ { "content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ...
diff --git a/var/spack/repos/builtin/packages/h5z-zfp/package.py b/var/spack/repos/builtin/packages/h5z-zfp/package.py index 0063c2fd37d3c1..ddb03c64e0cbaa 100644 --- a/var/spack/repos/builtin/packages/h5z-zfp/package.py +++ b/var/spack/repos/builtin/packages/h5z-zfp/package.py @@ -38,8 +38,7 @@ class H5zZfp(MakefilePa...
buildbot__buildbot-5970
lazylogfiles broken on 3.0.2 I'm upgrading from 0.8.x to 3.0.2, and have this: ```python test_factory = util.BuildFactory() test_factory.addStep(ShellCommand( env={'PATH' : bin_path}, command=["runurl", bb_url + "bb-dependencies.sh"], decodeRC={0 : SUCCESS, 1 : FAILURE, 2 : WARNINGS, 3 : SKIPPED }, ...
[ { "content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n...
[ { "content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n...
diff --git a/master/buildbot/newsfragments/shellcommand-lazylogfiles.bugfix b/master/buildbot/newsfragments/shellcommand-lazylogfiles.bugfix new file mode 100644 index 000000000000..d813bd65ddf1 --- /dev/null +++ b/master/buildbot/newsfragments/shellcommand-lazylogfiles.bugfix @@ -0,0 +1 @@ +Re-added support for ``lazy...
googleapis__python-bigquery-745
missing docs for enums: switch to module-based reference docs for enums module There are several enums in https://github.com/googleapis/python-bigquery/blob/master/google/cloud/bigquery/enums.py which are undocumented. I recall we were doing class-based docs mostly because the "jobs" module was too huge to properly ...
[ { "content": "# -*- coding: utf-8 -*-\n# 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 ...
[ { "content": "# -*- coding: utf-8 -*-\n# 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 ...
diff --git a/docs/conf.py b/docs/conf.py index cb347160d..09f7ea414 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -110,6 +110,7 @@ # directories to ignore when looking for source files. exclude_patterns = [ "_build", + "**/.nox/**/*", "samples/AUTHORING_GUIDE.md", "samples/CONTRIBUTING.md", "...
avocado-framework__avocado-4585
Empty distro file with `avocado distro` When running `avocado distro` to generate a definition file as indicated in the manpage, there is a problem and the resulting distro file is empty. ``` $ avocado distro --distro-def-create --distro-def-name avocadix --distro-def-version 1 --distro-def-arch x86_64 --distro-de...
[ { "content": "# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope t...
[ { "content": "# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope t...
diff --git a/avocado/plugins/distro.py b/avocado/plugins/distro.py index ffe339c9a5..15478d031e 100644 --- a/avocado/plugins/distro.py +++ b/avocado/plugins/distro.py @@ -233,8 +233,9 @@ def save_distro(linux_distro, path): :type path: str :return: None """ - with open(path, 'w') as output: - o...
ivy-llc__ivy-23588
ifft2
[ { "content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back\nfrom ivy.func_wrapper import with_unsupported_dtypes\n\n\n@to_ivy_arrays_and_back\ndef fft(a, n=None, axis=-1, norm=None):\n if norm is None:\n norm = \"backward\"\n return ivy.fft(a, ax...
[ { "content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back\nfrom ivy.func_wrapper import with_unsupported_dtypes\n\n\n@to_ivy_arrays_and_back\ndef fft(a, n=None, axis=-1, norm=None):\n if norm is None:\n norm = \"backward\"\n return ivy.fft(a, ax...
diff --git a/ivy/functional/frontends/jax/numpy/fft.py b/ivy/functional/frontends/jax/numpy/fft.py index 0ba0fa31f9c94..8b2d0e17aebf6 100644 --- a/ivy/functional/frontends/jax/numpy/fft.py +++ b/ivy/functional/frontends/jax/numpy/fft.py @@ -41,3 +41,10 @@ def ifft(a, n=None, axis=-1, norm=None): if norm is None: ...
PrefectHQ__prefect-2959
Undefined name: make_env in ./server/src/prefect_server/cli/dev.py ## Description *A clear description of the bug* An _undefined name_ like #2235 and #1199 https://github.com/PrefectHQ/prefect/blob/master/server/src/prefect_server/cli/dev.py#L88 `make_env` is an undefined name in this context which will raise a...
[ { "content": "# Licensed under the Prefect Community License, available at\n# https://www.prefect.io/legal/prefect-community-license\n\n\nimport glob\nimport os\nimport shutil\nimport signal\nimport subprocess\nimport time\nfrom pathlib import Path\n\nimport click\n\nimport prefect\nimport prefect_server\nfrom ...
[ { "content": "# Licensed under the Prefect Community License, available at\n# https://www.prefect.io/legal/prefect-community-license\n\n\nimport glob\nimport os\nimport shutil\nimport signal\nimport subprocess\nimport time\nfrom pathlib import Path\n\nimport click\n\nimport prefect\nimport prefect_server\nfrom ...
diff --git a/server/src/prefect_server/cli/dev.py b/server/src/prefect_server/cli/dev.py index 440f96e6e5e8..2a6a4fdee5fb 100644 --- a/server/src/prefect_server/cli/dev.py +++ b/server/src/prefect_server/cli/dev.py @@ -85,7 +85,7 @@ def build(version): """ docker_dir = Path(prefect_server.__file__).parents[2]...
gwastro__pycbc-3663
Bug in command line option of pycbc_multi_inspiral code Hi, So I was trying running pycbc_multi_inspiral code with command line option of `injection-f-ref 10 ` and I get this error. ``` ValueError: Issue with option: injection_f_ref Received value: 1 0 If you are supplying a value for all ifos, you must only s...
[ { "content": "# Copyright (C) 2015 Ian Harry\n#\n# This program is free software; you can redistribute it and/or modify it\n# under the terms of the GNU General Public License as published by the\n# Free Software Foundation; either version 3 of the License, or (at your\n# option) any later version.\n#\n# This p...
[ { "content": "# Copyright (C) 2015 Ian Harry\n#\n# This program is free software; you can redistribute it and/or modify it\n# under the terms of the GNU General Public License as published by the\n# Free Software Foundation; either version 3 of the License, or (at your\n# option) any later version.\n#\n# This p...
diff --git a/pycbc/types/optparse.py b/pycbc/types/optparse.py index c8299bcfcc2..1ff934c827e 100644 --- a/pycbc/types/optparse.py +++ b/pycbc/types/optparse.py @@ -43,7 +43,7 @@ class MultiDetOptionAction(argparse.Action): def __init__(self, option_strings, dest, - ...
scikit-hep__pyhf-941
use short URL for better help message The current help msg has a long url, but this includes line breaks which makes it hard to copy. ``` pyhf cls --help Usage: pyhf cls [OPTIONS] [WORKSPACE] Compute CLs value(s) for a given pyhf workspace. Example: .. code-block:: shell $ curl -sL https...
[ { "content": "\"\"\"The inference CLI group.\"\"\"\nimport logging\n\nimport click\nimport json\n\nfrom ..utils import EqDelimStringParamType\nfrom ..infer import hypotest\nfrom ..workspace import Workspace\nfrom .. import tensor, get_backend, set_backend, optimize\n\nlog = logging.getLogger(__name__)\n\n\n@cli...
[ { "content": "\"\"\"The inference CLI group.\"\"\"\nimport logging\n\nimport click\nimport json\n\nfrom ..utils import EqDelimStringParamType\nfrom ..infer import hypotest\nfrom ..workspace import Workspace\nfrom .. import tensor, get_backend, set_backend, optimize\n\nlog = logging.getLogger(__name__)\n\n\n@cli...
diff --git a/src/pyhf/cli/infer.py b/src/pyhf/cli/infer.py index f6381131b0..db7f624068 100644 --- a/src/pyhf/cli/infer.py +++ b/src/pyhf/cli/infer.py @@ -54,7 +54,9 @@ def cls( .. code-block:: shell - $ curl -sL https://raw.githubusercontent.com/scikit-hep/pyhf/master/docs/examples/json/2-bin_1-channel...
roboflow__supervision-901
[Detections] - `from_inference` should include `'class_name'` key in `Detections.data` even if result is empty ### Bug [`from_inference`](https://github.com/roboflow/supervision/blob/0ccb0b85adee4202f5fe96834a374a057bbbd9da/supervision/detection/core.py#L448) should include `'class_name'` key in `Detections.data` ev...
[ { "content": "from __future__ import annotations\n\nfrom contextlib import suppress\nfrom dataclasses import dataclass, field\nfrom typing import Any, Dict, Iterator, List, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom supervision.config import CLASS_NAME_DATA_FIELD, ORIENTED_BOX_COORDINATES\nfrom superv...
[ { "content": "from __future__ import annotations\n\nfrom contextlib import suppress\nfrom dataclasses import dataclass, field\nfrom typing import Any, Dict, Iterator, List, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom supervision.config import CLASS_NAME_DATA_FIELD, ORIENTED_BOX_COORDINATES\nfrom superv...
diff --git a/supervision/detection/core.py b/supervision/detection/core.py index e727426bf..f170563ca 100644 --- a/supervision/detection/core.py +++ b/supervision/detection/core.py @@ -487,7 +487,9 @@ def from_inference(cls, roboflow_result: Union[dict, Any]) -> Detections: ) if np.asarray(xyxy).sha...
ocf__ocfweb-72
Add "edit this page" link on docs? It would link to the GitHub editor page.
[ { "content": "from collections import namedtuple\n\n\nclass Document(namedtuple('Document', ['name', 'title', 'render'])):\n\n @property\n def category(self):\n \"\"\"Return full category path of the document.\n\n For example, \"/\" or \"/staff/backend/\".\n \"\"\"\n return sel...
[ { "content": "from collections import namedtuple\n\n\nclass Document(namedtuple('Document', ['name', 'title', 'render'])):\n\n @property\n def category(self):\n \"\"\"Return full category path of the document.\n\n For example, \"/\" or \"/staff/backend/\".\n \"\"\"\n return sel...
diff --git a/ocfweb/docs/doc.py b/ocfweb/docs/doc.py index 11cb55d6d..6a0022d89 100644 --- a/ocfweb/docs/doc.py +++ b/ocfweb/docs/doc.py @@ -25,3 +25,12 @@ def category_for_sidebar(self): return self.name + '/' else: return self.category + + @property + def edit_url(self): + ...
openfun__marsha-2577
Sending a xAPI statement to a LRS not working anymore ## Bug Report **Problematic Behavior** When a LRS is configured in a consumer site, sending a xapi statement is failing https://gip-fun-mooc.sentry.io/share/issue/081e7857e01544d3bd5b5f93d573c428/ **Expected behavior/code** When a LRS is correctly con...
[ { "content": "\"\"\"XAPI module.\"\"\"\n\nimport re\nimport uuid\n\nfrom django.conf import settings\nfrom django.utils import timezone\nfrom django.utils.translation import to_locale\n\nimport requests\n\n\ndef get_xapi_statement(resource):\n \"\"\"Return the xapi object statement based on the required reso...
[ { "content": "\"\"\"XAPI module.\"\"\"\n\nimport re\nimport uuid\n\nfrom django.conf import settings\nfrom django.utils import timezone\nfrom django.utils.translation import to_locale\n\nimport requests\n\n\ndef get_xapi_statement(resource):\n \"\"\"Return the xapi object statement based on the required reso...
diff --git a/CHANGELOG.md b/CHANGELOG.md index f577955d2f..308b97d08c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ Versioning](https://semver.org/spec/v2.0.0.html). ### Fixed - Remove non existing fields in PortabilityRequestAdmin +- Correctly send xapi statement to a configured LRS ## [4.9.0] ...
napari__napari-277
blending mode update error ## 🐛 Bug When viewing multiple layers with blending, I am experiencing a bug whereby changing the blending mode doesn't result in an immediate update. The update does occur when I change the opacity (at which point is happens immediately). ![bug](https://user-images.githubusercontent....
[ { "content": "# TODO: create & use our own transform class\nfrom vispy.visuals.transforms import STTransform\nfrom vispy.gloo import get_state_presets\nfrom ...util.event import EmitterGroup, Event\n\n\nclass VisualWrapper:\n \"\"\"Wrapper around ``vispy.scene.VisualNode`` objects.\n Meant to be subclasse...
[ { "content": "# TODO: create & use our own transform class\nfrom vispy.visuals.transforms import STTransform\nfrom vispy.gloo import get_state_presets\nfrom ...util.event import EmitterGroup, Event\n\n\nclass VisualWrapper:\n \"\"\"Wrapper around ``vispy.scene.VisualNode`` objects.\n Meant to be subclasse...
diff --git a/napari/layers/_base_layer/_visual_wrapper.py b/napari/layers/_base_layer/_visual_wrapper.py index 8408ff8b798..18fa23c33ac 100644 --- a/napari/layers/_base_layer/_visual_wrapper.py +++ b/napari/layers/_base_layer/_visual_wrapper.py @@ -124,6 +124,7 @@ def blending(self, blending): ...
pyqtgraph__pyqtgraph-1066
AttributeError: module 'pyqtgraph.widgets' has no attribute 'RemoteGraphicsView' <!-- In the following, please describe your issue in detail! --> <!-- If some of the sections do not apply, just remove them. --> ### Short description <!-- This should summarize the issue. --> Trying to use RemoteGraphicsView throws...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nPyQtGraph - Scientific Graphics and GUI Library for Python\nwww.pyqtgraph.org\n\"\"\"\n\n__version__ = '0.11.0.dev0'\n\n### import all the goodies and add some helper functions for easy CLI use\n\n## 'Qt' is a local module; it is intended mainly to cover up the dif...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nPyQtGraph - Scientific Graphics and GUI Library for Python\nwww.pyqtgraph.org\n\"\"\"\n\n__version__ = '0.11.0.dev0'\n\n### import all the goodies and add some helper functions for easy CLI use\n\n## 'Qt' is a local module; it is intended mainly to cover up the dif...
diff --git a/pyqtgraph/__init__.py b/pyqtgraph/__init__.py index aad5c3c801..d2ba61ee52 100644 --- a/pyqtgraph/__init__.py +++ b/pyqtgraph/__init__.py @@ -260,6 +260,7 @@ def renamePyc(startDir): from .widgets.TableWidget import * from .widgets.ProgressDialog import * from .widgets.GroupBox import GroupBox +from .w...
tobymao__sqlglot-2365
Support '' to escape single quote character in a string in Redshift dialect **Fully reproducible code snippet** ```python import sqlglot sql_code = """ CREATE TABLE IF NOT EXISTS myschema.mytable ( mycolumn bigint, ) DISTKEY (mycolumn) SORTKEY (mycolumn) ; COMMENT ON COLUMN myschema.mytable.mycolumn ...
[ { "content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.dialects.dialect import (\n concat_to_dpipe_sql,\n concat_ws_to_dpipe_sql,\n rename_func,\n ts_or_ds_to_date_sql,\n)\nfrom sqlglot.dialects.postgres import Postgres\nfrom sqlgl...
[ { "content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.dialects.dialect import (\n concat_to_dpipe_sql,\n concat_ws_to_dpipe_sql,\n rename_func,\n ts_or_ds_to_date_sql,\n)\nfrom sqlglot.dialects.postgres import Postgres\nfrom sqlgl...
diff --git a/sqlglot/dialects/redshift.py b/sqlglot/dialects/redshift.py index 2145844ec7..88e4448c12 100644 --- a/sqlglot/dialects/redshift.py +++ b/sqlglot/dialects/redshift.py @@ -83,7 +83,7 @@ def _parse_convert(self, strict: bool) -> t.Optional[exp.Expression]: class Tokenizer(Postgres.Tokenizer): BI...
wagtail__wagtail-6433
Change code block style in the docs The colours in our existing code blocks fail WCAG AA on contrast: https://webaim.org/resources/contrastchecker/?fcolor=408090&bcolor=EEFFCC See an example here: https://docs.wagtail.io/en/stable/advanced_topics/performance.html#cache It looks like ``sphinx-rtd-theme`` uses a di...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Wagtail documentation build configuration file, created by\n# sphinx-quickstart on Tue Jan 14 17:38:55 2014.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in th...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Wagtail documentation build configuration file, created by\n# sphinx-quickstart on Tue Jan 14 17:38:55 2014.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in th...
diff --git a/docs/conf.py b/docs/conf.py index fbc26a1f7f60..65bd3c605a42 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -115,7 +115,7 @@ #show_authors = False # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = 'default' # A list of ignored prefixes for m...
mitmproxy__mitmproxy-6382
An error occurred when trying to open a punycode domain #### Problem Description When trying to open a punycode domain, for example https://xn--80afnfom.xn--80ahmohdapg.xn--80asehdb/login, an error occurs in mitmproxy mitmproxy log ``` [13:35:19.966][192.168.20.31:53287] client connect [13:35:20.032][192.168...
[ { "content": "import contextlib\nimport datetime\nimport ipaddress\nimport os\nimport re\nimport sys\nfrom dataclasses import dataclass\nfrom pathlib import Path\nfrom typing import cast\nfrom typing import NewType\nfrom typing import Optional\nfrom typing import Union\n\nimport OpenSSL\nfrom cryptography impor...
[ { "content": "import contextlib\nimport datetime\nimport ipaddress\nimport os\nimport re\nimport sys\nfrom dataclasses import dataclass\nfrom pathlib import Path\nfrom typing import cast\nfrom typing import NewType\nfrom typing import Optional\nfrom typing import Union\n\nimport OpenSSL\nfrom cryptography impor...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 18b65ab3fd..865390d8ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased: mitmproxy next +* Fix certificate generation for punycode domains. + ([#6382](https://github.com/mitmproxy/mitmproxy/pull/6382), @mhils) ## 24 September 2023: mitm...
mitmproxy__mitmproxy-1425
Cannot clear flows ##### Steps to reproduce the problem: 1. Start mitmproxy 2. Press z ##### What is the expected behavior? No crash ##### What went wrong? ``` Traceback (most recent call last): File "/media/sf_git/mitmproxy/mitmproxy/console/master.py", line 515, in run self.loop.run() File "/usr/local/lib/p...
[ { "content": "from __future__ import absolute_import, print_function, division\n\nimport mailcap\nimport mimetypes\nimport os\nimport os.path\nimport shlex\nimport signal\nimport stat\nimport subprocess\nimport sys\nimport tempfile\nimport traceback\nimport weakref\n\nimport urwid\nfrom typing import Optional ...
[ { "content": "from __future__ import absolute_import, print_function, division\n\nimport mailcap\nimport mimetypes\nimport os\nimport os.path\nimport shlex\nimport signal\nimport stat\nimport subprocess\nimport sys\nimport tempfile\nimport traceback\nimport weakref\n\nimport urwid\nfrom typing import Optional ...
diff --git a/mitmproxy/console/master.py b/mitmproxy/console/master.py index f7c99ecb9c..db4141471b 100644 --- a/mitmproxy/console/master.py +++ b/mitmproxy/console/master.py @@ -182,7 +182,7 @@ def disable_marked_filter(self): self.mark_filter = False def clear(self): - marked_flows = [f for f i...
sql-machine-learning__elasticdl-1810
Worker occasionally crashes when reports evaluation task result. The error log: ``` status = StatusCode.UNKNOWN details = "Exception calling application: 'NoneType' object has no attribute 'complete_task'" debug_error_string = "{"created":"@1582833503.778925101","description":"Error received from peer ipv4:11.253....
[ { "content": "import threading\nimport time\nfrom threading import Thread\n\nfrom elasticdl.proto import elasticdl_pb2\nfrom elasticdl.python.common.evaluation_utils import EvaluationMetrics\nfrom elasticdl.python.common.log_utils import default_logger as logger\nfrom elasticdl.python.common.tensor_utils import...
[ { "content": "import threading\nimport time\nfrom threading import Thread\n\nfrom elasticdl.proto import elasticdl_pb2\nfrom elasticdl.python.common.evaluation_utils import EvaluationMetrics\nfrom elasticdl.python.common.log_utils import default_logger as logger\nfrom elasticdl.python.common.tensor_utils import...
diff --git a/elasticdl/python/master/evaluation_service.py b/elasticdl/python/master/evaluation_service.py index 310e4493a..8cd76131d 100644 --- a/elasticdl/python/master/evaluation_service.py +++ b/elasticdl/python/master/evaluation_service.py @@ -194,6 +194,8 @@ def report_evaluation_metrics(self, model_outputs, labe...
googleapis__python-bigquery-974
Python to construct CASE WHEN update SQL statement I try to update 2K rows in BQ ``` def update_bq_ads_status_failed(self, update_ads): affected_rows = 0 for update_ads_chunk in split(update_ads, _UPDATE_CHUNK_SIZE): ad_ids = [item["ad_id"] for item in update_ads_chunk] ...
[ { "content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
[ { "content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
diff --git a/google/cloud/bigquery/retry.py b/google/cloud/bigquery/retry.py index 830582322..8a86973cd 100644 --- a/google/cloud/bigquery/retry.py +++ b/google/cloud/bigquery/retry.py @@ -60,7 +60,7 @@ def _should_retry(exc): pass ``retry=bigquery.DEFAULT_RETRY.with_deadline(30)``. """ -DEFAULT_TIMEOUT = 5.0 * 60....
docker__docker-py-1709
.dockerignore does not work with patterns begin with slash docker version: ``` docker -v Docker version 17.03.1-ce, build c6d412e ``` reproduce: ``` mkdir app cd app mkdir foo touch foo/bar echo '/foo/bar' > .dockerignore printf 'FROM alpine:3.1\nWORKDIR /app\nCOPY . .\n' > Dockerfile docker build -t a...
[ { "content": "import os\n\nfrom ..constants import IS_WINDOWS_PLATFORM\nfrom .fnmatch import fnmatch\nfrom .utils import create_archive\n\n\ndef tar(path, exclude=None, dockerfile=None, fileobj=None, gzip=False):\n root = os.path.abspath(path)\n exclude = exclude or []\n\n return create_archive(\n ...
[ { "content": "import os\n\nfrom ..constants import IS_WINDOWS_PLATFORM\nfrom .fnmatch import fnmatch\nfrom .utils import create_archive\n\n\ndef tar(path, exclude=None, dockerfile=None, fileobj=None, gzip=False):\n root = os.path.abspath(path)\n exclude = exclude or []\n\n return create_archive(\n ...
diff --git a/docker/utils/build.py b/docker/utils/build.py index 79b72495d..d4223e749 100644 --- a/docker/utils/build.py +++ b/docker/utils/build.py @@ -26,6 +26,7 @@ def exclude_paths(root, patterns, dockerfile=None): if dockerfile is None: dockerfile = 'Dockerfile' + patterns = [p.lstrip('/') for p...
optuna__optuna-5056
Use `__future__.annotations` everywhere in the Optuna code base ### Motivation Optuna drops Python 3.6 from v3.1, so we can use `__future__.annotations`, which simplifies the code base. See [PEP 563](https://peps.python.org/pep-0563/), [PEP584](https://peps.python.org/pep-0584/), [PEP 585](https://peps.python.org/pe...
[ { "content": "from __future__ import annotations\n\nfrom typing import Callable\nfrom typing import Sequence\n\nfrom optuna._experimental import experimental_func\nfrom optuna.logging import get_logger\nfrom optuna.study import Study\nfrom optuna.trial import FrozenTrial\nfrom optuna.visualization._edf import _...
[ { "content": "from __future__ import annotations\n\nfrom collections.abc import Callable\nfrom collections.abc import Sequence\n\nfrom optuna._experimental import experimental_func\nfrom optuna.logging import get_logger\nfrom optuna.study import Study\nfrom optuna.trial import FrozenTrial\nfrom optuna.visualiza...
diff --git a/optuna/visualization/matplotlib/_edf.py b/optuna/visualization/matplotlib/_edf.py index ee138b9149..3625dbbe70 100644 --- a/optuna/visualization/matplotlib/_edf.py +++ b/optuna/visualization/matplotlib/_edf.py @@ -1,7 +1,7 @@ from __future__ import annotations -from typing import Callable -from typing i...
ivy-llc__ivy-19363
T
[ { "content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.jax as jax_frontend\n\n\nclass DeviceArray:\n def __init__(self, array, weak_type=False):\n self._ivy_array = array if isinstance(array, ivy.Array) else ivy.array(array)\n self.weak_type = weak_type\n\n def __repr...
[ { "content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.jax as jax_frontend\n\n\nclass DeviceArray:\n def __init__(self, array, weak_type=False):\n self._ivy_array = array if isinstance(array, ivy.Array) else ivy.array(array)\n self.weak_type = weak_type\n\n def __repr...
diff --git a/ivy/functional/frontends/jax/devicearray.py b/ivy/functional/frontends/jax/devicearray.py index b04cecb8a1095..dabd2464a1f7a 100644 --- a/ivy/functional/frontends/jax/devicearray.py +++ b/ivy/functional/frontends/jax/devicearray.py @@ -41,6 +41,10 @@ def shape(self): def at(self): return jax_...
OpenMined__PySyft-676
Implement rsqrt Functionality in FloatTensor with CPU/GPU Backend Support ### User Story: As a Data Scientist using PySyft's FloatTensor type, I want to leverage a wide range of methods which use our new Unity backend. For this ticket to be complete, the rsqrt() should be added to our FloatTensor class with the appro...
[ { "content": "import zmq\nimport uuid\n\n\nclass FloatTensor():\n\n def __init__(self, controller, data, data_is_pointer=False, verbose=False):\n self.verbose = verbose\n self.controller = controller\n if(data is not None and not data_is_pointer):\n data = data.astype('float')...
[ { "content": "import zmq\nimport uuid\n\n\nclass FloatTensor():\n\n def __init__(self, controller, data, data_is_pointer=False, verbose=False):\n self.verbose = verbose\n self.controller = controller\n if(data is not None and not data_is_pointer):\n data = data.astype('float')...
diff --git a/syft/syft.py b/syft/syft.py index 67414ce731e..1f8b47a80f6 100644 --- a/syft/syft.py +++ b/syft/syft.py @@ -102,6 +102,9 @@ def __imul__(self, x): def neg(self): return self.no_params_func("neg", return_response=True) + def rsqrt(self): + return self.no_params_func("rsqrt",return_...
talonhub__community-742
'go <arrow keys>' conflicts with generic_editor 'go left/right/up/down' This is really only a problem if the edit actions are overridden, but one might want to do so for `vim`...
[ { "content": "from typing import Set\n\nfrom talon import Module, Context, actions, app\nimport sys\n\ndefault_alphabet = \"air bat cap drum each fine gust harp sit jury crunch look made near odd pit quench red sun trap urge vest whale plex yank zip\".split(\n \" \"\n)\nletters_string = \"abcdefghijklmnopqrs...
[ { "content": "from typing import Set\n\nfrom talon import Module, Context, actions, app\nimport sys\n\ndefault_alphabet = \"air bat cap drum each fine gust harp sit jury crunch look made near odd pit quench red sun trap urge vest whale plex yank zip\".split(\n \" \"\n)\nletters_string = \"abcdefghijklmnopqrs...
diff --git a/code/keys.py b/code/keys.py index a6764aedd8..10c0dc699a 100644 --- a/code/keys.py +++ b/code/keys.py @@ -249,3 +249,12 @@ def letters(m) -> str: } +@mod.action_class +class Actions: + def move_cursor(s: str): + """Given a sequence of directions, eg. 'left left up', moves the cursor accordin...
SeldonIO__MLServer-192
Support other common names for SKLearn runtime Add support for models named `model.pickle` and `model.pkl`
[ { "content": "import joblib\n\nfrom typing import List\n\nfrom mlserver import types\nfrom mlserver.model import MLModel\nfrom mlserver.errors import InferenceError\nfrom mlserver.utils import get_model_uri, to_ndarray\n\n\nPREDICT_OUTPUT = \"predict\"\nPREDICT_PROBA_OUTPUT = \"predict_proba\"\nVALID_OUTPUTS = ...
[ { "content": "import joblib\n\nfrom typing import List\n\nfrom mlserver import types\nfrom mlserver.model import MLModel\nfrom mlserver.errors import InferenceError\nfrom mlserver.utils import get_model_uri, to_ndarray\n\n\nPREDICT_OUTPUT = \"predict\"\nPREDICT_PROBA_OUTPUT = \"predict_proba\"\nVALID_OUTPUTS = ...
diff --git a/runtimes/sklearn/mlserver_sklearn/sklearn.py b/runtimes/sklearn/mlserver_sklearn/sklearn.py index a419b8c89..312ea4067 100644 --- a/runtimes/sklearn/mlserver_sklearn/sklearn.py +++ b/runtimes/sklearn/mlserver_sklearn/sklearn.py @@ -12,7 +12,7 @@ PREDICT_PROBA_OUTPUT = "predict_proba" VALID_OUTPUTS = [PRE...
nonebot__nonebot2-140
Bug: 发送窗口抖动消息,在msg中是无消息内容的,如果通过[0]索引或报错 cqhttp包下bot.py模块中 first_msg_seg = event.message[0] 超出索引 问题如上,另外建议连续二次索引时增加第一次索引的默认值防止第二次索引超出,state["_prefix"]["command"] in commands
[ { "content": "import re\nimport sys\nimport hmac\nimport json\nimport asyncio\nfrom typing import Any, Dict, Union, Optional, TYPE_CHECKING\n\nimport httpx\nfrom nonebot.log import logger\nfrom nonebot.config import Config\nfrom nonebot.typing import overrides\nfrom nonebot.message import handle_event\nfrom non...
[ { "content": "import re\nimport sys\nimport hmac\nimport json\nimport asyncio\nfrom typing import Any, Dict, Union, Optional, TYPE_CHECKING\n\nimport httpx\nfrom nonebot.log import logger\nfrom nonebot.config import Config\nfrom nonebot.typing import overrides\nfrom nonebot.message import handle_event\nfrom non...
diff --git a/nonebot/adapters/cqhttp/bot.py b/nonebot/adapters/cqhttp/bot.py index 1aff6d5d2e97..d62ff8296b26 100644 --- a/nonebot/adapters/cqhttp/bot.py +++ b/nonebot/adapters/cqhttp/bot.py @@ -82,6 +82,10 @@ def _check_at_me(bot: "Bot", event: "Event"): if not isinstance(event, MessageEvent): return +...
locustio__locust-1359
Add --config parameter <!-- If you have a general question about how to use Locust, please check Stack Overflow first https://stackoverflow.com/questions/tagged/locust You can also ask new questions on SO, https://stackoverflow.com/questions/ask just remember to tag your question with "locust". --> ### Is your...
[ { "content": "import argparse\nimport os\nimport sys\nimport textwrap\n\nimport configargparse\n\nimport locust\n\nversion = locust.__version__\n\n\nDEFAULT_CONFIG_FILES = ['~/.locust.conf','locust.conf']\n\n\ndef _is_package(path):\n \"\"\"\n Is the given path a Python package?\n \"\"\"\n return (\...
[ { "content": "import argparse\nimport os\nimport sys\nimport textwrap\n\nimport configargparse\n\nimport locust\n\nversion = locust.__version__\n\n\nDEFAULT_CONFIG_FILES = ['~/.locust.conf','locust.conf']\n\n\ndef _is_package(path):\n \"\"\"\n Is the given path a Python package?\n \"\"\"\n return (\...
diff --git a/docs/configuration.rst b/docs/configuration.rst index a876e34a3b..a7f95a6c9d 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -27,3 +27,33 @@ Most of the configuration that can be set through command line arguments can als environment variables. Here's a table of all the available envir...
quantumlib__Cirq-2952
Update cirq.google.Bristlecone/Foxtail with accurate duration numbers
[ { "content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ { "content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
diff --git a/cirq/google/devices/known_devices.py b/cirq/google/devices/known_devices.py index 36bf4adc0a3..2caacbe41bd 100644 --- a/cirq/google/devices/known_devices.py +++ b/cirq/google/devices/known_devices.py @@ -228,8 +228,8 @@ def _json_dict_(self) -> Dict[str, Any]: # Duration dict in picoseconds _DURATIONS_...
carpentries__amy-1046
Django Debug Toolbar should have SQL panel ON by default Turning the panel ON allows to spot bottlenecks right on - just by looking at the number of queries (>8? Investigate). This panel is the most useful and most often used by me. The next one is template variables, which is ON by default already. Django Debug Tool...
[ { "content": "\"\"\"\nDjango settings for amy project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.7/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.7/ref/settings/\n\"\"\"\n\n# Build paths inside the project like th...
[ { "content": "\"\"\"\nDjango settings for amy project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.7/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.7/ref/settings/\n\"\"\"\n\n# Build paths inside the project like th...
diff --git a/amy/settings.py b/amy/settings.py index fbf86e346..f51f70bb1 100644 --- a/amy/settings.py +++ b/amy/settings.py @@ -346,10 +346,3 @@ # Debug Toolbar DEBUG_TOOLBAR_PATCH_SETTINGS = False INTERNAL_IPS = ['127.0.0.1', '::1'] -DEBUG_TOOLBAR_CONFIG = { - # Disable all panels (except for timer) by default ...
secdev__scapy-2471
Getting "Exception ignored in: <bound method SuperSocket.__del__ of ... >" #### Brief description Using `sniff` method with unreal `iface` parameter leads to `Ignored exception ...` #### Environment - Scapy version: `Version 2.4.3` - Python version: `Python 3.6.9` - Operating System: `Linux 5.3.0-28-ge...
[ { "content": "# This file is part of Scapy\n# See http://www.secdev.org/projects/scapy for more information\n# Copyright (C) Philippe Biondi <phil@secdev.org>\n# This program is published under a GPLv2 license\n\n\"\"\"\nLinux specific functions.\n\"\"\"\n\nfrom __future__ import absolute_import\n\n\nimport arr...
[ { "content": "# This file is part of Scapy\n# See http://www.secdev.org/projects/scapy for more information\n# Copyright (C) Philippe Biondi <phil@secdev.org>\n# This program is published under a GPLv2 license\n\n\"\"\"\nLinux specific functions.\n\"\"\"\n\nfrom __future__ import absolute_import\n\n\nimport arr...
diff --git a/scapy/arch/linux.py b/scapy/arch/linux.py index a6a70b988c9..6a082176e39 100644 --- a/scapy/arch/linux.py +++ b/scapy/arch/linux.py @@ -494,7 +494,7 @@ def close(self): try: if self.promisc and self.ins: set_promisc(self.ins, self.iface, 0) - except AttributeEr...
graspologic-org__graspologic-583
Fix bug in `is_unweighted` for sparse - [ ] Does this PR add any new dependencies? - [ ] Does this PR modify any existing APIs? - [ ] Is the change to the API backwards compatible? - [ ] Have you built the documentation (reference and/or tutorial) and verified the generated documentation is appropriate? #### R...
[ { "content": "# Copyright (c) Microsoft Corporation and contributors.\n# Licensed under the MIT License.\n\nimport os\nimport sys\nfrom setuptools import setup, find_packages\n\n\nMINIMUM_PYTHON_VERSION = 3, 6 # Minimum of Python 3.6\n\nif sys.version_info < MINIMUM_PYTHON_VERSION:\n sys.exit(\"Python {}.{}...
[ { "content": "# Copyright (c) Microsoft Corporation and contributors.\n# Licensed under the MIT License.\n\nimport os\nimport sys\nfrom setuptools import setup, find_packages\n\n\nMINIMUM_PYTHON_VERSION = 3, 6 # Minimum of Python 3.6\n\nif sys.version_info < MINIMUM_PYTHON_VERSION:\n sys.exit(\"Python {}.{}...
diff --git a/setup.py b/setup.py index b1fa371b2..cc5d59121 100644 --- a/setup.py +++ b/setup.py @@ -51,6 +51,7 @@ "anytree>=2.8.0", "gensim", "hyppo>=0.1.3", + "joblib>=0.17.0", # Older versions of joblib cause issue #806. Transitive dependency of hyppo. "matplotlib>=3.0.0,<...
kserve__kserve-1137
Installed KFServing SDK 0.4 but getting import error while running the custom built image /kind bug **What steps did you take and what happened:** Run a custom built image with KFServing SDK 0.4. ``` Traceback (most recent call last): File "/python3/lib/python3.7/runpy.py", line 193, in _run_module_as_main ...
[ { "content": "# Copyright 2019 kubeflow.org.\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 applica...
[ { "content": "# Copyright 2019 kubeflow.org.\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 applica...
diff --git a/python/alibiexplainer/setup.py b/python/alibiexplainer/setup.py index 6dce65a6c55..88dc38638c0 100644 --- a/python/alibiexplainer/setup.py +++ b/python/alibiexplainer/setup.py @@ -32,6 +32,7 @@ python_requires='>=3.6', packages=find_packages("alibiexplainer"), install_requires=[ + "sh...
sopel-irc__sopel-1987
reddit: floating point error in upvote ratio https://github.com/sopel-irc/sopel/blob/d850844870ac62e4568b4743bd38f0f90d76af7d/sopel/modules/reddit.py#L183 Occasionally this code results in an output ratio like "57.99999999999999%". Should be super easy for anyone who wants a quick PR.
[ { "content": "# coding=utf-8\n\"\"\"\nreddit.py - Sopel Reddit Plugin\nCopyright 2012, Elsie Powell, embolalia.com\nCopyright 2019, dgw, technobabbl.es\nCopyright 2019, deathbybandaid, deathbybandaid.net\nLicensed under the Eiffel Forum License 2.\n\nhttps://sopel.chat\n\"\"\"\nfrom __future__ import absolute_i...
[ { "content": "# coding=utf-8\n\"\"\"\nreddit.py - Sopel Reddit Plugin\nCopyright 2012, Elsie Powell, embolalia.com\nCopyright 2019, dgw, technobabbl.es\nCopyright 2019, deathbybandaid, deathbybandaid.net\nLicensed under the Eiffel Forum License 2.\n\nhttps://sopel.chat\n\"\"\"\nfrom __future__ import absolute_i...
diff --git a/sopel/modules/reddit.py b/sopel/modules/reddit.py index ac97563cc8..819af86dd7 100644 --- a/sopel/modules/reddit.py +++ b/sopel/modules/reddit.py @@ -192,7 +192,7 @@ def say_post_info(bot, trigger, id_, show_link=True, show_comments_link=False): points_text = 'point' if s.score == 1 else 'points...
conan-io__conan-6198
[bug] SystemPackageTool installed() method is missing According to [conan-io/docs](https://github.com/conan-io/docs/blame/18d6adbf56a55a7d9185a12aa707b5fe161b35e9/reference/conanfile/methods.rst#L642), [docs.conan.io](https://docs.conan.io/en/latest/reference/conanfile/methods.html#systempackagetool) SystemPackageTool ...
[ { "content": "import os\nimport sys\n\nfrom conans.client.runner import ConanRunner\nfrom conans.client.tools.oss import OSInfo, cross_building, get_cross_building_settings\nfrom conans.client.tools.files import which\nfrom conans.errors import ConanException\nfrom conans.util.env_reader import get_env\nfrom co...
[ { "content": "import os\nimport sys\n\nfrom conans.client.runner import ConanRunner\nfrom conans.client.tools.oss import OSInfo, cross_building, get_cross_building_settings\nfrom conans.client.tools.files import which\nfrom conans.errors import ConanException\nfrom conans.util.env_reader import get_env\nfrom co...
diff --git a/conans/client/tools/system_pm.py b/conans/client/tools/system_pm.py index de3b10e4aac..7b5e8d62ce1 100644 --- a/conans/client/tools/system_pm.py +++ b/conans/client/tools/system_pm.py @@ -143,6 +143,9 @@ def _get_package_names(self, packages, arch_names): return parsed_packages return...
readthedocs__readthedocs.org-7582
Upgrade elastic search to 7.x https://www.elastic.co/blog/elasticsearch-7-0-0-released Changelog https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html
[ { "content": "import logging\nimport re\n\nfrom django.conf import settings\nfrom elasticsearch import Elasticsearch\nfrom elasticsearch_dsl import FacetedSearch, TermsFacet\nfrom elasticsearch_dsl.faceted_search import NestedFacet\nfrom elasticsearch_dsl.query import (\n Bool,\n FunctionScore,\n Multi...
[ { "content": "import logging\nimport re\n\nfrom django.conf import settings\nfrom elasticsearch import Elasticsearch\nfrom elasticsearch_dsl import FacetedSearch, TermsFacet\nfrom elasticsearch_dsl.faceted_search import NestedFacet\nfrom elasticsearch_dsl.query import (\n Bool,\n FunctionScore,\n Multi...
diff --git a/.circleci/config.yml b/.circleci/config.yml index 89119d19ca4..7516f9c8d3a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,8 +6,10 @@ jobs: - image: 'cimg/python:3.6' environment: TOX_POSARGS: '' - - image: 'docker.elastic.co/elasticsearch/elasticsearch:6....
hylang__hy-358
Allow macros to return None ``` (defmacro foo []) (foo) ``` Will break as macros are not handling the NoneType yet
[ { "content": "# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without restriction, including without limitation\n# t...
[ { "content": "# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without restriction, including without limitation\n# t...
diff --git a/hy/macros.py b/hy/macros.py index 20d0caca7..d3f08d88c 100644 --- a/hy/macros.py +++ b/hy/macros.py @@ -84,7 +84,8 @@ def require(source_module, target_module): complex: HyComplex, str_type: HyString, dict: lambda d: HyDict(_wrap_value(x) for x in sum(d.items(), ())), - list: lambda l: Hy...
kserve__kserve-1053
Tabular Explainer e2e test failing /kind bug ``` (base) C02YJ034JGH5:~ dsun20$ kubectl logs isvc-explainer-tabular-explainer-default-7cnkj-deployment-4q4hn -n kfserving-ci-e2e-test kfserving-container [I 200828 13:12:28 font_manager:1423] Generating new fontManager, this may take some time... Traceback (most rece...
[ { "content": "# Copyright 2019 kubeflow.org.\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 applica...
[ { "content": "# Copyright 2019 kubeflow.org.\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 applica...
diff --git a/python/alibiexplainer/setup.py b/python/alibiexplainer/setup.py index 6dce65a6c55..88dc38638c0 100644 --- a/python/alibiexplainer/setup.py +++ b/python/alibiexplainer/setup.py @@ -32,6 +32,7 @@ python_requires='>=3.6', packages=find_packages("alibiexplainer"), install_requires=[ + "sh...
pypi__warehouse-6301
[Project-scoped API tokens] aren't available to maintainers **Describe the bug** <!-- A clear and concise description the bug --> When I use a "bot" account with "Maintainer" level access to projects, there are no projects to select from in the form for the token creation. **Expected behavior** <!-- A clear and c...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
diff --git a/tests/unit/manage/test_views.py b/tests/unit/manage/test_views.py index 876b2979ca53..ddcdf1c33be3 100644 --- a/tests/unit/manage/test_views.py +++ b/tests/unit/manage/test_views.py @@ -1363,6 +1363,41 @@ def test_default_response(self, monkeypatch): "delete_macaroon_form": delete_macaroon_obj...
strawberry-graphql__strawberry-1994
Postponed annotation evaluation causes `Annotated` to break When using postponed annotation evaluation, annotating resolver arguments no longer works: ```python from __future__ import annotations import random from typing import Annotated import strawberry @strawberry.type class Query: @strawberry...
[ { "content": "from __future__ import annotations\n\nfrom typing import Any, Optional, Union, cast\n\nfrom typing_extensions import Annotated, get_args, get_origin\n\nfrom strawberry.type import StrawberryType\n\nfrom .annotation import StrawberryAnnotation\n\n\nclass StrawberryAutoMeta(type):\n \"\"\"Metacla...
[ { "content": "from __future__ import annotations\n\nfrom typing import Any, Optional, Union, cast\n\nfrom typing_extensions import Annotated, get_args, get_origin\n\nfrom strawberry.type import StrawberryType\n\nfrom .annotation import StrawberryAnnotation\n\n\nclass StrawberryAutoMeta(type):\n \"\"\"Metacla...
diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..d3956a9cdf --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,4 @@ +Release type: patch + +This release adds an initial fix to make `strawberry.auto` work when using +`from __future__ import annotations`. diff --git a/strawberry/auto.py b/strawberry/aut...
Rapptz__discord.py-1745
Using wait=True in webhook.execute raises AttributeError Title. Here's the code (using eval command) and traceback in case. ```py webhook = (await ctx.channel.webhooks())[0] msg = await webhook.execute("test", wait=True) ``` ``` Traceback (most recent call last): File "/home/nguuuquaaa/bot/Belphegor/belpheg...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2017 Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, includin...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2017 Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, includin...
diff --git a/discord/webhook.py b/discord/webhook.py index 0dfe6ba6281a..a4f84632a45c 100644 --- a/discord/webhook.py +++ b/discord/webhook.py @@ -100,7 +100,7 @@ def handle_execution_response(self, data, *, wait): """ raise NotImplementedError() - def _store_user(self, data): + def store_user...
Zeroto521__my-data-toolkit-467
TYP: specific `None` type <!-- Thanks for contributing a pull request! Please follow these standard acronyms to start the commit message: - ENH: enhancement - BUG: bug fix - DOC: documentation - TYP: type annotations - TST: addition or modification of tests - MAINT: maintenance commit (refactoring, typos, e...
[ { "content": "from __future__ import annotations\n\nfrom textwrap import dedent\nfrom typing import TYPE_CHECKING\n\nimport pandas as pd\nfrom pandas.util._decorators import doc\nfrom pandas.util._validators import validate_bool_kwarg\n\nfrom dtoolkit.accessor.register import register_series_method\n\nif TYPE_C...
[ { "content": "from __future__ import annotations\n\nfrom textwrap import dedent\nfrom typing import TYPE_CHECKING\n\nimport pandas as pd\nfrom pandas.util._decorators import doc\nfrom pandas.util._validators import validate_bool_kwarg\n\nfrom dtoolkit.accessor.register import register_series_method\n\nif TYPE_C...
diff --git a/dtoolkit/accessor/series.py b/dtoolkit/accessor/series.py index b8481bd44..3597e58ad 100644 --- a/dtoolkit/accessor/series.py +++ b/dtoolkit/accessor/series.py @@ -382,7 +382,7 @@ def lens(s: pd.Series, number: int = 1, other: int = None) -> pd.Series: Parameters ---------- - number : int or...
sktime__sktime-6019
[BUG] `BaseRegressor.score` method fails with `sklearn.metrics r2_score got an unexpected keyword argument 'normalize'` **Describe the bug** When using ResNetRegressor score (also tested with FCNRegressor and same bug) you got a sklearn.metrics error. TypeError: got an unexpected keyword argument 'normalize' **T...
[ { "content": "# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\"\"\"Abstract base class for time series regressors.\n\n class name: BaseRegressor\n\nDefining methods:\n fitting - fit(self, X, y)\n predicting - predict(self, X)\n\nInherited inspection methods:\n ...
[ { "content": "# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\"\"\"Abstract base class for time series regressors.\n\n class name: BaseRegressor\n\nDefining methods:\n fitting - fit(self, X, y)\n predicting - predict(self, X)\n\nInherited inspection methods:\n ...
diff --git a/.all-contributorsrc b/.all-contributorsrc index 7f4681438ca..0f7a286d3e4 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -2590,7 +2590,9 @@ "avatar_url": "https://avatars.githubusercontent.com/u/69190238?v=4", "profile": "https://cyrilmeyer.eu/", "contributions": [ - ...
jupyter__docker-stacks-1859
[BUG] - Health Check fails if you change the port jupyter runs on ### What docker image(s) are you using? minimal-notebook ### OS system and architecture running docker image RHEL7 docker swarm ### What Docker command are you running? Not really relevant, but I need to run it in a docker swarm, with a g...
[ { "content": "# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n# mypy: ignore-errors\nimport os\nimport stat\nimport subprocess\n\nfrom jupyter_core.paths import jupyter_data_dir\n\nc = get_config() # noqa: F821\nc.ServerApp.ip = \"0.0.0.0\"\nc.ServerApp.po...
[ { "content": "# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n# mypy: ignore-errors\nimport os\nimport stat\nimport subprocess\n\nfrom jupyter_core.paths import jupyter_data_dir\n\nc = get_config() # noqa: F821\nc.ServerApp.ip = \"0.0.0.0\"\nc.ServerApp.op...
diff --git a/base-notebook/Dockerfile b/base-notebook/Dockerfile index 9804ddb251..9f3d226df1 100644 --- a/base-notebook/Dockerfile +++ b/base-notebook/Dockerfile @@ -47,7 +47,8 @@ RUN mamba install --quiet --yes \ fix-permissions "${CONDA_DIR}" && \ fix-permissions "/home/${NB_USER}" -EXPOSE 8888 +ENV JUPY...
spotify__luigi-1809
Terminal Width affects Lock identification under Centos 6.5 The luigi.lock.getpcmd function will return a shorter command line if the terminal is smaller in width. This can result in locks being misidentified as identical and can be a significant problem if your binary/scripts are located in deep paths. Presumably the...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\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#\n# Copyright 2012-2015 Spotify AB\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/luigi/lock.py b/luigi/lock.py index cf73f1279b..702629184f 100644 --- a/luigi/lock.py +++ b/luigi/lock.py @@ -42,7 +42,7 @@ def getpcmd(pid): _, val = lines return val else: - cmd = 'ps -xo pid,args' + cmd = 'ps x -wwo pid,args' with os.popen(cm...
xorbitsai__inference-1096
ENH: Add the option to use CPU to inference even there is GPU device ### Is your feature request related to a problem? Please describe There is a GPU in my server, but when load some LLM model, I need load it into my memory because the model size is bigger than GPU memory. However, when I launch the model from web...
[ { "content": "# Copyright 2022-2023 XProbe 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# Unless required by ap...
[ { "content": "# Copyright 2022-2023 XProbe 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# Unless required by ap...
diff --git a/xinference/device_utils.py b/xinference/device_utils.py index 731c6ae051..035391ccb4 100644 --- a/xinference/device_utils.py +++ b/xinference/device_utils.py @@ -92,8 +92,6 @@ def gpu_count(): ) return min(torch.cuda.device_count(), len(cuda_visible_devices)) - elif torch.backends.mp...
freedomofpress__securedrop-5369
doc-linkcheck needs some appeasement ## Description We have a [CI failure because of a link to a private repo](https://app.circleci.com/jobs/github/freedomofpress/securedrop/42146). ## Steps to Reproduce Run `make docs-linkcheck`. ## Expected Behavior That it would complete with no error. ## Actual B...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# SecureDrop documentation build configuration file, created by\n# sphinx-quickstart on Tue Oct 13 12:08:52 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# SecureDrop documentation build configuration file, created by\n# sphinx-quickstart on Tue Oct 13 12:08:52 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in...
diff --git a/docs/conf.py b/docs/conf.py index 46b973917e..c11c77fac9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -309,4 +309,5 @@ r'http://localhost(:\d+)?/?', 'https://forum.securedrop.org/admin/users/list/active', 'https://weblate.securedrop.org/projects/securedrop/securedrop/#repository', + 'https://g...
huggingface__accelerate-177
TypeError: Can't apply _send_to_device on object of type <class 'int'>, only of nested list/tuple/dicts of objects that satisfy _has_to_method. When I use 0.4.0 version , it is ok. But it is error when using 0.5.1 version. And the data is a dict, including tensor and List[List[int]]
[ { "content": "# Copyright 2021 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#...
[ { "content": "# Copyright 2021 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#...
diff --git a/src/accelerate/utils.py b/src/accelerate/utils.py index e25b80c4976..28a38539adb 100644 --- a/src/accelerate/utils.py +++ b/src/accelerate/utils.py @@ -201,7 +201,7 @@ def _send_to_device(t, device): def _has_to_method(t): return hasattr(t, "to") - return recursively_apply(_send_to_devic...
readthedocs__readthedocs.org-10947
Teams: project form doesn't allow for null/empty project list I found trying to remove a project from a team that it was impossible to remove the project if it was the last project attached to the team. The form expects some non-null value and throws a validation error if the list is empty. To reproduce: - Add a ...
[ { "content": "\"\"\"Organization forms.\"\"\"\nfrom django import forms\nfrom django.contrib.auth.models import User\nfrom django.core.exceptions import NON_FIELD_ERRORS, ValidationError\nfrom django.core.validators import EmailValidator\nfrom django.db.models import Q\nfrom django.utils.translation import gett...
[ { "content": "\"\"\"Organization forms.\"\"\"\nfrom django import forms\nfrom django.contrib.auth.models import User\nfrom django.core.exceptions import NON_FIELD_ERRORS, ValidationError\nfrom django.core.validators import EmailValidator\nfrom django.db.models import Q\nfrom django.utils.translation import gett...
diff --git a/readthedocs/organizations/forms.py b/readthedocs/organizations/forms.py index 0120c05ae5a..85fc7ae3818 100644 --- a/readthedocs/organizations/forms.py +++ b/readthedocs/organizations/forms.py @@ -208,6 +208,7 @@ def __init__(self, *args, **kwargs): self.fields["projects"] = forms.ModelMultipleChoi...
vyperlang__vyper-2905
Missing @view decorator for interface ERC20Detailed.py ### Version Information * vyper Version (output of `vyper --version`): 0.3.3 * OS: linux * Python Version (output of `python --version`): Python 3.9.5 ### What's your issue about? **Issue** Error using `ERC20Detailed.py` as an interface to a vyper class. Tryi...
[ { "content": "\"\"\"\nNOTE: interface uses `String[1]` where 1 is the lower bound of the string returned by the function.\n For end-users this means they can't use `implements: ERC20Detailed` unless their implementation\n uses a value n >= 1. Regardless this is fine as one can't do String[0] where n == 0....
[ { "content": "\"\"\"\nNOTE: interface uses `String[1]` where 1 is the lower bound of the string returned by the function.\n For end-users this means they can't use `implements: ERC20Detailed` unless their implementation\n uses a value n >= 1. Regardless this is fine as one can't do String[0] where n == 0....
diff --git a/vyper/builtin_interfaces/ERC20Detailed.py b/vyper/builtin_interfaces/ERC20Detailed.py index 23f4a8a844..03dd597e8a 100644 --- a/vyper/builtin_interfaces/ERC20Detailed.py +++ b/vyper/builtin_interfaces/ERC20Detailed.py @@ -5,14 +5,17 @@ """ interface_code = """ +@view @external def name() -> String[1]...
ivy-llc__ivy-14109
frombuffer
[ { "content": "# local\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes\nfrom ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back\n\n\n@to_ivy_arrays_and_back\ndef empty(\n *args,\n size=None,\n out=None,\n dtype=None,\n layout=None,\n device=None,\n re...
[ { "content": "# local\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes\nfrom ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back\n\n\n@to_ivy_arrays_and_back\ndef empty(\n *args,\n size=None,\n out=None,\n dtype=None,\n layout=None,\n device=None,\n re...
diff --git a/ivy/functional/frontends/torch/creation_ops.py b/ivy/functional/frontends/torch/creation_ops.py index 458d7e00a8de8..8231d6368b7fc 100644 --- a/ivy/functional/frontends/torch/creation_ops.py +++ b/ivy/functional/frontends/torch/creation_ops.py @@ -285,3 +285,15 @@ def asarray( copy=None, ): retu...
pymedusa__Medusa-1543
[APP SUBMITTED]: ==================================================================== ### INFO **Python Version**: `2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)]` **Operating System**: `Windows-8.1-6.3.9600` **Locale**: `cp1252` **Branch**: [master](../tree/master) **Commit**: PyMedu...
[ { "content": "# coding=utf-8\n# Author: Nic Wolfe <nic@wolfeden.ca>\n#\n# This file is part of Medusa.\n#\n# Medusa 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...
[ { "content": "# coding=utf-8\n# Author: Nic Wolfe <nic@wolfeden.ca>\n#\n# This file is part of Medusa.\n#\n# Medusa 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...
diff --git a/medusa/process_tv.py b/medusa/process_tv.py index 439becf959..8969357c02 100644 --- a/medusa/process_tv.py +++ b/medusa/process_tv.py @@ -652,6 +652,9 @@ def subtitles_enabled(*args): :rtype: bool """ for name in args: + if not name: + continue + try: ...
mkdocs__mkdocs-694
current_page.ancestors only contains direct ancestor and not the full path of the page I'm using the mkdocs theme and tried to enhance it with a breadcrumb trail. The page navigation is created automatically by mkdocs (I don't use the pages confguration since I have almost 300 pages). I copied and adapted the `breadcru...
[ { "content": "# coding: utf-8\n\n\"\"\"\nDeals with generating the site-wide navigation.\n\nThis consists of building a set of interlinked page and header objects.\n\"\"\"\n\nfrom __future__ import unicode_literals\nimport datetime\nimport logging\nimport os\n\nfrom mkdocs import utils, exceptions\n\nlog = logg...
[ { "content": "# coding: utf-8\n\n\"\"\"\nDeals with generating the site-wide navigation.\n\nThis consists of building a set of interlinked page and header objects.\n\"\"\"\n\nfrom __future__ import unicode_literals\nimport datetime\nimport logging\nimport os\n\nfrom mkdocs import utils, exceptions\n\nlog = logg...
diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md index 72c1604487..9418d6e7a3 100644 --- a/docs/about/release-notes.md +++ b/docs/about/release-notes.md @@ -50,6 +50,8 @@ themes theme. (#631) * Bugfix: Ensure consistent ordering of auto-populated pages. (#638) * Bugfix: Scroll the TOC on the ...
GeotrekCE__Geotrek-admin-1571
Error - SHAPE export Trying to export TRAILS as a shape, send some errors emails to ADMIN : [Geotrek] ERROR: GDAL_ERROR 1: Field id of width 255 truncated to 254. [Geotrek] ERROR: GDAL_ERROR 1: Field name of width 255 truncated to 254. [Geotrek] ERROR: GDAL_ERROR 1: Field departure of width 255 truncated to 254. [...
[ { "content": "import os\nimport logging\n\nfrom django.conf import settings\nfrom django.contrib.gis.db import models\nfrom django.core.exceptions import ValidationError\nfrom django.core.validators import MinValueValidator\nfrom django.template.defaultfilters import slugify\nfrom django.utils.translation impor...
[ { "content": "import os\nimport logging\n\nfrom django.conf import settings\nfrom django.contrib.gis.db import models\nfrom django.core.exceptions import ValidationError\nfrom django.core.validators import MinValueValidator\nfrom django.template.defaultfilters import slugify\nfrom django.utils.translation impor...
diff --git a/conf/buildout.cfg b/conf/buildout.cfg index e6542ec3fd..fb7898606a 100644 --- a/conf/buildout.cfg +++ b/conf/buildout.cfg @@ -69,7 +69,7 @@ paths = ${django:staticroot} [omelette] recipe = collective.recipe.omelette # We need mapentity templates and static dirs -eggs = +eggs = mapentity djang...
google__jax-5751
jax.devices() behaves unintuitively Hi! I noticed some unexpected (?) behaviour in the following code: ```python import jax from jax.config import config config.update("jax_backend_target", 'grpc://some endpoint:8470') config.update("jax_xla_backend", 'tpu_driver') print(jax.devices('cpu')) #prints tpu devices i...
[ { "content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
[ { "content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
diff --git a/jax/lib/xla_bridge.py b/jax/lib/xla_bridge.py index aba3c6615edc..a292730c3db2 100644 --- a/jax/lib/xla_bridge.py +++ b/jax/lib/xla_bridge.py @@ -144,7 +144,9 @@ def _get_local_backend(platform=None): _tpu_backend = None def _get_tpu_driver_backend(platform): - del platform + if platform == "cpu": + ...
scikit-hep__pyhf-1524
jaxlib v0.1.68 breaks CI with segfault on macOS # Description On 2021-06-22 the scheduled nightly CI for `v0.6.2` [was passing](https://github.com/scikit-hep/pyhf/actions/runs/962645978) and had installed libraries [pass-pip-list.txt](https://github.com/scikit-hep/pyhf/files/6713928/pass-pip-list.txt). Then on 2021-...
[ { "content": "from setuptools import setup\n\nextras_require = {\n 'shellcomplete': ['click_completion'],\n 'tensorflow': [\n 'tensorflow~=2.2.1', # TensorFlow minor releases are as volatile as major\n 'tensorflow-probability~=0.10.1',\n ],\n 'torch': ['torch~=1.8'],\n 'jax': ['jax...
[ { "content": "from setuptools import setup\n\nextras_require = {\n 'shellcomplete': ['click_completion'],\n 'tensorflow': [\n 'tensorflow~=2.2.1', # TensorFlow minor releases are as volatile as major\n 'tensorflow-probability~=0.10.1',\n ],\n 'torch': ['torch~=1.8'],\n 'jax': ['jax...
diff --git a/setup.py b/setup.py index 55a4de07c7..036df19c41 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ 'tensorflow-probability~=0.10.1', ], 'torch': ['torch~=1.8'], - 'jax': ['jax~=0.2.8', 'jaxlib~=0.1.58,<0.1.68'], + 'jax': ['jax~=0.2.8', 'jaxlib~=0.1.58,!=0.1.68'], # c.f. Issue 1...
pwndbg__pwndbg-958
xinfo command doesn't like anonymous page names The naming of anonymous memory pages introduced in 462eb53 is cool but it doesn't play nicely with the `xinfo` command. The following figure shows `xinfo` behaving correctly when displaying info on a regular mapping, followed by an error when used with an anonymous mappi...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nRoutines to enumerate mapped memory, and attempt to associate\naddress ranges with various ELF files and permissions.\n\nThe reason that we need robustness is that not every operating\nsystem has /proc/$$/maps, which backs 'info proc mapping'...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nRoutines to enumerate mapped memory, and attempt to associate\naddress ranges with various ELF files and permissions.\n\nThe reason that we need robustness is that not every operating\nsystem has /proc/$$/maps, which backs 'info proc mapping'...
diff --git a/pwndbg/vmmap.py b/pwndbg/vmmap.py index 9f7604c3bd1..456603b0ecc 100644 --- a/pwndbg/vmmap.py +++ b/pwndbg/vmmap.py @@ -212,7 +212,7 @@ def proc_pid_maps(): try: inode, objfile = inode_objfile.split(None, 1) except: - objfile = 'anon_' + start[:-3] + obj...
ivy-llc__ivy-22625
remainder
[ { "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 b621b83084113..fda3fc4d9ff1a 100644 --- a/ivy/functional/frontends/paddle/tensor/tensor.py +++ b/ivy/functional/frontends/paddle/tensor/tensor.py @@ -654,3 +654,7 @@ def std(self, axis=None, unbiased=T...
akvo__akvo-rsr-2137
Bug in project document category API ## Test plan The project_document_category should not give an error. E.g. `http://rsr.localdev.akvo.org/rest/v1/project_document_category/` should load. ## Issue description The project document category API gives an error. See http://sentry.support.akvo-ops.org/rsr/test/group/879...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\n\nfrom akv...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\n\nfrom akv...
diff --git a/akvo/rest/views/project_document.py b/akvo/rest/views/project_document.py index a91a48968e..705e1df3ba 100644 --- a/akvo/rest/views/project_document.py +++ b/akvo/rest/views/project_document.py @@ -24,3 +24,4 @@ class ProjectDocumentCategoryViewSet(PublicProjectViewSet): queryset = ProjectDocumentCate...
pypi__warehouse-3056
Disable 'delete confirm' button until confirmation word is correct We currently have a modal on `warehouse/templates/manage/settings.html`, that allows the user to confirm that they want to delete their project: ![screenshot from 2018-02-03 14-43-29](https://user-images.githubusercontent.com/3323703/35768242-9dcfc21...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
diff --git a/.babelrc b/.babelrc index 002b4aa0d58e..10966c1f5a0c 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,4 @@ { - "presets": ["env"] + "presets": ["env"], + "plugins": ["transform-class-properties"] } diff --git a/Gulpfile.babel.js b/Gulpfile.babel.js index 238b8a446aa1..dfdc96153cb8 100644 --- a/Gulpfile...
netket__netket-897
[input validation] nk.graph.Chain([L]) does not fial nk.graph.Chain([L]) should fail, but does not, and leads to failure later that it took me a while to realise... We should validate the input to be an integer. ```python >>> graph = nk.graph.Chain([L]) >>> sgb = graph.space_group_builder() >>> sgb.little_grou...
[ { "content": "# Copyright 2021 The NetKet Authors - All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n...
[ { "content": "# Copyright 2021 The NetKet Authors - All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n...
diff --git a/netket/graph/common_lattices.py b/netket/graph/common_lattices.py index 831e9037ab..a3c74eb76b 100644 --- a/netket/graph/common_lattices.py +++ b/netket/graph/common_lattices.py @@ -140,6 +140,8 @@ def Hypercube(length: int, n_dim: int = 1, *, pbc: bool = True) -> Lattice: >>> print(g.n_nodes) ...
conda__conda-3538
Invalid JSON output When installing `Jupyter` I sometimes see the following error: ``` post-link :: /etc/machine-id not found .. bus post-link :: .. using /proc/sys/kernel/random/boot_id ``` When installing with the `--json` flag the error output causes the json to be invalid. Example: ``` root@head:~# conda create...
[ { "content": "# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\"\"\" This module contains:\n * all low-level code for extracting...
[ { "content": "# (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\"\"\" This module contains:\n * all low-level code for extracting...
diff --git a/conda/install.py b/conda/install.py index 128194407c5..f73050c2e32 100644 --- a/conda/install.py +++ b/conda/install.py @@ -1046,7 +1046,8 @@ def messages(prefix): path = join(prefix, '.messages.txt') try: with open(path) as fi: - sys.stdout.write(fi.read()) + fh = ...
frappe__hrms-1526
Organizational Chart: Total connections includes employees left ### Information about bug <img width="329" alt="Screenshot 2024-03-08 at 11 20 37 AM" src="https://github.com/frappe/hrms/assets/20027965/b88248f8-502e-41fa-ba1a-87c0cd43165a"> The current system displays a total count of connections for each employee,...
[ { "content": "import frappe\nfrom frappe.query_builder.functions import Count\n\n\n@frappe.whitelist()\ndef get_children(parent=None, company=None, exclude_node=None):\n\tfilters = [[\"status\", \"=\", \"Active\"]]\n\tif company and company != \"All Companies\":\n\t\tfilters.append([\"company\", \"=\", company]...
[ { "content": "import frappe\nfrom frappe.query_builder.functions import Count\n\n\n@frappe.whitelist()\ndef get_children(parent=None, company=None, exclude_node=None):\n\tfilters = [[\"status\", \"=\", \"Active\"]]\n\tif company and company != \"All Companies\":\n\t\tfilters.append([\"company\", \"=\", company]...
diff --git a/hrms/hr/page/organizational_chart/organizational_chart.py b/hrms/hr/page/organizational_chart/organizational_chart.py index b8bfce5dc4..8be4802104 100644 --- a/hrms/hr/page/organizational_chart/organizational_chart.py +++ b/hrms/hr/page/organizational_chart/organizational_chart.py @@ -43,7 +43,7 @@ def get...