in_source_id
stringlengths
13
58
issue
stringlengths
3
241k
before_files
listlengths
0
3
after_files
listlengths
0
3
pr_diff
stringlengths
109
107M
conda__conda-build-537
GIT_DESCRIBE_TAG isn't set when the .git is a file Sometimes the .git directory is actually a file. This happens, for example, when you have a git submodule. This causes this test to fail incorrectly: https://github.com/conda/conda-build/blob/master/conda_build/environ.py#L36 Unfortunately, the .git file might point...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport sys\nfrom os.path import join\nimport subprocess\nimport multiprocessing\n\nimport conda.config as cc\n\nfrom conda_build.config import config\n\nfrom conda_build import source\n\n\ndef get_perl_ver():\n retur...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport sys\nfrom os.path import join\nimport subprocess\nimport multiprocessing\n\nimport conda.config as cc\n\nfrom conda_build.config import config\n\nfrom conda_build import source\n\n\ndef get_perl_ver():\n retur...
diff --git a/conda_build/environ.py b/conda_build/environ.py index d3dc2ca6f6..2d7d4cb680 100644 --- a/conda_build/environ.py +++ b/conda_build/environ.py @@ -33,7 +33,7 @@ def get_git_build_info(src_dir): env = os.environ.copy() d = {} git_dir = join(src_dir, '.git') - if os.path.isdir(git_dir): + ...
python__mypy-16229
Add setuptools as a dependency on Python 3.12? Mypyc needs `distutils` or `setuptools` to run, but Python 3.12 no longer bundles `distutils` ([PEP 632](https://peps.python.org/pep-0632/)). This seems to imply that we need to include `setuptools` as a dependency of mypy (at least on Python 3.12 or later), or unbundle my...
[ { "content": "#!/usr/bin/env python\n\nfrom __future__ import annotations\n\nimport glob\nimport os\nimport os.path\nimport sys\nfrom typing import TYPE_CHECKING, Any\n\nif sys.version_info < (3, 8, 0): # noqa: UP036\n sys.stderr.write(\"ERROR: You need Python 3.8 or later to use mypy.\\n\")\n exit(1)\n\...
[ { "content": "#!/usr/bin/env python\n\nfrom __future__ import annotations\n\nimport glob\nimport os\nimport os.path\nimport sys\nfrom typing import TYPE_CHECKING, Any\n\nif sys.version_info < (3, 8, 0):\n sys.stderr.write(\"ERROR: You need Python 3.8 or later to use mypy.\\n\")\n exit(1)\n\n# we'll import...
diff --git a/mypyc/doc/getting_started.rst b/mypyc/doc/getting_started.rst index 2db8aae149ec..adc617419ffa 100644 --- a/mypyc/doc/getting_started.rst +++ b/mypyc/doc/getting_started.rst @@ -38,17 +38,17 @@ Installation ------------ Mypyc is shipped as part of the mypy distribution. Install mypy like -this (you nee...
microsoft__DeepSpeed-2698
[BUG] the `benchmarks` folder is included upon installation I noticed that while inspecting the conda package during my attempt to create a conda forge build. ![image](https://user-images.githubusercontent.com/528003/211929466-436decd1-a733-4db6-8a67-c948736575a5.png) The fix is likely as simple as adding `benchm...
[ { "content": "\"\"\"\nCopyright 2020 The Microsoft DeepSpeed Team\n\nDeepSpeed library\n\nTo build wheel on Windows:\n 1. Install pytorch, such as pytorch 1.12 + cuda 11.6\n 2. Install visual cpp build tool\n 3. Include cuda toolkit\n 4. Launch cmd console with Administrator privilege for creating r...
[ { "content": "\"\"\"\nCopyright 2020 The Microsoft DeepSpeed Team\n\nDeepSpeed library\n\nTo build wheel on Windows:\n 1. Install pytorch, such as pytorch 1.12 + cuda 11.6\n 2. Install visual cpp build tool\n 3. Include cuda toolkit\n 4. Launch cmd console with Administrator privilege for creating r...
diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml index 6ebd9c6d1e9f..f05f3056994b 100644 --- a/.github/workflows/formatting.yml +++ b/.github/workflows/formatting.yml @@ -22,8 +22,10 @@ jobs: steps: - uses: actions/checkout@v2 - - id: setup-venv - uses: ./.githu...
sopel-irc__sopel-555
Configuration error with python 3.3 On the first run of willie 4.4.1, installed from pip, the configuration file can't be created due to the use of raw_input(), function replaced by input() in python3. here is the error : ``` bash Welcome to Willie! I can't seem to find the configuration file, so let's generate it! ...
[ { "content": "# coding=utf8\n\"\"\"\n*Availability: 3+ for all functions; attributes may vary.*\n\nThe config class is an abstraction class for accessing the active Willie\nconfiguration file.\n\nThe Willie config file is divided to sections, and each section contains keys\nand values. A section is an attribute...
[ { "content": "# coding=utf8\n\"\"\"\n*Availability: 3+ for all functions; attributes may vary.*\n\nThe config class is an abstraction class for accessing the active Willie\nconfiguration file.\n\nThe Willie config file is divided to sections, and each section contains keys\nand values. A section is an attribute...
diff --git a/willie/config.py b/willie/config.py index 092e674e0f..9db78041ff 100644 --- a/willie/config.py +++ b/willie/config.py @@ -53,6 +53,7 @@ if sys.version_info.major >= 3: unicode = str basestring = str + raw_input = input class ConfigurationError(Exception): """ Exception type for config...
xonsh__xonsh-4631
Interactive printing fails for objects that implement hasattr in a non-standard way Interactive printing fails for objects that implement `hasattr` in a non-standard way. For example, in the popular [BeautifulSoup](https://pypi.org/project/beautifulsoup4/) library, some objects have a `getattr` implementation that alw...
[ { "content": "\"\"\"\nPython advanced pretty printer. This pretty printer is intended to\nreplace the old `pprint` python module which does not allow developers\nto provide their own pretty print callbacks.\n\nThis module is based on ruby's `prettyprint.rb` library by `Tanaka Akira`.\n\nThe following implement...
[ { "content": "\"\"\"\nPython advanced pretty printer. This pretty printer is intended to\nreplace the old `pprint` python module which does not allow developers\nto provide their own pretty print callbacks.\n\nThis module is based on ruby's `prettyprint.rb` library by `Tanaka Akira`.\n\nThe following implement...
diff --git a/xonsh/pretty.py b/xonsh/pretty.py index 23013a9df2..f0e1536f57 100644 --- a/xonsh/pretty.py +++ b/xonsh/pretty.py @@ -118,7 +118,7 @@ def pretty( """ Pretty print the object's representation. """ - if hasattr(obj, "xonsh_display"): + if _safe_getattr(obj, "xonsh_display"): ret...
sktime__sktime-556
[DOC] SlidingWindowSplitter start_with_window default value not consistent #### Describe the issue linked to the documentation https://github.com/alan-turing-institute/sktime/blob/139b9291fb634cce367f714a6132212b0172e199/sktime/forecasting/model_selection/_split.py#L174 It looks like the default value of start_wi...
[ { "content": "#!/usr/bin/env python3 -u\n# -*- coding: utf-8 -*-\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\n__all__ = [\n \"SlidingWindowSplitter\",\n \"CutoffSplitter\",\n \"SingleWindowSplitter\",\n \"temporal_train_test_split\",\n]\n__author__ = [\"Markus Löning\"...
[ { "content": "#!/usr/bin/env python3 -u\n# -*- coding: utf-8 -*-\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\n__all__ = [\n \"SlidingWindowSplitter\",\n \"CutoffSplitter\",\n \"SingleWindowSplitter\",\n \"temporal_train_test_split\",\n]\n__author__ = [\"Markus Löning\"...
diff --git a/.all-contributorsrc b/.all-contributorsrc index 3cdf7415418..cd1c417af59 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -717,7 +717,8 @@ "profile": "https://github.com/ngupta23", "contributions": [ "code", - "bug" + "bug", + "doc" ] }, ...
scikit-hep__pyhf-1790
Guard SCHEMA_VERSION from version bumps I don't think it is going to be possible to guard the `SCHEMA_VERSION` from `bump2version` so we might need to look for a replacement for `bump2version` that gives guard support. This is going to be a problem when https://github.com/scikit-hep/pyhf/blob/6b0a9317b14da2a452f...
[ { "content": "from setuptools import setup\n\nextras_require = {\n 'shellcomplete': ['click_completion'],\n 'tensorflow': [\n 'tensorflow>=2.3.1', # c.f. https://github.com/tensorflow/tensorflow/pull/40789\n 'tensorflow-probability>=0.11.0', # c.f. PR #1657\n ],\n 'torch': ['torch>=1...
[ { "content": "from setuptools import setup\n\nextras_require = {\n 'shellcomplete': ['click_completion'],\n 'tensorflow': [\n 'tensorflow>=2.3.1', # c.f. https://github.com/tensorflow/tensorflow/pull/40789\n 'tensorflow-probability>=0.11.0', # c.f. PR #1657\n ],\n 'torch': ['torch>=1...
diff --git a/setup.py b/setup.py index 52dbd81742..9fb006aeb5 100644 --- a/setup.py +++ b/setup.py @@ -68,7 +68,7 @@ + extras_require['test'] + [ 'nbdime', - 'bump2version', + 'tbump>=6.7.0', 'ipython', 'pre-commit', 'check-mani...
joke2k__faker-512
Using É, é (e-acute) in emails. It looks that É, é (e-acute) symbols are not appropriate for valid email. I used https://pypi.python.org/pypi/robotframework-faker/ which uses this library and the following email was returned: andré38@mentzel.net But email verification was failed for this email. Could you remove...
[ { "content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\nfrom .. import Provider as InternetProvider\n\nclass Provider(InternetProvider):\n\n free_email_domains = (\n 'aol.de', 'gmail.com', 'gmx.de', 'googlemail.com', 'hotmail.de',\n 'web.de', 'yahoo.de',\n )\n tlds = ('co...
[ { "content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\nfrom .. import Provider as InternetProvider\n\nclass Provider(InternetProvider):\n\n free_email_domains = (\n 'aol.de', 'gmail.com', 'gmx.de', 'googlemail.com', 'hotmail.de',\n 'web.de', 'yahoo.de',\n )\n tlds = ('co...
diff --git a/faker/providers/internet/de_DE/__init__.py b/faker/providers/internet/de_DE/__init__.py index 76aaec7ddf..231d57aa0f 100644 --- a/faker/providers/internet/de_DE/__init__.py +++ b/faker/providers/internet/de_DE/__init__.py @@ -15,5 +15,7 @@ class Provider(InternetProvider): ('ä', 'ae'), ('Ä', 'Ae')...
openstates__openstates-scrapers-2982
OR failing since at least 2019-06-09 OR has been failing since 2019-06-09 Based on automated runs it appears that OR has not run successfully in 2 days (2019-06-09). ``` loaded Open States pupa settings... or (scrape, import) bills: {} votes: {} 08:01:13 CRITICAL pupa: Session(s) 2019-2020 Interim were reporte...
[ { "content": "from pupa.scrape import Jurisdiction, Organization\nfrom .people import ORPersonScraper\n# from .committees import ORCommitteeScraper\nfrom .bills import ORBillScraper\nfrom .votes import ORVoteScraper\n\n\nclass Oregon(Jurisdiction):\n division_id = \"ocd-division/country:us/state:or\"\n cl...
[ { "content": "from pupa.scrape import Jurisdiction, Organization\nfrom .people import ORPersonScraper\n# from .committees import ORCommitteeScraper\nfrom .bills import ORBillScraper\nfrom .votes import ORVoteScraper\n\n\nclass Oregon(Jurisdiction):\n division_id = \"ocd-division/country:us/state:or\"\n cl...
diff --git a/openstates/or/__init__.py b/openstates/or/__init__.py index 2630876cc0..18c4f1eaa6 100644 --- a/openstates/or/__init__.py +++ b/openstates/or/__init__.py @@ -108,6 +108,7 @@ class Oregon(Jurisdiction): ] ignored_scraped_sessions = [ "Today", + "2019-2020 Interim", "2017-2...
chainer__chainer-8219
pytest is causing error in Jenkins Example: https://jenkins.preferred.jp/job/chainer/job/chainer_pr/2162/TEST=CHAINERX_chainer-py3,label=mn1-p100/console ``` 14:33:27 + pytest -rfEX --showlocals -m 'not slow and not ideep' /repo/tests/chainer_tests 14:33:28 Traceback (most recent call last): 14:33:28 File "/...
[ { "content": "#!/usr/bin/env python\n\nimport os\nimport pkg_resources\nimport sys\n\nfrom setuptools import setup\n\nimport chainerx_build_helper\n\n\nif sys.version_info[:3] == (3, 5, 0):\n if not int(os.getenv('CHAINER_PYTHON_350_FORCE', '0')):\n msg = \"\"\"\nChainer does not work with Python 3.5....
[ { "content": "#!/usr/bin/env python\n\nimport os\nimport pkg_resources\nimport sys\n\nfrom setuptools import setup\n\nimport chainerx_build_helper\n\n\nif sys.version_info[:3] == (3, 5, 0):\n if not int(os.getenv('CHAINER_PYTHON_350_FORCE', '0')):\n msg = \"\"\"\nChainer does not work with Python 3.5....
diff --git a/setup.py b/setup.py index 61bce8169532..2fabb8e706f1 100644 --- a/setup.py +++ b/setup.py @@ -45,6 +45,7 @@ ], 'test': [ 'pytest<4.2.0', # 4.2.0 is slow collecting tests and times out on CI. + 'attrs<19.2.0', # pytest 4.1.1 does not run with attrs==19.2.0 'mock', ]...
redis__redis-py-1069
AttributeError: 'UnixDomainSocketConnection' object has no attribute '_buffer_cutoff' Since version 3.0, redis client seems broken. I cannot even get, set or keys() anything when connecting to unix socket. I tried running it in a docker container running centos 7.5.1804 core using python3.6. Steps to reproduce: ins...
[ { "content": "from __future__ import unicode_literals\nfrom distutils.version import StrictVersion\nfrom itertools import chain\nimport io\nimport os\nimport socket\nimport sys\nimport threading\nimport warnings\n\ntry:\n import ssl\n ssl_available = True\nexcept ImportError:\n ssl_available = False\n\...
[ { "content": "from __future__ import unicode_literals\nfrom distutils.version import StrictVersion\nfrom itertools import chain\nimport io\nimport os\nimport socket\nimport sys\nimport threading\nimport warnings\n\ntry:\n import ssl\n ssl_available = True\nexcept ImportError:\n ssl_available = False\n\...
diff --git a/redis/connection.py b/redis/connection.py index b38f24c42d..9b949c5c08 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -759,6 +759,7 @@ def __init__(self, path='', db=0, password=None, 'db': self.db, } self._connect_callbacks = [] + self._buffer_cutoff = ...
hylang__hy-1201
fix setup.py at least hy.extra is missing from package data
[ { "content": "#!/usr/bin/env python\n# Copyright (c) 2012, 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, incl...
[ { "content": "#!/usr/bin/env python\n# Copyright (c) 2012, 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, incl...
diff --git a/setup.py b/setup.py index 3fc2be325..a64cb7b80 100755 --- a/setup.py +++ b/setup.py @@ -71,6 +71,7 @@ package_data={ 'hy.contrib': ['*.hy'], 'hy.core': ['*.hy'], + 'hy.extra': ['*.hy'], }, author="Paul Tagliamonte", author_email="tag@pault.ag",
DataBiosphere__toil-4011
We're getting the new Werkzeug without asking for it CI for the merge https://github.com/DataBiosphere/toil/commit/0e256d63cb974a87b8f6b807bf7d23bc9a12fb76 failed at the lint stage, because the merge commit ends up installing a different Werkzeug than the PR's test run did, and the new one has type hints, which upsets ...
[ { "content": "# Modified from: https://github.com/common-workflow-language/workflow-service\nimport functools\nimport json\nimport os\nimport logging\nimport tempfile\nfrom abc import abstractmethod\nfrom typing import Optional, List, Dict, Any, Tuple, Callable\nfrom urllib.parse import urldefrag\n\nimport conn...
[ { "content": "# Modified from: https://github.com/common-workflow-language/workflow-service\nimport functools\nimport json\nimport os\nimport logging\nimport tempfile\nfrom abc import abstractmethod\nfrom typing import Optional, List, Dict, Any, Tuple, Callable\nfrom urllib.parse import urldefrag\n\nimport conn...
diff --git a/requirements-server.txt b/requirements-server.txt index 5657b16453..8d0d9a790b 100644 --- a/requirements-server.txt +++ b/requirements-server.txt @@ -1,4 +1,6 @@ -connexion[swagger-ui]>=2.5.1, <3 +connexion[swagger-ui]>=2.10.0, <3 +flask>=2.0,<3 +werkzeug>=2.0,<3 flask-cors==3.0.10 gunicorn==20.1.0 cele...
mitmproxy__mitmproxy-1150
ServerException instead of ProxyServerError ##### Steps to reproduce the problem: ``` >>> from libmproxy.proxy.server import ProxyServer >>> from libmproxy.proxy.config import ProxyConfig >>> ProxyServer(ProxyConfig(port=80)) (...) ServerException: Error starting proxy server: error(13, 'Permission denied') ``` ##### ...
[ { "content": "from __future__ import (absolute_import, print_function, division)\n\nimport traceback\nimport sys\nimport socket\nimport six\n\nfrom netlib import tcp\nfrom netlib.exceptions import TcpException\nfrom netlib.http.http1 import assemble_response\nfrom ..exceptions import ProtocolException, ServerEx...
[ { "content": "from __future__ import (absolute_import, print_function, division)\n\nimport traceback\nimport sys\nimport socket\nimport six\n\nfrom netlib import tcp\nfrom netlib.exceptions import TcpException\nfrom netlib.http.http1 import assemble_response\nfrom ..exceptions import ProtocolException, ServerEx...
diff --git a/mitmproxy/proxy/server.py b/mitmproxy/proxy/server.py index 4304bd0be3..8483d3df6c 100644 --- a/mitmproxy/proxy/server.py +++ b/mitmproxy/proxy/server.py @@ -36,7 +36,7 @@ class ProxyServer(tcp.TCPServer): def __init__(self, config): """ - Raises ProxyServerError if there's a sta...
huggingface__transformers-9379
Improve coverage of the documentation Currently, some public classes are not documented anywhere because we didn't create the corresponding doc pages. Those missing pages are: - Benchmark classes - Bert Japanese - Data collators If someone feels like working on one of those, please tag yourself with a comment o...
[ { "content": "# coding=utf-8\n# Copyright 2020 The HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#...
[ { "content": "# coding=utf-8\n# Copyright 2020 The HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#...
diff --git a/docs/source/index.rst b/docs/source/index.rst index 1ada9c18d71c..f8b9c43670b6 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -356,6 +356,7 @@ TensorFlow and/or Flax. model_doc/bart model_doc/barthez model_doc/bert + model_doc/bertweet model_doc/bertgeneration ...
paperless-ngx__paperless-ngx-2280
[Bug] cannot save Mail Rule with "mail and attachment as seperate documents" in 1.11.1 Maybe it's just me, but I cannot save Mail Rule with "mail and attachment as seperate documents". _Originally posted by @Limerick-gh in https://github.com/paperless-ngx/paperless-ngx/discussions/2265#discussioncomment-4557234_...
[ { "content": "from documents.serialisers import CorrespondentField\nfrom documents.serialisers import DocumentTypeField\nfrom documents.serialisers import TagsField\nfrom paperless_mail.models import MailAccount\nfrom paperless_mail.models import MailRule\nfrom rest_framework import serializers\n\n\nclass Obfus...
[ { "content": "from documents.serialisers import CorrespondentField\nfrom documents.serialisers import DocumentTypeField\nfrom documents.serialisers import TagsField\nfrom paperless_mail.models import MailAccount\nfrom paperless_mail.models import MailRule\nfrom rest_framework import serializers\n\n\nclass Obfus...
diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf index d833ae3eead..21ac728b301 100644 --- a/src-ui/messages.xlf +++ b/src-ui/messages.xlf @@ -967,7 +967,7 @@ </context-group> <context-group purpose="location"> <context context-type="sourcefile">src/app/components/common/edit-dialog/m...
nipy__nipype-2852
nipype/conftest.py should be excluded from API documentation ### Summary The auto-generated API docs include `conftest.py`, which has a fixture. Pytest has turned calling a fixture directly into an error, and apparently the fixture is getting called when the docs are generated. This is what's currently breaking t...
[ { "content": "#!/usr/bin/env python\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"Script to auto-generate interface docs.\n\"\"\"\nfrom __future__ import print_function, unicode_literals\n# stdlib imports\nimport os\nimport sys\n\n# **...
[ { "content": "#!/usr/bin/env python\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"Script to auto-generate interface docs.\n\"\"\"\nfrom __future__ import print_function, unicode_literals\n# stdlib imports\nimport os\nimport sys\n\n# **...
diff --git a/tools/build_interface_docs.py b/tools/build_interface_docs.py index 6fa518381e..37b99cb476 100755 --- a/tools/build_interface_docs.py +++ b/tools/build_interface_docs.py @@ -41,6 +41,7 @@ '\.pipeline\.s3_node_wrapper$', '\.testing', '\.scripts', + '\.conftest', ] ...
akvo__akvo-rsr-3132
When logged in landing page should be "myRSR"
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"Akvo RSR is covered by the GNU Affero General Public License.\n\nSee more details in the license.txt file located at the root folder of the Akvo RSR module.\nFor additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\n...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"Akvo RSR is covered by the GNU Affero General Public License.\n\nSee more details in the license.txt file located at the root folder of the Akvo RSR module.\nFor additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\n...
diff --git a/akvo/rsr/views/__init__.py b/akvo/rsr/views/__init__.py index 517aa420d7..a1f5dbf4ca 100644 --- a/akvo/rsr/views/__init__.py +++ b/akvo/rsr/views/__init__.py @@ -11,5 +11,7 @@ def index(request): - """.""" - return HttpResponseRedirect(reverse('project-directory', args=[])) + """Redirect user...
pulp__pulpcore-4727
pulp file python package reporting wrongly Starting with pulpcore 3.40 the pulp_file plugins python package started reporting as pulp_file instead of pulp-file.
[ { "content": "from pulpcore.plugin import PulpPluginAppConfig\n\n\nclass PulpFilePluginAppConfig(PulpPluginAppConfig):\n \"\"\"\n Entry point for pulp_file plugin.\n \"\"\"\n\n name = \"pulp_file.app\"\n label = \"file\"\n version = \"3.41.1.dev\"\n python_package_name = \"pulp_file\" # TO...
[ { "content": "from pulpcore.plugin import PulpPluginAppConfig\n\n\nclass PulpFilePluginAppConfig(PulpPluginAppConfig):\n \"\"\"\n Entry point for pulp_file plugin.\n \"\"\"\n\n name = \"pulp_file.app\"\n label = \"file\"\n version = \"3.41.1.dev\"\n python_package_name = \"pulp-file\" # TO...
diff --git a/CHANGES/4724.bugfix b/CHANGES/4724.bugfix new file mode 100644 index 0000000000..f5de72e61d --- /dev/null +++ b/CHANGES/4724.bugfix @@ -0,0 +1 @@ +Fixed that `pulp_file` presented its `python_package` as `pulp_file` instead of `pulp-file`. diff --git a/pulp_file/app/__init__.py b/pulp_file/app/__init__.py ...
cocotb__cocotb-1298
Change setup.py to list the version as 1.x-dev for versions installed from github As suggested by @themperek, it would be neat if cocotb behaved like this: ``` > pip install git+https://github.com/cocotb/cocotb > python -c "import cocotb; print(cocotb.__version__)" 1.4.0-dev ```
[ { "content": "# Package versioning solution originally found here:\n# http://stackoverflow.com/q/458550\n\n# Store the version here so:\n# 1) we don't load dependencies by storing it in __init__.py\n# 2) we can import it in setup.py for the same reason\n# 3) we can import it into your module\n__version__ = '1.3...
[ { "content": "# Package versioning solution originally found here:\n# http://stackoverflow.com/q/458550\n\n# Store the version here so:\n# 1) we don't load dependencies by storing it in __init__.py\n# 2) we can import it in setup.py for the same reason\n# 3) we can import it into your module\n__version__ = '1.4...
diff --git a/cocotb/_version.py b/cocotb/_version.py index e88ee234c7..46ea3afc99 100644 --- a/cocotb/_version.py +++ b/cocotb/_version.py @@ -5,4 +5,4 @@ # 1) we don't load dependencies by storing it in __init__.py # 2) we can import it in setup.py for the same reason # 3) we can import it into your module -__versi...
locustio__locust-1760
Locust stopped working after Flast 2.0 got released in setup.py I can see: ` "flask>=1.1.2", ` I guess it should be hardcoded to ==1.1.2 for now. it crashes with: ``` File "/root/.local/share/virtualenvs/xxxxxxx/lib/python3.6/site-packages/locust/web.py", line 102, in __init__ app.jinja_options["extensions"].ap...
[ { "content": "# -*- coding: utf-8 -*-\nimport ast\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nROOT_PATH = os.path.abspath(os.path.dirname(__file__))\n\n# parse version from locust/__init__.py\n_version_re = re.compile(r\"__version__\\s+=\\s+(.*)\")\n_init_file = os.path.j...
[ { "content": "# -*- coding: utf-8 -*-\nimport ast\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nROOT_PATH = os.path.abspath(os.path.dirname(__file__))\n\n# parse version from locust/__init__.py\n_version_re = re.compile(r\"__version__\\s+=\\s+(.*)\")\n_init_file = os.path.j...
diff --git a/setup.py b/setup.py index c2596f5e5e..a03f1a3f03 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ version=version, install_requires=[ "gevent>=20.9.0", - "flask>=1.1.2", + "flask==1.1.2", "Werkzeug>=1.0.1", "requests>=2.9.1", "msgpack>=0.6.2...
quantumlib__Cirq-1160
Broken Hadamard gate decomposition Steps to reproduce: ``` In [1]: import cirq In [2]: q = cirq.NamedQubit('q') ...
[ { "content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ { "content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
diff --git a/cirq/ops/common_gates.py b/cirq/ops/common_gates.py index 0ab85680bdc..0c8bc36a218 100644 --- a/cirq/ops/common_gates.py +++ b/cirq/ops/common_gates.py @@ -518,7 +518,8 @@ def _decompose_(self, qubits): q = qubits[0] if self._exponent == 1: - yield Y(q)**0.5, X(q) + ...
PaddlePaddle__PaddleSpeech-19
Fix some problems in the ctc beam search decoder - [x] Make character's index in FST starting from one, otherwise wrong decoding results would be produced especially when space is the first character in the vocabulary; - [x] Add version check in the setup script; - [x] Remove unused code.
[ { "content": "\"\"\"Script to build and install decoder package.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom setuptools import setup, Extension, distutils\nimport glob\nimport platform\nimport os, sys\nimport multiprocessing.pool\...
[ { "content": "\"\"\"Script to build and install decoder package.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom setuptools import setup, Extension, distutils\nimport glob\nimport platform\nimport os, sys\nimport multiprocessing.pool\...
diff --git a/decoders/swig/path_trie.cpp b/decoders/swig/path_trie.cpp index 40d90970556..152efa82c64 100644 --- a/decoders/swig/path_trie.cpp +++ b/decoders/swig/path_trie.cpp @@ -52,7 +52,7 @@ PathTrie* PathTrie::get_path_trie(int new_char, bool reset) { } else { if (has_dictionary_) { matcher_->SetSta...
iterative__dvc-7234
dvc.fs.Path.parts wrong results **EDIT**: This issue will just be for this first problem of handling a sep at the end of a path. I made the windows-style path problem a separate issue #7233 When a path ends with the path sep, the `parts` function doesn't split. It returns a tuple with a single item: ```python fro...
[ { "content": "import ntpath\nimport posixpath\n\n\nclass Path:\n def __init__(self, sep):\n if sep == posixpath.sep:\n self.flavour = posixpath\n elif sep == ntpath.sep:\n self.flavour = ntpath\n else:\n raise ValueError(f\"unsupported separator '{sep}'\"...
[ { "content": "import ntpath\nimport posixpath\n\n\nclass Path:\n def __init__(self, sep):\n if sep == posixpath.sep:\n self.flavour = posixpath\n elif sep == ntpath.sep:\n self.flavour = ntpath\n else:\n raise ValueError(f\"unsupported separator '{sep}'\"...
diff --git a/dvc/fs/path.py b/dvc/fs/path.py index b0c02db8c7..7545fb7a88 100644 --- a/dvc/fs/path.py +++ b/dvc/fs/path.py @@ -15,7 +15,7 @@ def join(self, *parts): return self.flavour.join(*parts) def parts(self, path): - drive, path = self.flavour.splitdrive(path) + drive, path = self.fl...
inventree__InvenTree-4843
PanelMixin get_custom_panels not getting called for part list view ### Please verify that this bug has NOT been raised before. - [X] I checked and didn't find a similar issue ### Describe the bug* I want to add a custom part import panel, for that I'm trying to use the PanelMixin for my plugin. But I realized the p...
[ { "content": "\"\"\"Django views for interacting with Part app.\"\"\"\n\nimport os\nfrom decimal import Decimal\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.core.exceptions import ValidationError\nfrom django.shortcuts import HttpResponseRedirect, get_object_or_404\nfrom...
[ { "content": "\"\"\"Django views for interacting with Part app.\"\"\"\n\nimport os\nfrom decimal import Decimal\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.core.exceptions import ValidationError\nfrom django.shortcuts import HttpResponseRedirect, get_object_or_404\nfrom...
diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index 93b088716494..db1cf52df206 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -27,7 +27,7 @@ from .part import MakePartTemplate -class PartIndex(InvenTreeRoleMixin, ListView): +class PartIndex(InvenTreeRoleMixin, InvenTreePlugi...
LibraryOfCongress__concordia-463
Pagination and filtering don't work together **What behavior did you observe? Please describe the bug** The filter became unset and went to all images. **How can we reproduce the bug?** Steps to reproduce the behavior: 1. Go to an item that has several assets in open and submitted states. 2. Use the filter to on...
[ { "content": "# TODO: use correct copyright header\nimport os\n\nfrom django.contrib import messages\nfrom dotenv import load_dotenv\n\n# Build paths inside the project like this: os.path.join(SITE_ROOT_DIR, ...)\nCONCORDIA_APP_DIR = os.path.abspath(os.path.dirname(__file__))\nSITE_ROOT_DIR = os.path.dirname(CO...
[ { "content": "# TODO: use correct copyright header\nimport os\n\nfrom django.contrib import messages\nfrom dotenv import load_dotenv\n\n# Build paths inside the project like this: os.path.join(SITE_ROOT_DIR, ...)\nCONCORDIA_APP_DIR = os.path.abspath(os.path.dirname(__file__))\nSITE_ROOT_DIR = os.path.dirname(CO...
diff --git a/concordia/settings_template.py b/concordia/settings_template.py index 261edf2e4..58dd93e94 100755 --- a/concordia/settings_template.py +++ b/concordia/settings_template.py @@ -78,6 +78,7 @@ "raven.contrib.django.raven_compat", "maintenance_mode", "bootstrap4", + "bittersweet", "conco...
LMFDB__lmfdb-4167
Random link for Dirichlet characters is broken https://www.lmfdb.org/Character/Dirichlet/random gives an invalid label error (two in fact). Also, three error messages are displayed when you enter the label "banana". Only one should be displayed.
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom lmfdb.app import app\nimport re\nfrom flask import render_template, url_for, request, redirect, abort\nfrom sage.all import gcd, euler_phi\nfrom lmfdb.utils import (\n to_dict, flash_error, SearchArray, YesNoBox, display_kn...
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom lmfdb.app import app\nimport re\nfrom flask import render_template, url_for, request, redirect, abort\nfrom sage.all import gcd, euler_phi\nfrom lmfdb.utils import (\n to_dict, flash_error, SearchArray, YesNoBox, display_kn...
diff --git a/lmfdb/characters/main.py b/lmfdb/characters/main.py index da37849a43..0c4f779909 100644 --- a/lmfdb/characters/main.py +++ b/lmfdb/characters/main.py @@ -189,6 +189,7 @@ def url_for_label(label): shortcuts={ "jump": jump }, url_for_label=url_for_label, learnmore=learn, + random_projection...
scverse__scanpy-997
`datasets.pbmc68k_reduced` isn't contained in the pypi package anymore This still works in `1.4.4.post1`. It's very likely caused by changes to `setup.py`. I experienced similar problems before and fixed them via `package_data`. But this got removed. It's probably only a problem for the source-based installs. https:...
[ { "content": "import sys\n\nif sys.version_info < (3, 6):\n sys.exit('scanpy requires Python >= 3.6')\nfrom pathlib import Path\n\nfrom setuptools import setup, find_packages\n\n\ntry:\n from scanpy import __author__, __email__\nexcept ImportError: # Deps not yet installed\n __author__ = __email__ = '...
[ { "content": "import sys\n\nif sys.version_info < (3, 6):\n sys.exit('scanpy requires Python >= 3.6')\nfrom pathlib import Path\n\nfrom setuptools import setup, find_packages\n\n\ntry:\n from scanpy import __author__, __email__\nexcept ImportError: # Deps not yet installed\n __author__ = __email__ = '...
diff --git a/setup.py b/setup.py index 9e6cdfa2fb..2dcff3cdec 100644 --- a/setup.py +++ b/setup.py @@ -50,6 +50,7 @@ ], ), packages=find_packages(), + include_package_data=True, entry_points=dict(console_scripts=['scanpy=scanpy.cli:console_main']), zip_safe=False, classifiers=[
cognitedata__cognite-sdk-python-291
client.time_series.get_time_series does not return metadata **Describe the bug** When executing `client.time_series.get_time_series()` with `include_metadata = True` no metadata is returned. **To Reproduce** Runnable code reproducing the error. ``` import cognite import requests import os import numpy as np ...
[ { "content": "# -*- coding: utf-8 -*-\nfrom copy import deepcopy\nfrom typing import List\nfrom urllib.parse import quote\n\nimport pandas as pd\n\nfrom cognite.client._api_client import APIClient, CogniteCollectionResponse, CogniteResource, CogniteResponse\n\n\nclass TimeSeriesResponse(CogniteResponse):\n \...
[ { "content": "# -*- coding: utf-8 -*-\nfrom copy import deepcopy\nfrom typing import List\nfrom urllib.parse import quote\n\nimport pandas as pd\n\nfrom cognite.client._api_client import APIClient, CogniteCollectionResponse, CogniteResource, CogniteResponse\n\n\nclass TimeSeriesResponse(CogniteResponse):\n \...
diff --git a/cognite/client/stable/time_series.py b/cognite/client/stable/time_series.py index 26708c4fcb..a002097efc 100644 --- a/cognite/client/stable/time_series.py +++ b/cognite/client/stable/time_series.py @@ -45,7 +45,7 @@ class TimeSeriesListResponse(CogniteCollectionResponse): _RESPONSE_CLASS = TimeSerie...
pymodbus-dev__pymodbus-1197
client.ModbusClientMixin doesn not have __init__, but ModbusBaseClient tries to call it During its initialization class ModbusBaseClient tries to call super().\_\_init\_\_(), even though ModbusClientMixin does not have \_\_init\_\_(). Usually it is not a problem. However, if later one tries to inherit from, for exa...
[ { "content": "\"\"\"Modbus Client Common.\"\"\"\nimport logging\nfrom typing import List, Union\n\nimport pymodbus.bit_read_message as pdu_bit_read\nimport pymodbus.bit_write_message as pdu_bit_write\nimport pymodbus.diag_message as pdu_diag\nimport pymodbus.other_message as pdu_other_msg\nimport pymodbus.regis...
[ { "content": "\"\"\"Modbus Client Common.\"\"\"\nimport logging\nfrom typing import List, Union\n\nimport pymodbus.bit_read_message as pdu_bit_read\nimport pymodbus.bit_write_message as pdu_bit_write\nimport pymodbus.diag_message as pdu_diag\nimport pymodbus.other_message as pdu_other_msg\nimport pymodbus.regis...
diff --git a/pymodbus/client/mixin.py b/pymodbus/client/mixin.py index 72a89456b..5cd99a462 100644 --- a/pymodbus/client/mixin.py +++ b/pymodbus/client/mixin.py @@ -42,6 +42,9 @@ class ModbusClientMixin: # pylint: disable=too-many-public-methods last_frame_end = 0 silent_interval = 0 + def __init__(self...
facebookresearch__hydra-1531
Add `env` to Hydra's config group This is a follow up to #1441 the `env` config group will allows users to manually change the env defaults value. (such as provides default callbacks or update run.dir )
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nfrom dataclasses import dataclass, field\nfrom typing import Any, Dict, List, Optional\n\nfrom omegaconf import MISSING\n\nfrom hydra.core.config_store import ConfigStore\n\n\n@dataclass\nclass HelpConf:\n app_name: str = M...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nfrom dataclasses import dataclass, field\nfrom typing import Any, Dict, List, Optional\n\nfrom omegaconf import MISSING\n\nfrom hydra.core.config_store import ConfigStore\n\n\n@dataclass\nclass HelpConf:\n app_name: str = M...
diff --git a/hydra/conf/__init__.py b/hydra/conf/__init__.py index dab5348094f..efd536bf88e 100644 --- a/hydra/conf/__init__.py +++ b/hydra/conf/__init__.py @@ -99,6 +99,8 @@ class HydraConf: {"hydra_logging": "default"}, {"job_logging": "default"}, {"callbacks": None}, + ...
cal-itp__benefits-213
Send X-XSS-Protection header The X-XSS-Protection header can be used to manage certain browser's protection against reflected cross-site scripting (XSS), stopping a page from being loaded if an attack is detected. In modern browsers, the Content-Security-Policy header can provide better protection against XSS and setti...
[ { "content": "\"\"\"\nDjango settings for benefits project.\n\"\"\"\nimport os\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = os...
[ { "content": "\"\"\"\nDjango settings for benefits project.\n\"\"\"\nimport os\n\n# Build paths inside the project like this: os.path.join(BASE_DIR, ...)\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = os...
diff --git a/benefits/settings.py b/benefits/settings.py index 722aeafcfd..830d0bb5b3 100644 --- a/benefits/settings.py +++ b/benefits/settings.py @@ -75,6 +75,8 @@ CSRF_FAILURE_VIEW = "benefits.core.views.csrf_failure" SESSION_COOKIE_SECURE = True +SECURE_BROWSER_XSS_FILTER = True + ROOT_URLCONF = "benefi...
Netflix__lemur-455
A custom cert name with spaces causes AWS Upload failures Creating a cert with a custom name that has spaces, such as: `My Certificate` will not properly get uploaded to AWS. -- Potential Fixes: 1. Prevent spaces in custom names 2. Allow custom cert names to be editable 3. If spaces are allowed, the AWS uploader plugi...
[ { "content": "\"\"\"\n.. module: lemur.certificates.models\n :platform: Unix\n :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more\n :license: Apache, see LICENSE for more details.\n.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>\n\"\"\"\nimport datetime\n\nimport lemur.common.utils\nfrom...
[ { "content": "\"\"\"\n.. module: lemur.certificates.models\n :platform: Unix\n :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more\n :license: Apache, see LICENSE for more details.\n.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>\n\"\"\"\nimport datetime\n\nimport lemur.common.utils\nfrom...
diff --git a/lemur/certificates/models.py b/lemur/certificates/models.py index f5a7d9caa5..30acbbb0a5 100644 --- a/lemur/certificates/models.py +++ b/lemur/certificates/models.py @@ -27,6 +27,7 @@ def get_or_increase_name(name): + name = '-'.join(name.strip().split(' ')) count = Certificate.query.filter(Ce...
nltk__nltk-1274
Tox fails with "ERROR: Failure: ImportError (No module named 'six')" When I try to run the tests with Tox (on Ubuntu) from within a local clone of the repo, it manages to install the dependencies but blows up when trying to import things from within NLTK. I imagine I can work around this by figuring out how to manuall...
[ { "content": "# Natural Language Toolkit: Tokenizer Interface\n#\n# Copyright (C) 2001-2015 NLTK Project\n# Author: Edward Loper <edloper@gmail.com>\n# Steven Bird <stevenbird1@gmail.com>\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\n\"\"\"\nTokenizer Interface\n\"\"\"\n\nfro...
[ { "content": "# Natural Language Toolkit: Tokenizer Interface\n#\n# Copyright (C) 2001-2015 NLTK Project\n# Author: Edward Loper <edloper@gmail.com>\n# Steven Bird <stevenbird1@gmail.com>\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\n\"\"\"\nTokenizer Interface\n\"\"\"\n\nfro...
diff --git a/nltk/test/probability.doctest b/nltk/test/probability.doctest index b19c9d689a..594d18b00a 100644 --- a/nltk/test/probability.doctest +++ b/nltk/test/probability.doctest @@ -69,33 +69,33 @@ ConditionalFreqDist ------------------- >>> cfd1 = ConditionalFreqDist() - >>> cfd1[1] = FreqDist('abbbc')...
python-telegram-bot__python-telegram-bot-699
Bot tries to assign user id to anonymous channel post <!-- Thanks for reporting issues of python-telegram-bot! To make it easier for us to help you please enter detailed information below. Please note, we only support the latest version of python-telegram-bot and master branch. Please make sure to upgrade & recre...
[ { "content": "#!/usr/bin/env python\n#\n# A library that provides a Python interface to the Telegram Bot API\n# Copyright (C) 2015-2017\n# Leandro Toledo de Souza <devs@python-telegram-bot.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser Pub...
[ { "content": "#!/usr/bin/env python\n#\n# A library that provides a Python interface to the Telegram Bot API\n# Copyright (C) 2015-2017\n# Leandro Toledo de Souza <devs@python-telegram-bot.org>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser Pub...
diff --git a/AUTHORS.rst b/AUTHORS.rst index 040853d53e9..5a30084174a 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -32,6 +32,7 @@ The following wonderful people contributed directly or indirectly to this projec - `Jacob Bom <https://github.com/bomjacob>`_ - `JASON0916 <https://github.com/JASON0916>`_ - `jeffffc <ht...
OctoPrint__OctoPrint-973
Add more longRunningCommands (Specifically M400) 1. What were you doing? > Running a print that makes liberal use of `M400`s 1. What did you expect to happen? > The print to finish to completion 1. What happened instead? > The print failed with a communication error 1. Branch & Commit or Version of OctoPrint: > Ver...
[ { "content": "# coding=utf-8\n\"\"\"\nThis module represents OctoPrint's settings management. Within this module the default settings for the core\napplication are defined and the instance of the :class:`Settings` is held, which offers getter and setter\nmethods for the raw configuration values as well as vario...
[ { "content": "# coding=utf-8\n\"\"\"\nThis module represents OctoPrint's settings management. Within this module the default settings for the core\napplication are defined and the instance of the :class:`Settings` is held, which offers getter and setter\nmethods for the raw configuration values as well as vario...
diff --git a/src/octoprint/settings.py b/src/octoprint/settings.py index f5fd85a235..982e932da3 100644 --- a/src/octoprint/settings.py +++ b/src/octoprint/settings.py @@ -83,7 +83,7 @@ def settings(init=False, basedir=None, configfile=None): "sdStatus": 1 }, "additionalPorts": [], - "longRunningCommands": ["...
ibis-project__ibis-9088
docs: improvements to the home page The Ibis project home page is better than it once was [citation needed], but can use some improvements. In particular, it'd be great if we could have an [interactive demo similar to DuckDB's](https://shell.duckdb.org/#queries=v0,%20%20-Create-table-from-Parquet-file%0ACREATE-TABLE-tr...
[ { "content": "from __future__ import annotations\n\nimport plotly.graph_objects as go\n\n\ndef to_greyish(hex_code, grey_value=128):\n hex_code = hex_code.lstrip(\"#\")\n r, g, b = int(hex_code[0:2], 16), int(hex_code[2:4], 16), int(hex_code[4:6], 16)\n\n new_r = (r + grey_value) // 2\n new_g = (g +...
[ { "content": "from __future__ import annotations\n\nimport plotly.graph_objects as go\n\n\ndef to_greyish(hex_code, grey_value=128):\n hex_code = hex_code.lstrip(\"#\")\n r, g, b = int(hex_code[0:2], 16), int(hex_code[2:4], 16), int(hex_code[4:6], 16)\n\n new_r = (r + grey_value) // 2\n new_g = (g +...
diff --git a/docs/backends_sankey.py b/docs/backends_sankey.py index 9bc7270c988c..b04cea212faf 100644 --- a/docs/backends_sankey.py +++ b/docs/backends_sankey.py @@ -94,7 +94,7 @@ def to_greyish(hex_code, grey_value=128): fig.update_layout( title_text="Ibis backend types", - font_size=24, + font_size=20,...
readthedocs__readthedocs.org-2712
Document that RTD uses `rel` branch for production Hi, i'd like to add a new builder for doxygen documentation (but native, not with breath). Since there are a lot of branches like real/relcorp which a far ahead of master, i'd like to know, which branch to choose for development. Thanks in advance! Oli
[ { "content": "# -*- coding: utf-8 -*-\n#\nimport os\nimport sys\n\nfrom recommonmark.parser import CommonMarkParser\n\nsys.path.insert(0, os.path.abspath('..'))\nsys.path.append(os.path.dirname(__file__))\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"readthedocs.settings.dev\")\n\nfrom django.conf import...
[ { "content": "# -*- coding: utf-8 -*-\n#\nimport os\nimport sys\n\nfrom recommonmark.parser import CommonMarkParser\n\nsys.path.insert(0, os.path.abspath('..'))\nsys.path.append(os.path.dirname(__file__))\nos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"readthedocs.settings.dev\")\n\nfrom django.conf import...
diff --git a/LICENSE.mit b/LICENSE.mit index fcb099e132c..2447f29c36a 100644 --- a/LICENSE.mit +++ b/LICENSE.mit @@ -1,4 +1,4 @@ -Copyright (c) 2011 Charles Leifer, Eric Holscher, Bobby Grace +Copyright (c) 2010-2017 Read the Docs, Inc & contributors Permission is hereby granted, free of charge, to any person obtai...
adamchainz__django-cors-headers-851
Listing Origin, DNT, or Accept-Encoding as allowed request headers is never necessary ### Understanding CORS - [X] I have read the resources. ### Python Version _No response_ ### Django Version _No response_ ### Package Version _No response_ ### Description The [README](https://github.com/ada...
[ { "content": "from __future__ import annotations\n\ndefault_headers = (\n \"accept\",\n \"accept-encoding\",\n \"authorization\",\n \"content-type\",\n \"dnt\",\n \"origin\",\n \"user-agent\",\n \"x-csrftoken\",\n \"x-requested-with\",\n)\n\ndefault_methods = (\"DELETE\", \"GET\", \"O...
[ { "content": "from __future__ import annotations\n\ndefault_headers = (\n \"accept\",\n \"authorization\",\n \"content-type\",\n \"user-agent\",\n \"x-csrftoken\",\n \"x-requested-with\",\n)\n\ndefault_methods = (\"DELETE\", \"GET\", \"OPTIONS\", \"PATCH\", \"POST\", \"PUT\")\n", "path": "...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c66c08e5..d3df4261 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,12 @@ Changelog ========= +* Remove three headers from the default "accept list": ``accept-encoding``, ``dnt``, and ``origin``. + These are `Forbidden header names <https://developer.mozill...
microsoft__botbuilder-python-1907
German language is not appropiate used when using Confirmprompts ### The Issue I am building a chatbot for german users. I am sending the local "de-de" as user, and can confirm this actual arrives the bot. When i want to use Confirmprompts the bot returns Yes and No and not "Ja" "Nein". ### The Solution After a lo...
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nfrom typing import List\n\nfrom recognizers_text import Culture\n\n\nclass PromptCultureModel:\n \"\"\"\n Culture model used in Choice and Confirm Prompts.\n \"\"\"\n\n def __init__(\n ...
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nfrom typing import List\n\nfrom recognizers_text import Culture\n\n\nclass PromptCultureModel:\n \"\"\"\n Culture model used in Choice and Confirm Prompts.\n \"\"\"\n\n def __init__(\n ...
diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/prompt_culture_models.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/prompt_culture_models.py index 1572ac688..abb527e21 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/prompts/prompt_culture_models.py +++ b/libraries/botbui...
AnalogJ__lexicon-1356
Bug in create action for glesys provider When creating an A record with the glesys provider, the full name is added instead of the host name. ``` lexicon_config = { "provider_name" : "glesys", "action": "create", "domain": "somedomain.com", "type": "A", "name": "lexicon", "content": "1...
[ { "content": "\"\"\"Module provider for Glesys\"\"\"\nimport json\n\nimport requests\n\nfrom lexicon.exceptions import AuthenticationError\nfrom lexicon.providers.base import Provider as BaseProvider\n\nNAMESERVER_DOMAINS = [\"glesys.com\"]\n\n\ndef provider_parser(subparser):\n \"\"\"Generate a subparser fo...
[ { "content": "\"\"\"Module provider for Glesys\"\"\"\nimport json\n\nimport requests\n\nfrom lexicon.exceptions import AuthenticationError\nfrom lexicon.providers.base import Provider as BaseProvider\n\nNAMESERVER_DOMAINS = [\"glesys.com\"]\n\n\ndef provider_parser(subparser):\n \"\"\"Generate a subparser fo...
diff --git a/lexicon/providers/glesys.py b/lexicon/providers/glesys.py index 2b30919b9..4bbaffd20 100644 --- a/lexicon/providers/glesys.py +++ b/lexicon/providers/glesys.py @@ -44,7 +44,7 @@ def _create_record(self, rtype, name, content): request_data = { "domainname": self.domain, - ...
imAsparky__django-cookiecutter-59
[FEAT]: Add Pyup to the Django project. **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alte...
[ { "content": "#!/usr/bin/env python\n\"\"\"django-cookiecutter post project generation jobs.\"\"\"\nimport os\nimport subprocess # nosec\n\nPROJECT_DIRECTORY = os.path.realpath(os.path.curdir)\n\nREMOTE_REPO = \"git@github.com:{{cookiecutter.github_username}}/\\\n{{cookiecutter.git_project_name}}.git\"\n\n\nGI...
[ { "content": "#!/usr/bin/env python\n\"\"\"django-cookiecutter post project generation jobs.\"\"\"\nimport os\nimport subprocess # nosec\n\nPROJECT_DIRECTORY = os.path.realpath(os.path.curdir)\n\nREMOTE_REPO = \"git@github.com:{{cookiecutter.github_username}}/\\\n{{cookiecutter.git_project_name}}.git\"\n\n\nGI...
diff --git a/cookiecutter.json b/cookiecutter.json index a664ffac..4144ada1 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -7,10 +7,11 @@ "git_project_name": "{{ cookiecutter.project_name.lower().replace(' ', '-').replace('_', '-') }}", "project_slug": "{{ cookiecutter.project_name.lower()|replace(' ',...
flairNLP__flair-2711
SciSpacyTokenizer.tokenize() function is broken **Describe the bug** Two minor bugs were introduced to Flair's `SciSpacyTokenizer` as part of #2645 The bugs prevent usage of `SciSpacyTokenizer` and tokenizers that leverage it. **To Reproduce** Any use of classes that leverage `SciSpacyTokenizer` will raise errors...
[ { "content": "import logging\nfrom abc import ABC, abstractmethod\nfrom typing import Any, Callable, List, Union\n\nfrom segtok.segmenter import split_multi, split_single\nfrom segtok.tokenizer import split_contractions, word_tokenizer\n\nfrom flair.data import Sentence, Tokenizer\n\nlog = logging.getLogger(\"f...
[ { "content": "import logging\nfrom abc import ABC, abstractmethod\nfrom typing import Any, Callable, List, Union\n\nfrom segtok.segmenter import split_multi, split_single\nfrom segtok.tokenizer import split_contractions, word_tokenizer\n\nfrom flair.data import Sentence, Tokenizer\n\nlog = logging.getLogger(\"f...
diff --git a/flair/tokenization.py b/flair/tokenization.py index 33134ad555..c285c2ddd0 100644 --- a/flair/tokenization.py +++ b/flair/tokenization.py @@ -256,7 +256,7 @@ def tokenize(self, text: str) -> List[str]: sentence = self.model(text) words: List[str] = [] for word in sentence: - ...
typeddjango__django-stubs-1794
Next release planning (4.2.6) As [announced in 4.2.5 release notes](https://github.com/typeddjango/django-stubs/releases/tag/4.2.5), we will drop the hard dependency on mypy. Users of django-stubs with mypy will need to add their own dependency on mypy, or install `django-stubs[compatible-mypy]` extra. I'm hoping to...
[ { "content": "#!/usr/bin/env python\nimport os\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, _dirs, files in os.walk(name):\n for file in files:\n if file.endswith(\".pyi\"):\n ...
[ { "content": "#!/usr/bin/env python\nimport os\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, _dirs, files in os.walk(name):\n for file in files:\n if file.endswith(\".pyi\"):\n ...
diff --git a/.gitignore b/.gitignore index cc1ac47cb..1141379bd 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ out/ pip-wheel-metadata/ stubgen/ build/ +dist/ diff --git a/README.md b/README.md index a578e8267..c7cd38c1d 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ We rely on different `djang...
oppia__oppia-6846
Adding Lesson Topics to Lesson-Specific Landing Pages **Is your feature request related to a problem? Please describe.** Currently, our lesson landing pages don't include many of the keywords related to the lessons themselves, which makes them more difficult to surface in searches and in our ads. **Describe the so...
[ { "content": "# coding: utf-8\n#\n# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licen...
[ { "content": "# coding: utf-8\n#\n# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licen...
diff --git a/assets/images/landing/maths/negative-numbers/negative_1.png b/assets/images/landing/maths/negative-numbers/negative_1.png new file mode 100644 index 0000000000000..1dfc7b286dbad Binary files /dev/null and b/assets/images/landing/maths/negative-numbers/negative_1.png differ diff --git a/assets/images/landin...
networkx__networkx-4326
Use a utf8 friendly latex backend The current sphinx configuration in docs/conf.py defaults to pdflatex. This is causing problems on #4169 which introduces API-level doctests with unicode characters in them. I tried several iterations of lualatex and xelatex to try and get it to work, but latex errors are never the mos...
[ { "content": "from datetime import date\nfrom sphinx_gallery.sorting import ExplicitOrder\nimport sphinx_rtd_theme\nfrom warnings import filterwarnings\n\nfilterwarnings(\n \"ignore\", message=\"Matplotlib is currently using agg\", category=UserWarning\n)\n\n# General configuration\n# ---------------------\n...
[ { "content": "from datetime import date\nfrom sphinx_gallery.sorting import ExplicitOrder\nimport sphinx_rtd_theme\nfrom warnings import filterwarnings\n\nfilterwarnings(\n \"ignore\", message=\"Matplotlib is currently using agg\", category=UserWarning\n)\n\n# General configuration\n# ---------------------\n...
diff --git a/.circleci/config.yml b/.circleci/config.yml index 8ba6d421622..a7ba4d54654 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ jobs: - run: name: Install TeX command: | - sudo apt-get install texlive texlive-latex-extra latexmk + ...
sosreport__sos-3483
Obtain CNI files for containerd Containerd uses the CNI configuration present in the defined folders by the configuration ``` [plugins."io.containerd.grpc.v1.cri".cni] conf_dir = "/etc/cni/net.d ``` It will be very useful to obtain the cni configurations present on the folder for debugging networking ...
[ { "content": "# This file is part of the sos project: https://github.com/sosreport/sos\n#\n# This copyrighted material is made available to anyone wishing to use,\n# modify, copy, or redistribute it subject to the terms and conditions of\n# version 2 of the GNU General Public License.\n#\n# See the LICENSE file...
[ { "content": "# This file is part of the sos project: https://github.com/sosreport/sos\n#\n# This copyrighted material is made available to anyone wishing to use,\n# modify, copy, or redistribute it subject to the terms and conditions of\n# version 2 of the GNU General Public License.\n#\n# See the LICENSE file...
diff --git a/sos/report/plugins/containerd.py b/sos/report/plugins/containerd.py index 33231da1ab..ecba988721 100644 --- a/sos/report/plugins/containerd.py +++ b/sos/report/plugins/containerd.py @@ -19,6 +19,7 @@ class Containerd(Plugin, RedHatPlugin, UbuntuPlugin, CosPlugin): def setup(self): self.add_co...
bokeh__bokeh-4542
clustering app example needs updates for recent changes Fails because `theme.yaml` tries to set `title_text_font_size` on `Plot` This bypasses the (python) property that deprecates this former `Plot` property, and tries to set a (Bokeh) property with that name directly on the plot. This fails, because of the work to ma...
[ { "content": "import numpy as np\nnp.random.seed(0)\n\nfrom bokeh.io import curdoc\nfrom bokeh.models import ColumnDataSource, VBox, HBox, Select, Slider\nfrom bokeh.plotting import Figure\nfrom bokeh.palettes import Spectral6\n\nfrom sklearn import cluster, datasets\nfrom sklearn.neighbors import kneighbors_gr...
[ { "content": "import numpy as np\nnp.random.seed(0)\n\nfrom bokeh.io import curdoc\nfrom bokeh.models import ColumnDataSource, VBox, HBox, Select, Slider\nfrom bokeh.plotting import Figure\nfrom bokeh.palettes import Spectral6\n\nfrom sklearn import cluster, datasets\nfrom sklearn.neighbors import kneighbors_gr...
diff --git a/examples/app/clustering/main.py b/examples/app/clustering/main.py index 1e4ad5e663d..360fb62937a 100644 --- a/examples/app/clustering/main.py +++ b/examples/app/clustering/main.py @@ -153,7 +153,7 @@ def update_algorithm_or_clusters(attrname, old, new): source.data['x'] = X[:, 0] source.data['y']...
pytorch__tnt-85
PyTorch 0.4 test errors Need to fix these: ``` .......... ---------------------------------------------------------------------- Ran 10 tests in 0.015s OK E.../Users/szagoruyko/anaconda3/lib/python3.6/site-packages/numpy/core/_methods.py:135: RuntimeWarning: Degrees of freedom <= 0 for slice keepdims=keepd...
[ { "content": "import math\nfrom . import meter\nimport torch\n\n\nclass APMeter(meter.Meter):\n \"\"\"\n The APMeter measures the average precision per class.\n\n The APMeter is designed to operate on `NxK` Tensors `output` and\n `target`, and optionally a `Nx1` Tensor weight where (1) the `output`\...
[ { "content": "import math\nfrom . import meter\nimport torch\n\n\nclass APMeter(meter.Meter):\n \"\"\"\n The APMeter measures the average precision per class.\n\n The APMeter is designed to operate on `NxK` Tensors `output` and\n `target`, and optionally a `Nx1` Tensor weight where (1) the `output`\...
diff --git a/torchnet/meter/apmeter.py b/torchnet/meter/apmeter.py index 5058e29e43..57991d1241 100644 --- a/torchnet/meter/apmeter.py +++ b/torchnet/meter/apmeter.py @@ -134,5 +134,5 @@ def value(self): precision = tp.div(rg) # compute average precision - ap[k] = precision[truth....
conda__conda-3257
Zsh.exe not supported on MSYS2 The following error is reported in a MSYS2 zsh shell: ``` ➜ dotfiles git:(master) ✗ source activate py35_32 Traceback (most recent call last): File "C:\Miniconda3\Scripts\conda-script.py", line 5, in <module> sys.exit(main()) File "C:\Miniconda3\lib\site-packages\conda\cli\main....
[ { "content": "from __future__ import print_function, division, absolute_import\n\nimport collections\nimport errno\nimport hashlib\nimport logging\nimport os\nimport re\nimport sys\nimport time\nimport threading\nfrom functools import partial\nfrom os.path import isdir, join, basename, exists\n# conda build imp...
[ { "content": "from __future__ import print_function, division, absolute_import\n\nimport collections\nimport errno\nimport hashlib\nimport logging\nimport os\nimport re\nimport sys\nimport time\nimport threading\nfrom functools import partial\nfrom os.path import isdir, join, basename, exists\n# conda build imp...
diff --git a/conda/utils.py b/conda/utils.py index 90b328b85ba..9c8a6f82859 100644 --- a/conda/utils.py +++ b/conda/utils.py @@ -313,6 +313,12 @@ def human_bytes(n): "sh.exe": dict( msys2_shell_base, exe="sh.exe", ), + "zsh.exe": dict( + msys2_shell_base, exe="zsh.exe", ...
dask__dask-533
ProgressBar is not visible in the notebook The `ProgressBar` doesn't update itself during execution while in the notebook. Afterwards the full bar will pop up but it doesn't give you any cues during execution.
[ { "content": "from __future__ import division\nimport sys\nimport threading\nimport time\nfrom timeit import default_timer\n\nfrom ..core import istask\nfrom .core import Diagnostic\n\n\ndef format_time(t):\n \"\"\"Format seconds into a human readable form.\n\n >>> format_time(10.4)\n '10.4s'\n >>> ...
[ { "content": "from __future__ import division\nimport sys\nimport threading\nimport time\nfrom timeit import default_timer\n\nfrom ..core import istask\nfrom .core import Diagnostic\n\n\ndef format_time(t):\n \"\"\"Format seconds into a human readable form.\n\n >>> format_time(10.4)\n '10.4s'\n >>> ...
diff --git a/dask/diagnostics/progress.py b/dask/diagnostics/progress.py index d79f5476300..08a37459bb0 100644 --- a/dask/diagnostics/progress.py +++ b/dask/diagnostics/progress.py @@ -54,6 +54,7 @@ def _start(self, dsk, state): def _posttask(self, key, value, dsk, state, id): self._ndone += 1 + ...
cupy__cupy-5225
[info] NumPy/SciPy new version pinning recommendation See: - https://github.com/numpy/numpy/pull/18505 - scipy/scipy#12862 The most important takeaway is that NumPy/SciPy now recommend downstream distributions to pin the upper bound version if NumPy/Scipy are runtime dependencies. (The example is if the latest Num...
[ { "content": "#!/usr/bin/env python\n\nimport glob\nimport os\nfrom setuptools import setup, find_packages\nimport sys\n\nimport cupy_setup_build\n\n\nfor submodule in ('cupy/_core/include/cupy/cub/',\n 'cupy/_core/include/cupy/jitify'):\n if len(os.listdir(submodule)) == 0:\n msg = '...
[ { "content": "#!/usr/bin/env python\n\nimport glob\nimport os\nfrom setuptools import setup, find_packages\nimport sys\n\nimport cupy_setup_build\n\n\nfor submodule in ('cupy/_core/include/cupy/cub/',\n 'cupy/_core/include/cupy/jitify'):\n if len(os.listdir(submodule)) == 0:\n msg = '...
diff --git a/setup.py b/setup.py index 200fa0da730..9ba1a739d44 100644 --- a/setup.py +++ b/setup.py @@ -31,11 +31,11 @@ ], 'install': [ - 'numpy>=1.17', + 'numpy>=1.17,<1.23', # see #4773 'fastrlock>=0.5', ], 'all': [ - 'scipy>=1.4', + 'scipy>=1.4,<1.9', # s...
feast-dev__feast-3966
Bump the cryptography version to 42 **Is your feature request related to a problem? Please describe.** `cryptography<42` package has some medium vulnerabilities. Example: https://scout.docker.com/vulnerabilities/id/CVE-2023-50782?s=github&n=cryptography&t=pypi&vr=%3C42.0.0&utm_source=desktop&utm_medium=ExternalLink ...
[ { "content": "# Copyright 2019 The Feast Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
[ { "content": "# Copyright 2019 The Feast Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
diff --git a/sdk/python/requirements/py3.10-ci-requirements.txt b/sdk/python/requirements/py3.10-ci-requirements.txt index f20bc05df90..051eee0ad1c 100644 --- a/sdk/python/requirements/py3.10-ci-requirements.txt +++ b/sdk/python/requirements/py3.10-ci-requirements.txt @@ -124,7 +124,7 @@ comm==0.2.1 # ipywidgets...
pytorch__vision-7613
make_grid doesn't use kwargs ### 🐛 Describe the bug In the `make_grid` function from `torchvision.utils`,`kwargs` it not used: https://github.com/pytorch/vision/blob/300a90926e88f13abbaf3d8155cdba36aab86ab4/torchvision/utils.py#LL24C1-L33C19 Is this a bug? It's very easy to mistype some argument and not eve...
[ { "content": "import collections\nimport math\nimport pathlib\nimport warnings\nfrom itertools import repeat\nfrom types import FunctionType\nfrom typing import Any, BinaryIO, List, Optional, Tuple, Union\n\nimport numpy as np\nimport torch\nfrom PIL import Image, ImageColor, ImageDraw, ImageFont\n\n__all__ = [...
[ { "content": "import collections\nimport math\nimport pathlib\nimport warnings\nfrom itertools import repeat\nfrom types import FunctionType\nfrom typing import Any, BinaryIO, List, Optional, Tuple, Union\n\nimport numpy as np\nimport torch\nfrom PIL import Image, ImageColor, ImageDraw, ImageFont\n\n__all__ = [...
diff --git a/torchvision/utils.py b/torchvision/utils.py index bc9d88b2849..1418656a7f2 100644 --- a/torchvision/utils.py +++ b/torchvision/utils.py @@ -29,7 +29,6 @@ def make_grid( value_range: Optional[Tuple[int, int]] = None, scale_each: bool = False, pad_value: float = 0.0, - **kwargs, ) -> torch...
localstack__localstack-1695
Downloading files from localstack S3 generates "Requested Range Not Satisfiable" Seems related to #1185, but I am copying a tar file (~414MB) up to my localstack S3 instance and trying to download it. Early on in the download (Looks like it's roughly 32MB in) the following is generated ``` + aws --endpoint-url http...
[ { "content": "import sys\nimport logging\nimport traceback\nfrom moto.s3 import models as s3_models\nfrom moto.server import main as moto_main\nfrom localstack import config\nfrom localstack.constants import DEFAULT_PORT_S3_BACKEND\nfrom localstack.utils.aws import aws_stack\nfrom localstack.utils.common import...
[ { "content": "import sys\nimport logging\nimport traceback\nfrom moto.s3 import models as s3_models\nfrom moto.server import main as moto_main\nfrom localstack import config\nfrom localstack.constants import DEFAULT_PORT_S3_BACKEND\nfrom localstack.utils.aws import aws_stack\nfrom localstack.utils.common import...
diff --git a/localstack/services/s3/s3_starter.py b/localstack/services/s3/s3_starter.py index 49c60ba000558..428e54db934f1 100644 --- a/localstack/services/s3/s3_starter.py +++ b/localstack/services/s3/s3_starter.py @@ -14,7 +14,7 @@ LOGGER = logging.getLogger(__name__) # max file size for S3 objects (in MB) -S3_M...
scikit-hep__pyhf-126
test_backend_consistency not resetting to default backend if test fails unexpectedly # Description A cascading error is observed when test_backend_consistency fails, which keeps the backend as tensorflow and causes all the other tests to erroneously fail. <img width="1550" alt="screenshot 2018-04-15 20 45 5...
[ { "content": "import logging\nimport pyhf.optimize as optimize\nimport pyhf.tensor as tensor\n\n\nlog = logging.getLogger(__name__)\ntensorlib = tensor.numpy_backend()\noptimizer = optimize.scipy_optimizer()\n\ndef set_backend(backend):\n \"\"\"\n Set the backend and the associated optimizer\n\n Args:\...
[ { "content": "import logging\nimport pyhf.optimize as optimize\nimport pyhf.tensor as tensor\n\n\nlog = logging.getLogger(__name__)\ntensorlib = tensor.numpy_backend()\ndefault_backend = tensorlib\noptimizer = optimize.scipy_optimizer()\ndefault_optimizer = optimizer\n\ndef set_backend(backend):\n \"\"\"\n ...
diff --git a/pyhf/__init__.py b/pyhf/__init__.py index cb29a5e3e4..2c1c1598a3 100644 --- a/pyhf/__init__.py +++ b/pyhf/__init__.py @@ -5,7 +5,9 @@ log = logging.getLogger(__name__) tensorlib = tensor.numpy_backend() +default_backend = tensorlib optimizer = optimize.scipy_optimizer() +default_optimizer = optimizer ...
locustio__locust-1395
Update flask version Our minimum required flask version is too old (saw at least one person having an issue https://stackoverflow.com/questions/61969924/typeerror-when-i-run-a-locustfile-py) https://flask.palletsprojects.com/en/1.1.x/changelog/#version-0-12-5 is a minimum, but we should probably go to 1.x right away...
[ { "content": "# -*- coding: utf-8 -*-\nimport ast\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nROOT_PATH = os.path.abspath(os.path.dirname(__file__))\n\n# parse version from locust/__init__.py\n_version_re = re.compile(r'__version__\\s+=\\s+(.*)')\n_init_file = os.path.joi...
[ { "content": "# -*- coding: utf-8 -*-\nimport ast\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nROOT_PATH = os.path.abspath(os.path.dirname(__file__))\n\n# parse version from locust/__init__.py\n_version_re = re.compile(r'__version__\\s+=\\s+(.*)')\n_init_file = os.path.joi...
diff --git a/setup.py b/setup.py index 80716c5a28..26f4eec5e8 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ version=version, install_requires=[ "gevent>=1.5.0", - "flask>=0.10.1", + "flask>=1.1.2", "requests>=2.9.1", "msgpack>=0.6.2", "pyzmq>=16.0...
encode__httpx-1054
Type-checking our tests I know this is not a standard thing to do across Encode projects, but I've been wondering if it would be worth starting to type-hint our tests. I've seen at least two instances of this recently: - In HTTPX: https://github.com/encode/httpx/pull/648#discussion_r359862603 - In Starlette: htt...
[ { "content": "\"\"\"\nType definitions for type checking purposes.\n\"\"\"\n\nimport ssl\nfrom http.cookiejar import CookieJar\nfrom typing import (\n IO,\n TYPE_CHECKING,\n AsyncIterator,\n Callable,\n Dict,\n Iterator,\n List,\n Mapping,\n Optional,\n Sequence,\n Tuple,\n U...
[ { "content": "\"\"\"\nType definitions for type checking purposes.\n\"\"\"\n\nimport ssl\nfrom http.cookiejar import CookieJar\nfrom typing import (\n IO,\n TYPE_CHECKING,\n AsyncIterator,\n Callable,\n Dict,\n Iterator,\n List,\n Mapping,\n Optional,\n Sequence,\n Tuple,\n U...
diff --git a/httpx/_types.py b/httpx/_types.py index a74020a4ae..d2fc098e24 100644 --- a/httpx/_types.py +++ b/httpx/_types.py @@ -72,4 +72,4 @@ # (filename, file (or text), content_type) Tuple[Optional[str], FileContent, Optional[str]], ] -RequestFiles = Union[Mapping[str, FileTypes], List[Tuple[str, FileTy...
pyca__cryptography-4307
incorrect key_size of sect571r1 Hello! https://github.com/pyca/cryptography/blob/17c8f126c7c7d5ce886112a6e924277a7b203f25/src/cryptography/hazmat/primitives/asymmetric/ec.py#L138 The value there should be 570. From [the standard](http://www.secg.org/sec2-v2.pdf) the order of the published generator is ```py ...
[ { "content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport abc\n\nimport six\n\nfrom cryptography...
[ { "content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport abc\n\nimport six\n\nfrom cryptography...
diff --git a/src/cryptography/hazmat/primitives/asymmetric/ec.py b/src/cryptography/hazmat/primitives/asymmetric/ec.py index 83266bb4681c..6cbfcab4c1bd 100644 --- a/src/cryptography/hazmat/primitives/asymmetric/ec.py +++ b/src/cryptography/hazmat/primitives/asymmetric/ec.py @@ -135,7 +135,7 @@ def verify(self, signatur...
cloud-custodian__cloud-custodian-1049
efs tag support I am finding that searching for tagging of EFS resources does not consistently report the correct results. It did find an EFS that was incorrectly tagged, but after it was corrected it continues to report the same resource. I use the same filter for other resource types and do not see this behavior. ...
[ { "content": "# Copyright 2016 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
[ { "content": "# Copyright 2016 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
diff --git a/c7n/resources/efs.py b/c7n/resources/efs.py index 2687e2113eb..3dfe9b58682 100644 --- a/c7n/resources/efs.py +++ b/c7n/resources/efs.py @@ -27,6 +27,7 @@ class resource_type(object): name = 'Name' date = 'CreationTime' dimension = None + detail_spec = ('describe_tags', 'Fi...
bokeh__bokeh-2235
VBoxForm broken Added a `float:left` to fix `sliders.py` which broke stock app example worse.
[ { "content": "\nfrom bokeh.io import vform\nfrom bokeh.plotting import figure, hplot, output_file, show, vplot, ColumnDataSource\nfrom bokeh.models.actions import Callback\nfrom bokeh.models.widgets import Slider\n\nimport numpy as np\n\nx = np.linspace(0, 10, 500)\ny = np.sin(x)\n\nsource = ColumnDataSource(da...
[ { "content": "\nfrom bokeh.io import vform\nfrom bokeh.plotting import figure, hplot, output_file, show, vplot, ColumnDataSource\nfrom bokeh.models.actions import Callback\nfrom bokeh.models.widgets import Slider\n\nimport numpy as np\n\nx = np.linspace(0, 10, 500)\ny = np.sin(x)\n\nsource = ColumnDataSource(da...
diff --git a/bokehjs/src/less/widgets.less b/bokehjs/src/less/widgets.less index 0069826f406..0d937da33d8 100644 --- a/bokehjs/src/less/widgets.less +++ b/bokehjs/src/less/widgets.less @@ -14,7 +14,6 @@ .bk-widget-form { padding: 30px 30px 30px 30px; overflow: hidden; - float:left; } .bk-widget-form-group {...
typeddjango__django-stubs-1371
Next release planning (1.15.0) I'll make a new release a soonish, perhaps this weekend or next week, now that mypy 1.0 is being tested in CI and used for `django-stubs[compatible-mypy]`. * #1360 I'd like to make a dual release together with djangorestframework-stubs, so recommended mypy version stays in sync betw...
[ { "content": "import os\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, _dirs, files in os.walk(name):\n for file in files:\n if file.endswith(\".pyi\"):\n if os.path.sep in...
[ { "content": "import os\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, _dirs, files in os.walk(name):\n for file in files:\n if file.endswith(\".pyi\"):\n if os.path.sep in...
diff --git a/README.md b/README.md index f75a1e57a..2fde6dddf 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ We rely on different `django` and `mypy` versions: | django-stubs | mypy version | django version | python version |--------------| ---- | ---- | ---- | +| 1.15.0 | 1.0.x | 3.2.x or 4.0.x or ...
voxel51__fiftyone-3297
[BUG] fiftyone forces starlette=0.16.0 and it breaks integrations with applications that use FastAPI in newer versions. ### Instructions Thank you for submitting an issue. Please refer to our [issue policy](https://www.github.com/voxel51/fiftyone/blob/develop/ISSUE_POLICY.md) for information on what types of issue...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nInstalls FiftyOne.\n\n| Copyright 2017-2023, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\ntry:\n from importlib import metadata\nexcept ImportError:\n import importlib_metadata as metadata\n\nimport os\nimport re\nfrom setuptools import se...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nInstalls FiftyOne.\n\n| Copyright 2017-2023, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\ntry:\n from importlib import metadata\nexcept ImportError:\n import importlib_metadata as metadata\n\nimport os\nimport re\nfrom setuptools import se...
diff --git a/setup.py b/setup.py index 826a6ba39a5..002e6a8e3ed 100644 --- a/setup.py +++ b/setup.py @@ -67,7 +67,7 @@ def get_version(): "setuptools", "sseclient-py>=1.7.2,<2", "sse-starlette>=0.10.3,<1", - "starlette>=0.24.0,<0.27", + "starlette>=0.24.0", "strawberry-graphql==0.138.1", ...
learningequality__kolibri-5872
update perseus to use new build config scheme ### Observed behavior follow-up from #5864, need to update perseus to use new buildconfig. Currently builds but does not run. ### Errors and logs Currently getting: ``` ERROR Internal Server Error: /en/user/ Traceback (most recent call last): File "...
[ { "content": "import argparse\nimport importlib\nimport json\nimport logging\nimport os\nimport sys\nimport tempfile\n\nfrom pkg_resources import DistributionNotFound\nfrom pkg_resources import get_distribution\nfrom pkg_resources import resource_exists\nfrom pkg_resources import resource_filename\nfrom pkg_res...
[ { "content": "import argparse\nimport importlib\nimport json\nimport logging\nimport os\nimport sys\nimport tempfile\n\nfrom pkg_resources import DistributionNotFound\nfrom pkg_resources import get_distribution\nfrom pkg_resources import resource_exists\nfrom pkg_resources import resource_filename\nfrom pkg_res...
diff --git a/kolibri/core/package.json b/kolibri/core/package.json index 89b1a9847aa..407ca6f379e 100644 --- a/kolibri/core/package.json +++ b/kolibri/core/package.json @@ -40,7 +40,7 @@ "vuex": "^3.1.0" }, "devDependencies": { - "kolibri-tools": "0.12.0-beta.3.2", + "kolibri-tools": "0.13.0-dev.3", ...
oppia__oppia-8773
All the Frontend services should be documented with jsdoc. **This starter issue is currently on hold because we do not have the capacity to support new contributors working on it.** -------------- We aim to document all the files listed below. Each of the below-listed files should have a file overview signify...
[ { "content": "# Copyright 2019 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n...
[ { "content": "# Copyright 2019 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n...
diff --git a/core/templates/pages/exploration-editor-page/services/user-email-preferences.service.ts b/core/templates/pages/exploration-editor-page/services/user-email-preferences.service.ts index 52e55b80ca706..aedb11d3fc0f0 100644 --- a/core/templates/pages/exploration-editor-page/services/user-email-preferences.serv...
freedomofpress__securedrop-6051
Alembic operations fail with multiple head revisions ## Description All Alembic operations fail with Alembic error: ERROR [alembic.util.messaging] Multiple head revisions are present for given argument 'head'; please specify a specific target revision, '<branchname>@head' to narrow to a specific head, or 'hea...
[ { "content": "\"\"\"unique_index_for_instanceconfig_valid_until\n\nRevision ID: 1ddb81fb88c2\nRevises: 92fba0be98e9\nCreate Date: 2021-06-04 17:28:25.725563\n\n\"\"\"\nfrom alembic import op\nimport sqlalchemy as sa\n\n\n# revision identifiers, used by Alembic.\nrevision = '1ddb81fb88c2'\ndown_revision = '92fba...
[ { "content": "\"\"\"unique_index_for_instanceconfig_valid_until\n\nRevision ID: 1ddb81fb88c2\nRevises: 92fba0be98e9\nCreate Date: 2021-06-04 17:28:25.725563\n\n\"\"\"\nfrom alembic import op\nimport sqlalchemy as sa\n\n\n# revision identifiers, used by Alembic.\nrevision = '1ddb81fb88c2'\ndown_revision = 'b060f...
diff --git a/securedrop/alembic/versions/1ddb81fb88c2_unique_index_for_instanceconfig_valid_.py b/securedrop/alembic/versions/1ddb81fb88c2_unique_index_for_instanceconfig_valid_.py index 74342aed1e..ec65d3a49d 100644 --- a/securedrop/alembic/versions/1ddb81fb88c2_unique_index_for_instanceconfig_valid_.py +++ b/securedr...
spack__spack-18268
Installation issue: dbus (missing libsm dependency) <!-- Thanks for taking the time to report this build failure. To proceed with the report please: 1. Title the issue "Installation issue: <name-of-the-package>". 2. Provide the information required below. We encourage you to try, as much as possible, to reduce...
[ { "content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Dbus(Package):\n \"\"\"D-Bus is a message bus system, a simpl...
[ { "content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Dbus(Package):\n \"\"\"D-Bus is a message bus system, a simpl...
diff --git a/var/spack/repos/builtin/packages/dbus/package.py b/var/spack/repos/builtin/packages/dbus/package.py index 31495a06b5510a..f47f7f4b16265d 100644 --- a/var/spack/repos/builtin/packages/dbus/package.py +++ b/var/spack/repos/builtin/packages/dbus/package.py @@ -30,6 +30,7 @@ class Dbus(Package): depends_o...
oobabooga__text-generation-webui-4905
coqui_tts fails to load as assumes interactive sessions to accept ToS ### Describe the bug When enabled coqui_tts prevents textgen from starting as it expects an interactive session for a user to accept a ToS agreement ### Is there an existing issue for this? - [X] I have searched the existing issues ### Re...
[ { "content": "import html\nimport json\nimport random\nimport time\nfrom pathlib import Path\n\nimport gradio as gr\n\nfrom modules import chat, shared, ui_chat\nfrom modules.logging_colors import logger\nfrom modules.ui import create_refresh_button\nfrom modules.utils import gradio\n\ntry:\n from TTS.api im...
[ { "content": "import os\nimport html\nimport json\nimport random\nimport time\nfrom pathlib import Path\n\nimport gradio as gr\n\nfrom modules import chat, shared, ui_chat\nfrom modules.logging_colors import logger\nfrom modules.ui import create_refresh_button\nfrom modules.utils import gradio\n\ntry:\n from...
diff --git a/extensions/coqui_tts/script.py b/extensions/coqui_tts/script.py index 81e85117d4..682cb94ca4 100644 --- a/extensions/coqui_tts/script.py +++ b/extensions/coqui_tts/script.py @@ -1,3 +1,4 @@ +import os import html import json import random @@ -26,6 +27,7 @@ raise +os.environ["COQUI_TOS_AGREED"] ...
boto__botocore-1117
Support Python 3.6 Python 3.6 got released, and some distro (like Fedora) are swithcing to it.
[ { "content": "#!/usr/bin/env python\nimport botocore\nimport sys\n\nfrom setuptools import setup, find_packages\n\n\nrequires = ['jmespath>=0.7.1,<1.0.0',\n 'python-dateutil>=2.1,<3.0.0',\n 'docutils>=0.10']\n\n\nif sys.version_info[:2] == (2, 6):\n # For python2.6 we have a few other d...
[ { "content": "#!/usr/bin/env python\nimport botocore\nimport sys\n\nfrom setuptools import setup, find_packages\n\n\nrequires = ['jmespath>=0.7.1,<1.0.0',\n 'python-dateutil>=2.1,<3.0.0',\n 'docutils>=0.10']\n\n\nif sys.version_info[:2] == (2, 6):\n # For python2.6 we have a few other d...
diff --git a/.travis.yml b/.travis.yml index b4c6cd4f63..75633c23f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ python: - "3.3" - "3.4" - "3.5" - - "3.6-dev" + - "3.6" sudo: false before_install: - if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then diff --g...
huggingface__dataset-viewer-2409
Retry jobs that finish with `ClientConnection` error? Maybe here: https://github.com/huggingface/datasets-server/blob/f311a9212aaa91dd0373e5c2d4f5da9b6bdabcb5/chart/env/prod.yaml#L209 Internal conversation on Slack: https://huggingface.slack.com/archives/C0311GZ7R6K/p1698224875005729 Anyway: I'm wondering if we c...
[ { "content": "# SPDX-License-Identifier: Apache-2.0\n# Copyright 2022 The HuggingFace Authors.\n\nCACHE_COLLECTION_RESPONSES = \"cachedResponsesBlue\"\nCACHE_MONGOENGINE_ALIAS = \"cache\"\nHF_DATASETS_CACHE_APPNAME = \"hf_datasets_cache\"\nPARQUET_METADATA_CACHE_APPNAME = \"datasets_server_parquet_metadata\"\nD...
[ { "content": "# SPDX-License-Identifier: Apache-2.0\n# Copyright 2022 The HuggingFace Authors.\n\nCACHE_COLLECTION_RESPONSES = \"cachedResponsesBlue\"\nCACHE_MONGOENGINE_ALIAS = \"cache\"\nHF_DATASETS_CACHE_APPNAME = \"hf_datasets_cache\"\nPARQUET_METADATA_CACHE_APPNAME = \"datasets_server_parquet_metadata\"\nD...
diff --git a/libs/libcommon/src/libcommon/constants.py b/libs/libcommon/src/libcommon/constants.py index 0a17db2ce6..075c5529af 100644 --- a/libs/libcommon/src/libcommon/constants.py +++ b/libs/libcommon/src/libcommon/constants.py @@ -36,6 +36,7 @@ PARQUET_REVISION = "refs/convert/parquet" ERROR_CODES_TO_RETRY = { ...
getredash__redash-4189
JIRA setup: change password field name to "API Token" While a password can be used there, it's not recommended and eventually will be deprecated.
[ { "content": "import re\nfrom collections import OrderedDict\n\nfrom redash.query_runner import *\nfrom redash.utils import json_dumps, json_loads\n\n\n# TODO: make this more general and move into __init__.py\nclass ResultSet(object):\n def __init__(self):\n self.columns = OrderedDict()\n self....
[ { "content": "import re\nfrom collections import OrderedDict\n\nfrom redash.query_runner import *\nfrom redash.utils import json_dumps, json_loads\n\n\n# TODO: make this more general and move into __init__.py\nclass ResultSet(object):\n def __init__(self):\n self.columns = OrderedDict()\n self....
diff --git a/redash/query_runner/jql.py b/redash/query_runner/jql.py index 76e707e3a3..47a47b2fe6 100644 --- a/redash/query_runner/jql.py +++ b/redash/query_runner/jql.py @@ -144,7 +144,7 @@ class JiraJQL(BaseHTTPQueryRunner): requires_authentication = True url_title = 'JIRA URL' username_title = 'Userna...
conda__conda-3740
conda env create giving ImportError for yaml package `conda env create` suddenly started giving `"ImportError: No module named 'yaml'"` with latest miniconda on my TravisCI builbs: https://travis-ci.org/leouieda/website/builds/170917743 I changed nothing significant in my code. Tried rebuilding previous passing builds...
[ { "content": "\"\"\"\nWrapper around yaml to ensure that everything is ordered correctly.\n\nThis is based on the answer at http://stackoverflow.com/a/16782282\n\"\"\"\nfrom __future__ import absolute_import, print_function\nfrom collections import OrderedDict\nimport yaml\n\n\ndef represent_ordereddict(dumper,...
[ { "content": "\"\"\"\nWrapper around yaml to ensure that everything is ordered correctly.\n\nThis is based on the answer at http://stackoverflow.com/a/16782282\n\"\"\"\nfrom __future__ import absolute_import, print_function\nfrom collections import OrderedDict\n\nfrom conda.common.yaml import get_yaml\nyaml = g...
diff --git a/conda_env/yaml.py b/conda_env/yaml.py index 74a462f3579..fbe8dc7e088 100644 --- a/conda_env/yaml.py +++ b/conda_env/yaml.py @@ -5,7 +5,9 @@ """ from __future__ import absolute_import, print_function from collections import OrderedDict -import yaml + +from conda.common.yaml import get_yaml +yaml = get_ya...
typeddjango__django-stubs-1343
Next release planning (1.14.0) Tracking a few regressions in [version 1.13.2](https://github.com/typeddjango/django-stubs/releases/tag/1.13.2), we should probably get out a release quickly once these are resolved. * #1335 * Fixes #1333 * Fixes #1336 * https://github.com/typeddjango/django-stubs/pull/1331 *...
[ { "content": "import os\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, _dirs, files in os.walk(name):\n for file in files:\n if file.endswith(\".pyi\"):\n if os.path.sep in...
[ { "content": "import os\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, _dirs, files in os.walk(name):\n for file in files:\n if file.endswith(\".pyi\"):\n if os.path.sep in...
diff --git a/README.md b/README.md index 65c83a392..f75a1e57a 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ We rely on different `django` and `mypy` versions: | django-stubs | mypy version | django version | python version |--------------| ---- | ---- | ---- | +| 1.14.0 | 0.990+ | 3.2.x or 4.0.x or...
pytorch__TensorRT-371
🐛 [Bug] An error occurs in CompileGraph when gpu_id == 1 When I tried to Complie on the second GPU in a multi-GPU environment, an error occurred. The code sample used is as follows. ```cpp void load(const std::string& model_path, int64_t gpu_id, int64_t opt_batch_size) { torch::jit::Module module = torch::jit...
[ { "content": "from typing import List, Dict, Any\nimport torch\nfrom torch import nn\n\nimport trtorch._C\nfrom trtorch._compile_spec import _parse_compile_spec\nfrom trtorch._version import __version__\nfrom types import FunctionType\n\n\ndef compile(module: torch.jit.ScriptModule, compile_spec: Any) -> torch....
[ { "content": "from typing import List, Dict, Any\nimport torch\nfrom torch import nn\n\nimport trtorch._C\nfrom trtorch._compile_spec import _parse_compile_spec\nfrom trtorch._version import __version__\nfrom types import FunctionType\n\n\ndef compile(module: torch.jit.ScriptModule, compile_spec: Any) -> torch....
diff --git a/core/conversion/conversionctx/ConversionCtx.cpp b/core/conversion/conversionctx/ConversionCtx.cpp index ff236921c2..9d47026c60 100644 --- a/core/conversion/conversionctx/ConversionCtx.cpp +++ b/core/conversion/conversionctx/ConversionCtx.cpp @@ -47,6 +47,11 @@ ConversionCtx::ConversionCtx(BuilderSettings b...
Gallopsled__pwntools-1716
Importing pwntools breaks carriage return Normally, a loop like below ``` for i in range(0, 5): print(str(i), end="\r") ``` should print each number in the same space. However, when I import pwntools, this behavior breaks and each one is printed on a new line or sequentially. System is ubuntu 18.04. Latest ...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\n\nimport atexit\nimport os\nimport re\nimport signal\nimport six\nimport struct\nimport sys\nimport threading\nimport traceback\n\nif sys.platform != 'win32':\n import fcntl\n import termios\n\nfrom pwnlib.context impor...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\n\nimport atexit\nimport os\nimport re\nimport signal\nimport six\nimport struct\nimport sys\nimport threading\nimport traceback\n\nif sys.platform != 'win32':\n import fcntl\n import termios\n\nfrom pwnlib.context impor...
diff --git a/pwnlib/term/term.py b/pwnlib/term/term.py index df35e68a5..2d0f41d6c 100644 --- a/pwnlib/term/term.py +++ b/pwnlib/term/term.py @@ -425,7 +425,7 @@ def render_cell(cell, clear_after = False): put('\x08') col -= 1 elif t == CR: -# put('\r') + ...
bokeh__bokeh-9368
Use `npm ci` to force usage of the lock file `npm ci` should be used in situations where any update of dependencies is undesired, especially in CI. `npm ci` installs dependencies exactly as specified in `package-lock.json`. On the other hand `npm install` can still perform minor updates.
[ { "content": "'''\n\n'''\nimport shutil\nfrom glob import glob\nfrom os.path import dirname, exists, join, realpath, relpath\nimport os, re, subprocess, sys, time\n\nimport versioneer\n\n# provide fallbacks for highlights in case colorama is not installed\ntry:\n import colorama\n from colorama import For...
[ { "content": "'''\n\n'''\nimport shutil\nfrom glob import glob\nfrom os.path import dirname, exists, join, realpath, relpath\nimport os, re, subprocess, sys, time\n\nimport versioneer\n\n# provide fallbacks for highlights in case colorama is not installed\ntry:\n import colorama\n from colorama import For...
diff --git a/_setup_support.py b/_setup_support.py index 80bb17de726..e9affaf8933 100644 --- a/_setup_support.py +++ b/_setup_support.py @@ -406,7 +406,7 @@ def package_path(path, filters=()): %s -Have you run `npm install --no-save` from the bokehjs subdirectory? +Have you run `npm ci` from the bokehjs subdir...
keras-team__keras-nlp-1166
Add compute_output_shape method to WordPieceTokenizer When we run Pretraining Transformer from Scratch guide with PyTorch and JAX backend, it raises ``` RuntimeError: Exception encountered when calling WordPieceTokenizer.call(). Could not automatically infer the output shape / dtype of 'word_piece_tokenizer_1'...
[ { "content": "# Copyright 2023 The KerasNLP Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
[ { "content": "# Copyright 2023 The KerasNLP Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
diff --git a/keras_nlp/tokenizers/tokenizer.py b/keras_nlp/tokenizers/tokenizer.py index dbc7c4bbdb..e03123b0c5 100644 --- a/keras_nlp/tokenizers/tokenizer.py +++ b/keras_nlp/tokenizers/tokenizer.py @@ -123,3 +123,6 @@ def token_to_id(self, token: str) -> int: def call(self, inputs, *args, training=None, **kwarg...
djangopackages__djangopackages-267
Add errormator.com
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Heroku specific settings. These are used to deploy opencomparison to\nHeroku's platform.\n\"\"\"\n\n\nfrom os import environ\n\nfrom memcacheify import memcacheify\nfrom postgresify import postgresify\nfrom S3 import CallingFormat\n\nfrom settings.base import *\n\n\n...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Heroku specific settings. These are used to deploy opencomparison to\nHeroku's platform.\n\"\"\"\n\n\nfrom os import environ\n\nfrom memcacheify import memcacheify\nfrom postgresify import postgresify\nfrom S3 import CallingFormat\n\nfrom settings.base import *\n\n\n...
diff --git a/requirements.txt b/requirements.txt index a6f0c0f28..194b08b16 100644 --- a/requirements.txt +++ b/requirements.txt @@ -40,3 +40,4 @@ raven==1.4.6 rq==0.3.8 requests==1.2.3 six==1.1.0 +appenlight-client==0.6.4 \ No newline at end of file diff --git a/settings/heroku.py b/settings/heroku.py index f555a44...
kivy__kivy-611
Label Text Clipped Horizontally (Moved) **Originally reported as a continuation of #576 by esbullington** I think I'm having trouble with this same issue. I'm trying to use markup with a Label, and am finding that my Label text is cut-off along the horizontal axis if I have markup set to True. This probably is only ...
[ { "content": "'''\nText Markup\n===========\n\n.. versionadded:: 1.1.0\n\nWe provide a simple text-markup for inline text styling. The syntax look the\nsame as the `BBCode <http://en.wikipedia.org/wiki/BBCode>`_.\n\nA tag is defined as ``[tag]``, and might have a closed tag associated:\n``[/tag]``. Example of a...
[ { "content": "'''\nText Markup\n===========\n\n.. versionadded:: 1.1.0\n\nWe provide a simple text-markup for inline text styling. The syntax look the\nsame as the `BBCode <http://en.wikipedia.org/wiki/BBCode>`_.\n\nA tag is defined as ``[tag]``, and might have a closed tag associated:\n``[/tag]``. Example of a...
diff --git a/kivy/core/text/markup.py b/kivy/core/text/markup.py index 1d05d14dbc..46e41ea351 100644 --- a/kivy/core/text/markup.py +++ b/kivy/core/text/markup.py @@ -266,7 +266,7 @@ def _real_render(self): y = 0 w, h = self._size refs = self._refs - no_of_lines = len(self._lines)-1 + ...
OpenNMT__OpenNMT-tf-6
Poor translation results with the Transformer The Transformer model produces very bad translation results. Its implementation should be revised and fixed. See also the reference implementation at https://github.com/tensorflow/tensor2tensor.
[ { "content": "\"\"\"Define functions related to the Google's Transformer model.\"\"\"\n\nimport tensorflow as tf\n\n\ndef scaled_dot_attention(queries,\n keys,\n values,\n mode,\n values_length=None,\n ...
[ { "content": "\"\"\"Define functions related to the Google's Transformer model.\"\"\"\n\nimport tensorflow as tf\n\n\ndef scaled_dot_attention(queries,\n keys,\n values,\n mode,\n values_length=None,\n ...
diff --git a/opennmt/utils/transformer.py b/opennmt/utils/transformer.py index 68d1a89c1..70d0fc9e6 100644 --- a/opennmt/utils/transformer.py +++ b/opennmt/utils/transformer.py @@ -163,5 +163,5 @@ def add_and_norm(inputs, rate=dropout, training=mode == tf.estimator.ModeKeys.TRAIN) outputs += inputs - ...
qutip__qutip-834
Incorrect docstring of spin coherent state In qutip.states the docstring of the `spin_coherent` state is the same of `spin_state`. The correct description should be: "Generate the coherent spin state |theta, phi>."
[ { "content": "# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the followi...
[ { "content": "# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the followi...
diff --git a/qutip/states.py b/qutip/states.py index 0345945771..d0710ad7df 100644 --- a/qutip/states.py +++ b/qutip/states.py @@ -1060,8 +1060,7 @@ def spin_state(j, m, type='ket'): def spin_coherent(j, theta, phi, type='ket'): - """Generates the spin state |j, m>, i.e. the eigenstate - of the spin-j Sz op...
cookiecutter__cookiecutter-588
No way to define options that have no defaults Currently if you set a value in `cookiecutter.json` to `null` it becomes `None` and is then turned into the _string_ `'None'`.
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ncookiecutter.prompt\n---------------------\n\nFunctions for prompting the user for project info.\n\"\"\"\n\nfrom collections import OrderedDict\n\nimport click\nfrom past.builtins import basestring\n\nfrom future.utils import iteritems\nfro...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ncookiecutter.prompt\n---------------------\n\nFunctions for prompting the user for project info.\n\"\"\"\n\nfrom collections import OrderedDict\n\nimport click\nfrom past.builtins import basestring\n\nfrom future.utils import iteritems\nfro...
diff --git a/cookiecutter/prompt.py b/cookiecutter/prompt.py index d06409c42..0809f9e56 100755 --- a/cookiecutter/prompt.py +++ b/cookiecutter/prompt.py @@ -81,6 +81,8 @@ def read_user_choice(var_name, options): def render_variable(env, raw, cookiecutter_dict): + if raw is None: + return None if not...
openvinotoolkit__datumaro-125
infer result passed from openvino launcher to interpreter is not appropriate. I tried model run using openvino's mobileenet-v2-pytorch model. (using mobilenet-v2-pytorch.xml, mobilenet-v2-pytorch.bin) `datum model run -p proj -m model-0` However, only the name of the layer (ex. 'prob' string) comes into the inpu...
[ { "content": "\n# Copyright (C) 2019-2020 Intel Corporation\n#\n# SPDX-License-Identifier: MIT\n\n# pylint: disable=exec-used\n\nimport cv2\nimport logging as log\nimport numpy as np\nimport os.path as osp\nimport shutil\n\nfrom openvino.inference_engine import IECore\n\nfrom datumaro.components.cli_plugin impo...
[ { "content": "\n# Copyright (C) 2019-2020 Intel Corporation\n#\n# SPDX-License-Identifier: MIT\n\n# pylint: disable=exec-used\n\nimport cv2\nimport logging as log\nimport numpy as np\nimport os.path as osp\nimport shutil\n\nfrom openvino.inference_engine import IECore\n\nfrom datumaro.components.cli_plugin impo...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 12e1062671..f16e5fce62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - ### Fixed -- +- Inference result for only one output layer in OpenVINO launcher (<https://github.com...
ietf-tools__datatracker-6907
the ietf meeting parts of upcoming.ics end a day early Our custom ics should take into account (from RFC5545) >The "DTEND" property for a "VEVENT" calendar component specifies the non-inclusive end of the event. See https://github.com/ietf-tools/datatracker/blob/287cf0fe46c0b1b7548389b4327854567e6...
[ { "content": "# Copyright The IETF Trust 2007-2023, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nimport datetime\nimport re\nfrom urllib.parse import urljoin\nfrom zoneinfo import ZoneInfo\n\nfrom django import template\nfrom django.conf import settings\nfrom django.utils.html import escape\nfrom django.te...
[ { "content": "# Copyright The IETF Trust 2007-2023, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nimport datetime\nimport re\nfrom urllib.parse import urljoin\nfrom zoneinfo import ZoneInfo\n\nfrom django import template\nfrom django.conf import settings\nfrom django.utils.html import escape\nfrom django.te...
diff --git a/ietf/doc/templatetags/ietf_filters.py b/ietf/doc/templatetags/ietf_filters.py index 8d9336b536..cfed7aa1db 100644 --- a/ietf/doc/templatetags/ietf_filters.py +++ b/ietf/doc/templatetags/ietf_filters.py @@ -539,6 +539,10 @@ def ics_date_time(dt, tzname): return f':{timestamp}Z' else: ...
microsoft__playwright-python-1497
[Question]: How to get the right BrowserType from a device name? ### Your question I noticed that the CLI is able to figure out the right `BrowserType` to use when it is launched from the command line: ``` playwright open --device="Desktop Safari" wikipedia.org # Webkit playwright open --device="Desktop Firefox...
[ { "content": "# Copyright (c) Microsoft Corporation.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap...
[ { "content": "# Copyright (c) Microsoft Corporation.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap...
diff --git a/playwright/_impl/_playwright.py b/playwright/_impl/_playwright.py index 354e3d11c..f9fe7617f 100644 --- a/playwright/_impl/_playwright.py +++ b/playwright/_impl/_playwright.py @@ -81,4 +81,5 @@ def parse_device_descriptor(dict: Dict) -> Dict: "device_scale_factor": dict["deviceScaleFactor"], ...
mkdocs__mkdocs-2893
Support latest realise of Markdown library I believe there has been some update to the `Markdown` library and how it internally records its version that is breaking things. With a brand new environment and a fresh install of `mkdocs`, a `mkdocs build --strict --verbose` fails my project with this error: ```bash ...
[ { "content": "#!/usr/bin/env python\n\nfrom setuptools import setup\nimport re\nimport os\nimport sys\n\nfrom mkdocs.commands.setup import babel_cmdclass\n\nwith open('README.md') as f:\n long_description = f.read()\n\n\ndef get_version(package):\n \"\"\"Return package version as listed in `__version__` i...
[ { "content": "#!/usr/bin/env python\n\nfrom setuptools import setup\nimport re\nimport os\nimport sys\n\nfrom mkdocs.commands.setup import babel_cmdclass\n\nwith open('README.md') as f:\n long_description = f.read()\n\n\ndef get_version(package):\n \"\"\"Return package version as listed in `__version__` i...
diff --git a/requirements/project.txt b/requirements/project.txt index 1402023779..b158a10a42 100644 --- a/requirements/project.txt +++ b/requirements/project.txt @@ -1,7 +1,7 @@ babel>=2.9.0 click>=7.0 Jinja2>=2.10.2 -Markdown>=3.2.1 +Markdown>=3.2.1,<3.4 PyYAML>=5.2 watchdog>=2.0.0 mdx_gh_links>=0.2 diff --git ...
django-cms__django-cms-3868
Implements a different live/draft switcher for placeholders outside of the CMS. Placeholders outside of the CMS currently cause the live/draft switcher to be displayed, which toggles the editing mode. However, for non-CMS models, draft versions are not implemented. This can be confusing to users. This PR adds another ...
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.core.urlresolvers import reverse, NoReverseMatch, resolve, Resolver404\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib import admin\nfrom django.co...
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.core.urlresolvers import reverse, NoReverseMatch, resolve, Resolver404\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib import admin\nfrom django.co...
diff --git a/cms/cms_toolbar.py b/cms/cms_toolbar.py index 9285aaf348d..992099bd4e3 100644 --- a/cms/cms_toolbar.py +++ b/cms/cms_toolbar.py @@ -274,8 +274,8 @@ def populate(self): def post_template_populate(self): self.init_placeholders_from_request() - self.add_publish_button() self.ad...
scikit-image__scikit-image-3790
0.14.2 test suite fails with `NameError: global name 'osp'` ## Description The test suite does not pass. As far as I know `osp` is a common alias for `os.path`. Is this a typo in the code? Or related to the base python version? ## Way to reproduce ```python pytest -vv ``` ## Version information ```python ...
[ { "content": "\"\"\"Image Processing SciKit (Toolbox for SciPy)\n\n``scikit-image`` (a.k.a. ``skimage``) is a collection of algorithms for image\nprocessing and computer vision.\n\nThe main package of ``skimage`` only provides a few utilities for converting\nbetween image data types; for most features, you need...
[ { "content": "\"\"\"Image Processing SciKit (Toolbox for SciPy)\n\n``scikit-image`` (a.k.a. ``skimage``) is a collection of algorithms for image\nprocessing and computer vision.\n\nThe main package of ``skimage`` only provides a few utilities for converting\nbetween image data types; for most features, you need...
diff --git a/skimage/__init__.py b/skimage/__init__.py index 52c8a3af409..d77fd21e9a0 100644 --- a/skimage/__init__.py +++ b/skimage/__init__.py @@ -135,6 +135,7 @@ def _test(doctest=False, verbose=False): def _raise_build_error(e): # Raise a comprehensible error + import os.path as osp local_dir = osp....
pytorch__vision-2933
Change default value of eps in FrozenBatchNorm to match BatchNorm ## ❓ Questions and Help Hello Loss is nan error occurs when I learn fast rcnn with resnext101 backbone My code is as follows ```python backbone = resnet_fpn_backbone('resnext101_32x8d', pretrained=True) model = FasterRCNN(backbone, num_classes) in...
[ { "content": "\"\"\"\nhelper class that supports empty tensors on some nn functions.\n\nIdeally, add support directly in PyTorch to empty tensors in\nthose functions.\n\nThis can be removed once https://github.com/pytorch/pytorch/issues/12013\nis implemented\n\"\"\"\n\nimport warnings\nimport torch\nfrom torch ...
[ { "content": "\"\"\"\nhelper class that supports empty tensors on some nn functions.\n\nIdeally, add support directly in PyTorch to empty tensors in\nthose functions.\n\nThis can be removed once https://github.com/pytorch/pytorch/issues/12013\nis implemented\n\"\"\"\n\nimport warnings\nimport torch\nfrom torch ...
diff --git a/test/test_models.py b/test/test_models.py index acff816852b..b37fb176a2b 100644 --- a/test/test_models.py +++ b/test/test_models.py @@ -6,9 +6,10 @@ import numpy as np from torchvision import models import unittest -import traceback import random +from torchvision.ops.misc import FrozenBatchNorm2d + ...
OCA__server-tools-464
runbot 9.0 red due to letsencrypt? Hi, It seems the 9.0 branch is red on runbot due to the letsencrypt module? ``` Call of self.pool.get('letsencrypt').cron(cr, uid, *()) failed in Job 2 Traceback (most recent call last): File "/srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3148182-9...
[ { "content": "# -*- coding: utf-8 -*-\n# © 2016 Therp BV <http://therp.nl>\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).\n{\n \"name\": \"Let's encrypt\",\n \"version\": \"9.0.1.0.0\",\n \"author\": \"Therp BV,\"\n \"Tecnativa,\"\n \"Odoo Community Asso...
[ { "content": "# -*- coding: utf-8 -*-\n# © 2016 Therp BV <http://therp.nl>\n# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).\n{\n \"name\": \"Let's encrypt\",\n \"version\": \"9.0.1.0.0\",\n \"author\": \"Therp BV,\"\n \"Tecnativa,\"\n \"Odoo Community Asso...
diff --git a/auth_supplier/security/auth_supplier_security.xml b/auth_supplier/security/auth_supplier_security.xml index 93293bee2f6..0108e381f29 100644 --- a/auth_supplier/security/auth_supplier_security.xml +++ b/auth_supplier/security/auth_supplier_security.xml @@ -4,7 +4,6 @@ <record id="group_auth_supplier" m...
scrapy__scrapy-4503
Fix the hoverxref configuration > You shouldn't override hoverxref_version and hoverxref_project since they are taken automatically from Read the Docs. > > If you want to avoid your CI failing because of this, you can define the environment variables as Read the Docs does: > > READTHEDOCS_PROJECT=scrapy > READTHE...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Scrapy documentation build configuration file, created by\n# sphinx-quickstart on Mon Nov 24 12:02:52 2008.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# The contents of this file are pickled, so don't put values in the nam...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Scrapy documentation build configuration file, created by\n# sphinx-quickstart on Mon Nov 24 12:02:52 2008.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# The contents of this file are pickled, so don't put values in the nam...
diff --git a/docs/conf.py b/docs/conf.py index 4414ef6371a..813417bae17 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -295,8 +295,6 @@ # ------------------------------------ hoverxref_auto_ref = True -hoverxref_project = "scrapy" -hoverxref_version = release hoverxref_role_types = { "class": "tooltip", ...
pallets__click-2187
click.echo is improperly typed I'm getting a repeat of #2174 : although click.secho has been fixed, pyright is continuing to complain about the type annotation for click.echo #2175 only fixes the problem for click.secho, I think the same should be done for click.echo? (Running with 1c588834)
[ { "content": "import os\nimport sys\nimport typing as t\nfrom functools import update_wrapper\nfrom types import ModuleType\n\nfrom ._compat import _default_text_stderr\nfrom ._compat import _default_text_stdout\nfrom ._compat import _find_binary_writer\nfrom ._compat import auto_wrap_for_ansi\nfrom ._compat im...
[ { "content": "import os\nimport sys\nimport typing as t\nfrom functools import update_wrapper\nfrom types import ModuleType\n\nfrom ._compat import _default_text_stderr\nfrom ._compat import _default_text_stdout\nfrom ._compat import _find_binary_writer\nfrom ._compat import auto_wrap_for_ansi\nfrom ._compat im...
diff --git a/CHANGES.rst b/CHANGES.rst index 6c9a79327..d02c3e952 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,7 +14,8 @@ Unreleased - Fix a typo in the Bash completion script that affected file and directory completion. If this script was generated by a previous version, it should be regenerated. :is...
alltheplaces__alltheplaces-4514
Domains missing from New Look websites The new_look_gb.py spider is returning websites that are missing the domain name. This is because that's how the website appears in the schema.org block on the pages being scraped. e.g. we have `"url":"/uk/store/Beccles-Beccles-GB-1775"`. The scheme and domain `https://www.newl...
[ { "content": "from scrapy.spiders import SitemapSpider\n\nfrom locations.structured_data_spider import StructuredDataSpider\n\n\nclass NewLookGB(SitemapSpider, StructuredDataSpider):\n name = \"new_look_gb\"\n item_attributes = {\"brand\": \"New Look\", \"brand_wikidata\": \"Q12063852\"}\n sitemap_urls...
[ { "content": "from scrapy.spiders import SitemapSpider\n\nfrom locations.structured_data_spider import StructuredDataSpider\n\n\nclass NewLookGB(SitemapSpider, StructuredDataSpider):\n name = \"new_look_gb\"\n item_attributes = {\"brand\": \"New Look\", \"brand_wikidata\": \"Q12063852\"}\n sitemap_urls...
diff --git a/locations/spiders/new_look_gb.py b/locations/spiders/new_look_gb.py index 18e75cd91eb..7dc6f8af6c8 100644 --- a/locations/spiders/new_look_gb.py +++ b/locations/spiders/new_look_gb.py @@ -15,3 +15,7 @@ def sitemap_filter(self, entries): for entry in entries: if "closed" not in entry["...
ibis-project__ibis-4637
Problem with formatting union expressions when using `value_counts` I'm working on a subclass of the MySQL backend and using unions. When attempting to do a `value_counts` on a union, I get an attribute error. Here is a simple test using our backend (this DataFrame upload might not work in the actual MySQL, but should ...
[ { "content": "from __future__ import annotations\n\nimport collections\nimport functools\nimport textwrap\nimport types\nfrom typing import Any, Callable, Deque, Iterable, Mapping, Tuple\n\nimport rich.pretty\n\nimport ibis\nimport ibis.common.graph as graph\nimport ibis.expr.datatypes as dt\nimport ibis.expr.o...
[ { "content": "from __future__ import annotations\n\nimport collections\nimport functools\nimport textwrap\nimport types\nfrom typing import Any, Callable, Deque, Iterable, Mapping, Tuple\n\nimport rich.pretty\n\nimport ibis\nimport ibis.common.graph as graph\nimport ibis.expr.datatypes as dt\nimport ibis.expr.o...
diff --git a/ibis/expr/format.py b/ibis/expr/format.py index 3c6065baf22a..1d3ae3e7075d 100644 --- a/ibis/expr/format.py +++ b/ibis/expr/format.py @@ -643,7 +643,7 @@ def _fmt_value_table_node(op: ops.TableNode, *, aliases: Aliases, **_: Any) -> s This function is called when a table is used in a value expression....
scalableminds__webknossos-libs-312
Convenience for wkcuber.api To open/create a dataset with the cool new high-level API the following code is required: ```python from wkcuber.api.Dataset import WKDataset from pathlib import Path ds1 = WKDataset.create(Path("path") / "to" / "dataset1", scale=(128,128,128)) ds2 = WKDataset.open(Path("path") / "t...
[ { "content": "from .cubing import cubing\nfrom .downsampling import downsample_mags\nfrom .compress import compress_mag\nfrom .metadata import write_webknossos_metadata\n", "path": "wkcuber/__init__.py" } ]
[ { "content": "from .api.Dataset import WKDataset\nfrom .cubing import cubing\nfrom .downsampling import downsample_mags\nfrom .compress import compress_mag\nfrom .mag import Mag\nfrom .metadata import write_webknossos_metadata\n", "path": "wkcuber/__init__.py" } ]
diff --git a/tests/test_reexport.py b/tests/test_reexport.py new file mode 100644 index 000000000..124704668 --- /dev/null +++ b/tests/test_reexport.py @@ -0,0 +1,8 @@ +from wkcuber import Mag, WKDataset +from wkcuber.mag import Mag as _Mag +from wkcuber.api.Dataset import WKDataset as _WKDataset + + +def test_reexport...
opsdroid__opsdroid-1241
Exiting opsdroid with ctrl+c fails with exception <!-- Before you post an issue or if you are unsure about something join our matrix channel https://riot.im/app/#/room/#opsdroid-general:matrix.org and ask away! We are more than happy to help you. --> # Description I am trying to build a Slack bot using Opsdroid (mast...
[ { "content": "\"\"\"A connector for Slack.\"\"\"\nimport logging\nimport re\nimport ssl\nimport certifi\n\nimport slack\nfrom emoji import demojize\n\nfrom opsdroid.connector import Connector, register_event\nfrom opsdroid.events import Message, Reaction\nfrom opsdroid.connector.slack.events import Blocks\n\n\n...
[ { "content": "\"\"\"A connector for Slack.\"\"\"\nimport logging\nimport re\nimport ssl\nimport certifi\n\nimport slack\nfrom emoji import demojize\n\nfrom opsdroid.connector import Connector, register_event\nfrom opsdroid.events import Message, Reaction\nfrom opsdroid.connector.slack.events import Blocks\n\n\n...
diff --git a/opsdroid/connector/slack/__init__.py b/opsdroid/connector/slack/__init__.py index 833b32730..6cca1d43e 100644 --- a/opsdroid/connector/slack/__init__.py +++ b/opsdroid/connector/slack/__init__.py @@ -87,7 +87,7 @@ async def connect(self): async def disconnect(self): """Disconnect from Slack...
TabbycatDebate__tabbycat-2348
Crash when generating QF draw (WS) **Running:** a1ca1a390866199e1884db12c215ddaa867a98dc When generating the draw for the first elimination round in a WS tournament, I encountered this exception: ```python [2023-07-09 12:01:47,564] ERROR django.request: Internal Server Error: /xxx-yyz/admin/draw/round/7/create/...
[ { "content": "import logging\n\nfrom django.utils.translation import gettext as _\n\nlogger = logging.getLogger(__name__)\n\n\nclass BaseDrawError(Exception):\n pass\n\n\nclass DrawUserError(BaseDrawError):\n \"\"\"DrawUserError is raised by any DrawGenerator class when a problem that\n would appear to...
[ { "content": "import logging\n\nfrom django.utils.translation import gettext as _\n\nlogger = logging.getLogger(__name__)\n\n\nclass BaseDrawError(Exception):\n pass\n\n\nclass DrawUserError(BaseDrawError):\n \"\"\"DrawUserError is raised by any DrawGenerator class when a problem that\n would appear to...
diff --git a/tabbycat/draw/generator/common.py b/tabbycat/draw/generator/common.py index 2a61de6ea3c..6b31bf373ee 100644 --- a/tabbycat/draw/generator/common.py +++ b/tabbycat/draw/generator/common.py @@ -167,6 +167,7 @@ class BasePairDrawGenerator(BaseDrawGenerator): "side_penalty" : 0, "pul...
openai__gym-2162
close the env when finished https://github.com/openai/gym/blob/345c65973fc7160d8be374745a60c36869d8accc/gym/envs/box2d/lunar_lander.py#L449 Shall we add `env.close()` before returning here? I've seen error below if it's not closed. `ImportError: sys.meta_path is None, Python is likely shutting down`.
[ { "content": "\"\"\"\nRocket trajectory optimization is a classic topic in Optimal Control.\n\nAccording to Pontryagin's maximum principle it's optimal to fire engine full throttle or\nturn it off. That's the reason this environment is OK to have discreet actions (engine on or off).\n\nThe landing pad is always...
[ { "content": "\"\"\"\nRocket trajectory optimization is a classic topic in Optimal Control.\n\nAccording to Pontryagin's maximum principle it's optimal to fire engine full throttle or\nturn it off. That's the reason this environment is OK to have discreet actions (engine on or off).\n\nThe landing pad is always...
diff --git a/gym/envs/box2d/lunar_lander.py b/gym/envs/box2d/lunar_lander.py index 247184591f7..b83256cd271 100644 --- a/gym/envs/box2d/lunar_lander.py +++ b/gym/envs/box2d/lunar_lander.py @@ -446,6 +446,8 @@ def demo_heuristic_lander(env, seed=None, render=False): print("step {} total_reward {:+0.2f}".for...
liqd__a4-meinberlin-2857
ValueError: Missing staticfiles manifest entry for 'js/select_dropdown_init.js' https://sentry.liqd.net/sentry/meinberlin-dev/issues/1032/ ``` ValueError: Missing staticfiles manifest entry for 'js/select_dropdown_init.js' (35 additional frame(s) were not displayed) ... File "django/templatetags/static.py", line 118...
[ { "content": "from django import forms\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom adhocracy4.categories.forms import CategorizableFieldMixin\nfrom adhocracy4.labels.mixins import LabelsAddableFieldMixin\nfrom adhocracy4.maps import widgets as maps_widgets\nfrom meinberlin.apps.contrib.mixi...
[ { "content": "from django import forms\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom adhocracy4.categories.forms import CategorizableFieldMixin\nfrom adhocracy4.labels.mixins import LabelsAddableFieldMixin\nfrom adhocracy4.maps import widgets as maps_widgets\nfrom meinberlin.apps.contrib.mixi...
diff --git a/meinberlin/apps/mapideas/forms.py b/meinberlin/apps/mapideas/forms.py index 18eaf8c807..e69a32391d 100644 --- a/meinberlin/apps/mapideas/forms.py +++ b/meinberlin/apps/mapideas/forms.py @@ -22,7 +22,7 @@ def __init__(self, *args, **kwargs): 'Please locate your proposal on the map.') cla...
elastic__apm-agent-python-1466
Missing HTTP status code since version 6.3.1 using Starlette **Describe the bug**: HTTP status code is missing when using agent versions > 6.2.3 and Starlette **To Reproduce** 1. Create a hello world REST service with FastAPI and agent 6.7.2. 2. Send requests 2. APM transactions are uploaded to ES but are mis...
[ { "content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain...
[ { "content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain...
diff --git a/elasticapm/contrib/starlette/utils.py b/elasticapm/contrib/starlette/utils.py index 48ac251bd..f06c19055 100644 --- a/elasticapm/contrib/starlette/utils.py +++ b/elasticapm/contrib/starlette/utils.py @@ -86,7 +86,7 @@ async def get_data_from_response(message: dict, config: Config, event_type: str) """...