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
encode__uvicorn-1328
No `python_requires` defined ### Checklist - [X] The bug is reproducible against the latest release or `master`. - [X] There are no similar issues or pull requests to fix it yet. ### Describe the bug It seems that no `python_requires` is defined for the `uvicorn` package, which in turn results in the latest v...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport re\n\nfrom setuptools import setup\n\n\ndef get_version(package):\n \"\"\"\n Return package version as listed in `__version__` in `init.py`.\n \"\"\"\n path = os.path.join(package, \"__init__.py\")\n init_py = open(...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport re\n\nfrom setuptools import setup\n\n\ndef get_version(package):\n \"\"\"\n Return package version as listed in `__version__` in `init.py`.\n \"\"\"\n path = os.path.join(package, \"__init__.py\")\n init_py = open(...
diff --git a/setup.py b/setup.py index 415f01b33..bad54df34 100755 --- a/setup.py +++ b/setup.py @@ -73,6 +73,7 @@ def get_packages(package): author="Tom Christie", author_email="tom@tomchristie.com", packages=get_packages("uvicorn"), + python_requires=">=3.7", install_requires=minimal_requiremen...
wagtail__wagtail-2465
Remove redundant template debug lines from project template Ref: https://github.com/torchbox/wagtail/blob/9ff7961a3c8f508ad17735cd815335bad12fd67f/wagtail/project_template/project_name/settings/dev.py#L7-L8 #1688 According to https://docs.djangoproject.com/en/1.9/topics/templates/#django.template.backends.django.Djang...
[ { "content": "from __future__ import absolute_import, unicode_literals\n\nfrom .base import *\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\n\nfor template_engine in TEMPLATES:\n template_engine['OPTIONS']['debug'] = True\n\n# SECURITY WARNING: keep the secret key used in...
[ { "content": "from __future__ import absolute_import, unicode_literals\n\nfrom .base import *\n\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\n\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = '{{ secret_key }}'\n\n\nEMAIL_BACKEND = 'django.cor...
diff --git a/wagtail/project_template/project_name/settings/dev.py b/wagtail/project_template/project_name/settings/dev.py index ef3e3f727d90..6c23ef77a532 100644 --- a/wagtail/project_template/project_name/settings/dev.py +++ b/wagtail/project_template/project_name/settings/dev.py @@ -5,9 +5,6 @@ # SECURITY WARNING: ...
DjangoGirls__djangogirls-200
Admin site: Add "search" to coaches The coaches list [here](https://djangogirls.org/admin/core/coach/) has paging logic, but spans 33 pages at the moment. Add a search feature so it's easier to find the coach you need to edit.
[ { "content": "from django.contrib import admin\nfrom django import forms\nfrom django.forms import ModelForm\nfrom django.contrib.auth import admin as auth_admin\nfrom django.contrib.flatpages.models import FlatPage\nfrom django.contrib.flatpages.admin import FlatPageAdmin, FlatpageForm\n\nfrom suit_redactor.wi...
[ { "content": "from django.contrib import admin\nfrom django import forms\nfrom django.forms import ModelForm\nfrom django.contrib.auth import admin as auth_admin\nfrom django.contrib.flatpages.models import FlatPage\nfrom django.contrib.flatpages.admin import FlatPageAdmin, FlatpageForm\n\nfrom suit_redactor.wi...
diff --git a/core/admin.py b/core/admin.py index b92f52844..8ddd48c80 100644 --- a/core/admin.py +++ b/core/admin.py @@ -168,6 +168,7 @@ def get_form(self, request, obj=None, **kwargs): class CoachAdmin(admin.ModelAdmin): list_display = ('name', 'photo_display_for_admin', 'twitter_handle', 'url') + search_fi...
pytorch__TensorRT-1953
✨[Converter] Implement aten::addmm Torch op: func: addmm(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1) -> Tensor Aten op: torch.ops.addmm.default
[ { "content": "import torch\nfrom torch._decomp import register_decomposition, core_aten_decompositions\n\n\nDECOMPOSITIONS = {**core_aten_decompositions()}\n\naten = torch.ops.aten\n\n\ndef replace_inplace_op(aten_op, outplace_op):\n \"\"\"Replace inplace operation with functional equivalent\n Adapted fro...
[ { "content": "import torch\nfrom torch._decomp import register_decomposition, core_aten_decompositions\n\n\nDECOMPOSITIONS = {**core_aten_decompositions()}\n\naten = torch.ops.aten\n\n\ndef replace_inplace_op(aten_op, outplace_op):\n \"\"\"Replace inplace operation with functional equivalent\n Adapted fro...
diff --git a/py/torch_tensorrt/dynamo/backend/lowering/_decompositions.py b/py/torch_tensorrt/dynamo/backend/lowering/_decompositions.py index d0bd5ed3b8..1ccc010e3a 100644 --- a/py/torch_tensorrt/dynamo/backend/lowering/_decompositions.py +++ b/py/torch_tensorrt/dynamo/backend/lowering/_decompositions.py @@ -56,5 +56,...
OpenNMT__OpenNMT-py-480
translate.py error with -n_best option (n > 1) This happens with **-n_best, n> 1** and **-verbose**. ``` $ python translate.py -model model.pt -src source.txt -n_best 10 -output pred10best.txt -replace_unk -verbose Loading model parameters. PRED SCORE: -6.3616 BEST HYP: Traceback (most recent call last): Fil...
[ { "content": "from __future__ import division, unicode_literals\n\nimport torch\nimport onmt.io\n\n\nclass TranslationBuilder(object):\n \"\"\"\n Build a word-based translation from the batch output\n of translator and the underlying dictionaries.\n\n Replacement based on \"Addressing the Rare Word\...
[ { "content": "from __future__ import division, unicode_literals\n\nimport torch\nimport onmt.io\n\n\nclass TranslationBuilder(object):\n def __init__(self, data, fields, n_best, replace_unk, has_tgt):\n self.data = data\n self.fields = fields\n self.n_best = n_best\n self.replace_...
diff --git a/docs/source/options/train.md b/docs/source/options/train.md index 68139e681f..ca3a4009ec 100644 --- a/docs/source/options/train.md +++ b/docs/source/options/train.md @@ -136,7 +136,7 @@ the decoder side. See README for specific formatting instructions. Fix word embeddings on the encoder side. * **-fix_...
biolab__orange3-1622
Symbol size and Opacity have disappeared from Scatter Plot ##### Orange version 3.3.8 candidate ##### Expected behavior Scatter Plot allowed to set Symbol size and Opacity in Points box (see [screenshots](http://orange.biolab.si/screenshots/). ##### Actual behavior In 3.3.8 candidate Symbol size and Opacity are miss...
[ { "content": "import numpy as np\nfrom PyQt4.QtCore import Qt, QTimer\nfrom PyQt4 import QtGui\nfrom PyQt4.QtGui import QApplication\nfrom sklearn.neighbors import NearestNeighbors\nfrom sklearn.metrics import r2_score\n\nimport Orange\nfrom Orange.data import Table, Domain, StringVariable, ContinuousVariable, ...
[ { "content": "import numpy as np\nfrom PyQt4.QtCore import Qt, QTimer\nfrom PyQt4 import QtGui\nfrom PyQt4.QtGui import QApplication\nfrom sklearn.neighbors import NearestNeighbors\nfrom sklearn.metrics import r2_score\n\nimport Orange\nfrom Orange.data import Table, Domain, StringVariable, ContinuousVariable, ...
diff --git a/Orange/widgets/visualize/owscatterplot.py b/Orange/widgets/visualize/owscatterplot.py index 83a71eb402a..fa9f2ac13dd 100644 --- a/Orange/widgets/visualize/owscatterplot.py +++ b/Orange/widgets/visualize/owscatterplot.py @@ -197,6 +197,7 @@ def __init__(self): **common_options) g = s...
microsoft__botbuilder-python-1747
port: turn memory scope includesnapshot to false (#5441) The changes in [turn memory scope includesnapshot to false (#5441)](https://github.com/microsoft/botbuilder-dotnet/pull/5441) may need to be ported to maintain parity with `microsoft/botbuilder-dotnet`. <blockquote> Fixes #5432 </blockquote> Please review and, ...
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nfrom botbuilder.dialogs.memory import scope_path\n\nfrom .memory_scope import MemoryScope\n\n\nclass CaseInsensitiveDict(dict):\n # pylint: disable=protected-access\n\n @classmethod\n def _k(...
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nfrom botbuilder.dialogs.memory import scope_path\n\nfrom .memory_scope import MemoryScope\n\n\nclass CaseInsensitiveDict(dict):\n # pylint: disable=protected-access\n\n @classmethod\n def _k(...
diff --git a/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py b/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py index 3773edf6b..661124bbf 100644 --- a/libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/turn_memory_scope.py +++ b/libraries/...
freedomofpress__securedrop-4487
Check documentation links as part of docs linting ## Description Sphinx [linkcheck](https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.linkcheck.CheckExternalLinksBuilder) allows the verification of links with the `requests` library to ensure that the links are still valid and active. It ...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# SecureDrop documentation build configuration file, created by\n# sphinx-quickstart on Tue Oct 13 12:08:52 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# SecureDrop documentation build configuration file, created by\n# sphinx-quickstart on Tue Oct 13 12:08:52 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in...
diff --git a/.circleci/config.yml b/.circleci/config.yml index 35ad7b3f49..0b10b75e0a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -71,7 +71,7 @@ jobs: - run: name: Run documentation linting - command: make docs-lint + command: make docs-lint && make docs-linkche...
qtile__qtile-738
lib*.so references in pangocffi.py When upgrading from 0.9.1 to 0.10.1, I needed to modify the following references for my system (Ubuntu Vivid) in libqtile/pangocffi.py gobject = ffi.dlopen('libgobject-2.0.so') pango = ffi.dlopen('libpango-1.0.so') pangocairo = ffi.dlopen('libpangocairo-1.0.so')
[ { "content": "# Copyright (c) 2014-2015 Sean Vig\n# Copyright (c) 2014 roger\n# Copyright (c) 2014 Tycho Andersen\n# Copyright (c) 2015 Craig Barnes\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 de...
[ { "content": "# Copyright (c) 2014-2015 Sean Vig\n# Copyright (c) 2014 roger\n# Copyright (c) 2014 Tycho Andersen\n# Copyright (c) 2015 Craig Barnes\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 de...
diff --git a/libqtile/pangocffi.py b/libqtile/pangocffi.py index e338c37efb..5542a888a0 100644 --- a/libqtile/pangocffi.py +++ b/libqtile/pangocffi.py @@ -54,9 +54,9 @@ except ImportError: from libqtile.ffi_build import pango_ffi as ffi -gobject = ffi.dlopen('libgobject-2.0.so') -pango = ffi.dlopen('libpango-1....
pytorch__examples-1109
word Language Model bug self.decoder = nn.Linear(**ninp**, ntoken) in model.py line 124 shoud be "nhid"
[ { "content": "import math\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass RNNModel(nn.Module):\n \"\"\"Container module with an encoder, a recurrent module, and a decoder.\"\"\"\n\n def __init__(self, rnn_type, ntoken, ninp, nhid, nlayers, dropout=0.5, tie_weights=False):\n ...
[ { "content": "import math\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass RNNModel(nn.Module):\n \"\"\"Container module with an encoder, a recurrent module, and a decoder.\"\"\"\n\n def __init__(self, rnn_type, ntoken, ninp, nhid, nlayers, dropout=0.5, tie_weights=False):\n ...
diff --git a/word_language_model/model.py b/word_language_model/model.py index 8023ac430f..0438e0e893 100644 --- a/word_language_model/model.py +++ b/word_language_model/model.py @@ -121,7 +121,7 @@ def __init__(self, ntoken, ninp, nhead, nhid, nlayers, dropout=0.5): self.transformer_encoder = TransformerEncod...
pwr-Solaar__Solaar-1474
Big amount of CPU **Information** <!-- Make sure that your issue is not one of the known issues in the Solaar documentation at https://pwr-solaar.github.io/Solaar/ --> <!-- Do not bother opening an issue for a version older than 1.1.0. Update to the latest version and see if your issue persists. --> - Solaar versio...
[ { "content": "# -*- python-mode -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your...
[ { "content": "# -*- python-mode -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your...
diff --git a/lib/logitech_receiver/base.py b/lib/logitech_receiver/base.py index 84db044c20..2c6b961176 100644 --- a/lib/logitech_receiver/base.py +++ b/lib/logitech_receiver/base.py @@ -325,6 +325,10 @@ def make_notification(report_id, devnumber, data): return address = ord(data[1:2]) + if sub_id ==...
pyro-ppl__numpyro-1026
Scan fails with empty PYRO_STACK When `scan` is taken outside the context of a non-empty `PYRO_STACK`, `scan` produces an error. The following code produces the error. I don't think it matters much what the scan actually does, but in this case it's interative multiplication of a vector by a matrix with the addition ...
[ { "content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom collections import OrderedDict\nfrom functools import partial\n\nfrom jax import (\n device_put,\n lax,\n random,\n tree_flatten,\n tree_map,\n tree_multimap,\n tree_unflatten,\n)\nimp...
[ { "content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom collections import OrderedDict\nfrom functools import partial\n\nfrom jax import (\n device_put,\n lax,\n random,\n tree_flatten,\n tree_map,\n tree_multimap,\n tree_unflatten,\n)\nimp...
diff --git a/numpyro/contrib/control_flow/scan.py b/numpyro/contrib/control_flow/scan.py index 35ffb1dd7..c2a9e26ac 100644 --- a/numpyro/contrib/control_flow/scan.py +++ b/numpyro/contrib/control_flow/scan.py @@ -451,6 +451,7 @@ def g(*args, **kwargs): (length, rng_key, carry), (pytree_trace, ys) = scan_wrappe...
web2py__web2py-928
Typo in models/db.py for mail server Hi, I found a small typo, which prohibits sending mails in models/db.py line 65: mail.settings.server = 'logging' if request.is_local else myconf.take('smtp.sender') should be (smtp.server instead of smtp.sender): mail.settings.server = 'logging' if request.is_local else myconf.t...
[ { "content": "# -*- coding: utf-8 -*-\n\n#########################################################################\n## This scaffolding model makes your app work on Google App Engine too\n## File is released under public domain and you can use without limitations\n###############################################...
[ { "content": "# -*- coding: utf-8 -*-\n\n#########################################################################\n## This scaffolding model makes your app work on Google App Engine too\n## File is released under public domain and you can use without limitations\n###############################################...
diff --git a/applications/welcome/models/db.py b/applications/welcome/models/db.py index 3efe23771..27dcdf144 100644 --- a/applications/welcome/models/db.py +++ b/applications/welcome/models/db.py @@ -62,7 +62,7 @@ ## configure email mail = auth.settings.mailer -mail.settings.server = 'logging' if request.is_local ...
PyGithub__PyGithub-1007
get_review_comments() method fails due to missing import Specifically this line: https://github.com/PyGithub/PyGithub/blob/master/github/PullRequest.py#L552 requires that the `datetime` module be loaded. It isn't. Adding a ```python import datetime ``` at the top of `github/PullRequest.py` fixes this bug. ...
[ { "content": "# -*- coding: utf-8 -*-\n\n############################ Copyrights and license ############################\n# #\n# Copyright 2012 Michael Stead <michael.stead@gmail.com> #\n# Copyright 2012 Vincent ...
[ { "content": "# -*- coding: utf-8 -*-\n\n############################ Copyrights and license ############################\n# #\n# Copyright 2012 Michael Stead <michael.stead@gmail.com> #\n# Copyright 2012 Vincent ...
diff --git a/github/PullRequest.py b/github/PullRequest.py index 688e0625b9..2dc354f871 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -42,6 +42,7 @@ # # ####################################################################...
OpenNMT__OpenNMT-tf-189
Crash loading parallel inputs with --data_dir I found the next issue if I follow the tutorial and try to do data: train_features_file: - train_source_1.records - train_source_2.txt - train_source_3.txt in main.py at the method _prefix_paths new_path = os.path.join(prefix, path) will crash bec...
[ { "content": "\"\"\"Main script.\"\"\"\n\nimport argparse\nimport json\nimport os\nimport six\n\nimport tensorflow as tf\n\nfrom opennmt.models import catalog\nfrom opennmt.runner import Runner\nfrom opennmt.config import load_model, load_config\nfrom opennmt.utils.misc import classes_in_module\n\n\ndef _prefix...
[ { "content": "\"\"\"Main script.\"\"\"\n\nimport argparse\nimport json\nimport os\nimport six\n\nimport tensorflow as tf\n\nfrom opennmt.models import catalog\nfrom opennmt.runner import Runner\nfrom opennmt.config import load_model, load_config\nfrom opennmt.utils.misc import classes_in_module\n\n\ndef _prefix...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 786f09001..7ccc7e493 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ OpenNMT-tf follows [semantic versioning 2.0.0](https://semver.org/). The API cov ### Fixes and improvements +* Fix error when using `--data_dir` and parallel inputs in the data configu...
pytorch__ignite-1462
favicon for documentation ## 🚀 Feature There shall be a favicon for Ignite documentation, currently it's pytorch favicon cc: @vfdev-5
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/stable/config\n\n# -- Path setup ------------------------------...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/stable/config\n\n# -- Path setup ------------------------------...
diff --git a/docs/source/_templates/_static/img/ignite_logomark.svg b/docs/source/_templates/_static/img/ignite_logomark.svg new file mode 100644 index 000000000000..bf8fb7199c83 --- /dev/null +++ b/docs/source/_templates/_static/img/ignite_logomark.svg @@ -0,0 +1 @@ +<svg id="Layer_1" data-name="Layer 1" xmlns="http:/...
scikit-image__scikit-image-1206
canny edge detection throws AttributeError exception I was trying out http://scikit-image.org/docs/dev/auto_examples/plot_canny.html And the following lines of code: # Generate noisy image of a square im = np.zeros((128, 128)) im[32:-32, 32:-32] = 1 im = ndimage.rotate(im, 15, mode='constant') im = ndimage.gaussian...
[ { "content": "from .lpi_filter import inverse, wiener, LPIFilter2D\nfrom ._gaussian import gaussian_filter\nfrom .edges import (sobel, hsobel, vsobel, scharr, hscharr, vscharr, prewitt,\n hprewitt, vprewitt, roberts, roberts_positive_diagonal,\n roberts_negative_diagonal)\n...
[ { "content": "from .lpi_filter import inverse, wiener, LPIFilter2D\nfrom ._gaussian import gaussian_filter\nfrom .edges import (sobel, hsobel, vsobel, scharr, hscharr, vscharr, prewitt,\n hprewitt, vprewitt, roberts, roberts_positive_diagonal,\n roberts_negative_diagonal)\n...
diff --git a/skimage/filter/__init__.py b/skimage/filter/__init__.py index 0228957ed39..e5b58447b2e 100644 --- a/skimage/filter/__init__.py +++ b/skimage/filter/__init__.py @@ -19,7 +19,7 @@ (restoration.denoise_tv_chambolle) # Backward compatibility v<0.11 -@deprecated +@deprecated('skimage...
mindsdb__mindsdb-1560
Add new method to count number of rows for PostgreSQL datasources :electric_plug: :1234: When MindsDB creates a new PostgreSQL datasource we get information for row counts by fetching all datasources. The problem here is that if datasource is big it takes a lot of time. We need a new get_row_count method to return the...
[ { "content": "from contextlib import closing\nimport pg8000\n\nfrom lightwood.api import dtype\nfrom mindsdb.integrations.base import Integration\nfrom mindsdb.utilities.log import log\n\n\nclass PostgreSQLConnectionChecker:\n def __init__(self, **kwargs):\n self.host = kwargs.get('host')\n sel...
[ { "content": "from contextlib import closing\nimport pg8000\n\nfrom lightwood.api import dtype\nfrom mindsdb.integrations.base import Integration\nfrom mindsdb.utilities.log import log\n\n\nclass PostgreSQLConnectionChecker:\n def __init__(self, **kwargs):\n self.host = kwargs.get('host')\n sel...
diff --git a/mindsdb/integrations/postgres/postgres.py b/mindsdb/integrations/postgres/postgres.py index 186f43620c1..d0c29a8fb42 100644 --- a/mindsdb/integrations/postgres/postgres.py +++ b/mindsdb/integrations/postgres/postgres.py @@ -192,3 +192,10 @@ def unregister_predictor(self, name): DROP FOREIGN TA...
ethereum__web3.py-1334
Remove Python `collections` Deprecation warnings * Python: 3.7 and below ### What was wrong? Python 3.8 is changing the way imports from `collections` are being handled. The following Deprecation warning describes the issue: `DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'coll...
[ { "content": "from collections import (\n Iterable,\n Mapping,\n)\n\nfrom eth_utils import (\n is_dict,\n is_list_like,\n is_string,\n to_dict,\n to_list,\n)\n\nfrom web3._utils.decorators import (\n reject_recursive_repeats,\n)\nfrom web3._utils.toolz import (\n compose,\n curry,\...
[ { "content": "from collections.abc import (\n Iterable,\n Mapping,\n)\n\nfrom eth_utils import (\n is_dict,\n is_list_like,\n is_string,\n to_dict,\n to_list,\n)\n\nfrom web3._utils.decorators import (\n reject_recursive_repeats,\n)\nfrom web3._utils.toolz import (\n compose,\n cur...
diff --git a/web3/_utils/formatters.py b/web3/_utils/formatters.py index fda742b38b..f2d8aed6d5 100644 --- a/web3/_utils/formatters.py +++ b/web3/_utils/formatters.py @@ -1,4 +1,4 @@ -from collections import ( +from collections.abc import ( Iterable, Mapping, ) diff --git a/web3/datastructures.py b/web3/data...
pretix__pretix-2558
WebAuthn 2FA does not work in Safari (TouchID, Solo2) I'm not quite sure wether this is a Django, Safari, Pretix or whichever bug. I hope we can work out which here, I'm not quite experienced enough with WebAuthn or Django to debug this, I can try things with Safari/macOS though. I can also provide (redacted) logs from...
[ { "content": "#\n# This file is part of pretix (Community Edition).\n#\n# Copyright (C) 2014-2020 Raphael Michel and contributors\n# Copyright (C) 2020-2021 rami.io GmbH and contributors\n#\n# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General\n# Pu...
[ { "content": "#\n# This file is part of pretix (Community Edition).\n#\n# Copyright (C) 2014-2020 Raphael Michel and contributors\n# Copyright (C) 2020-2021 rami.io GmbH and contributors\n#\n# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General\n# Pu...
diff --git a/src/pretix/control/views/user.py b/src/pretix/control/views/user.py index a5ba9e7d918..e78e5c43af9 100644 --- a/src/pretix/control/views/user.py +++ b/src/pretix/control/views/user.py @@ -399,7 +399,8 @@ def get_context_data(self, **kwargs): ukey, self.request.user.email, ...
mesonbuild__meson-11323
`meson setup` takes 2.5 minutes for shared build (static takes 3 seconds) **Describe the bug** `meson setup` takes 2.5 minutes for a shared library build, compared to 3 seconds for a static library build. This is `meson setup` step for a shared library build of a project taking nearly 2.5 minutes to complete. ...
[ { "content": "# Copyright 2012-2020 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless req...
[ { "content": "# Copyright 2012-2020 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless req...
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 9ad40fb4a9a3..37c32bcbe513 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -289,7 +289,6 @@ def detect_cpu_family(compilers: CompilersDict) -> str: trial = platform.processor().lower() else: trial =...
adamchainz__django-cors-headers-406
Allow 'null' in CORS_ORIGIN_WHITELIST check The check added in #397 didn't special-case `null` which it should, as reported in #403 by @subodhjena.
[ { "content": "from __future__ import absolute_import\n\nimport re\nfrom numbers import Integral\n\nfrom django.conf import settings\nfrom django.core import checks\nfrom django.utils import six\nfrom django.utils.six.moves.urllib.parse import urlparse\n\nfrom corsheaders.conf import conf\n\ntry:\n from colle...
[ { "content": "from __future__ import absolute_import\n\nimport re\nfrom numbers import Integral\n\nfrom django.conf import settings\nfrom django.core import checks\nfrom django.utils import six\nfrom django.utils.six.moves.urllib.parse import urlparse\n\nfrom corsheaders.conf import conf\n\ntry:\n from colle...
diff --git a/HISTORY.rst b/HISTORY.rst index 9d68df90..2c507ce3 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -6,6 +6,8 @@ Pending .. Insert new release notes below this line +* Allow 'null' in ``CORS_ORIGIN_WHITELIST`` check. + 3.0.0 (2019-05-10) ------------------ diff --git a/corsheaders/checks.py b/corshea...
nltk__nltk-1936
Audit codebase for pre-PEP 357 slice handling Special handling of slices in getitem methods was not required post PEP 357, cf #1845.
[ { "content": "# Natural Language Toolkit: Texts\n#\n# Copyright (C) 2001-2017 NLTK Project\n# Author: Steven Bird <stevenbird1@gmail.com>\n# Edward Loper <edloper@gmail.com>\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\n\"\"\"\nThis module brings together a variety of NLTK fu...
[ { "content": "# Natural Language Toolkit: Texts\n#\n# Copyright (C) 2001-2017 NLTK Project\n# Author: Steven Bird <stevenbird1@gmail.com>\n# Edward Loper <edloper@gmail.com>\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\n\"\"\"\nThis module brings together a variety of NLTK fu...
diff --git a/AUTHORS.md b/AUTHORS.md index c58f616973..39ad7cea02 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -229,6 +229,7 @@ - Oleg Chislov - Pavan Gururaj Joshi <https://github.com/PavanGJ> - Ethan Hill <https://github.com/hill1303> +- Vivek Lakshmanan ## Others whose work we've taken and included in NLTK, but...
rootpy__rootpy-707
UnboundLocalError: local variable 'hlist' referenced before assignment Hi everyone, The variable `hlist` is not defined in this block: https://github.com/rootpy/rootpy/blob/master/rootpy/plotting/root2matplotlib.py#L451. I believe that adding the line below should fix this issue: ``` python hlist = _maybe_reversed(...
[ { "content": "# Copyright 2012 the rootpy developers\n# distributed under the terms of the GNU General Public License\n\"\"\"\nThis module provides functions that allow the plotting of ROOT histograms and\ngraphs with `matplotlib <http://matplotlib.org/>`_.\n\nIf you just want to save image files and don't want...
[ { "content": "# Copyright 2012 the rootpy developers\n# distributed under the terms of the GNU General Public License\n\"\"\"\nThis module provides functions that allow the plotting of ROOT histograms and\ngraphs with `matplotlib <http://matplotlib.org/>`_.\n\nIf you just want to save image files and don't want...
diff --git a/rootpy/plotting/root2matplotlib.py b/rootpy/plotting/root2matplotlib.py index 7155a8be..f32feacc 100644 --- a/rootpy/plotting/root2matplotlib.py +++ b/rootpy/plotting/root2matplotlib.py @@ -448,6 +448,7 @@ def bar(hists, snap=snap, logy=logy) else: + hl...
ansible__ansible-modules-core-4366
apt_key always fails to import a subkey <!--- Verify first that your issue/request is not already reported in GitHub --> ##### ISSUE TYPE <!--- Pick one below and delete the rest: --> - Bug Report ##### COMPONENT NAME <!--- Name of the plugin/module/task --> apt_key ##### ANSIBLE VERSION <!--- Paste verbatim output...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>\n# (c) 2012, Jayson Vantuyl <jayson@aggressive.ly>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General P...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>\n# (c) 2012, Jayson Vantuyl <jayson@aggressive.ly>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General P...
diff --git a/packaging/os/apt_key.py b/packaging/os/apt_key.py index 09679853f8f..ebcdc3aa4b9 100644 --- a/packaging/os/apt_key.py +++ b/packaging/os/apt_key.py @@ -132,7 +132,7 @@ def all_keys(module, keyring, short_format): results = [] lines = out.split('\n') for line in lines: - if line.starts...
beeware__toga-1634
Source installs no longer working #1614 made some changes to the packaging of modules to support the release package workflow. The wheels generated from this process appear to work fine; however, source installs don't appear to be working. I've had problems on both macOS and Android. **To Reproduce** Steps to re...
[ { "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_web to compute the version;\n# and to support versioned subpackage dependencies\nwith open('src/toga_web/__init__.py', encoding='utf8') as version_file:\n ...
[ { "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_web to compute the version;\n# and to support versioned subpackage dependencies\nwith open('src/toga_web/__init__.py', encoding='utf8') as version_file:\n ...
diff --git a/MANIFEST.in b/MANIFEST.in index 18d25c4d15..db57624a92 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,15 +1,28 @@ include .coveragerc include .pre-commit-config.yaml -include check-packaging.sh include CONTRIBUTING.md include LICENSE include README.rst include release.sh include tox.ini -recursive...
hpcaitech__ColossalAI-5100
[tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests
[ { "content": "import warnings\nfrom typing import List, Optional, Tuple, Union\n\nimport torch\nfrom torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss\nfrom transformers.modeling_outputs import (\n BaseModelOutputWithPast,\n CausalLMOutputWithPast,\n SequenceClassifierOutputWithPast,\n)\nfro...
[ { "content": "import warnings\nfrom typing import List, Optional, Tuple, Union\n\nimport torch\nfrom torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss\nfrom transformers.modeling_outputs import (\n BaseModelOutputWithPast,\n CausalLMOutputWithPast,\n SequenceClassifierOutputWithPast,\n)\nfro...
diff --git a/colossalai/shardformer/modeling/llama.py b/colossalai/shardformer/modeling/llama.py index 4bfef45297ea..0d30b6f7641b 100644 --- a/colossalai/shardformer/modeling/llama.py +++ b/colossalai/shardformer/modeling/llama.py @@ -413,8 +413,6 @@ def get_llama_flash_attention_forward(): warnings.warn("usin...
numba__numba-967
Clarify nopython vs object mode in supported features documentation The supported Python and NumPy features pages should make it clear whether something is supported in nopython mode. This is probably easiest by listing things that are not supported in all modes, and then listing things that are supported in nopython ...
[ { "content": "\"\"\"\nAPI that are reported to numba.cuda\n\"\"\"\n\nfrom __future__ import print_function, absolute_import\nimport contextlib\nimport numpy as np\nfrom .cudadrv import devicearray, devices, driver\n\n\ntry:\n long\nexcept NameError:\n long = int\n\n# NDarray device helper\n\nrequire_conte...
[ { "content": "\"\"\"\nAPI that are reported to numba.cuda\n\"\"\"\n\nfrom __future__ import print_function, absolute_import\nimport contextlib\nimport numpy as np\nfrom .cudadrv import devicearray, devices, driver\n\n\ntry:\n long\nexcept NameError:\n long = int\n\n# NDarray device helper\n\nrequire_conte...
diff --git a/docs/source/cuda/device-management.rst b/docs/source/cuda/device-management.rst index d729bd12c4f..5d6a6e4faa5 100644 --- a/docs/source/cuda/device-management.rst +++ b/docs/source/cuda/device-management.rst @@ -33,10 +33,21 @@ Users can then create a new context with another device. cuda.select_devic...
Qiskit__qiskit-2381
text drawer: gap between gates <!-- ⚠️ If you do not respect this template, your issue will be closed --> <!-- ⚠️ Make sure to browse the opened and closed issues --> ### Information - **Qiskit Terra version**: master - **Python version**: - **Operating system**: ### What is the current behavior? This ci...
[ { "content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2018.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org...
[ { "content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2018.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org...
diff --git a/qiskit/visualization/text.py b/qiskit/visualization/text.py index 771b9e766c44..5f01601f5601 100644 --- a/qiskit/visualization/text.py +++ b/qiskit/visualization/text.py @@ -309,7 +309,7 @@ def __init__(self, label=""): self.top_format = ' %s ' self.mid_format = '─%s─' self.bot_f...
cisagov__manage.get.gov-199
Reconfigure OIDC logout to send client_id Login.gov recently changed their logout method to take `client_id` instead of the previous parameter `id_token_hint`. We need to change our code to match. ![Screen Shot 2022-10-20 at 15 26 58](https://user-images.githubusercontent.com/443389/197051545-59d60ba9-af91-42d7-8d00...
[ { "content": "# coding: utf-8\n\nimport logging\n\nfrom django.conf import settings\nfrom django.contrib.auth import logout as auth_logout\nfrom django.contrib.auth import authenticate, login\nfrom django.http import HttpResponseRedirect\nfrom django.shortcuts import redirect, render\nfrom urllib.parse import p...
[ { "content": "# coding: utf-8\n\nimport logging\n\nfrom django.conf import settings\nfrom django.contrib.auth import logout as auth_logout\nfrom django.contrib.auth import authenticate, login\nfrom django.http import HttpResponseRedirect\nfrom django.shortcuts import redirect, render\nfrom urllib.parse import p...
diff --git a/src/djangooidc/tests/test_views.py b/src/djangooidc/tests/test_views.py index 2895a6099..a3086db50 100644 --- a/src/djangooidc/tests/test_views.py +++ b/src/djangooidc/tests/test_views.py @@ -81,7 +81,6 @@ def test_login_callback_raises(self, mock_auth, mock_client): def test_logout_redirect_url(self,...
numpy__numpy-8602
`iscomplexobj` not working for custom dtypes Hi, As wished by @shoyer in PR #7936 here a new Issue. The PR introduced a small backwards incompatibility, that now bites the [tinyarray](https://gitlab.kwant-project.org/kwant/tinyarray) project, which provides a mostly Numpy compatible array on top of `PyVarObject`s. A...
[ { "content": "\"\"\"Automatically adapted for numpy Sep 19, 2005 by convertcode.py\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\n__all__ = ['iscomplexobj', 'isrealobj', 'imag', 'iscomplex',\n 'isreal', 'nan_to_num', 'real', 'real_if_close',\n 'typename', 'asf...
[ { "content": "\"\"\"Automatically adapted for numpy Sep 19, 2005 by convertcode.py\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\n__all__ = ['iscomplexobj', 'isrealobj', 'imag', 'iscomplex',\n 'isreal', 'nan_to_num', 'real', 'real_if_close',\n 'typename', 'asf...
diff --git a/numpy/lib/tests/test_type_check.py b/numpy/lib/tests/test_type_check.py index 93a4da97a3b0..4523e3f24c4e 100644 --- a/numpy/lib/tests/test_type_check.py +++ b/numpy/lib/tests/test_type_check.py @@ -183,6 +183,15 @@ def dtype(self): dummy = DummyPd() assert_(iscomplexobj(dummy)) + def...
numpy__numpy-8609
`iscomplexobj` not working for custom dtypes Hi, As wished by @shoyer in PR #7936 here a new Issue. The PR introduced a small backwards incompatibility, that now bites the [tinyarray](https://gitlab.kwant-project.org/kwant/tinyarray) project, which provides a mostly Numpy compatible array on top of `PyVarObject`s. A...
[ { "content": "\"\"\"Automatically adapted for numpy Sep 19, 2005 by convertcode.py\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\n__all__ = ['iscomplexobj', 'isrealobj', 'imag', 'iscomplex',\n 'isreal', 'nan_to_num', 'real', 'real_if_close',\n 'typename', 'asf...
[ { "content": "\"\"\"Automatically adapted for numpy Sep 19, 2005 by convertcode.py\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\n__all__ = ['iscomplexobj', 'isrealobj', 'imag', 'iscomplex',\n 'isreal', 'nan_to_num', 'real', 'real_if_close',\n 'typename', 'asf...
diff --git a/numpy/lib/tests/test_type_check.py b/numpy/lib/tests/test_type_check.py index 93a4da97a3b0..4523e3f24c4e 100644 --- a/numpy/lib/tests/test_type_check.py +++ b/numpy/lib/tests/test_type_check.py @@ -183,6 +183,15 @@ def dtype(self): dummy = DummyPd() assert_(iscomplexobj(dummy)) + def...
numpy__numpy-11843
MAINT: Remove surviving and unused list comprehension from _polybase Lines 320 to 325 of `numpy/polynomial/_polybase.py` contains the following code: ``` # filter out uninteresting coefficients filtered_coeffs = [ (i, c) for i, c in enumerate(self.coef) # if n...
[ { "content": "\"\"\"\nAbstract base class for the various polynomial Classes.\n\nThe ABCPolyBase class provides the methods needed to implement the common API\nfor the various polynomial classes. It operates as a mixin, but uses the\nabc module from the stdlib, hence it is only available for Python >= 2.6.\n\n\...
[ { "content": "\"\"\"\nAbstract base class for the various polynomial Classes.\n\nThe ABCPolyBase class provides the methods needed to implement the common API\nfor the various polynomial classes. It operates as a mixin, but uses the\nabc module from the stdlib, hence it is only available for Python >= 2.6.\n\n\...
diff --git a/numpy/polynomial/_polybase.py b/numpy/polynomial/_polybase.py index ccbf30bdad75..de11da9462ab 100644 --- a/numpy/polynomial/_polybase.py +++ b/numpy/polynomial/_polybase.py @@ -317,13 +317,6 @@ def _repr_latex_(self): ) needs_parens = True - # filter out uninteresting co...
kornia__kornia-677
_adapted_uniform is broken for tensors > 1 dimension and same_on_batch=True ## 🐛 Bug `kornia.augmentation.utils.helpers._adapted_uniform` is broken for `len(shape) > 1` and `same_on_batch=True` ## To Reproduce ```python from kornia.augmentation.utils.helpers import _adapted_uniform shape = (1, 2) _adapte...
[ { "content": "from typing import Tuple, Union, List, cast, Optional\n\nimport torch\nfrom torch.distributions import Uniform, Beta\n\n\ndef _infer_batch_shape(input: Union[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]]) -> torch.Size:\n r\"\"\"Infer input shape. Input may be either (tensor,) or (tensor, tr...
[ { "content": "from typing import Tuple, Union, List, cast, Optional\n\nimport torch\nfrom torch.distributions import Uniform, Beta\n\n\ndef _infer_batch_shape(input: Union[torch.Tensor, Tuple[torch.Tensor, torch.Tensor]]) -> torch.Size:\n r\"\"\"Infer input shape. Input may be either (tensor,) or (tensor, tr...
diff --git a/kornia/augmentation/utils/helpers.py b/kornia/augmentation/utils/helpers.py index 0f104244d2..4f7ea0a58d 100644 --- a/kornia/augmentation/utils/helpers.py +++ b/kornia/augmentation/utils/helpers.py @@ -127,7 +127,7 @@ def _adapted_uniform( high = torch.tensor(high, dtype=torch.float32) dist =...
openshift__openshift-ansible-9772
Update the naming of openshift on rhv to ovirt Updated all references of rhv to use ovirt insread, since this is an upstream repo. Signed-off-by: Shirly Radco <sradco@redhat.com> Please review: @yanivlavi @cwilkers
[ { "content": "\"\"\"A setuptools based setup module.\n\n\"\"\"\nfrom __future__ import print_function\n\nimport os\nimport fnmatch\nimport re\nimport sys\nimport subprocess\nimport yaml\n\n# Always prefer setuptools over distutils\nfrom setuptools import setup, Command\nfrom setuptools_lint.setuptools_command i...
[ { "content": "\"\"\"A setuptools based setup module.\n\n\"\"\"\nfrom __future__ import print_function\n\nimport os\nimport fnmatch\nimport re\nimport sys\nimport subprocess\nimport yaml\n\n# Always prefer setuptools over distutils\nfrom setuptools import setup, Command\nfrom setuptools_lint.setuptools_command i...
diff --git a/playbooks/rhv/README.md b/playbooks/ovirt/README.md similarity index 82% rename from playbooks/rhv/README.md rename to playbooks/ovirt/README.md index b62574f6079..25f7fe4fe17 100644 --- a/playbooks/rhv/README.md +++ b/playbooks/ovirt/README.md @@ -1,16 +1,16 @@ -# RHV Playbooks +# oVirt Playbooks ## Prov...
uccser__cs-unplugged-1363
Pixel painter run length encoding assumes lines start with a black pixel The runlength currently assumes that lines start with a black pixel, but it should start with white.
[ { "content": "\"\"\"Class for Pixel Painter resource generator.\"\"\"\n\nfrom PIL import Image, ImageDraw, ImageFont\nfrom math import ceil\nfrom yattag import Doc\nimport string\nfrom resources.utils.BaseResourceGenerator import BaseResourceGenerator\nfrom django.utils.translation import ugettext_lazy as _\nfr...
[ { "content": "\"\"\"Class for Pixel Painter resource generator.\"\"\"\n\nfrom PIL import Image, ImageDraw, ImageFont\nfrom math import ceil\nfrom yattag import Doc\nimport string\nfrom resources.utils.BaseResourceGenerator import BaseResourceGenerator\nfrom django.utils.translation import ugettext_lazy as _\nfr...
diff --git a/csunplugged/resources/generators/PixelPainterResourceGenerator.py b/csunplugged/resources/generators/PixelPainterResourceGenerator.py index d88178244..13b0e7bfa 100644 --- a/csunplugged/resources/generators/PixelPainterResourceGenerator.py +++ b/csunplugged/resources/generators/PixelPainterResourceGenerato...
microsoft__torchgeo-2000
Auto download fails for FireRisk ### Description Auto download fails for the FireRisk dataset hosted on Google Drive. Warning and error: ```bash /home/jb/miniconda3/envs/torchgeo/lib/python3.11/site-packages/torchvision/datasets/utils.py:260: UserWarning: We detected some HTML elements in the downloaded file. Thi...
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"FireRisk dataset.\"\"\"\n\nimport os\nfrom collections.abc import Callable\nfrom typing import cast\n\nimport matplotlib.pyplot as plt\nfrom matplotlib.figure import Figure\nfrom torch import Te...
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"FireRisk dataset.\"\"\"\n\nimport os\nfrom collections.abc import Callable\nfrom typing import cast\n\nimport matplotlib.pyplot as plt\nfrom matplotlib.figure import Figure\nfrom torch import Te...
diff --git a/torchgeo/datasets/fire_risk.py b/torchgeo/datasets/fire_risk.py index e10bbae8aad..b68c5c78be3 100644 --- a/torchgeo/datasets/fire_risk.py +++ b/torchgeo/datasets/fire_risk.py @@ -50,7 +50,7 @@ class FireRisk(NonGeoClassificationDataset): .. versionadded:: 0.5 """ - url = "https://drive.goog...
joke2k__faker-1137
pydict(variable_nb_elements=False) returns dicts with varying number of elements * Faker version: 4.0.1 * OS: OS X 10.15.3 pydict with `variable_nb_elements=False` still has varying number of elements. ### Steps to reproduce ``` from faker import Faker fake = Faker() nb = 80 for _ in range(30): # nb ...
[ { "content": "import string\nimport sys\n\nfrom decimal import Decimal\n\nfrom .. import BaseProvider\n\n\nclass Provider(BaseProvider):\n def pybool(self):\n return self.random_int(0, 1) == 1\n\n def pystr(self, min_chars=None, max_chars=20):\n \"\"\"\n Generates a random string of u...
[ { "content": "import string\nimport sys\n\nfrom decimal import Decimal\n\nfrom .. import BaseProvider\n\n\nclass Provider(BaseProvider):\n def pybool(self):\n return self.random_int(0, 1) == 1\n\n def pystr(self, min_chars=None, max_chars=20):\n \"\"\"\n Generates a random string of u...
diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py index cb99deaea1..f439c958db 100644 --- a/faker/providers/python/__init__.py +++ b/faker/providers/python/__init__.py @@ -163,7 +163,7 @@ def pydict(self, nb_elements=10, variable_nb_elements=True, *value_types): nb_elemen...
feast-dev__feast-3964
Error when fetching historical data from Snowflake with null array type fields ## Expected Behavior When fetching data for an entity that has no record for a feature view with an array type column it should return `None` and not throw an exception. ## Current Behavior When fetching historical data from a Sn...
[ { "content": "import contextlib\nimport json\nimport os\nimport uuid\nimport warnings\nfrom datetime import datetime\nfrom functools import reduce\nfrom pathlib import Path\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n ContextManager,\n Dict,\n Iterator,\n List,\n Literal,\...
[ { "content": "import contextlib\nimport json\nimport os\nimport uuid\nimport warnings\nfrom datetime import datetime\nfrom functools import reduce\nfrom pathlib import Path\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n ContextManager,\n Dict,\n Iterator,\n List,\n Literal,\...
diff --git a/docs/reference/data-sources/overview.md b/docs/reference/data-sources/overview.md index 112d4168d30..302c19b049c 100644 --- a/docs/reference/data-sources/overview.md +++ b/docs/reference/data-sources/overview.md @@ -19,13 +19,13 @@ Details for each specific data source can be found [here](README.md). Belo...
cupy__cupy-3034
`overwrite_x=True` in cupyx.scipy.fft* doesn't do in-place transform for contiguous views Reproducer: ```python >>> import cupy as cp >>> import cupyx.scipy.fftpack as cufft # can also use cupyx.scipy.fft >>> a = cp.random.random((64, 128, 128))+1j*cp.random.random((64, 128, 128)) >>> a.data.ptr 140130136358912 ...
[ { "content": "import copy\nimport functools\nimport math\nimport warnings\n\nimport numpy as np\n\nimport cupy\nfrom cupy.cuda import cufft\nfrom cupy.fft import config\n\n_reduce = functools.reduce\n_prod = cupy.core.internal.prod\n\n\n@cupy.util.memoize()\ndef _output_dtype(dtype, value_type):\n if value_t...
[ { "content": "import copy\nimport functools\nimport math\nimport warnings\n\nimport numpy as np\n\nimport cupy\nfrom cupy.cuda import cufft\nfrom cupy.fft import config\n\n_reduce = functools.reduce\n_prod = cupy.core.internal.prod\n\n\n@cupy.util.memoize()\ndef _output_dtype(dtype, value_type):\n if value_t...
diff --git a/cupy/fft/fft.py b/cupy/fft/fft.py index a0f1b718f76..70b6c970fb6 100644 --- a/cupy/fft/fft.py +++ b/cupy/fft/fft.py @@ -356,9 +356,6 @@ def _exec_fftn(a, direction, value_type, norm, axes, overwrite_x, if fft_type not in [cufft.CUFFT_C2C, cufft.CUFFT_Z2Z]: raise NotImplementedError('Only C2C ...
adamchainz__django-cors-headers-405
Allow 'null' in CORS_ORIGIN_WHITELIST check The check added in #397 didn't special-case `null` which it should, as reported in #403 by @subodhjena.
[ { "content": "import re\nfrom collections.abc import Sequence\nfrom numbers import Integral\nfrom urllib.parse import urlparse\n\nfrom django.conf import settings\nfrom django.core import checks\n\nfrom corsheaders.conf import conf\n\nre_type = type(re.compile(''))\n\n\n@checks.register\ndef check_settings(app_...
[ { "content": "import re\nfrom collections.abc import Sequence\nfrom numbers import Integral\nfrom urllib.parse import urlparse\n\nfrom django.conf import settings\nfrom django.core import checks\n\nfrom corsheaders.conf import conf\n\nre_type = type(re.compile(''))\n\n\n@checks.register\ndef check_settings(app_...
diff --git a/HISTORY.rst b/HISTORY.rst index 85220e76..9a6c06da 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,7 @@ Pending .. Insert new release notes below this line * Drop Python 2 support, only Python 3.4+ is supported now. +* Allow 'null' in ``CORS_ORIGIN_WHITELIST`` check. 3.0.0 (2019-05-10) ------...
jupyterhub__zero-to-jupyterhub-k8s-2285
Relax validation of hub.db.type ### Proposed change With the newly added schema validation (thanks for that, btw!), it's no longer possible to specify a custom database type (outside of the predefined set). It might be a good idea to relax schema validation for `hub.db.type`. In our environment, we decided to sti...
[ { "content": "import glob\nimport os\nimport re\nimport sys\n\nfrom binascii import a2b_hex\n\nfrom tornado.httpclient import AsyncHTTPClient\nfrom kubernetes import client\nfrom jupyterhub.utils import url_path_join\n\n# Make sure that modules placed in the same directory as the jupyterhub config are added to ...
[ { "content": "import glob\nimport os\nimport re\nimport sys\n\nfrom binascii import a2b_hex\n\nfrom tornado.httpclient import AsyncHTTPClient\nfrom kubernetes import client\nfrom jupyterhub.utils import url_path_join\n\n# Make sure that modules placed in the same directory as the jupyterhub config are added to ...
diff --git a/jupyterhub/files/hub/jupyterhub_config.py b/jupyterhub/files/hub/jupyterhub_config.py index 591c1fdb07..3cf5b0dfc8 100644 --- a/jupyterhub/files/hub/jupyterhub_config.py +++ b/jupyterhub/files/hub/jupyterhub_config.py @@ -72,6 +72,8 @@ def camelCaseify(s): os.environ["MYSQL_PWD"] = db_password ...
cupy__cupy-2538
Fix bug in CUB + support complex numbers using CUB This is a followup of #2090. The bulk of this PR is completed, but I mark it WIP so as to gather early feedbacks and comments before proceeding to write tests. This PR does two things: 1. Fix build-time bug: without `#include <stdexcept>` in `cupy/cuda/cupy_cub.cu`...
[ { "content": "import contextlib\nimport distutils.util\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\n\nfrom install import utils\n\n\nPLATFORM_DARWIN = sys.platform.startswith('darwin')\nPLATFORM_LINUX = sys.platform.startswith('linux')\nPLATFORM_WIN32 = sys.platform.star...
[ { "content": "import contextlib\nimport distutils.util\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\n\nfrom install import utils\n\n\nPLATFORM_DARWIN = sys.platform.startswith('darwin')\nPLATFORM_LINUX = sys.platform.startswith('linux')\nPLATFORM_WIN32 = sys.platform.star...
diff --git a/cupy/core/include/cupy/complex/complex.h b/cupy/core/include/cupy/complex/complex.h index 2bce33f7fe7..df280110f50 100644 --- a/cupy/core/include/cupy/complex/complex.h +++ b/cupy/core/include/cupy/complex/complex.h @@ -75,7 +75,7 @@ struct complex { * \param re The real part of the number. * \pa...
scikit-image__scikit-image-2034
System-dependent doctest failures I originally reported these on the [mailing list](https://groups.google.com/forum/#!topic/scikit-image/v8xjq7_2xq4), adding them here for tracking. The solution will in part depend on explicitly setting the print precision in numpy for doctests. Running `skimage.doctest()` on my syste...
[ { "content": "\"\"\"Image Processing SciKit (Toolbox for SciPy)\n\n``scikit-image`` (a.k.a. ``skimage``) is a collection of algorithms for image\nprocessing and computer vision.\n\nThe main package of ``skimage`` only provides a few utilities for converting\nbetween image data types; for most features, you need...
[ { "content": "\"\"\"Image Processing SciKit (Toolbox for SciPy)\n\n``scikit-image`` (a.k.a. ``skimage``) is a collection of algorithms for image\nprocessing and computer vision.\n\nThe main package of ``skimage`` only provides a few utilities for converting\nbetween image data types; for most features, you need...
diff --git a/skimage/__init__.py b/skimage/__init__.py index 8acdb589494..c2456954e7f 100644 --- a/skimage/__init__.py +++ b/skimage/__init__.py @@ -80,6 +80,7 @@ def _test(doctest=False, verbose=False): def _test(doctest=False, verbose=False): """Run all unit tests.""" import nose + impor...
deepchecks__deepchecks-1101
[BUG] some randomness occurring in tabular sample **Describe the bug** The results are not the same even when setting random states **To Reproduce** Run model error / performance report a couple of times **Expected behavior** Same results
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nQuickstart in 5 minutes\n***********************\nIn order to run your first Deepchecks Suite all you need to have is the data\nand model that you wish to validate. More specifically, you need:\n\n* Your train and test data (in Pandas DataFrames or Numpy Arrays)\n*...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nQuickstart in 5 minutes\n***********************\nIn order to run your first Deepchecks Suite all you need to have is the data\nand model that you wish to validate. More specifically, you need:\n\n* Your train and test data (in Pandas DataFrames or Numpy Arrays)\n*...
diff --git a/.gitignore b/.gitignore index f519d554a4..6b4a8f2450 100644 --- a/.gitignore +++ b/.gitignore @@ -108,7 +108,7 @@ docs/source/examples/tabular/checks/methodology/examples/ docs/source/examples/tabular/checks/performance/examples/ docs/source/examples/tabular/use-cases/examples/ docs/source/examples/tabu...
weni-ai__bothub-engine-186
Repository examples method ignore deleted when language is setted Check this line.. https://github.com/Ilhasoft/bothub-engine/blob/master/bothub/common/models.py#L218
[ { "content": "import uuid\nimport base64\nimport requests\n\nfrom functools import reduce\n\nfrom django.db import models\nfrom django.utils.translation import gettext as _\nfrom django.utils import timezone\nfrom django.conf import settings\nfrom django.core.validators import RegexValidator, _lazy_re_compile\n...
[ { "content": "import uuid\nimport base64\nimport requests\n\nfrom functools import reduce\n\nfrom django.db import models\nfrom django.utils.translation import gettext as _\nfrom django.utils import timezone\nfrom django.conf import settings\nfrom django.core.validators import RegexValidator, _lazy_re_compile\n...
diff --git a/Makefile b/Makefile index 53a3216b..769f305f 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,8 @@ test: @make check_environment @make migrate CHECK_ENVIRONMENT=false @make collectstatic CHECK_ENVIRONMENT=false - @SUPPORTED_LANGUAGES="en|pt" pipenv run python manage.py test && pipenv run coverage re...
kivy__kivy-335
Regression when upgrading from 1.0.9-stable to 1.0.10-dev? Hello, I just upgraded Kivy to the latest version via the "git pull" command. I was running 1.0.9 stable and updated Kivy to 1.0.10-dev. When rerunning my program (on 1.0.9 everything works just fine), this error / stacktrace pops up: http://dpaste.com/hold/6...
[ { "content": "'''\nImage\n=====\n\nThe :class:`Image` widget is used to display an image. ::\n\n wimg = Image(source='mylogo.png')\n\nAsynchronous loading\n--------------------\n\nTo load an image asynchronously (for example from an external webserver), use\nthe :class:`AsyncImage` subclass ::\n\n aimg = ...
[ { "content": "'''\nImage\n=====\n\nThe :class:`Image` widget is used to display an image. ::\n\n wimg = Image(source='mylogo.png')\n\nAsynchronous loading\n--------------------\n\nTo load an image asynchronously (for example from an external webserver), use\nthe :class:`AsyncImage` subclass ::\n\n aimg = ...
diff --git a/kivy/uix/image.py b/kivy/uix/image.py index ce8531aac3..eb3cf70c7e 100644 --- a/kivy/uix/image.py +++ b/kivy/uix/image.py @@ -237,7 +237,8 @@ def __init__(self, **kwargs): def on_source(self, instance, value): if not value: - self._coreimage.unbind(on_texture=self._on_tex_change)...
pypa__setuptools-2369
SystemError: Parent module 'setuptools' not loaded, cannot perform relative import with setuptools 50 After upgrading setuptools to 50.0 today, the environment fails to locate the entry points as it could not import distutils ``` $ python --version Python 3.5.1 $ python -c "import distutils" Traceback (most rece...
[ { "content": "import sys\nimport os\nimport re\nimport importlib\nimport warnings\n\n\nis_pypy = '__pypy__' in sys.builtin_module_names\n\n\ndef warn_distutils_present():\n if 'distutils' not in sys.modules:\n return\n if is_pypy and sys.version_info < (3, 7):\n # PyPy for 3.6 unconditionall...
[ { "content": "import sys\nimport os\nimport re\nimport importlib\nimport warnings\n\n\nis_pypy = '__pypy__' in sys.builtin_module_names\n\n\ndef warn_distutils_present():\n if 'distutils' not in sys.modules:\n return\n if is_pypy and sys.version_info < (3, 7):\n # PyPy for 3.6 unconditionall...
diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py index b8410e1fc8..2bc6df7ac7 100644 --- a/_distutils_hack/__init__.py +++ b/_distutils_hack/__init__.py @@ -80,7 +80,7 @@ def spec_for_distutils(self): class DistutilsLoader(importlib.abc.Loader): def create_module(self, spec...
fonttools__fonttools-2083
[varLib] Possible bug in varStore.py? I am trying to learn how VarStores work, and am running into a bit of source code that looks off, even though I'm not sure I fully understand what's going on there. Compare this fragment: https://github.com/fonttools/fonttools/blob/e4b0486b31a50c368a794bb20692903ee55313e5/Lib/f...
[ { "content": "from fontTools.misc.fixedTools import otRound\nfrom fontTools.ttLib.tables import otTables as ot\nfrom fontTools.varLib.models import supportScalar\nfrom fontTools.varLib.builder import (buildVarRegionList, buildVarStore,\n\t\t\t\t buildVarRegion, buildVarData)\nfrom functools import partial\...
[ { "content": "from fontTools.misc.fixedTools import otRound\nfrom fontTools.ttLib.tables import otTables as ot\nfrom fontTools.varLib.models import supportScalar\nfrom fontTools.varLib.builder import (buildVarRegionList, buildVarStore,\n\t\t\t\t buildVarRegion, buildVarData)\nfrom functools import partial\...
diff --git a/Lib/fontTools/varLib/varStore.py b/Lib/fontTools/varLib/varStore.py index 3d9566a1c6..b28d2a6573 100644 --- a/Lib/fontTools/varLib/varStore.py +++ b/Lib/fontTools/varLib/varStore.py @@ -68,7 +68,7 @@ def _add_VarData(self): self._outer = varDataIdx self._data = self._store.VarData[varDataIdx] s...
sopel-irc__sopel-1417
reddit: support all reddit subdomains #1397 adds support for links to `old.reddit.com`, but any two-letter subdomain of `reddit.com` is valid as well. Reddit uses these for internationalization (e.g. `it.reddit.com` -> Italian UI) and also to allow subreddits to add custom styles (a common example is using `np.reddit.c...
[ { "content": "# coding=utf-8\n# Author: Elsie Powell, embolalia.com\nfrom __future__ import unicode_literals, absolute_import, print_function, division\n\nfrom sopel.module import commands, rule, example, require_chanmsg, NOLIMIT, OP\nfrom sopel.formatting import bold, color, colors\nfrom sopel.web import USER_...
[ { "content": "# coding=utf-8\n# Author: Elsie Powell, embolalia.com\nfrom __future__ import unicode_literals, absolute_import, print_function, division\n\nfrom sopel.module import commands, rule, example, require_chanmsg, NOLIMIT, OP\nfrom sopel.formatting import bold, color, colors\nfrom sopel.web import USER_...
diff --git a/sopel/modules/reddit.py b/sopel/modules/reddit.py index b1cc5fbcbe..4c12c6e223 100644 --- a/sopel/modules/reddit.py +++ b/sopel/modules/reddit.py @@ -22,7 +22,7 @@ unescape = HTMLParser().unescape -domain = r'https?://(?:www\.|np\.|old\.)?reddit\.com' +domain = r'https?://(?:www\.|old\.|pay\.|ssl\...
ethereum__web3.py-1846
Can't create filter * Version:5.12.2 * Python: 3.7 * OS: win * `pip freeze` output ``` attrdict==2.0.1 attrs==20.2.0 autobahn==20.7.1 Automat==20.2.0 base58==2.0.0 bitarray==1.2.2 cachetools==4.1.0 certifi==2019.11.28 cffi==1.14.3 chardet==3.0.4 click==7.1.2 colorama==0.4.3 commando==1.0.0 constantly=...
[ { "content": "from abc import (\n ABC,\n abstractmethod,\n)\nfrom enum import Enum\nimport itertools\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Collection,\n Dict,\n Iterable,\n List,\n Optional,\n Sequence,\n Tuple,\n Union,\n cast,\n)\n\nfrom eth_abi import (\n g...
[ { "content": "from abc import (\n ABC,\n abstractmethod,\n)\nfrom enum import Enum\nimport itertools\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Collection,\n Dict,\n Iterable,\n List,\n Optional,\n Sequence,\n Tuple,\n Union,\n cast,\n)\n\nfrom eth_abi import (\n g...
diff --git a/newsfragments/1807.bugfix.rst b/newsfragments/1807.bugfix.rst new file mode 100644 index 0000000000..722a9c0721 --- /dev/null +++ b/newsfragments/1807.bugfix.rst @@ -0,0 +1 @@ +Fix event filter creation if the event ABI contains a ``values`` key. diff --git a/web3/_utils/events.py b/web3/_utils/events.py i...
imAsparky__django-cookiecutter-273
[CHORE]: Improve custom admin create user form. **What is the chore?**
[ { "content": "\"\"\"{{cookiecutter.git_project_name}} project CustomUser Admin.\"\"\"\n\nfrom django.contrib import admin\nfrom django.contrib.auth.admin import UserAdmin\nfrom django.contrib.auth.decorators import login_required\n\nfrom .forms import CustomUserChangeForm, CustomUserCreationForm\nfrom .models i...
[ { "content": "\"\"\"{{cookiecutter.git_project_name}} project CustomUser Admin.\"\"\"\n\nfrom django.contrib import admin\nfrom django.contrib.auth.admin import UserAdmin\nfrom django.contrib.auth.decorators import login_required\n\nfrom .forms import CustomUserChangeForm, CustomUserCreationForm\nfrom .models i...
diff --git a/{{cookiecutter.git_project_name}}/users/admin.py b/{{cookiecutter.git_project_name}}/users/admin.py index 5a4a3032..d96b7e82 100644 --- a/{{cookiecutter.git_project_name}}/users/admin.py +++ b/{{cookiecutter.git_project_name}}/users/admin.py @@ -26,10 +26,10 @@ class CustomUserAdmin(UserAdmin): model ...
nf-core__tools-1441
All modules with the same prefix being found with nf-core modules update ### Description of the bug Not sure whether this affects any other `nf-core modules` commands but if I want to update `minia` in my pipeline then it is correctly updated but another module with the same prefix `miniasm` is being installed too as ...
[ { "content": "import os\nimport requests\nimport base64\nimport sys\nimport logging\nimport nf_core.utils\n\nlog = logging.getLogger(__name__)\n\n\nclass ModulesRepo(object):\n \"\"\"\n An object to store details about the repository being used for modules.\n\n Used by the `nf-core modules` top-level c...
[ { "content": "import os\nimport requests\nimport base64\nimport sys\nimport logging\nimport nf_core.utils\n\nlog = logging.getLogger(__name__)\n\n\nclass ModulesRepo(object):\n \"\"\"\n An object to store details about the repository being used for modules.\n\n Used by the `nf-core modules` top-level c...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f60e68fad..d3f399c08f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ * Added modules ignored table to `nf-core modules bump-versions`. ([#1234](https://github.com/nf-core/tools/issues/1234)) * Added `--conda-package-version` flag for specifying version o...
ManimCommunity__manim-2444
add_axes() not working ## Description of bug / unexpected behavior <!-- Add a clear and concise description of the problem you encountered. --> Whenever I am trying to use add_axes method() [https://docs.manim.community/en/stable/reference/manim.scene.vector_space_scene.VectorScene.html?highlight=add_axes#manim.scene...
[ { "content": "\"\"\"A scene suitable for vector spaces.\"\"\"\n\n__all__ = [\"VectorScene\", \"LinearTransformationScene\"]\n\n\nfrom typing import Optional\n\nimport numpy as np\nfrom colour import Color\n\nfrom manim.utils.config_ops import update_dict_recursively\n\nfrom .. import config\nfrom ..animation.an...
[ { "content": "\"\"\"A scene suitable for vector spaces.\"\"\"\n\n__all__ = [\"VectorScene\", \"LinearTransformationScene\"]\n\n\nfrom typing import Optional\n\nimport numpy as np\nfrom colour import Color\n\nfrom manim.utils.config_ops import update_dict_recursively\n\nfrom .. import config\nfrom ..animation.an...
diff --git a/manim/scene/vector_space_scene.py b/manim/scene/vector_space_scene.py index c758a9fdd2..dd12cb8f6b 100644 --- a/manim/scene/vector_space_scene.py +++ b/manim/scene/vector_space_scene.py @@ -78,7 +78,7 @@ def add_axes(self, animate=False, color=WHITE, **kwargs): color : bool, optional ...
pystiche__pystiche-479
the default value for allow_inplace changed from False to True This change was added in #392 # Before https://github.com/pmeier/pystiche/blob/950b84837df26a0cab2f9f2714884655173206bf/pystiche/enc/models/vgg.py#L149 https://github.com/pmeier/pystiche/blob/950b84837df26a0cab2f9f2714884655173206bf/pystiche/enc/m...
[ { "content": "from abc import abstractmethod\nfrom typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, cast\n\nimport torch\nfrom torch import hub, nn\nfrom torch.nn.modules.module import _IncompatibleKeys\n\nfrom ..multi_layer_encoder import MultiLayerEncoder\nfrom ..prepostprocessing import pre...
[ { "content": "from abc import abstractmethod\nfrom typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, cast\n\nimport torch\nfrom torch import hub, nn\nfrom torch.nn.modules.module import _IncompatibleKeys\n\nfrom ..multi_layer_encoder import MultiLayerEncoder\nfrom ..prepostprocessing import pre...
diff --git a/pystiche/enc/models/utils.py b/pystiche/enc/models/utils.py index 91c04845..bb64e22c 100644 --- a/pystiche/enc/models/utils.py +++ b/pystiche/enc/models/utils.py @@ -48,7 +48,7 @@ def __init__( pretrained: bool = True, framework: str = "torch", internal_preprocessing: bool = True...
nerfstudio-project__nerfstudio-2076
Doc Description Wrong Hello, I find python doc in [get_depth_image_from_path](https://github.com/nerfstudio-project/nerfstudio/blob/main/nerfstudio/data/utils/data_utils.py) is wrong about the return tensor shape, it should be [height, width, 1] not [width, height, 1]. ![图片](https://github.com/nerfstudio-pro...
[ { "content": "# Copyright 2022 the Regents of the University of California, Nerfstudio Team and contributors. 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 a...
[ { "content": "# Copyright 2022 the Regents of the University of California, Nerfstudio Team and contributors. 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 a...
diff --git a/nerfstudio/data/utils/data_utils.py b/nerfstudio/data/utils/data_utils.py index 92a85ef8bc..e3a37a75ac 100644 --- a/nerfstudio/data/utils/data_utils.py +++ b/nerfstudio/data/utils/data_utils.py @@ -74,7 +74,7 @@ def get_depth_image_from_path( interpolation: Depth value interpolation for resizing. ...
ytdl-org__youtube-dl-13605
Stream record npo.nl is broken. ## Please follow the guide below - You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *issue* (like that [x]) - Use *Preview* tab to see how your issue wi...
[ { "content": "from __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..compat import (\n compat_HTTPError,\n compat_str,\n)\nfrom ..utils import (\n determine_ext,\n ExtractorError,\n fix_xml_ampersands,\n orderedSet,\n parse_duration,\n qualities...
[ { "content": "from __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..compat import (\n compat_HTTPError,\n compat_str,\n)\nfrom ..utils import (\n determine_ext,\n ExtractorError,\n fix_xml_ampersands,\n orderedSet,\n parse_duration,\n qualities...
diff --git a/youtube_dl/extractor/npo.py b/youtube_dl/extractor/npo.py index 5f8b6def125..516b1e94147 100644 --- a/youtube_dl/extractor/npo.py +++ b/youtube_dl/extractor/npo.py @@ -341,7 +341,7 @@ def _real_extract(self, url): webpage = self._download_webpage(url, display_id) live_id = self._search_...
localstack__localstack-1584
Lambda containers not cleaned up with LAMBDA_EXECUTOR=docker and LAMBDA_REMOTE_DOCKER='true' # Steps to reproduce * Run `localstack` with `LAMBDA_EXECUTOR=docker` and `LAMBDA_REMOTE_DOCKER=true`. * Create and execute multiple lambda functions. * Run `docker ps -a` and observe multiple `lambci` containers This d...
[ { "content": "import os\nimport re\nimport json\nimport time\nimport logging\nimport threading\nimport subprocess\nfrom localstack.utils.common import (\n get_free_tcp_port)\nfrom multiprocessing import Process, Queue\ntry:\n from shlex import quote as cmd_quote\nexcept ImportError:\n # for Python 2.7\...
[ { "content": "import os\nimport re\nimport json\nimport time\nimport logging\nimport threading\nimport subprocess\nfrom localstack.utils.common import (\n get_free_tcp_port)\nfrom multiprocessing import Process, Queue\ntry:\n from shlex import quote as cmd_quote\nexcept ImportError:\n # for Python 2.7\...
diff --git a/localstack/services/awslambda/lambda_executors.py b/localstack/services/awslambda/lambda_executors.py index 39da21c435eef..46b339f075164 100644 --- a/localstack/services/awslambda/lambda_executors.py +++ b/localstack/services/awslambda/lambda_executors.py @@ -578,6 +578,7 @@ def prepare_execution(self, fun...
google__TensorNetwork-746
add dynamic programming contractor of opt_einsum We should update this asap
[ { "content": "# pylint: disable=cyclic-import\n# Copyright 2019 The TensorNetwork 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/licens...
[ { "content": "# pylint: disable=cyclic-import\n# Copyright 2019 The TensorNetwork 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/licens...
diff --git a/tensornetwork/contractors/opt_einsum_paths/path_contractors.py b/tensornetwork/contractors/opt_einsum_paths/path_contractors.py index b79bc941a..5c6900c1c 100644 --- a/tensornetwork/contractors/opt_einsum_paths/path_contractors.py +++ b/tensornetwork/contractors/opt_einsum_paths/path_contractors.py @@ -117...
speechbrain__speechbrain-1073
CyclicLRScheduler not saving We cannot add the CyclicLRScheduler to the checkpointer, as it has no saving hook registered. Adding @checkpoints.register_checkpoint_hooks above the class seems to do the trick (as done for the other schedulers), however I am not sure if this introduces other problems. Cheers
[ { "content": "\"\"\"\nSchedulers for updating hyperparameters (such as learning rate).\n\nAuthors\n * Mirco Ravanelli 2020\n * Peter Plantinga 2020\n * Loren Lugosch 2020\n\"\"\"\n\nimport math\nimport torch\nimport logging\nfrom speechbrain.utils import checkpoints\n\nlogger = logging.getLogger(__name__)\n\n\n...
[ { "content": "\"\"\"\nSchedulers for updating hyperparameters (such as learning rate).\n\nAuthors\n * Mirco Ravanelli 2020\n * Peter Plantinga 2020\n * Loren Lugosch 2020\n\"\"\"\n\nimport math\nimport torch\nimport logging\nfrom speechbrain.utils import checkpoints\n\nlogger = logging.getLogger(__name__)\n\n\n...
diff --git a/speechbrain/nnet/schedulers.py b/speechbrain/nnet/schedulers.py index 9e76d7b8da..9d963ab734 100644 --- a/speechbrain/nnet/schedulers.py +++ b/speechbrain/nnet/schedulers.py @@ -553,6 +553,7 @@ def load(self, path, end_of_epoch=False, device=None): self.patience_counter = data["patience_counter"] ...
ultrabug__py3status-1795
xkblayout-state should prefer variant if available Hi, I am using xkblayout-state and when I did an update, xkblayout-state is now my preferred command. I switch between us and dvorak often so in order to get it working with my setup I need to have "xkblayout-state print "%E" when its querying the keymaps bef...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nDisplay keyboard layout.\n\nConfiguration parameters:\n button_next: mouse button to cycle next layout (default 4)\n button_prev: mouse button to cycle previous layout (default 5)\n cache_timeout: refresh interval for this module (default 10)\n format: ...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nDisplay keyboard layout.\n\nConfiguration parameters:\n button_next: mouse button to cycle next layout (default 4)\n button_prev: mouse button to cycle previous layout (default 5)\n cache_timeout: refresh interval for this module (default 10)\n format: ...
diff --git a/py3status/modules/keyboard_layout.py b/py3status/modules/keyboard_layout.py index 1d2c83e7bc..8f76ba2e36 100644 --- a/py3status/modules/keyboard_layout.py +++ b/py3status/modules/keyboard_layout.py @@ -167,7 +167,7 @@ def _set_setxkbmap(self): def _set_xkblayout(self): layout = self._layouts[...
python__mypy-2596
`Tuple[()]` is occasionally converted to `Tuple[Any, ...]` Most obvious when the `Tuple[()]` is passed through a Callable ``` from typing import * Type = Callable[[Tuple[()]], int] x = "foo" # type: Type ``` Results in: ``` Incompatible types in assignment (expression has type "str", variable has type Callabl...
[ { "content": "\"\"\"Translate an Expression to a Type value.\"\"\"\n\nfrom mypy.nodes import (\n Expression, NameExpr, MemberExpr, IndexExpr, TupleExpr,\n ListExpr, StrExpr, BytesExpr, UnicodeExpr, EllipsisExpr\n)\nfrom mypy.parsetype import parse_str_as_type, TypeParseError\nfrom mypy.types import Type, ...
[ { "content": "\"\"\"Translate an Expression to a Type value.\"\"\"\n\nfrom mypy.nodes import (\n Expression, NameExpr, MemberExpr, IndexExpr, TupleExpr,\n ListExpr, StrExpr, BytesExpr, UnicodeExpr, EllipsisExpr\n)\nfrom mypy.parsetype import parse_str_as_type, TypeParseError\nfrom mypy.types import Type, ...
diff --git a/mypy/exprtotype.py b/mypy/exprtotype.py index 56732d317c21..abc091a5ddc7 100644 --- a/mypy/exprtotype.py +++ b/mypy/exprtotype.py @@ -37,6 +37,8 @@ def expr_to_unanalyzed_type(expr: Expression) -> Type: else: args = [expr.index] base.args = [expr_to_unanalyzed_typ...
HypothesisWorks__hypothesis-2248
Internal error for unique lists ```python from hypothesis import given, strategies as st @given(st.lists(st.sampled_from([0, 0.0]), unique=True, min_size=1)) def t(x): pass t() ``` triggers an assertion via `conjecture.utils.integer_range(data, lower=0, upper=-1)`
[ { "content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Most of this work is copyright (C) 2013-2019 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full li...
[ { "content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Most of this work is copyright (C) 2013-2019 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full li...
diff --git a/hypothesis-python/RELEASE.rst b/hypothesis-python/RELEASE.rst new file mode 100644 index 0000000000..543590eab0 --- /dev/null +++ b/hypothesis-python/RELEASE.rst @@ -0,0 +1,5 @@ +RELEASE_TYPE: patch + +This patch fixes a rare internal error in strategies for a list of +unique items sampled from a short non...
vyperlang__vyper-1758
Unary subtraction on decimals ### Version Information * vyper Version: 0.1.0b14 ### What's your issue about? In the release beta 14 release notes it says that unary subtraction on unsigend types is now rejected. However, it also happens for decimals. The following ``` @public def negation(d: decimal) -> dec...
[ { "content": "import warnings\n\nfrom vyper import ast\nfrom vyper.exceptions import (\n InvalidLiteralException,\n NonPayableViolationException,\n ParserException,\n StructureException,\n TypeMismatchException,\n VariableDeclarationException,\n)\nfrom vyper.parser import (\n external_call,...
[ { "content": "import warnings\n\nfrom vyper import ast\nfrom vyper.exceptions import (\n InvalidLiteralException,\n NonPayableViolationException,\n ParserException,\n StructureException,\n TypeMismatchException,\n VariableDeclarationException,\n)\nfrom vyper.parser import (\n external_call,...
diff --git a/tests/parser/functions/test_unary.py b/tests/parser/functions/test_unary.py index 347b147141..e95b0500f2 100644 --- a/tests/parser/functions/test_unary.py +++ b/tests/parser/functions/test_unary.py @@ -1,3 +1,7 @@ +from decimal import ( + Decimal, +) + import pytest from vyper.exceptions import ( @@...
scikit-image__scikit-image-5507
uint8 overflow in exposure.adjust_gamma # Description When using the function *skimage.exposure.adjust_gamma* with an uint8 image with a gain superior to 1, the integers can overflow and return false results. A value bigger than 255 should be set to 255. # Way to reproduce ```python from skimage.exposure impo...
[ { "content": "import numpy as np\n\nfrom ..color.colorconv import rgb2gray, rgba2rgb\nfrom ..util.dtype import dtype_range, dtype_limits\nfrom .._shared.utils import warn\n\n\n__all__ = ['histogram', 'cumulative_distribution', 'equalize_hist',\n 'rescale_intensity', 'adjust_gamma', 'adjust_log', 'adju...
[ { "content": "import numpy as np\n\nfrom ..color.colorconv import rgb2gray, rgba2rgb\nfrom ..util.dtype import dtype_range, dtype_limits\nfrom .._shared.utils import warn\n\n\n__all__ = ['histogram', 'cumulative_distribution', 'equalize_hist',\n 'rescale_intensity', 'adjust_gamma', 'adjust_log', 'adju...
diff --git a/skimage/exposure/exposure.py b/skimage/exposure/exposure.py index 917c3ba1d60..aefa5ff8343 100644 --- a/skimage/exposure/exposure.py +++ b/skimage/exposure/exposure.py @@ -437,10 +437,11 @@ def _assert_non_negative(image): def _adjust_gamma_u8(image, gamma, gain): - """LUT based implmentation of ga...
napari__napari-2537
Using escape key permanently hides preferences window ## 🐛 Bug Related to #2527 ... but perhaps different enough for a different issue: If you use the escape key when the preferences window is open, it will indeed close the window. However, using command-W or File > Preferences will not re-show the window.
[ { "content": "import json\n\nfrom qtpy.QtCore import QSize, Signal\nfrom qtpy.QtWidgets import (\n QDialog,\n QHBoxLayout,\n QLabel,\n QListWidget,\n QPushButton,\n QStackedWidget,\n QVBoxLayout,\n QWidget,\n)\n\nfrom ..._vendor.qt_json_builder.qt_jsonschema_form import WidgetBuilder\nfr...
[ { "content": "import json\n\nfrom qtpy.QtCore import QSize, Signal\nfrom qtpy.QtWidgets import (\n QDialog,\n QHBoxLayout,\n QLabel,\n QListWidget,\n QPushButton,\n QStackedWidget,\n QVBoxLayout,\n QWidget,\n)\n\nfrom ..._vendor.qt_json_builder.qt_jsonschema_form import WidgetBuilder\nfr...
diff --git a/napari/_qt/dialogs/preferences_dialog.py b/napari/_qt/dialogs/preferences_dialog.py index ca824625b44..f79fd449b38 100644 --- a/napari/_qt/dialogs/preferences_dialog.py +++ b/napari/_qt/dialogs/preferences_dialog.py @@ -76,6 +76,11 @@ def closeEvent(self, event): self.closed.emit() super(...
ray-project__ray-833
Cannot run Ray in two separate interpreters with Python 2. To reproduce this problem, run the following in two separate interpreters. ```python import ray ray.init() ``` In the second one, I see the following error. ``` --------------------------------------------------------------------------- error ...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom collections import namedtuple, OrderedDict\nimport os\nimport psutil\nimport random\nimport redis\nimport shutil\nimport signal\nimport socket\nimport subprocess\nimport sys\nimpo...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom collections import namedtuple, OrderedDict\nimport os\nimport psutil\nimport random\nimport redis\nimport shutil\nimport signal\nimport socket\nimport subprocess\nimport sys\nimpo...
diff --git a/python/ray/services.py b/python/ray/services.py index 2cbef357e5d3c..984e508733dab 100644 --- a/python/ray/services.py +++ b/python/ray/services.py @@ -478,7 +478,7 @@ def start_ui(redis_address, stdout_file=None, stderr_file=None, cleanup=True): port_test_socket.bind(("127.0.0.1", port)) ...
frappe__frappe-14370
frappe.db.exists is not available to Server Scripts **Is your feature request related to a problem? Please describe.** `frappe.db.exists` is not exposed to **Server Scripts**. **Describe alternatives you've considered** Currently I am using `frappe.get_all` with `filters` and `limit=1` to check for existence.
[ { "content": "\nimport os, json, inspect\nimport mimetypes\nfrom html2text import html2text\nfrom RestrictedPython import compile_restricted, safe_globals\nimport RestrictedPython.Guards\nimport frappe\nfrom frappe import _\nimport frappe.utils\nimport frappe.utils.data\nfrom frappe.website.utils import (get_sh...
[ { "content": "\nimport os, json, inspect\nimport mimetypes\nfrom html2text import html2text\nfrom RestrictedPython import compile_restricted, safe_globals\nimport RestrictedPython.Guards\nimport frappe\nfrom frappe import _\nimport frappe.utils\nimport frappe.utils.data\nfrom frappe.website.utils import (get_sh...
diff --git a/frappe/utils/safe_exec.py b/frappe/utils/safe_exec.py index 0d1574b49af0..1751d41b66fd 100644 --- a/frappe/utils/safe_exec.py +++ b/frappe/utils/safe_exec.py @@ -147,6 +147,7 @@ def get_safe_globals(): set_value = frappe.db.set_value, get_single_value = frappe.db.get_single_value, get_default =...
vas3k__vas3k.club-220
Только часть id до дефиса выделена когда тебя @тэгнули ![image](https://user-images.githubusercontent.com/1266401/82743081-c3293b00-9d5d-11ea-97cd-c1bb986a8b64.png) https://vas3k.club/post/2295/#comment-8177cee9-5bef-49bf-bade-44deea61e5d5
[ { "content": "import re\n\nUSERNAME_RE = re.compile(r\"(?:\\s|\\n|^)@([A-Za-z0-9_]{3,})\")\nIMAGE_RE = re.compile(r\"(http(s?):)([/|.|\\w|\\s|-])*\\.(?:jpg|jpeg|gif|png)\")\nVIDEO_RE = re.compile(r\"(http(s?):)([/|.|\\w|\\s|-])*\\.(?:mov|mp4)\")\nYOUTUBE_RE = re.compile(\n r\"http(?:s?):\\/\\/(?:www\\.)?yout...
[ { "content": "import re\n\nUSERNAME_RE = re.compile(r\"(?:\\s|\\n|^)@([A-Za-z0-9_-]{3,})\")\nIMAGE_RE = re.compile(r\"(http(s?):)([/|.|\\w|\\s|-])*\\.(?:jpg|jpeg|gif|png)\")\nVIDEO_RE = re.compile(r\"(http(s?):)([/|.|\\w|\\s|-])*\\.(?:mov|mp4)\")\nYOUTUBE_RE = re.compile(\n r\"http(?:s?):\\/\\/(?:www\\.)?you...
diff --git a/common/regexp.py b/common/regexp.py index a45abdea8..b1127dfbf 100644 --- a/common/regexp.py +++ b/common/regexp.py @@ -1,6 +1,6 @@ import re -USERNAME_RE = re.compile(r"(?:\s|\n|^)@([A-Za-z0-9_]{3,})") +USERNAME_RE = re.compile(r"(?:\s|\n|^)@([A-Za-z0-9_-]{3,})") IMAGE_RE = re.compile(r"(http(s?):)([/...
pallets__werkzeug-1569
suspicious first argument to super The first line of `HTTPException.__init__()` is https://github.com/pallets/werkzeug/blob/6e7c8bea0f307633e70d979fe0a89e046accc598/src/werkzeug/exceptions.py#L87 It is suspicious that this is not `super(HTTPException, ...)`. This should be changed if it is unintended or explained i...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.exceptions\n ~~~~~~~~~~~~~~~~~~~\n\n This module implements a number of Python exceptions you can raise from\n within your views to trigger a standard non-200 response.\n\n\n Usage Example\n -------------\n\n ::\n\n from werkze...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.exceptions\n ~~~~~~~~~~~~~~~~~~~\n\n This module implements a number of Python exceptions you can raise from\n within your views to trigger a standard non-200 response.\n\n\n Usage Example\n -------------\n\n ::\n\n from werkze...
diff --git a/src/werkzeug/exceptions.py b/src/werkzeug/exceptions.py index fb6528d84..9826e0f5d 100644 --- a/src/werkzeug/exceptions.py +++ b/src/werkzeug/exceptions.py @@ -84,7 +84,7 @@ class HTTPException(Exception): description = None def __init__(self, description=None, response=None): - super(Ex...
Lightning-AI__pytorch-lightning-3796
training_step log requires that tbptt_reduce_fx is also set ## 🐛 Bug `training_step` `log` requires that `tbptt_reduce_fx` is also set. #### Code sample ```python def training_step(self, batch, batch_idx): ... self.log("train_loss", loss, on_step=False, on_epoch=True, sync_dist=True) self.log(...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
diff --git a/pytorch_lightning/core/step_result.py b/pytorch_lightning/core/step_result.py index 28f0e91f872dd..8d8e578fbc7a8 100644 --- a/pytorch_lightning/core/step_result.py +++ b/pytorch_lightning/core/step_result.py @@ -420,7 +420,7 @@ def reduce_across_time(cls, time_outputs): tbptt_reduce_fx = t...
django-cms__django-cms-3267
api.create_page doesn't allow reverse_id for multi site apps In 3.0.2 cms/api.py:194 ``` if Page.objects.drafts().filter(reverse_id=reverse_id).count(): ``` should include site otherwise pages with a reverse ID can not be created in multiple sites
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nPublic Python API to create CMS contents.\n\nWARNING: None of the functions defined in this module checks for permissions.\nYou must implement the necessary permission checks in your own code before\ncalling these methods!\n\"\"\"\nimport datetime\nfrom cms.constan...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nPublic Python API to create CMS contents.\n\nWARNING: None of the functions defined in this module checks for permissions.\nYou must implement the necessary permission checks in your own code before\ncalling these methods!\n\"\"\"\nimport datetime\nfrom cms.constan...
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b0c9c9bf4e8..95a63004d83 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -237,3 +237,4 @@ Please see Install/2.4 release notes *before* attempting to upgrade to version 2 - Added an api to change the context menus of plugins and placeholders from plugins - Apphooks r...
streamlit__streamlit-1942
Crazy error message shown when two widgets have the same key # Steps to reproduce 1. Run this code ``` import streamlit as st st.button("OK") st.button("OK") ``` 2. Observe! ## Expected behavior: You should get one button plus an error message explaining you can't have to `st.button` cal...
[ { "content": "import textwrap\n\nfrom streamlit import type_util\nfrom streamlit.report_thread import get_report_ctx\nfrom streamlit.errors import DuplicateWidgetID\nfrom typing import Optional, Any\n\n\nclass NoValue(object):\n \"\"\"Return this from DeltaGenerator.foo_widget() when you want the st.foo_widg...
[ { "content": "import textwrap\n\nfrom streamlit import type_util\nfrom streamlit.report_thread import get_report_ctx\nfrom streamlit.errors import DuplicateWidgetID\nfrom typing import Optional, Any\n\n\nclass NoValue(object):\n \"\"\"Return this from DeltaGenerator.foo_widget() when you want the st.foo_widg...
diff --git a/lib/streamlit/elements/utils.py b/lib/streamlit/elements/utils.py index fda1653bd0e7..aca850f08cb3 100644 --- a/lib/streamlit/elements/utils.py +++ b/lib/streamlit/elements/utils.py @@ -90,7 +90,7 @@ def _set_widget_id( added = ctx.widget_ids_this_run.add(widget_id) if not added: ...
akvo__akvo-rsr-3753
Show only relevant updates in typeahead on Akvo pages Currently, all updates can be searched for on partner site updates typeahead.
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"Akvo RSR is covered by the GNU Affero General Public License.\nSee more details in the license.txt file located at the root folder of the\nAkvo RSR module. For additional details on the GNU license please\nsee < http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\nf...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"Akvo RSR is covered by the GNU Affero General Public License.\nSee more details in the license.txt file located at the root folder of the\nAkvo RSR module. For additional details on the GNU license please\nsee < http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\nf...
diff --git a/akvo/rest/views/typeahead.py b/akvo/rest/views/typeahead.py index c7216e9feb..045e19cd2c 100644 --- a/akvo/rest/views/typeahead.py +++ b/akvo/rest/views/typeahead.py @@ -134,7 +134,8 @@ def typeahead_impact_projects(request): @api_view(['GET']) def typeahead_projectupdate(request): - updates = Proje...
ckan__ckan-6709
Obsolete requirements **CKAN version** 2.9.5 **Describe the bug** Obsolete requirements: * pytz is pinned to 2016, https://github.com/ckan/ckan/blob/2.9/requirements.in#L23 * Zope.interface is pinned to a version from 2016, prior to python 3.6 support. https://github.com/ckan/ckan/blob/2.9/requirements.in#L3...
[ { "content": "# encoding: utf-8\nfrom __future__ import annotations\n\nimport socket\nimport string\nimport logging\nimport collections\nimport json\nimport datetime\nimport re\nfrom dateutil.parser import parse\nfrom typing import Any, NoReturn, Optional, cast\n\nimport six\nimport pysolr\nfrom ckan.common imp...
[ { "content": "# encoding: utf-8\nfrom __future__ import annotations\n\nimport socket\nimport string\nimport logging\nimport collections\nimport json\nimport datetime\nimport re\nfrom dateutil.parser import parse\nfrom typing import Any, NoReturn, Optional, cast\n\nimport six\nimport pysolr\nfrom ckan.common imp...
diff --git a/ckan/lib/search/index.py b/ckan/lib/search/index.py index 010b385f8e9..2636c2d8ae2 100644 --- a/ckan/lib/search/index.py +++ b/ckan/lib/search/index.py @@ -52,6 +52,7 @@ def clear_index() -> None: query = "+site_id:\"%s\"" % (config.get_value('ckan.site_id')) try: conn.delete(q=query) + ...
pytorch__ignite-1179
Suddenly failing tests with a NotImplementedError ## 🐛 Bug description Getting a strange bug in recent commits to nussl with the latest ignite version. They look like this: ``` tests/separation/test_deep.py:62: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ nussl/ml/train/tr...
[ { "content": "import numbers\nimport warnings\nimport weakref\nfrom enum import Enum\nfrom types import DynamicClassAttribute\nfrom typing import Callable, Optional, Union\n\nfrom ignite.engine.utils import _check_signature\n\n__all__ = [\"CallableEventWithFilter\", \"EventEnum\", \"Events\", \"State\"]\n\n\ncl...
[ { "content": "import numbers\nimport warnings\nimport weakref\nfrom enum import Enum\nfrom types import DynamicClassAttribute\nfrom typing import Callable, Optional, Union\n\nfrom ignite.engine.utils import _check_signature\n\n__all__ = [\"CallableEventWithFilter\", \"EventEnum\", \"Events\", \"State\"]\n\n\ncl...
diff --git a/docs/source/concepts.rst b/docs/source/concepts.rst index af841d4b119d..bb91e261ba39 100644 --- a/docs/source/concepts.rst +++ b/docs/source/concepts.rst @@ -229,10 +229,33 @@ event filtering function: trainer.run(train_loader, max_epochs=100) -.. Note :: +The user can also define custom events. E...
ansible-collections__community.general-3711
redfish_command: example command has wrong arg ### Summary The example in `redfish_command` is missing underscore in the arg `boot_next`: ```yaml - name: Set one-time boot to BiosSetup community.general.redfish_command: category: Systems command: SetOneTimeBoot bootnext: BiosSetup boot_overrid...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2017-2018 Dell EMC Inc.\n# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\nDOCUMENTATION = '''\n---\...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2017-2018 Dell EMC Inc.\n# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\nDOCUMENTATION = '''\n---\...
diff --git a/plugins/modules/remote_management/redfish/redfish_command.py b/plugins/modules/remote_management/redfish/redfish_command.py index 8702e468ca4..5437a798916 100644 --- a/plugins/modules/remote_management/redfish/redfish_command.py +++ b/plugins/modules/remote_management/redfish/redfish_command.py @@ -307,7 +...
zestedesavoir__zds-site-5136
La légende de mes images est ignorée à l'upload Lors de l'ajout d'une image dans la galerie, la légende de l'image prend la même valeur que le titre. Par contre, lors de la mise à jour d'une image, la légende prend bien la bonne valeur. > Salut à tous, > > Je viens de voir ça en ajoutant des images à la galerie d...
[ { "content": "from django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.models import User\nfrom django.core.exceptions import PermissionDenied\nfrom django.core.urlresolvers import reverse\nfrom django.http import Http404, HttpResponseRedirect\nfrom django.views.generic im...
[ { "content": "from django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.models import User\nfrom django.core.exceptions import PermissionDenied\nfrom django.core.urlresolvers import reverse\nfrom django.http import Http404, HttpResponseRedirect\nfrom django.views.generic im...
diff --git a/zds/gallery/views.py b/zds/gallery/views.py index 66f931ca43..20abeded5a 100644 --- a/zds/gallery/views.py +++ b/zds/gallery/views.py @@ -313,7 +313,7 @@ def form_valid(self, form): self.perform_create( form.cleaned_data.get('title'), self.request.FILES.get('physical'), -...
opendatacube__datacube-core-898
Documentation for indexing from s3 contains mistakes resolution for EPSG:4326 should be in degrees not in meters: https://github.com/opendatacube/datacube-core/commit/363a11c9f39a40c8fba958cb265ace193d7849b6#diff-95fd54d5e1fd0aea8de7aacba3ad495cR323
[ { "content": "# coding=utf-8\n\"\"\"\nUser configuration.\n\"\"\"\n\nimport os\nfrom pathlib import Path\nimport configparser\nfrom urllib.parse import unquote_plus, urlparse\nfrom typing import Optional, Iterable, Union, Any, Tuple, Dict\n\nPathLike = Union[str, 'os.PathLike[Any]']\n\n\nENVIRONMENT_VARNAME = '...
[ { "content": "# coding=utf-8\n\"\"\"\nUser configuration.\n\"\"\"\n\nimport os\nfrom pathlib import Path\nimport configparser\nfrom urllib.parse import unquote_plus, urlparse\nfrom typing import Optional, Iterable, Union, Any, Tuple, Dict\n\nPathLike = Union[str, 'os.PathLike[Any]']\n\n\nENVIRONMENT_VARNAME = '...
diff --git a/datacube/config.py b/datacube/config.py index b2320e6f72..93414a24c2 100755 --- a/datacube/config.py +++ b/datacube/config.py @@ -227,7 +227,7 @@ def auto_config() -> str: Render config to $DATACUBE_CONFIG_PATH or ~/.datacube.conf, but only if doesn't exist. option1: - DATACUBE_DB_URL pos...
encode__httpx-763
urllib3.ProxyManager() instantiation is broken. python 3.7.5 httpx 0.11.0 urllib3 1.25.7 ``` $ ipython3 -c 'import httpx; r = httpx.get("https://www.google.com")' parse_url http://127.0.0.1:1234 <class 'httpx.models.URL'> --------------------------------------------------------------------------- TypeError ...
[ { "content": "import math\nimport socket\nimport ssl\nimport typing\n\nimport urllib3\nfrom urllib3.exceptions import MaxRetryError, SSLError\n\nfrom ..config import (\n DEFAULT_POOL_LIMITS,\n CertTypes,\n PoolLimits,\n Proxy,\n SSLConfig,\n Timeout,\n VerifyTypes,\n)\nfrom ..content_stream...
[ { "content": "import math\nimport socket\nimport ssl\nimport typing\n\nimport urllib3\nfrom urllib3.exceptions import MaxRetryError, SSLError\n\nfrom ..config import (\n DEFAULT_POOL_LIMITS,\n CertTypes,\n PoolLimits,\n Proxy,\n SSLConfig,\n Timeout,\n VerifyTypes,\n)\nfrom ..content_stream...
diff --git a/httpx/dispatch/urllib3.py b/httpx/dispatch/urllib3.py index 1782834400..2728170c14 100644 --- a/httpx/dispatch/urllib3.py +++ b/httpx/dispatch/urllib3.py @@ -77,7 +77,7 @@ def init_pool_manager( ) else: return urllib3.ProxyManager( - proxy_url=proxy.url, + ...
pypa__cibuildwheel-1311
Minor warning: still showing 'root' user warning on Linux Still seeing this in 2.11.1, even after #1304: ``` Successfully installed mypy_extensions-0.4.3 setuptools-65.4.1 tomli-2.0.1 types-psutil-5.9.5.1 types-setuptools-65.4.0.0 types-typed-ast-1.5.8 typing_extensions-4.4.0 wheel-0.37.1 WARNING: Running pip ...
[ { "content": "from __future__ import annotations\n\nimport subprocess\nimport sys\nimport textwrap\nfrom dataclasses import dataclass\nfrom pathlib import Path, PurePath, PurePosixPath\nfrom typing import Iterator, Tuple\n\nfrom .architecture import Architecture\nfrom .logger import log\nfrom .oci_container imp...
[ { "content": "from __future__ import annotations\n\nimport subprocess\nimport sys\nimport textwrap\nfrom dataclasses import dataclass\nfrom pathlib import Path, PurePath, PurePosixPath\nfrom typing import Iterator, Tuple\n\nfrom .architecture import Architecture\nfrom .logger import log\nfrom .oci_container imp...
diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index 80a626398..c30c2ef4c 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -189,6 +189,8 @@ def build_in_container( log.step("Setting up build environment...") env = container.get_environment() + env["PIP_DISABLE_PIP...
liqd__a4-meinberlin-2170
Identity spoofing via secondary email See https://github.com/pennersr/django-allauth/issues/2265 cc: @CarolingerSeilchenspringer @MagdaN @fuzzylogic2000
[ { "content": "import re\nfrom urllib.parse import quote\n\nfrom allauth.account.adapter import DefaultAccountAdapter\nfrom django.conf import settings\nfrom django.utils.http import is_safe_url\n\nfrom adhocracy4.emails.mixins import SyncEmailMixin\nfrom meinberlin.apps.contrib.emails import Email\nfrom meinber...
[ { "content": "import re\nfrom urllib.parse import quote\n\nfrom allauth.account.adapter import DefaultAccountAdapter\nfrom django.conf import settings\nfrom django.utils.http import is_safe_url\n\nfrom adhocracy4.emails.mixins import SyncEmailMixin\nfrom meinberlin.apps.contrib.emails import Email\nfrom meinber...
diff --git a/meinberlin/apps/users/adapters.py b/meinberlin/apps/users/adapters.py index 072e30bda8..c3858c2563 100644 --- a/meinberlin/apps/users/adapters.py +++ b/meinberlin/apps/users/adapters.py @@ -40,9 +40,8 @@ def get_email_confirmation_url(self, request, emailconfirmation): return url def se...
bridgecrewio__checkov-489
Checkov crashes when evaluating a Terraform dynamic block in NSGRulePortAccessRestricted.py **Describe the bug** When checking azure_security_group_rule, azurerm_network_security_rule or azurerm_network_security_group Terraform resource types, NSGRulePortAccessRestricted.py throws a "TypeError: string indices must be ...
[ { "content": "from checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceCheck\nfrom checkov.common.util.type_forcers import force_list\nimport re\n\nINTERNET_ADDRESSES = [\"*\", \"0.0.0.0\", \"<nw>/0\", \"/0\", \"int...
[ { "content": "from checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceCheck\nfrom checkov.common.util.type_forcers import force_list\nimport re\n\nINTERNET_ADDRESSES = [\"*\", \"0.0.0.0\", \"<nw>/0\", \"/0\", \"int...
diff --git a/checkov/terraform/checks/resource/azure/NSGRulePortAccessRestricted.py b/checkov/terraform/checks/resource/azure/NSGRulePortAccessRestricted.py index 6b09a00414..2b15f79fd8 100644 --- a/checkov/terraform/checks/resource/azure/NSGRulePortAccessRestricted.py +++ b/checkov/terraform/checks/resource/azure/NSGR...
Zeroto521__my-data-toolkit-580
MAINT: Simplify `register_method_factory` <!-- Thanks for contributing a pull request! Please follow these standard acronyms to start the commit message: - ENH: enhancement - BUG: bug fix - DOC: documentation - TYP: type annotations - TST: addition or modification of tests - MAINT: maintenance commit (refac...
[ { "content": "from __future__ import annotations\n\nfrom functools import wraps\nfrom typing import Callable\n\nfrom pandas.api.extensions import register_dataframe_accessor\nfrom pandas.api.extensions import register_index_accessor\nfrom pandas.api.extensions import register_series_accessor\nfrom pandas.util._...
[ { "content": "from __future__ import annotations\n\nfrom functools import wraps\nfrom typing import Callable\n\nfrom pandas.api.extensions import register_dataframe_accessor\nfrom pandas.api.extensions import register_index_accessor\nfrom pandas.api.extensions import register_series_accessor\nfrom pandas.util._...
diff --git a/dtoolkit/accessor/register.py b/dtoolkit/accessor/register.py index 8550be4cd..8c6e24102 100644 --- a/dtoolkit/accessor/register.py +++ b/dtoolkit/accessor/register.py @@ -34,6 +34,7 @@ def register_method_factory(register_accessor): # based on pandas_flavor/register.py def register_accessor_me...
certbot__certbot-606
nginx plugin destroys config I have a config file called webp.conf in /etc/nginx/conf.d/ which works great. After running letsencrypt -d example.org run the webp.conf is broken because it's missing a closing } https://pastebin.mozilla.org/8837365 Line 18 gets removed.
[ { "content": "\"\"\"Very low-level nginx config parser based on pyparsing.\"\"\"\nimport string\n\nfrom pyparsing import (\n Literal, White, Word, alphanums, CharsNotIn, Forward, Group,\n Optional, OneOrMore, Regex, ZeroOrMore)\nfrom pyparsing import stringEnd\nfrom pyparsing import restOfLine\n\nclass Ra...
[ { "content": "\"\"\"Very low-level nginx config parser based on pyparsing.\"\"\"\nimport string\n\nfrom pyparsing import (\n Literal, White, Word, alphanums, CharsNotIn, Forward, Group,\n Optional, OneOrMore, Regex, ZeroOrMore)\nfrom pyparsing import stringEnd\nfrom pyparsing import restOfLine\n\nclass Ra...
diff --git a/letsencrypt-nginx/letsencrypt_nginx/nginxparser.py b/letsencrypt-nginx/letsencrypt_nginx/nginxparser.py index 7870581b442..814b5f15eb4 100644 --- a/letsencrypt-nginx/letsencrypt_nginx/nginxparser.py +++ b/letsencrypt-nginx/letsencrypt_nginx/nginxparser.py @@ -37,7 +37,7 @@ class RawNginxParser(object): ...
interlegis__sapl-1349
Falta label de processo nos detalhes da matéria O número do processo está perdido em meio aos detalhes da matéria. Falta o label processo ![image](https://user-images.githubusercontent.com/13314947/28427707-78e650de-6d4d-11e7-93e9-deabf93ba1d9.png) ![image](https://user-images.githubusercontent.com/13314947/28...
[ { "content": "from math import ceil\n\nfrom crispy_forms.bootstrap import FormActions\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import HTML, Div, Fieldset, Layout, Submit\nfrom django import template\nfrom django.core.urlresolvers import reverse\nfrom django.utils import formats\nfro...
[ { "content": "from math import ceil\n\nfrom crispy_forms.bootstrap import FormActions\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import HTML, Div, Fieldset, Layout, Submit\nfrom django import template\nfrom django.core.urlresolvers import reverse\nfrom django.utils import formats\nfro...
diff --git a/sapl/crispy_layout_mixin.py b/sapl/crispy_layout_mixin.py index 29cd7849f..e46a193e1 100644 --- a/sapl/crispy_layout_mixin.py +++ b/sapl/crispy_layout_mixin.py @@ -67,7 +67,10 @@ def get_field_display(obj, fieldname): ou mesmo uma método no model. """ value = getattr(obj, fie...
jschneier__django-storages-1313
Not setting bucket name causes confusing error I'm learning django-storages by starting with zero configuration and adding what's needed one bit at a time to see how it alters behavior. When I configure credentials but not a default bucket, then make a request to the server, it fails with a `ValueError`. This sto...
[ { "content": "import mimetypes\nimport os\nimport posixpath\nimport tempfile\nimport threading\nimport warnings\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom urllib.parse import parse_qsl\nfrom urllib.parse import urlencode\nfrom urllib.parse import urlsplit\n\nfrom django.contrib.staticf...
[ { "content": "import mimetypes\nimport os\nimport posixpath\nimport tempfile\nimport threading\nimport warnings\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom urllib.parse import parse_qsl\nfrom urllib.parse import urlencode\nfrom urllib.parse import urlsplit\n\nfrom django.contrib.staticf...
diff --git a/storages/backends/s3.py b/storages/backends/s3.py index cf5dbe42c..fdfc03d21 100644 --- a/storages/backends/s3.py +++ b/storages/backends/s3.py @@ -288,6 +288,8 @@ def __init__(self, **settings): super().__init__(**settings) check_location(self) + if not self.bucket_name: + ...
cornellius-gp__gpytorch-1647
Slow convergence of MultiTask regressor and unreliable results. Hello everyone, Currently I am trying to learn a model to predict multiple real-valued properties of a cellular image. I have a baseline that uses CNN (e.g. resnet) as feature extractor and FC head as predictor. I would like to try to use GP as predict...
[ { "content": "#!/usr/bin/env python3\n\nfrom ..distributions import MultivariateNormal\nfrom ..likelihoods import _GaussianLikelihoodBase\nfrom .marginal_log_likelihood import MarginalLogLikelihood\n\n\nclass ExactMarginalLogLikelihood(MarginalLogLikelihood):\n \"\"\"\n The exact marginal log likelihood (...
[ { "content": "#!/usr/bin/env python3\n\nfrom ..distributions import MultivariateNormal\nfrom ..likelihoods import _GaussianLikelihoodBase\nfrom .marginal_log_likelihood import MarginalLogLikelihood\n\n\nclass ExactMarginalLogLikelihood(MarginalLogLikelihood):\n \"\"\"\n The exact marginal log likelihood (...
diff --git a/gpytorch/mlls/exact_marginal_log_likelihood.py b/gpytorch/mlls/exact_marginal_log_likelihood.py index 21196eb2c..f2306d2f2 100644 --- a/gpytorch/mlls/exact_marginal_log_likelihood.py +++ b/gpytorch/mlls/exact_marginal_log_likelihood.py @@ -63,7 +63,7 @@ def forward(self, function_dist, target, *params): ...
NVIDIA__apex-184
Failing optim_wrapper due to missing Scaler argument When creating an optimizer and wrapping it via ``amp_handle.wrap_optimizer(optim)``, the handle [`calls the OptimWrapper`](https://github.com/NVIDIA/apex/blob/master/apex/amp/handle.py#L148), who wraps the optimizer and tries to instantiate a loss scaler per loss. ...
[ { "content": "import contextlib\nimport logging\nimport warnings\n\nfrom .scaler import LossScaler, master_params\n\nimport numpy as np\n\nclass OptimWrapper(object):\n def __init__(self, optimizer, amp_handle, num_loss):\n self._optimizer = optimizer\n self._amp_handle = amp_handle\n se...
[ { "content": "import contextlib\nimport logging\nimport warnings\n\nfrom .scaler import LossScaler, master_params\n\nimport numpy as np\n\nclass OptimWrapper(object):\n def __init__(self, optimizer, amp_handle, num_loss):\n self._optimizer = optimizer\n self._amp_handle = amp_handle\n se...
diff --git a/apex/amp/opt.py b/apex/amp/opt.py index 2f21f20c2..3d6f2fe4f 100644 --- a/apex/amp/opt.py +++ b/apex/amp/opt.py @@ -13,7 +13,7 @@ def __init__(self, optimizer, amp_handle, num_loss): self._num_loss = num_loss self._loss_idx = 0 self._skip_next = [False] * num_loss - self._...
privacyidea__privacyidea-1570
Realm-Select box with broken "placeholder" In the login screen there is a realm select box. The placeholder for the select box does not work: https://github.com/privacyidea/privacyidea/blob/master/privacyidea/static/components/login/views/login.html#L63 We could either fix the placeholder or preselect the defaul...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# http://www.privacyidea.org\n# (c) cornelius kölbel, privacyidea.org\n#\n# 2017-11-14 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Add custom baseline and menu\n# 2016-01-07 Cornelius Kölbel <cornelius@privacyidea.org>\n# Add password res...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# http://www.privacyidea.org\n# (c) cornelius kölbel, privacyidea.org\n#\n# 2017-11-14 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Add custom baseline and menu\n# 2016-01-07 Cornelius Kölbel <cornelius@privacyidea.org>\n# Add password res...
diff --git a/po/de.po b/po/de.po index c8627f12fb..e6ed5157c7 100644 --- a/po/de.po +++ b/po/de.po @@ -601,6 +601,10 @@ msgstr "PIN lokal verifizieren" msgid "Check with OTP PIN." msgstr "OTP PIN und OTP Wert prüfen." +#: privacyidea/static/components/login/views/login.html:68 +msgid "Choose a realm..." +msgstr "Re...
python-poetry__poetry-5890
Duplicated console output in 1.2.0b2 Poetry 1.2.0b1: ``` $ poetry build -f wheel Building projectname (0.1.0) - Building wheel - Built projectname-0.1.0-py3-none-any.whl ``` Poetry 1.2.0b2 (and latest master): ``` $ poetry build -f wheel Building projectname (0.1.0) - Building wheel - Building...
[ { "content": "from __future__ import annotations\n\nimport logging\nimport re\n\nfrom contextlib import suppress\nfrom importlib import import_module\nfrom typing import TYPE_CHECKING\nfrom typing import Any\nfrom typing import cast\n\nfrom cleo.application import Application as BaseApplication\nfrom cleo.event...
[ { "content": "from __future__ import annotations\n\nimport logging\nimport re\n\nfrom contextlib import suppress\nfrom importlib import import_module\nfrom typing import TYPE_CHECKING\nfrom typing import Any\nfrom typing import cast\n\nfrom cleo.application import Application as BaseApplication\nfrom cleo.event...
diff --git a/src/poetry/console/application.py b/src/poetry/console/application.py index d6ce9690cfe..63bcdc05dbc 100644 --- a/src/poetry/console/application.py +++ b/src/poetry/console/application.py @@ -264,8 +264,6 @@ def register_command_loggers( for name in loggers: logger = logging.getLogger...
mdn__kuma-7198
T - Add contributions to whoami During a conversation on the https://github.com/mdn/kuma/pull/7188#issuecomment-637707101 for https://github.com/mdn/kuma/issues/7077 it was decided to only show the `Contributions` link in the usernav for users that have made contributions. Currently, the `whoami` endpoint does not c...
[ { "content": "import json\nimport os\nfrom datetime import datetime\nfrom urllib.parse import urlparse\n\nimport stripe\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.http import (\n HttpResponse,\n HttpResponseBadRequest,\n JsonResponse,\n)\nfrom django....
[ { "content": "import json\nimport os\nfrom datetime import datetime\nfrom urllib.parse import urlparse\n\nimport stripe\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.http import (\n HttpResponse,\n HttpResponseBadRequest,\n JsonResponse,\n)\nfrom django....
diff --git a/kuma/api/v1/tests/test_views.py b/kuma/api/v1/tests/test_views.py index 4455a6a4d7b..05f19252b30 100644 --- a/kuma/api/v1/tests/test_views.py +++ b/kuma/api/v1/tests/test_views.py @@ -109,6 +109,8 @@ def test_whoami( "samples": {"sample_always": True}, }, "email": "wiki_user@...
OBOFoundry__OBOFoundry.github.io-802
travis on master failing, due to metadata violations from new jsonschema checks There are two things wrong: - the validate script assumes a util/reports folder - hp is failing; we already know that hp has a custom license and this should be reported elsewhere and is not a schema violation
[ { "content": "#!/usr/bin/env python3\n\nimport ast\nimport sys\nimport json\nimport jsonschema\nimport re\n\n# file paths\ndata_file = \"../registry/ontologies.jsonld\"\nschema_file = \"metadata-schema.json\"\nschema_lite_file = \"metadata-schema-lite.json\"\nreport_file = \"reports/metadata-violations.csv\"\n\...
[ { "content": "#!/usr/bin/env python3\n\nimport ast\nimport sys\nimport json\nimport jsonschema\nimport re\n\n# file paths\ndata_file = \"registry/ontologies.jsonld\"\nschema_file = \"util/metadata-schema.json\"\nschema_lite_file = \"util/metadata-schema-lite.json\"\nreport_file = \"reports/metadata-violations.c...
diff --git a/Makefile b/Makefile index bdf0bacf5..195360f19 100644 --- a/Makefile +++ b/Makefile @@ -96,7 +96,7 @@ registry/publications.md: util/extract-publications.py registry/ontologies.yml validate: $(ONTS) ./util/extract-metadata.py validate $^ && \ - cd util && python validate-metadata.py + python ./util/va...
LMFDB__lmfdb-782
Simplify character value In the table near the top of http://beta.lmfdb.org/Character/Dirichlet/20/3 e(5/4) should be i
[ { "content": "# -*- coding: utf-8 -*-\n# Author: Pascal Molin, molin.maths@gmail.com\nimport math\n# from Lfunctionutilities import pair2complex, splitcoeff, seriescoeff\nfrom sage.all import *\nimport re\nfrom flask import url_for\nfrom lmfdb.utils import parse_range, make_logger\nlogger = make_logger(\"DC\")\...
[ { "content": "# -*- coding: utf-8 -*-\n# Author: Pascal Molin, molin.maths@gmail.com\nimport math\n# from Lfunctionutilities import pair2complex, splitcoeff, seriescoeff\nfrom sage.all import *\nimport re\nfrom flask import url_for\nfrom lmfdb.utils import parse_range, make_logger\nlogger = make_logger(\"DC\")\...
diff --git a/lmfdb/WebCharacter.py b/lmfdb/WebCharacter.py index 642e97a55c..1327b4c093 100644 --- a/lmfdb/WebCharacter.py +++ b/lmfdb/WebCharacter.py @@ -149,8 +149,8 @@ def texlogvalue(x, tag=False): return 0 if not isinstance(x, Rational): return '1' - n = int(x.numer()) ...
bokeh__bokeh-5620
Correctly handle data values <= 0 on a log scale This is a continuation from issue #5389, partially adressed by PR #5477. There persists an issue where negative data is not handled correctly. All data <= 0 should be discarded before generating the plot. As is, if `values = np.linspace(-0.1, 0.9), a JS error compla...
[ { "content": "from bokeh.plotting import figure, output_file, show\n\nx = [0.1, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0]\ny = [10**xx for xx in x]\n\noutput_file(\"log.html\")\n\n# create a new plot with a log axis type\np = figure(plot_width=400, plot_height=400,\n y_axis_type=\"log\", y_range=(10**-1, 10**4))\...
[ { "content": "from bokeh.plotting import figure, output_file, show\n\nx = [0.1, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0]\ny = [10**xx for xx in x]\n\noutput_file(\"log.html\")\n\n# create a new plot with a log axis type\np = figure(plot_width=400, plot_height=400, y_axis_type=\"log\")\n\np.line(x, y, line_width=2)\np.circ...
diff --git a/bokehjs/src/coffee/core/util/bbox.coffee b/bokehjs/src/coffee/core/util/bbox.coffee index 3f9a0522bf2..fcb11c30657 100644 --- a/bokehjs/src/coffee/core/util/bbox.coffee +++ b/bokehjs/src/coffee/core/util/bbox.coffee @@ -1,10 +1,24 @@ export empty = () -> { - minX: Infinity, - minY: Infinity, - maxX: ...
pypa__setuptools-2580
setup.cfg: entry_points keys are made lowercase This breaks when the entry point is actually case-sensitive. 1. `git clone https://github.com/pydoit/doit-plugin-sample` 2. Delete setup.py, use the following setup.cfg: ```text [metadata] name = doit-plugin-sample description = a simple doit command plugin [op...
[ { "content": "# -*- coding: utf-8 -*-\n__all__ = ['Distribution']\n\nimport io\nimport sys\nimport re\nimport os\nimport warnings\nimport numbers\nimport distutils.log\nimport distutils.core\nimport distutils.cmd\nimport distutils.dist\nfrom distutils.util import strtobool\nfrom distutils.debug import DEBUG\nfr...
[ { "content": "# -*- coding: utf-8 -*-\n__all__ = ['Distribution']\n\nimport io\nimport sys\nimport re\nimport os\nimport warnings\nimport numbers\nimport distutils.log\nimport distutils.core\nimport distutils.cmd\nimport distutils.dist\nfrom distutils.util import strtobool\nfrom distutils.debug import DEBUG\nfr...
diff --git a/changelog.d/1937.change.rst b/changelog.d/1937.change.rst new file mode 100644 index 0000000000..acd4305968 --- /dev/null +++ b/changelog.d/1937.change.rst @@ -0,0 +1 @@ +Preserved case-sensitivity of keys in setup.cfg so that entry point names are case-sensitive. Changed sensitivity of configparser. NOTE:...
google__clusterfuzz-1961
js_minimizer is not callable The following run function of JSMinimizer class is not callable as `js_minimizer` is an object and not a function, thus it should not be callable. ``` js_tokenizer = AntlrTokenizer(JavaScriptLexer) js_minimizer = JSMinimizer( utils.test, max_threads=thread_c...
[ { "content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
[ { "content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
diff --git a/src/python/bot/minimizer/js_minimizer.py b/src/python/bot/minimizer/js_minimizer.py index 4bd53edfeb..26479300f0 100644 --- a/src/python/bot/minimizer/js_minimizer.py +++ b/src/python/bot/minimizer/js_minimizer.py @@ -184,8 +184,8 @@ def run(data, file_extension=file_extension) result = lin...
liberapay__liberapay.com-389
Each request to the MangoPay API opens a new HTTPS connection I never really looked into this problem and thought it was probably because of the server side, but [this Stack Overflow answer](http://stackoverflow.com/questions/37654878/how-to-make-braintrees-python-client-reuse-connections) suggests that it's actually t...
[ { "content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom collections import OrderedDict\nimport json\nimport logging\nimport os\nimport re\nimport traceback\n\nfrom six import text_type as str\n\nfrom algorithm import Algorithm\nimport aspen\nfrom babel.core impor...
[ { "content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom collections import OrderedDict\nimport json\nimport logging\nimport os\nimport re\nimport traceback\n\nfrom six import text_type as str\n\nfrom algorithm import Algorithm\nimport aspen\nfrom babel.core impor...
diff --git a/liberapay/wireup.py b/liberapay/wireup.py index 78ffa2b1e0..d603b2f7a5 100644 --- a/liberapay/wireup.py +++ b/liberapay/wireup.py @@ -177,6 +177,8 @@ def billing(app_conf): Configuration.ClientID = app_conf.mangopay_client_id Configuration.ClientPassword = app_conf.mangopay_client_password C...
Textualize__rich-2799
[BUG] ANSI sequences parsed incorrectly: \x1b(B\x1b[m - [x] I've checked [docs](https://rich.readthedocs.io/en/latest/introduction.html) and [closed issues](https://github.com/Textualize/rich/issues?q=is%3Aissue+is%3Aclosed) for possible solutions. - [x] I can't find my issue in the [FAQ](https://github.com/Textualize...
[ { "content": "import re\nimport sys\nfrom contextlib import suppress\nfrom typing import Iterable, NamedTuple, Optional\n\nfrom .color import Color\nfrom .style import Style\nfrom .text import Text\n\nre_ansi = re.compile(\n r\"\"\"\n(?:\\x1b\\](.*?)\\x1b\\\\)|\n(?:\\x1b([(@-Z\\\\-_]|\\[[0-?]*[ -/]*[@-~]))\n...
[ { "content": "import re\nimport sys\nfrom contextlib import suppress\nfrom typing import Iterable, NamedTuple, Optional\n\nfrom .color import Color\nfrom .style import Style\nfrom .text import Text\n\nre_ansi = re.compile(\n r\"\"\"\n(?:\\x1b\\](.*?)\\x1b\\\\)|\n(?:\\x1b([(@-Z\\\\-_]|\\[[0-?]*[ -/]*[@-~]))\n...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 1897c96c1..019a81ee2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Use `Console(stderr=True)` in `rich.traceback.install` to support io redirection. - Fixes superfluous sp...
liqd__a4-meinberlin-4293
Password reset attempt for non-existant user causes 500 and sentry error **URL:** Sentry error:https://sentry.liqd.net/organizations/liqd/issues/1976/?environment=production&project=5&referrer=alert_email DEV: https://meinberlin-dev.liqd.net/accounts/password/reset/ STAGE: https://meinberlin-stage.liqd.net/accounts...
[ { "content": "\"\"\"\nDjango settings for meinberlin project.\n\nGenerated by 'django-admin startproject' using Django 1.8.17.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/...
[ { "content": "\"\"\"\nDjango settings for meinberlin project.\n\nGenerated by 'django-admin startproject' using Django 1.8.17.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/...
diff --git a/meinberlin/config/settings/base.py b/meinberlin/config/settings/base.py index 8ba9dae821..5ea7e2e76e 100644 --- a/meinberlin/config/settings/base.py +++ b/meinberlin/config/settings/base.py @@ -283,6 +283,7 @@ ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = True ACCOUNT_LOGIN_ON_PASSWORD_RESET = True ACCOUNT_USER...