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
⌀
SigmaHQ__sigma-3349
Syntax error in proc_creation_win_enumeration_for_credentials_cli.yml Two of the \ in one of the strings are escaped, this would create issues with using the string. `'\Software\\SimonTatham\\PuTTY\SshHostKeys\'` should instead be `'\Software\SimonTatham\PuTTY\SshHostKeys\'`
[ { "content": "#!/usr/bin/env python3\n# A Sigma to SIEM converter\n# Copyright 2016-2017 Thomas Patzke, Florian Roth\n\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation, either ve...
[ { "content": "#!/usr/bin/env python3\n# A Sigma to SIEM converter\n# Copyright 2016-2017 Thomas Patzke, Florian Roth\n\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation, either ve...
diff --git a/rules/windows/builtin/security/win_account_backdoor_dcsync_rights.yml b/rules/windows/builtin/security/win_account_backdoor_dcsync_rights.yml index 206a5ae8815..4e5e086ff33 100644 --- a/rules/windows/builtin/security/win_account_backdoor_dcsync_rights.yml +++ b/rules/windows/builtin/security/win_account_ba...
Lightning-AI__torchmetrics-1675
`MultioutputWrapper` does not squeeze `kwargs` Hi there, `MultioutputWrapper` class provides the option `squeeze_outputs`. If this is set the output should be squeezed on the index select dimension. Altough this happens for the `args` it does not happen for `kwargs` Here is are the where it happens, but it is on...
[ { "content": "from copy import deepcopy\nfrom typing import Any, Callable, List, Optional, Sequence, Tuple, Union\n\nimport torch\nfrom torch import Tensor\nfrom torch.nn import ModuleList\n\nfrom torchmetrics import Metric\nfrom torchmetrics.utilities import apply_to_collection\nfrom torchmetrics.utilities.imp...
[ { "content": "from copy import deepcopy\nfrom typing import Any, Callable, List, Optional, Sequence, Tuple, Union\n\nimport torch\nfrom torch import Tensor\nfrom torch.nn import ModuleList\n\nfrom torchmetrics import Metric\nfrom torchmetrics.utilities import apply_to_collection\nfrom torchmetrics.utilities.imp...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9653571e8d9..7dc76dc46cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -135,6 +135,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix precision-recall curve based computations for float target ([#1642](https://github.com/Lightnin...
pypa__setuptools-723
setuptools 25.1.4 adds extra quotes on LIBPATH #715's quoting has caused my appveyor builds to start failing with 25.1.4, due to some extra quoting. With setuptools 25.1.3, builds [succeed](https://ci.appveyor.com/project/minrk/pyzmq/build/master+97/job/b5xoge86se10eh3a), and with 25.1.4 they [fail](https://ci.appveyo...
[ { "content": "\"\"\"\nThis module adds improved support for Microsoft Visual C++ compilers.\n\"\"\"\nimport os\nimport platform\nimport itertools\nimport distutils.errors\n\nfrom setuptools.extern.six.moves import filterfalse\n\nif platform.system() == 'Windows':\n from setuptools.extern.six.moves import win...
[ { "content": "\"\"\"\nThis module adds improved support for Microsoft Visual C++ compilers.\n\"\"\"\nimport os\nimport platform\nimport itertools\nimport distutils.errors\n\nfrom setuptools.extern.six.moves import filterfalse\n\nif platform.system() == 'Windows':\n from setuptools.extern.six.moves import win...
diff --git a/setuptools/msvc.py b/setuptools/msvc.py index 2700a2b066..97dd441c5c 100644 --- a/setuptools/msvc.py +++ b/setuptools/msvc.py @@ -233,10 +233,11 @@ def msvc14_library_dir_option(self, dir): ------ "\LIBPATH" argument: str """ - if ' ' in dir and '"' not in dir: + opt = unpatched['msvc1...
pypi__warehouse-1623
json urls object may contain prereleases I think the urls object in the JSON output should reference downloads for the latest stable release; even after #1519, the urls object may contain references to prerelease versions. For example, https://pypi.org/pypi/wheel/json has ```json { "urls": [ { "filen...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
diff --git a/tests/unit/legacy/api/test_json.py b/tests/unit/legacy/api/test_json.py index 5ee037dbdba7..419667d32388 100644 --- a/tests/unit/legacy/api/test_json.py +++ b/tests/unit/legacy/api/test_json.py @@ -66,6 +66,41 @@ def test_calls_release_detail(self, monkeypatch, db_request): assert resp is response...
ibis-project__ibis-5926
bug: assertion error after `filter` with `literal`, then `.distinct(on=...)` ### What happened? Wow, there are a lot of pre-conditions necessary for this bug to crop up! ```python import ibis ex = ibis.examples.aids.fetch() f = [ ibis.literal(True), # no assertion error if this isn't used (ex.dela...
[ { "content": "from __future__ import annotations\n\nimport functools\nimport operator\nfrom collections import defaultdict\nfrom typing import Iterable, Iterator, Mapping\n\nimport toolz\n\nimport ibis.common.graph as g\nimport ibis.expr.operations as ops\nimport ibis.expr.operations.relations as rels\nimport i...
[ { "content": "from __future__ import annotations\n\nimport functools\nimport operator\nfrom collections import defaultdict\nfrom typing import Iterable, Iterator, Mapping\n\nimport toolz\n\nimport ibis.common.graph as g\nimport ibis.expr.operations as ops\nimport ibis.expr.operations.relations as rels\nimport i...
diff --git a/ibis/expr/analysis.py b/ibis/expr/analysis.py index 42f8f237654e..4be89df4e7f2 100644 --- a/ibis/expr/analysis.py +++ b/ibis/expr/analysis.py @@ -620,7 +620,8 @@ def shares_some_roots(exprs, parents): # unique table dependencies of exprs and parents exprs_deps = set(g.traverse(_find_projections, ...
dynaconf__dynaconf-309
[RFC] Include data type in cli.list If I do ``` export DYNACONF_DAY="@int 28" ``` Now I can list the values ``` dynaconf on  master [$] via 🐍 v3.7.0(dynaconf) ❯ dynaconf list Working in development environment USERNAME: 'RiverFount' DAY: 28 ``` But the list is missing the data type. ...
[ { "content": "import importlib\nimport io\nimport os\nimport pprint\nimport sys\nimport webbrowser\nfrom contextlib import suppress\nfrom pathlib import Path\n\nimport click\nimport toml\nfrom dotenv import cli as dotenv_cli\n\nfrom dynaconf import constants\nfrom dynaconf import default_settings\nfrom dynaconf...
[ { "content": "import importlib\nimport io\nimport os\nimport pprint\nimport sys\nimport webbrowser\nfrom contextlib import suppress\nfrom pathlib import Path\n\nimport click\nimport toml\nfrom dotenv import cli as dotenv_cli\n\nfrom dynaconf import constants\nfrom dynaconf import default_settings\nfrom dynaconf...
diff --git a/dynaconf/cli.py b/dynaconf/cli.py index 84fa00660..08dbff8cd 100644 --- a/dynaconf/cli.py +++ b/dynaconf/cli.py @@ -430,7 +430,10 @@ def color(_k): if not key: datalines = "\n".join( "%s: %s" - % (click.style(k, bg=color(k), fg="white"), pprint.pformat(v)) + ...
elastic__apm-agent-python-1573
Error in instrumentation on boto3 sqs client function send_message_batch **Bug** Error in instrumentation on boto3 sqs client function send_message_batch when do not define non required parameter MessageAttributes in entries. [SQS.Client.send_message_batch](https://boto3.amazonaws.com/v1/documentation/api/latest/re...
[ { "content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain...
[ { "content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain...
diff --git a/elasticapm/instrumentation/packages/botocore.py b/elasticapm/instrumentation/packages/botocore.py index 71d9eed26..5bc468d8c 100644 --- a/elasticapm/instrumentation/packages/botocore.py +++ b/elasticapm/instrumentation/packages/botocore.py @@ -214,6 +214,7 @@ def modify_span_sqs(span, args, kwargs): ...
ivy-llc__ivy-22309
fft2
[ { "content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back\nfrom ivy.func_wrapper import with_unsupported_dtypes\n\n\n@to_ivy_arrays_and_back\ndef fft(a, n=None, axis=-1, norm=None):\n if norm is None:\n norm = \"backward\"\n return ivy.fft(a, ax...
[ { "content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back\nfrom ivy.func_wrapper import with_unsupported_dtypes\n\n\n@to_ivy_arrays_and_back\ndef fft(a, n=None, axis=-1, norm=None):\n if norm is None:\n norm = \"backward\"\n return ivy.fft(a, ax...
diff --git a/ivy/functional/frontends/jax/numpy/fft.py b/ivy/functional/frontends/jax/numpy/fft.py index 7a62b524d67e8..b07f0606f40e4 100644 --- a/ivy/functional/frontends/jax/numpy/fft.py +++ b/ivy/functional/frontends/jax/numpy/fft.py @@ -11,6 +11,13 @@ def fft(a, n=None, axis=-1, norm=None): return ivy.fft(a, a...
frappe__frappe-11169
Incomplete Dependencies not updating in Link Cards ## Description of the issue Some Link Card links on customized workspace Desk Pages are inactive when they should be active. ## Context information (for bug reports) **Output of `bench version`** ``` erpnext 13.0.0-dev frappe 13.0.0-dev ``` ## Steps to...
[ { "content": "# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n# Author - Shivam Mishra <shivam@frappe.io>\n\nfrom __future__ import unicode_literals\nimport frappe\nfrom json import loads, dumps\nfrom frappe import _, DoesNotExistError, ValidationError, _dic...
[ { "content": "# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n# Author - Shivam Mishra <shivam@frappe.io>\n\nfrom __future__ import unicode_literals\nimport frappe\nfrom json import loads, dumps\nfrom frappe import _, DoesNotExistError, ValidationError, _dic...
diff --git a/frappe/desk/desktop.py b/frappe/desk/desktop.py index 68b57a93d4a5..ae9d07097610 100644 --- a/frappe/desk/desktop.py +++ b/frappe/desk/desktop.py @@ -221,6 +221,8 @@ def _prepare_item(item): incomplete_dependencies = [d for d in item.dependencies if not _doctype_contains_a_record(d)] if len(incom...
mlflow__mlflow-6213
Upgrade `pylint` to `2.14.4` We currently use pylint 2.11.1. This is a bit old so we should upgrade it to the latest version (2.14.4): https://github.com/mlflow/mlflow/blob/d40780be361f4bd2741c2e8fcbd428c1d693edcf/requirements/lint-requirements.txt#L1 - https://pypi.org/project/pylint/2.11.1/ - https://pypi.org...
[ { "content": "import os\nimport warnings\nfrom contextlib import contextmanager\nfrom pathlib import Path\nfrom threading import RLock, get_ident as get_current_thread_id\n\nimport mlflow\nimport mlflow.utils.logging_utils as logging_utils\n\n\nclass _WarningsController:\n \"\"\"\n Provides threadsafe uti...
[ { "content": "import os\nimport warnings\nfrom contextlib import contextmanager\nfrom pathlib import Path\nfrom threading import RLock, get_ident as get_current_thread_id\n\nimport mlflow\nimport mlflow.utils.logging_utils as logging_utils\n\n\nclass _WarningsController:\n \"\"\"\n Provides threadsafe uti...
diff --git a/mlflow/utils/autologging_utils/logging_and_warnings.py b/mlflow/utils/autologging_utils/logging_and_warnings.py index a2730c30acc52..c3611851d0d37 100644 --- a/mlflow/utils/autologging_utils/logging_and_warnings.py +++ b/mlflow/utils/autologging_utils/logging_and_warnings.py @@ -62,7 +62,7 @@ def _patched_...
pytorch__vision-4327
Avoid view in no_grad mode in GeneralizedRCNNTransform.batch_images ## 🚀 Feature Thank you very much for this great project! I'm one of the maintainers of the [Adversarial Robustness Toolbox (ART)](https://github.com/Trusted-AI/adversarial-robustness-toolbox) and `torchvision` has been very useful for ART. ## Moti...
[ { "content": "import math\nimport torch\nimport torchvision\n\nfrom torch import nn, Tensor\nfrom typing import List, Tuple, Dict, Optional\n\nfrom .image_list import ImageList\nfrom .roi_heads import paste_masks_in_image\n\n\n@torch.jit.unused\ndef _get_shape_onnx(image: Tensor) -> Tensor:\n from torch.onnx...
[ { "content": "import math\nimport torch\nimport torchvision\n\nfrom torch import nn, Tensor\nfrom typing import List, Tuple, Dict, Optional\n\nfrom .image_list import ImageList\nfrom .roi_heads import paste_masks_in_image\n\n\n@torch.jit.unused\ndef _get_shape_onnx(image: Tensor) -> Tensor:\n from torch.onnx...
diff --git a/test/test_models.py b/test/test_models.py index 72ae68f5615..9e376bedce5 100644 --- a/test/test_models.py +++ b/test/test_models.py @@ -148,6 +148,35 @@ def _check_fx_compatible(model, inputs): torch.testing.assert_close(out, out_fx) +def _check_input_backprop(model, inputs): + if isinstance(in...
streamlit__streamlit-948
Don't ship mapbox token in the code Instead of shipping our mapbox token with our codebase, for better future-proofing it's a good idea to fetch that token from a some place online. This way we can cancel/change the token any time we want. For example, we could just add it to a publically-accessible S3 bucket at `ht...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2018-2020 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2018-2020 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n...
diff --git a/frontend/src/App.test.tsx b/frontend/src/App.test.tsx index e8f5d459f472..80ec3eb97dc1 100644 --- a/frontend/src/App.test.tsx +++ b/frontend/src/App.test.tsx @@ -65,7 +65,7 @@ describe("App", () => { authorEmail: "ae", maxCachedMessageAge: 2, commandLine: "command line", - mapboxT...
aws-cloudformation__cfn-lint-1256
False positive: Sub is required if a variable is used in a string in parameter descriptions *cfn-lint version: 0.26.0* *Description of issue.* Parameter descriptions fail E1029 if they contain text which looks like variable substitution: e.g. ```yaml MyContentBucket: Description: "Bucket name for cont...
[ { "content": "\"\"\"\nCopyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport re\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\n\n\nclass SubNeeded(CloudFormationLintRule):\n \"\"\"Check if a substitution...
[ { "content": "\"\"\"\nCopyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport re\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\n\n\nclass SubNeeded(CloudFormationLintRule):\n \"\"\"Check if a substitution...
diff --git a/src/cfnlint/rules/functions/SubNeeded.py b/src/cfnlint/rules/functions/SubNeeded.py index 1a3ee34277..497e74d4ee 100644 --- a/src/cfnlint/rules/functions/SubNeeded.py +++ b/src/cfnlint/rules/functions/SubNeeded.py @@ -98,6 +98,8 @@ def match(self, cfn): # We want to search all of the paths to ch...
facebookresearch__CompilerGym-20
"UnsupportedOperation: fileno" in Colaboratory ## 🐛 Bug `UnsupportedOperation: fileno` error is raised on environment creation in Google Colaboratory. ## To Reproduce ![image](https://user-images.githubusercontent.com/1636663/102848878-cd9fd600-440d-11eb-9f87-fd0cddf66e67.png) ## Environment Please fi...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"This module contains the logic for connecting to services.\"\"\"\nimport logging\nimport os\nimport random\nimp...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"This module contains the logic for connecting to services.\"\"\"\nimport logging\nimport os\nimport random\nimp...
diff --git a/compiler_gym/service/connection.py b/compiler_gym/service/connection.py index 149ec2542..5d7bfbba9 100644 --- a/compiler_gym/service/connection.py +++ b/compiler_gym/service/connection.py @@ -225,12 +225,7 @@ def __init__( cmd.append(f"-v={log_level}") logging.debug(f"$ {' '.join(cm...
saleor__saleor-3072
Restyle categories section in dashboard
[ { "content": "import re\n\nimport graphene\nfrom graphene import relay\nfrom graphene_django.filter import DjangoFilterConnectionField\nfrom graphql.error import GraphQLError\n\nfrom ...product import models\nfrom ...product.templatetags.product_images import get_thumbnail\nfrom ...product.utils import products...
[ { "content": "import re\n\nimport graphene\nfrom graphene import relay\nfrom graphene_django.filter import DjangoFilterConnectionField\nfrom graphql.error import GraphQLError\n\nfrom ...product import models\nfrom ...product.templatetags.product_images import get_thumbnail\nfrom ...product.utils import products...
diff --git a/saleor/graphql/product/types.py b/saleor/graphql/product/types.py index 36d5cf64e7c..c607d53c416 100644 --- a/saleor/graphql/product/types.py +++ b/saleor/graphql/product/types.py @@ -338,8 +338,10 @@ def resolve_url(self, info): return self.get_absolute_url() def resolve_products(self, inf...
pre-commit__pre-commit-2323
Pre-commit does not always automatically re-apply patch when stopped with Ctrl-C As mentioned in this issue: > if you can reproduce your findings where it doesn't re-apply I'd be more interested in that _Originally posted by @asottile in https://github.com/pre-commit/pre-commit/issues/2251#issuecomment-1043529759...
[ { "content": "from __future__ import annotations\n\nimport contextlib\nimport logging\nimport os.path\nimport time\nfrom typing import Generator\n\nfrom pre_commit import git\nfrom pre_commit.util import CalledProcessError\nfrom pre_commit.util import cmd_output\nfrom pre_commit.util import cmd_output_b\nfrom p...
[ { "content": "from __future__ import annotations\n\nimport contextlib\nimport logging\nimport os.path\nimport time\nfrom typing import Generator\n\nfrom pre_commit import git\nfrom pre_commit.util import CalledProcessError\nfrom pre_commit.util import cmd_output\nfrom pre_commit.util import cmd_output_b\nfrom p...
diff --git a/pre_commit/staged_files_only.py b/pre_commit/staged_files_only.py index 7e75080d4..83d8a03e1 100644 --- a/pre_commit/staged_files_only.py +++ b/pre_commit/staged_files_only.py @@ -66,9 +66,9 @@ def _unstaged_changes_cleared(patch_dir: str) -> Generator[None, None, None]: # prevent recursive post...
conda__conda-build-2915
load_file_regex() in jinja_context.py does not close the file ### Actual Behavior ResourceWarning: File is not closed when using load_file_regex() ### Expected Behavior Close the file when it is out of scope. I opened PR#2915 but need to clear internal red-tape. The patch is trivial, so including here: ``` ...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nfrom functools import partial\nimport json\nimport os\nimport re\nimport time\nimport datetime\n\nimport jinja2\n\nfrom .conda_interface import PY3\nfrom .environ import get_dict as get_environ\nfrom .utils import (get_installed_p...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nfrom functools import partial\nimport json\nimport os\nimport re\nimport time\nimport datetime\n\nimport jinja2\n\nfrom .conda_interface import PY3\nfrom .environ import get_dict as get_environ\nfrom .utils import (get_installed_p...
diff --git a/conda_build/jinja_context.py b/conda_build/jinja_context.py index 1b45883a31..e2125be02a 100644 --- a/conda_build/jinja_context.py +++ b/conda_build/jinja_context.py @@ -184,7 +184,8 @@ def load_file_regex(config, load_file, regex_pattern, from_recipe_dir=False, raise RuntimeError(message) ...
pypa__pip-2076
Cannot access file exception after missing egg-info warning I haven't found any reference to this issue through searching, so I'm submitting it here. https://mail.python.org/pipermail/distutils-sig/2013-August/022528.html I have a reproduction case installing the awacs library: `Could not find .egg-info directory in i...
[ { "content": "from __future__ import absolute_import\n\nimport logging\nimport os\nimport re\nimport shutil\nimport sys\nimport tempfile\nimport zipfile\n\nfrom distutils.util import change_root\nfrom distutils import sysconfig\nfrom email.parser import FeedParser\n\nfrom pip._vendor import pkg_resources, six\n...
[ { "content": "from __future__ import absolute_import\n\nimport logging\nimport os\nimport re\nimport shutil\nimport sys\nimport tempfile\nimport zipfile\n\nfrom distutils.util import change_root\nfrom distutils import sysconfig\nfrom email.parser import FeedParser\n\nfrom pip._vendor import pkg_resources, six\n...
diff --git a/pip/req/req_install.py b/pip/req/req_install.py index c4630d76005..62ec2e8977b 100644 --- a/pip/req/req_install.py +++ b/pip/req/req_install.py @@ -797,9 +797,9 @@ def prepend_root(path): f = open(record_filename) for line in f: - line = line.strip() - ...
pallets__werkzeug-1301
parse_cookie(): Does not ignore empty cookies ```python parse_cookie("foo=bar; ; abc=def") {'foo': 'bar', '; abc': 'def'} ``` As you can see, instead of a cookie named `abc`, there is one named `; abc`. I came across this problem when I accidentally added an empty cookie in Chrome by calling `document.cookie = ""...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.http\n ~~~~~~~~~~~~~\n\n Werkzeug comes with a bunch of utilities that help Werkzeug to deal with\n HTTP data. Most of the classes and functions provided by this module are\n used by the wrappers, but they are useful on their own, too, esp...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.http\n ~~~~~~~~~~~~~\n\n Werkzeug comes with a bunch of utilities that help Werkzeug to deal with\n HTTP data. Most of the classes and functions provided by this module are\n used by the wrappers, but they are useful on their own, too, esp...
diff --git a/CHANGES.rst b/CHANGES.rst index ea9da6b4e..609cefef0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -26,19 +26,23 @@ Release Date not Decided a :class:`~datastructures.MultiDict` to represent multiple values for a key. It already did this when passing a dict with a list value. (`#724`_) -- ...
open-telemetry__opentelemetry-python-924
Handle "mixed mode" OT/OTel tracing in OT Bridge @krnowak brought to my attention the following use case for the OT bridge: - Library A is instrumented with OT and uses the OT bridge. Library A creates a parent span. - Library B is instrumented with OTel directly. Library B creates a child span whose parent is the ...
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
diff --git a/instrumentation/opentelemetry-instrumentation-opentracing-shim/src/opentelemetry/instrumentation/opentracing_shim/__init__.py b/instrumentation/opentelemetry-instrumentation-opentracing-shim/src/opentelemetry/instrumentation/opentracing_shim/__init__.py index 6c76444e6ee..dd05feecff2 100644 --- a/instrumen...
great-expectations__great_expectations-7830
Use cleaner solution for non-truncating division in python 2 Prefer `from __future__ import division` to `1.*x/y`
[ { "content": "from __future__ import annotations\n\nimport copy\nimport datetime\nimport logging\nfrom functools import reduce\nfrom typing import (\n Any,\n Callable,\n Dict,\n Iterable,\n List,\n Optional,\n Tuple,\n Union,\n cast,\n overload,\n)\n\nfrom dateutil.parser import pa...
[ { "content": "from __future__ import annotations\n\nimport copy\nimport datetime\nimport logging\nfrom functools import reduce\nfrom typing import (\n Any,\n Callable,\n Dict,\n Iterable,\n List,\n Optional,\n Tuple,\n Union,\n cast,\n overload,\n)\n\nfrom dateutil.parser import pa...
diff --git a/great_expectations/execution_engine/sparkdf_execution_engine.py b/great_expectations/execution_engine/sparkdf_execution_engine.py index 02a06ff8e88e..4239c3b5a2e2 100644 --- a/great_expectations/execution_engine/sparkdf_execution_engine.py +++ b/great_expectations/execution_engine/sparkdf_execution_engine....
googleapis__google-api-python-client-465
Change from 1.5.5 to 1.6.2 results in authentication failure. We have some code that successfully talks to a Google API using v1.5.5 but breaks under v1.6.2 with the following error: "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication c...
[ { "content": "# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unles...
[ { "content": "# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unles...
diff --git a/googleapiclient/discovery.py b/googleapiclient/discovery.py index c8956f43f71..fe19022c91b 100644 --- a/googleapiclient/discovery.py +++ b/googleapiclient/discovery.py @@ -334,10 +334,6 @@ def build_from_document( if http is not None and credentials is not None: raise ValueError('Arguments http and...
conda-forge__conda-smithy-958
Azure pipelines Linux builds don't work if windows is enabled. See https://github.com/conda-forge/conda-build-feedstock/pull/78/files#diff-6da60ca62019167cbfa11e3ab1106599R30
[ { "content": "from __future__ import print_function, unicode_literals\n\nimport glob\nfrom itertools import product, chain\nimport os\nimport subprocess\nimport textwrap\nimport yaml\nimport warnings\nfrom collections import OrderedDict\nimport copy\n\nimport conda_build.api\nimport conda_build.utils\nimport co...
[ { "content": "from __future__ import print_function, unicode_literals\n\nimport glob\nfrom itertools import product, chain\nimport os\nimport subprocess\nimport textwrap\nimport yaml\nimport warnings\nfrom collections import OrderedDict\nimport copy\n\nimport conda_build.api\nimport conda_build.utils\nimport co...
diff --git a/conda_smithy/configure_feedstock.py b/conda_smithy/configure_feedstock.py index b0cd22402..cab4ad1ea 100755 --- a/conda_smithy/configure_feedstock.py +++ b/conda_smithy/configure_feedstock.py @@ -784,6 +784,8 @@ def _azure_specific_setup(jinja_env, forge_config, forge_dir, platform): } template_f...
graphql-python__graphene-django-37
Refreshing GraphiQL invalidates the query variables When I enter query variables into GraphiQL ![variables-double-quotes](https://cloud.githubusercontent.com/assets/134581/19841769/6d1dae1c-9f64-11e6-9c57-e94669893700.png) Then refresh the page, the double quotes are replaced with single quotes ![variables-single-qu...
[ { "content": "import inspect\nimport json\nimport re\n\nimport six\nfrom django.http import HttpResponse, HttpResponseNotAllowed\nfrom django.http.response import HttpResponseBadRequest\nfrom django.shortcuts import render\nfrom django.utils.decorators import method_decorator\nfrom django.views.generic import V...
[ { "content": "import inspect\nimport json\nimport re\n\nimport six\nfrom django.http import HttpResponse, HttpResponseNotAllowed\nfrom django.http.response import HttpResponseBadRequest\nfrom django.shortcuts import render\nfrom django.utils.decorators import method_decorator\nfrom django.views.generic import V...
diff --git a/graphene_django/views.py b/graphene_django/views.py index cec3aab51..0399fec2e 100644 --- a/graphene_django/views.py +++ b/graphene_django/views.py @@ -131,7 +131,7 @@ def dispatch(self, request, *args, **kwargs): request, graphiql_version=self.graphiql_version, ...
ibis-project__ibis-6726
bug: parse_sql fails for table alias("Sales as s") without subquery expression ### What happened? Hi Team, I was trying to parse a sql "ibis.parse_sql("SELECT * FROM SALES as T1",catalog=catalog)". Actually I tried to parse the sql generated by the ibis for simple select with some group by and subsequently tri...
[ { "content": "from __future__ import annotations\n\nimport operator\nfrom functools import singledispatch\nfrom typing import IO, Dict\n\nimport sqlglot as sg\nimport sqlglot.expressions as sge\nimport sqlglot.optimizer as sgo\nimport sqlglot.planner as sgp\nfrom public import public\n\nimport ibis\nimport ibis...
[ { "content": "from __future__ import annotations\n\nimport operator\nfrom functools import singledispatch\nfrom typing import IO, Dict\n\nimport sqlglot as sg\nimport sqlglot.expressions as sge\nimport sqlglot.optimizer as sgo\nimport sqlglot.planner as sgp\nfrom public import public\n\nimport ibis\nimport ibis...
diff --git a/ibis/expr/sql.py b/ibis/expr/sql.py index f84c0bfde893..d1f0075803fc 100644 --- a/ibis/expr/sql.py +++ b/ibis/expr/sql.py @@ -60,6 +60,13 @@ def to_sqlglot(self): def overlay(self, step): updates = {dep.name: convert(dep, catalog=self) for dep in step.dependencies} + + # handle scan ...
modin-project__modin-6643
HDK: `modin.numpy.array.sum` failed when using Modin NumPy experimental API ```bash File "/_work/modin/modin/numpy/arr.py", line 2053, in sum result = target._query_compiler.sum(axis=apply_axis, skipna=False) File "/_work/modin/modin/experimental/core/storage_formats/hdk/query_compiler.py", line 99, in metho...
[ { "content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ...
[ { "content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ...
diff --git a/modin/experimental/core/storage_formats/hdk/query_compiler.py b/modin/experimental/core/storage_formats/hdk/query_compiler.py index 8c9b0c56fc1..439af6246d5 100644 --- a/modin/experimental/core/storage_formats/hdk/query_compiler.py +++ b/modin/experimental/core/storage_formats/hdk/query_compiler.py @@ -399...
open-telemetry__opentelemetry-python-2745
AttributeError: 'NoneType' object has no attribute 'attributes' Run a slightly modified version of the [docs example](https://github.com/open-telemetry/opentelemetry-python/tree/main/docs/examples/metrics): ``` python from typing import Iterable from time import sleep from opentelemetry.exporter.otlp.proto.grpc...
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
diff --git a/CHANGELOG.md b/CHANGELOG.md index eb7e4d6550f..cb8b44adb9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.12.0rc1-0.31b0...HEAD...
Lightning-AI__pytorch-lightning-74
Trainer.fit() crashes if no checkpoint callback is provided I hope it's okay that I keep posting issues... Now that I can circumvent the github installation issues, I pulled in the latests master and let my simple CoolModel demo code run. But now calling trainer.fit() crashes with: > AttributeError ...
[ { "content": "\"\"\"\nThe trainer handles all the logic for running a val loop, training loop, distributing, etc.. .\n\"\"\"\n\nimport os\nimport re\nimport warnings\n\nimport numpy as np\nimport tqdm\nimport torch\nfrom torch.utils.data.distributed import DistributedSampler\nimport torch.multiprocessing as mp\...
[ { "content": "\"\"\"\nThe trainer handles all the logic for running a val loop, training loop, distributing, etc.. .\n\"\"\"\n\nimport os\nimport re\nimport warnings\n\nimport numpy as np\nimport tqdm\nimport torch\nfrom torch.utils.data.distributed import DistributedSampler\nimport torch.multiprocessing as mp\...
diff --git a/pytorch_lightning/models/trainer.py b/pytorch_lightning/models/trainer.py index 4076741008ab5..605f2c78b61b3 100644 --- a/pytorch_lightning/models/trainer.py +++ b/pytorch_lightning/models/trainer.py @@ -259,6 +259,11 @@ def restore_state_if_existing_checkpoint(self): last_epoch = -1 last...
napari__napari-1838
Default key bindings of standard layers not working when inherited ## 🐛 Bug The child object of a layer class does not inherit its key bindings. This bug happens because of the changes in PR #1528. ## To Reproduce Steps to reproduce the behavior: 1. Install the latest version of napari. 2. Execute the ...
[ { "content": "\"\"\"Key combinations are represented in the form ``[modifier-]key``,\ne.g. ``a``, ``Control-c``, or ``Control-Alt-Delete``.\nValid modifiers are Control, Alt, Shift, and Meta.\n\nLetters will always be read as upper-case.\nDue to the native implementation of the key system, Shift pressed in\ncer...
[ { "content": "\"\"\"Key combinations are represented in the form ``[modifier-]key``,\ne.g. ``a``, ``Control-c``, or ``Control-Alt-Delete``.\nValid modifiers are Control, Alt, Shift, and Meta.\n\nLetters will always be read as upper-case.\nDue to the native implementation of the key system, Shift pressed in\ncer...
diff --git a/napari/utils/_tests/test_key_bindings.py b/napari/utils/_tests/test_key_bindings.py index 6665375940d..4e998a8d107 100644 --- a/napari/utils/_tests/test_key_bindings.py +++ b/napari/utils/_tests/test_key_bindings.py @@ -168,6 +168,10 @@ class Bar(KeymapProvider): class_keymap = {'E': lambda x: setattr...
microsoft__torchgeo-91
Samplers don't work in parallel When I try to use RandomGeoSampler with `num_workers` >= 1, I get the following error: ``` Traceback (most recent call last): File "/anaconda/envs/azureml_py38/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/anaconda/envs/azureml_py38/lib...
[ { "content": "\"\"\"Common dataset utilities.\"\"\"\n\nimport bz2\nimport contextlib\nimport gzip\nimport lzma\nimport os\nimport tarfile\nimport zipfile\nfrom typing import Any, Dict, Iterator, List, Optional, Tuple, Union\n\nimport torch\nfrom torch import Tensor\nfrom torchvision.datasets.utils import check_...
[ { "content": "\"\"\"Common dataset utilities.\"\"\"\n\nimport bz2\nimport contextlib\nimport gzip\nimport lzma\nimport os\nimport tarfile\nimport zipfile\nfrom typing import Any, Dict, Iterator, List, Optional, Tuple, Union\n\nimport torch\nfrom torch import Tensor\nfrom torchvision.datasets.utils import check_...
diff --git a/tests/datasets/test_geo.py b/tests/datasets/test_geo.py index 15b3dbd1cca..56cb92840ec 100644 --- a/tests/datasets/test_geo.py +++ b/tests/datasets/test_geo.py @@ -1,5 +1,5 @@ from pathlib import Path -from typing import Any, Dict +from typing import Dict import pytest from rasterio.crs import CRS @@ ...
tobymao__sqlglot-960
Add support for Microsoft SQL Server Table Variables Greetings - apologies for not testing properly with on my prior issue :( I've followed your steps carefully here and I am getting an error with a sql server table variable `>>> import sqlglot >>> >>> sqlglot.__version__ '10.5.2' >>> >>> sql = """ ... SE...
[ { "content": "from __future__ import annotations\n\nimport re\n\nfrom sqlglot import exp, generator, parser, tokens\nfrom sqlglot.dialects.dialect import Dialect, parse_date_delta, rename_func\nfrom sqlglot.expressions import DataType\nfrom sqlglot.helper import seq_get\nfrom sqlglot.time import format_time\nfr...
[ { "content": "from __future__ import annotations\n\nimport re\n\nfrom sqlglot import exp, generator, parser, tokens\nfrom sqlglot.dialects.dialect import Dialect, parse_date_delta, rename_func\nfrom sqlglot.expressions import DataType\nfrom sqlglot.helper import seq_get\nfrom sqlglot.time import format_time\nfr...
diff --git a/sqlglot/dialects/tsql.py b/sqlglot/dialects/tsql.py index 465f53480d..a1a14c0b09 100644 --- a/sqlglot/dialects/tsql.py +++ b/sqlglot/dialects/tsql.py @@ -288,7 +288,7 @@ class Parser(parser.Parser): } # https://learn.microsoft.com/en-us/azure/synapse-analytics/sql-data-warehouse/sql-dat...
ivy-llc__ivy-27295
fft2 Paddle-Paddle frontend implementation for the fft2 function.
[ { "content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@with_supported_dtypes(\n {\"2.5.2 and below\": (\"complex64\", \"complex128\")},\n \"paddle\",\n)\n@to_ivy_arrays_and_bac...
[ { "content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@with_supported_dtypes(\n {\"2.5.2 and below\": (\"complex64\", \"complex128\")},\n \"paddle\",\n)\n@to_ivy_arrays_and_bac...
diff --git a/ivy/functional/frontends/paddle/fft.py b/ivy/functional/frontends/paddle/fft.py index 6687cadf7cd0d..75f3f089cdd58 100644 --- a/ivy/functional/frontends/paddle/fft.py +++ b/ivy/functional/frontends/paddle/fft.py @@ -16,6 +16,25 @@ def fft(x, n=None, axis=-1.0, norm="backward", name=None): return ivy.a...
django-wiki__django-wiki-1033
Fix simple typo: occurances -> occurrences # Issue Type [x] Bug (Typo) # Steps to Replicate 1. Examine src/wiki/plugins/editsection/views.py. 2. Search for `occurances`. # Expected Behaviour 1. Should read `occurrences`.
[ { "content": "import re\n\nfrom django.contrib import messages\nfrom django.shortcuts import get_object_or_404, redirect\nfrom django.utils.decorators import method_decorator\nfrom django.utils.translation import gettext_lazy\nfrom wiki import models\nfrom wiki.core.markdown import article_markdown\nfrom wiki.c...
[ { "content": "import re\n\nfrom django.contrib import messages\nfrom django.shortcuts import get_object_or_404, redirect\nfrom django.utils.decorators import method_decorator\nfrom django.utils.translation import gettext_lazy\nfrom wiki import models\nfrom wiki.core.markdown import article_markdown\nfrom wiki.c...
diff --git a/src/wiki/plugins/editsection/views.py b/src/wiki/plugins/editsection/views.py index 243c01761..8fdea9531 100644 --- a/src/wiki/plugins/editsection/views.py +++ b/src/wiki/plugins/editsection/views.py @@ -29,7 +29,7 @@ class FindHeader: """Locate the start, header text, and end of the header text of...
pytorch__vision-5775
Wrong label mapping in vision/torchvision/datasets/flowers102.py ### 🐛 Describe the bug from line 70 in the file vision/torchvision/datasets/flowers102.py ``` self._labels = [] self._image_files = [] for image_id in image_ids: self._labels.append(image_id_to_label[image_id]) # Note: the bug is here, current...
[ { "content": "from pathlib import Path\nfrom typing import Any, Tuple, Callable, Optional\n\nimport PIL.Image\n\nfrom .utils import check_integrity, download_and_extract_archive, download_url, verify_str_arg\nfrom .vision import VisionDataset\n\n\nclass Flowers102(VisionDataset):\n \"\"\"`Oxford 102 Flower <...
[ { "content": "from pathlib import Path\nfrom typing import Any, Tuple, Callable, Optional\n\nimport PIL.Image\n\nfrom .utils import check_integrity, download_and_extract_archive, download_url, verify_str_arg\nfrom .vision import VisionDataset\n\n\nclass Flowers102(VisionDataset):\n \"\"\"`Oxford 102 Flower <...
diff --git a/torchvision/datasets/flowers102.py b/torchvision/datasets/flowers102.py index 8f4810e62e1..97a8fb416ba 100644 --- a/torchvision/datasets/flowers102.py +++ b/torchvision/datasets/flowers102.py @@ -65,7 +65,7 @@ def __init__( image_ids = set_ids[self._splits_map[self._split]].tolist() lab...
dbt-labs__dbt-core-3071
Update to use new version of Hologram As an extension of https://github.com/fishtown-analytics/hologram/issues/40 -- support Mashumaro in Hologram -- makes changes to pull in version 0.0.13 of Hologram.
[ { "content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif sys.version_info < (3, 6):\n print('Error: dbt does not support this version of Python.')\n print('Please upgrade to Python 3.6 or higher.')\n sys.exit(1)\n\n\nfrom setuptools import setup\ntry:\n from setuptools import find_namespace_...
[ { "content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif sys.version_info < (3, 6):\n print('Error: dbt does not support this version of Python.')\n print('Please upgrade to Python 3.6 or higher.')\n sys.exit(1)\n\n\nfrom setuptools import setup\ntry:\n from setuptools import find_namespace_...
diff --git a/core/setup.py b/core/setup.py index 3929099edf9..7e2ec6c1713 100644 --- a/core/setup.py +++ b/core/setup.py @@ -70,7 +70,7 @@ def read(fname): 'json-rpc>=1.12,<2', 'werkzeug>=0.15,<2.0', 'dataclasses==0.6;python_version<"3.7"', - # 'hologram==0.0.12', # must be updated pri...
saleor__saleor-10987
Unable to filter customers with 0 orders ### **Steps to reproduce the problem:** ```graphql query Customers{ customers(filter: {numberOfOrders: {lte: 0, gte: 0}}, first: 10){ edges{ node{ id email orders{ totalCount } } } totalCount } } ``` ### **C...
[ { "content": "from django.utils import timezone\n\nfrom ..core.enums import ReportingPeriod\n\n\ndef reporting_period_to_date(period):\n now = timezone.now()\n if period == ReportingPeriod.TODAY:\n start_date = now.replace(hour=0, minute=0, second=0, microsecond=0)\n elif period == ReportingPeri...
[ { "content": "from django.utils import timezone\n\nfrom ..core.enums import ReportingPeriod\n\n\ndef reporting_period_to_date(period):\n now = timezone.now()\n if period == ReportingPeriod.TODAY:\n start_date = now.replace(hour=0, minute=0, second=0, microsecond=0)\n elif period == ReportingPeri...
diff --git a/saleor/graphql/core/tests/test_core.py b/saleor/graphql/core/tests/test_core.py index d32f2abe2de..044d4b184b5 100644 --- a/saleor/graphql/core/tests/test_core.py +++ b/saleor/graphql/core/tests/test_core.py @@ -446,6 +446,18 @@ def test_filter_range_field(value, count, product_indexes, product_list): ...
MongoEngine__mongoengine-1424
Strange __repr__ method of StrictDict In __repr__method of the StrictDict class i saw: ``` def __repr__(self): return "{%s}" % ', '.join('"{0!s}": {0!r}'.format(k) for k in self.iterkeys()) ``` May be it is an error and author means: ``` def __repr__(self): return "{%s}" % ', '.join('"{0!s}": {1!r}...
[ { "content": "import itertools\nimport weakref\n\nfrom mongoengine.common import _import_class\nfrom mongoengine.errors import DoesNotExist, MultipleObjectsReturned\n\n__all__ = (\"BaseDict\", \"BaseList\", \"EmbeddedDocumentList\")\n\n\nclass BaseDict(dict):\n \"\"\"A special dict so we can watch any change...
[ { "content": "import itertools\nimport weakref\n\nfrom mongoengine.common import _import_class\nfrom mongoengine.errors import DoesNotExist, MultipleObjectsReturned\n\n__all__ = (\"BaseDict\", \"BaseList\", \"EmbeddedDocumentList\")\n\n\nclass BaseDict(dict):\n \"\"\"A special dict so we can watch any change...
diff --git a/mongoengine/base/datastructures.py b/mongoengine/base/datastructures.py index 2bb7ff2c2..2c6ebc2a5 100644 --- a/mongoengine/base/datastructures.py +++ b/mongoengine/base/datastructures.py @@ -438,7 +438,7 @@ class SpecificStrictDict(cls): __slots__ = allowed_keys_tuple d...
flairNLP__flair-1659
use_dropout not getting saved in checkpoint ??? I think the use_dropout parameter does not saved as part of state_dict due to bug in def _get_state_dict(self) as a result of which if we set a dropout layer in sequence tagger, and resume checkpoint training, the behavior changes.
[ { "content": "import logging\nfrom pathlib import Path\nfrom typing import List, Union, Optional, Callable, Dict\n\nimport numpy as np\nimport torch\nimport torch.nn\nimport torch.nn.functional as F\nfrom tabulate import tabulate\nfrom torch.nn.parameter import Parameter\nfrom torch.utils.data import DataLoader...
[ { "content": "import logging\nfrom pathlib import Path\nfrom typing import List, Union, Optional, Callable, Dict\n\nimport numpy as np\nimport torch\nimport torch.nn\nimport torch.nn.functional as F\nfrom tabulate import tabulate\nfrom torch.nn.parameter import Parameter\nfrom torch.utils.data import DataLoader...
diff --git a/flair/models/sequence_tagger_model.py b/flair/models/sequence_tagger_model.py index 046f503ed8..dc7bed77d6 100644 --- a/flair/models/sequence_tagger_model.py +++ b/flair/models/sequence_tagger_model.py @@ -238,6 +238,7 @@ def _get_state_dict(self): "use_crf": self.use_crf, "use_rn...
alltheplaces__alltheplaces-2645
Spider texas_roadhouse is broken During the global build at 2021-08-11-14-42-19, spider **texas_roadhouse** failed with **0 features** and **0 errors**. Here's [the log](https://data.alltheplaces.xyz/runs/2021-08-11-14-42-19/logs/texas_roadhouse.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-08-11-14-42...
[ { "content": "import json\nimport scrapy\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nclass TexasRoadhouseSpider(scrapy.Spider):\n name = \"texas_roadhouse\"\n item_attributes = { 'brand': \"Texas Roadhouse\", 'brand_wikidata': \"Q7707945\" }\n allowed_do...
[ { "content": "import json\nimport scrapy\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nclass TexasRoadhouseSpider(scrapy.Spider):\n name = \"texas_roadhouse\"\n item_attributes = {\n 'brand': \"Texas Roadhouse\",\n 'brand_wikidata': \"Q7707945\"...
diff --git a/locations/spiders/texas_roadhouse.py b/locations/spiders/texas_roadhouse.py index 6988956b8c2..3fd3cdcd74f 100644 --- a/locations/spiders/texas_roadhouse.py +++ b/locations/spiders/texas_roadhouse.py @@ -6,7 +6,10 @@ class TexasRoadhouseSpider(scrapy.Spider): name = "texas_roadhouse" - item_attr...
lk-geimfari__mimesis-376
I can't compile my project by pyinstaller I have a script with code: ``` from mimesis import Personal person = Personal('en') person.full_name() ``` and it works well, but after compiling this code to .exe via pyinstaller I have an error **FileNotFoundError: [Errno 2] No such file or directory: 'B:\\_MEI131682\\m...
[ { "content": "\"\"\"This module is provide internal util functions.\"\"\"\n\nimport collections\nimport functools\nimport json\nimport ssl\nfrom os import path\nfrom typing import Mapping, Optional, Union\nfrom urllib import request\n\nfrom mimesis import config\nfrom mimesis.exceptions import UnsupportedLocale...
[ { "content": "\"\"\"This module is provide internal util functions.\"\"\"\n\nimport collections\nimport functools\nimport json\nimport ssl\nfrom os import path\nfrom typing import Mapping, Optional, Union\nfrom urllib import request\n\nfrom mimesis import config\nfrom mimesis.exceptions import UnsupportedLocale...
diff --git a/mimesis/utils.py b/mimesis/utils.py index e168cea9a..3e3bd5c51 100755 --- a/mimesis/utils.py +++ b/mimesis/utils.py @@ -96,7 +96,7 @@ def get_data(locale_name: str) -> JSON: :param locale_name: Locale name. :return: Content of JSON file as dict. """ - file_path = path.join...
onnx__onnx-3948
Add col2im operator # col2im ### Describe the operator Rearranges input tensor in blocks. Same behavior as https://pytorch.org/cppdocs/api/function_namespaceat_1a979fbf85d8c7362d60d766bbf1639f10.html ### Can this operator be constructed using existing onnx operators? If so, why not add it as a function? ### ...
[ { "content": "# SPDX-License-Identifier: Apache-2.0\nimport collections.abc # type: ignore\nimport numbers\nimport struct\nfrom cmath import isnan\nfrom typing import (\n Any,\n Callable,\n Dict,\n List,\n Optional,\n Sequence,\n Tuple,\n TypeVar,\n Union,\n cast,\n)\n\nimport goo...
[ { "content": "# SPDX-License-Identifier: Apache-2.0\nimport collections.abc # type: ignore\nimport numbers\nimport struct\nfrom cmath import isnan\nfrom typing import (\n Any,\n Callable,\n Dict,\n List,\n Optional,\n Sequence,\n Tuple,\n TypeVar,\n Union,\n cast,\n)\n\nimport goo...
diff --git a/docs/Changelog.md b/docs/Changelog.md index 9192546af43..e1c4b834f0f 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -13395,7 +13395,7 @@ This version of the operator has been available since version 11 of the default dimension. If the value passed to start or end is larger than the `n` (the ...
encode__uvicorn-754
Lifespan scope is missing asgi dict the lifespan scope (https://asgi.readthedocs.io/en/latest/specs/lifespan.html#scope) is missing the asgi dict prompted by _Originally posted by @florimondmanca in https://github.com/encode/uvicorn/pull/751_
[ { "content": "import asyncio\nimport logging\n\nSTATE_TRANSITION_ERROR = \"Got invalid state transition on lifespan protocol.\"\n\n\nclass LifespanOn:\n def __init__(self, config):\n if not config.loaded:\n config.load()\n\n self.config = config\n self.logger = logging.getLogg...
[ { "content": "import asyncio\nimport logging\n\nSTATE_TRANSITION_ERROR = \"Got invalid state transition on lifespan protocol.\"\n\n\nclass LifespanOn:\n def __init__(self, config):\n if not config.loaded:\n config.load()\n\n self.config = config\n self.logger = logging.getLogg...
diff --git a/tests/test_lifespan.py b/tests/test_lifespan.py index 15823d09c..d72269ab1 100644 --- a/tests/test_lifespan.py +++ b/tests/test_lifespan.py @@ -144,3 +144,40 @@ async def test(): loop = asyncio.new_event_loop() loop.run_until_complete(test()) + + +@pytest.mark.parametrize("mode", ("auto", "on")...
pwr-Solaar__Solaar-1609
Percentage in System-Tray Info **Information** - Distribution: Arch Linux, KDE (X11 and/or Wayland) - Solaar: 1.1.3 Just something simple. Where you click the icon of Solaar and it gives you a little info of what device, it has the picture of the percentage of battery life, but could we also have maybe the act...
[ { "content": "# -*- python-mode -*-\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 License, or\n## (at your...
[ { "content": "# -*- python-mode -*-\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 License, or\n## (at your...
diff --git a/lib/solaar/ui/tray.py b/lib/solaar/ui/tray.py index 876ae3a406..ca7ad6e924 100644 --- a/lib/solaar/ui/tray.py +++ b/lib/solaar/ui/tray.py @@ -440,6 +440,7 @@ def _update_menu_item(index, device): charging = device.status.get(_K.BATTERY_CHARGING) icon_name = _icons.battery(level, charging) + ...
wagtail__wagtail-8396
wagtail.core.utils should be updated to wagtail.coreutils on 3.0 upgrade The contents of `wagtail.core.utils` have been moved to `wagtail.coreutils` rather than `wagtail.utils`, but the release note doesn't mention this and the `wagtail upgrademodulepaths` command doesn't account for it.
[ { "content": "#!/usr/bin/env python\nimport fileinput\nimport fnmatch\nimport os\nimport re\nimport sys\nfrom argparse import ArgumentParser\nfrom difflib import unified_diff\n\nfrom django.core.management import ManagementUtility\n\nCURRENT_PYTHON = sys.version_info[:2]\nREQUIRED_PYTHON = (3, 5)\n\nif CURRENT_...
[ { "content": "#!/usr/bin/env python\nimport fileinput\nimport fnmatch\nimport os\nimport re\nimport sys\nfrom argparse import ArgumentParser\nfrom difflib import unified_diff\n\nfrom django.core.management import ManagementUtility\n\nCURRENT_PYTHON = sys.version_info[:2]\nREQUIRED_PYTHON = (3, 5)\n\nif CURRENT_...
diff --git a/docs/releases/3.0.md b/docs/releases/3.0.md index 40b4a7311eb4..80f3fa35ffbd 100644 --- a/docs/releases/3.0.md +++ b/docs/releases/3.0.md @@ -134,7 +134,8 @@ When using a queryset to render a list of items with images, you can now make us Various modules of Wagtail have been reorganised, and imports sho...
jschneier__django-storages-684
Azure backend pulls broad and outdated dependencies I am struggling getting the Azure backend to work with my other code, due to its dependencies. It pulls in the "azure" package, which is a wrapper to pull in a wide range of Azure SDKs. It hasn't been updated in quite a bit and thus conflicts with some of my code whic...
[ { "content": "from setuptools import setup\n\nimport storages\n\n\ndef read(filename):\n with open(filename) as f:\n return f.read()\n\n\nsetup(\n name='django-storages',\n version=storages.__version__,\n packages=['storages', 'storages.backends'],\n python_requires=\">=2.7, !=3.0.*, !=3.1...
[ { "content": "from setuptools import setup\n\nimport storages\n\n\ndef read(filename):\n with open(filename) as f:\n return f.read()\n\n\nsetup(\n name='django-storages',\n version=storages.__version__,\n packages=['storages', 'storages.backends'],\n python_requires=\">=2.7, !=3.0.*, !=3.1...
diff --git a/setup.py b/setup.py index 206ec5d80..f7dd31c67 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ def read(filename): python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", install_requires=['Django>=1.11'], extras_require={ - 'azure': ['azure>=3.0.0', 'azure-storage-blob>=1...
google__mobly-332
`utils_test` has an unclosed file warning This warning is shown when running unit tests in py3. ``` tests/mobly/utils_test.py::UtilsTest::test_stop_standing_subproc /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py:601: ResourceWarning: unclosed file <_io.BufferedReader name=14> ...
[ { "content": "# Copyright 2016 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/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
[ { "content": "# Copyright 2016 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/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
diff --git a/mobly/utils.py b/mobly/utils.py index 79bf9e20..ac3b1aa9 100644 --- a/mobly/utils.py +++ b/mobly/utils.py @@ -357,6 +357,11 @@ def stop_standing_subprocess(proc, kill_signal=signal.SIGTERM): logging.exception('Failed to kill standing subprocess %d', pid) if failed: raise Error('Faile...
celery__kombu-821
Timer.__iter__'s docstring is error. ``kombu.async.timer.Timer.__iter__`` yields a tuple of ``(wait_seconds, entry)``, not ``(entry, wait_seconds)``. Should I provide pr to fix such small problem? As a newcomer, I don't know if this is appropriate?
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Timer scheduling Python callbacks.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport heapq\nimport sys\n\nfrom collections import namedtuple\nfrom datetime import datetime\nfrom functools import total_ordering\nfrom weakref import proxy as wea...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Timer scheduling Python callbacks.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport heapq\nimport sys\n\nfrom collections import namedtuple\nfrom datetime import datetime\nfrom functools import total_ordering\nfrom weakref import proxy as wea...
diff --git a/kombu/async/timer.py b/kombu/async/timer.py index 55f7bd6ec..f4c7922ef 100644 --- a/kombu/async/timer.py +++ b/kombu/async/timer.py @@ -180,7 +180,7 @@ def __iter__(self, min=min, nowfun=monotonic, pop=heapq.heappop, push=heapq.heappush): """Iterate over schedule. - This...
open-mmlab__mmdetection3d-709
Possible bug with 'rt_mat (np.ndarray)' in coord_3d_mode https://github.com/open-mmlab/mmdetection3d/blob/a1e04538295b02d42fc59bb7ed58c59c98220174/mmdet3d/core/bbox/structures/coord_3d_mode.py#L246 Should it be `if rt_mat.shape[1] == 4:` to take into account both (np.ndarray | torch.Tensor) types of `rt_mat` as inpu...
[ { "content": "import numpy as np\nimport torch\nfrom enum import IntEnum, unique\n\nfrom mmdet3d.core.points import (BasePoints, CameraPoints, DepthPoints,\n LiDARPoints)\nfrom .base_box3d import BaseInstance3DBoxes\nfrom .cam_box3d import CameraInstance3DBoxes\nfrom .depth_box3d...
[ { "content": "import numpy as np\nimport torch\nfrom enum import IntEnum, unique\n\nfrom mmdet3d.core.points import (BasePoints, CameraPoints, DepthPoints,\n LiDARPoints)\nfrom .base_box3d import BaseInstance3DBoxes\nfrom .cam_box3d import CameraInstance3DBoxes\nfrom .depth_box3d...
diff --git a/mmdet3d/core/bbox/structures/coord_3d_mode.py b/mmdet3d/core/bbox/structures/coord_3d_mode.py index e4ac262b2a..edd5f00d3d 100644 --- a/mmdet3d/core/bbox/structures/coord_3d_mode.py +++ b/mmdet3d/core/bbox/structures/coord_3d_mode.py @@ -243,6 +243,8 @@ def convert_point(point, src, dst, rt_mat=None): ...
ckan__ckan-4828
More robust auth functions for resource_view_show Right now it relies on resource objects being present in the context. You should be able to call the auth function with the same parameters as the action (ie just the resource view `id`). This is not an issue in core but it can be problematic when extending auth from e...
[ { "content": "# encoding: utf-8\n\nimport ckan.logic as logic\nimport ckan.authz as authz\nfrom ckan.common import _, config\nfrom ckan.logic.auth import (get_package_object, get_group_object,\n get_resource_object, get_activity_object,\n restrict_anon)\nf...
[ { "content": "# encoding: utf-8\n\nimport ckan.logic as logic\nimport ckan.authz as authz\nfrom ckan.common import _, config\nfrom ckan.logic.auth import (get_package_object, get_group_object,\n get_resource_object, get_activity_object,\n restrict_anon)\nf...
diff --git a/ckan/logic/auth/get.py b/ckan/logic/auth/get.py index 4561e6547ab..03d6baf2130 100644 --- a/ckan/logic/auth/get.py +++ b/ckan/logic/auth/get.py @@ -163,7 +163,15 @@ def resource_show(context, data_dict): def resource_view_show(context, data_dict): - return authz.is_authorized('resource_show', conte...
localstack__localstack-8679
bug: Lambda execution doesn't work with Golang binary lambdas: <title> ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior Running `awslocal lambda invoke --function-name "localStage-mediaStack-backfillGetFunction91FAA-b70d6394" "manual_ test_output.json"` ev...
[ { "content": "import os\nimport platform\nimport stat\nfrom typing import List\n\nfrom localstack import config\nfrom localstack.packages import DownloadInstaller, InstallTarget, Package, PackageInstaller\nfrom localstack.packages.core import ArchiveDownloadAndExtractInstaller, SystemNotSupportedException\nfrom...
[ { "content": "import os\nimport platform\nimport stat\nfrom typing import List\n\nfrom localstack import config\nfrom localstack.packages import DownloadInstaller, InstallTarget, Package, PackageInstaller\nfrom localstack.packages.core import ArchiveDownloadAndExtractInstaller, SystemNotSupportedException\nfrom...
diff --git a/localstack/services/awslambda/packages.py b/localstack/services/awslambda/packages.py index a34755a2530d4..f2bc889417ef8 100644 --- a/localstack/services/awslambda/packages.py +++ b/localstack/services/awslambda/packages.py @@ -10,7 +10,7 @@ LAMBDA_RUNTIME_INIT_URL = "https://github.com/localstack/lambd...
ansible__ansible-modules-core-5160
Random line wraps breaking the yum module, disabling updating packages. <!--- 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 yum.py file in packaging module ##### ANSIBLE VERSION <!--- Paste v...
[ { "content": "#!/usr/bin/python -tt\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Red Hat, Inc\n# Written by Seth Vidal <skvidal at fedoraproject.org>\n# (c) 2014, Epic Games, Inc.\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU...
[ { "content": "#!/usr/bin/python -tt\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Red Hat, Inc\n# Written by Seth Vidal <skvidal at fedoraproject.org>\n# (c) 2014, Epic Games, Inc.\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU...
diff --git a/packaging/os/yum.py b/packaging/os/yum.py index 45bfd2d5775..0bb63076de6 100644 --- a/packaging/os/yum.py +++ b/packaging/os/yum.py @@ -796,6 +796,8 @@ def latest(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos): res['results'].append('Nothing to do here, all packages are up to d...
strawberry-graphql__strawberry-615
strawberry.utils.typing.get_optional_annotation fails when provided an `Optional[Union]` `strawberry.utils.typing.get_optional_annotation` fails when provided an `Optional[Union]` ```pycon >>> from typing import Optional, Union >>> from strawberry.utils.typing import get_optional_annotation >>> get_optional_ann...
[ { "content": "import typing\nfrom collections.abc import AsyncGenerator, Callable\nfrom typing import Type, TypeVar\n\n\ntry:\n from typing import ForwardRef # type: ignore\nexcept ImportError: # pragma: no cover\n # ForwardRef is private in python 3.6 and 3.7\n from typing import _ForwardRef as Forw...
[ { "content": "import typing\nfrom collections.abc import AsyncGenerator, Callable\nfrom typing import Type, TypeVar\n\n\ntry:\n from typing import ForwardRef # type: ignore\nexcept ImportError: # pragma: no cover\n # ForwardRef is private in python 3.6 and 3.7\n from typing import _ForwardRef as Forw...
diff --git a/strawberry/utils/typing.py b/strawberry/utils/typing.py index 6ced4dac0a..41069f1ee3 100644 --- a/strawberry/utils/typing.py +++ b/strawberry/utils/typing.py @@ -42,7 +42,14 @@ def is_optional(annotation: Type) -> bool: def get_optional_annotation(annotation: Type) -> Type: types = annotation.__arg...
pytest-dev__pytest-django-1080
Add Django version to report header When pytest is run, it displays all the versions of the platform and plugins in the report header. Currently the `pytest-django` report header only adds the Django settings and (if found) configuration from `django-configuration`. It would be very useful if `pytest-django` also inclu...
[ { "content": "\"\"\"A pytest plugin which helps testing Django applications\n\nThis plugin handles creating and destroying the test environment and\ntest database and provides some useful text fixtures.\n\"\"\"\n\nimport contextlib\nimport inspect\nimport os\nimport pathlib\nimport sys\nfrom functools import re...
[ { "content": "\"\"\"A pytest plugin which helps testing Django applications\n\nThis plugin handles creating and destroying the test environment and\ntest database and provides some useful text fixtures.\n\"\"\"\n\nimport contextlib\nimport inspect\nimport os\nimport pathlib\nimport sys\nfrom functools import re...
diff --git a/pytest_django/plugin.py b/pytest_django/plugin.py index 8e2d40cb..977f1441 100644 --- a/pytest_django/plugin.py +++ b/pytest_django/plugin.py @@ -367,6 +367,11 @@ def pytest_configure() -> None: @pytest.hookimpl() def pytest_report_header(config: pytest.Config) -> Optional[List[str]]: report_header ...
aws-cloudformation__cfn-lint-595
Support for multiple CodePipeline OutputArtifacts *cfn-lint version*: 0.12.1 *Description of issue.* The CloudFormation linter does not yet support having multiple values for the OutputArtifacts property. When linting a template it gives the following error message: `E2541 Action "CodeBuild" declares 2 OutputArt...
[ { "content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w...
[ { "content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w...
diff --git a/src/cfnlint/rules/resources/codepipeline/CodepipelineStageActions.py b/src/cfnlint/rules/resources/codepipeline/CodepipelineStageActions.py index b9b2178621..29e0ad57b9 100644 --- a/src/cfnlint/rules/resources/codepipeline/CodepipelineStageActions.py +++ b/src/cfnlint/rules/resources/codepipeline/Codepipel...
SciTools__cartopy-67
Cursor is not displaying the correct coordinate values The `GenericProjectionAxes.format_coord` method is not producing the correct results. To reproduce: ``` import matplotlib.pyplot as plt import cartopy.crs as ccrs rob = ccrs.Robinson() ax = plt.axes(projection=rob) ax.coastlines() ax.set_global() plt.show() ``` ...
[ { "content": "# (C) British Crown Copyright 2011 - 2012, 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 - 2012, 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/mpl_integration/geoaxes.py b/lib/cartopy/mpl_integration/geoaxes.py index d3b9d2611..04b86d45d 100644 --- a/lib/cartopy/mpl_integration/geoaxes.py +++ b/lib/cartopy/mpl_integration/geoaxes.py @@ -138,7 +138,7 @@ def cla(self): def format_coord(self, x, y): """Return a format str...
Rapptz__discord.py-1993
embed.to_dict broken in python 3.5.5/3.5.6 ### Summary Using embed.to_dict results in `ValueError: astimezone() cannot be applied to a naive datetime ` ### Reproduction Steps Run the following code in python 3.5.5 or 3.5.6 (probably other 3.5.x versions too) ```import datetime import discord emb = discord....
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2019 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-2019 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/embeds.py b/discord/embeds.py index 5dcc92a82414..88123cbcfb06 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -509,7 +509,10 @@ def to_dict(self): pass else: if timestamp: - result['timestamp'] = timestamp.astimezone(tz=datetime.timezone....
activeloopai__deeplake-1350
[BUG] dataset_meta.json isn't updated after create_tensor ## 🐛🐛 Bug Report After loading an existing dataset with hub.dataset, create_tensor doesn't update the "tensors" attribute in dataset_meta.json. ### ⚗️ Current Behavior For example, a dataset called "hub_dataset" with tensor "images" already exists. Lo...
[ { "content": "import os\nimport shutil\nfrom typing import Optional, Set\n\nfrom hub.core.storage.provider import StorageProvider\nfrom hub.util.exceptions import DirectoryAtPathException, FileAtPathException\n\n\nclass LocalProvider(StorageProvider):\n \"\"\"Provider class for using the local filesystem.\"\...
[ { "content": "import os\nimport shutil\nfrom typing import Optional, Set\n\nfrom hub.core.storage.provider import StorageProvider\nfrom hub.util.exceptions import DirectoryAtPathException, FileAtPathException\n\n\nclass LocalProvider(StorageProvider):\n \"\"\"Provider class for using the local filesystem.\"\...
diff --git a/hub/api/tests/test_api.py b/hub/api/tests/test_api.py index 0306aa7787..02af663b8e 100644 --- a/hub/api/tests/test_api.py +++ b/hub/api/tests/test_api.py @@ -48,6 +48,29 @@ def test_persist(ds_generator): assert ds_new.meta.version == hub.__version__ + ds_new.create_tensor("label") + ds_new....
cornellius-gp__gpytorch-1195
[Bug] Cannot serialize/deserialize SmoothedBoxPrior when some args are broadcast # 🐛 Bug It seems like `SmoothedBoxPrior` for >1d doesn't work with serialization/deserialization when only some args are broadcast. ## To reproduce ```python import torch import gpytorch pr = gpytorch.priors.SmoothedBoxPrior(...
[ { "content": "#!/usr/bin/env python3\n\nimport math\nfrom numbers import Number\n\nimport torch\nfrom torch.distributions import constraints\nfrom torch.distributions.utils import broadcast_all\nfrom torch.nn import Module as TModule\n\nfrom .prior import Prior\nfrom .torch_priors import NormalPrior\n\n\nclass ...
[ { "content": "#!/usr/bin/env python3\n\nimport math\nfrom numbers import Number\n\nimport torch\nfrom torch.distributions import constraints\nfrom torch.distributions.utils import broadcast_all\nfrom torch.nn import Module as TModule\n\nfrom .prior import Prior\nfrom .torch_priors import NormalPrior\n\n\nclass ...
diff --git a/gpytorch/priors/smoothed_box_prior.py b/gpytorch/priors/smoothed_box_prior.py index 3a2d8292a..58ad33271 100644 --- a/gpytorch/priors/smoothed_box_prior.py +++ b/gpytorch/priors/smoothed_box_prior.py @@ -47,7 +47,7 @@ def __init__(self, a, b, sigma=0.01, validate_args=False, transform=None): del s...
python-gitlab__python-gitlab-833
project-variable update fails ## Description of the problem, including code/CLI snippet $ gitlab project-variable create --project-id xxxxxxxx --key junk --value car key: junk gitlab project-variable update --project-id xxxxxxxx --key junk --value boat Impossible to update object (Missing attributes: key) ## Exp...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2013-2017 Gauvain Pocentek <gauvain@pocentek.net>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation, either version 3 ...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2013-2017 Gauvain Pocentek <gauvain@pocentek.net>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Lesser General Public License as published by\n# the Free Software Foundation, either version 3 ...
diff --git a/gitlab/mixins.py b/gitlab/mixins.py index b1309f6ba..7cbb7b9f9 100644 --- a/gitlab/mixins.py +++ b/gitlab/mixins.py @@ -208,6 +208,8 @@ def create(self, data, **kwargs): class UpdateMixin(object): def _check_missing_update_attrs(self, data): required, optional = self.get_update_attrs() + ...
tobymao__sqlglot-3533
The three functions WEEKOFYEAR, DAYOFMONTH, and DAYOFWEEK were incorrectly converted in Hive. ### Code to reproduce an issue ```py import sqlglot sqlglot.parse_one("SELECT WEEKOFYEAR('2024-05-22'), DAYOFMONTH('2024-05-22'), DAYOFWEEK('2024-05-22')", read='hive').sql(dialect='hive') ``` ### as-is: The return va...
[ { "content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, parser, tokens, transforms\nfrom sqlglot.dialects.dialect import (\n DATE_ADD_OR_SUB,\n Dialect,\n NormalizationStrategy,\n approx_count_distinct_sql,\n arg_max_or_min_no_count,\n date...
[ { "content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, parser, tokens, transforms\nfrom sqlglot.dialects.dialect import (\n DATE_ADD_OR_SUB,\n Dialect,\n NormalizationStrategy,\n approx_count_distinct_sql,\n arg_max_or_min_no_count,\n date...
diff --git a/sqlglot/dialects/hive.py b/sqlglot/dialects/hive.py index be733b18bf..48e032d5dd 100644 --- a/sqlglot/dialects/hive.py +++ b/sqlglot/dialects/hive.py @@ -573,6 +573,9 @@ class Generator(generator.Generator): exp.OnProperty: lambda *_: "", exp.PrimaryKeyColumnConstraint: lambda *_:...
GPflow__GPflow-175
error while importing GPflow I can not import GPflow. I instelled it by `python setup.py develop` on virtualenv. Tests are also failing to run. ### Import error ``` In [2]: import GPflow --------------------------------------------------------------------------- NotFoundError Traceback (m...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nfrom setuptools import setup\nimport re\nimport os\nimport sys\n\n# load version form _version.py\nVERSIONFILE = \"GPflow/_version.py\"\nverstrline = open(VERSIONFILE, \"rt\").read()\nVSRE = r\"^__version__ = ['...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nfrom setuptools import setup\nimport re\nimport os\nimport sys\n\n# load version form _version.py\nVERSIONFILE = \"GPflow/_version.py\"\nverstrline = open(VERSIONFILE, \"rt\").read()\nVSRE = r\"^__version__ = ['...
diff --git a/setup.py b/setup.py index f9113e82b..354d48195 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,10 @@ if sys.platform == "darwin": # Additional command for Macs, as instructed by the TensorFlow docs compile_command += " -undefined dynamic_lookup" +elif sys.platform.startswith("linux"): + gcc...
mitmproxy__mitmproxy-1827
FlowView is not updating ##### Steps to reproduce the problem: 1. Open Flow Reponse View 2. Replay Flow (`r`) ##### System information Mitmproxy version: 0.19 Python version: 3.5.2 Platform: Windows-10-10.0.14393-SP0 SSL version: OpenSSL 1.0.2h 3 May 2016 Windows version: 10 10.0.14393 SP0 Multiprocessor...
[ { "content": "import mailcap\nimport mimetypes\nimport os\nimport os.path\nimport shlex\nimport signal\nimport stat\nimport subprocess\nimport sys\nimport tempfile\nimport traceback\n\nimport urwid\n\nfrom mitmproxy import addons\nfrom mitmproxy import controller\nfrom mitmproxy import exceptions\nfrom mitmprox...
[ { "content": "import mailcap\nimport mimetypes\nimport os\nimport os.path\nimport shlex\nimport signal\nimport stat\nimport subprocess\nimport sys\nimport tempfile\nimport traceback\n\nimport urwid\n\nfrom mitmproxy import addons\nfrom mitmproxy import controller\nfrom mitmproxy import exceptions\nfrom mitmprox...
diff --git a/mitmproxy/tools/console/master.py b/mitmproxy/tools/console/master.py index 173f2e2e1c..73d7adbd78 100644 --- a/mitmproxy/tools/console/master.py +++ b/mitmproxy/tools/console/master.py @@ -49,6 +49,7 @@ class ConsoleMaster(master.Master): def __init__(self, options, server): super().__init__...
vllm-project__vllm-3638
[CI] Test examples in CI ### Anything you want to discuss about vllm. Current scripts in `examples/` directory are not tested in CI. We should run them to ensure passing
[ { "content": "import argparse\nimport os\nimport subprocess\n\nimport torch\n\nfrom vllm import LLM\nfrom vllm.sequence import MultiModalData\n\n# The assets are located at `s3://air-example-data-2/vllm_opensource_llava/`.\n\n\ndef run_llava_pixel_values():\n llm = LLM(\n model=\"llava-hf/llava-1.5-7b...
[ { "content": "import argparse\nimport os\nimport subprocess\n\nimport torch\n\nfrom vllm import LLM\nfrom vllm.sequence import MultiModalData\n\n# The assets are located at `s3://air-example-data-2/vllm_opensource_llava/`.\n\n\ndef run_llava_pixel_values():\n llm = LLM(\n model=\"llava-hf/llava-1.5-7b...
diff --git a/.buildkite/test-pipeline.yaml b/.buildkite/test-pipeline.yaml index f6781de61af..9cd09932467 100644 --- a/.buildkite/test-pipeline.yaml +++ b/.buildkite/test-pipeline.yaml @@ -33,6 +33,16 @@ steps: - label: Entrypoints Test command: pytest -v -s entrypoints +- label: Examples Test + working_dir: "/v...
Lightning-Universe__lightning-bolts-230
CPCv2-Resnet18 pretrained not available Hi, When I try to load a pretrained CPCv2-resnet18 model, I get an `urllib.error.HTTPError: HTTP Error 403: Forbidden` error. The code I use to load the pretrained model is ``` model = CPCV2(encoder='resnet18', pretrained=True) x = torch.rand(1, 3, 224, 224) feats = model....
[ { "content": "\n\nvae_imagenet2012 = 'https://pl-bolts-weights.s3.us-east-2.amazonaws.com/' \\\n 'vae/imagenet_06_22_2019/checkpoints/epoch%3D63.ckpt'\n\ncpcv2_resnet18 = 'https://pl-bolts-weights.s3.us-east-2.amazonaws.com/' \\\n 'cpc/resnet18_version_6/checkpoints/epoch%3D85....
[ { "content": "\n\nvae_imagenet2012 = 'https://pl-bolts-weights.s3.us-east-2.amazonaws.com/' \\\n 'vae/imagenet_06_22_2019/checkpoints/epoch%3D63.ckpt'\n\ncpcv2_resnet18 = 'https://pl-bolts-weights.s3.us-east-2.amazonaws.com/' \\\n 'cpc/resnet18-v6/epoch%3D85.ckpt'\nurls = {\n ...
diff --git a/pl_bolts/utils/pretrained_weights.py b/pl_bolts/utils/pretrained_weights.py index 47d62c9e6a..8abfdb18f5 100644 --- a/pl_bolts/utils/pretrained_weights.py +++ b/pl_bolts/utils/pretrained_weights.py @@ -4,7 +4,7 @@ 'vae/imagenet_06_22_2019/checkpoints/epoch%3D63.ckpt' cpcv2_resnet18 =...
pymedusa__Medusa-9546
Manual search results from Tokyo Toshokan have 0 file size **Describe the bug** All search results returned from [Tokyo Toshokan](https://tokyotosho.info) search provider appear to be 0 bytes in file size, despite this information being provided when looking up on their website. **To Reproduce** Steps to reproduce...
[ { "content": "# coding=utf-8\n\n\"\"\"Provider code for TokyoToshokan.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport re\nfrom builtins import zip\n\nfrom medusa import tv\nfrom medusa.bs4_parser import BS4Parser\nfrom medusa.helper.common import (\n convert_size,\n try_int,\n)...
[ { "content": "# coding=utf-8\n\n\"\"\"Provider code for TokyoToshokan.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport re\nfrom builtins import zip\n\nfrom medusa import tv\nfrom medusa.bs4_parser import BS4Parser\nfrom medusa.helper.common import (\n convert_size,\n try_int,\n)...
diff --git a/medusa/providers/torrent/html/tokyotoshokan.py b/medusa/providers/torrent/html/tokyotoshokan.py index 84a832351b..6c1a05668f 100644 --- a/medusa/providers/torrent/html/tokyotoshokan.py +++ b/medusa/providers/torrent/html/tokyotoshokan.py @@ -129,7 +129,7 @@ def parse(self, data, mode): ...
aio-libs__aiohttp-908
Add helper method to raise an exception for error status codes ## Long story short aiohttp should provide a helper's method to check for errors in responses. Something like request's `raise_for_error`.
[ { "content": "import asyncio\nimport collections\nimport http.cookies\nimport io\nimport json\nimport mimetypes\nimport os\nimport sys\nimport traceback\nimport urllib.parse\nimport warnings\n\ntry:\n import cchardet as chardet\nexcept ImportError:\n import chardet\n\nfrom multidict import (CIMultiDictPro...
[ { "content": "import asyncio\nimport collections\nimport http.cookies\nimport io\nimport json\nimport mimetypes\nimport os\nimport sys\nimport traceback\nimport urllib.parse\nimport warnings\n\ntry:\n import cchardet as chardet\nexcept ImportError:\n import chardet\n\nfrom multidict import (CIMultiDictPro...
diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_reqrep.py index a4c872ea1a6..80fdc7e02ee 100644 --- a/aiohttp/client_reqrep.py +++ b/aiohttp/client_reqrep.py @@ -691,6 +691,12 @@ def release(self): self._connection = None self._cleanup_writer() + def raise_for_status(self): + ...
getsentry__sentry-8704
Sentry storing IP address although it is disabled - Sentry: 8.22.0 - Installation method: Docker - Stacktrace / logs: n/a Hi, I am using the symfony bundle `sentry/sentry-symfony` and a self-hosted version of sentry. I disabled storing IP addresses: ![2018-06-07 at 19 11](https://user-images.githubusercontent....
[ { "content": "\"\"\"\nsentry.coreapi\n~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n# TODO: We should make the API a class, and UDP/HTTP just inherit from it\n# This will make it so we can more easily co...
[ { "content": "\"\"\"\nsentry.coreapi\n~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n# TODO: We should make the API a class, and UDP/HTTP just inherit from it\n# This will make it so we can more easily co...
diff --git a/src/sentry/coreapi.py b/src/sentry/coreapi.py index cd22abff14bbf7..c9366a89d545d4 100644 --- a/src/sentry/coreapi.py +++ b/src/sentry/coreapi.py @@ -344,6 +344,9 @@ def ensure_does_not_have_ip(self, data): if 'sentry.interfaces.User' in data: data['sentry.interfaces.User'].pop('ip_ad...
OCA__bank-payment-44
Code error in account_payment_sale I'm reporting a bug in my own code : in the 7.0 branch, in account_payment_sale/model/sale.py line 41, we have the following code: partner.customer_payment_mode.id or False, We should NOT have a coma at the end of this line. When we run the module in Odoo 8.0, it will crash when cr...
[ { "content": "# -*- encoding: utf-8 -*-\n##############################################################################\n#\n# Account Payment Sale module for OpenERP\n# Copyright (C) 2014 Akretion (http://www.akretion.com)\n# @author Alexis de Lattre <alexis.delattre@akretion.com>\n#\n# This program...
[ { "content": "# -*- encoding: utf-8 -*-\n##############################################################################\n#\n# Account Payment Sale module for OpenERP\n# Copyright (C) 2014 Akretion (http://www.akretion.com)\n# @author Alexis de Lattre <alexis.delattre@akretion.com>\n#\n# This program...
diff --git a/account_payment_sale/model/sale.py b/account_payment_sale/model/sale.py index 5951f96af4d..10399645e0f 100644 --- a/account_payment_sale/model/sale.py +++ b/account_payment_sale/model/sale.py @@ -38,7 +38,7 @@ def onchange_partner_id(self, cr, uid, ids, part, context=None): partner = self.pool...
pypa__setuptools-2583
check_specifier() raises an exception when not passed as string `dist.check_specifier()` is used to validate that the given argument is valid. The documentation and the error message it produces clearly states the value should be a string. However, if the value is something other than a string, `DistutilsSetupError` is...
[ { "content": "# -*- coding: utf-8 -*-\n__all__ = ['Distribution']\n\nimport io\nimport sys\nimport re\nimport os\nimport warnings\nimport numbers\nimport distutils.log\nimport distutils.core\nimport distutils.cmd\nimport distutils.dist\nfrom distutils.util import strtobool\nfrom distutils.debug import DEBUG\nfr...
[ { "content": "# -*- coding: utf-8 -*-\n__all__ = ['Distribution']\n\nimport io\nimport sys\nimport re\nimport os\nimport warnings\nimport numbers\nimport distutils.log\nimport distutils.core\nimport distutils.cmd\nimport distutils.dist\nfrom distutils.util import strtobool\nfrom distutils.debug import DEBUG\nfr...
diff --git a/changelog.d/1932.change.rst b/changelog.d/1932.change.rst new file mode 100644 index 0000000000..a7af5b72ac --- /dev/null +++ b/changelog.d/1932.change.rst @@ -0,0 +1 @@ +Handled :code:`AttributeError` by raising :code:`DistutilsSetupError` in :code:`dist.check_specifier()` when specifier is not a string -...
pyca__cryptography-714
Error installing 0.2.1 on Ubuntu 11.10 Trying to install 0.2.1 on Ubuntu 11.10 via pip, and getting the attached error. Also tried with master and setup.py install, same error. The latest cryptography version that I am able to successfully install via pip is 0.1. ``` Downloading/unpacking cryptography==0.2.1 Downloa...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, so...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, so...
diff --git a/cryptography/hazmat/bindings/openssl/err.py b/cryptography/hazmat/bindings/openssl/err.py index ddb60ef76cb0..56e9a6bc563e 100644 --- a/cryptography/hazmat/bindings/openssl/err.py +++ b/cryptography/hazmat/bindings/openssl/err.py @@ -151,7 +151,6 @@ static const int EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH...
encode__django-rest-framework-3099
Unable to override required argument on a read_only field in extra_kwargs Fields that are set to `"read_only": True` are not passed to `update()` on a serializer. A work around to this was to add `"read_only": False` to `extra_kwargs` for that field. This would pass the value to update and allow us to use it. One prob...
[ { "content": "\"\"\"\nSerializers and ModelSerializers are similar to Forms and ModelForms.\nUnlike forms, they are not constrained to dealing with HTML output, and\nform encoded input.\n\nSerialization in REST framework is a two-phase process:\n\n1. Serializers marshal between complex types like model instance...
[ { "content": "\"\"\"\nSerializers and ModelSerializers are similar to Forms and ModelForms.\nUnlike forms, they are not constrained to dealing with HTML output, and\nform encoded input.\n\nSerialization in REST framework is a two-phase process:\n\n1. Serializers marshal between complex types like model instance...
diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index 3a452bcc1e..7afddfd82b 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -1105,8 +1105,8 @@ def include_extra_kwargs(self, kwargs, extra_kwargs): if extra_kwargs.get('default') and kwargs.get('requi...
encode__django-rest-framework-1038
Views handling Throttled exception with wait == None should not attempt to set Throttle wait header Defining a non-time-based throttle, in which wait() returns None, causes APIView.handle_exception(exc) to fail when setting X-Throttle-Wait-Seconds header since it's using '%d' % exc.wait
[ { "content": "\"\"\"\nProvides an APIView class that is the base of all views in REST framework.\n\"\"\"\nfrom __future__ import unicode_literals\n\nfrom django.core.exceptions import PermissionDenied\nfrom django.http import Http404\nfrom django.utils.datastructures import SortedDict\nfrom django.views.decorat...
[ { "content": "\"\"\"\nProvides an APIView class that is the base of all views in REST framework.\n\"\"\"\nfrom __future__ import unicode_literals\n\nfrom django.core.exceptions import PermissionDenied\nfrom django.http import Http404\nfrom django.utils.datastructures import SortedDict\nfrom django.views.decorat...
diff --git a/rest_framework/tests/test_throttling.py b/rest_framework/tests/test_throttling.py index 19bc691ae7..41bff6926a 100644 --- a/rest_framework/tests/test_throttling.py +++ b/rest_framework/tests/test_throttling.py @@ -7,7 +7,7 @@ from django.core.cache import cache from rest_framework.test import APIRequestF...
ephios-dev__ephios-757
Make minors identifiable on event detail page As an Einsatzleiter, I want to quickly grasp which participants are younger than 18 years. For that purpose, I want to have the participation boxes on the event detail page/shift box to display a small warning/indication, e.g. a red corner or similar.
[ { "content": "import dataclasses\nimport functools\nfrom datetime import date\nfrom typing import Optional\n\nfrom django.contrib.auth import get_user_model\nfrom django.db.models import QuerySet\nfrom django.urls import reverse\nfrom django.utils.safestring import mark_safe\nfrom django.utils.translation impor...
[ { "content": "import dataclasses\nimport functools\nfrom datetime import date\nfrom typing import Optional\n\nfrom django.contrib.auth import get_user_model\nfrom django.db.models import QuerySet\nfrom django.urls import reverse\nfrom django.utils.safestring import mark_safe\nfrom django.utils.translation impor...
diff --git a/ephios/core/signup/participants.py b/ephios/core/signup/participants.py index eef5514d4..6ce25b391 100644 --- a/ephios/core/signup/participants.py +++ b/ephios/core/signup/participants.py @@ -27,6 +27,12 @@ def get_age(self, today: date = None): today, born = today or date.today(), self.date_of_bi...
rlworkgroup__garage-1927
On policy algos stop learning midway Avg return either drops dramatically or the run stops completely due to NaN errors. Could affect off policy as well.
[ { "content": "\"\"\"An environment wrapper that normalizes action, observation and reward.\"\"\"\nimport akro\nimport numpy as np\n\nfrom garage import EnvStep, Wrapper\n\n\nclass NormalizedEnv(Wrapper):\n \"\"\"An environment wrapper for normalization.\n\n This wrapper normalizes action, and optionally o...
[ { "content": "\"\"\"An environment wrapper that normalizes action, observation and reward.\"\"\"\nimport akro\nimport numpy as np\n\nfrom garage import EnvStep, Wrapper\n\n\nclass NormalizedEnv(Wrapper):\n \"\"\"An environment wrapper for normalization.\n\n This wrapper normalizes action, and optionally o...
diff --git a/src/garage/envs/normalized_env.py b/src/garage/envs/normalized_env.py index 717b2404ba..9f73447382 100644 --- a/src/garage/envs/normalized_env.py +++ b/src/garage/envs/normalized_env.py @@ -109,7 +109,7 @@ def step(self, action): reward = self._apply_normalize_reward(reward) return ...
MongoEngine__mongoengine-917
bug in ListField + extend method? - MongoEngine 0.8.7 on Mac + Python 2.7 tags = ListField(StringField()) ``` # I am having problem with this more_tags = ['a', 'b'] self.tags += more_tags self.save() # This works more_tags = ['a', 'b'] for tag in more_tags: self.tags.append(tag) self.save() ``` Any ideas? bug ...
[ { "content": "import weakref\nimport functools\nimport itertools\nfrom mongoengine.common import _import_class\nfrom mongoengine.errors import DoesNotExist, MultipleObjectsReturned\n\n__all__ = (\"BaseDict\", \"BaseList\", \"EmbeddedDocumentList\")\n\n\nclass BaseDict(dict):\n \"\"\"A special dict so we can ...
[ { "content": "import weakref\nimport functools\nimport itertools\nfrom mongoengine.common import _import_class\nfrom mongoengine.errors import DoesNotExist, MultipleObjectsReturned\n\n__all__ = (\"BaseDict\", \"BaseList\", \"EmbeddedDocumentList\")\n\n\nclass BaseDict(dict):\n \"\"\"A special dict so we can ...
diff --git a/docs/changelog.rst b/docs/changelog.rst index 59398339d..8f5904b89 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -5,6 +5,10 @@ Changelog Changes in 0.9.X - DEV ====================== +- Support += and *= for ListField #595 + +Changes in 0.9.0 +================ - Update FileField when cre...
liqd__a4-opin-1944
Initiators gets Error 403 when deleting Offline Events **URL:https://opin.me/de/dashboard/offlineevents/offline-test/delete/ https://opin.me/de/projects/magda-testet-brainstorming/** **user: Initiator** **expected behaviour: As an Initiator I want to delete an Offline Event and then it is deleted** **behaviour:A...
[ { "content": "from django.contrib import messages\nfrom django.db import transaction\nfrom django.shortcuts import redirect, render\nfrom django.urls import reverse\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.views import generic\nfrom rules.contrib.views import PermissionRequiredMixin...
[ { "content": "from django.contrib import messages\nfrom django.db import transaction\nfrom django.shortcuts import redirect, render\nfrom django.urls import reverse\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.views import generic\nfrom rules.contrib.views import PermissionRequiredMixin...
diff --git a/euth/offlinephases/views.py b/euth/offlinephases/views.py index 1fa7032db..f45835abc 100644 --- a/euth/offlinephases/views.py +++ b/euth/offlinephases/views.py @@ -167,7 +167,7 @@ class OfflineEventDeleteView(ProjectMixin, generic.DeleteView): model = models.OfflineEvent ...
fedora-infra__bodhi-3886
Broken search updates pagination with filters If you use multiple values in search filters for updates search, as soon as you change page the filter gets broken. For example, a simple search with `status = pending or testing` will produce a first page which is fine (`updates/?search=&status=pending&status=testing`), b...
[ { "content": "# Copyright © 2007-2019 Red Hat, Inc. and others.\n#\n# This file is part of Bodhi.\n#\n# 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...
[ { "content": "# Copyright © 2007-2019 Red Hat, Inc. and others.\n#\n# This file is part of Bodhi.\n#\n# 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...
diff --git a/bodhi/server/util.py b/bodhi/server/util.py index 29711981d4..fbde7cd01e 100644 --- a/bodhi/server/util.py +++ b/bodhi/server/util.py @@ -663,9 +663,9 @@ def page_url(context, page): str: The current path appended with a GET query for the requested page. """ request = context.get('reques...
mozilla__pontoon-2762
Show "All contributions" by default when accessing own profile We currently use "Suggestions and reviews" as the default contribution type filter on the profile page. That allows managers, admins and also external users (e.g. employers) to get a quick overview over user's own activity right after the page is loaded. ...
[ { "content": "import json\n\nfrom dateutil.relativedelta import relativedelta\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.auth.models import User\nfrom django.db import transaction\nfrom django.db.models import Q\nfrom django.http import (...
[ { "content": "import json\n\nfrom dateutil.relativedelta import relativedelta\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.auth.models import User\nfrom django.db import transaction\nfrom django.db.models import Q\nfrom django.http import (...
diff --git a/pontoon/contributors/templates/contributors/profile.html b/pontoon/contributors/templates/contributors/profile.html index c9e53649cc..6fbc2f480b 100644 --- a/pontoon/contributors/templates/contributors/profile.html +++ b/pontoon/contributors/templates/contributors/profile.html @@ -288,7 +288,7 @@ <h3 class...
ytdl-org__youtube-dl-6539
Handle protocol-relative URLs Trying to download http://www.funnyordie.com/videos/ea20db28f8/kristen-stewart-jesse-eisenberg-interview-each-other (warning: autostarting video) fails with: ``` [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.funnyordie.com/videos/ea20db2...
[ { "content": "from __future__ import unicode_literals\n\nimport json\nimport re\n\nfrom .common import InfoExtractor\nfrom ..utils import ExtractorError\n\n\nclass FunnyOrDieIE(InfoExtractor):\n _VALID_URL = r'https?://(?:www\\.)?funnyordie\\.com/(?P<type>embed|articles|videos)/(?P<id>[0-9a-f]+)(?:$|[?#/])'\...
[ { "content": "from __future__ import unicode_literals\n\nimport json\nimport re\n\nfrom .common import InfoExtractor\nfrom ..utils import ExtractorError\n\n\nclass FunnyOrDieIE(InfoExtractor):\n _VALID_URL = r'https?://(?:www\\.)?funnyordie\\.com/(?P<type>embed|articles|videos)/(?P<id>[0-9a-f]+)(?:$|[?#/])'\...
diff --git a/youtube_dl/extractor/funnyordie.py b/youtube_dl/extractor/funnyordie.py index dd87257c465..f5f13689c0a 100644 --- a/youtube_dl/extractor/funnyordie.py +++ b/youtube_dl/extractor/funnyordie.py @@ -53,7 +53,7 @@ def _real_extract(self, url): for bitrate in bitrates: for link in links: ...
mne-tools__mne-bids-814
acq_time is optional in scans.tsv files while we make it required see: ``` ~/work/src/mne-bids/mne_bids/read.py in _handle_scans_reading(scans_fname, raw, bids_path, verbose) 206 data_fname = bids_path.datatype + '/' + fname 207 fnames = scans_tsv['filename'] --> 208 acq_times = scans_tsv['ac...
[ { "content": "\"\"\"Check whether a file format is supported by BIDS and then load it.\"\"\"\n# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>\n# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Teon Brooks <teon.brooks@gmail.com>\n# Chris Holdgraf <choldgraf@ber...
[ { "content": "\"\"\"Check whether a file format is supported by BIDS and then load it.\"\"\"\n# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>\n# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Teon Brooks <teon.brooks@gmail.com>\n# Chris Holdgraf <choldgraf@ber...
diff --git a/doc/whats_new.rst b/doc/whats_new.rst index f3cead7cb..929b88247 100644 --- a/doc/whats_new.rst +++ b/doc/whats_new.rst @@ -68,6 +68,7 @@ Bug fixes - :func:`mne_bids.inspect_dataset` didn't handle certain filenames correctly on some systems, by `Richard Höchenberger`_ (:gh:`769`) - :func:`mne_bids.write_...
spack__spack-4017
spack install broken on python3 Using 1e18ace6472c94893cc567ca757032269e02460f and python3 I still get: ``` $ spack install pax-utils ==> Installing pax-utils ==> Fetching https://dev.gentoo.org/~vapier/dist/pax-utils-1.2.2.tar.xz ######################################################################## 100.0% ==>...
[ { "content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ...
[ { "content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ...
diff --git a/lib/spack/spack/hooks/sbang.py b/lib/spack/spack/hooks/sbang.py index 17f6ac252821b2..09691b3f0fbab4 100644 --- a/lib/spack/spack/hooks/sbang.py +++ b/lib/spack/spack/hooks/sbang.py @@ -38,9 +38,12 @@ def shebang_too_long(path): """Detects whether a file has a shebang line that is too long.""" - ...
Cog-Creators__Red-DiscordBot-1648
[V3 Parser] --dry-run flag not handled # Other bugs #### What were you trying to do? I was trying to run the bot with the `--dry-run` flag #### What were you expecting to happen? See the bot loading data, then stop before connecting to the gateway ``` --dry-run Makes Red quit with code 0 ju...
[ { "content": "#!/usr/bin/env python\n\n# Discord Version check\n\nimport sys\nimport discord\nfrom redbot.core.bot import Red, ExitCodes\nfrom redbot.core.cog_manager import CogManagerUI\nfrom redbot.core.data_manager import load_basic_configuration, config_file\nfrom redbot.core.json_io import JsonIO\nfrom red...
[ { "content": "#!/usr/bin/env python\n\n# Discord Version check\n\nimport sys\nimport discord\nfrom redbot.core.bot import Red, ExitCodes\nfrom redbot.core.cog_manager import CogManagerUI\nfrom redbot.core.data_manager import load_basic_configuration, config_file\nfrom redbot.core.json_io import JsonIO\nfrom red...
diff --git a/redbot/__main__.py b/redbot/__main__.py index 6ad23a8b0ff..60e2cd7fbd4 100644 --- a/redbot/__main__.py +++ b/redbot/__main__.py @@ -132,6 +132,10 @@ def main(): log.critical("Token and prefix must be set in order to login.") sys.exit(1) loop.run_until_complete(_get_prefix_and...
spack__spack-19627
Installation issue: llvm (lldb) with external ncurses on openSUSE (missing <panel.h>) ### Steps to reproduce the issue <!-- Fill in the exact spec you are trying to build and the relevant part of the error message --> ```console $ spack install mesa ... ==> Installing llvm ==> No binary for llvm found: installi...
[ { "content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\nimport os.path\nimport re\nimport sys\n\nimport llnl.util.tty as tty\nimport spack.util.executabl...
[ { "content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\nimport os.path\nimport re\nimport sys\n\nimport llnl.util.tty as tty\nimport spack.util.executabl...
diff --git a/var/spack/repos/builtin/packages/llvm/lldb_external_ncurses-10.patch b/var/spack/repos/builtin/packages/llvm/lldb_external_ncurses-10.patch new file mode 100644 index 00000000000000..34ed0e3cd2130c --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm/lldb_external_ncurses-10.patch @@ -0,0 +1,31 @@ +di...
tobymao__sqlglot-1131
transpiling from snowflake to snowflake converts DAYOFWEEK to nonexistent DAY_OF_WEEK works in snowflake: `select dayofweek( '2016-01-02T23:39:20.123-07:00'::timestamp)` in sqlglot 11.0.0, python 3.10.4: ```python import sqlglot # converts dayofweek to nonexistent DAY_OF_WEEK print(sqlglot.transpile("select ...
[ { "content": "from __future__ import annotations\n\nfrom sqlglot import exp, generator, parser, tokens\nfrom sqlglot.dialects.dialect import (\n Dialect,\n datestrtodate_sql,\n format_time_lambda,\n inline_array_sql,\n rename_func,\n timestrtotime_sql,\n var_map_sql,\n)\nfrom sqlglot.expres...
[ { "content": "from __future__ import annotations\n\nfrom sqlglot import exp, generator, parser, tokens\nfrom sqlglot.dialects.dialect import (\n Dialect,\n datestrtodate_sql,\n format_time_lambda,\n inline_array_sql,\n rename_func,\n timestrtotime_sql,\n var_map_sql,\n)\nfrom sqlglot.expres...
diff --git a/sqlglot/dialects/snowflake.py b/sqlglot/dialects/snowflake.py index 256b28f342..8ca1d362ea 100644 --- a/sqlglot/dialects/snowflake.py +++ b/sqlglot/dialects/snowflake.py @@ -222,6 +222,7 @@ class Generator(generator.Generator): exp.TimeToUnix: lambda self, e: f"EXTRACT(epoch_second FROM {self....
ManimCommunity__manim-932
Logging creates {media_dir}/logs ## Description of bug / unexpected behavior If `--log_to_file` is set, Manim creates the directory `{media_dir}/logs` instead of using `media_dir + "/logs"` ## How to reproduce the issue `manim foo.py --log_to_file && ls`
[ { "content": "\"\"\"Utilities to create and set the config.\n\nThe main class exported by this module is :class:`ManimConfig`. This class\ncontains all configuration options, including frame geometry (e.g. frame\nheight/width, frame rate), output (e.g. directories, logging), styling\n(e.g. background color, tr...
[ { "content": "\"\"\"Utilities to create and set the config.\n\nThe main class exported by this module is :class:`ManimConfig`. This class\ncontains all configuration options, including frame geometry (e.g. frame\nheight/width, frame rate), output (e.g. directories, logging), styling\n(e.g. background color, tr...
diff --git a/manim/_config/utils.py b/manim/_config/utils.py index a6ae435335..1382a54431 100644 --- a/manim/_config/utils.py +++ b/manim/_config/utils.py @@ -753,8 +753,9 @@ def log_to_file(self): def log_to_file(self, val: str) -> None: self._set_boolean("log_to_file", val) if val: - ...
biolab__orange3-3722
Orange.statistics.util.py: improper computation of missing meta values 1. Metas are always read as dtype=object. Try to read them as float64 if possible (numeric, categorical, datetime). 2. If dtype=object (at least one string meta variable), compute better statistics for primitive variables. Example no1: Datasets...
[ { "content": "\"\"\"\nThis module provides alternatives for the few additional functions found in\nand once used from the bottlechest package (fork of bottleneck).\n\nIt also patches bottleneck to contain these functions.\n\"\"\"\nimport warnings\nfrom typing import Iterable\n\nimport numpy as np\nimport bottle...
[ { "content": "\"\"\"\nThis module provides alternatives for the few additional functions found in\nand once used from the bottlechest package (fork of bottleneck).\n\nIt also patches bottleneck to contain these functions.\n\"\"\"\nimport warnings\nfrom typing import Iterable\n\nimport numpy as np\nimport bottle...
diff --git a/Orange/statistics/util.py b/Orange/statistics/util.py index 57c38bbdc9e..7dc56490146 100644 --- a/Orange/statistics/util.py +++ b/Orange/statistics/util.py @@ -361,7 +361,9 @@ def weighted_mean(): X.shape[0] - non_zero, non_zero)) else: - nans = (~X.astype(bool)).sum(a...
napalm-automation__napalm-836
napalm validate is modifying the source dictionary with pop operations ```python def napalm_validate(napalm, file=None, source=None): complies = napalm.compliance_report(validation_file=file, validation_source=source)[ "complies" ] return complies ``` and i'm using it like this: ```pytho...
[ { "content": "\"\"\"\nValidation methods for the NAPALM base.\n\nSee: https://napalm.readthedocs.io/en/latest/validate.html\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport yaml\n\nfrom napalm.base.exceptions import ValidationException\nfrom napalm.base.utils import py23_compat\n\nimport copy\nimport ...
[ { "content": "\"\"\"\nValidation methods for the NAPALM base.\n\nSee: https://napalm.readthedocs.io/en/latest/validate.html\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport yaml\n\nfrom napalm.base.exceptions import ValidationException\nfrom napalm.base.utils import py23_compat\n\nimport copy\nimport ...
diff --git a/napalm/base/validate.py b/napalm/base/validate.py index c3224c15b..fa4f56f9d 100644 --- a/napalm/base/validate.py +++ b/napalm/base/validate.py @@ -180,6 +180,9 @@ def compliance_report(cls, validation_file=None, validation_source=None): if validation_file: validation_source = _get_validation...
lutris__lutris-1221
Executable's path is not fully displayed How to reproduce: 1) Get master version of Lutris 2) Install a new game 3) Get a path to the executable that is not full (it only displays the path inside prefix, in this example it should have `/home/USERNAME/Games/overwatch` first) ![image](https://user-images.githubuserco...
[ { "content": "\"\"\"Widget generators and their signal handlers\"\"\"\n# pylint: disable=no-member\nimport os\nfrom gi.repository import Gtk, Gdk\n\nfrom lutris import settings, sysoptions\nfrom lutris.gui.widgets.common import VBox, Label, FileChooserEntry, EditableGrid\nfrom lutris.runners import import_runne...
[ { "content": "\"\"\"Widget generators and their signal handlers\"\"\"\n# pylint: disable=no-member\nimport os\nfrom gi.repository import Gtk, Gdk\n\nfrom lutris import settings, sysoptions\nfrom lutris.gui.widgets.common import VBox, Label, FileChooserEntry, EditableGrid\nfrom lutris.runners import import_runne...
diff --git a/lutris/gui/config_boxes.py b/lutris/gui/config_boxes.py index bbcf4db9cf..06f0c27a33 100644 --- a/lutris/gui/config_boxes.py +++ b/lutris/gui/config_boxes.py @@ -356,6 +356,8 @@ def generate_file_chooser(self, option, path=None): # If path is relative, complete with game dir if no...
nf-core__tools-1439
Linting exits with error `Indexerror` <!-- # nf-core/tools bug report Hi there! Thanks for telling us about a problem with the nf-core/tools package. Please delete this text and anything that's not relevant from the template below: --> ## Description of the bug I used nf-core lint on my pipeline which was ...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nLint the main.nf file of a module\n\"\"\"\n\nimport re\nimport nf_core\n\n\ndef main_nf(module_lint_object, module):\n \"\"\"\n Lint a single main.nf module file\n Can also be used to lint local module files,\n in which case failures should be interpreted...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nLint the main.nf file of a module\n\"\"\"\n\nimport re\nimport nf_core\n\n\ndef main_nf(module_lint_object, module):\n \"\"\"\n Lint a single main.nf module file\n Can also be used to lint local module files,\n in which case failures should be interpreted...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 3460dcee62..c1fbbf9a73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ * Call the command line help with `-h` as well as `--help` (was formerly just the latter) ([#1404](https://github.com/nf-core/tools/pull/1404)) * Add `.yamllint.yml` config file to avoi...
enthought__chaco-540
ScatterInspector does not deselect all on index == None I've been playing around with the scattertoggle.py example. Maybe I'm missing something, but the ScatterInspector seems to fail to deselect all points when clicking on whitespace on the plot (that is, index == None). Something along the lines of this seems to fix ...
[ { "content": "\"\"\" Defines the ScatterInspector tool class.\n\"\"\"\n\n# Enthought library imports\nfrom traits.api import Any, Bool, Enum, Event, HasStrictTraits, Str\n\n# Local, relative imports\nfrom .select_tool import SelectTool\n\nHOVER_EVENT = \"hover\"\n\nSELECT_EVENT = \"select\"\n\nDESELECT_EVENT = ...
[ { "content": "\"\"\" Defines the ScatterInspector tool class.\n\"\"\"\n\n# Enthought library imports\nfrom traits.api import Any, Bool, Enum, Event, HasStrictTraits, Str\n\n# Local, relative imports\nfrom .select_tool import SelectTool\n\nHOVER_EVENT = \"hover\"\n\nSELECT_EVENT = \"select\"\n\nDESELECT_EVENT = ...
diff --git a/chaco/tools/scatter_inspector.py b/chaco/tools/scatter_inspector.py index 77b73a9cf..09a69077e 100644 --- a/chaco/tools/scatter_inspector.py +++ b/chaco/tools/scatter_inspector.py @@ -125,6 +125,11 @@ def _deselect(self, index=None): # Only issue 1 event: if name == 'index...
pytorch__ignite-1192
DistributedProxySampler RuntimeError when indices are padded ## 🐛 Bug description The RuntimeError that occurs in the `DistributedProxySampler` on [line 241](https://github.com/pytorch/ignite/blob/master/ignite/distributed/auto.py#L241) shouldn't be there since the indices are padded with the full sample which was ...
[ { "content": "import warnings\n\nimport torch\nimport torch.nn as nn\nfrom torch.optim.optimizer import Optimizer\nfrom torch.utils.data import DataLoader, Dataset\nfrom torch.utils.data.distributed import DistributedSampler\nfrom torch.utils.data.sampler import Sampler\n\nfrom ignite.distributed import utils a...
[ { "content": "import warnings\n\nimport torch\nimport torch.nn as nn\nfrom torch.optim.optimizer import Optimizer\nfrom torch.utils.data import DataLoader, Dataset\nfrom torch.utils.data.distributed import DistributedSampler\nfrom torch.utils.data.sampler import Sampler\n\nfrom ignite.distributed import utils a...
diff --git a/ignite/distributed/auto.py b/ignite/distributed/auto.py index efe6ec6f4dff..5c4ba1db521c 100644 --- a/ignite/distributed/auto.py +++ b/ignite/distributed/auto.py @@ -238,8 +238,8 @@ def __iter__(self): while len(indices) < self.total_size: indices += list(self.sampler) - if l...
vispy__vispy-712
Bump VisPy version? Should we bump the version to 0.4.0-dev or something? Currently it is 0.3.0, which doesn't seem right.
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2014, Vispy Development Team.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\"\n\n=====\nVispy\n=====\n\nVispy is a **high-performance interactive 2D/3D data visualization\nlibrary**. Vispy leverages the computational pow...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2014, Vispy Development Team.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\"\n\n=====\nVispy\n=====\n\nVispy is a **high-performance interactive 2D/3D data visualization\nlibrary**. Vispy leverages the computational pow...
diff --git a/vispy/__init__.py b/vispy/__init__.py index 1010d2be00..b92371291a 100644 --- a/vispy/__init__.py +++ b/vispy/__init__.py @@ -22,7 +22,7 @@ __all__ = ['use', 'sys_info', 'set_log_level', 'test'] # Definition of the version number -version_info = 0, 3, 0, '' # major, minor, patch, extra +version_info =...
DataBiosphere__toil-3023
Remove Sphinx as a dependency As mentioned in https://github.com/DataBiosphere/toil/pull/3011#issuecomment-601349848 we depend on Sphinx, but we only use it for generating documentation. We never use it at runtime. We should remove the Sphinx dependency, and just make sure it is installed by the `Makefile` when runnin...
[ { "content": "# Copyright (C) 2015-2016 Regents of the University of California\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-...
[ { "content": "# Copyright (C) 2015-2016 Regents of the University of California\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-...
diff --git a/Makefile b/Makefile index 0106924a7d..e74116e0bc 100644 --- a/Makefile +++ b/Makefile @@ -208,12 +208,12 @@ clean_docs: check_venv clean: clean_develop clean_sdist clean_docs check_build_reqs: - @$(python) -c 'import mock; import pytest' \ + @($(python) -c 'import mock; import pytest' && which sphinx-b...
mlflow__mlflow-2196
Cannot preview artifacts in UI when uploaded to remote machine via FTP ### System information - **Have I written custom code (as opposed to using a stock example script provided in MLflow)**: No - **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Linux Ubuntu 18.04 - **MLflow installed from (source or b...
[ { "content": "import os\nimport ftplib\nfrom ftplib import FTP\nfrom contextlib import contextmanager\n\nimport posixpath\nfrom six.moves import urllib\n\nfrom mlflow.entities.file_info import FileInfo\nfrom mlflow.store.artifact.artifact_repo import ArtifactRepository\nfrom mlflow.utils.file_utils import relat...
[ { "content": "import os\nimport ftplib\nfrom ftplib import FTP\nfrom contextlib import contextmanager\n\nimport posixpath\nfrom six.moves import urllib\n\nfrom mlflow.entities.file_info import FileInfo\nfrom mlflow.store.artifact.artifact_repo import ArtifactRepository\nfrom mlflow.utils.file_utils import relat...
diff --git a/mlflow/store/artifact/ftp_artifact_repo.py b/mlflow/store/artifact/ftp_artifact_repo.py index 16f6fc5128648..7d96af5d7fe49 100644 --- a/mlflow/store/artifact/ftp_artifact_repo.py +++ b/mlflow/store/artifact/ftp_artifact_repo.py @@ -111,6 +111,7 @@ def list_artifacts(self, path=None): if not se...
holoviz__panel-2883
panel examples gives UnboundLocalError #### ALL software version info panel 0.12.4 #### Description of expected behavior and the observed behavior `$ panel examples` doesn't raise an error #### Complete, minimal, self-contained example code that reproduces the issue Was taking a look at https://panel.holoviz...
[ { "content": "\"\"\"\nCommandline interface to Panel\n\"\"\"\nimport sys\nimport argparse\n\nfrom bokeh.__main__ import main as bokeh_entry_point\nfrom bokeh.command.subcommands.serve import Serve as BkServe\nfrom bokeh.command.util import die\nfrom bokeh.util.string import nice_join\n\nfrom .. import __version...
[ { "content": "\"\"\"\nCommandline interface to Panel\n\"\"\"\nimport sys\nimport argparse\n\nfrom bokeh.__main__ import main as bokeh_entry_point\nfrom bokeh.command.subcommands.serve import Serve as BkServe\nfrom bokeh.command.util import die\nfrom bokeh.util.string import nice_join\n\nfrom .. import __version...
diff --git a/panel/command/__init__.py b/panel/command/__init__.py index 7dd1e84d62..961479a259 100644 --- a/panel/command/__init__.py +++ b/panel/command/__init__.py @@ -102,6 +102,7 @@ def main(args=None): print("install pyct to enable this command (e.g. `conda install -c pyviz pyct` or `pip install pyct...
svthalia__concrexit-2585
AttributeError: 'Event' object has no attribute 'number_regs' Sentry Issue: [CONCREXIT-HC](https://sentry.io/organizations/thalia/issues/3639420824/?referrer=github_integration) ``` AttributeError: 'Event' object has no attribute 'number_regs' (11 additional frame(s) were not displayed) ... File "rest_framework/seri...
[ { "content": "from rest_framework import serializers\n\nfrom activemembers.api.v2.serializers.member_group import MemberGroupSerializer\nfrom announcements.api.v2.serializers import SlideSerializer\nfrom documents.api.v2.serializers.document import DocumentSerializer\nfrom events import services\nfrom events.ap...
[ { "content": "from rest_framework import serializers\n\nfrom activemembers.api.v2.serializers.member_group import MemberGroupSerializer\nfrom announcements.api.v2.serializers import SlideSerializer\nfrom documents.api.v2.serializers.document import DocumentSerializer\nfrom events import services\nfrom events.ap...
diff --git a/website/events/api/v2/serializers/event.py b/website/events/api/v2/serializers/event.py index 46c81d6f5..b0d4bfabf 100644 --- a/website/events/api/v2/serializers/event.py +++ b/website/events/api/v2/serializers/event.py @@ -83,10 +83,7 @@ def _user_registration(self, instance): return None ...
CTFd__CTFd-596
Certain templates can be force loaded There are certain templates which are accessible because of the static_html handler. This isn't a vulnerability because it appears like no sensitive information is loaded but it should be fixed. It's possible that the template handler itself should just be entirely removed.
[ { "content": "import os\nimport re\n\nfrom flask import current_app as app, render_template, request, redirect, abort, jsonify, url_for, session, Blueprint, Response, send_file\nfrom flask.helpers import safe_join\nfrom jinja2.exceptions import TemplateNotFound\nfrom passlib.hash import bcrypt_sha256\n\nfrom CT...
[ { "content": "import os\nimport re\n\nfrom flask import current_app as app, render_template, request, redirect, abort, jsonify, url_for, session, Blueprint, Response, send_file\nfrom flask.helpers import safe_join\nfrom jinja2.exceptions import TemplateNotFound\nfrom passlib.hash import bcrypt_sha256\n\nfrom CT...
diff --git a/CTFd/views.py b/CTFd/views.py index 2905963f2..611f60e9d 100644 --- a/CTFd/views.py +++ b/CTFd/views.py @@ -115,10 +115,7 @@ def custom_css(): def static_html(template): page = utils.get_page(template) if page is None: - try: - return render_template('%s.html' % template) - ...
spyder-ide__spyder-21918
Editor error while closing a project ## Description ### What steps will reproduce the problem? <!--- You can use Markdown here ---> 1. Close a project that has been open for a while (at least a couple of hours). Not sure if that would be enough to trigger the error :thinking: Also, seems like it has been reported ...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\"\"\"\nThis module contains the DebuggerPanel panel\n\"\"\"\n# Third party imports\nfrom qtpy.QtCore import QSize, Qt, QRect, Slot\nfrom qt...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\"\"\"\nThis module contains the DebuggerPanel panel\n\"\"\"\n# Third party imports\nfrom qtpy.QtCore import QSize, Qt, QRect, Slot\nfrom qt...
diff --git a/spyder/plugins/debugger/panels/debuggerpanel.py b/spyder/plugins/debugger/panels/debuggerpanel.py index c07b6bd3ebe..b03bba210aa 100644 --- a/spyder/plugins/debugger/panels/debuggerpanel.py +++ b/spyder/plugins/debugger/panels/debuggerpanel.py @@ -89,7 +89,8 @@ def paintEvent(self, event): """ ...
encode__starlette-1410
ETag checksum fails on FIPS-enabled systems when using MD5 ### Checklist <!-- Please make sure you check all these items before submitting your bug report. --> - [x] The bug is reproducible against the latest release and/or `master`. - [x] There are no similar issues or pull requests to fix it yet. ### Descri...
[ { "content": "import hashlib\n\n# Compat wrapper to always include the `usedforsecurity=...` parameter,\n# which is only added from Python 3.9 onwards.\n# We use this flag to indicate that we use `md5` hashes only for non-security\n# cases (our ETag checksums).\n# If we don't indicate that we're using MD5 for n...
[ { "content": "import hashlib\n\n# Compat wrapper to always include the `usedforsecurity=...` parameter,\n# which is only added from Python 3.9 onwards.\n# We use this flag to indicate that we use `md5` hashes only for non-security\n# cases (our ETag checksums).\n# If we don't indicate that we're using MD5 for n...
diff --git a/starlette/_compat.py b/starlette/_compat.py index 82aa72f38..116561917 100644 --- a/starlette/_compat.py +++ b/starlette/_compat.py @@ -11,7 +11,10 @@ # See issue: https://github.com/encode/starlette/issues/1365 try: - hashlib.md5(b"data", usedforsecurity=True) # type: ignore[call-arg] + # check...
searx__searx-3064
One of the 5 updates commits from yesterday broke searx (it just fails to search) <!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARX --> **Version of Searx, commit number if you are using on master branch and stipulate if you forked Searx** <!-- If you are running on master branch using git exe...
[ { "content": "import re\nfrom collections import defaultdict\nfrom operator import itemgetter\nfrom threading import RLock\nfrom urllib.parse import urlparse, unquote\nfrom searx import logger\nfrom searx.engines import engines\nfrom searx.metrology.error_recorder import record_error\nfrom searx import settings...
[ { "content": "import re\nfrom collections import defaultdict\nfrom operator import itemgetter\nfrom threading import RLock\nfrom urllib.parse import urlparse, unquote\nfrom searx import logger\nfrom searx.engines import engines\nfrom searx.metrology.error_recorder import record_error\nfrom searx import settings...
diff --git a/searx/results.py b/searx/results.py index 3acf1045f2..6502ddcdc4 100644 --- a/searx/results.py +++ b/searx/results.py @@ -137,7 +137,7 @@ def result_score(result, language): if hasattr(engines[result_engine], 'weight'): weight *= float(engines[result_engine].weight) - if settings...