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
⌀
pyg-team__pytorch_geometric-8388
LatexBuilder for docs fails ### 📚 Describe the documentation issue The following line makes the docs building crash when using a LatexBuilder https://github.com/pyg-team/pytorch_geometric/blob/88d7986b6d0a6de5895872270d2ff4fc95fae3b7/docs/source/conf.py#L69C1-L75C43 To reproduce build the docs with the latex ...
[ { "content": "import datetime\nimport os.path as osp\nimport sys\n\nimport pyg_sphinx_theme\n\nimport torch_geometric\n\nauthor = 'PyG Team'\nproject = 'pytorch_geometric'\nversion = torch_geometric.__version__\ncopyright = f'{datetime.datetime.now().year}, {author}'\n\nsys.path.append(osp.join(osp.dirname(pyg_...
[ { "content": "import datetime\nimport os.path as osp\nimport sys\n\nimport pyg_sphinx_theme\n\nimport torch_geometric\n\nauthor = 'PyG Team'\nproject = 'pytorch_geometric'\nversion = torch_geometric.__version__\ncopyright = f'{datetime.datetime.now().year}, {author}'\n\nsys.path.append(osp.join(osp.dirname(pyg_...
diff --git a/docs/source/conf.py b/docs/source/conf.py index 5f43bf26cad4..9feefc27e525 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -66,10 +66,12 @@ } -def setup(app): - def rst_jinja_render(app, _, source): +def rst_jinja_render(app, _, source): + if hasattr(app.builder, 'templates'): ...
ivy-llc__ivy-15057
torch.Tensor.__matmul__
[ { "content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.torch as torch_frontend\nimport ivy.functional.frontends.torch.nn.functional as torch_frontend_nn\nfrom ivy.functional.frontends.numpy.creation_routines.from_existing_data import (\n array as np_frontend_array,\n)\nfrom ivy.func_w...
[ { "content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.torch as torch_frontend\nimport ivy.functional.frontends.torch.nn.functional as torch_frontend_nn\nfrom ivy.functional.frontends.numpy.creation_routines.from_existing_data import (\n array as np_frontend_array,\n)\nfrom ivy.func_w...
diff --git a/ivy/functional/frontends/torch/tensor.py b/ivy/functional/frontends/torch/tensor.py index 59b90b91941d3..08cb0efca0d4a 100644 --- a/ivy/functional/frontends/torch/tensor.py +++ b/ivy/functional/frontends/torch/tensor.py @@ -893,6 +893,10 @@ def __radd__(self, other): def __mul__(self, other): ...
mytardis__mytardis-1087
Accessing `/help` URL results in 500 error because `user_guide` template not longer exists `user_guide` template was remove during docs restructure #977, but url wasn't removed from urls.py.
[ { "content": "from importlib import import_module\nimport logging\nfrom os import path\n\nfrom django.contrib import admin\n\nfrom django.contrib.auth.views import logout\nfrom django.conf.urls import patterns, include, url\nfrom django.conf import settings\nfrom django.contrib.staticfiles.urls import staticfil...
[ { "content": "from importlib import import_module\nimport logging\nfrom os import path\n\nfrom django.contrib import admin\n\nfrom django.contrib.auth.views import logout\nfrom django.conf.urls import patterns, include, url\nfrom django.conf import settings\nfrom django.contrib.staticfiles.urls import staticfil...
diff --git a/tardis/urls.py b/tardis/urls.py index d5aaed3e3b..dacd1be77e 100644 --- a/tardis/urls.py +++ b/tardis/urls.py @@ -68,7 +68,6 @@ url(r'^public_data/', 'public_data', name='public_data'), (r'^about/$', 'about'), (r'^stats/$', 'stats'), - (r'^help/$', 'user_guide'), url(r'^sftp_access/c...
conda-forge__conda-smithy-140
Improve lint messages on whitespace The message about the spacing for selectors isn't clear to see the problem in the number of spaces: `Selectors are suggested to take a " # []" form.` It would be clearer to have a message like: `<two spaces> # <one space> [selector]`
[ { "content": "import os\nimport re\n\nimport jinja2\nimport ruamel.yaml\n\n\nEXPECTED_SECTION_ORDER = ['package', 'source', 'build', 'requirements',\n 'test', 'app', 'about', 'extra']\n\nREQUIREMENTS_ORDER = ['build', 'run']\n\n\nclass NullUndefined(jinja2.Undefined):\n def __unicode...
[ { "content": "import os\nimport re\n\nimport jinja2\nimport ruamel.yaml\n\n\nEXPECTED_SECTION_ORDER = ['package', 'source', 'build', 'requirements',\n 'test', 'app', 'about', 'extra']\n\nREQUIREMENTS_ORDER = ['build', 'run']\n\n\nclass NullUndefined(jinja2.Undefined):\n def __unicode...
diff --git a/conda_smithy/lint_recipe.py b/conda_smithy/lint_recipe.py index dd7ce50ec..d1a3d2048 100644 --- a/conda_smithy/lint_recipe.py +++ b/conda_smithy/lint_recipe.py @@ -85,7 +85,7 @@ def lintify(meta, recipe_dir=None): bad_selectors.append(selector_line) if bad_selectors: ...
freedomofpress__securedrop-1636
Swapfile not really disabled The Ansible config tries to disable swapfile on the Application and Monitor Servers, via `swapoff -a`. This works, but only for the current boot cycle. If a machine is configured with a swapfile in `/etc/fstab`, that swapfile will be restored on a subsequent reboot. Since the machines reboo...
[ { "content": "__version__ = '0.3.11'\n", "path": "securedrop/version.py" }, { "content": "# -*- coding: utf-8 -*-\n#\n# SecureDrop documentation build configuration file, created by\n# sphinx-quickstart on Tue Oct 13 12:08:52 2015.\n#\n# This file is execfile()d with the current directory set to its...
[ { "content": "__version__ = '0.3.12'\n", "path": "securedrop/version.py" }, { "content": "# -*- coding: utf-8 -*-\n#\n# SecureDrop documentation build configuration file, created by\n# sphinx-quickstart on Tue Oct 13 12:08:52 2015.\n#\n# This file is execfile()d with the current directory set to its...
diff --git a/changelog.md b/changelog.md index 45b06a7220..33c207aaab 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,14 @@ # Changelog +## 0.3.12 + +* Disables swap on Application Server via preinst script on +`securedrop-app-code` package hook. Swap was not previously disabled +permanently, so this automat...
searxng__searxng-1934
SearXNG Firefox user-agent doesn't match real Firefox **Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG** 2022.10.29-fc9986de **How did you install SearXNG?** Script **What happened?** SearXNG will send a user-agent such as: `Mozilla/5.0 (Windows NT 10.0; ...
[ { "content": "#!/usr/bin/env python\n# lint: pylint\n# SPDX-License-Identifier: AGPL-3.0-or-later\n\n\"\"\"Fetch firefox useragent signatures\n\nOutput file: :origin:`searx/data/useragents.json` (:origin:`CI Update data ...\n<.github/workflows/data-update.yml>`).\n\n\"\"\"\n\nimport json\nimport re\nfrom os.pat...
[ { "content": "#!/usr/bin/env python\n# lint: pylint\n# SPDX-License-Identifier: AGPL-3.0-or-later\n\n\"\"\"Fetch firefox useragent signatures\n\nOutput file: :origin:`searx/data/useragents.json` (:origin:`CI Update data ...\n<.github/workflows/data-update.yml>`).\n\n\"\"\"\n\nimport json\nimport re\nfrom os.pat...
diff --git a/searx/data/useragents.json b/searx/data/useragents.json index c1559a14928..b89cb1f3f7a 100644 --- a/searx/data/useragents.json +++ b/searx/data/useragents.json @@ -1,11 +1,6 @@ { "versions": [ - "106.0.2", - "106.0.1", "106.0", - "105.0.3", - "105.0.2", - "...
aws__aws-cli-521
--private-ip-address option at run-instances does not work I think --private-ip-address option can accept private ip address to assign. but when I ran the command as follows, > aws ec2 run-instances \ > --image-id ami-b1fe9bb0 \ > --subnet-id subnet-00xxxxxx \ > --key-name keypair1 \ > --security-group-ids ...
[ { "content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#...
[ { "content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#...
diff --git a/awscli/customizations/ec2runinstances.py b/awscli/customizations/ec2runinstances.py index afebeac9a3f1..1a0e5da23016 100644 --- a/awscli/customizations/ec2runinstances.py +++ b/awscli/customizations/ec2runinstances.py @@ -100,6 +100,11 @@ def _fix_args(operation, endpoint, params, **kwargs): i...
networkx__networkx-4550
ancestors & descendant documentation appears overly restrictive I'm trying to find the out-component of a node, and it looks like I could use `nx.descendants` and just add the node to the descendants. But the documentation of `descendants` suggests the graph needs to be a DAG, rather than just directed. I don't see...
[ { "content": "\"\"\"Algorithms for directed acyclic graphs (DAGs).\n\nNote that most of these functions are only guaranteed to work for DAGs.\nIn general, these functions do not check for acyclic-ness, so it is up\nto the user to check for that.\n\"\"\"\n\nfrom collections import deque\nfrom math import gcd\nfr...
[ { "content": "\"\"\"Algorithms for directed acyclic graphs (DAGs).\n\nNote that most of these functions are only guaranteed to work for DAGs.\nIn general, these functions do not check for acyclic-ness, so it is up\nto the user to check for that.\n\"\"\"\n\nfrom collections import deque\nfrom math import gcd\nfr...
diff --git a/networkx/algorithms/dag.py b/networkx/algorithms/dag.py index 4c6e0efdf78..26a0ff4263e 100644 --- a/networkx/algorithms/dag.py +++ b/networkx/algorithms/dag.py @@ -46,7 +46,7 @@ def descendants(G, source): Parameters ---------- G : NetworkX DiGraph - A directed acyclic graph (DAG) + ...
alltheplaces__alltheplaces-3333
Spider target_au is broken During the global build at 2021-05-26-14-42-23, spider **target_au** failed with **0 features** and **16 errors**. Here's [the log](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/logs/target_au.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/target...
[ { "content": "import scrapy\n\nfrom locations.hours import OpeningHours\nfrom locations.items import GeojsonPointItem\n\n\nclass TargetAUSpider(scrapy.Spider):\n name = \"target_au\"\n item_attributes = { 'brand': \"Target\", 'brand_wikidata': \"Q7685854\" }\n allowed_domains = [\"target.com.au\"]\n ...
[ { "content": "import scrapy\n\nfrom locations.hours import OpeningHours\nfrom locations.items import GeojsonPointItem\n\n\nclass TargetAUSpider(scrapy.Spider):\n name = \"target_au\"\n item_attributes = { 'brand': \"Target\", 'brand_wikidata': \"Q7685854\" }\n allowed_domains = [\"target.com.au\"]\n ...
diff --git a/locations/spiders/target_au.py b/locations/spiders/target_au.py index f23f0044da6..b25931c4e60 100644 --- a/locations/spiders/target_au.py +++ b/locations/spiders/target_au.py @@ -26,6 +26,8 @@ def parse(self, response): yield scrapy.Request(response.urljoin(link), callback=self.parse_store, h...
jazzband__pip-tools-139
[future] download_package: TypeError: 'str' does not support the buffer interface (Python 3) I am seeing this error when trying to install Sphinx, using Python 3. This is similar to issue #87, where an `UnicodeEncodeError` was thrown there (for Python 2). ``` % cat test-sphinx.in Sphinx % pip-compile --verbose test-s...
[ { "content": "import json\nimport operator\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport re\nimport tarfile\nimport tempfile\nimport zipfile\n\ntry:\n import cPickle as pickle\nexcept ImportError:\n import pickle as pickle # noqa\n\nfrom functools import partial\nfrom six.moves.urllib....
[ { "content": "import json\nimport operator\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport re\nimport tarfile\nimport tempfile\nimport zipfile\n\ntry:\n import cPickle as pickle\nexcept ImportError:\n import pickle as pickle # noqa\n\nfrom functools import partial\nfrom six.moves.urllib....
diff --git a/piptools/package_manager.py b/piptools/package_manager.py index 4c411d8c5..4bf58f6ad 100644 --- a/piptools/package_manager.py +++ b/piptools/package_manager.py @@ -442,7 +442,8 @@ def download_package(self, link, destination): with logger.indent(): _, content = get_file_content(url, l...
encode__django-rest-framework-1518
YAMLRenderer with BrowsableAPIRenderer produces bad links Considering the following yaml output: ``` {daps: 'http://127.0.0.1:8000/api/daps/', metadaps: 'http://127.0.0.1:8000/api/metadaps/', users: 'http://127.0.0.1:8000/api/users/'} ``` While the first two URLs works fine, the last one is interpreted as follows: ...
[ { "content": "from __future__ import unicode_literals, absolute_import\nfrom django import template\nfrom django.core.urlresolvers import reverse, NoReverseMatch\nfrom django.http import QueryDict\nfrom django.utils.encoding import iri_to_uri\nfrom django.utils.html import escape\nfrom django.utils.safestring i...
[ { "content": "from __future__ import unicode_literals, absolute_import\nfrom django import template\nfrom django.core.urlresolvers import reverse, NoReverseMatch\nfrom django.http import QueryDict\nfrom django.utils.encoding import iri_to_uri\nfrom django.utils.html import escape\nfrom django.utils.safestring i...
diff --git a/rest_framework/templatetags/rest_framework.py b/rest_framework/templatetags/rest_framework.py index beb8c5b0ef..dff176d62f 100644 --- a/rest_framework/templatetags/rest_framework.py +++ b/rest_framework/templatetags/rest_framework.py @@ -180,7 +180,7 @@ def add_class(value, css_class): # Bunch of stuf...
encode__httpx-421
HTTPError should be importable frop the top-level httpx package From #365: > `HTTPError` is not available at the top level like the other exceptions and like it was in requests. This is a somewhat common exception to catch raise_for_status, so having to add another import statement for it is a bit odd if intentional...
[ { "content": "from .__version__ import __description__, __title__, __version__\nfrom .api import delete, get, head, options, patch, post, put, request\nfrom .client import AsyncClient, Client\nfrom .concurrency.asyncio import AsyncioBackend\nfrom .concurrency.base import (\n BaseBackgroundManager,\n BaseP...
[ { "content": "from .__version__ import __description__, __title__, __version__\nfrom .api import delete, get, head, options, patch, post, put, request\nfrom .client import AsyncClient, Client\nfrom .concurrency.asyncio import AsyncioBackend\nfrom .concurrency.base import (\n BaseBackgroundManager,\n BaseP...
diff --git a/httpx/__init__.py b/httpx/__init__.py index b464daa95d..6859964f8a 100644 --- a/httpx/__init__.py +++ b/httpx/__init__.py @@ -27,6 +27,7 @@ ConnectTimeout, CookieConflict, DecodingError, + HTTPError, InvalidURL, NotRedirectResponse, PoolTimeout, @@ -97,6 +98,7 @@ "Conn...
inventree__InvenTree-1047
Add IPN as a sort option when building a purchase order When I was adding items to my PO I noticed you can only search by the 'Supplier SKU' since all my parts have either the MFG# or my IPN on them it would be awesome if you could add those part numbers in the search when adding to PO. Some suppliers SKUs don't alw...
[ { "content": "\"\"\"\nCompany database model definitions\n\"\"\"\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nimport os\n\nimport math\n\nfrom django.utils.translation import gettext_lazy as _\nfrom django.core.validators import MinValueValidator\nfrom django.db import models\nfrom dja...
[ { "content": "\"\"\"\nCompany database model definitions\n\"\"\"\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nimport os\n\nimport math\n\nfrom django.utils.translation import gettext_lazy as _\nfrom django.core.validators import MinValueValidator\nfrom django.db import models\nfrom dja...
diff --git a/InvenTree/company/models.py b/InvenTree/company/models.py index 2a8d907b76eb..f1e249fd5840 100644 --- a/InvenTree/company/models.py +++ b/InvenTree/company/models.py @@ -423,12 +423,16 @@ def pretty_name(self): return str(self) def __str__(self): - s = "{supplier} ({sku})".format( - ...
deepset-ai__haystack-3161
Incorrect device specified when using HF transformer pipeline object **Describe the bug** After the integration of PR #3062 we get an error when running Haystack nodes that use HuggingFace's pipeline object. For example, the code ```python from haystack.nodes import EntityExtractor ner_node = EntityExtractor() ...
[ { "content": "from typing import Tuple, List, Optional, Union\n\nimport logging\nimport os\nimport pickle\nimport random\nimport signal\nfrom copy import deepcopy\nfrom itertools import islice\nimport numpy as np\nimport torch\nimport torch.distributed as dist\nfrom torch import multiprocessing as mp\n\nfrom ha...
[ { "content": "from typing import Tuple, List, Optional, Union\n\nimport logging\nimport os\nimport pickle\nimport random\nimport signal\nfrom copy import deepcopy\nfrom itertools import islice\nimport numpy as np\nimport torch\nimport torch.distributed as dist\nfrom torch import multiprocessing as mp\n\nfrom ha...
diff --git a/haystack/modeling/utils.py b/haystack/modeling/utils.py index 35d17d08a4..8afb09bef2 100644 --- a/haystack/modeling/utils.py +++ b/haystack/modeling/utils.py @@ -85,7 +85,7 @@ def initialize_device_settings( devices_to_use = [torch.device(device) for device in range(torch.cuda.device_count...
rlworkgroup__garage-1558
Backport #1554
[ { "content": "import atexit\nfrom collections import namedtuple\nfrom enum import Enum\nimport platform\nfrom queue import Queue\nfrom threading import Thread\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom garage.sampler.utils import rollout as default_rollout\n\n__all__ = ['Plotter']\n\n\nclass Op(Enum...
[ { "content": "import atexit\nfrom collections import namedtuple\nfrom enum import Enum\nimport platform\nfrom queue import Queue\nfrom threading import Thread\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom garage.sampler.utils import rollout as default_rollout\n\n__all__ = ['Plotter']\n\n\nclass Op(Enum...
diff --git a/src/garage/tf/plotter/plotter.py b/src/garage/tf/plotter/plotter.py index e94bab6eae..1c3774250d 100644 --- a/src/garage/tf/plotter/plotter.py +++ b/src/garage/tf/plotter/plotter.py @@ -43,6 +43,7 @@ def __init__(self, ) if graph is None else graph with self.sess.as_default(), self.graph....
lhotse-speech__lhotse-759
"'SupervisionSet' object has no attribute 'lazy'" When running `lhotse cut simple` I get the above error, which comes from [this line](https://github.com/lhotse-speech/lhotse/blob/f31aa5464c368d141a1ae57c1ba0aa5fe554c9ce/lhotse/bin/modes/cut.py#L56): ``` if all(m is None or m.lazy for m in (supervision_set, feature_s...
[ { "content": "from pathlib import Path\nfrom typing import List, Optional\n\nimport click\n\nfrom lhotse.bin.modes.cli_base import cli\nfrom lhotse.cut import CutSet, append_cuts, mix_cuts\nfrom lhotse.serialization import load_manifest_lazy_or_eager\nfrom lhotse.utils import Pathlike\n\n\n@cli.group()\ndef cut...
[ { "content": "from pathlib import Path\nfrom typing import List, Optional\n\nimport click\n\nfrom lhotse.bin.modes.cli_base import cli\nfrom lhotse.cut import CutSet, append_cuts, mix_cuts\nfrom lhotse.serialization import load_manifest_lazy_or_eager\nfrom lhotse.utils import Pathlike\n\n\n@cli.group()\ndef cut...
diff --git a/lhotse/bin/modes/cut.py b/lhotse/bin/modes/cut.py index 68d4b10dc..e132fa5ac 100644 --- a/lhotse/bin/modes/cut.py +++ b/lhotse/bin/modes/cut.py @@ -53,7 +53,9 @@ def simple( for p in (supervision_manifest, feature_manifest, recording_manifest) ] - if all(m is None or m.lazy for m in (sup...
conda__conda-5357
latest 4.3.x (4.3.18-37-g79f86d4c) not picking up conda-build subcommands From conda-build's test suite: ``` ________________________________ test_skeleton_pypi ________________________________ Traceback (most recent call last): File "/home/dev/code/conda-build/tests/test_published_examples.py", line 15, in tes...
[ { "content": "# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\nfrom __future__ import print_function, division, absolute_import,...
[ { "content": "# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\nfrom __future__ import print_function, division, absolute_import,...
diff --git a/conda/cli/conda_argparse.py b/conda/cli/conda_argparse.py index 99651c246b7..195f064eb7a 100644 --- a/conda/cli/conda_argparse.py +++ b/conda/cli/conda_argparse.py @@ -121,7 +121,7 @@ def error(self, message): else: argument = None if argument and argument.dest ==...
arviz-devs__arviz-644
add api docs for plot_energy https://arviz-devs.github.io/arviz/generated/arviz.plot_energy.html#arviz.plot_energy See Posterior Docs for example https://arviz-devs.github.io/arviz/generated/arviz.plot_posterior.html#arviz.plot_posterior
[ { "content": "\"\"\"Plot energy transition distribution in HMC inference.\"\"\"\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom ..data import convert_to_dataset\nfrom ..stats import bfmi as e_bfmi\nfrom .kdeplot import plot_kde\nfrom .plot_utils import _scale_fig_size\n\n\ndef plot_energy(\n dat...
[ { "content": "\"\"\"Plot energy transition distribution in HMC inference.\"\"\"\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom ..data import convert_to_dataset\nfrom ..stats import bfmi as e_bfmi\nfrom .kdeplot import plot_kde\nfrom .plot_utils import _scale_fig_size\n\n\ndef plot_energy(\n dat...
diff --git a/arviz/plots/energyplot.py b/arviz/plots/energyplot.py index b3ffe43ee7..9d305ffd0d 100644 --- a/arviz/plots/energyplot.py +++ b/arviz/plots/energyplot.py @@ -61,6 +61,25 @@ def plot_energy( Returns ------- ax : matplotlib axes + + Examples + -------- + Plot a default energy plot + +...
freedomofpress__securedrop-6529
Ruby sass gem used at build time has reached end-of-life Per https://github.com/sass/ruby-sass (which is archived) and https://sass-lang.com/ruby-sass, this gem, which is [used at package build time](https://github.com/freedomofpress/securedrop/blob/develop/install_files/ansible-base/roles/build-securedrop-app-code-deb...
[ { "content": "import atexit\nimport os\nimport select\nimport signal\nimport subprocess\nimport sys\n\n__all__ = [\"run\"]\n\nfrom typing import Any, Callable, List, TextIO\n\n\ndef colorize(s: str, color: str, bold: bool = False) -> str:\n \"\"\"\n Returns the string s surrounded by shell metacharacters ...
[ { "content": "import atexit\nimport os\nimport select\nimport signal\nimport subprocess\nimport sys\n\n__all__ = [\"run\"]\n\nfrom typing import Any, Callable, List, TextIO\n\n\ndef colorize(s: str, color: str, bold: bool = False) -> str:\n \"\"\"\n Returns the string s surrounded by shell metacharacters ...
diff --git a/devops/gce-nested/gce-runner.sh b/devops/gce-nested/gce-runner.sh index 955e937296..cd267c7a3c 100755 --- a/devops/gce-nested/gce-runner.sh +++ b/devops/gce-nested/gce-runner.sh @@ -44,7 +44,6 @@ function copy_securedrop_repo() { --exclude '*.venv' \ --exclude .python3 \ --exclude .myp...
pytorch__ignite-1113
Replace conda install in github CI by actions/setup-python@v2 ## 🚀 Feature In order to accelerate env and dependencies installation we can opt to replace: https://github.com/pytorch/ignite/blob/cc78b3bbd764da9ae7dee0df21676b2b8a50fba8/.github/workflows/unittests.yml#L19-L25 by https://github.com/pytorch/ignite/...
[ { "content": "import numbers\nimport tempfile\nimport warnings\nfrom typing import Mapping, Optional\n\nimport torch\n\nimport ignite\nimport ignite.distributed as idist\nfrom ignite.contrib.handlers.base_logger import (\n BaseLogger,\n BaseOptimizerParamsHandler,\n BaseOutputHandler,\n BaseWeightsS...
[ { "content": "import numbers\nimport tempfile\nimport warnings\nfrom typing import Mapping, Optional\n\nimport torch\n\nimport ignite\nimport ignite.distributed as idist\nfrom ignite.contrib.handlers.base_logger import (\n BaseLogger,\n BaseOptimizerParamsHandler,\n BaseOutputHandler,\n BaseWeightsS...
diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index b92154fd4345..4f7e337f48ad 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -2,54 +2,62 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} ...
mitmproxy__mitmproxy-2556
xss_scanner.py issue hi in the function test_query_injection the body is converted to lower case (line 153) but in the get_SQLi_data function it is compared with upper case words (line 187) that results in no match ##### System information
[ { "content": "\"\"\"\n\n __ __ _____ _____ _____\n \\ \\ / // ____/ ____| / ____|\n \\ V /| (___| (___ | (___ ___ __ _ _ __ _ __ ___ _ __\n > < \\___ \\\\___ \\ \\___ \\ / __/ _` | '_ \\| '_ \\ / _ \\ '__|\n / . \\ ____) |___) | ____) | (_| (_| | | | | | | | __/ |\n /_/ \\_\\_____/___...
[ { "content": "\"\"\"\n\n __ __ _____ _____ _____\n \\ \\ / // ____/ ____| / ____|\n \\ V /| (___| (___ | (___ ___ __ _ _ __ _ __ ___ _ __\n > < \\___ \\\\___ \\ \\___ \\ / __/ _` | '_ \\| '_ \\ / _ \\ '__|\n / . \\ ____) |___) | ____) | (_| (_| | | | | | | | __/ |\n /_/ \\_\\_____/___...
diff --git a/examples/complex/xss_scanner.py b/examples/complex/xss_scanner.py index a0572d5df0..d954adf36b 100755 --- a/examples/complex/xss_scanner.py +++ b/examples/complex/xss_scanner.py @@ -198,7 +198,7 @@ def get_SQLi_data(new_body: str, original_body: str, request_URL: str, injection } for dbms, regexe...
matrix-org__synapse-15961
Build packages for Debian Trixie Please can we publish packages to the apt repository for [Debian Trixie (13)](https://wiki.debian.org/DebianTrixie) which is the current testing release at the time of writing. It became the current testing release on 2023-06-10. I run debian testing on the server I run synapse on an...
[ { "content": "#!/usr/bin/env python3\n\n# Build the Debian packages using Docker images.\n#\n# This script builds the Docker images and then executes them sequentially, each\n# one building a Debian package for the targeted operating system. It is\n# designed to be a \"single command\" to produce all the images...
[ { "content": "#!/usr/bin/env python3\n\n# Build the Debian packages using Docker images.\n#\n# This script builds the Docker images and then executes them sequentially, each\n# one building a Debian package for the targeted operating system. It is\n# designed to be a \"single command\" to produce all the images...
diff --git a/changelog.d/15961.misc b/changelog.d/15961.misc new file mode 100644 index 000000000000..035a330446d3 --- /dev/null +++ b/changelog.d/15961.misc @@ -0,0 +1 @@ +Build packages for Debian Trixie. diff --git a/scripts-dev/build_debian_packages.py b/scripts-dev/build_debian_packages.py index 1954835474fe..bb89...
sublimelsp__LSP-660
when cancelling the symbols panel, the last symbol is selected https://github.com/tomv564/LSP/blob/be904c56fddf35f724486de405a168786ed4ffeb/plugin/symbols.py#L82-L92 ```diff def on_symbol_selected(self, symbol_index): + if symbol_index == -1: + return selected_symbol = self.symbols[symbol_index] ...
[ { "content": "from .core.logging import debug\nfrom .core.protocol import Request, Range\nfrom .core.protocol import SymbolKind\nfrom .core.registry import client_for_view, LspTextCommand\nfrom .core.url import filename_to_uri\nfrom .core.views import range_to_region\n\ntry:\n from typing import List, Option...
[ { "content": "from .core.logging import debug\nfrom .core.protocol import Request, Range\nfrom .core.protocol import SymbolKind\nfrom .core.registry import client_for_view, LspTextCommand\nfrom .core.url import filename_to_uri\nfrom .core.views import range_to_region\n\ntry:\n from typing import List, Option...
diff --git a/plugin/symbols.py b/plugin/symbols.py index 458e587ec..2c232898c 100644 --- a/plugin/symbols.py +++ b/plugin/symbols.py @@ -80,6 +80,8 @@ def handle_response(self, response: 'Optional[List]') -> None: self.view.window().show_quick_panel(symbols, self.on_symbol_selected) def on_symbol_select...
django-import-export__django-import-export-1407
Issue with example get_queryset for a widget `import_data_inner` passes kwargs through `self.import_row()` which make their way to widgets via a `clean()` which does; ``` value = self.widget.clean(value, row=data, **kwargs) ``` This works well for the default `get_queryset()` of the `ForeignKeyWidget`, but the ...
[ { "content": "import json\nfrom datetime import date, datetime, time\nfrom decimal import Decimal\n\nimport django\nfrom django.conf import settings\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.utils import timezone\nfrom django.utils.dateparse import parse_duration\nfrom django.utils.enc...
[ { "content": "import json\nfrom datetime import date, datetime, time\nfrom decimal import Decimal\n\nimport django\nfrom django.conf import settings\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.utils import timezone\nfrom django.utils.dateparse import parse_duration\nfrom django.utils.enc...
diff --git a/AUTHORS b/AUTHORS index f07027867..6ed61e0d2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -122,3 +122,4 @@ The following is a list of much appreciated contributors: * josx (José Luis Di Biase) * Jan Rydzewski * 2ykwang (Yeongkwang Yang) +* Mark Walker diff --git a/docs/changelog.rst b/docs/changelog.rst index ...
Kinto__kinto-1661
OpenID payload cache uses the wrong cache key The `cache_key` becomes the same for every access token due to this bug: https://github.com/Kinto/kinto/blob/e1e0d6be0024418fd100210901f9d2ca06344fe1/kinto/plugins/openid/__init__.py#L51 No matter what the `hmac_tokens` variable is the `cache_key` always becomes `'openid:v...
[ { "content": "import re\n\nimport requests\nfrom pyramid import authentication as base_auth\nfrom pyramid.interfaces import IAuthenticationPolicy\nfrom zope.interface import implementer\n\nfrom kinto.core import logger\nfrom kinto.core import utils as core_utils\nfrom kinto.core.openapi import OpenAPI\n\nfrom ....
[ { "content": "import re\n\nimport requests\nfrom pyramid import authentication as base_auth\nfrom pyramid.interfaces import IAuthenticationPolicy\nfrom zope.interface import implementer\n\nfrom kinto.core import logger\nfrom kinto.core import utils as core_utils\nfrom kinto.core.openapi import OpenAPI\n\nfrom ....
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3e0d33448..2b1f9670d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -12,6 +12,10 @@ This document describes changes between each past release. - Kinto Admin plugin now supports OpenID Connect - Limit network requests to current domain in Kinto Admin using `Content-S...
ansible__ansible-lint-1684
Odd output rendered in quiet mode ##### Summary When running `ansible-lint` in quiet mode, the message "You can skip specific rules or tags by adding them to your configuration file:" without any details. ##### Issue Type - Bug Report ##### Ansible and Ansible Lint details ```console (paste below) $ ansible...
[ { "content": "#!/usr/bin/env python\n# Copyright (c) 2013-2014 Will Thames <will@thames.id.au>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including w...
[ { "content": "#!/usr/bin/env python\n# Copyright (c) 2013-2014 Will Thames <will@thames.id.au>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including w...
diff --git a/src/ansiblelint/__main__.py b/src/ansiblelint/__main__.py index 17fe82f11d..1e356e1214 100755 --- a/src/ansiblelint/__main__.py +++ b/src/ansiblelint/__main__.py @@ -151,7 +151,7 @@ def report_outcome( # noqa: C901 if "experimental" in match.rule.tags: entries.append(" - experimenta...
cal-itp__benefits-661
Engineering: Back-end - Combine logic for Agency Index and Getting Started page _As a MST Senior Rider, when I go to benefits.calitp.org, I should see the new Introduction page design and content._ - Change the app logic to the following - 1. When there is only 1 transit agency, go directly to the agency index page...
[ { "content": "\"\"\"\nThe core application: view definition for the root of the webapp.\n\"\"\"\nfrom django.http import HttpResponseBadRequest, HttpResponseNotFound, HttpResponseServerError\nfrom django.shortcuts import redirect\nfrom django.template import loader\nfrom django.template.response import Template...
[ { "content": "\"\"\"\nThe core application: view definition for the root of the webapp.\n\"\"\"\nfrom django.http import HttpResponseBadRequest, HttpResponseNotFound, HttpResponseServerError\nfrom django.shortcuts import redirect\nfrom django.template import loader\nfrom django.template.response import Template...
diff --git a/.vscode/settings.json b/.vscode/settings.json index 94c25bf635..9c0ea57f4c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -29,7 +29,7 @@ "editor.formatOnSave": true }, "python.testing.pytestArgs": [ - "tests/pytest" + "tests/pytest", "--import-mode=importlib" ], "p...
carpentries__amy-1333
add ORCID to API persons endpoint could you please add the ORCID field to the data coming from the `persons` endpoint in the API? Thanks!
[ { "content": "from rest_framework import serializers\n\nfrom workshops.models import (\n Badge,\n Airport,\n Person,\n Event,\n TodoItem,\n Tag,\n Organization,\n Task,\n Award,\n TrainingRequest,\n TrainingRequirement,\n TrainingProgress,\n)\n\n\nclass AwardPersonSerializer(...
[ { "content": "from rest_framework import serializers\n\nfrom workshops.models import (\n Badge,\n Airport,\n Person,\n Event,\n TodoItem,\n Tag,\n Organization,\n Task,\n Award,\n TrainingRequest,\n TrainingRequirement,\n TrainingProgress,\n)\n\n\nclass AwardPersonSerializer(...
diff --git a/api/serializers.py b/api/serializers.py index 5f9061dd4..9dd3c3e6b 100644 --- a/api/serializers.py +++ b/api/serializers.py @@ -212,8 +212,8 @@ class Meta: model = Person fields = ( 'personal', 'middle', 'family', 'email', 'gender', 'may_contact', - 'publish_profil...
getnikola__nikola-3211
Cannot use "ignored_assets" properly on Windows with custom themes <!-- Before creating an issue: * make sure you are using an up-to-date version of Nikola * search for existing issues that might be related Make sure to: * provide information about your environment (below) * include all the output you get, and ...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2019 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2019 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi...
diff --git a/CHANGES.txt b/CHANGES.txt index 162dc3f2f6..b1679764b3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,8 @@ New in master Bugfixes -------- +* Correctly handle separators in the relative path given to + "ignored_assets" key in theme meta files (Issue #3210) * Fix error when ``nikola new_post`` ...
praw-dev__praw-1327
PRAW installed by pip is missing the `images` directory and its contents ## Issue Description PRAW's video submit method uses a placeholder image as a video thumbnail when the user doesn't provide a thumbnail. Here's the relevant code: https://github.com/praw-dev/praw/blob/54f8b3f998008b81988aac057d33fe38d5ac7739...
[ { "content": "\"\"\"praw setup.py\"\"\"\n\nimport re\nfrom codecs import open\nfrom os import path\nfrom setuptools import find_packages, setup\n\n\nPACKAGE_NAME = \"praw\"\nHERE = path.abspath(path.dirname(__file__))\nwith open(path.join(HERE, \"README.rst\"), encoding=\"utf-8\") as fp:\n README = fp.read()...
[ { "content": "\"\"\"praw setup.py\"\"\"\n\nimport re\nfrom codecs import open\nfrom os import path\nfrom setuptools import find_packages, setup\n\n\nPACKAGE_NAME = \"praw\"\nHERE = path.abspath(path.dirname(__file__))\nwith open(path.join(HERE, \"README.rst\"), encoding=\"utf-8\") as fp:\n README = fp.read()...
diff --git a/MANIFEST.in b/MANIFEST.in index 0fe476642..2d0ab5198 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,6 @@ include CHANGES.rst LICENSE.txt README.rst include praw/praw.ini +include "praw/images/PRAW logo.png" include docs/Makefile recursive-include docs *.png *.py *.rst recursive-include tests *....
biopython__biopython-3798
Parsing Exonerate text output with SearchIO recovers incorrect hit ranges when frameshifts are present ### Setup I am reporting a problem with Biopython version, Python version, and operating system as follows: ``` Python 3.8.3 (default, May 19 2020, 13:54:14) CPython macOS-10.15.7-x86_64-i386-64bit BioPyt...
[ { "content": "# Copyright 2012 by Wibowo Arindrarto. All rights reserved.\n# This file is part of the Biopython distribution and governed by your\n# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n# Please see the LICENSE file that should have been included as part of this\n# pa...
[ { "content": "# Copyright 2012 by Wibowo Arindrarto. All rights reserved.\n# This file is part of the Biopython distribution and governed by your\n# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n# Please see the LICENSE file that should have been included as part of this\n# pa...
diff --git a/Bio/SearchIO/ExonerateIO/_base.py b/Bio/SearchIO/ExonerateIO/_base.py index 4688f4e556c..6dac483dc09 100644 --- a/Bio/SearchIO/ExonerateIO/_base.py +++ b/Bio/SearchIO/ExonerateIO/_base.py @@ -182,7 +182,7 @@ def _split_fragment(frag): qstep = 1 if frag.query_strand >= 0 else -1 hstep = 1 if frag....
cloud-custodian__cloud-custodian-3789
DynamoDB auto-tag error : takes 1 positional argument but 2 were given When I apply auto-tag for DynamoDB with the policy like below ``` - name: owner-autotagging-on_dynamodb_creation description: | Autotags any newly created DynamoDB table resource: dynamodb-table mode: type: cloudtrail ...
[ { "content": "# Copyright 2016-2019 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi...
[ { "content": "# Copyright 2016-2019 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi...
diff --git a/c7n/resources/dynamodb.py b/c7n/resources/dynamodb.py index ba1ef6af9d9..93c29777cb8 100644 --- a/c7n/resources/dynamodb.py +++ b/c7n/resources/dynamodb.py @@ -90,7 +90,7 @@ def get_resources(self, ids, *args, **kw): 'CreateTable' in self.manager.data['mode']['events']): waite...
Mailu__Mailu-1084
Setup error for incorrect docker network subnet When entering an incorrect docker subnet (e.g. 172.168.0.1/16) the setup throws a 500 error -- without any reasons being given. If you run locally, the error is clearly reported in an ungraceful way.
[ { "content": "import flask\nimport flask_bootstrap\nimport redis\nimport json\nimport os\nimport jinja2\nimport uuid\nimport string\nimport random\nimport ipaddress\nimport hashlib\nimport time\n\n\nversion = os.getenv(\"this_version\", \"master\")\nstatic_url_path = \"/\" + version + \"/static\"\napp = flask.F...
[ { "content": "import flask\nimport flask_bootstrap\nimport redis\nimport json\nimport os\nimport jinja2\nimport uuid\nimport string\nimport random\nimport ipaddress\nimport hashlib\nimport time\n\n\nversion = os.getenv(\"this_version\", \"master\")\nstatic_url_path = \"/\" + version + \"/static\"\napp = flask.F...
diff --git a/setup/server.py b/setup/server.py index 0bb25a513..b2ca21753 100644 --- a/setup/server.py +++ b/setup/server.py @@ -91,7 +91,7 @@ def submit(): data = flask.request.form.copy() data['uid'] = str(uuid.uuid4()) try: - data['dns'] = str(ipaddress.IPv4Network(data['subnet'...
zigpy__zha-device-handlers-680
[Device Support Request] LIVARNO LUX/LIDL Led Panel 60x60 (Tuya TS0502A) [LIDL Service website](https://www.lidl-service.com/cps/rde/xchg/SID-3771F4F2-8A18D468/lsp/hs.xsl/product.html?id=5027306530&title=Smart+LED+Light+Panel&count=1) **Describe the solution you'd like** - [x] power control - [x] brightness contro...
[ { "content": "\"\"\"Quirk for LIDL CCT bulb.\"\"\"\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomCluster, CustomDevice\nfrom zigpy.zcl.clusters.general import (\n Basic,\n GreenPowerProxy,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n Scenes,\n Time,\n)\nfr...
[ { "content": "\"\"\"Quirk for LIDL CCT bulb.\"\"\"\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomCluster, CustomDevice\nfrom zigpy.zcl.clusters.general import (\n Basic,\n GreenPowerProxy,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n Scenes,\n Time,\n)\nfr...
diff --git a/zhaquirks/lidl/cct.py b/zhaquirks/lidl/cct.py index 188831f611..e38b781195 100644 --- a/zhaquirks/lidl/cct.py +++ b/zhaquirks/lidl/cct.py @@ -37,7 +37,12 @@ class CCTLight(CustomDevice): """Lidl CCT Lighting device.""" signature = { - MODELS_INFO: [("_TZ3000_49qchf10", "TS0502A"), ("_TZ3...
facebookresearch__xformers-180
[feat] Make the batch dimension broadcastable # 🚀 Feature Support different key/query/value batch sizes, if 1 or the same value ## Motivation (popped up when working on [salina](https://github.com/facebookresearch/salina)) PyTorch MHA handles key/query/value with 1 to B batch sizes, will broadcast if in need, We ...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\n\nfrom dataclasses import asdict, dataclass\nfrom typing import Optional\n\nimport torch\nimpo...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\n\nfrom dataclasses import asdict, dataclass\nfrom typing import Optional\n\nimport torch\nimpo...
diff --git a/tests/test_attentions.py b/tests/test_attentions.py index ffa8bee783..8172cf5e95 100644 --- a/tests/test_attentions.py +++ b/tests/test_attentions.py @@ -3,6 +3,8 @@ # This source code is licensed under the BSD license found in the # LICENSE file in the root directory of this source tree. +from typing ...
ytdl-org__youtube-dl-4389
NBA URLs FAIL without INDEX.HTML the NBA extractor does not work if URL does not explicitly end with index.html (which appears to be the default) URL: http://www.nba.com/video/games/hornets/2014/12/05/0021400276-nyk-cha-play5.nba/ C:>youtube-dl -v http://www.nba.com/video/games/hornets/2014/12/05/0021400276-n yk-cha...
[ { "content": "from __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n remove_end,\n parse_duration,\n)\n\n\nclass NBAIE(InfoExtractor):\n _VALID_URL = r'https?://(?:watch\\.|www\\.)?nba\\.com/(?:nba/)?video(?P<id>/[^?]*?)(?:/index\\.html)?(?:\\...
[ { "content": "from __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n remove_end,\n parse_duration,\n)\n\n\nclass NBAIE(InfoExtractor):\n _VALID_URL = r'https?://(?:watch\\.|www\\.)?nba\\.com/(?:nba/)?video(?P<id>/[^?]*?)/?(?:/index\\.html)?(?:...
diff --git a/youtube_dl/extractor/nba.py b/youtube_dl/extractor/nba.py index f69fe0925ee..842ea66a183 100644 --- a/youtube_dl/extractor/nba.py +++ b/youtube_dl/extractor/nba.py @@ -10,7 +10,7 @@ class NBAIE(InfoExtractor): - _VALID_URL = r'https?://(?:watch\.|www\.)?nba\.com/(?:nba/)?video(?P<id>/[^?]*?)(?:/ind...
huggingface__transformers-8621
`DataCollatorForLanguageModeling` modifies `input_ids` via `labels` variable The cloning step was removed in https://github.com/huggingface/transformers/pull/8308 at https://github.com/huggingface/transformers/pull/8308/files#diff-046566f2b40a246c7d533457cd7f6f07830516da845b904086f36b3cfe0d5965L201 so now the code that...
[ { "content": "import random\nimport warnings\nfrom dataclasses import dataclass\nfrom typing import Any, Callable, Dict, List, NewType, Optional, Tuple, Union\n\nimport torch\nfrom torch.nn.utils.rnn import pad_sequence\n\nfrom ..tokenization_utils_base import BatchEncoding, PaddingStrategy, PreTrainedTokenizer...
[ { "content": "import random\nimport warnings\nfrom dataclasses import dataclass\nfrom typing import Any, Callable, Dict, List, NewType, Optional, Tuple, Union\n\nimport torch\nfrom torch.nn.utils.rnn import pad_sequence\n\nfrom ..tokenization_utils_base import BatchEncoding, PaddingStrategy, PreTrainedTokenizer...
diff --git a/src/transformers/data/data_collator.py b/src/transformers/data/data_collator.py index 6d8234f9c3fd..6ad0a6ccd210 100644 --- a/src/transformers/data/data_collator.py +++ b/src/transformers/data/data_collator.py @@ -261,7 +261,7 @@ def __call__( batch["input_ids"], special_tokens_mask=specia...
frappe__frappe-3268
AttributeError: 'SystemSettings' object has no attribute 'enable_password_policy' during `bench restore` Hello, I ran `bench update` then tried to restore a backup and this error starts popping up. It seems it might have come in from 7ccbbce5720bf16d5d3cc94c627e22ef0541e53b
[ { "content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\"\"\"\nEvents:\n\talways\n\tdaily\n\tmonthly\n\tweekly\n\"\"\"\n\nfrom __future__ import unicode_literals, print_function\n\nimport frappe\nimport json\nimport schedule\nimport time\nimport MySQL...
[ { "content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\"\"\"\nEvents:\n\talways\n\tdaily\n\tmonthly\n\tweekly\n\"\"\"\n\nfrom __future__ import unicode_literals, print_function\n\nimport frappe\nimport json\nimport schedule\nimport time\nimport MySQL...
diff --git a/frappe/utils/scheduler.py b/frappe/utils/scheduler.py index afd56a993319..211bef028c4f 100755 --- a/frappe/utils/scheduler.py +++ b/frappe/utils/scheduler.py @@ -207,11 +207,7 @@ def is_scheduler_disabled(): return not frappe.utils.cint(frappe.db.get_single_value("System Settings", "enable_scheduler")) ...
rdmorganiser__rdmo-564
Nested projects: cancel button actually imports data ### Description / Beschreibung In nested projects if someone opens the import from parent project and then decides not to import anything by clicking <kbd>Cancel</kbd> the data will be imported anyway. ### Expected behaviour / Erwartetes Verhalten Expected b...
[ { "content": "from collections import defaultdict\nfrom pathlib import Path\n\nfrom django.contrib.sites.shortcuts import get_current_site\nfrom django.core.exceptions import ValidationError\nfrom django.http import HttpResponseRedirect, Http404, HttpResponse\nfrom django.shortcuts import get_object_or_404, ren...
[ { "content": "from collections import defaultdict\nfrom pathlib import Path\n\nfrom django.contrib.sites.shortcuts import get_current_site\nfrom django.core.exceptions import ValidationError\nfrom django.http import HttpResponseRedirect, Http404, HttpResponse\nfrom django.shortcuts import get_object_or_404, ren...
diff --git a/rdmo/projects/mixins.py b/rdmo/projects/mixins.py index 1cec275088..c506de839f 100644 --- a/rdmo/projects/mixins.py +++ b/rdmo/projects/mixins.py @@ -204,6 +204,12 @@ def import_file(self): def import_project(self): current_project = self.object + if 'cancel' in self.request.POST: + ...
akvo__akvo-rsr-4639
Indicator update user should not change when update rejected or approved
[ { "content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\nimport jso...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\nimport jso...
diff --git a/akvo/rest/views/indicator_period_data.py b/akvo/rest/views/indicator_period_data.py index e90fbf57a3..c0a8e8f11c 100644 --- a/akvo/rest/views/indicator_period_data.py +++ b/akvo/rest/views/indicator_period_data.py @@ -107,7 +107,9 @@ def perform_update(self, serializer): for dsg in seriali...
pallets__werkzeug-2305
mypy deduced type on Request.user_agent_class is Type[_UserAgent] I ran into this after updating to v2.0.2 of flask and werkzeug. Since `UserAgent` is going away, I replaced it with `ua_parser` (example will follow). However, setting `user_agent_class = MyUserAgent` triggers a typing error as the type of `Request.u...
[ { "content": "import typing as t\nfrom datetime import datetime\n\nfrom .._internal import _to_str\nfrom ..datastructures import Accept\nfrom ..datastructures import Authorization\nfrom ..datastructures import CharsetAccept\nfrom ..datastructures import ETags\nfrom ..datastructures import Headers\nfrom ..datast...
[ { "content": "import typing as t\nfrom datetime import datetime\n\nfrom .._internal import _to_str\nfrom ..datastructures import Accept\nfrom ..datastructures import Authorization\nfrom ..datastructures import CharsetAccept\nfrom ..datastructures import ETags\nfrom ..datastructures import Headers\nfrom ..datast...
diff --git a/CHANGES.rst b/CHANGES.rst index 6f3a9d78b..fd0f71635 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,7 @@ Unreleased ``HTTPException.get_response``, and ``Map.bind_to_environ`` accepts ``Request`` in addition to ``WSGIEnvironment`` for the first parameter. :pr:`2290` +- Fix type an...
kornia__kornia-2897
RANSAC.max_samples_by_conf returns negative numbers ### Describe the bug This code fails ` from kornia.geometry import RANSAC x = RANSAC.max_samples_by_conf(n_inl=100, num_tc=1000, sample_size=7, conf=0.99) assert x > 0.0 ` ### Reproduction steps ```bash from kornia.geometry import RANSAC x = RANSAC.ma...
[ { "content": "\"\"\"Module containing RANSAC modules.\"\"\"\n\nimport math\nfrom functools import partial\nfrom typing import Callable, Optional, Tuple\n\nimport torch\n\nfrom kornia.core import Device, Module, Tensor, zeros\nfrom kornia.core.check import KORNIA_CHECK_SHAPE\nfrom kornia.geometry import (\n f...
[ { "content": "\"\"\"Module containing RANSAC modules.\"\"\"\n\nimport math\nfrom functools import partial\nfrom typing import Callable, Optional, Tuple\n\nimport torch\n\nfrom kornia.core import Device, Module, Tensor, zeros\nfrom kornia.core.check import KORNIA_CHECK_SHAPE\nfrom kornia.geometry import (\n f...
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4a4e9b24ef..8af0a1e88d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,12 +9,12 @@ Everyone is welcome to get involved with the project. There are different ways t 1. using the GitHub discussion at Kornia repo: [GH Discussions](https://github.com/korn...
pyinstaller__pyinstaller-5259
Pyinstaller --distpath broken for Mac.Not making the .app file at -distpath. <!-- Welcome to the PyInstaller issue tracker! Before creating an issue, please heed the following: 1. This tracker should only be used to report bugs and request features / enhancements to PyInstaller - For questions and general supp...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2020, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2020, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
diff --git a/PyInstaller/building/osx.py b/PyInstaller/building/osx.py index a94f7f4ca1..0a9eacca5e 100644 --- a/PyInstaller/building/osx.py +++ b/PyInstaller/building/osx.py @@ -89,11 +89,6 @@ def __init__(self, *args, **kws): for inm, name, typ in self.toc: if typ == "EXECUTABLE": ...
spyder-ide__spyder-3062
Different output for internal and external console on Windows ## Description of your problem Depending on if i run my code, which uses subprocess to execute Windows commandline code, in the internal console ("Execute in new dedicated Python console") or the external console ("Execute in an external System terminal")...
[ { "content": "#\r\n# Copyright (c) 2009- The Spyder Development Team)\r\n# Licensed under the terms of the MIT License)\r\n# (see spyderlib/__init__.py for details)\r\n#\r\n# IMPORTANT NOTE: Don't add a coding line here! It's not necessary for\r\n# site files\r\n#\r\n# Spyder's ExternalPythonShell sitecustomize...
[ { "content": "#\r\n# Copyright (c) 2009- The Spyder Development Team)\r\n# Licensed under the terms of the MIT License)\r\n# (see spyderlib/__init__.py for details)\r\n#\r\n# IMPORTANT NOTE: Don't add a coding line here! It's not necessary for\r\n# site files\r\n#\r\n# Spyder's ExternalPythonShell sitecustomize...
diff --git a/spyderlib/widgets/externalshell/sitecustomize.py b/spyderlib/widgets/externalshell/sitecustomize.py index e381ab3d77b..09b4c32fda4 100644 --- a/spyderlib/widgets/externalshell/sitecustomize.py +++ b/spyderlib/widgets/externalshell/sitecustomize.py @@ -150,7 +150,7 @@ def write(self, text): # Setting conso...
ESMCI__cime-4504
question on case_submit.py (Thomas Toniazzo) I think that the instruction unlock_file(os.path.basename(env_batch.filename),caseroot=caseroot) in line 97 might be wrong, since it seems to delete LockFiles/env_batch.xml just before running check_lockfile; which throws an error and thus forces env_submit.py to r...
[ { "content": "#!/usr/bin/env python3\n\n\"\"\"\ncase.submit - Submit a cesm workflow to the queueing system or run it\nif there is no queueing system. A cesm workflow may include multiple\njobs.\nsubmit, check_case and check_da_settings are members of class Case in file case.py\n\"\"\"\nimport configparser\nfr...
[ { "content": "#!/usr/bin/env python3\n\n\"\"\"\ncase.submit - Submit a cesm workflow to the queueing system or run it\nif there is no queueing system. A cesm workflow may include multiple\njobs.\nsubmit, check_case and check_da_settings are members of class Case in file case.py\n\"\"\"\nimport configparser\nfr...
diff --git a/CIME/case/case_submit.py b/CIME/case/case_submit.py index 71484c9dea0..4ddb26e3056 100644 --- a/CIME/case/case_submit.py +++ b/CIME/case/case_submit.py @@ -94,8 +94,10 @@ def _submit( batch_system = "none" else: batch_system = env_batch.get_batch_system_type() - unlock_file(os.pat...
pypi__warehouse-1020
Search results seem to need some relevancy tweaking Searches seem to have some relevancy issues. For example: ![2016-03-17 at 11 13 am 1](https://cloud.githubusercontent.com/assets/21148/13856330/e99facd8-ec31-11e5-81a8-ff1033f1df67.png) Or: https://warehouse.python.org/search/?q=django&page=1 - Django itself doesn't...
[ { "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/test_views.py b/tests/unit/test_views.py index f01d020c7a7e..fa07f2033291 100644 --- a/tests/unit/test_views.py +++ b/tests/unit/test_views.py @@ -133,9 +133,10 @@ def test_with_a_query(self, monkeypatch, page): "multi_match", query="foo bar", f...
lutris__lutris-4244
Python error with runner for Epic Games Launcher ### Bug description I tried to install the Epic Games Launcher on my ideapad. I always got the following error (from a git clone from yesterday). -d output below. ### How to Reproduce Steps to reproduce the behavior: 1. Click on the + for new game 2. Search ...
[ { "content": "\"\"\"Injects sets of DLLs into a prefix\"\"\"\nimport json\nimport os\nimport shutil\nfrom gettext import gettext as _\n\nfrom lutris.util import system\nfrom lutris.util.extract import extract_archive\nfrom lutris.util.http import download_file\nfrom lutris.util.log import logger\nfrom lutris.ut...
[ { "content": "\"\"\"Injects sets of DLLs into a prefix\"\"\"\nimport json\nimport os\nimport shutil\nfrom gettext import gettext as _\n\nfrom lutris.util import system\nfrom lutris.util.extract import extract_archive\nfrom lutris.util.http import download_file\nfrom lutris.util.log import logger\nfrom lutris.ut...
diff --git a/lutris/util/wine/dll_manager.py b/lutris/util/wine/dll_manager.py index 74590b3b33..8086f1e792 100644 --- a/lutris/util/wine/dll_manager.py +++ b/lutris/util/wine/dll_manager.py @@ -115,6 +115,9 @@ def download(self): if self.is_available(): logger.warning("%s already available at %s"...
lmfit__lmfit-py-487
asteval errors are not flushed after raising #### Description With parameter.set(expr="foo"), if the expression raises an exception in asteval, this error is stored in parameter._expr_eval.errors. Now, the function https://github.com/lmfit/lmfit-py/blob/6c87262fcfd3c361b197c6769852f76366113246/lmfit/parameter.py#L18...
[ { "content": "\"\"\"Parameter class.\"\"\"\nfrom __future__ import division\n\nfrom collections import OrderedDict\nfrom copy import deepcopy\nimport json\n\nfrom asteval import Interpreter, get_ast_names, valid_symbol_name\nfrom numpy import arcsin, array, cos, inf, nan, sin, sqrt\nimport scipy.special\nimport...
[ { "content": "\"\"\"Parameter class.\"\"\"\nfrom __future__ import division\n\nfrom collections import OrderedDict\nfrom copy import deepcopy\nimport json\n\nfrom asteval import Interpreter, get_ast_names, valid_symbol_name\nfrom numpy import arcsin, array, cos, inf, nan, sin, sqrt\nimport scipy.special\nimport...
diff --git a/lmfit/parameter.py b/lmfit/parameter.py index 9a5c7d1ac..235a919b2 100644 --- a/lmfit/parameter.py +++ b/lmfit/parameter.py @@ -826,6 +826,8 @@ def __set_expression(self, val): if val is None: self._expr_ast = None if val is not None and self._expr_eval is not None: + ...
openstates__openstates-scrapers-2800
CO failing since at least 2019-01-20 CO has been failing since 2019-01-20 Based on automated runs it appears that CO has not run successfully in 2 days (2019-01-20). ``` 07:05:20 INFO pupa: save bill HB19-1057 in 2019A as bill_e9fba3ba-1d4a-11e9-833d-028e1495c01c.json 07:05:20 INFO scrapelib: GET - http://leg.colo...
[ { "content": "import datetime as dt\nimport re\nimport lxml.html\nimport scrapelib\nimport json\nimport math\nimport pytz\nfrom pupa.scrape import Scraper, Bill, VoteEvent\n\nfrom openstates.utils import LXMLMixin\n\nfrom .actions import Categorizer\nCO_URL_BASE = \"http://leg.colorado.gov\"\nSESSION_DATA_ID = ...
[ { "content": "import datetime as dt\nimport re\nimport lxml.html\nimport scrapelib\nimport json\nimport math\nimport pytz\nfrom pupa.scrape import Scraper, Bill, VoteEvent\n\nfrom openstates.utils import LXMLMixin\n\nfrom .actions import Categorizer\nCO_URL_BASE = \"http://leg.colorado.gov\"\nSESSION_DATA_ID = ...
diff --git a/openstates/co/bills.py b/openstates/co/bills.py index 436f1fd170..dac62ec857 100644 --- a/openstates/co/bills.py +++ b/openstates/co/bills.py @@ -351,6 +351,11 @@ def scrape_vote(self, bill, vote_url, chamber, date): if abstain_counts: abstain_count = int(abstain_counts[0]) ...
weni-ai__bothub-engine-152
Relative STATIC_URL in production broken email images
[ { "content": "from setuptools import setup, find_packages\n\n\nsetup(\n name='bothub',\n version='1.12.0',\n description='bothub',\n packages=find_packages(),\n install_requires=[\n 'python-decouple',\n 'requests',\n 'django==2.0.6',\n 'djangorestframework==3.7.7',\n ...
[ { "content": "from setuptools import setup, find_packages\n\n\nsetup(\n name='bothub',\n version='1.12.1',\n description='bothub',\n packages=find_packages(),\n install_requires=[\n 'python-decouple',\n 'requests',\n 'django==2.0.6',\n 'djangorestframework==3.7.7',\n ...
diff --git a/README.md b/README.md index f23e393e..c3328e98 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ You can set environment variables in your OS, write on ```.env``` file or pass v | DEFAULT_DATABASE | ```string``` | ```sqlite:///db.sqlite3``` | Read [dj-database-url](https://github.com/kennethreitz/d...
aws-cloudformation__cfn-lint-2590
E0001: Error DisableExecuteApiEndpoint works only within 'DefinitionBody' property ### CloudFormation Lint Version 0.73.1 ### What operating system are you using? Ubuntu ### Describe the bug I want to disable the execute api endpoint in my RestAPI using SAM. This works as expected in deployment by adding the ` Dis...
[ { "content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport logging\nimport os\n\nimport samtranslator\nfrom samtranslator.parser import parser\nfrom samtranslator.public.exceptions import InvalidDocumentException\nfrom samtranslator.s...
[ { "content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport logging\nimport os\n\nimport samtranslator\nfrom samtranslator.parser import parser\nfrom samtranslator.public.exceptions import InvalidDocumentException\nfrom samtranslator.s...
diff --git a/src/cfnlint/transform.py b/src/cfnlint/transform.py index d89933a8c2..4e6b0d4b34 100644 --- a/src/cfnlint/transform.py +++ b/src/cfnlint/transform.py @@ -113,6 +113,7 @@ def _replace_local_codeuri(self): "DefinitionBody" not in resource_dict and "Auth" not in resou...
kymatio__kymatio-890
Make NumPy the default frontend Since we promised earlier: ``` /home/jenkins/workspace/kymatio_dev/kymatio/frontend/entry.py:20: DeprecationWarning: Torch frontend is currently the default, but NumPy will become the default in the next version. warnings.warn("Torch frontend is currently the default, but NumP...
[ { "content": "import logging\nimport warnings\nimport importlib\n\n\nclass ScatteringEntry(object):\n def __init__(self, *args, **kwargs):\n self.name = kwargs['name']\n self.class_name = kwargs['class_name']\n kwargs.pop('name')\n kwargs.pop('class_name')\n\n frontend_suff...
[ { "content": "import logging\nimport warnings\nimport importlib\n\n\nclass ScatteringEntry(object):\n def __init__(self, *args, **kwargs):\n self.name = kwargs['name']\n self.class_name = kwargs['class_name']\n kwargs.pop('name')\n kwargs.pop('class_name')\n\n frontend_suff...
diff --git a/kymatio/frontend/entry.py b/kymatio/frontend/entry.py index 6b31a003a..17bdec2fe 100644 --- a/kymatio/frontend/entry.py +++ b/kymatio/frontend/entry.py @@ -17,9 +17,7 @@ def __init__(self, *args, **kwargs): 'sklearn': 'Transformer'} if 'frontend' not in kwargs: - ...
GoogleCloudPlatform__professional-services-326
Asset exporter tool - getting ImportError in GAE Just tried to set up from scratch in new project. Followed steps from readme When running the cron job I get this ImportError: cannot import name 'expr_pb2' from 'google.type' (/env/lib/python3.7/site-packages/google/type/__init__.py) at <module> (/env/lib/python3....
[ { "content": "# Copyright 2019 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 2019 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/tools/asset-inventory/asset_inventory/pipeline_runner.py b/tools/asset-inventory/asset_inventory/pipeline_runner.py index 6f98d4c455..93dae6ab27 100644 --- a/tools/asset-inventory/asset_inventory/pipeline_runner.py +++ b/tools/asset-inventory/asset_inventory/pipeline_runner.py @@ -86,7 +86,8 @@ def run_pip...
ivy-llc__ivy-26740
heaviside heaviside
[ { "content": "# local\nimport ivy\nimport ivy.functional.frontends.paddle as paddle_frontend\nfrom ivy.func_wrapper import (\n with_supported_dtypes,\n with_unsupported_dtypes,\n with_supported_device_and_dtypes,\n)\nfrom ivy.functional.frontends.paddle.func_wrapper import _to_ivy_array\n\n\nclass Tens...
[ { "content": "# local\nimport ivy\nimport ivy.functional.frontends.paddle as paddle_frontend\nfrom ivy.func_wrapper import (\n with_supported_dtypes,\n with_unsupported_dtypes,\n with_supported_device_and_dtypes,\n)\nfrom ivy.functional.frontends.paddle.func_wrapper import _to_ivy_array\n\n\nclass Tens...
diff --git a/ivy/functional/frontends/paddle/tensor/tensor.py b/ivy/functional/frontends/paddle/tensor/tensor.py index 87013e718708c..6f53fd7300263 100644 --- a/ivy/functional/frontends/paddle/tensor/tensor.py +++ b/ivy/functional/frontends/paddle/tensor/tensor.py @@ -927,6 +927,12 @@ def gather_(self, y, name=None): ...
flask-admin__flask-admin-460
Type formatter is ignored when list_formatter exists I added a formatter to my column and it ignored the `type_formatter`. ``` # this format do nothing but type formatter is not applied list_formatters = dict(x=lambda v, c, m, p: m.x) ``` I expected to return a bool to be formatted as a bool in my view (with bootstra...
[ { "content": "import warnings\n\nfrom flask import request, url_for, redirect, flash, abort, json, Response\n\nfrom jinja2 import contextfunction\n\nfrom flask.ext.admin.babel import gettext\n\nfrom flask.ext.admin.base import BaseView, expose\nfrom flask.ext.admin.form import BaseForm, FormOpts, rules\nfrom fl...
[ { "content": "import warnings\n\nfrom flask import request, url_for, redirect, flash, abort, json, Response\n\nfrom jinja2 import contextfunction\n\nfrom flask.ext.admin.babel import gettext\n\nfrom flask.ext.admin.base import BaseView, expose\nfrom flask.ext.admin.form import BaseForm, FormOpts, rules\nfrom fl...
diff --git a/flask_admin/model/base.py b/flask_admin/model/base.py index 252409e0c..3c046588e 100644 --- a/flask_admin/model/base.py +++ b/flask_admin/model/base.py @@ -1058,9 +1058,9 @@ def get_list_value(self, context, model, name): """ column_fmt = self.column_formatters.get(name) if colum...
beeware__toga-1751
iOS app not showing content with Rubicon ObjC 0.4.4 ### Describe the bug When running an iOS app with Toga 0.3.0dev39 and Rubicon 0.4.4, the app isn't successfully started, and the main app content is never displayed. When the app runs, you'll see the following in the log: ``` 2023-01-24 12:14:13.871494+0800 He...
[ { "content": "#!/usr/bin/env python\nimport re\n\nfrom setuptools import setup\n\n# Version handline needs to be programatic because\n# we can't import toga_iOS to compute the version;\n# and to support versioned subpackage dependencies\nwith open(\"src/toga_iOS/__init__.py\", encoding=\"utf8\") as version_file...
[ { "content": "#!/usr/bin/env python\nimport re\n\nfrom setuptools import setup\n\n# Version handline needs to be programatic because\n# we can't import toga_iOS to compute the version;\n# and to support versioned subpackage dependencies\nwith open(\"src/toga_iOS/__init__.py\", encoding=\"utf8\") as version_file...
diff --git a/changes/1751.misc.rst b/changes/1751.misc.rst new file mode 100644 index 0000000000..4f9fa86be5 --- /dev/null +++ b/changes/1751.misc.rst @@ -0,0 +1 @@ +The Rubicon-ObjC version specifier was updated to an RC version because 0.4.4 was yanked, but we need the new features in the main branch. diff --git a/co...
zestedesavoir__zds-site-4985
Impossible de ne plus suivre un billet Je me suis abonné au billet [Ô Belgique, ô ... ](https://zestedesavoir.com/billets/2681/o-belgique-o/) peu après sa publication. Or, il m'est désormais impossible de ne plus le suivre. De même, j'ai cliqué sur "Être notifié par courriel", et il m'est impossible de l'annuler. Quand...
[ { "content": "from django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db import models\n\nfrom zds.forum.models import Topic\nfrom zds.notification import signals\nfrom zds.utils import get_current_user\n\n\nclass SubscriptionManager(models....
[ { "content": "from django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db import models\n\nfrom zds.forum.models import Topic\nfrom zds.notification import signals\nfrom zds.utils import get_current_user\n\n\nclass SubscriptionManager(models....
diff --git a/zds/notification/managers.py b/zds/notification/managers.py index 1b1bee5e9b..1a1a322377 100644 --- a/zds/notification/managers.py +++ b/zds/notification/managers.py @@ -149,7 +149,8 @@ def toggle_follow(self, content_object, user=None, by_email=False): if by_email: subscripti...
conda-forge__conda-smithy-138
Improve lint messages on whitespace The message about the spacing for selectors isn't clear to see the problem in the number of spaces: `Selectors are suggested to take a " # []" form.` It would be clearer to have a message like: `<two spaces> # <one space> [selector]`
[ { "content": "import os\nimport re\n\nimport jinja2\nimport ruamel.yaml\n\n\nEXPECTED_SECTION_ORDER = ['package', 'source', 'build', 'requirements',\n 'test', 'app', 'about', 'extra']\n\nREQUIREMENTS_ORDER = ['build', 'run']\n\n\nclass NullUndefined(jinja2.Undefined):\n def __unicode...
[ { "content": "import os\nimport re\n\nimport jinja2\nimport ruamel.yaml\n\n\nEXPECTED_SECTION_ORDER = ['package', 'source', 'build', 'requirements',\n 'test', 'app', 'about', 'extra']\n\nREQUIREMENTS_ORDER = ['build', 'run']\n\n\nclass NullUndefined(jinja2.Undefined):\n def __unicode...
diff --git a/conda_smithy/lint_recipe.py b/conda_smithy/lint_recipe.py index dd7ce50ec..e431a0701 100644 --- a/conda_smithy/lint_recipe.py +++ b/conda_smithy/lint_recipe.py @@ -85,7 +85,7 @@ def lintify(meta, recipe_dir=None): bad_selectors.append(selector_line) if bad_selectors: ...
mindsdb__mindsdb-1667
Add new method to return the columns for ClickHouse datasources :electric_plug: :1234: When MindsDB creates a new ClickHouse datasource we get information for columns by fetching all datasources. The problem here is that if datasource is big it takes a lot of time. We need a new get_columns method to return the column...
[ { "content": "import requests\nfrom lightwood.api import dtype\nfrom mindsdb.integrations.base import Integration\nfrom mindsdb.utilities.log import log\n\n\nclass ClickhouseConnectionChecker:\n def __init__(self, **kwargs):\n self.host = kwargs.get(\"host\")\n self.port = kwargs.get(\"port\")\...
[ { "content": "import requests\nfrom lightwood.api import dtype\nfrom mindsdb.integrations.base import Integration\nfrom mindsdb.utilities.log import log\n\n\nclass ClickhouseConnectionChecker:\n def __init__(self, **kwargs):\n self.host = kwargs.get(\"host\")\n self.port = kwargs.get(\"port\")\...
diff --git a/mindsdb/integrations/clickhouse/clickhouse.py b/mindsdb/integrations/clickhouse/clickhouse.py index 694ddb9eaf7..351a87af715 100644 --- a/mindsdb/integrations/clickhouse/clickhouse.py +++ b/mindsdb/integrations/clickhouse/clickhouse.py @@ -160,4 +160,12 @@ def get_tables_list(self): OR...
spyder-ide__spyder-16753
Startup run code of IPython is not working when using projects ### What steps will reproduce the problem? <!--- You can use Markdown here ---> Hello. I have several types of spyder projects. Since the commands required for each project are different, I created an "import_in_console.py" file inside the project f...
[ { "content": "# -*- coding: utf-8 -*-\r\n#\r\n# Copyright © Spyder Project Contributors\r\n# Licensed under the terms of the MIT License\r\n# (see spyder/__init__.py for details)\r\n\r\n\"\"\"\r\nProjects Plugin\r\n\r\nIt handles closing, opening and switching among projetcs and also\r\nupdating the file tree e...
[ { "content": "# -*- coding: utf-8 -*-\r\n#\r\n# Copyright © Spyder Project Contributors\r\n# Licensed under the terms of the MIT License\r\n# (see spyder/__init__.py for details)\r\n\r\n\"\"\"\r\nProjects Plugin\r\n\r\nIt handles closing, opening and switching among projetcs and also\r\nupdating the file tree e...
diff --git a/spyder/plugins/projects/plugin.py b/spyder/plugins/projects/plugin.py index b15fccc7dc3..aab806ce60c 100644 --- a/spyder/plugins/projects/plugin.py +++ b/spyder/plugins/projects/plugin.py @@ -614,7 +614,7 @@ def reopen_last_project(self): if (current_project_path and self.is_vali...
pydantic__pydantic-4884
Pydantic doesn't properly parses models with custom root into custom root models ### Initial Checks - [X] I have searched GitHub for a duplicate issue and I'm sure this is something new - [X] I have searched Google & StackOverflow for a solution and couldn't find anything - [X] I have read and followed [the docs](http...
[ { "content": "import warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType, prepare_class, resolve_bases\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n ...
[ { "content": "import warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType, prepare_class, resolve_bases\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n ...
diff --git a/changes/4883-gou177.md b/changes/4883-gou177.md new file mode 100644 index 00000000000..b72d82c6c46 --- /dev/null +++ b/changes/4883-gou177.md @@ -0,0 +1 @@ +fix parsing of custom root models \ No newline at end of file diff --git a/pydantic/main.py b/pydantic/main.py index 16b759f7ce0..361c9669d79 100644 ...
hpcaitech__ColossalAI-4908
[tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nfrom types import MethodType\nfrom typing import Optional, Tuple\n\nimport torch\nimport torch.nn.functional as F\nfrom transformers.models.llama.modeling_llama import (\n LlamaRMSNorm,\n LlamaAttention,\n LlamaModel,\n LlamaForCausalL...
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nfrom types import MethodType\nfrom typing import Optional, Tuple\n\nimport torch\nimport torch.nn.functional as F\nfrom transformers.models.llama.modeling_llama import (\n LlamaRMSNorm,\n LlamaAttention,\n LlamaModel,\n LlamaForCausalL...
diff --git a/applications/Colossal-LLaMA-2/colossal_llama2/utils/flash_attention_patch.py b/applications/Colossal-LLaMA-2/colossal_llama2/utils/flash_attention_patch.py index 6c58c59307a6..111659b2d928 100644 --- a/applications/Colossal-LLaMA-2/colossal_llama2/utils/flash_attention_patch.py +++ b/applications/Colossal-...
encode__starlette-813
Gzip Middleware content-length is incorrect The following exception is thrown when I use uvicorn to drive my starlette project. After control variates, I am sure this is caused by Gzip Middleware. ``` File "C:\Users\AberS\Documents\Github\index.py\.venv\lib\site-packages\h11\_writers.py", line 102, in send_eom ...
[ { "content": "import asyncio\nimport io\nimport sys\nimport typing\n\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.types import Message, Receive, Scope, Send\n\n\ndef build_environ(scope: Scope, body: bytes) -> dict:\n \"\"\"\n Builds a scope and request body into a WSGI environ obj...
[ { "content": "import asyncio\nimport io\nimport sys\nimport typing\n\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.types import Message, Receive, Scope, Send\n\n\ndef build_environ(scope: Scope, body: bytes) -> dict:\n \"\"\"\n Builds a scope and request body into a WSGI environ obj...
diff --git a/starlette/middleware/wsgi.py b/starlette/middleware/wsgi.py index f0c69c8d6..fbc8411bf 100644 --- a/starlette/middleware/wsgi.py +++ b/starlette/middleware/wsgi.py @@ -120,7 +120,7 @@ def start_response( status_code_string, _ = status.split(" ", 1) status_code = int(status_code_st...
mars-project__mars-987
[BUG] Tensor shall not be passed into numpy ufuncs when inferring types **Describe the bug** When running ``mt.log(a, where=x)``, ``mt.log`` will first call ``infer_type`` to get ``dtype``, and ``x`` whose type is ``mt.Tensor`` is then passed into ``np.log``, which may cause unexpected behaviors. ![image](https://u...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2020 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2020 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://...
diff --git a/conda-spec.txt b/conda-spec.txt index d231c599b2..a3fceaa4ff 100644 --- a/conda-spec.txt +++ b/conda-spec.txt @@ -1,6 +1,7 @@ numpy requests pyarrow +cloudpickle cython mock pytest diff --git a/mars/tensor/arithmetic/tests/test_arithmetic.py b/mars/tensor/arithmetic/tests/test_arithmetic.py index 217...
pypa__pip-1282
Generated Wheel Scripts Do Not Have Execute Permissions ``` ls -l temppip/usr/local/bin total 56 -rw-r--r-- 1 dstufft staff 678 Nov 1 21:37 easy_install -rw-r--r-- 1 dstufft staff 364 Nov 1 21:37 easy_install-3.3.pya -rw-r--r-- 1 dstufft staff 678 Nov 1 21:37 easy_install-3.4 -rw-r--r-- 1 dstufft staff 3...
[ { "content": "\"\"\"\nSupport for installing and building the \"wheel\" binary package format.\n\"\"\"\nfrom __future__ import with_statement\n\nimport csv\nimport functools\nimport hashlib\nimport os\nimport pkg_resources\nimport re\nimport shutil\nimport sys\nfrom base64 import urlsafe_b64encode\n\nfrom pip.b...
[ { "content": "\"\"\"\nSupport for installing and building the \"wheel\" binary package format.\n\"\"\"\nfrom __future__ import with_statement\n\nimport csv\nimport functools\nimport hashlib\nimport os\nimport pkg_resources\nimport re\nimport shutil\nimport sys\nfrom base64 import urlsafe_b64encode\n\nfrom pip.b...
diff --git a/pip/wheel.py b/pip/wheel.py index 8302bfe57f8..887e562383b 100644 --- a/pip/wheel.py +++ b/pip/wheel.py @@ -219,6 +219,11 @@ def is_entrypoint_wrapper(name): maker = ScriptMaker(None, scheme['scripts']) maker.variants = set(('', )) + # This is required because otherwise distlib creates scrip...
qtile__qtile-2033
Restarting Qtile leaves a traceback Traceback (most recent call last): File "/usr/lib/python3.7/site-packages/libqtile/ipc.py", line 72, in unpack assert len(data) >= HDRLEN AssertionError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr...
[ { "content": "# Copyright (c) 2008, Aldo Cortesi. All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the ri...
[ { "content": "# Copyright (c) 2008, Aldo Cortesi. All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the ri...
diff --git a/libqtile/ipc.py b/libqtile/ipc.py index 8e7fdada5a..953f4e905c 100644 --- a/libqtile/ipc.py +++ b/libqtile/ipc.py @@ -195,11 +195,6 @@ async def _server_callback( except IPCError: logger.warn("Invalid data received, closing connection") else: - if req[1] == "restar...
DataDog__dd-trace-py-3095
AttributeError: 'coroutine' object has no attribute 'add_done_callback' ### Which version of dd-trace-py are you using? ddtrace 0.57.1 ### Which version of pip are you using? pip 21.3.1 ### Which version of the libraries are you using? aioredis 1.3.1 ### What is the result that you get? ``` Fi...
[ { "content": "import sys\n\nimport aioredis\n\nfrom ddtrace import config\nfrom ddtrace.internal.utils.wrappers import unwrap as _u\nfrom ddtrace.pin import Pin\nfrom ddtrace.vendor.wrapt import wrap_function_wrapper as _w\n\nfrom .. import trace_utils\nfrom ...constants import ANALYTICS_SAMPLE_RATE_KEY\nfrom ....
[ { "content": "import asyncio\nimport sys\n\nimport aioredis\n\nfrom ddtrace import config\nfrom ddtrace.internal.utils.wrappers import unwrap as _u\nfrom ddtrace.pin import Pin\nfrom ddtrace.vendor.wrapt import wrap_function_wrapper as _w\n\nfrom .. import trace_utils\nfrom ...constants import ANALYTICS_SAMPLE_...
diff --git a/ddtrace/contrib/aioredis/patch.py b/ddtrace/contrib/aioredis/patch.py index 286e65c0053..a0549114129 100644 --- a/ddtrace/contrib/aioredis/patch.py +++ b/ddtrace/contrib/aioredis/patch.py @@ -1,3 +1,4 @@ +import asyncio import sys import aioredis @@ -144,6 +145,9 @@ def _finish_span(future): ...
ckan__ckan-3734
Exception when specifying a directory in the ckan.i18n_directory option ### CKAN Version if known (or site URL) 2.6.2 ### Please describe the expected behaviour After specifying a directory in the `ckan.i18n_directory` option, we should get locales from that directory. ### Please describe the actual behaviour ...
[ { "content": "# encoding: utf-8\n\n'''\nInternationalization utilities.\n\nThis module contains code from the pojson project, which is subject to\nthe following license (see https://bitbucket.org/obviel/pojson):\n\nCopyright (c) 2010, Fanstatic Developers\nAll rights reserved.\n\nRedistribution and use in sourc...
[ { "content": "# encoding: utf-8\n\n'''\nInternationalization utilities.\n\nThis module contains code from the pojson project, which is subject to\nthe following license (see https://bitbucket.org/obviel/pojson):\n\nCopyright (c) 2010, Fanstatic Developers\nAll rights reserved.\n\nRedistribution and use in sourc...
diff --git a/ckan/lib/i18n.py b/ckan/lib/i18n.py index 2f554c2a978..5b8ec29d758 100644 --- a/ckan/lib/i18n.py +++ b/ckan/lib/i18n.py @@ -225,7 +225,7 @@ def _set_lang(lang): if config.get('ckan.i18n_directory'): fake_config = {'pylons.paths': {'root': config['ckan.i18n_directory']}, ...
goauthentik__authentik-9478
Web/Admin: Flow running returns 500 **Describe the bug** Running/testing/inspecting a flow out of the admin fails in a 500 or Json Error. **To Reproduce** 1. Open admin page 2. Go into detail view of a flow 3. Click any button in the 'run flow' section **Expected behavior** Flow test execution works :) *...
[ { "content": "\"\"\"Flow API Views\"\"\"\n\nfrom django.core.cache import cache\nfrom django.http import HttpResponse\nfrom django.urls import reverse\nfrom django.utils.translation import gettext as _\nfrom drf_spectacular.types import OpenApiTypes\nfrom drf_spectacular.utils import OpenApiResponse, extend_sch...
[ { "content": "\"\"\"Flow API Views\"\"\"\n\nfrom django.core.cache import cache\nfrom django.http import HttpResponse\nfrom django.urls import reverse\nfrom django.utils.translation import gettext as _\nfrom drf_spectacular.types import OpenApiTypes\nfrom drf_spectacular.utils import OpenApiResponse, extend_sch...
diff --git a/authentik/flows/api/flows.py b/authentik/flows/api/flows.py index 0e059c4b2ff9..121b3f8077bb 100644 --- a/authentik/flows/api/flows.py +++ b/authentik/flows/api/flows.py @@ -278,7 +278,7 @@ def set_background_url(self, request: Request, slug: str): }, ) @action(detail=True, pagination_cl...
lhotse-speech__lhotse-728
JSONDecodeError when running feat extract after doing kaldi import Hi! If I run `lhotse kaldi import <kaldidir> 16000 <newdir>` and then `lhotse feat extract <newdir>/recordings.jsonl.gz <newdir>/feat` I get an error ``` [..] File "/home/rudolf/.local/lib/python3.8/site-packages/lhotse/bin/modes/features.py", ...
[ { "content": "from pathlib import Path\nfrom typing import Optional\n\nimport click\n\nfrom lhotse import Features, FeatureSet, LilcomURLWriter, Seconds\nfrom lhotse.audio import RecordingSet\nfrom lhotse.bin.modes.cli_base import cli\nfrom lhotse.features import (\n Fbank,\n FeatureExtractor,\n Featur...
[ { "content": "from pathlib import Path\nfrom typing import Optional\n\nimport click\n\nfrom lhotse import Features, FeatureSet, LilcomURLWriter, Seconds\nfrom lhotse.audio import RecordingSet\nfrom lhotse.bin.modes.cli_base import cli\nfrom lhotse.features import (\n Fbank,\n FeatureExtractor,\n Featur...
diff --git a/lhotse/bin/modes/features.py b/lhotse/bin/modes/features.py index 1eca3e9de..182d4e4db 100644 --- a/lhotse/bin/modes/features.py +++ b/lhotse/bin/modes/features.py @@ -83,7 +83,7 @@ def extract( Extract features for recordings in a given AUDIO_MANIFEST. The features are stored in OUTPUT_DIR, with...
HypothesisWorks__hypothesis-1559
3.70.0 fails on py3.5 on all platforms See the logs: OSX: https://travis-ci.org/conda-forge/hypothesis-feedstock/jobs/423298695 Win: https://ci.appveyor.com/project/conda-forge/hypothesis-feedstock/build/1.0.315/job/l8qn1pf6l36abb8d Linux: https://circleci.com/gh/conda-forge/hypothesis-feedstock/606?utm_campaign=vcs...
[ { "content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis-python\n#\n# Most of this work is copyright (C) 2013-2018 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a f...
[ { "content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis-python\n#\n# Most of this work is copyright (C) 2013-2018 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a f...
diff --git a/hypothesis-python/RELEASE.rst b/hypothesis-python/RELEASE.rst new file mode 100644 index 0000000000..3df9fb0bb1 --- /dev/null +++ b/hypothesis-python/RELEASE.rst @@ -0,0 +1,7 @@ +RELEASE_TYPE: patch + +This patch fixes an internal bug where a corrupted argument to +:func:`@reproduce_failure <hypothesis.rep...
google__turbinia-977
Format string raised in exception without parameter substitution https://github.com/google/turbinia/blob/master/turbinia/turbiniactl.py#L957 ```py if not os.path.exists(recipe_file): msg = 'Recipe file {0:s} could not be found. Exiting.' raise TurbiniaException(msg) ```
[ { "content": "#!/usr/bin/env python\n#\n# Copyright 2017 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# ...
[ { "content": "#!/usr/bin/env python\n#\n# Copyright 2017 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# ...
diff --git a/turbinia/turbiniactl.py b/turbinia/turbiniactl.py index ac5d5db57..b147591c5 100644 --- a/turbinia/turbiniactl.py +++ b/turbinia/turbiniactl.py @@ -951,7 +951,8 @@ def process_evidence( 'with .yaml extension'.format(recipe_file)) recipe_file = recipe_file + '.yaml' if not os.pa...
numpy__numpy-5519
BUG np.broadcast_arrays does not work on void arrays with object fields In the process of working on #4622, it was realised that `np.broadcas_arrays` do not work for void arrays with object fields, because in the process of changing new strides and shapes in `as_strided`, the `dtype` gets lost, and this cannot just be ...
[ { "content": "\"\"\"\nUtilities that manipulate strides to achieve desirable effects.\n\nAn explanation of strides can be found in the \"ndarray.rst\" file in the\nNumPy reference guide.\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\nimport numpy as np\n\n__all__ = ['broadcast_to...
[ { "content": "\"\"\"\nUtilities that manipulate strides to achieve desirable effects.\n\nAn explanation of strides can be found in the \"ndarray.rst\" file in the\nNumPy reference guide.\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\nimport numpy as np\n\n__all__ = ['broadcast_to...
diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c index 010420826f1b..e88e1702847c 100644 --- a/numpy/core/src/multiarray/ctors.c +++ b/numpy/core/src/multiarray/ctors.c @@ -2069,6 +2069,51 @@ PyArray_FromStructInterface(PyObject *input) return NULL; } +/* + * Checks if the obje...
pre-commit__pre-commit-624
commit-msg stage does not work Everything works as expected when running just `pre-commit install`, then hooks work. But when running `pre-commit install -t commit-msg` `IOError` happens, since template could not be found. Here's the detailed information. ## Env - `python2.7` - `pipenv 7.3.7` - `pre-commit ...
[ { "content": "from setuptools import find_packages\nfrom setuptools import setup\n\n\nsetup(\n name='pre_commit',\n description=(\n 'A framework for managing and maintaining multi-language pre-commit '\n 'hooks.'\n ),\n url='https://github.com/pre-commit/pre-commit',\n version='1.1....
[ { "content": "from setuptools import find_packages\nfrom setuptools import setup\n\n\nsetup(\n name='pre_commit',\n description=(\n 'A framework for managing and maintaining multi-language pre-commit '\n 'hooks.'\n ),\n url='https://github.com/pre-commit/pre-commit',\n version='1.1....
diff --git a/setup.py b/setup.py index a2cd138b5..55116ca9a 100644 --- a/setup.py +++ b/setup.py @@ -29,11 +29,7 @@ packages=find_packages(exclude=('tests*', 'testing*')), package_data={ 'pre_commit': [ - 'resources/hook-tmpl', - 'resources/pre-push-tmpl', - 'resource...
ranaroussi__yfinance-1807
ImportError using yf.Ticker Hello. Hope everyone is doing well. Getting an error after upgraded yfinance today (11/28/23) with the following code ```%pip install yfinance --upgrade --no-cache-dir --pre```. I am using python version 3.10 and yfinance version 02.32 Error I am getting is as follows: ImportErr...
[ { "content": "#!/usr/bin/env python\n# -*- coding: UTF-8 -*-\n#\n# yfinance - market data downloader\n# https://github.com/ranaroussi/yfinance\n\n\"\"\"yfinance - market data downloader\"\"\"\n\nfrom setuptools import setup, find_packages\n# from codecs import open\nimport io\nfrom os import path\n\n# --- get v...
[ { "content": "#!/usr/bin/env python\n# -*- coding: UTF-8 -*-\n#\n# yfinance - market data downloader\n# https://github.com/ranaroussi/yfinance\n\n\"\"\"yfinance - market data downloader\"\"\"\n\nfrom setuptools import setup, find_packages\n# from codecs import open\nimport io\nfrom os import path\n\n# --- get v...
diff --git a/setup.py b/setup.py index c1c867e51..88050d963 100644 --- a/setup.py +++ b/setup.py @@ -65,7 +65,7 @@ 'frozendict>=2.3.4', 'peewee>=3.16.2', 'beautifulsoup4>=4.11.1', 'html5lib>=1.1'], extras_require={ - 'nospam': ['requests_cache>=1.1.1', 'requests...
benoitc__gunicorn-1182
Error in log message when changing listeners on reload When arbiter reloads workers on SIGHUP, and if old address is different from new address, it creates new sockets and logs about that. (https://github.com/benoitc/gunicorn/blob/master/gunicorn/arbiter.py#L402) ``` self.log.info("Listening at: %s", ",".join(str(self...
[ { "content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\nfrom __future__ import print_function\n\nimport errno\nimport os\nimport random\nimport select\nimport signal\nimport sys\nimport time\nimport traceback\n\nfrom gunico...
[ { "content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\nfrom __future__ import print_function\n\nimport errno\nimport os\nimport random\nimport select\nimport signal\nimport sys\nimport time\nimport traceback\n\nfrom gunico...
diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index 683bb20de..0b493133d 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -399,7 +399,8 @@ def reload(self): [l.close() for l in self.LISTENERS] # init new listeners self.LISTENERS = create_sockets(self.cfg, sel...
LMFDB__lmfdb-4279
Fix python 2->3 problem in verify
[ { "content": "from sage.all import (gcd, Mod, Integer, Integers, Rational, pari, Pari,\n DirichletGroup, CyclotomicField, euler_phi, lcm)\nfrom sage.misc.cachefunc import cached_method\nfrom sage.modular.dirichlet import DirichletCharacter\n\ndef symbol_numerator(cond, parity):\n # Refer...
[ { "content": "from sage.all import (gcd, Mod, Integer, Integers, Rational, pari, Pari,\n DirichletGroup, CyclotomicField, euler_phi, lcm)\nfrom sage.misc.cachefunc import cached_method\nfrom sage.modular.dirichlet import DirichletCharacter\n\ndef symbol_numerator(cond, parity):\n # Refer...
diff --git a/lmfdb/characters/TinyConrey.py b/lmfdb/characters/TinyConrey.py index 624a14e599..58debc8957 100644 --- a/lmfdb/characters/TinyConrey.py +++ b/lmfdb/characters/TinyConrey.py @@ -158,5 +158,5 @@ def sage_zeta_order(self, order): def sage_character(self, order, genvalues): H = DirichletGroup(se...
pypa__pip-2290
Version parse error ``` % sw_vers ProductName: Mac OS X ProductVersion: 10.10.1 BuildVersion: 14B25 % python --version Python 2.7.9 % pip --version pip 6.0.3 from /Users/singingwolfboy/.virtualenvs/edx-platform/lib/python2.7/site-packages (python 2.7) % pip install -e git+https://github.com/edx/edx-ora2.git@releas...
[ { "content": "from __future__ import absolute_import\n\nimport logging\nimport os\n\nfrom pip._vendor import pkg_resources\nfrom pip._vendor import requests\n\nfrom pip.download import (url_to_path, unpack_url)\nfrom pip.exceptions import (InstallationError, BestVersionAlreadyInstalled,\n ...
[ { "content": "from __future__ import absolute_import\n\nimport logging\nimport os\n\nfrom pip._vendor import pkg_resources\nfrom pip._vendor import requests\n\nfrom pip.download import (url_to_path, unpack_url)\nfrom pip.exceptions import (InstallationError, BestVersionAlreadyInstalled,\n ...
diff --git a/pip/req/req_set.py b/pip/req/req_set.py index cf39045f2eb..08804b2bda4 100644 --- a/pip/req/req_set.py +++ b/pip/req/req_set.py @@ -494,6 +494,7 @@ def install(self, install_options, global_options=(), *args, **kwargs): distribute_req = pkg_resources.Requirement.parse("distribute>=0.7") f...
sunpy__sunpy-780
Database.query buggy with Time Database.query works different using the Time attribute than VSO does.
[ { "content": "# Author: Simon Liedtke <liedtke.simon@googlemail.com>\n#\n# This module was developed with funding provided by\n# the Google Summer of Code (2013).\n\nfrom __future__ import absolute_import\n\nfrom sqlalchemy import or_, and_, not_\nfrom astropy.units import Unit, nm, equivalencies\n\nfrom sunpy....
[ { "content": "# Author: Simon Liedtke <liedtke.simon@googlemail.com>\n#\n# This module was developed with funding provided by\n# the Google Summer of Code (2013).\n\nfrom __future__ import absolute_import\n\nfrom sqlalchemy import or_, and_, not_\nfrom astropy.units import Unit, nm, equivalencies\n\nfrom sunpy....
diff --git a/sunpy/database/attrs.py b/sunpy/database/attrs.py index fe120fc9763..9212482d3f1 100644 --- a/sunpy/database/attrs.py +++ b/sunpy/database/attrs.py @@ -209,8 +209,8 @@ def _create(wlk, root, session): elif typ == 'time': start, end, near = value query = query.filter(and_(...
boto__botocore-3141
Add support for urllib3 2.2.1 ### Describe the bug Underlying `botocore` requires outdated `urllib3` version: - 1.x in case of Python pre-3.10 - < 2.1 in case of Python 3.10(+) background from: https://github.com/boto/botocore/issues/2926 I do totally understand the motivation for these outdated `urllib3` ve...
[ { "content": "#!/usr/bin/env python\nimport codecs\nimport os.path\nimport re\n\nfrom setuptools import find_packages, setup\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read(*parts):\n return codecs.open(os.path.join(here, *parts), 'r').read()\n\n\ndef find_version(*file_paths):\n versio...
[ { "content": "#!/usr/bin/env python\nimport codecs\nimport os.path\nimport re\n\nfrom setuptools import find_packages, setup\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read(*parts):\n return codecs.open(os.path.join(here, *parts), 'r').read()\n\n\ndef find_version(*file_paths):\n versio...
diff --git a/.changes/next-release/enhancement-urllib3-72501.json b/.changes/next-release/enhancement-urllib3-72501.json new file mode 100644 index 0000000000..bd76986460 --- /dev/null +++ b/.changes/next-release/enhancement-urllib3-72501.json @@ -0,0 +1,5 @@ +{ + "type": "enhancement", + "category": "``urllib3``", +...
tensorflow__addons-758
Allow passing in a tensor to tfa.optimizers.MovingAverage num_updates Currently, `tfa.optimizers.MovingAverage` has an assert that requires `num_updates` to be of type int, [shown here](https://github.com/tensorflow/addons/blob/604a70de563f8797984c9c3f002aff70bef6c90b/tensorflow_addons/optimizers/moving_average.py#L81)...
[ { "content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\...
[ { "content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\...
diff --git a/tensorflow_addons/optimizers/moving_average.py b/tensorflow_addons/optimizers/moving_average.py index 89367c8668..2af1072ff1 100644 --- a/tensorflow_addons/optimizers/moving_average.py +++ b/tensorflow_addons/optimizers/moving_average.py @@ -78,9 +78,6 @@ def __init__(self, raise TypeError( ...
getpelican__pelican-1621
Excluding Pages from DEFAULT_METADATA When I set the following in pelicanconf.py: ``` DEFAULT_METADATA = { 'status': 'draft', } ``` My pages break: ``` ERROR: Unknown status 'Published' for file pages/about.md, skipping it. ``` In `PATH` I have the directories 'pages' and 'posts'. I attempted to fix this by exp...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\n\nimport os\nimport six\nimport math\nimport random\nimport logging\nimport shutil\nimport fnmatch\nimport calendar\n\nfrom codecs import open\nfrom collections import defaultdict\nfrom functools import partial\nfrom...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\n\nimport os\nimport six\nimport math\nimport random\nimport logging\nimport shutil\nimport fnmatch\nimport calendar\n\nfrom codecs import open\nfrom collections import defaultdict\nfrom functools import partial\nfrom...
diff --git a/pelican/generators.py b/pelican/generators.py index 5122fa6da..97e453b4a 100644 --- a/pelican/generators.py +++ b/pelican/generators.py @@ -641,9 +641,9 @@ def generate_context(self): self.add_source_path(page) - if page.status == "published": + if page.status.lower()...
conda-forge__staged-recipes-261
Latest conda-smithy is prevent poliastro feedstock creation ``` Repository registered at github, now call 'conda smithy register-ci' Making feedstock for poliastro /Users/travis/build/conda-forge/staged-recipes/recipes/poliastro has some lint: Selectors are suggested to take a " # [<selector>]" form. Traceback (most...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nConvert all recipes into feedstocks.\n\nThis script is to be run in a TravisCI context, with all secret environment variables defined (BINSTAR_TOKEN, GH_TOKEN)\nSuch as:\n\n export GH_TOKEN=$(cat ~/.conda-smithy/github.token)\n\n\"\"\"\nfrom __future__ import prin...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nConvert all recipes into feedstocks.\n\nThis script is to be run in a TravisCI context, with all secret environment variables defined (BINSTAR_TOKEN, GH_TOKEN)\nSuch as:\n\n export GH_TOKEN=$(cat ~/.conda-smithy/github.token)\n\n\"\"\"\nfrom __future__ import prin...
diff --git a/.CI/build_all b/.CI/build_all index 392a58ef60d15..bf13852b806a0 100755 --- a/.CI/build_all +++ b/.CI/build_all @@ -4,15 +4,19 @@ # Set the numpy variable. This isn't used, but conda-build complains if we haven't set it already. export CONDA_NPY=19 -wget https://raw.githubusercontent.com/pelson/Obvious...
internetarchive__openlibrary-9125
Update Github Action "Recent Comment Slack Bot" to mark issues as Needs: Response <!-- IMPORTANT: Before posting, be sure to redact or remove sensitive data, such as passwords, secret keys, session cookies, etc. --> <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nFetches Open Library GitHub issues that have been commented on\nwithin some amount of time, in hours.\n\nWrites links to each issue to given Slack channel.\n\"\"\"\nimport argparse\nimport errno\nimport os\nimport sys\nimport time\n\nfrom datetime import datetime, ti...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nFetches Open Library GitHub issues that have been commented on\nwithin some amount of time, in hours.\n\nWrites links to each issue to given Slack channel.\n\"\"\"\nimport argparse\nimport errno\nimport os\nimport sys\nimport time\n\nfrom datetime import datetime, ti...
diff --git a/scripts/gh_scripts/issue_comment_bot.py b/scripts/gh_scripts/issue_comment_bot.py index 0d0b8d26ea6..45d3190fa18 100755 --- a/scripts/gh_scripts/issue_comment_bot.py +++ b/scripts/gh_scripts/issue_comment_bot.py @@ -127,6 +127,7 @@ def filter_issues(issues: list, since: datetime): lead_lab...
mindsdb__mindsdb-748
Check if the python version is at least 3.6 on server start. On Server start check if Python version is < 3.8 if lower version, print message: ``` MindsDB server requires Python >= 3.8 to run Once you have Python 3.8 installed you can tun mindsdb as follows: 1. create and activate venv: python3.8 -m v...
[ { "content": "import atexit\nimport traceback\nimport sys\nimport os\nimport time\n\nfrom pkg_resources import get_distribution\nimport torch.multiprocessing as mp\n\nfrom mindsdb.utilities.config import Config\nfrom mindsdb.interfaces.native.mindsdb import MindsdbNative\nfrom mindsdb.interfaces.custom.custom_m...
[ { "content": "import atexit\nimport traceback\nimport sys\nimport os\nimport time\n\nfrom pkg_resources import get_distribution\nimport torch.multiprocessing as mp\n\nfrom mindsdb.utilities.config import Config\nfrom mindsdb.interfaces.native.mindsdb import MindsdbNative\nfrom mindsdb.interfaces.custom.custom_m...
diff --git a/.gitignore b/.gitignore index 43e0a73ee49..7acec4e4358 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ model.py tests/integration_tests/flows/model.py tests/integration_tests/flows/my_model.zip tests/docker/mongodb/storage_* +venv/* diff --git a/mindsdb/__main__.py b/mindsdb/__main__.py index...
pennersr__django-allauth-2465
base64.decodestring was removed in Python 3.9 I can see encodestring fixed with Python 2/3 compatibility in. https://github.com/pennersr/django-allauth/blob/7b81531bc89ae98dc6f687611743db5b36cda9a2/allauth/socialaccount/providers/openid/utils.py#L74-L77 In similar way this can also be fixed. https://github.com...
[ { "content": "import base64\nimport pickle\nfrom collections import UserDict\n\nfrom openid.association import Association as OIDAssociation\nfrom openid.extensions.ax import FetchResponse\nfrom openid.extensions.sreg import SRegResponse\nfrom openid.store.interface import OpenIDStore as OIDStore\n\nfrom allaut...
[ { "content": "import base64\nimport pickle\nfrom collections import UserDict\n\nfrom openid.association import Association as OIDAssociation\nfrom openid.extensions.ax import FetchResponse\nfrom openid.extensions.sreg import SRegResponse\nfrom openid.store.interface import OpenIDStore as OIDStore\n\nfrom allaut...
diff --git a/AUTHORS b/AUTHORS index 0542733745..56a84b78e7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -94,6 +94,7 @@ Joshua Sorenson Julen Ruiz Aizpuru Justin Michalicek Justin Pogrob +Karthikeyan Singaravelan Kevin Dice Koichi Harakawa Kyle Harrison diff --git a/allauth/socialaccount/providers/openid/utils.py b/alla...
e-valuation__EvaP-1593
Set reply-to header For all emails sent via one of the contact modals, the reply-to header should be set to the address of the person sending the request.
[ { "content": "import logging\nfrom datetime import date, timedelta\n\nfrom django.conf import settings\nfrom django.contrib import messages, auth\nfrom django.contrib.auth.decorators import login_required\nfrom django.core.mail import EmailMessage\nfrom django.http import HttpResponse, HttpResponseBadRequest\nf...
[ { "content": "import logging\nfrom datetime import date, timedelta\n\nfrom django.conf import settings\nfrom django.contrib import messages, auth\nfrom django.contrib.auth.decorators import login_required\nfrom django.core.mail import EmailMessage\nfrom django.http import HttpResponse, HttpResponseBadRequest\nf...
diff --git a/evap/evaluation/tests/test_views.py b/evap/evaluation/tests/test_views.py index cf51680a3d..fa4eb2612a 100644 --- a/evap/evaluation/tests/test_views.py +++ b/evap/evaluation/tests/test_views.py @@ -74,7 +74,7 @@ def test_sends_mail(self): user=user, ) self.assertEqual(len(mai...
oppia__oppia-8526
Server error: Login url not found This error occurred recently in production ``` Error: Login url not found. at (https://www.oppia.org/build/templates/head/components/top_navigation_bar/TopNavigationBarDirective.4589537492f63e3b0ef9e1b656273ec6.js:1) at (https://www.oppia.org/third_party/static/angularjs-1.5.8/an...
[ { "content": "# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n...
[ { "content": "# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n...
diff --git a/core/controllers/profile.py b/core/controllers/profile.py index 2279e65553f92..b32edf940cdde 100644 --- a/core/controllers/profile.py +++ b/core/controllers/profile.py @@ -412,6 +412,8 @@ class UserInfoHandler(base.BaseHandler): @acl_decorators.open_access def get(self): """Handles GET r...
open-telemetry__opentelemetry-python-3780
`ExponentialHistogram` is missing the `to_json` method The [`ExponentialHistorgram`](https://github.com/open-telemetry/opentelemetry-python/blob/3dfe2249cc4a203bf24578483b192fec7266596b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/point.py#L93-L102) data point type was [somewhat recently added](https://git...
[ { "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 585524a6f85..190fbc489a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#3633](https://github.com/open-telemetry/opentelemetry-python/pull/3633)) - Fix python 3.12 depre...
Cog-Creators__Red-DiscordBot-5393
Relative/time delta parsing regex can have unexpected outcomes ### What Red version are you using? 3.5.0.dev1 ### What were you trying to do? Test some of new code, which uses the `parse_relativedelta` function, which calls the culprit [`_parse_and_match` function](https://github.com/Cog-Creators/Red-DiscordBo...
[ { "content": "\"\"\"\ncommands.converter\n==================\nThis module contains useful functions and classes for command argument conversion.\n\nSome of the converters within are included provisionally and are marked as such.\n\"\"\"\nimport functools\nimport re\nfrom datetime import timedelta\nfrom dateutil...
[ { "content": "\"\"\"\ncommands.converter\n==================\nThis module contains useful functions and classes for command argument conversion.\n\nSome of the converters within are included provisionally and are marked as such.\n\"\"\"\nimport functools\nimport re\nfrom datetime import timedelta\nfrom dateutil...
diff --git a/redbot/core/commands/converter.py b/redbot/core/commands/converter.py index a34ba2a7dca..3ae7f0a26f7 100644 --- a/redbot/core/commands/converter.py +++ b/redbot/core/commands/converter.py @@ -75,7 +75,7 @@ def _parse_and_match(string_to_match: str, allowed_units: List[str]) -> Optional """ Local ...
SciTools__cartopy-1655
set_clim() doesn't update color limits for cells crossing the antimeridian ### Description <!-- Please provide a general introduction to the issue/proposal. --> @sdeastham and I have been trying SciTools/cartopy#1622 which fixes streaking of data that crosses the antimeridian. Thanks so much for this, it works great ...
[ { "content": "# Copyright Cartopy Contributors\n#\n# This file is part of Cartopy and is released under the LGPL license.\n# See COPYING and COPYING.LESSER in the root of the repository for full\n# licensing details.\nfrom matplotlib.collections import QuadMesh\nimport numpy as np\n\n\nclass GeoQuadMesh(QuadMes...
[ { "content": "# Copyright Cartopy Contributors\n#\n# This file is part of Cartopy and is released under the LGPL license.\n# See COPYING and COPYING.LESSER in the root of the repository for full\n# licensing details.\nfrom matplotlib.collections import QuadMesh\nimport numpy as np\n\n\nclass GeoQuadMesh(QuadMes...
diff --git a/lib/cartopy/mpl/geocollection.py b/lib/cartopy/mpl/geocollection.py index 5a8bae8cd..938c14c32 100644 --- a/lib/cartopy/mpl/geocollection.py +++ b/lib/cartopy/mpl/geocollection.py @@ -36,3 +36,11 @@ def set_array(self, A): # Now that we have prepared the collection data, call on # through...
stephenmcd__mezzanine-780
SuspiciousOperation in asset_proxy URLs Since switching our site from HTTP to HTTPS, I've been getting the following error on all of TinyMCE's dialog windows. ``` SuspiciousOperation: Attempted access to '/static/grappelli/tinymce/jscripts/tiny_mce/themes/advanced/source_editor.htm' denied. Stacktrace (most recent ca...
[ { "content": "import os\nfrom urlparse import urljoin, urlparse\n\nfrom django.contrib import admin\nfrom django.contrib.admin.views.decorators import staff_member_required\nfrom django.contrib.admin.options import ModelAdmin\nfrom django.contrib.staticfiles import finders\nfrom django.core.exceptions import Pe...
[ { "content": "import os\nfrom urlparse import urljoin, urlparse\n\nfrom django.contrib import admin\nfrom django.contrib.admin.views.decorators import staff_member_required\nfrom django.contrib.admin.options import ModelAdmin\nfrom django.contrib.staticfiles import finders\nfrom django.core.exceptions import Pe...
diff --git a/mezzanine/core/views.py b/mezzanine/core/views.py index cdc24a33ef..325e26b078 100644 --- a/mezzanine/core/views.py +++ b/mezzanine/core/views.py @@ -135,7 +135,7 @@ def static_proxy(request): protocol = "http" if not request.is_secure() else "https" host = protocol + "://" + request.get_host() ...
elastic__apm-agent-python-1596
elasticapm.label fails when trying to warn that no transaction is present **Describe the bug**: https://github.com/elastic/apm-agent-python/blob/main/elasticapm/traces.py#L1092 When neither Transaction nor client is present, `elasticapm.label( . . .)` will fail while trying do print a warning. This can happen for ...
[ { "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/traces.py b/elasticapm/traces.py index f7224e80c..15dd97990 100644 --- a/elasticapm/traces.py +++ b/elasticapm/traces.py @@ -1089,7 +1089,8 @@ def label(**labels): """ transaction = execution_context.get_transaction() if not transaction: - if elasticapm.get_client().config....
Lightning-AI__pytorch-lightning-1862
lr_find doesn't return the correct suggestion if some losses are nan <!-- ### Common bugs: 1. Tensorboard not showing in Jupyter-notebook see [issue 79](https://github.com/PyTorchLightning/pytorch-lightning/issues/79). 2. PyTorch 1.1.0 vs 1.2.0 support [see FAQ](https://github.com/PyTorchLightning/pytorch-light...
[ { "content": "\"\"\"\nTrainer Learning Rate Finder\n\"\"\"\nfrom abc import ABC, abstractmethod\nfrom typing import Optional\n\nimport numpy as np\nimport torch\nfrom torch.optim.lr_scheduler import _LRScheduler\nfrom torch.utils.data import DataLoader\nfrom tqdm.auto import tqdm\nimport os\n\nfrom pytorch_ligh...
[ { "content": "\"\"\"\nTrainer Learning Rate Finder\n\"\"\"\nfrom abc import ABC, abstractmethod\nfrom typing import Optional\n\nimport numpy as np\nimport torch\nfrom torch.optim.lr_scheduler import _LRScheduler\nfrom torch.utils.data import DataLoader\nfrom tqdm.auto import tqdm\nimport os\n\nfrom pytorch_ligh...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c35dcdca5034..1ad8752763794 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Allow user to select individual TPU core to train on ([#1729](https://github.com/PyTorchLightnin...
strawberry-graphql__strawberry-2795
Query Codegen does not work for mutations. <!-- Provide a general summary of the bug in the title above. --> <!--- This template is entirely optional and can be removed, but is here to help both you and us. --> <!--- Anything on lines wrapped in comments like these will not show up in the final text. --> ## Desc...
[ { "content": "from __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import (\n TYPE_CHECKING,\n Callable,\n Iterable,\n List,\n Optional,\n Tuple,\n Type,\n Union,\n cast,\n)\nfrom typing_extensions import Literal, Protocol\n\nfrom graphql import (\n ...
[ { "content": "from __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import (\n TYPE_CHECKING,\n Callable,\n Iterable,\n List,\n Optional,\n Tuple,\n Type,\n Union,\n cast,\n)\nfrom typing_extensions import Literal, Protocol\n\nfrom graphql import (\n ...
diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..74a3aa732c --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,3 @@ +Release type: patch + +Prevent AssertionError when using `strawberry codegen` on a query file that contains a mutation. diff --git a/strawberry/codegen/query_codegen.py b/strawberry/cod...
pyodide__pyodide-2292
Allow specifying the version of Pyodide just once ## 🚀 Feature It seems that as things stand, to use Pyodide, you have to include the right version of the script (e.g., `<script src="https://cdn.jsdelivr.net/pyodide/v0.19.1/full/pyodide.js"></script>`) and request the right directory for `loadPyodide` (e.g., `loadP...
[ { "content": "\"\"\"\nVarious common utilities for testing.\n\"\"\"\nimport contextlib\nimport functools\nimport json\nimport multiprocessing\nimport os\nimport pathlib\nimport queue\nimport re\nimport shutil\nimport sys\nimport tempfile\nimport textwrap\nimport time\n\nimport pexpect\nimport pytest\n\nROOT_PAT...
[ { "content": "\"\"\"\nVarious common utilities for testing.\n\"\"\"\nimport contextlib\nimport functools\nimport json\nimport multiprocessing\nimport os\nimport pathlib\nimport queue\nimport re\nimport shutil\nimport sys\nimport tempfile\nimport textwrap\nimport time\n\nimport pexpect\nimport pytest\n\nROOT_PAT...
diff --git a/conftest.py b/conftest.py index 82251af08ef..85b9d740bcd 100644 --- a/conftest.py +++ b/conftest.py @@ -155,7 +155,7 @@ def javascript_setup(self): def load_pyodide(self): self.run_js( """ - let pyodide = await loadPyodide({ indexURL : './', fullStdLib: false, jsglobal...
freedomofpress__securedrop-4486
Release Securedrop 0.13.0 This is a tracking issue for the upcoming release of SecureDrop 0.13.0 - tasks may get added or modified. **Feature freeze:** EOD Pacific time, Wednesday, May 15 **String freeze:** Wednesday, May 15 **Pre-release announcement:** Wednesday, May 22 **Release date:** Wednesday, May 29 *...
[ { "content": "__version__ = '0.13.0~rc1'\n", "path": "securedrop/version.py" }, { "content": "# -*- coding: utf-8 -*-\n#\n# SecureDrop documentation build configuration file, created by\n# sphinx-quickstart on Tue Oct 13 12:08:52 2015.\n#\n# This file is execfile()d with the current directory set to...
[ { "content": "__version__ = '0.13.0'\n", "path": "securedrop/version.py" }, { "content": "# -*- coding: utf-8 -*-\n#\n# SecureDrop documentation build configuration file, created by\n# sphinx-quickstart on Tue Oct 13 12:08:52 2015.\n#\n# This file is execfile()d with the current directory set to its...
diff --git a/changelog.md b/changelog.md index 783b201544..182e1715f1 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,6 @@ # Changelog -## 0.13.0~rc1 +## 0.13.0 ### Web Application diff --git a/docs/conf.py b/docs/conf.py index 45a312283b..c9fb758a14 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -57,9...
ansible__molecule-3283
Collection resources not autodetected in v3.5.x <!--- Verify first that your issue is not already reported on GitHub --> <!--- Do not report bugs before reproducing them with the code of the main branch! --> <!--- Please also check https://molecule.readthedocs.io/en/latest/faq.html ---> <!--- Please use https://grou...
[ { "content": "# Copyright (c) 2015-2018 Cisco Systems, Inc.\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# rights...
[ { "content": "# Copyright (c) 2015-2018 Cisco Systems, Inc.\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# rights...
diff --git a/src/molecule/provisioner/ansible.py b/src/molecule/provisioner/ansible.py index 62c29c49fb..9fcea7b51c 100644 --- a/src/molecule/provisioner/ansible.py +++ b/src/molecule/provisioner/ansible.py @@ -459,6 +459,7 @@ def default_env(self): *os.environ.get("ANSIBLE_ROLES_PATH", "").spl...
djangopackages__djangopackages-725
Incorrect PyPI URLs on some packages **Describe the bug** Some packages have a PyPI URL in the form of `http://pypi.python.org/pypi/https://pypi.org/project/...` for example: https://djangopackages.org/packages/p/wagtail-grapple/ https://djangopackages.org/packages/p/wagtail-2fa/ **Additional context** We use th...
[ { "content": "from datetime import datetime, timedelta\nimport json\nimport re\nimport math\nfrom dateutil import relativedelta\n\nfrom django.core.cache import cache\nfrom django.conf import settings\nfrom django.contrib.auth.models import User\nfrom django.contrib.postgres.fields import ArrayField\nfrom djang...
[ { "content": "from datetime import datetime, timedelta\nimport json\nimport re\nimport math\nfrom dateutil import relativedelta\n\nfrom django.core.cache import cache\nfrom django.conf import settings\nfrom django.contrib.auth.models import User\nfrom django.contrib.postgres.fields import ArrayField\nfrom djang...
diff --git a/package/models.py b/package/models.py index 3120d010b..4e5be1fcc 100644 --- a/package/models.py +++ b/package/models.py @@ -97,7 +97,14 @@ def pypi_name(self): if not self.pypi_url.strip(): return "" - name = self.pypi_url.replace("http://pypi.python.org/pypi/", "") + ...
cloud-custodian__cloud-custodian-3544
Request Feature: Request for cloud Trail events for Lambda Hello , The following policy is giving me the error :2018-12-18 14:24:39,580: custodian.commands:ERROR Policy: lambda-tag-compliance is invalid: event shortcut not defined: CreateFunction policy --- ``` - name: lambda-tag-compliance resource: lambda ...
[ { "content": "# Copyright 2016-2017 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi...
[ { "content": "# Copyright 2016-2017 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi...
diff --git a/c7n/cwe.py b/c7n/cwe.py index 0e4dfcddb20..d8b7b3e3cda 100644 --- a/c7n/cwe.py +++ b/c7n/cwe.py @@ -79,6 +79,11 @@ class CloudWatchEvents(object): 'ids': 'requestParameters.tableName', 'source': 'dynamodb.amazonaws.com'}, + 'CreateFunction': { + 'event': 'Creat...