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
⌀
streamlit__streamlit-2148
On the newest docs, "Deploy a Streamlit app" page is empty **Link to doc page in question (if any):** https://docs.streamlit.io/en/stable/deploy_streamlit_app.html **What you think the docs should say:** For now, show placeholder content (link to heroku deploy instructions?) In the future, describe what to do...
[ { "content": "from streamlit import config\n\nfrom streamlit.proto.FileUploader_pb2 import FileUploader as FileUploaderProto\nfrom streamlit.report_thread import get_report_ctx\nfrom streamlit.file_util import get_encoded_file_data\nfrom streamlit.errors import StreamlitDeprecationWarning\nfrom .utils import No...
[ { "content": "from streamlit import config\n\nfrom streamlit.proto.FileUploader_pb2 import FileUploader as FileUploaderProto\nfrom streamlit.report_thread import get_report_ctx\nfrom streamlit.file_util import get_encoded_file_data\nfrom streamlit.errors import StreamlitDeprecationWarning\nfrom .utils import No...
diff --git a/docs/deploy_streamlit_app.md b/docs/deploy_streamlit_app.md index 72040bcce972..873132d1f8b2 100644 --- a/docs/deploy_streamlit_app.md +++ b/docs/deploy_streamlit_app.md @@ -1 +1,3 @@ # Deploy a Streamlit app + +Streamlit sharing is coming soon! Sign up for the beta at [https://www.streamlit.io/sharing-si...
privacyidea__privacyidea-3671
url open for permitted schemes Check if we can provide a specific scheme here. This should only be a `data:` scheme. Tracking issue for: - [x] https://github.com/privacyidea/privacyidea/security/code-scanning/27
[ { "content": "# -*- coding: utf-8 -*-\n#\n# 2018-05-07 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Use tags in email subject.\n# 2017-10-27 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Add additional tags for notification: date, time, client_ip,\n# ua_str...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# 2018-05-07 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Use tags in email subject.\n# 2017-10-27 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Add additional tags for notification: date, time, client_ip,\n# ua_str...
diff --git a/privacyidea/lib/eventhandler/usernotification.py b/privacyidea/lib/eventhandler/usernotification.py index 442f53c3f4..67a5dfc1e7 100644 --- a/privacyidea/lib/eventhandler/usernotification.py +++ b/privacyidea/lib/eventhandler/usernotification.py @@ -422,7 +422,7 @@ def do(self, action, options=None): ...
lutris__lutris-4179
Lutris is trowing some python errors when installing dot net for a wine prefix ### Bug description lutris is giving me some python errors when i try to install dotnet using winetricks after trying to solve it by myself on my main manjaro install i tried to run lutris on a vm to see if i was getting the same err...
[ { "content": "\"\"\"Commands for installer scripts\"\"\"\nimport glob\nimport json\nimport multiprocessing\nimport os\nimport shlex\nimport shutil\nfrom gettext import gettext as _\nfrom pathlib import Path\n\nfrom gi.repository import GLib\n\nfrom lutris import runtime\nfrom lutris.cache import get_cache_path\...
[ { "content": "\"\"\"Commands for installer scripts\"\"\"\nimport glob\nimport json\nimport multiprocessing\nimport os\nimport shlex\nimport shutil\nfrom gettext import gettext as _\nfrom pathlib import Path\n\nfrom gi.repository import GLib\n\nfrom lutris import runtime\nfrom lutris.cache import get_cache_path\...
diff --git a/lutris/installer/commands.py b/lutris/installer/commands.py index ac9cfea153..a7d106aac9 100644 --- a/lutris/installer/commands.py +++ b/lutris/installer/commands.py @@ -447,7 +447,7 @@ def task(self, data): def _monitor_task(self, command): if not command.is_running: logger.debu...
obspy__obspy-2162
CSS format reading / file type detection Hello, Was advised on the mailing list to post this issue here. I've been happily working with CSS format files generated by the Pisces package but have a small issue when trying to read them with ObsPy. Essentially, I get an unknown file format error using 'read' unless I...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nCSS bindings to ObsPy core module.\n\"\"\"\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nfrom future.builtins import * # NOQA\n\nimport os\n\nimport numpy as np\n\nfrom obspy import Stream, Trace, U...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nCSS bindings to ObsPy core module.\n\"\"\"\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nfrom future.builtins import * # NOQA\n\nimport os\n\nimport numpy as np\n\nfrom obspy import Stream, Trace, U...
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1c4e374d5bc..c8f59ee68e9 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,4 +1,4 @@ -1.1.1rc1: +1.1.1rc1.post0: - General: * Tests pass with numpy 1.14 (see #2044). - obspy.core: @@ -28,6 +28,8 @@ stabilize the algorithm (see #2114, #2125). - obspy.io...
biolab__orange3-text-361
Guardian: Fix failing tests on Travis <!-- This is an issue template. Please fill in the relevant details in the sections below. --> ##### Text version <!-- From menu _Options→Add-ons→Orange3-Text_ or code `orangecontrib.text.version.full_version` --> 0.3.0 ##### Orange version <!-- From menu _Help→About→Ve...
[ { "content": "\"\"\" This module fetches data from The Guardian API.\n\nTo use first create :class:`TheGuardianCredentials`:\n\n >>> from orangecontrib.text.guardian import TheGuardianCredentials\n >>> credentials = TheGuardianCredentials('<your-api-key>')\n\nThen create :class:`TheGuardianAPI` object and...
[ { "content": "\"\"\" This module fetches data from The Guardian API.\n\nTo use first create :class:`TheGuardianCredentials`:\n\n >>> from orangecontrib.text.guardian import TheGuardianCredentials\n >>> credentials = TheGuardianCredentials('<your-api-key>')\n\nThen create :class:`TheGuardianAPI` object and...
diff --git a/orangecontrib/text/guardian.py b/orangecontrib/text/guardian.py index d7222d41e..a8b1fa6ba 100644 --- a/orangecontrib/text/guardian.py +++ b/orangecontrib/text/guardian.py @@ -18,6 +18,7 @@ import requests import math import json +import os from Orange import data @@ -155,7 +156,8 @@ def search(sel...
dmlc__dgl-2917
[Bug?] strange behivior of bipartite_from_networkx() ## 🐛 Bug <!-- A clear and concise description of what the bug is. --> ## To Reproduce Steps to reproduce the behavior: Step1: ```python import networkx as nx import dgl B = nx.DiGraph() B.add_nodes_from([1, 2, 3, 4], bipartite=0, some_attr=th.Ten...
[ { "content": "\"\"\"Utilities for batching/unbatching graphs.\"\"\"\nfrom collections.abc import Mapping\n\nfrom . import backend as F\nfrom .base import ALL, is_all, DGLError, dgl_warning\nfrom .heterograph_index import disjoint_union\nfrom .heterograph import DGLHeteroGraph\nfrom . import convert\nfrom . impo...
[ { "content": "\"\"\"Utilities for batching/unbatching graphs.\"\"\"\nfrom collections.abc import Mapping\n\nfrom . import backend as F\nfrom .base import ALL, is_all, DGLError, dgl_warning\nfrom .heterograph_index import disjoint_union\nfrom .heterograph import DGLHeteroGraph\nfrom . import convert\nfrom . impo...
diff --git a/python/dgl/batch.py b/python/dgl/batch.py index a0a9430721ea..21acbce3ba87 100644 --- a/python/dgl/batch.py +++ b/python/dgl/batch.py @@ -168,9 +168,9 @@ def batch(graphs, ndata=ALL, edata=ALL, *, if any(g.is_block for g in graphs): raise DGLError("Batching a MFG is not supported.") - re...
openstates__openstates-scrapers-1997
NH failing since at least 2017-11-16 NH has been failing since 2017-11-16 Based on automated runs it appears that NH has not run successfully in 2 days (2017-11-16). ``` 23:17:39 ERROR pupa: cannot resolve pseudo id to Person: ~{"name": "Yvonne Thomas"} 23:17:39 ERROR pupa: cannot resolve pseudo id to Person: ~{"n...
[ { "content": "import re\n\nfrom pupa.scrape import Person, Scraper\nfrom openstates.utils import LXMLMixin\n\n\nclass NHPersonScraper(Scraper, LXMLMixin):\n members_url = 'http://www.gencourt.state.nh.us/downloads/Members.txt'\n lookup_url = 'http://www.gencourt.state.nh.us/house/members/memberlookup.aspx...
[ { "content": "import re\n\nfrom pupa.scrape import Person, Scraper\nfrom openstates.utils import LXMLMixin\n\n\nclass NHPersonScraper(Scraper, LXMLMixin):\n members_url = 'http://www.gencourt.state.nh.us/downloads/Members.txt'\n lookup_url = 'http://www.gencourt.state.nh.us/house/members/memberlookup.aspx...
diff --git a/openstates/nh/people.py b/openstates/nh/people.py index 80163f9e5b..cbdb2d689a 100644 --- a/openstates/nh/people.py +++ b/openstates/nh/people.py @@ -59,6 +59,13 @@ def _parse_person(self, row, chamber, seat_map): if district == 'Rockingham 0' and last_name == 'Lerner': district = 'Ro...
alibaba__FederatedScope-103
Incorrect Evaluation In each round, multiple evaluation results are reported in the logs, each of which seems to be the results on a fraction of clients.
[ { "content": "import logging\nimport copy\nimport os\n\nimport numpy as np\n\nfrom federatedscope.core.monitors.early_stopper import EarlyStopper\nfrom federatedscope.core.message import Message\nfrom federatedscope.core.communication import StandaloneCommManager, gRPCCommManager\nfrom federatedscope.core.monit...
[ { "content": "import logging\nimport copy\nimport os\n\nimport numpy as np\n\nfrom federatedscope.core.monitors.early_stopper import EarlyStopper\nfrom federatedscope.core.message import Message\nfrom federatedscope.core.communication import StandaloneCommManager, gRPCCommManager\nfrom federatedscope.core.monit...
diff --git a/federatedscope/core/worker/server.py b/federatedscope/core/worker/server.py index 2b9a65042..a3371d228 100644 --- a/federatedscope/core/worker/server.py +++ b/federatedscope/core/worker/server.py @@ -245,6 +245,9 @@ def check_and_move_on(self, min_received_num = self._cfg.federate.sample_clien...
xonsh__xonsh-3546
Fuzzy autocomplete is not working with relative path Hi! The xonsh is great! I have the case: ``` mkdir -p /tmp/test/dir1 /tmp/test/dir2 cd /tmp/test ls 2<tab> # autocomplete shows dir2 ls ./2<tab> # autocomplete shows nothing, "dir2" expected cd /tmp/test/dir1 ls ../2<tab> # autocomplete ...
[ { "content": "import os\nimport re\nimport ast\nimport glob\nimport builtins\n\nimport xonsh.tools as xt\nimport xonsh.platform as xp\nimport xonsh.lazyasd as xl\n\nfrom xonsh.completers.tools import get_filter_function\n\n\n@xl.lazyobject\ndef PATTERN_NEED_QUOTES():\n pattern = r'\\s`\\$\\{\\}\\,\\*\\(\\)\"...
[ { "content": "import os\nimport re\nimport ast\nimport glob\nimport builtins\n\nimport xonsh.tools as xt\nimport xonsh.platform as xp\nimport xonsh.lazyasd as xl\n\nfrom xonsh.completers.tools import get_filter_function\n\n\n@xl.lazyobject\ndef PATTERN_NEED_QUOTES():\n pattern = r'\\s`\\$\\{\\}\\,\\*\\(\\)\"...
diff --git a/news/fix_path_completer.rst b/news/fix_path_completer.rst new file mode 100644 index 0000000000..85b584031a --- /dev/null +++ b/news/fix_path_completer.rst @@ -0,0 +1,23 @@ +**Added:** + +* <news item> + +**Changed:** + +* <news item> + +**Deprecated:** + +* <news item> + +**Removed:** + +* <news item> + +...
pytorch__vision-2086
pretrain models for FCN and DeepLabV3 Is it possible to provide the pretrain weight for deeplabv3 and FCN? right now when i do: `model = torchvision.models.segmentation.fcn_resnet50(pretrained=True)` I receive this: > NotImplementedError: pretrained fcn_resnet50_coco is not supported as of now
[ { "content": "from .._utils import IntermediateLayerGetter\nfrom ..utils import load_state_dict_from_url\nfrom .. import resnet\nfrom .deeplabv3 import DeepLabHead, DeepLabV3\nfrom .fcn import FCN, FCNHead\n\n\n__all__ = ['fcn_resnet50', 'fcn_resnet101', 'deeplabv3_resnet50', 'deeplabv3_resnet101']\n\n\nmodel_u...
[ { "content": "from .._utils import IntermediateLayerGetter\nfrom ..utils import load_state_dict_from_url\nfrom .. import resnet\nfrom .deeplabv3 import DeepLabHead, DeepLabV3\nfrom .fcn import FCN, FCNHead\n\n\n__all__ = ['fcn_resnet50', 'fcn_resnet101', 'deeplabv3_resnet50', 'deeplabv3_resnet101']\n\n\nmodel_u...
diff --git a/docs/source/models.rst b/docs/source/models.rst index d8f9d7a9643..85b34f10191 100644 --- a/docs/source/models.rst +++ b/docs/source/models.rst @@ -258,8 +258,8 @@ Semantic Segmentation The models subpackage contains definitions for the following model architectures for semantic segmentation: -- `FCN R...
ipython__ipython-1882
cython_magic uses importlib, which doesn't ship with py2.6 Sorry, I don't have time to fix this right now, but wanted to leave a report. `importlib` was not in the standard library for python2.6, though [it has been backported](http://pypi.python.org/pypi/importlib/1.0.1). Trying to run `%load_ext cythonmagic` result...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nCython related magics.\n\nAuthor:\n* Brian Granger\n\nParts of this code were taken from Cython.inline.\n\"\"\"\n#-----------------------------------------------------------------------------\n# Copyright (C) 2010-2011, IPython Development Team.\n#\n# Distributed u...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nCython related magics.\n\nAuthor:\n* Brian Granger\n\nParts of this code were taken from Cython.inline.\n\"\"\"\n#-----------------------------------------------------------------------------\n# Copyright (C) 2010-2011, IPython Development Team.\n#\n# Distributed u...
diff --git a/IPython/extensions/cythonmagic.py b/IPython/extensions/cythonmagic.py index 27bd1583e29..e89bb0b65a6 100644 --- a/IPython/extensions/cythonmagic.py +++ b/IPython/extensions/cythonmagic.py @@ -17,7 +17,6 @@ import io import os, sys -from importlib import import_module import imp try: @@ -101,7 +100,...
gammapy__gammapy-2259
fit.minos_contour parameter handling While accesing the fit.minos_contour with my Spectral model with parameters(amplitude, reference, alpha and beta which corresponds to strings par_000_amplitude, par_001_alpha, par_002_beta) but with the minos_contour when I am passing the parameters it is taking strings(par_000_ampl...
[ { "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"iminuit fitting functions.\"\"\"\nimport logging\nimport numpy as np\nfrom .likelihood import Likelihood\n\n__all__ = [\"optimize_iminuit\", \"covariance_iminuit\", \"confidence_iminuit\", \"mncontour\"]\n\nlog = logging.getLog...
[ { "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"iminuit fitting functions.\"\"\"\nimport logging\nimport numpy as np\nfrom .likelihood import Likelihood\n\n__all__ = [\"optimize_iminuit\", \"covariance_iminuit\", \"confidence_iminuit\", \"mncontour\"]\n\nlog = logging.getLog...
diff --git a/gammapy/utils/fitting/iminuit.py b/gammapy/utils/fitting/iminuit.py index 1fca1a9644..f51a1a9193 100644 --- a/gammapy/utils/fitting/iminuit.py +++ b/gammapy/utils/fitting/iminuit.py @@ -99,11 +99,13 @@ def confidence_iminuit(minuit, parameters, parameter, sigma, maxcall=0): def mncontour(minuit, param...
cupy__cupy-5467
Support 0×0 matrices in linalg routines ### `cupy.linalg.solve`, `cupy.linalg.inv` ``` cupy_backends.cuda.libs.cusolver.CUSOLVERError: CUSOLVER_STATUS_INVALID_VALUE ``` <details> ``` >>> for xp in [numpy, cupy]: ... print(xp.__name__) ... a = xp.empty((0, 0)) ... b = xp.empty((0, 3)) ... p...
[ { "content": "import warnings\n\nimport numpy\nfrom numpy import linalg\n\nimport cupy\nfrom cupy._core import internal\nfrom cupy_backends.cuda.libs import cublas\nfrom cupy_backends.cuda.libs import cusolver\nfrom cupy.cuda import device\nfrom cupy.linalg import _decomposition\nfrom cupy.linalg import _util\n...
[ { "content": "import warnings\n\nimport numpy\nfrom numpy import linalg\n\nimport cupy\nfrom cupy._core import internal\nfrom cupy_backends.cuda.libs import cublas\nfrom cupy_backends.cuda.libs import cusolver\nfrom cupy.cuda import device\nfrom cupy.linalg import _decomposition\nfrom cupy.linalg import _util\n...
diff --git a/cupy/linalg/_solve.py b/cupy/linalg/_solve.py index 3b244727f9a..cae82ac55d3 100644 --- a/cupy/linalg/_solve.py +++ b/cupy/linalg/_solve.py @@ -261,11 +261,13 @@ def lstsq(a, b, rcond='warn'): rcond = numpy.finfo(s.dtype).eps # number of singular values and matrix rank - cutoff = rcond *...
fedora-infra__bodhi-1587
Modify the CLI to work with multiple content types We will need to modify the CLI to handle multiple content types, once #1327 is done.
[ { "content": "# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version.\n#\n# This program is distributed in the hope t...
[ { "content": "# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version.\n#\n# This program is distributed in the hope t...
diff --git a/bodhi/client/__init__.py b/bodhi/client/__init__.py index a03e6a54c2..6b99d4efd2 100644 --- a/bodhi/client/__init__.py +++ b/bodhi/client/__init__.py @@ -236,6 +236,8 @@ def edit(user, password, url, **kwargs): help='Query only critical path packages') @click.option('--cves', help='Query by...
replicate__cog-555
`choices` turn input to enum type With 'choices' of strings, the input is no long string but changed to enum type. Refer to https://github.com/wty-ustc/HairCLIP/pull/16/files#diff-73c1982d8a085dc10fda2ac7b6f202ae3ff9530ee6a15991c5339051eb10a49aR61, where `editing_type` should be string eg. "both" but the value shows ...
[ { "content": "from abc import ABC, abstractmethod\nfrom collections.abc import Iterator\nimport enum\nimport importlib\nimport inspect\nimport os.path\nfrom pathlib import Path\nfrom pydantic import create_model, BaseModel\nfrom pydantic.fields import FieldInfo\nfrom typing import List\n\n# Added in Python 3.8....
[ { "content": "from abc import ABC, abstractmethod\nfrom collections.abc import Iterator\nimport enum\nimport importlib\nimport inspect\nimport os.path\nfrom pathlib import Path\nfrom pydantic import create_model, BaseModel\nfrom pydantic.fields import FieldInfo\nfrom typing import List\n\n# Added in Python 3.8....
diff --git a/python/cog/predictor.py b/python/cog/predictor.py index eef00fd0cb..218b1ef2ee 100644 --- a/python/cog/predictor.py +++ b/python/cog/predictor.py @@ -77,6 +77,11 @@ def load_predictor(): # Base class for inputs, constructed dynamically in get_input_type(). # (This can't be a docstring or it gets passed t...
conan-io__conan-5832
[cmake helper] CONAN_CPU_COUNT is not respected with the ninja generator Conan Version: 1.18.4 I just upgraded some of our projects to build with ninja by setting CONAN_CMAKE_GENERATOR=Ninja. While everything still works, this change caused quite a high load on the CI runner that I was not really expecting. In pa...
[ { "content": "import os\nimport platform\nimport subprocess\nfrom itertools import chain\n\nfrom six import StringIO # Python 2 and 3 compatible\n\nfrom conans.client import tools\nfrom conans.client.build import defs_to_string, join_arguments\nfrom conans.client.build.cmake_flags import CMakeDefinitionsBuilde...
[ { "content": "import os\nimport platform\nimport subprocess\nfrom itertools import chain\n\nfrom six import StringIO # Python 2 and 3 compatible\n\nfrom conans.client import tools\nfrom conans.client.build import defs_to_string, join_arguments\nfrom conans.client.build.cmake_flags import CMakeDefinitionsBuilde...
diff --git a/conans/client/build/cmake.py b/conans/client/build/cmake.py index b81ab195f2f..2210c9905e8 100644 --- a/conans/client/build/cmake.py +++ b/conans/client/build/cmake.py @@ -235,7 +235,8 @@ def _build(self, args=None, build_dir=None, target=None): compiler_version = self._settings.get_safe("compil...
digitalfabrik__integreat-cms-449
Region list menu points to api ### Describe the Bug <!-- A clear and concise description of what the bug is. --> The menu item for regions points to the region api and not the region list. ### Steps to Reproduce 1. Go to 'Regions' ### Expected Behavior <!-- A clear and concise description of what you expect...
[ { "content": "'''\nExpansion of API-Endpoints for the CMS\n'''\nfrom django.conf.urls import include, url\n\nfrom .v3.feedback import (\n page_feedback,\n search_result_feedback,\n region_feedback,\n offer_list_feedback,\n event_list_feedback)\nfrom .v3.languages import languages\nfrom .v3.pages ...
[ { "content": "'''\nExpansion of API-Endpoints for the CMS\n'''\nfrom django.conf.urls import include, url\n\nfrom .v3.feedback import (\n page_feedback,\n search_result_feedback,\n region_feedback,\n offer_list_feedback,\n event_list_feedback)\nfrom .v3.languages import languages\nfrom .v3.pages ...
diff --git a/src/api/urls.py b/src/api/urls.py index 211651b769..a9cbd5fa74 100644 --- a/src/api/urls.py +++ b/src/api/urls.py @@ -17,10 +17,10 @@ from .v3.single_page import single_page urlpatterns = [ - url(r'regions/$', regions, name='regions'), - url(r'regions/live/$', liveregions, name='liveregions'), - ...
ansible-collections__amazon.aws-1644
ec2_vpc_nat_gateway connectivity_type:private still allocates uneeded elastic IP ### Summary When setting connectivity_type: private no elastic IP should be provisioned since it is not used by the private nat gateway, ### Issue Type Bug Report ### Component Name ec2_vpc_nat_gateway ### Ansible Version...
[ { "content": "#!/usr/bin/python\n# Copyright: Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = r'''\n---\nmodule: ec2_vpc_nat_gateway\nversi...
[ { "content": "#!/usr/bin/python\n# Copyright: Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = r'''\n---\nmodule: ec2_vpc_nat_gateway\nversi...
diff --git a/changelogs/fragments/1632-changes-to-no-allocate-eip-when-connectivity_type=private.yml b/changelogs/fragments/1632-changes-to-no-allocate-eip-when-connectivity_type=private.yml new file mode 100644 index 00000000000..4b820a3498f --- /dev/null +++ b/changelogs/fragments/1632-changes-to-no-allocate-eip-when...
encode__django-rest-framework-6837
TypeError: '>' not supported between instances of 'float' and 'NoneType' ## Checklist - [x] I have verified that that issue exists against the `master` branch of Django REST framework. - [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate. - [x] This is not a usage qu...
[ { "content": "\"\"\"\nProvides an APIView class that is the base of all views in REST framework.\n\"\"\"\nfrom django.conf import settings\nfrom django.core.exceptions import PermissionDenied\nfrom django.db import connection, models, transaction\nfrom django.http import Http404\nfrom django.http.response impor...
[ { "content": "\"\"\"\nProvides an APIView class that is the base of all views in REST framework.\n\"\"\"\nfrom django.conf import settings\nfrom django.core.exceptions import PermissionDenied\nfrom django.db import connection, models, transaction\nfrom django.http import Http404\nfrom django.http.response impor...
diff --git a/rest_framework/views.py b/rest_framework/views.py index 832f172330..bec10560a9 100644 --- a/rest_framework/views.py +++ b/rest_framework/views.py @@ -356,7 +356,15 @@ def check_throttles(self, request): throttle_durations.append(throttle.wait()) if throttle_durations: - ...
rootpy__rootpy-755
Setting color/fillcolor at same time causes incorrect error ``` {'color': 'red', 'legendstyle': 'f', 'fillcolor': 'red'} -------------------- An exception was caught! Traceback (most recent call last): File "TakeOverTheWorld/totw.py", line 303, in <module> hist.decorate(**hist_styles) File "/Users/kratsg...
[ { "content": "# Copyright 2012 the rootpy developers\n# distributed under the terms of the GNU General Public License\n\"\"\"\nThis module contains base classes defining core funcionality\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom functools import wraps\nimport warnings\nimport sys\n\nfrom .. impor...
[ { "content": "# Copyright 2012 the rootpy developers\n# distributed under the terms of the GNU General Public License\n\"\"\"\nThis module contains base classes defining core funcionality\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom functools import wraps\nimport warnings\nimport sys\n\nfrom .. impor...
diff --git a/rootpy/plotting/base.py b/rootpy/plotting/base.py index c32b5e14..71d03c61 100644 --- a/rootpy/plotting/base.py +++ b/rootpy/plotting/base.py @@ -186,7 +186,7 @@ def decorate(self, other=None, **kwargs): incompatible.append(othercolor) if incompatible: rai...
mkdocs__mkdocs-464
Regression when building docs I got this when building the Django REST Framework docs with 0.12.1 ``` $ mkdocs build Building documentation to directory: site Directory site contains stale files. Use --clean to remove them. Traceback (most recent call last): File "/home/dougalmatthews/.virtualenvs/mkdocs/bin/mkdocs...
[ { "content": "# coding: utf-8\n\n\"\"\"\nDeals with generating the site-wide navigation.\n\nThis consists of building a set of interlinked page and header objects.\n\"\"\"\n\nimport logging\nimport os\n\nfrom mkdocs import utils, exceptions\n\nlog = logging.getLogger(__name__)\n\n\ndef filename_to_title(filenam...
[ { "content": "# coding: utf-8\n\n\"\"\"\nDeals with generating the site-wide navigation.\n\nThis consists of building a set of interlinked page and header objects.\n\"\"\"\n\nimport logging\nimport os\n\nfrom mkdocs import utils, exceptions\n\nlog = logging.getLogger(__name__)\n\n\ndef filename_to_title(filenam...
diff --git a/mkdocs/nav.py b/mkdocs/nav.py index 5a215b28a8..ee7d6b349e 100644 --- a/mkdocs/nav.py +++ b/mkdocs/nav.py @@ -224,6 +224,13 @@ def _generate_site_navigation(pages_config, url_context, use_directory_urls=True filename = path.split(os.path.sep)[0] title = filename_to_title(filename)...
OpenNMT__OpenNMT-tf-279
Error when running inference on the multi-source Transformer ``` 2018-11-28 10:58:38.020515: I tensorflow/core/grappler/optimizers/meta_optimizer.cc:344] Starting optimization for grappler item: tf_graph INFO:tensorflow:Running local_init_op. 2018-11-28 10:58:38.257302: I tensorflow/core/grappler/optimizers/meta_opt...
[ { "content": "\"\"\"Standard sequence-to-sequence model.\"\"\"\n\nimport tensorflow as tf\n\nfrom opennmt import constants\nfrom opennmt import inputters\n\nfrom opennmt.models.model import Model\nfrom opennmt.utils.losses import cross_entropy_sequence_loss\nfrom opennmt.utils.misc import print_bytes, format_tr...
[ { "content": "\"\"\"Standard sequence-to-sequence model.\"\"\"\n\nimport tensorflow as tf\n\nfrom opennmt import constants\nfrom opennmt import inputters\n\nfrom opennmt.models.model import Model\nfrom opennmt.utils.losses import cross_entropy_sequence_loss\nfrom opennmt.utils.misc import print_bytes, format_tr...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 1713fcfe8..ff618a1ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ OpenNMT-tf follows [semantic versioning 2.0.0](https://semver.org/). The API cov ### Fixes and improvements * Fix inference error when using parallel inputs and the parameter `bucket_wi...
jschneier__django-storages-577
S3Boto3Storage raises a misleading exception on bucket creation S3Boto3Storage assumes any HTTP response besides a 301 or a 404 indicates that the bucket could not be created and AWS_AUTO_CREATE_BUCKET is `False` and raises an exception saying this. However, if AWS_S3_ENDPOINT_URL is set to point to a custom S3 host th...
[ { "content": "import mimetypes\nimport os\nimport posixpath\nimport threading\nimport warnings\nfrom gzip import GzipFile\nfrom tempfile import SpooledTemporaryFile\n\nfrom django.conf import settings as django_settings\nfrom django.core.exceptions import ImproperlyConfigured, SuspiciousOperation\nfrom django.c...
[ { "content": "import mimetypes\nimport os\nimport posixpath\nimport threading\nimport warnings\nfrom gzip import GzipFile\nfrom tempfile import SpooledTemporaryFile\n\nfrom django.conf import settings as django_settings\nfrom django.core.exceptions import ImproperlyConfigured, SuspiciousOperation\nfrom django.c...
diff --git a/storages/backends/s3boto3.py b/storages/backends/s3boto3.py index 49bc53769..0bb9e2ae3 100644 --- a/storages/backends/s3boto3.py +++ b/storages/backends/s3boto3.py @@ -389,10 +389,7 @@ def _get_or_create_bucket(self, name): 'LocationConstraint': region_name} ...
scrapy__scrapy-3671
Copying items not work correctly with list values > > item = Item() > > item['some_field'] = [] > > > > c_item = Item(item) > > c_item['some_field'].append(1) > > > > print item['some_field'], c_item['some_field'] > > [1] [1]
[ { "content": "\"\"\"\nScrapy Item\n\nSee documentation in docs/topics/item.rst\n\"\"\"\n\nfrom pprint import pformat\nfrom collections import MutableMapping\n\nfrom abc import ABCMeta\nimport six\n\nfrom scrapy.utils.trackref import object_ref\n\n\nclass BaseItem(object_ref):\n \"\"\"Base class for all scrap...
[ { "content": "\"\"\"\nScrapy Item\n\nSee documentation in docs/topics/item.rst\n\"\"\"\n\nfrom pprint import pformat\nfrom collections import MutableMapping\nfrom copy import deepcopy\n\nfrom abc import ABCMeta\nimport six\n\nfrom scrapy.utils.trackref import object_ref\n\n\nclass BaseItem(object_ref):\n \"\...
diff --git a/docs/topics/items.rst b/docs/topics/items.rst index ae44aecd3e2..d744fd9eaca 100644 --- a/docs/topics/items.rst +++ b/docs/topics/items.rst @@ -40,6 +40,7 @@ objects. Here is an example:: name = scrapy.Field() price = scrapy.Field() stock = scrapy.Field() + tags = scrapy.F...
zulip__zulip-20697
Self-hosted installation incorrectly prompts to “Subscribe me to Zulip's low-traffic newsletter” The checkbox added by #19573 (tweaked by 191b1ac2be46fe4219c170ab318aa10c714cb49a) for “Subscribe me to Zulip's low-traffic newsletter (a few emails a year)” should not show up on self-hosted installations, where it doesn’t...
[ { "content": "import logging\nimport urllib\nfrom typing import Any, Dict, List, Optional\nfrom urllib.parse import urlencode\n\nfrom django.conf import settings\nfrom django.contrib.auth import authenticate, get_backends\nfrom django.core import validators\nfrom django.core.exceptions import ValidationError\nf...
[ { "content": "import logging\nimport urllib\nfrom typing import Any, Dict, List, Optional\nfrom urllib.parse import urlencode\n\nfrom django.conf import settings\nfrom django.contrib.auth import authenticate, get_backends\nfrom django.core import validators\nfrom django.core.exceptions import ValidationError\nf...
diff --git a/templates/zerver/register.html b/templates/zerver/register.html index 60c31aafd773d..1eba04bb4cc7d 100644 --- a/templates/zerver/register.html +++ b/templates/zerver/register.html @@ -249,6 +249,7 @@ <h1>{{ _('Create your account') }}</h1> {% endif %} </div> ...
DataDog__dd-trace-py-1393
Profile exporter crashes when DD_VERSION is used The profile exporter is crashing due to `DD_VERSION` not being encoded before generating the export request. Looking at the code the same applies probably to `DD_ENV` as well. Lines missing `.decode("utf-8")`: https://github.com/DataDog/dd-trace-py/blob/6a14a9ba75a686...
[ { "content": "# -*- encoding: utf-8 -*-\nimport binascii\nimport datetime\nimport gzip\nimport os\nimport platform\nimport uuid\n\nimport tenacity\n\nfrom ddtrace.utils import deprecation\nfrom ddtrace.utils.formats import parse_tags_str\nfrom ddtrace.vendor import six\nfrom ddtrace.vendor.six.moves import http...
[ { "content": "# -*- encoding: utf-8 -*-\nimport binascii\nimport datetime\nimport gzip\nimport os\nimport platform\nimport uuid\n\nimport tenacity\n\nfrom ddtrace.utils import deprecation\nfrom ddtrace.utils.formats import parse_tags_str\nfrom ddtrace.vendor import six\nfrom ddtrace.vendor.six.moves import http...
diff --git a/ddtrace/profiling/exporter/http.py b/ddtrace/profiling/exporter/http.py index c1ff05dd48e..85503aab0c3 100644 --- a/ddtrace/profiling/exporter/http.py +++ b/ddtrace/profiling/exporter/http.py @@ -143,11 +143,11 @@ def _get_tags(service): version = os.environ.get("DD_VERSION") if version...
django-cms__django-cms-994
Fix #985, typos in comments Fixed #985 and added a test I think it would be safer to also add a filter on the site, at least for root nodes (non-root nodes rely on the parent). Also, I think there's something wrong with this test (in Page._publisher_save_public): ``` not (self.level > 0 and self.parent.p...
[ { "content": "# -*- coding: utf-8 -*-\nfrom cms.exceptions import NoHomeFound\nfrom cms.models.managers import PageManager, PagePermissionsPermissionManager\nfrom cms.models.metaclasses import PageMetaClass\nfrom cms.models.placeholdermodel import Placeholder\nfrom cms.models.pluginmodel import CMSPlugin\nfrom ...
[ { "content": "# -*- coding: utf-8 -*-\nfrom cms.exceptions import NoHomeFound\nfrom cms.models.managers import PageManager, PagePermissionsPermissionManager\nfrom cms.models.metaclasses import PageMetaClass\nfrom cms.models.placeholdermodel import Placeholder\nfrom cms.models.pluginmodel import CMSPlugin\nfrom ...
diff --git a/cms/models/pagemodel.py b/cms/models/pagemodel.py index 485ef0a844a..7604e83643c 100644 --- a/cms/models/pagemodel.py +++ b/cms/models/pagemodel.py @@ -959,7 +959,16 @@ def get_previous_filtered_sibling(self, **filters): '%s__lt' % opts.right_attr: getattr(self, opts.left_attr), ...
liberapay__liberapay.com-180
Fix connecting a GitHub org I tried connecting the GitHub liberapay org to the [LiberapayOrg](https://liberapay.com/LiberapayOrg/) account but I ended up on the take-over confirmation page asking me to transfer my personal account.
[ { "content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom liberapay.elsewhere import PlatformOAuth2\nfrom liberapay.elsewhere._extractors import key\nfrom liberapay.elsewhere._paginators import header_links_paginator\n\n\nclass GitHub(PlatformOAuth2):\n\n # Plat...
[ { "content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom liberapay.elsewhere import PlatformOAuth2\nfrom liberapay.elsewhere._extractors import key\nfrom liberapay.elsewhere._paginators import header_links_paginator\n\n\nclass GitHub(PlatformOAuth2):\n\n # Plat...
diff --git a/js/profile.js b/js/profile.js index 6b51c2ab92..2409c08a5e 100644 --- a/js/profile.js +++ b/js/profile.js @@ -9,13 +9,4 @@ Liberapay.profile.init = function() { $('#goal-yes').prop('checked', true) }); - // Wire up user_name_prompt - // ======================== - - $('form.user_nam...
pydantic__pydantic-2161
support for built-in `dataclass` breaks pickle ### Checks * [x] I added a descriptive title to this issue * [x] I have searched (google, github) for similar issues and couldn't find anything * [x] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think this is a bug <!-- Sorry ...
[ { "content": "import warnings\nimport weakref\nfrom collections import OrderedDict, defaultdict, deque\nfrom copy import deepcopy\nfrom itertools import islice, zip_longest\nfrom types import BuiltinFunctionType, CodeType, FunctionType, GeneratorType, LambdaType, ModuleType\nfrom typing import (\n TYPE_CHECK...
[ { "content": "import warnings\nimport weakref\nfrom collections import OrderedDict, defaultdict, deque\nfrom copy import deepcopy\nfrom itertools import islice, zip_longest\nfrom types import BuiltinFunctionType, CodeType, FunctionType, GeneratorType, LambdaType, ModuleType\nfrom typing import (\n TYPE_CHECK...
diff --git a/HISTORY.md b/HISTORY.md index 692c8e2c2ec..c5aeda5b03f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,16 @@ +## v1.7.3 (2020-11-30) + +Thank you to pydantic's sponsors: +@timdrijvers, @BCarley, @chdsbd, @tiangolo, @matin, @linusg, @kevinalh, @jorgecarleitao, @koxudaxi, @primer-api, +@mkeen, @meadsteve...
freqtrade__freqtrade-2479
Freqtrade create 2 buys with same pair... i noticed that the bot takes two buys with same pair ![image](https://user-images.githubusercontent.com/39638559/68229578-ce9e5a00-fff7-11e9-9cd8-97181a00c6dc.png) if i activate this... ![image](https://user-images.githubusercontent.com/39638559/68229485-a7e02380-fff7-11...
[ { "content": "\"\"\"\nFreqtrade is the main module of this bot. It contains the class Freqtrade()\n\"\"\"\nimport copy\nimport logging\nimport traceback\nfrom datetime import datetime\nfrom math import isclose\nfrom os import getpid\nfrom typing import Any, Dict, List, Optional, Tuple\n\nimport arrow\nfrom requ...
[ { "content": "\"\"\"\nFreqtrade is the main module of this bot. It contains the class Freqtrade()\n\"\"\"\nimport copy\nimport logging\nimport traceback\nfrom datetime import datetime\nfrom math import isclose\nfrom os import getpid\nfrom typing import Any, Dict, List, Optional, Tuple\n\nimport arrow\nfrom requ...
diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 7206e555f6b..7e9706803f8 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -319,8 +319,7 @@ def create_trades(self) -> bool: (bidstrat_check_depth_of_market.get('bids_to_ask_delta', 0) > 0): ...
Lightning-AI__pytorch-lightning-2878
Metrics error due to inplace operation, "computation has been modified by an inplace operation". Hey, @williamFalcon, I got a new error since I upgraded the library today. I used the accuracy metric, but got an error. ### Code sample: ``` # in lightning module def training_step(self, batch, batch_idx): ...
[ { "content": "from functools import wraps\nfrom typing import Callable, Optional, Sequence, Tuple\n\nimport torch\nfrom torch.nn import functional as F\n\nfrom pytorch_lightning.metrics.functional.reduction import reduce\nfrom pytorch_lightning.utilities import rank_zero_warn, FLOAT16_EPSILON\n\n\ndef to_onehot...
[ { "content": "from functools import wraps\nfrom typing import Callable, Optional, Sequence, Tuple\n\nimport torch\nfrom torch.nn import functional as F\n\nfrom pytorch_lightning.metrics.functional.reduction import reduce\nfrom pytorch_lightning.utilities import rank_zero_warn, FLOAT16_EPSILON\n\n\ndef to_onehot...
diff --git a/pytorch_lightning/metrics/functional/classification.py b/pytorch_lightning/metrics/functional/classification.py index 83b27a7ab2d53..0a77dd6b67682 100644 --- a/pytorch_lightning/metrics/functional/classification.py +++ b/pytorch_lightning/metrics/functional/classification.py @@ -181,9 +181,9 @@ def stat_sc...
Rapptz__discord.py-4024
Accessing a flag property on the class raises AttributeError Due to this: https://github.com/Rapptz/discord.py/blob/e473f3c775b26a4bb54b18eb6240757306f4f5c1/discord/flags.py#L38 This code: ```py print(discord.Permissions.manage_messages) ``` Raises this error: ```pytb File ".venv/lib/python3.8/site-pa...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2020 Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, includin...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2020 Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, includin...
diff --git a/discord/flags.py b/discord/flags.py index 62460098373b..ff0c10c1272b 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -35,11 +35,16 @@ def __init__(self, func): self.__doc__ = func.__doc__ def __get__(self, instance, owner): + if instance is None: + return self ...
liqd__a4-meinberlin-3993
In Bplans required field (start-date & end-date) for publication is not marked as such **URL:** https://meinberlin-dev.liqd.net/dashboard/projects/sabinas-bebauungsplan/bplan/ **user:** A Bplan initiator **expected behaviour:** As a Bplan initiator, I want the form to tell me which fields are required so that I can p...
[ { "content": "from django import forms\n\nfrom meinberlin.apps.extprojects.forms import ExternalProjectCreateForm\nfrom meinberlin.apps.extprojects.forms import ExternalProjectForm\n\nfrom . import models\n\n\nclass StatementForm(forms.ModelForm):\n class Meta:\n model = models.Statement\n fiel...
[ { "content": "from django import forms\n\nfrom meinberlin.apps.extprojects.forms import ExternalProjectCreateForm\nfrom meinberlin.apps.extprojects.forms import ExternalProjectForm\n\nfrom . import models\n\n\nclass StatementForm(forms.ModelForm):\n class Meta:\n model = models.Statement\n fiel...
diff --git a/meinberlin/apps/bplan/forms.py b/meinberlin/apps/bplan/forms.py index c405c71a33..e45d97bee2 100644 --- a/meinberlin/apps/bplan/forms.py +++ b/meinberlin/apps/bplan/forms.py @@ -28,7 +28,8 @@ class Meta: 'tile_image_copyright', 'is_archived', 'office_worker_email', 'st...
pwr-Solaar__Solaar-959
Device pairing throws IndexError after successful pairing **Information** <!-- Do not bother opening an issue for a version older than 1.0.1. Please update to the latest version and see if your issue persists. --> - Solaar version (`solaar --version` or `git describe --tags` if cloned from this repository): 1.0.3+df...
[ { "content": "# -*- python-mode -*-\n# -*- coding: UTF-8 -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the...
[ { "content": "# -*- python-mode -*-\n# -*- coding: UTF-8 -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the...
diff --git a/lib/solaar/cli/pair.py b/lib/solaar/cli/pair.py index 77010c908f..c3c9bcb47b 100644 --- a/lib/solaar/cli/pair.py +++ b/lib/solaar/cli/pair.py @@ -55,7 +55,7 @@ def notifications_hook(self, n): assert n if n.devnumber == 0xFF: _notifications.process(receiver, n) - ...
psychopy__psychopy-1834
TypeError: unsupported operand type(s) for &: 'long' and 'LP_c_void' when using the pyglet backend Under python 2.7 and psychopy 1.90.0 I get the following error: ```python-traceback --------------------------------------------------------------------------- TypeError Traceback (mos...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Part of the PsychoPy library\n# Copyright (C) 2018 Jonathan Peirce\n# Distributed under the terms of the GNU General Public License (GPL).\n\n\"\"\"A Backend class defines the core low-level functions required by a Window\nclass, such as the abil...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Part of the PsychoPy library\n# Copyright (C) 2018 Jonathan Peirce\n# Distributed under the terms of the GNU General Public License (GPL).\n\n\"\"\"A Backend class defines the core low-level functions required by a Window\nclass, such as the abil...
diff --git a/psychopy/visual/backends/pygletbackend.py b/psychopy/visual/backends/pygletbackend.py index 08745c35d3..6a760fe768 100644 --- a/psychopy/visual/backends/pygletbackend.py +++ b/psychopy/visual/backends/pygletbackend.py @@ -335,7 +335,11 @@ def screenID(self): if constants.PY3: ...
holoviz__panel-1167
Panel.serve does not work for panel.Templates without instantiation #### System Info - Panel: 0.8.0 - Bokeh: 1.4.0 - Tornado 6.0.3 - Python: 3.7.4 - OS: Windows 8.1 - Browser: Chrome #### My Pain I'm trying to serve a list of apps and one of them uses the Panel Templating System. If I provide a functio...
[ { "content": "\"\"\"\nUtilities for creating bokeh Server instances.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nimport os\nimport signal\nimport threading\nimport uuid\n\nfrom contextlib import contextmanager\nfrom functools import partial\nfrom types import FunctionType\n\nf...
[ { "content": "\"\"\"\nUtilities for creating bokeh Server instances.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nimport os\nimport signal\nimport threading\nimport uuid\n\nfrom contextlib import contextmanager\nfrom functools import partial\nfrom types import FunctionType\n\nf...
diff --git a/panel/io/server.py b/panel/io/server.py index 9a5380df30..a925588429 100644 --- a/panel/io/server.py +++ b/panel/io/server.py @@ -41,10 +41,10 @@ def _eval_panel(panel, server_id, title, doc): from ..template import Template from ..pane import panel as as_panel + if isinstance(panel, Functio...
nvaccess__nvda-12857
Suppress layout tables when reading messages in Outlook with UIA for Word enabled <!-- Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files. Issues may be closed if the required information is not present. https://github.com/nvaccess/nvda/wiki/Github...
[ { "content": "# This file is covered by the GNU General Public License.\r\n# A part of NonVisual Desktop Access (NVDA)\r\n# See the file COPYING for more details.\r\n# Copyright (C) 2016-2021 NV Access Limited, Joseph Lee, Jakub Lukowicz\r\n\r\nfrom comtypes import COMError\r\nfrom collections import defaultdic...
[ { "content": "# This file is covered by the GNU General Public License.\r\n# A part of NonVisual Desktop Access (NVDA)\r\n# See the file COPYING for more details.\r\n# Copyright (C) 2016-2021 NV Access Limited, Joseph Lee, Jakub Lukowicz\r\n\r\nfrom comtypes import COMError\r\nfrom collections import defaultdic...
diff --git a/source/NVDAObjects/UIA/wordDocument.py b/source/NVDAObjects/UIA/wordDocument.py index b6989101a48..62f666515bd 100644 --- a/source/NVDAObjects/UIA/wordDocument.py +++ b/source/NVDAObjects/UIA/wordDocument.py @@ -199,6 +199,19 @@ def _getControlFieldForUIAObject(self, obj, isEmbedded=False, startOfNode=Fals...
DjangoGirls__djangogirls-867
Event.MultipleObjectsReturned: get() returned more than one Event -- it returned 2! Sentry Issue: [DJANGO-GIRLS-WEBSITE-4T](https://sentry.io/organizations/django-girls/issues/3793506271/?referrer=github_integration) ``` Event.MultipleObjectsReturned: get() returned more than one Event -- it returned 2! File "django...
[ { "content": "import icalendar\nfrom django.conf import settings\nfrom django.http import Http404, HttpResponse\nfrom django.shortcuts import get_object_or_404, render\nfrom django.template import TemplateDoesNotExist\nfrom django.utils import timezone\nfrom django.utils.translation import gettext_lazy as _\nfr...
[ { "content": "import icalendar\nfrom django.conf import settings\nfrom django.http import Http404, HttpResponse\nfrom django.shortcuts import get_object_or_404, render\nfrom django.template import TemplateDoesNotExist\nfrom django.utils import timezone\nfrom django.utils.translation import gettext_lazy as _\nfr...
diff --git a/core/views.py b/core/views.py index 5faccaedc..d1fa55f45 100644 --- a/core/views.py +++ b/core/views.py @@ -62,7 +62,11 @@ def resources(request): def event(request, page_url): now = timezone.now() now_approx = ApproximateDate(year=now.year, month=now.month, day=now.day) - event_obj = get_obj...
elastic__apm-agent-python-689
HOSTNAME value ignored and socket.gethostname() sent I've trouble in configuring the HOSTNAME, If I set it in the django settings or in the enviorment nothing changes. the `socket.gethostname()` is always the value sent. **To Reproduce** - setup project with APM - add ``` ELASTIC_APM = { .. 'HOSTNAME': ...
[ { "content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\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 c...
[ { "content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\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 c...
diff --git a/elasticapm/base.py b/elasticapm/base.py index d43232c92..baaad25d8 100644 --- a/elasticapm/base.py +++ b/elasticapm/base.py @@ -36,7 +36,6 @@ import logging import os import platform -import socket import sys import time import warnings @@ -317,7 +316,7 @@ def get_process_info(self): def get_s...
Parsl__parsl-2450
walltime app function parameter modifies task_record func_name **Describe the bug** When the walltime special parameter is passed to a Parsl app the `task_record['func_name']` parameter is set to "wrapper" instead of to the function's name. **To Reproduce** Launch the code below using parsl version 1.2.0: ``` i...
[ { "content": "import logging\n\nimport tblib.pickling_support\ntblib.pickling_support.install()\n\nfrom parsl.app.app import AppBase\nfrom parsl.app.errors import wrap_error\nfrom parsl.dataflow.dflow import DataFlowKernelLoader\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef timeout(f, seconds):\n def wr...
[ { "content": "import logging\n\nimport tblib.pickling_support\ntblib.pickling_support.install()\n\nfrom functools import wraps\n\nfrom parsl.app.app import AppBase\nfrom parsl.app.errors import wrap_error\nfrom parsl.dataflow.dflow import DataFlowKernelLoader\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef t...
diff --git a/parsl/app/python.py b/parsl/app/python.py index fdd62d3e13..26eb8167bf 100644 --- a/parsl/app/python.py +++ b/parsl/app/python.py @@ -3,6 +3,8 @@ import tblib.pickling_support tblib.pickling_support.install() +from functools import wraps + from parsl.app.app import AppBase from parsl.app.errors impor...
crytic__slither-971
Broken link in Slither recommendation due to typo in Wiki Hi, there is a typo (oarameters instead of parameters) in the first-level header "Unindexed ERC20 event oarameters" of the wiki: https://github.com/crytic/slither/wiki/Detector-Documentation#unindexed-erc20-event-oarameters On [L. 19](https://github.com/cry...
[ { "content": "\"\"\"\nDetect mistakenly un-indexed ERC20 event parameters\n\"\"\"\nfrom slither.detectors.abstract_detector import AbstractDetector, DetectorClassification\n\n\nclass UnindexedERC20EventParameters(AbstractDetector):\n \"\"\"\n Un-indexed ERC20 event parameters\n \"\"\"\n\n ARGUMENT =...
[ { "content": "\"\"\"\nDetect mistakenly un-indexed ERC20 event parameters\n\"\"\"\nfrom slither.detectors.abstract_detector import AbstractDetector, DetectorClassification\n\n\nclass UnindexedERC20EventParameters(AbstractDetector):\n \"\"\"\n Un-indexed ERC20 event parameters\n \"\"\"\n\n ARGUMENT =...
diff --git a/slither/detectors/erc/unindexed_event_parameters.py b/slither/detectors/erc/unindexed_event_parameters.py index b3045a19aa..3962e23583 100644 --- a/slither/detectors/erc/unindexed_event_parameters.py +++ b/slither/detectors/erc/unindexed_event_parameters.py @@ -16,7 +16,7 @@ class UnindexedERC20EventParame...
beetbox__beets-3805
keyfinder: Output parsing error ### Problem Running this command in verbose (`-vv`) mode: ``` sh $ beet -vv keyfinder anything ``` Led to this problem: ``` user configuration: /home/diomekes/.config/beets/config.yaml data directory: /home/diomekes/.config/beets plugin paths: Sending event: pluginload inline: adding...
[ { "content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Thomas Scholtes.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, i...
[ { "content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Thomas Scholtes.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, i...
diff --git a/beetsplug/keyfinder.py b/beetsplug/keyfinder.py index a75b8d972f..702003f0f4 100644 --- a/beetsplug/keyfinder.py +++ b/beetsplug/keyfinder.py @@ -76,7 +76,14 @@ def find_key(self, items, write=False): item.path) continue - key_raw = output.rspl...
ckan__ckan-624
Tag pages still use old templates /tag
[ { "content": "from pylons.i18n import _\nfrom pylons import request, c\n\nimport ckan.logic as logic\nimport ckan.model as model\nimport ckan.lib.base as base\nimport ckan.lib.helpers as h\n\n\nLIMIT = 25\n\n\nclass TagController(base.BaseController):\n\n def __before__(self, action, **env):\n base.Ba...
[ { "content": "from pylons.i18n import _\nfrom pylons import request, c, config\n\nimport ckan.logic as logic\nimport ckan.model as model\nimport ckan.lib.base as base\nimport ckan.lib.helpers as h\n\n\nLIMIT = 25\n\n\nclass TagController(base.BaseController):\n\n def __before__(self, action, **env):\n ...
diff --git a/ckan/controllers/tag.py b/ckan/controllers/tag.py index bc45347db75..a736c17e8d0 100644 --- a/ckan/controllers/tag.py +++ b/ckan/controllers/tag.py @@ -1,5 +1,5 @@ from pylons.i18n import _ -from pylons import request, c +from pylons import request, c, config import ckan.logic as logic import ckan.mod...
huggingface__transformers-12070
OpenAI GPT language modeling shape mismatch: 512 position embeddings, 1024 input emebddings ## Environment info - `transformers` version: 4.7.0.dev0 - Platform: Linux-4.19.0-16-cloud-amd64-x86_64-with-glibc2.10 - Python version: 3.8.10 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not i...
[ { "content": "#!/usr/bin/env python\n# coding=utf-8\n# Copyright 2020 The HuggingFace Inc. team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# h...
[ { "content": "#!/usr/bin/env python\n# coding=utf-8\n# Copyright 2020 The HuggingFace Inc. team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# h...
diff --git a/examples/pytorch/language-modeling/run_clm.py b/examples/pytorch/language-modeling/run_clm.py index 0c95e7c42392..667d9b6c55b4 100755 --- a/examples/pytorch/language-modeling/run_clm.py +++ b/examples/pytorch/language-modeling/run_clm.py @@ -364,7 +364,7 @@ def tokenize_function(examples): ...
django-oscar__django-oscar-3042
Failing readthedocs build for 2.0b1 ### Issue Summary The documentation build for the 2.0 branch is failing - this is because the documentation references `sorl`, but this is not a core dependency. We could add documentation build configuration to handle this, but I feel like regular users are going to hit this s...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nInstallation script:\n\nTo release a new version to PyPi:\n- Ensure the version is correctly set in oscar.__init__.py\n- Run: make release\n\"\"\"\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_DIR = os.path.dirname(__file...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nInstallation script:\n\nTo release a new version to PyPi:\n- Ensure the version is correctly set in oscar.__init__.py\n- Run: make release\n\"\"\"\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_DIR = os.path.dirname(__file...
diff --git a/docs/requirements.txt b/docs/requirements.txt index 2f4334d04a3..e1d7ae6bf39 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,2 @@ --e .[docs,tests] +-e .[docs] -r ../requirements.txt diff --git a/setup.py b/setup.py index 6f9941ab01d..bd2b23fa8f7 100755 --- a/setup.py +++ b/setup...
mozmeao__snippets-service-660
Rename Aurora to Dev edition in UI
[ { "content": "import copy\nimport hashlib\nimport json\nimport os\nimport re\nimport uuid\nfrom collections import namedtuple\nfrom datetime import datetime\nfrom urllib.parse import urljoin, urlparse\n\nfrom django.conf import settings\nfrom django.core.cache import cache\nfrom django.core.files.base import Co...
[ { "content": "import copy\nimport hashlib\nimport json\nimport os\nimport re\nimport uuid\nfrom collections import namedtuple\nfrom datetime import datetime\nfrom urllib.parse import urljoin, urlparse\n\nfrom django.conf import settings\nfrom django.core.cache import cache\nfrom django.core.files.base import Co...
diff --git a/snippets/base/models.py b/snippets/base/models.py index 6b0f182c5..80abbdf60 100644 --- a/snippets/base/models.py +++ b/snippets/base/models.py @@ -385,7 +385,7 @@ class Snippet(SnippetBaseModel): on_release = models.BooleanField(default=False, verbose_name='Release') on_beta = models.BooleanFi...
ethereum__web3.py-1937
Getting the block_number asynchronously is hacky * Version: 5.16.0 * Python: 3.8.5 ### What was wrong? PR #1851 `Moving blockNumber -> block_number` replaced a function with a `@property`. Since that peoperty does RPC under the hood, which blocks on the network, using a property here does not seem intuitive, ...
[ { "content": "from typing import (\n Any,\n Callable,\n List,\n NoReturn,\n Optional,\n Sequence,\n Tuple,\n Type,\n Union,\n cast,\n overload,\n)\nimport warnings\n\nfrom eth_account import (\n Account,\n)\nfrom eth_typing import (\n Address,\n BlockNumber,\n Checks...
[ { "content": "from typing import (\n Any,\n Callable,\n List,\n NoReturn,\n Optional,\n Sequence,\n Tuple,\n Type,\n Union,\n cast,\n overload,\n)\nimport warnings\n\nfrom eth_account import (\n Account,\n)\nfrom eth_typing import (\n Address,\n BlockNumber,\n Checks...
diff --git a/docs/web3.eth.rst b/docs/web3.eth.rst index c4486d5d34..94c1d80f42 100644 --- a/docs/web3.eth.rst +++ b/docs/web3.eth.rst @@ -153,6 +153,8 @@ The following properties are available on the ``web3.eth`` namespace. Returns the number of the most recent block + Alias for :meth:`~web3.eth.Eth.get_bl...
pypa__pip-2659
Conflicts on exclusive environment markers This used to work in a `requirement.txt` file (and python 2.7): ``` Django>=1.6.10,<1.8 ; python_version != '2.6' Django>=1.6.10,<1.7 ; python_version == '2.6' ``` Simple script to reproduce: ``` from pip.download import PipSession from pip.req import RequirementSet from pi...
[ { "content": "from __future__ import absolute_import\n\nfrom collections import defaultdict\nimport functools\nimport itertools\nimport logging\nimport os\n\nfrom pip._vendor import pkg_resources\nfrom pip._vendor import requests\n\nfrom pip.download import (url_to_path, unpack_url)\nfrom pip.exceptions import ...
[ { "content": "from __future__ import absolute_import\n\nfrom collections import defaultdict\nimport functools\nimport itertools\nimport logging\nimport os\n\nfrom pip._vendor import pkg_resources\nfrom pip._vendor import requests\n\nfrom pip.download import (url_to_path, unpack_url)\nfrom pip.exceptions import ...
diff --git a/pip/req/req_set.py b/pip/req/req_set.py index 2c8063a8c8e..a804bb9bff5 100644 --- a/pip/req/req_set.py +++ b/pip/req/req_set.py @@ -200,9 +200,7 @@ def add_requirement(self, install_req, parent_req_name=None): requirement is applicable and has just been added. """ name = inst...
acl-org__acl-anthology-2399
Ingestion request: NEJLT vol 7 & 8 This is a new (to the anthology) venue. * **Venue name:** Northern European Journal of Language Technology (NEJLT) * **Website:** [nejlt.org](https://www.nejlt.org/) * Papers at https://doi.org/10.3384/nejlt.2000-1533.8.1 and https://doi.org/10.3384/nejlt.2000-1533.7.1 I propo...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2019 Marcel Bollmann <marcel@bollmann.me>\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/l...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2019 Marcel Bollmann <marcel@bollmann.me>\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/l...
diff --git a/bin/anthology/data.py b/bin/anthology/data.py index 3733a947c5..e7ddea1dc8 100644 --- a/bin/anthology/data.py +++ b/bin/anthology/data.py @@ -146,6 +146,10 @@ def get_journal_info(top_level_id, volume_title) -> Tuple[str, str, str]: journal_title = "Traitement Automatique des Langues" vol...
python-discord__bot-774
Reduce logging level for tag cooldowns Sentry Issue: [BOT-19](https://sentry.io/organizations/python-discord/issues/1527377135/?referrer=github_integration) ``` <REDACTED> tried to get the 'ask' tag, but the tag is on cooldown. Cooldown ends in 2.8 seconds. ```
[ { "content": "import logging\nimport re\nimport time\nfrom typing import Dict, List, Optional\n\nfrom discord import Colour, Embed\nfrom discord.ext.commands import Cog, Context, group\n\nfrom bot.bot import Bot\nfrom bot.constants import Channels, Cooldowns, MODERATION_ROLES, Roles\nfrom bot.converters import ...
[ { "content": "import logging\nimport re\nimport time\nfrom typing import Dict, List, Optional\n\nfrom discord import Colour, Embed\nfrom discord.ext.commands import Cog, Context, group\n\nfrom bot.bot import Bot\nfrom bot.constants import Channels, Cooldowns, MODERATION_ROLES, Roles\nfrom bot.converters import ...
diff --git a/bot/cogs/tags.py b/bot/cogs/tags.py index 54a51921c9..b6360dfaed 100644 --- a/bot/cogs/tags.py +++ b/bot/cogs/tags.py @@ -116,8 +116,10 @@ def _command_on_cooldown(tag_name: str) -> bool: if _command_on_cooldown(tag_name): time_left = Cooldowns.tags - (time.time() - self.tag_cooldow...
saleor__saleor-705
are product class labels switched? Hello, I'm looking at the new product class feature. About the labels ... should not be the other way around? https://github.com/mirumee/saleor/blob/master/saleor/dashboard/product/forms.py#L53-L59 ![schermata del 2016-12-29 17-05-55](https://cloud.githubusercontent.com/assets...
[ { "content": "from __future__ import unicode_literals\n\nfrom django import forms\nfrom django.db import transaction\nfrom django.db.models import Count\nfrom django.forms.models import ModelChoiceIterator, inlineformset_factory\nfrom django.utils.encoding import smart_text\nfrom django.utils.translation import...
[ { "content": "from __future__ import unicode_literals\n\nfrom django import forms\nfrom django.db import transaction\nfrom django.db.models import Count\nfrom django.forms.models import ModelChoiceIterator, inlineformset_factory\nfrom django.utils.encoding import smart_text\nfrom django.utils.translation import...
diff --git a/saleor/dashboard/product/forms.py b/saleor/dashboard/product/forms.py index 588131ee10a..a23af9ea9e3 100644 --- a/saleor/dashboard/product/forms.py +++ b/saleor/dashboard/product/forms.py @@ -51,10 +51,10 @@ class Meta: model = ProductClass exclude = [] labels = { - 'p...
graphql-python__graphene-django-1056
Cant export schema to stdout in graphql format The format for the schema(json or graphql SDL) is defined by the extension of the `--out` flag. If `--out=-`(stdout), there's no way to generate a GraphQL SDL representation of the schema.
[ { "content": "import os\nimport importlib\nimport json\nimport functools\n\nfrom django.core.management.base import BaseCommand, CommandError\nfrom django.utils import autoreload\n\nfrom graphql import print_schema\nfrom graphene_django.settings import graphene_settings\n\n\nclass CommandArguments(BaseCommand):...
[ { "content": "import os\nimport importlib\nimport json\nimport functools\n\nfrom django.core.management.base import BaseCommand, CommandError\nfrom django.utils import autoreload\n\nfrom graphql import print_schema\nfrom graphene_django.settings import graphene_settings\n\n\nclass CommandArguments(BaseCommand):...
diff --git a/graphene_django/management/commands/graphql_schema.py b/graphene_django/management/commands/graphql_schema.py index dcef73c8f..bd1c8e600 100644 --- a/graphene_django/management/commands/graphql_schema.py +++ b/graphene_django/management/commands/graphql_schema.py @@ -60,8 +60,10 @@ def save_graphql_file(se...
interlegis__sapl-1500
Erro str has no attribute username em base/forms.py Ao editar um autor, o django lança um error str object has no attribute username linha 235 do arquivo base/forms.py. <img width="1280" alt="captura de tela 2017-09-26 as 14 03 50" src="https://user-images.githubusercontent.com/8682178/30873436-a415e9da-a2c3-11e7-9fd4...
[ { "content": "import django_filters\nfrom crispy_forms.bootstrap import FieldWithButtons, InlineRadios, StrictButton\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import HTML, Button, Div, Field, Fieldset, Layout, Row\nfrom django import forms\nfrom django.conf import settings\nfrom djan...
[ { "content": "import django_filters\nfrom crispy_forms.bootstrap import FieldWithButtons, InlineRadios, StrictButton\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import HTML, Button, Div, Field, Fieldset, Layout, Row\nfrom django import forms\nfrom django.conf import settings\nfrom djan...
diff --git a/.gitignore b/.gitignore index 3bf1301ec..429873229 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ __pycache__/ # C extensions *.so +# Nodejs +node_modules/ + # Distribution / packaging .Python env/ diff --git a/sapl/base/forms.py b/sapl/base/forms.py index 992ce558b..7e64c33cd 100644 --- a...
mitmproxy__mitmproxy-3235
Crash when editing str-options ##### Steps to reproduce the problem: 1. Start `mitmproxy` in interactive mode 2. Type `O` to switch to the options view 3. Edit a random `str`-option 4. See `mitmproxy` crash with the following stacktrace: ``` Traceback (most recent call last): File "/tmp/mitmproxy-crash/lib/p...
[ { "content": "import urwid\nimport blinker\nimport textwrap\nimport pprint\nfrom typing import Optional, Sequence\n\nfrom mitmproxy import exceptions\nfrom mitmproxy import optmanager\nfrom mitmproxy.tools.console import layoutwidget\nfrom mitmproxy.tools.console import signals\nfrom mitmproxy.tools.console imp...
[ { "content": "import urwid\nimport blinker\nimport textwrap\nimport pprint\nfrom typing import Optional, Sequence\n\nfrom mitmproxy import exceptions\nfrom mitmproxy import optmanager\nfrom mitmproxy.tools.console import layoutwidget\nfrom mitmproxy.tools.console import signals\nfrom mitmproxy.tools.console imp...
diff --git a/mitmproxy/tools/console/options.py b/mitmproxy/tools/console/options.py index 6e1399ce58..5e5ef2a68f 100644 --- a/mitmproxy/tools/console/options.py +++ b/mitmproxy/tools/console/options.py @@ -174,7 +174,7 @@ def keypress(self, size, key): foc, idx = self.get_focus() v = ...
pallets__click-1937
Completion Example Error. <!-- This issue tracker is a tool to address bugs in Click itself. Please use Pallets Discord or Stack Overflow for questions about your own code. Replace this comment with a clear outline of what the bug is. --> <!-- Describe how to replicate the bug. Include a minimal reproducib...
[ { "content": "import os\n\nimport click\nfrom click.shell_completion import CompletionItem\n\n\n@click.group()\ndef cli():\n pass\n\n\n@cli.command()\n@click.option(\"--dir\", type=click.Path(file_okay=False))\ndef ls(dir):\n click.echo(\"\\n\".join(os.listdir(dir)))\n\n\ndef get_env_vars(ctx, param, inco...
[ { "content": "import os\n\nimport click\nfrom click.shell_completion import CompletionItem\n\n\n@click.group()\ndef cli():\n pass\n\n\n@cli.command()\n@click.option(\"--dir\", type=click.Path(file_okay=False))\ndef ls(dir):\n click.echo(\"\\n\".join(os.listdir(dir)))\n\n\ndef get_env_vars(ctx, param, inco...
diff --git a/examples/completion/README b/examples/completion/README index f15654edd..372b1d4ca 100644 --- a/examples/completion/README +++ b/examples/completion/README @@ -11,18 +11,18 @@ For Bash: .. code-block:: bash - eval "$(_COMPLETION_COMPLETE=source_bash completion)" + eval "$(_COMPLETION_COMPLETE=ba...
Parsl__parsl-783
Executor idle timer not reset TLDR; I think there's a bug in assessing timeout for idle executors. Parsl log: https://gist.github.com/macintoshpie/1ae87cd93e45e532513ea2833a3f8e60 ### Setup Running sequence of 5 tasks that each last about 3 hours on NSCC Aspire1, on a single executor. ### Problem The first t...
[ { "content": "import logging\nimport time\nimport math\n\nfrom parsl.executors import IPyParallelExecutor, HighThroughputExecutor, ExtremeScaleExecutor\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass Strategy(object):\n \"\"\"FlowControl strategy.\n\n As a workflow dag is processed by Parsl, new task...
[ { "content": "import logging\nimport time\nimport math\n\nfrom parsl.executors import IPyParallelExecutor, HighThroughputExecutor, ExtremeScaleExecutor\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass Strategy(object):\n \"\"\"FlowControl strategy.\n\n As a workflow dag is processed by Parsl, new task...
diff --git a/parsl/dataflow/strategy.py b/parsl/dataflow/strategy.py index b30bbf62fd..f7ec1fa49b 100644 --- a/parsl/dataflow/strategy.py +++ b/parsl/dataflow/strategy.py @@ -204,6 +204,10 @@ def _strategy_simple(self, tasks, *args, kind=None, **kwargs): logger.debug('Executor {} has {} active tasks an...
scrapy__scrapy-4170
Handle it gracefully when start_url is used instead of start_urls Over the last year I’ve seen a few cases ([recent example](https://stackoverflow.com/q/58664004/939364)) of this, people missing the `s` at the end of the `start_urls`. It may be nice to find a way to gracefully let the developer know where the issue ...
[ { "content": "\"\"\"\nBase class for Scrapy spiders\n\nSee documentation in docs/topics/spiders.rst\n\"\"\"\nimport logging\nimport warnings\n\nfrom scrapy import signals\nfrom scrapy.http import Request\nfrom scrapy.utils.trackref import object_ref\nfrom scrapy.utils.url import url_is_from_spider\nfrom scrapy....
[ { "content": "\"\"\"\nBase class for Scrapy spiders\n\nSee documentation in docs/topics/spiders.rst\n\"\"\"\nimport logging\nimport warnings\n\nfrom scrapy import signals\nfrom scrapy.http import Request\nfrom scrapy.utils.trackref import object_ref\nfrom scrapy.utils.url import url_is_from_spider\nfrom scrapy....
diff --git a/scrapy/spiders/__init__.py b/scrapy/spiders/__init__.py index 94095bc2761..517576ca66e 100644 --- a/scrapy/spiders/__init__.py +++ b/scrapy/spiders/__init__.py @@ -58,6 +58,11 @@ def _set_crawler(self, crawler): def start_requests(self): cls = self.__class__ + if not self.start_urls ...
ansible__ansible-modules-extras-2626
Slack - markdown when color defined <!--- Verify first that your issue/request is not already reported in GitHub --> ##### ISSUE TYPE <!--- Pick one below and delete the rest: --> - Bug Report ##### COMPONENT NAME <!--- Name of the plugin/module/task --> notification/slack.py ##### ANSIBLE VERSION ``` ansible 2.0.2...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2015, Stefan Berggren <nsg@nsg.cc>\n# (c) 2014, Ramon de la Fuente <ramon@delafuente.nl>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public Lice...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2015, Stefan Berggren <nsg@nsg.cc>\n# (c) 2014, Ramon de la Fuente <ramon@delafuente.nl>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public Lice...
diff --git a/notification/slack.py b/notification/slack.py index e01272c0703..00e13605a73 100644 --- a/notification/slack.py +++ b/notification/slack.py @@ -171,7 +171,8 @@ def build_payload_for_slack(module, text, channel, username, icon_url, icon_emoj if color == "normal" and text is not None: payload =...
weecology__retriever-1584
`retriever download` command throwing error. After running `retriever download iris`, I am getting this error : ![image](https://files.gitter.im/606462c26da037398478bdfb/LB3L/image.png)
[ { "content": "import os\nfrom collections import OrderedDict\n\nfrom retriever.engines import choose_engine\nfrom retriever.lib.defaults import DATA_DIR, SCRIPT_WRITE_PATH, PROVENANCE_DIR\nfrom retriever.lib.scripts import SCRIPT_LIST, name_matches\nfrom retriever.lib.repository import check_for_updates\nfrom r...
[ { "content": "import os\nfrom collections import OrderedDict\n\nfrom retriever.engines import choose_engine\nfrom retriever.lib.defaults import DATA_DIR, SCRIPT_WRITE_PATH, PROVENANCE_DIR\nfrom retriever.lib.scripts import SCRIPT_LIST, name_matches\nfrom retriever.lib.repository import check_for_updates\nfrom r...
diff --git a/retriever/lib/install.py b/retriever/lib/install.py index 7ad345d31..973784886 100644 --- a/retriever/lib/install.py +++ b/retriever/lib/install.py @@ -13,9 +13,9 @@ def _install(args, use_cache, debug): engine = choose_engine(args) engine.use_cache = use_cache - if args['dataset'].endswith(...
rucio__rucio-3114
Output formatting typo in `rse/protocols/gfal.py` ##Motivation ---------- Previous PR #2555 introduced this bug related to a missing parentheses at the formatting of a debug output string here: https://github.com/rucio/rucio/blob/916987976a1f994a64e4ef3dce837b49141a8f1b/lib/rucio/rse/protocols/gfal.py#L363. Mod...
[ { "content": "# Copyright 2014-2019 CERN for the benefit of the ATLAS collaboration.\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/LICE...
[ { "content": "# Copyright 2014-2019 CERN for the benefit of the ATLAS collaboration.\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/LICE...
diff --git a/lib/rucio/rse/protocols/gfal.py b/lib/rucio/rse/protocols/gfal.py index d5ce34c365..18fa80b99d 100644 --- a/lib/rucio/rse/protocols/gfal.py +++ b/lib/rucio/rse/protocols/gfal.py @@ -360,7 +360,7 @@ def stat(self, path): ret[checksum_name] = ctx.checksum(str(path), str(checksum_name.capital...
encode__django-rest-framework-541
Partial serializer and "default" values If a model has a field with a default value set, and it's updated by a partial serializer with the field excluded from the data - the previously saved value will be overridden by the default.
[ { "content": "import copy\nimport datetime\nimport inspect\nimport re\nimport warnings\n\nfrom io import BytesIO\n\nfrom django.core import validators\nfrom django.core.exceptions import ValidationError\nfrom django.conf import settings\nfrom django import forms\nfrom django.forms import widgets\nfrom django.ut...
[ { "content": "import copy\nimport datetime\nimport inspect\nimport re\nimport warnings\n\nfrom io import BytesIO\n\nfrom django.core import validators\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.core.urlresolvers import resolve, get_script_prefix\nfrom django.conf import...
diff --git a/rest_framework/fields.py b/rest_framework/fields.py index dd90c3f868..5ae8ff4851 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -189,8 +189,10 @@ def field_from_native(self, data, files, field_name, into): else: native = data[field_name] excep...
Lightning-AI__torchmetrics-2222
UniversalImageQualityIndex & SpectralDistortionIndex are still possible to give NaN results ## 🐛 Bug I noticed the issue [#1520](https://github.com/Lightning-AI/torchmetrics/issues/1520). The fix may still cause "divided by zero" problem because eps is not directly added to the divisor. ### To Reproduce ```...
[ { "content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli...
[ { "content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 405cefdbb4d..72549469d59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,7 +48,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fixed numerical stability bug in `LearnedPerceptualImagePatchSimilarity` metric ([#2...
jupyterhub__jupyterhub-3910
performance issue about auth <!-- Thank you for contributing. These HTML commments will not render in the issue, but you can delete them once you've read them if you prefer! --> ### Bug description There may be performance issue when auth. in the method of get_current_user_token(), I find some code like `db.quer...
[ { "content": "\"\"\"sqlalchemy ORM tools for the state of the constellation of processes\"\"\"\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport enum\nimport json\nfrom base64 import decodebytes, encodebytes\nfrom datetime import datetime, timedelta\n...
[ { "content": "\"\"\"sqlalchemy ORM tools for the state of the constellation of processes\"\"\"\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport enum\nimport json\nfrom base64 import decodebytes, encodebytes\nfrom datetime import datetime, timedelta\n...
diff --git a/jupyterhub/orm.py b/jupyterhub/orm.py index b30b80409b..b8a45af367 100644 --- a/jupyterhub/orm.py +++ b/jupyterhub/orm.py @@ -528,9 +528,7 @@ def find_prefix(cls, db, token): prefix = token[: cls.prefix_length] # since we can't filter on hashed values, filter on prefix # so we ar...
Netflix__lemur-235
Syncing sources Hello, I got Lemur up and running. I'm able to import certificates just fine. I'm trying to understand how the 'sources' feature works. My understanding is that using AWS as a source will automatically populate Lemur with a list of certificate information for certs that already exist in AWS after runn...
[ { "content": "\"\"\"\n.. module: service\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 arrow\n\nfrom sqlalchemy import func, or_\nfrom flask import ...
[ { "content": "\"\"\"\n.. module: service\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 arrow\n\nfrom sqlalchemy import func, or_\nfrom flask import ...
diff --git a/lemur/certificates/service.py b/lemur/certificates/service.py index ce37297213..45f0f2663c 100644 --- a/lemur/certificates/service.py +++ b/lemur/certificates/service.py @@ -189,7 +189,10 @@ def import_certificate(**kwargs): notification_name = 'DEFAULT_SECURITY' notifications = notification_se...
feast-dev__feast-3115
Snowflake materialization fails on feature views with dummy entity ## Expected Behavior Same as feature views with entities ## Current Behavior Materialization query errors, query has duplicate column names caused by a dummy entity having multiple dummy join keys ## Steps to reproduce ### Specifications...
[ { "content": "import re\nfrom typing import List, Set, Union\n\nfrom feast.data_source import DataSource, PushSource, RequestSource\nfrom feast.entity import Entity\nfrom feast.errors import RegistryInferenceFailure\nfrom feast.feature_view import DUMMY_ENTITY_ID, DUMMY_ENTITY_NAME, FeatureView\nfrom feast.fiel...
[ { "content": "import re\nfrom typing import List, Set, Union\n\nfrom feast.data_source import DataSource, PushSource, RequestSource\nfrom feast.entity import Entity\nfrom feast.errors import RegistryInferenceFailure\nfrom feast.feature_view import DUMMY_ENTITY_ID, DUMMY_ENTITY_NAME, FeatureView\nfrom feast.fiel...
diff --git a/sdk/python/feast/inference.py b/sdk/python/feast/inference.py index eefc466bf2f..84e8321c122 100644 --- a/sdk/python/feast/inference.py +++ b/sdk/python/feast/inference.py @@ -156,7 +156,11 @@ def update_feature_views_with_inferred_features_and_entities( ) # Infer a dummy entity...
sktime__sktime-3070
[BUG] High memory consumption in `get_cutoff` when using a `DataFrame` with `MultiIndex` **Describe the bug** The method `get_cutoff` when applied to a `DataFrame` dataset with hierarchical index performs a lot of redundant computations. This results in OOM errors and crashes when training on very large datasets. For ...
[ { "content": "# -*- coding: utf-8 -*-\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\"\"\"Eclectic utilities for the datatypes module.\"\"\"\n\nimport numpy as np\nimport pandas as pd\n\n\ndef _get_index(x):\n if hasattr(x, \"index\"):\n return x.index\n elif isinstance(...
[ { "content": "# -*- coding: utf-8 -*-\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\"\"\"Eclectic utilities for the datatypes module.\"\"\"\n\nimport numpy as np\nimport pandas as pd\n\n\ndef _get_index(x):\n if hasattr(x, \"index\"):\n return x.index\n elif isinstance(...
diff --git a/.all-contributorsrc b/.all-contributorsrc index a976e656e18..54f90a950f4 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1693,6 +1693,16 @@ "contributions": [ "code" ] + }, + { + "login": "shchur", + "name": "Oleksandr Shchur", + "avatar_url": "htt...
vllm-project__vllm-3553
KeyError: lm_head.weight in GemmaForCausalLM.load_weights when loading finetuned Gemma 2B Hello, I finetuned Gemma 2B with [Unsloth](https://github.com/unslothai/unsloth). It uses LoRA and merges the weights back into the base model. When I try to load this model, it gives me the following error: ``` ... Fil...
[ { "content": "# coding=utf-8\n# Copyright 2023 The vLLM team.\n# Copyright (c) Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licens...
[ { "content": "# coding=utf-8\n# Copyright 2023 The vLLM team.\n# Copyright (c) Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licens...
diff --git a/vllm/model_executor/models/gemma.py b/vllm/model_executor/models/gemma.py index fd3dbe798cd..fa8ce60e740 100644 --- a/vllm/model_executor/models/gemma.py +++ b/vllm/model_executor/models/gemma.py @@ -340,6 +340,10 @@ def load_weights(self, weight_loader(param, loaded_weight, shard_id) ...
vispy__vispy-2040
Transparency issue resurfaced for PyQt5 on OSX A colleague noticed that our PyQt5 application that uses VisPy is showing a transparency issue that we used to see with the old version of vispy's pyqt5 backend but only on OSX (and maybe Windows). The issue is whenever you have something semi-transparent in the canvas on ...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\"\nBase code for the Qt backends. Note that this is *not* (anymore) a\nbackend by itself! One has to explicitly use either PySide...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\"\nBase code for the Qt backends. Note that this is *not* (anymore) a\nbackend by itself! One has to explicitly use either PySide...
diff --git a/vispy/app/backends/_qt.py b/vispy/app/backends/_qt.py index 92bc34bcae..452c5ec86e 100644 --- a/vispy/app/backends/_qt.py +++ b/vispy/app/backends/_qt.py @@ -845,6 +845,16 @@ def paintGL(self): self._vispy_canvas.set_current() self._vispy_canvas.events.draw(region=None) + # Clear...
LibraryOfCongress__concordia-739
One project progress bar is inaccurate on Letters to Lincoln Campaign page **What behavior did you observe? Please describe the bug** On the Letters to Lincoln Campaign page (projects view), the 1858-1859 project progress bar suggests over 50% of the project has not been started. However, the project is 50% completed...
[ { "content": "import json\nimport os\nimport re\nimport time\nfrom datetime import timedelta\nfrom functools import wraps\nfrom logging import getLogger\nfrom smtplib import SMTPException\nfrom urllib.parse import urlencode\n\nimport markdown\nfrom captcha.fields import CaptchaField\nfrom captcha.helpers import...
[ { "content": "import json\nimport os\nimport re\nimport time\nfrom datetime import timedelta\nfrom functools import wraps\nfrom logging import getLogger\nfrom smtplib import SMTPException\nfrom urllib.parse import urlencode\n\nimport markdown\nfrom captcha.fields import CaptchaField\nfrom captcha.helpers import...
diff --git a/concordia/views.py b/concordia/views.py index d2f7c910c..9d156abdc 100644 --- a/concordia/views.py +++ b/concordia/views.py @@ -445,7 +445,12 @@ def get_context_data(self, **kwargs): .annotate( **{ f"{key}_count": Count( - "item__ass...
shuup__shuup-1558
Improve the way permissionas are managed in admin Currently, use has to use a select2 component with a lot of options and this is super boring, tedious and time consuming. Can we use a list of check boxes instead?
[ { "content": "# -*- coding: utf-8 -*-\n# This file is part of Shuup.\n#\n# Copyright (c) 2012-2018, Shuup Inc. All rights reserved.\n#\n# This source code is licensed under the OSL-3.0 license found in the\n# LICENSE file in the root directory of this source tree.\nfrom __future__ import unicode_literals\n\nfro...
[ { "content": "# -*- coding: utf-8 -*-\n# This file is part of Shuup.\n#\n# Copyright (c) 2012-2018, Shuup Inc. All rights reserved.\n#\n# This source code is licensed under the OSL-3.0 license found in the\n# LICENSE file in the root directory of this source tree.\nfrom __future__ import unicode_literals\n\nfro...
diff --git a/shuup/admin/modules/permission_groups/views/edit.py b/shuup/admin/modules/permission_groups/views/edit.py index 59558f7d9e..f6eedf06b0 100644 --- a/shuup/admin/modules/permission_groups/views/edit.py +++ b/shuup/admin/modules/permission_groups/views/edit.py @@ -36,7 +36,8 @@ def __init__(self, *args, **kwa...
SciTools__cartopy-1143
SRTM path in USGS server changed My SRTMDownloader can no longer find SRTM data in the usual location. Please change ``` _SRTM_BASE_URL = ('https://e4ftl01.cr.usgs.gov/SRTM/SRTMGL{resolution}.' '003/2000.02.11/') ``` to ``` _SRTM_BASE_URL = ('https://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL{r...
[ { "content": "# (C) British Crown Copyright 2011 - 2018, Met Office\n#\n# This file is part of cartopy.\n#\n# cartopy is free software: you can redistribute it and/or modify it under\n# the terms of the GNU Lesser General Public License as published by the\n# Free Software Foundation, either version 3 of the Li...
[ { "content": "# (C) British Crown Copyright 2011 - 2018, Met Office\n#\n# This file is part of cartopy.\n#\n# cartopy is free software: you can redistribute it and/or modify it under\n# the terms of the GNU Lesser General Public License as published by the\n# Free Software Foundation, either version 3 of the Li...
diff --git a/lib/cartopy/io/srtm.py b/lib/cartopy/io/srtm.py index 8f05ff4e2..9abf0744f 100644 --- a/lib/cartopy/io/srtm.py +++ b/lib/cartopy/io/srtm.py @@ -393,8 +393,8 @@ class SRTMDownloader(Downloader): """ FORMAT_KEYS = ('config', 'resolution', 'x', 'y') - _SRTM_BASE_URL = ('https://e4ftl01.cr.usgs....
dbt-labs__dbt-core-8684
[CT-3138] [Bug] Error: Invalid value for '--warn-error-options' ### Is this a new bug in dbt-core? - [X] I believe this is a new bug in dbt-core - [X] I have searched the existing issues, and I could not find an existing issue for this bug ### Current Behavior When installing `dbt-core` into an environment where an ...
[ { "content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif sys.version_info < (3, 8):\n print(\"Error: dbt does not support this version of Python.\")\n print(\"Please upgrade to Python 3.8 or higher.\")\n sys.exit(1)\n\n\nfrom setuptools import setup\n\ntry:\n from setuptools import find_name...
[ { "content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif sys.version_info < (3, 8):\n print(\"Error: dbt does not support this version of Python.\")\n print(\"Please upgrade to Python 3.8 or higher.\")\n sys.exit(1)\n\n\nfrom setuptools import setup\n\ntry:\n from setuptools import find_name...
diff --git a/.changes/unreleased/Fixes-20230920-165635.yaml b/.changes/unreleased/Fixes-20230920-165635.yaml new file mode 100644 index 00000000000..d5c36319ee4 --- /dev/null +++ b/.changes/unreleased/Fixes-20230920-165635.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: Lower bound of `8.0.2` for `click` +time: 2023-09-20T16:...
WordPress__openverse-api-727
Possibly make `thumbnail` null for audio files without artwork ## Description <!-- Concisely describe the bug. --> Currently the frontend tries to fetch thumbnails for all audio files regardless of whether the audio file in question has one or not. I noticed that the API returns the thumbnail URL for all tracks. ...
[ { "content": "from rest_framework import serializers\n\nfrom elasticsearch_dsl.response import Hit\n\nfrom catalog.api.constants.field_order import field_position_map\nfrom catalog.api.constants.field_values import AUDIO_CATEGORIES, LENGTHS\nfrom catalog.api.docs.media_docs import fields_to_md\nfrom catalog.api...
[ { "content": "from rest_framework import serializers\n\nfrom elasticsearch_dsl.response import Hit\n\nfrom catalog.api.constants.field_order import field_position_map\nfrom catalog.api.constants.field_values import AUDIO_CATEGORIES, LENGTHS\nfrom catalog.api.docs.media_docs import fields_to_md\nfrom catalog.api...
diff --git a/api/catalog/api/serializers/audio_serializers.py b/api/catalog/api/serializers/audio_serializers.py index 0de367bb8..202691092 100644 --- a/api/catalog/api/serializers/audio_serializers.py +++ b/api/catalog/api/serializers/audio_serializers.py @@ -135,6 +135,18 @@ def get_peaks(obj) -> list[int]: ...
DistrictDataLabs__yellowbrick-766
Critical Vulnerability in np.load with NumPy v1.16 and earlier There is a critical vulnerability with NumPy v1.16 and earlier that affects the new YB datasets module: https://www.bleepingcomputer.com/news/security/numpy-is-awaiting-fix-for-critical-remote-code-execution-bug/ This does not affect any Yellowbrick u...
[ { "content": "# yellowbrick.datasets.base\n# Loading utilities for the yellowbrick datasets.\n#\n# Author: Rebecca Bilbro <rbilbro@districtdatalabs.com>\n# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>\n# Author: Raul Peralta <raulpl25@gmail.com>\n# Created: Thu Jul 26 13:53:01 2018 -0400\n#\...
[ { "content": "# yellowbrick.datasets.base\n# Loading utilities for the yellowbrick datasets.\n#\n# Author: Rebecca Bilbro <rbilbro@districtdatalabs.com>\n# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>\n# Author: Raul Peralta <raulpl25@gmail.com>\n# Created: Thu Jul 26 13:53:01 2018 -0400\n#\...
diff --git a/yellowbrick/datasets/base.py b/yellowbrick/datasets/base.py index d5ce59412..47d908a24 100644 --- a/yellowbrick/datasets/base.py +++ b/yellowbrick/datasets/base.py @@ -187,7 +187,7 @@ def to_numpy(self): A numpy array describing the target vector. """ path = find_dataset_path...
jupyterhub__jupyterhub-1143
Options form seems to kill page refresh **How to reproduce the issue** Use an options form in the spawner. **What you expected to happen** With no options form, when I start a server, I get a page with a blue refresh button until it actually starts the container (I am using JupyterHub plus a slightly-modified ...
[ { "content": "\"\"\"Basic html-rendering handlers.\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom http.client import responses\n\nfrom jinja2 import TemplateNotFound\nfrom tornado import web, gen\nfrom tornado.httputil import url_concat\n\n...
[ { "content": "\"\"\"Basic html-rendering handlers.\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom http.client import responses\n\nfrom jinja2 import TemplateNotFound\nfrom tornado import web, gen\nfrom tornado.httputil import url_concat\n\n...
diff --git a/jupyterhub/handlers/pages.py b/jupyterhub/handlers/pages.py index 3e857943ec..9052529574 100644 --- a/jupyterhub/handlers/pages.py +++ b/jupyterhub/handlers/pages.py @@ -67,13 +67,9 @@ def get(self): if user.running: # trigger poll_and_notify event in case of a server that died ...
tornadoweb__tornado-1772
Protocols are not filtered in tornado.curl_httpclient Tornado should set `pycurl.PROTOCOLS` option to `pycurl.PROTO_HTTP|pycurl.PROTO_HTTPS`. There are many real-world applications using tornado HTTP client to fetch data from user-provided URLs. Tornado doesn't filter protocols in provided URLs making it possible to ab...
[ { "content": "#!/usr/bin/env python\n#\n# Copyright 2009 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle...
[ { "content": "#!/usr/bin/env python\n#\n# Copyright 2009 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle...
diff --git a/tornado/curl_httpclient.py b/tornado/curl_httpclient.py index fa317b2da9..f0e43c0f27 100644 --- a/tornado/curl_httpclient.py +++ b/tornado/curl_httpclient.py @@ -278,6 +278,9 @@ def _curl_create(self): if curl_log.isEnabledFor(logging.DEBUG): curl.setopt(pycurl.VERBOSE, 1) ...
streamlit__streamlit-5168
Uncaught exception: TypeError: Protocols cannot be instantiated ### Summary TypeError: Protocols cannot be instantiated in 1.12.0 After upgrading from 1.11.1 to 1.12.0, streamlit server keeps raising exceptions and clients get stuck at loading page 'please wait...' ### Steps to reproduce server error snippet:...
[ { "content": "# Copyright 2018-2022 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
[ { "content": "# Copyright 2018-2022 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
diff --git a/.circleci/config.yml b/.circleci/config.yml index b13a07700c08..854da46b2501 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,6 +58,11 @@ commands: md5sum lib/test-requirements-with-tensorflow.txt >> ~/python_cache_key.md5 md5sum lib/setup.py >> ~/python_cache_k...
bookwyrm-social__bookwyrm-383
A status and a boost of that status shouldn't both show up on a timeline Instead, the query should only show the most recent version of the status
[ { "content": "''' views for pages you can go to in the application '''\nimport re\n\nfrom django.contrib.auth.decorators import login_required, permission_required\nfrom django.contrib.postgres.search import TrigramSimilarity\nfrom django.core.paginator import Paginator\nfrom django.db.models import Avg, Q\nfro...
[ { "content": "''' views for pages you can go to in the application '''\nimport re\n\nfrom django.contrib.auth.decorators import login_required, permission_required\nfrom django.contrib.postgres.search import TrigramSimilarity\nfrom django.core.paginator import Paginator\nfrom django.db.models import Avg, Q\nfro...
diff --git a/bookwyrm/views.py b/bookwyrm/views.py index ab42557c77..0fdfa1f904 100644 --- a/bookwyrm/views.py +++ b/bookwyrm/views.py @@ -131,7 +131,7 @@ def get_activity_feed(user, filter_level, model=models.Status): activities = model.objects activities = activities.filter( - deleted=False + ...
rucio__rucio-1734
RSE existence check should consider deleted flag Motivation ---------- I am not sure if I found a bug in the RSE deletion in core.rse.del_rse() or if it is more a session problem. I tried this test but it did not work. ```python from rucio.core.rse import add_rse, del_rse, rse_exists rse_name = 'TEST' ...
[ { "content": "# Copyright 2012-2018 CERN for the benefit of the ATLAS collaboration.\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/LICE...
[ { "content": "# Copyright 2012-2018 CERN for the benefit of the ATLAS collaboration.\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/LICE...
diff --git a/lib/rucio/core/rse.py b/lib/rucio/core/rse.py index 5650a9b67e..f7036b884e 100644 --- a/lib/rucio/core/rse.py +++ b/lib/rucio/core/rse.py @@ -116,14 +116,14 @@ def add_rse(rse, deterministic=True, volatile=False, city=None, region_code=None @read_session def rse_exists(rse, session=None): """ - C...
ansible__ansible-12389
v2 regression: -T timeout doesn't work With devel, `ansible -T 30` doesn't seem to set `self._play_context.timeout` at all (but setting `ANSIBLE_TIMEOUT` in the environment does). Anyone working on this already?
[ { "content": "# -*- coding: utf-8 -*-\n\n# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, ei...
[ { "content": "# -*- coding: utf-8 -*-\n\n# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, ei...
diff --git a/lib/ansible/playbook/play_context.py b/lib/ansible/playbook/play_context.py index ce59b473d3213d..5b1f6c9ade7c16 100644 --- a/lib/ansible/playbook/play_context.py +++ b/lib/ansible/playbook/play_context.py @@ -241,6 +241,8 @@ def set_options(self, options): self.start_at_task = to_unicode(opti...
pwndbg__pwndbg-1051
Define $heap_base variable once the heap has been initialized While commands like `vis_heap_chunks` are great, they often aren't very usable once the heap becomes corrupted. At this point I often have to do something like `x/100xg 0x55555679a000` where 0x55555679a000 is the heap base address I got from running the `hea...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport argparse\nimport ctypes\nimport struct\n\nimport gdb\n\nimport pwndbg.color.context as C\nimport pwndbg.color.memory as M\nimport pwndbg.commands\nimport pwndbg.glibc\nimport pwndbg.typeinfo\nfrom pwndbg.color import generateColorFunction\nfro...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport argparse\nimport ctypes\nimport struct\n\nimport gdb\n\nimport pwndbg.color.context as C\nimport pwndbg.color.memory as M\nimport pwndbg.commands\nimport pwndbg.glibc\nimport pwndbg.typeinfo\nfrom pwndbg.color import generateColorFunction\nfro...
diff --git a/pwndbg/commands/heap.py b/pwndbg/commands/heap.py index f216906ea74..e064343270b 100755 --- a/pwndbg/commands/heap.py +++ b/pwndbg/commands/heap.py @@ -106,6 +106,10 @@ def heap(addr=None, verbose=False, simple=False): top_chunk = arena['top'] ptr_size = allocator.size_sz + # Store the heap ...
rucio__rucio-3875
Internal server error when listing another account's quota Motivation ---------- I see this with both 1.22.5 and 1.22.7 clients: ``` > rucio list-account-usage cclement +---------------------------------+------------+-----------+--------------+ | RSE | USAGE | LIMIT | QUOTA ...
[ { "content": "# Copyright 2016-2020 CERN for the benefit of the ATLAS collaboration.\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/LICE...
[ { "content": "# Copyright 2016-2020 CERN for the benefit of the ATLAS collaboration.\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/LICE...
diff --git a/lib/rucio/core/permission/generic.py b/lib/rucio/core/permission/generic.py index b1c79e636a..8c8a9f0357 100644 --- a/lib/rucio/core/permission/generic.py +++ b/lib/rucio/core/permission/generic.py @@ -891,12 +891,7 @@ def perm_get_global_account_usage(issuer, kwargs): admin_in_country = set() fo...
translate__pootle-4156
Stats: RQ fails jobs if no jobs were executed during more than MySQL `wait_timeout` time We get `OperationalError: (2006, 'MySQL server has gone away')` every time we touch (do something that causes stats refreshing) our staging server after long break. To reproduce: - set MySQL `wait_timeout` variable to 10 seconds (...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa...
diff --git a/docs/releases/dev.rst b/docs/releases/dev.rst index 6a25e5ff6a1..8ad8512057f 100644 --- a/docs/releases/dev.rst +++ b/docs/releases/dev.rst @@ -57,6 +57,8 @@ Details of changes - `InnoDB <https://dev.mysql.com/doc/refman/5.6/en/innodb-storage-engine.html>`_ is the only accepted MySQL backend. Deploymen...
hpcaitech__ColossalAI-4526
[tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests
[ { "content": "from typing import Any, List, Optional\n\nimport torch\nimport torch.cuda\nfrom torch.nn import Module\nfrom torch.utils._pytree import tree_flatten, tree_map, tree_unflatten\n\n\ndef to_device(x: Any, device: Optional[torch.device] = None) -> Any:\n \"\"\"Move object to device if it is a tenso...
[ { "content": "from typing import Any, List, Optional\n\nimport torch\nimport torch.cuda\nfrom torch.nn import Module\nfrom torch.utils._pytree import tree_flatten, tree_map, tree_unflatten\n\n\ndef to_device(x: Any, device: Optional[torch.device] = None) -> Any:\n \"\"\"Move object to device if it is a tenso...
diff --git a/colossalai/pipeline/schedule/_utils.py b/colossalai/pipeline/schedule/_utils.py index 3ed9239272f1..5cd934b76822 100644 --- a/colossalai/pipeline/schedule/_utils.py +++ b/colossalai/pipeline/schedule/_utils.py @@ -123,7 +123,10 @@ def merge_batch(data: List[Any]) -> Any: merged_data = [] for elem...
horovod__horovod-3505
hvd.DistributedOptimizer gradient accumulation doesn't clean up infinite gradient correctly **Environment:** 1. Framework: (TensorFlow, Keras, PyTorch, MXNet) Keras 2. Framework version: 2.4 3. Horovod version: 2.3 4. MPI version: 5. CUDA version: 6. NCCL version: 7. Python version: 8. Spark / PySpark version...
[ { "content": "from distutils.version import LooseVersion\n\nimport tensorflow as tf\n\n_POST_TF_2_4_0 = LooseVersion(tf.__version__) >= LooseVersion('2.4.0')\n\n\nclass LocalGradientAggregationHelperEager:\n \"\"\"\n LocalGradientAggregationHelperEager aggregates gradient updates\n locally, and communica...
[ { "content": "from distutils.version import LooseVersion\n\nimport tensorflow as tf\n\n_POST_TF_2_4_0 = LooseVersion(tf.__version__) >= LooseVersion('2.4.0')\n\n\nclass LocalGradientAggregationHelperEager:\n \"\"\"\n LocalGradientAggregationHelperEager aggregates gradient updates\n locally, and communica...
diff --git a/horovod/tensorflow/gradient_aggregation_eager.py b/horovod/tensorflow/gradient_aggregation_eager.py index 75fa244dbf..566be4b3d8 100644 --- a/horovod/tensorflow/gradient_aggregation_eager.py +++ b/horovod/tensorflow/gradient_aggregation_eager.py @@ -119,8 +119,8 @@ def _allreduce_helper(self, grads, vars):...
python-poetry__poetry-1815
Pre-release `~=` constrains are mis calculated <!-- Hi there! Thank you for discovering and submitting an issue. Before you submit this; let's make sure of a few things. Please make sure the following boxes are ticked if they are correct. If not, please try and fulfill these first. --> <!-- Checked ch...
[ { "content": "import re\n\nfrom .empty_constraint import EmptyConstraint\nfrom .patterns import BASIC_CONSTRAINT\nfrom .patterns import CARET_CONSTRAINT\nfrom .patterns import TILDE_CONSTRAINT\nfrom .patterns import TILDE_PEP440_CONSTRAINT\nfrom .patterns import X_CONSTRAINT\nfrom .version import Version\nfrom ...
[ { "content": "import re\n\nfrom .empty_constraint import EmptyConstraint\nfrom .patterns import BASIC_CONSTRAINT\nfrom .patterns import CARET_CONSTRAINT\nfrom .patterns import TILDE_CONSTRAINT\nfrom .patterns import TILDE_PEP440_CONSTRAINT\nfrom .patterns import X_CONSTRAINT\nfrom .version import Version\nfrom ...
diff --git a/poetry/semver/__init__.py b/poetry/semver/__init__.py index 58ca3a1edc3..725b7d43f58 100644 --- a/poetry/semver/__init__.py +++ b/poetry/semver/__init__.py @@ -76,14 +76,12 @@ def parse_single_constraint(constraint): # type: (str) -> VersionConstraint version = Version.parse(m.group(1)) ...
pytorch__ignite-2079
type hint for ProgressBar.attach, metric_names should be Optional[Union[str, List[str]]] = None ## 🐛 Bug description type hint for `ProgressBar.attach`, `metric_names` should be `Optional[Union[str, List[str]]] = None` ``` RunningAverage(output_transform=lambda x: x).attach(trainer, "loss") pba...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"TQDM logger.\"\"\"\nimport numbers\nimport warnings\nfrom collections import OrderedDict\nfrom typing import Any, Callable, Dict, List, Optional, Union\n\nimport torch\n\nfrom ignite.contrib.handlers.base_logger import BaseLogger, BaseOutputHandler\nfrom ignite.engin...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"TQDM logger.\"\"\"\nimport numbers\nimport warnings\nfrom collections import OrderedDict\nfrom typing import Any, Callable, Dict, List, Optional, Union\n\nimport torch\n\nfrom ignite.contrib.handlers.base_logger import BaseLogger, BaseOutputHandler\nfrom ignite.engin...
diff --git a/ignite/contrib/handlers/tqdm_logger.py b/ignite/contrib/handlers/tqdm_logger.py index b8f0259ec63d..d5487aa1c85f 100644 --- a/ignite/contrib/handlers/tqdm_logger.py +++ b/ignite/contrib/handlers/tqdm_logger.py @@ -161,7 +161,7 @@ def log_message(self, message: str) -> None: def attach( # type: ignore...
mkdocs__mkdocs-948
allow links to be followed in copy_media_files I want to set up a small documentation server that checks out all our projects from a local gitlab repo and link the _docs_ directories of each of them as sub folders of a separate _docs_ folder with its own index.md file and a page for each project in the mkdoc.yml like i...
[ { "content": "# coding: utf-8\n\n\"\"\"\nStandalone file utils.\n\nNothing in this module should have an knowledge of config or the layout\nand structure of the site and pages in the site.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport markdown\nimport os\nimport pkg_resources\nimp...
[ { "content": "# coding: utf-8\n\n\"\"\"\nStandalone file utils.\n\nNothing in this module should have an knowledge of config or the layout\nand structure of the site and pages in the site.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport markdown\nimport os\nimport pkg_resources\nimp...
diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md index 4586853867..e8f713724a 100644 --- a/docs/about/release-notes.md +++ b/docs/about/release-notes.md @@ -75,6 +75,7 @@ created and third-party templates: for larger documents (#859) * Bugfix: Support SOURCE_DATE_EPOCH environment variable for...
translate__pootle-5325
Checks fail to detect non-installed Redis This error was hit when setting up Pootle in a dev environment. Redis was not installed. ``` pytb Traceback (most recent call last): File "manage.py", line 22, in <module> execute_from_command_line() File "/home/charles/.virtualenvwrapper/envs/pootle-dev/local/lib/pyth...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nfrom django.co...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nfrom django.co...
diff --git a/pootle/checks.py b/pootle/checks.py index f58af16d190..0409cfc1cd1 100644 --- a/pootle/checks.py +++ b/pootle/checks.py @@ -430,11 +430,16 @@ def check_email_server_is_alive(app_configs=None, **kwargs): @checks.register('data') def check_revision(app_configs=None, **kwargs): + from redis.exceptions ...
encode__uvicorn-1782
Uvicorn assumes that `HTTPResponseStartEvent.headers` is a `List` ### Discussed in https://github.com/encode/uvicorn/discussions/1779 <div type='discussions-op-text'> <sup>Originally posted by **rijenkii** November 27, 2022</sup> According to the spec and asgiref, `HTTPResponseStartEvent.headers` is `Iterable[Tu...
[ { "content": "import asyncio\nimport http\nimport logging\nimport sys\nfrom typing import TYPE_CHECKING, Callable, List, Optional, Tuple, Union, cast\nfrom urllib.parse import unquote\n\nimport h11\n\nfrom uvicorn.config import Config\nfrom uvicorn.logging import TRACE_LOG_LEVEL\nfrom uvicorn.protocols.http.flo...
[ { "content": "import asyncio\nimport http\nimport logging\nimport sys\nfrom typing import TYPE_CHECKING, Callable, List, Optional, Tuple, Union, cast\nfrom urllib.parse import unquote\n\nimport h11\n\nfrom uvicorn.config import Config\nfrom uvicorn.logging import TRACE_LOG_LEVEL\nfrom uvicorn.protocols.http.flo...
diff --git a/tests/protocols/test_http.py b/tests/protocols/test_http.py index 79946ad2c..8db279504 100644 --- a/tests/protocols/test_http.py +++ b/tests/protocols/test_http.py @@ -966,3 +966,17 @@ async def test_return_close_header(protocol_cls, close_header: bytes): assert b"content-type: text/plain" in protocol...
e-valuation__EvaP-340
A user must never evaluate him/herself In rare cases a user can be participant and contributor in a course (e.g. participating student and tutor for the exercises at the same time). The system has to make sure that this user can't answer questions related to him/herself.
[ { "content": "from django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.db import transaction\nfrom django.shortcuts import get_object_or_404, redirect, render_to_response\nfrom django.template import RequestContext\nfrom django.utils.datastructures import SortedDict\...
[ { "content": "from django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.db import transaction\nfrom django.shortcuts import get_object_or_404, redirect, render_to_response\nfrom django.template import RequestContext\nfrom django.utils.datastructures import SortedDict\...
diff --git a/evap/student/fixtures/vote_test.json b/evap/student/fixtures/vote_test.json new file mode 100644 index 0000000000..a2e7352b15 --- /dev/null +++ b/evap/student/fixtures/vote_test.json @@ -0,0 +1,1113 @@ +[ +{ + "pk": 1, + "model": "contenttypes.contenttype", + "fields": { + "model": "permission", +...
iterative__dvc-9925
unnecessary remote repository fetches DVC has started cloning external repositories even on cases where it's not strictly required. Anything that uses `outs_graph` has started cloning external repositories. Commands like `add/plots modify/pull/push/fetch/move` are affected, and maybe potentially others. ### Rep...
[ { "content": "from typing import TYPE_CHECKING, Any, Iterator, List, Optional, Set, TypeVar\n\nfrom dvc.fs import localfs\nfrom dvc.utils.fs import path_isin\n\nif TYPE_CHECKING:\n from networkx import DiGraph\n\n from dvc.stage import Stage\n\nT = TypeVar(\"T\")\n\n\ndef check_acyclic(graph: \"DiGraph\")...
[ { "content": "from typing import TYPE_CHECKING, Any, Iterator, List, Optional, Set, TypeVar\n\nfrom dvc.fs import localfs\nfrom dvc.utils.fs import path_isin\n\nif TYPE_CHECKING:\n from networkx import DiGraph\n\n from dvc.stage import Stage\n\nT = TypeVar(\"T\")\n\n\ndef check_acyclic(graph: \"DiGraph\")...
diff --git a/dvc/repo/graph.py b/dvc/repo/graph.py index 3ee0d4e3f0..be7a255591 100644 --- a/dvc/repo/graph.py +++ b/dvc/repo/graph.py @@ -158,10 +158,9 @@ def build_outs_graph(graph, outs_trie): outs_graph.add_nodes_from(outs_trie.values()) for stage in graph.nodes(): + if stage.is_repo_import: + ...
holoviz__panel-5201
Automatic vscode detection is not always working Continuation of #5007. When running VSCode inside a virtualization/containerized environment, for example, WSL on Windows, the system environment variable we use `VSCODE_PID` to detect if we are running inside a vs code notebook is not set. Below is an example of th...
[ { "content": "\"\"\"\nThe config module supplies the global config object and the extension\nwhich provides convenient support for loading and configuring panel\ncomponents.\n\"\"\"\nimport ast\nimport copy\nimport importlib\nimport inspect\nimport os\nimport sys\nimport warnings\n\nfrom concurrent.futures imp...
[ { "content": "\"\"\"\nThe config module supplies the global config object and the extension\nwhich provides convenient support for loading and configuring panel\ncomponents.\n\"\"\"\nimport ast\nimport copy\nimport importlib\nimport inspect\nimport os\nimport sys\nimport warnings\n\nfrom concurrent.futures imp...
diff --git a/panel/config.py b/panel/config.py index a29e80c5a6..0fef4e6ebb 100644 --- a/panel/config.py +++ b/panel/config.py @@ -787,14 +787,11 @@ def _detect_comms(self, params): return # Try to detect environment so that we can enable comms - try: - import google.colab # n...
zalando__patroni-2398
Accept *:port as a valid entry for postgresql.listen in patroni --validate-config **Describe the bug** If `postgresql.listen` is set to `*:port`, `patroni --validate-config` complains. I understand that security wise choosing the interface explicitly is better and that patroni's documentation doesn't state that it'...
[ { "content": "#!/usr/bin/env python3\nimport os\nimport socket\nimport re\nimport subprocess\n\nfrom six import string_types\n\nfrom .utils import find_executable, split_host_port, data_directory_is_empty\nfrom .dcs import dcs_modules\nfrom .exceptions import ConfigParseError\n\n\ndef data_directory_empty(data_...
[ { "content": "#!/usr/bin/env python3\nimport os\nimport socket\nimport re\nimport subprocess\n\nfrom six import string_types\n\nfrom .utils import find_executable, split_host_port, data_directory_is_empty\nfrom .dcs import dcs_modules\nfrom .exceptions import ConfigParseError\n\n\ndef data_directory_empty(data_...
diff --git a/patroni/validator.py b/patroni/validator.py index 595d4355e..839a90168 100644 --- a/patroni/validator.py +++ b/patroni/validator.py @@ -37,6 +37,10 @@ def validate_host_port(host_port, listen=False, multiple_hosts=False): hosts = hosts.split(",") else: hosts = [hosts] + ...
bridgecrewio__checkov-1613
Bug: file preview not working with SARIF results uploaded from Checkov to Github Being able to view the code responsible for a security alert in Github's code scanning feature is crucial for developers. The file preview provides important contextual information for devs that helps them arrive at a fix without a lot of ...
[ { "content": "import json\nfrom collections import defaultdict\nfrom typing import List, Dict, Union, Any, Optional\nfrom colorama import init\nfrom junit_xml import TestCase, TestSuite, to_xml_report_string\nfrom tabulate import tabulate\nfrom termcolor import colored\n\nfrom checkov.common.models.enums import...
[ { "content": "import json\nfrom collections import defaultdict\nfrom typing import List, Dict, Union, Any, Optional\nfrom colorama import init\nfrom junit_xml import TestCase, TestSuite, to_xml_report_string\nfrom tabulate import tabulate\nfrom termcolor import colored\n\nfrom checkov.common.models.enums import...
diff --git a/checkov/common/output/report.py b/checkov/common/output/report.py index 007f0ab806..c097a3c0da 100644 --- a/checkov/common/output/report.py +++ b/checkov/common/output/report.py @@ -227,7 +227,7 @@ def get_sarif_json(self) -> Dict[str, Any]: "locations": [ { ...
pypa__pip-6731
Add docs for new pip debug command This is a follow-up issue to PR #6638 to add docs for the new `pip debug` command. As @xavfernandez said in [this comment](https://github.com/pypa/pip/pull/6638#pullrequestreview-256090004): > It would also need basic documentation (at least a `docs/html/reference/pip_debug.rst`) a...
[ { "content": "from __future__ import absolute_import\n\nimport logging\nimport sys\n\nfrom pip._internal.cli import cmdoptions\nfrom pip._internal.cli.base_command import Command\nfrom pip._internal.cli.cmdoptions import make_target_python\nfrom pip._internal.cli.status_codes import SUCCESS\nfrom pip._internal....
[ { "content": "from __future__ import absolute_import\n\nimport logging\nimport sys\n\nfrom pip._internal.cli import cmdoptions\nfrom pip._internal.cli.base_command import Command\nfrom pip._internal.cli.cmdoptions import make_target_python\nfrom pip._internal.cli.status_codes import SUCCESS\nfrom pip._internal....
diff --git a/docs/html/reference/index.rst b/docs/html/reference/index.rst index f25568bfb15..f3312948193 100644 --- a/docs/html/reference/index.rst +++ b/docs/html/reference/index.rst @@ -17,3 +17,4 @@ Reference Guide pip_config pip_wheel pip_hash + pip_debug diff --git a/docs/html/reference/pip_debug.rs...
conda__conda-5091
Unable to install package from anaconda.org Despite successfully logging in, I am unable to install a package from anaconda.org. Why do I need to be "authorized" to install from a public repo? Here's a session: > (anaconda) src% conda install -c pydanny cookiecutter > Fetching package metadata ... > > CondaHT...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport bz2\nfrom contextlib import closing\nfrom functools import wraps\nfrom genericpath import getmtime, isfile\nimport hashlib\nimport json\nfrom logging import DEBUG, getLogger\nfrom ...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport bz2\nfrom contextlib import closing\nfrom functools import wraps\nfrom genericpath import getmtime, isfile\nimport hashlib\nimport json\nfrom logging import DEBUG, getLogger\nfrom ...
diff --git a/conda/core/repodata.py b/conda/core/repodata.py index 4f216f78936..eb50ddef865 100644 --- a/conda/core/repodata.py +++ b/conda/core/repodata.py @@ -265,7 +265,8 @@ def maybe_decompress(filename, resp_content): If the remote site is anaconda.org or follows the Anaconda Server API, you ...
keras-team__keras-19382
CenterCrop.compute_output_shape() does not consider the list compatibility When the input is a list of tensor, CenterCrop can correctly generate the output, while` CenterCrop.compute_output_shape()` will generate a wrong shape. Please refer to this [gist](https://colab.research.google.com/drive/1JLuEr0-dNCmawTb2dRX7kaS...
[ { "content": "from keras import backend\nfrom keras.api_export import keras_export\nfrom keras.layers.preprocessing.tf_data_layer import TFDataLayer\nfrom keras.utils import image_utils\n\n\n@keras_export(\"keras.layers.CenterCrop\")\nclass CenterCrop(TFDataLayer):\n \"\"\"A preprocessing layer which crops i...
[ { "content": "from keras import backend\nfrom keras.api_export import keras_export\nfrom keras.layers.preprocessing.tf_data_layer import TFDataLayer\nfrom keras.utils import image_utils\n\n\n@keras_export(\"keras.layers.CenterCrop\")\nclass CenterCrop(TFDataLayer):\n \"\"\"A preprocessing layer which crops i...
diff --git a/keras/layers/preprocessing/center_crop.py b/keras/layers/preprocessing/center_crop.py index 4112d7022fcc..3a2dadfbeaec 100644 --- a/keras/layers/preprocessing/center_crop.py +++ b/keras/layers/preprocessing/center_crop.py @@ -111,6 +111,13 @@ def call(self, inputs): def compute_output_shape(self, in...
ray-project__ray-4181
[autoscaler] bash 4.4 does not support set -i <!-- General questions should be asked on the mailing list ray-dev@googlegroups.com. Before submitting an issue, please fill out the following form. --> ### System information - **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Ubuntu 17.10 - **Ray i...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\ntry: # py3\n from shlex import quote\nexcept ImportError: # py2\n from pipes import quote\nimport logging\nimport os\nimport subprocess\nimport sys\nimport time\n\nfrom threadi...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\ntry: # py3\n from shlex import quote\nexcept ImportError: # py2\n from pipes import quote\nimport logging\nimport os\nimport subprocess\nimport sys\nimport time\n\nfrom threadi...
diff --git a/python/ray/autoscaler/updater.py b/python/ray/autoscaler/updater.py index e3697adba9c0..9a1a0a1da03b 100644 --- a/python/ray/autoscaler/updater.py +++ b/python/ray/autoscaler/updater.py @@ -271,9 +271,10 @@ def ssh_cmd(self, ssh.append("-tt") if emulate_interactive: force...
rotki__rotki-3318
Exception at makerdao vaults processing ## Problem Definition Running on my uniswap test account PnL report for 2020 with v1.120.0 I got an exception. Need to investigate further what this is and fix it ``` [08/08/2021 19:59:41 CEST] ERROR rotkehlchen.api.rest: Greenlet for task 11 dies with exception: invalid...
[ { "content": "import logging\nfrom collections import defaultdict\nfrom enum import Enum\nfrom typing import TYPE_CHECKING, Any, DefaultDict, Dict, List, NamedTuple, Optional\n\nfrom gevent.lock import Semaphore\n\nfrom rotkehlchen.accounting.structures import (\n AssetBalance,\n Balance,\n BalanceShee...
[ { "content": "import logging\nfrom collections import defaultdict\nfrom enum import Enum\nfrom typing import TYPE_CHECKING, Any, DefaultDict, Dict, List, NamedTuple, Optional\n\nfrom gevent.lock import Semaphore\n\nfrom rotkehlchen.accounting.structures import (\n AssetBalance,\n Balance,\n BalanceShee...
diff --git a/docs/changelog.rst b/docs/changelog.rst index 2c1d537fcf..4e4682943e 100755 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,7 @@ Changelog ========= +* :bug:`3310` For the edge case of a MakerDAO vault event containing a zero amount the MakerDAO DeFi section and PnL report should no longer...