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
⌀
SeldonIO__MLServer-911
Problems with own logging configuration Currently I have the problem that my logging configuration is not accepted everywhere. As soon as the REST server starts (Uvicorn Worker), my logging configuration is ignored. I have created a repo that represents my scenario and also which is configuration used. Maybe my configu...
[ { "content": "import uvicorn\n\nfrom fastapi import FastAPI\nfrom starlette_exporter import handle_metrics\n\nfrom ..settings import Settings\nfrom .logging import logger\nfrom typing import Optional\n\n\nclass _NoSignalServer(uvicorn.Server):\n def install_signal_handlers(self):\n pass\n\n\nclass Met...
[ { "content": "import uvicorn\n\nfrom fastapi import FastAPI\nfrom starlette_exporter import handle_metrics\n\nfrom ..settings import Settings\nfrom .logging import logger\nfrom typing import Optional\n\n\nclass _NoSignalServer(uvicorn.Server):\n def install_signal_handlers(self):\n pass\n\n\nclass Met...
diff --git a/mlserver/metrics/server.py b/mlserver/metrics/server.py index 5dc05ff27..6bd08de25 100644 --- a/mlserver/metrics/server.py +++ b/mlserver/metrics/server.py @@ -52,8 +52,11 @@ def _get_config(self): } ) - # TODO: we want to disable logger unless debug is enabled (otherwise, - ...
fossasia__open-event-server-8286
PDF Invoice: Show Discounts in the invoice The PDF invoice for ticket buyers does not show discount codes clearly. Please implement the following: * Add the discount code into the description with "Discount code: samplecodehere, Discount: 10% or USD 2.00 etc." * Show the discount in the item price list with the origi...
[ { "content": "import logging\nfrom datetime import datetime, timedelta, timezone\n\nfrom flask import render_template\nfrom flask_rest_jsonapi.exceptions import ObjectNotFound\n\nfrom app.api.helpers.db import (\n get_count,\n safe_query_without_soft_deleted_entries,\n save_to_db,\n)\nfrom app.api.help...
[ { "content": "import logging\nfrom datetime import datetime, timedelta, timezone\n\nfrom flask import render_template\nfrom flask_rest_jsonapi.exceptions import ObjectNotFound\n\nfrom app.api.helpers.db import (\n get_count,\n safe_query_without_soft_deleted_entries,\n save_to_db,\n)\nfrom app.api.help...
diff --git a/app/api/helpers/order.py b/app/api/helpers/order.py index ecc2484464..03fa491acd 100644 --- a/app/api/helpers/order.py +++ b/app/api/helpers/order.py @@ -283,6 +283,7 @@ def calculate_order_amount(tickets, discount_code=None): 'percent': round(discount_percent, 2), ...
django-compressor__django-compressor-271
UnicodeDecodeError with inline css or javascript (jinja2 CompressorExtension) With `COMPRESS_ENABLED = False` ``` html {% compress css %} <style type="text/css"> /* няня */ </style> {% endcompress %} ``` or ``` html {% compress js %} <script type="text/javascript"> // ололо ...
[ { "content": "from django import template\nfrom django.core.exceptions import ImproperlyConfigured\n\nfrom compressor.cache import (cache_get, cache_set, get_offline_hexdigest,\n get_offline_manifest, get_templatetag_cachekey)\nfrom compressor.conf import settings\nfrom compressor.e...
[ { "content": "from django import template\nfrom django.core.exceptions import ImproperlyConfigured\n\nfrom compressor.cache import (cache_get, cache_set, get_offline_hexdigest,\n get_offline_manifest, get_templatetag_cachekey)\nfrom compressor.conf import settings\nfrom compressor.e...
diff --git a/compressor/templatetags/compress.py b/compressor/templatetags/compress.py index 9c9b46b2f..47863ab23 100644 --- a/compressor/templatetags/compress.py +++ b/compressor/templatetags/compress.py @@ -108,7 +108,7 @@ def render_compressed(self, context, kind, mode, forced=False): rendered_output = ...
django-compressor__django-compressor-375
UnicodeDecodeError with inline css or javascript (jinja2 CompressorExtension) With `COMPRESS_ENABLED = False` ``` html {% compress css %} <style type="text/css"> /* няня */ </style> {% endcompress %} ``` or ``` html {% compress js %} <script type="text/javascript"> // ололо ...
[ { "content": "from django import template\nfrom django.core.exceptions import ImproperlyConfigured\n\nfrom compressor.cache import (cache_get, cache_set, get_offline_hexdigest,\n get_offline_manifest, get_templatetag_cachekey)\nfrom compressor.conf import settings\nfrom compressor.e...
[ { "content": "from django import template\nfrom django.core.exceptions import ImproperlyConfigured\n\nfrom compressor.cache import (cache_get, cache_set, get_offline_hexdigest,\n get_offline_manifest, get_templatetag_cachekey)\nfrom compressor.conf import settings\nfrom compressor.e...
diff --git a/compressor/templatetags/compress.py b/compressor/templatetags/compress.py index 29c4dc933..870668ae0 100644 --- a/compressor/templatetags/compress.py +++ b/compressor/templatetags/compress.py @@ -107,7 +107,7 @@ def render_compressed(self, context, kind, mode, forced=False): rendered_output = ...
falconry__falcon-760
More complex example crashes on any request I tried to get the [more complex example](https://falcon.readthedocs.org/en/stable/user/quickstart.html#more-features) working and encountered the following error on any request: ``` 2016-04-16 18:23:44 +0200] [13566] [ERROR] Error handling request / Traceback (most recent c...
[ { "content": "# Copyright 2013 by Rackspace Hosting, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requir...
[ { "content": "# Copyright 2013 by Rackspace Hosting, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requir...
diff --git a/CHANGES.rst b/CHANGES.rst index ad2bebc93..cd3de3a19 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -29,6 +29,10 @@ Breaking Changes app = falcon.API() app.req_options.auto_parse_form_urlencoded = True +- The ``HTTPUnauthorized`` initializer now requires an + additional argument, `chall...
getmoto__moto-1193
Question - Authorization header parsing Am getting an IndexError here - https://github.com/spulec/moto/blob/master/moto/core/responses.py#L171-L172 After debugging im sending `AWS xxx:PDcSm14U3qk7EHxFB01rchMDsME=` which lines up with this - https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html I...
[ { "content": "from __future__ import unicode_literals\n\nfrom collections import defaultdict\nimport datetime\nimport json\nimport logging\nimport re\n\nimport pytz\nfrom moto.core.exceptions import DryRunClientError\n\nfrom jinja2 import Environment, DictLoader, TemplateNotFound\n\nimport six\nfrom six.moves.u...
[ { "content": "from __future__ import unicode_literals\n\nfrom collections import defaultdict\nimport datetime\nimport json\nimport logging\nimport re\n\nimport pytz\nfrom moto.core.exceptions import DryRunClientError\n\nfrom jinja2 import Environment, DictLoader, TemplateNotFound\n\nimport six\nfrom six.moves.u...
diff --git a/moto/core/responses.py b/moto/core/responses.py index 781a0b28430d..e85054802313 100644 --- a/moto/core/responses.py +++ b/moto/core/responses.py @@ -167,7 +167,7 @@ def get_region_from_url(self, request, full_url): match = re.search(self.region_regex, full_url) if match: reg...
ManimCommunity__manim-3430
Better Error Messages for Manim Directive when Failing Animations are Present with Documentation Generation The `_log_rendering_times` function in `manim_directive.py` throws an index out of bounds error if an animation has failed during rendering because then parameter list contains empty lists instead of the usual an...
[ { "content": "r\"\"\"\nA directive for including Manim videos in a Sphinx document\n===========================================================\n\nWhen rendering the HTML documentation, the ``.. manim::`` directive\nimplemented here allows to include rendered videos.\n\nIts basic usage that allows processing **...
[ { "content": "r\"\"\"\nA directive for including Manim videos in a Sphinx document\n===========================================================\n\nWhen rendering the HTML documentation, the ``.. manim::`` directive\nimplemented here allows to include rendered videos.\n\nIts basic usage that allows processing **...
diff --git a/manim/utils/docbuild/manim_directive.py b/manim/utils/docbuild/manim_directive.py index 5b744985ca..c369464679 100644 --- a/manim/utils/docbuild/manim_directive.py +++ b/manim/utils/docbuild/manim_directive.py @@ -343,6 +343,9 @@ def _log_rendering_times(*args): print("\nRendering Summary\n-----...
electricitymaps__electricitymaps-contrib-1256
WARNING - thermal_production: PALENQUE is missing from the DO plant mapping
[ { "content": "#!/usr/bin/env python3\n\nimport arrow\nfrom bs4 import BeautifulSoup\nfrom collections import defaultdict\nfrom math import isnan\nimport numpy as np\nfrom operator import itemgetter\nimport pandas as pd\nimport requests\n\ntry:\n unicode # Python 2\nexcept NameError:\n unicode = st...
[ { "content": "#!/usr/bin/env python3\n\nimport arrow\nfrom bs4 import BeautifulSoup\nfrom collections import defaultdict\nfrom math import isnan\nimport numpy as np\nfrom operator import itemgetter\nimport pandas as pd\nimport requests\n\ntry:\n unicode # Python 2\nexcept NameError:\n unicode = st...
diff --git a/parsers/DO.py b/parsers/DO.py index 93262b8d4a..b4aaaab195 100644 --- a/parsers/DO.py +++ b/parsers/DO.py @@ -64,6 +64,7 @@ u'MONTE PLATA SOLAR': 'solar', u'MONTE RIO': 'oil', u'PALAMARA': 'oil', + u'PALENQUE': 'oil', u...
certbot__certbot-9665
Plugin selection can sometimes return an `Installer` which is not an `Installer`, resulting in crashes. We have a very strange issue at https://community.letsencrypt.org/t/authenticator-object-has-no-attribute-restart-error-while-trying-to-renew-certificate/195970?u=_az where supposedly a `certonly --standalone` certif...
[ { "content": "\"\"\"Decide which plugins to use for authentication & installation\"\"\"\n\nimport logging\nfrom typing import cast\nfrom typing import Iterable\nfrom typing import List\nfrom typing import Optional\nfrom typing import Tuple\nfrom typing import Type\nfrom typing import TypeVar\n\nfrom certbot imp...
[ { "content": "\"\"\"Decide which plugins to use for authentication & installation\"\"\"\n\nimport logging\nfrom typing import cast\nfrom typing import Iterable\nfrom typing import List\nfrom typing import Optional\nfrom typing import Tuple\nfrom typing import Type\nfrom typing import TypeVar\n\nfrom certbot imp...
diff --git a/certbot/CHANGELOG.md b/certbot/CHANGELOG.md index 11462de2eb6..f578ac57514 100644 --- a/certbot/CHANGELOG.md +++ b/certbot/CHANGELOG.md @@ -22,11 +22,13 @@ Certbot adheres to [Semantic Versioning](https://semver.org/). * `--dns-google-credentials` now supports additional types of file-based credential, su...
pytorch__torchx-777
metadata support for aws_batch_scheduler ## Description `AppDef.metadata` is currently not implemented for `aws_batch_scheduler`. This feature request suggests adding it via AWS Batch Tags. ## Motivation/Background This allows adding metadata that is not available to the training jobs itself (unlike `env` variable...
[ { "content": "#!/usr/bin/env python3\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree.\n\n\"\"\"\n\nThis contains the TorchX AWS Batch scheduler whic...
[ { "content": "#!/usr/bin/env python3\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree.\n\n\"\"\"\n\nThis contains the TorchX AWS Batch scheduler whic...
diff --git a/torchx/schedulers/aws_batch_scheduler.py b/torchx/schedulers/aws_batch_scheduler.py index 80d57815d..1b88b8835 100644 --- a/torchx/schedulers/aws_batch_scheduler.py +++ b/torchx/schedulers/aws_batch_scheduler.py @@ -516,6 +516,7 @@ def _submit_dryrun(self, app: AppDef, cfg: AWSBatchOpts) -> AppDryRunInfo[B...
ansible__molecule-2826
Docs contains template option for init role that actually does not exists There are option documented here https://molecule.readthedocs.io/en/latest/usage.html#cmdoption-molecule-init-role-foo-template-path-arg-molecule ``` % molecule --version molecule 3.0.8 ansible==2.9.11 python==3.8 ``` but m...
[ { "content": "# Copyright (c) 2015-2018 Cisco Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# right...
[ { "content": "# Copyright (c) 2015-2018 Cisco Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# right...
diff --git a/molecule/command/init/role.py b/molecule/command/init/role.py index 8fe8b29eb6..8439211696 100644 --- a/molecule/command/init/role.py +++ b/molecule/command/init/role.py @@ -43,10 +43,6 @@ class Role(base.Base): Initialize a new role. - .. program:: molecule init role foo --template path - ...
ckan__ckan-2600
Fileupload removes underscores from filenames There doesn't seem to be any reason to forbid underscores in filenames, especially since munge allows them elsewhere. Looks like someone just forgot to add an underscore to the replace function. Have a PR all ready to go with fix and updated test, just need to know what bra...
[ { "content": "# Note these functions are similar to, but separate from name/title mungers\n# found in the ckanext importer. That one needs to be stable to prevent\n# packages changing name on reimport, but these ones can be changed and\n# improved.\n\nimport re\nimport os.path\n\nfrom ckan import model\n\n\ndef...
[ { "content": "# Note these functions are similar to, but separate from name/title mungers\n# found in the ckanext importer. That one needs to be stable to prevent\n# packages changing name on reimport, but these ones can be changed and\n# improved.\n\nimport re\nimport os.path\n\nfrom ckan import model\n\n\ndef...
diff --git a/ckan/lib/munge.py b/ckan/lib/munge.py index 484e0f5b0df..c112822ede4 100644 --- a/ckan/lib/munge.py +++ b/ckan/lib/munge.py @@ -139,7 +139,7 @@ def munge_filename(filename): # clean up filename = substitute_ascii_equivalents(filename) filename = filename.lower().strip() - filename = re.su...
googleapis__python-bigquery-1187
Missing dependency python-dateutil in setup.py I noticed that `python-dateutil` is missing from setup.py in `main`. The line "python-dateutil >= 2.7.2, <3.0dev", was removed in https://github.com/googleapis/python-bigquery/commit/76d88fbb1316317a61fa1a63c101bc6f42f23af8. I'm seeing failures in samples testing for ...
[ { "content": "# Copyright 2018 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 applicabl...
[ { "content": "# Copyright 2018 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 applicabl...
diff --git a/setup.py b/setup.py index 62fb3bbb3..86eb2d41d 100644 --- a/setup.py +++ b/setup.py @@ -42,8 +42,8 @@ "google-cloud-core >= 1.4.1, <3.0.0dev", "google-resumable-media >= 0.6.0, < 3.0dev", "packaging >= 14.3", - "proto-plus >= 1.10.0", # For the legacy proto-based types. "protobuf >=...
cloud-custodian__cloud-custodian-554
Security Group filter "default-vpc" does not function correctly. Using the following policy: ``` policies: - name: default-sg-allows-all-traffic description: | Find whether the default security group allows all traffic. resource: security-group filters: - type: default-vpc ``` Comes up with...
[ { "content": "# Copyright 2016 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
[ { "content": "# Copyright 2016 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
diff --git a/c7n/filters/vpc.py b/c7n/filters/vpc.py index f082781cc1c..563beb683b8 100644 --- a/c7n/filters/vpc.py +++ b/c7n/filters/vpc.py @@ -52,8 +52,6 @@ def match(self, vpc_id): vpcs = [v['VpcId'] for v in client.describe_vpcs(VpcIds=[vpc_id])['Vpcs'] if v['I...
agconti__cookiecutter-django-rest-142
Add @python_2_unicode_compatible to models
[ { "content": "from __future__ import unicode_literals\n\n# from django.db import models\n# from django.utils.translation import ugettext_lazy as _\nfrom django.contrib.auth.models import AbstractUser\n\n\nclass User(AbstractUser):\n\n def __unicode__(self):\n return self.username\n", "path": "{{co...
[ { "content": "from __future__ import unicode_literals\n\n# from django.db import models\n# from django.utils.translation import ugettext_lazy as _\nfrom django.utils.encoding import python_2_unicode_compatible\nfrom django.contrib.auth.models import AbstractUser\n\n\n@python_2_unicode_compatible\nclass User(Abs...
diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/models.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/models.py index c1b086088..1fc1a6a31 100644 --- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/users/models.py +++ b/{{cookiecutte...
ethereum__web3.py-3103
Web3 crashes in time-based gas price strategies with empty chain * Version: 4.7.1 * Python: 3.6 * OS: linux ### What was wrong? Running our test suite web3 crashes when estimating time based gas price. Probably it is caused by not having any transactions in our test chain. However when probabilities are calcula...
[ { "content": "import collections\nimport math\nimport operator\nfrom typing import (\n Iterable,\n Sequence,\n Tuple,\n)\n\nfrom eth_typing import (\n ChecksumAddress,\n)\nfrom eth_utils import (\n to_tuple,\n)\nfrom eth_utils.toolz import (\n curry,\n groupby,\n sliding_window,\n)\nfrom...
[ { "content": "import collections\nimport math\nimport operator\nfrom typing import (\n Iterable,\n Sequence,\n Tuple,\n)\n\nfrom eth_typing import (\n ChecksumAddress,\n)\nfrom eth_utils import (\n to_tuple,\n)\nfrom eth_utils.toolz import (\n curry,\n groupby,\n sliding_window,\n)\nfrom...
diff --git a/newsfragments/1149.bugfix.rst b/newsfragments/1149.bugfix.rst new file mode 100644 index 0000000000..d9071f5dbf --- /dev/null +++ b/newsfragments/1149.bugfix.rst @@ -0,0 +1 @@ +Return `w3.eth.gas_price` when calculating time based gas price strategy for an empty chain. \ No newline at end of file diff --gi...
gammapy__gammapy-5248
Shape of MapCoord for large non-spatial dimension **Gammapy version 1.1** **Bug description** When creating a MapCoord with 2 coordinates and 3 energy bins calling the `shape` attribute results in a value error. **To Reproduce** Following the example in `MapCoord.create` but using three energies instead of ...
[ { "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport copy\nimport html\nimport numpy as np\nfrom astropy import units as u\nfrom astropy.coordinates import SkyCoord\n\n__all__ = [\"MapCoord\"]\n\n\ndef skycoord_to_lonlat(skycoord, frame=None):\n \"\"\"Convert SkyCoord to lon,...
[ { "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport copy\nimport html\nimport numpy as np\nfrom astropy import units as u\nfrom astropy.coordinates import SkyCoord\n\n__all__ = [\"MapCoord\"]\n\n\ndef skycoord_to_lonlat(skycoord, frame=None):\n \"\"\"Convert SkyCoord to lon,...
diff --git a/docs/user-guide/maps/index.rst b/docs/user-guide/maps/index.rst index 521729d3c8..6eb0244b48 100644 --- a/docs/user-guide/maps/index.rst +++ b/docs/user-guide/maps/index.rst @@ -64,7 +64,7 @@ methods are provided: Accessor methods accept as their first argument a coordinate tuple containing scalars, li...
dmlc__dgl-4944
[Bug] inconsistent behavior between update_all and multi_update_all for heterogeneous graphs with only one ntype ## 🐛 Bug Similar to #4816, update_all is not working for heterogeneous graphs with only one ntype, causing an error in backward. However, using multi_update_all is fine. ## To Reproduce Steps to ...
[ { "content": "\"\"\"Module for sparse matrix operators.\"\"\"\n# pylint: disable= invalid-name\nfrom __future__ import absolute_import\n\nfrom . import backend as F\nfrom . import ndarray as nd\nfrom ._ffi.function import _init_api\nfrom .base import DGLError\n\n\ndef infer_broadcast_shape(op, shp1, shp2):\n ...
[ { "content": "\"\"\"Module for sparse matrix operators.\"\"\"\n# pylint: disable= invalid-name\nfrom __future__ import absolute_import\n\nfrom . import backend as F\nfrom . import ndarray as nd\nfrom ._ffi.function import _init_api\nfrom .base import DGLError\n\n\ndef infer_broadcast_shape(op, shp1, shp2):\n ...
diff --git a/python/dgl/sparse.py b/python/dgl/sparse.py index 2699a888e247..cf8eac1b8d26 100644 --- a/python/dgl/sparse.py +++ b/python/dgl/sparse.py @@ -605,7 +605,7 @@ def _gsddmm_hetero( expand_lhs = True if use_rhs: if rhs is not None and F.ndim(rhs) == 1: - rh...
pyqtgraph__pyqtgraph-2061
Example app fails to run examples on Windows When running the example application on Windows, examples run when clicking on the `Run Example` button. However, trying to run an edited example, or starting an example by double clicking the name fails with ``` Traceback (most recent call last): File "C:\e\prog\pg_...
[ { "content": "import keyword\nimport os\nimport re\nimport sys\nimport subprocess\nfrom argparse import Namespace\n\nimport pyqtgraph as pg\nfrom pyqtgraph.Qt import QtWidgets, QtGui, QtCore, QT_LIB\nfrom collections import OrderedDict\nfrom functools import lru_cache\n\n\napp = pg.mkQApp()\n\n\npath = os.path....
[ { "content": "import keyword\nimport os\nimport re\nimport sys\nimport subprocess\nfrom argparse import Namespace\n\nimport pyqtgraph as pg\nfrom pyqtgraph.Qt import QtWidgets, QtGui, QtCore, QT_LIB\nfrom collections import OrderedDict\nfrom functools import lru_cache\n\n\napp = pg.mkQApp()\n\n\npath = os.path....
diff --git a/pyqtgraph/examples/ExampleApp.py b/pyqtgraph/examples/ExampleApp.py index 1afe13ad28..7ee43adb79 100644 --- a/pyqtgraph/examples/ExampleApp.py +++ b/pyqtgraph/examples/ExampleApp.py @@ -481,7 +481,7 @@ def loadFile(self, edited=False): env['PYTHONPATH'] = f'{path}' if edited: ...
gammapy__gammapy-1976
Use pytest fixtures properly pytest fixtures should be injected into tests, not called as functions. To quote from https://docs.pytest.org/en/latest/changelog.html#pytest-3-7-0-2018-07-30 > Calling a fixture function directly, as opposed to request them in a test function, now issues a RemovedInPytest4Warning. It...
[ { "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"HESS Galactic plane survey (HGPS) catalog.\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nimport os\nfrom collections import OrderedDict\nimport numpy as np\nimport astropy.units as u...
[ { "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"HESS Galactic plane survey (HGPS) catalog.\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nimport os\nfrom collections import OrderedDict\nimport numpy as np\nimport astropy.units as u...
diff --git a/gammapy/background/tests/test_phase.py b/gammapy/background/tests/test_phase.py index fda70b6728..6153d88346 100644 --- a/gammapy/background/tests/test_phase.py +++ b/gammapy/background/tests/test_phase.py @@ -8,7 +8,7 @@ from .. import BackgroundEstimate, PhaseBackgroundEstimator -@pytest.fixture +@p...
open-mmlab__mmocr-570
Write image name to pickle file Hi MMOCR team, Thank you for this awesome framework. I have a task to get coordinate of bounding box from Textsnake model, so I use --out argument in test.py to export to a pickle file. But when I load this pickle, I just got ‘boundary_result’ and don't know this ‘boundary_result’ belong...
[ { "content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport numpy as np\n\nfrom mmocr.models.builder import HEADS\nfrom mmocr.models.textdet.postprocess import decode\nfrom mmocr.utils import check_argument\n\n\n@HEADS.register_module()\nclass HeadMixin:\n \"\"\"The head minxin for dbnet and pannet...
[ { "content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport numpy as np\n\nfrom mmocr.models.builder import HEADS\nfrom mmocr.models.textdet.postprocess import decode\nfrom mmocr.utils import check_argument\n\n\n@HEADS.register_module()\nclass HeadMixin:\n \"\"\"The head minxin for dbnet and pannet...
diff --git a/mmocr/models/textdet/dense_heads/head_mixin.py b/mmocr/models/textdet/dense_heads/head_mixin.py index fc553bd38..67f8821a2 100644 --- a/mmocr/models/textdet/dense_heads/head_mixin.py +++ b/mmocr/models/textdet/dense_heads/head_mixin.py @@ -59,7 +59,9 @@ def get_boundary(self, score_maps, img_metas, rescale...
frappe__frappe-15256
ImportError: Module import failed for IMAP Folder Migrating from latest `version-13` to `develop`: ``` > bench --site my-site migrate Migrating my-site Executing frappe.patches.v14_0.copy_mail_data #08.03.21 in my-site (_f0159c4c37bf09c0) Traceback (most recent call last): File "/home/frappe/frappe-bench/ap...
[ { "content": "from __future__ import unicode_literals\nimport frappe\n\n\ndef execute():\n\tfrappe.reload_doc(\"email\", \"doctype\", \"email_account\")\n\t# patch for all Email Account with the flag use_imap\n\tfor email_account in frappe.get_list(\"Email Account\", filters={\"enable_incoming\": 1, \"use_imap\...
[ { "content": "from __future__ import unicode_literals\nimport frappe\n\n\ndef execute():\n\tfrappe.reload_doc(\"email\", \"doctype\", \"imap_folder\")\n\tfrappe.reload_doc(\"email\", \"doctype\", \"email_account\")\n\n\t# patch for all Email Account with the flag use_imap\n\tfor email_account in frappe.get_list...
diff --git a/frappe/patches/v14_0/copy_mail_data.py b/frappe/patches/v14_0/copy_mail_data.py index 362d23d0e1e9..d3a5c592097c 100644 --- a/frappe/patches/v14_0/copy_mail_data.py +++ b/frappe/patches/v14_0/copy_mail_data.py @@ -3,7 +3,9 @@ def execute(): + frappe.reload_doc("email", "doctype", "imap_folder") frap...
chainer__chainer-733
BUG: Variable.to_gpu doesn't work to move the other GPU I understand `Variable.to_gpu` moves current variable to specified GPU destructively. But it isn't the case when current / target devices are both GPU? ``` c1 = chainer.Variable(cp.asarray(np.array([1, 2, 3]))) cuda.get_device(c1.data) # <CUDA Device 0> # NG, mu...
[ { "content": "\"\"\"Device, context and memory management on CuPy.\n\nChainer uses CuPy (with very thin wrapper) to exploit the speed of GPU\ncomputation. Following modules and classes are imported to :mod:`cuda`\nmodule for convenience (refer to this table when reading chainer's source\ncodes).\n\n============...
[ { "content": "\"\"\"Device, context and memory management on CuPy.\n\nChainer uses CuPy (with very thin wrapper) to exploit the speed of GPU\ncomputation. Following modules and classes are imported to :mod:`cuda`\nmodule for convenience (refer to this table when reading chainer's source\ncodes).\n\n============...
diff --git a/chainer/cuda.py b/chainer/cuda.py index 61cbb2d8caf1..6595e06c8574 100644 --- a/chainer/cuda.py +++ b/chainer/cuda.py @@ -190,7 +190,12 @@ def to_gpu(array, device=None, stream=None): check_cuda_available() assert stream is None # TODO(beam2d): FIX IT with get_device(device): - retur...
pyinstaller__pyinstaller-7517
Marshal error passing `modulegraph.Alias()` to `find_binary_dependencies()` <!-- Welcome to the PyInstaller issue tracker! Before creating an issue, please heed the following: 1. This tracker should only be used to report bugs and request features / enhancements to PyInstaller - For questions and general suppo...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2023, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2023, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
diff --git a/PyInstaller/depend/analysis.py b/PyInstaller/depend/analysis.py index c39d637ba6..56de2caf25 100644 --- a/PyInstaller/depend/analysis.py +++ b/PyInstaller/depend/analysis.py @@ -844,8 +844,10 @@ def get_collected_packages(self) -> list: """ Return the list of collected python packages. ...
getmoto__moto-556
Fix S3 issues with botocore 1.3.29 botocore 1.3.29 breaks s3 in tests
[ { "content": "from __future__ import unicode_literals\nimport logging\nlogging.getLogger('boto').setLevel(logging.CRITICAL)\n\n__title__ = 'moto'\n__version__ = '0.4.22'\n\nfrom .autoscaling import mock_autoscaling # flake8: noqa\nfrom .awslambda import mock_lambda # flake8: noqa\nfrom .cloudformation import ...
[ { "content": "from __future__ import unicode_literals\nimport logging\nlogging.getLogger('boto').setLevel(logging.CRITICAL)\n\n__title__ = 'moto'\n__version__ = '0.4.22'\n\nfrom .autoscaling import mock_autoscaling # flake8: noqa\nfrom .awslambda import mock_lambda # flake8: noqa\nfrom .cloudformation import ...
diff --git a/moto/__init__.py b/moto/__init__.py index df283fc6339a..f1ae2ab6648f 100644 --- a/moto/__init__.py +++ b/moto/__init__.py @@ -31,3 +31,13 @@ from .sts import mock_sts # flake8: noqa from .route53 import mock_route53 # flake8: noqa from .swf import mock_swf # flake8: noqa + + +try: + # Need to monk...
oppia__oppia-9706
UI issues in the Topics and Skills Dashboard and Editor Pages, Part 2 **Done:** ### **DESKTOP: Topics and Skills Dashboard:** **TOPICS TAB** - [ ] **Description overlaps another section** ![Screen Shot 2020-06-18 at 2 02 13 PM](https://user-images.githubusercontent.com/22177674/85109076-9da91900-b1c5-11ea-9d03...
[ { "content": "# Copyright 2020 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n...
[ { "content": "# Copyright 2020 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n...
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b803b41713f21..871e913665dde 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -300,6 +300,7 @@ # Navigation bar project. +/core/templates/domain/bottom_navbar/ @nithusha21 @showtim3 /core/templates/domain/sidebar/ @nithusha21 /core/templates/c...
lutris__lutris-2315
wine sandboxing error in 0.5.3 Hello, it seems you resolved issue #2114 but now, when I launch any of my wine games, I obtain this error message: `[Errno 21] est un dossier: '/home/legluondunet/Games/test/drive_c/users/legluondunet/Downloads'` * "est un dossier" = "is a folder" then an other error message: `en...
[ { "content": "\"\"\"Wine prefix management\"\"\"\nimport os\nfrom lutris.util.wine.registry import WineRegistry\nfrom lutris.util.log import logger\nfrom lutris.util import joypad, system, i18n\nfrom lutris.util.display import DISPLAY_MANAGER\n\nDESKTOP_KEYS = [\"Desktop\", \"My Music\", \"My Pictures\", \"My V...
[ { "content": "\"\"\"Wine prefix management\"\"\"\nimport os\nfrom lutris.util.wine.registry import WineRegistry\nfrom lutris.util.log import logger\nfrom lutris.util import joypad, system, i18n\nfrom lutris.util.display import DISPLAY_MANAGER\n\nDESKTOP_KEYS = [\"Desktop\", \"My Music\", \"My Pictures\", \"My V...
diff --git a/lutris/util/wine/prefix.py b/lutris/util/wine/prefix.py index 0ae48301f5..bc4787a9a8 100644 --- a/lutris/util/wine/prefix.py +++ b/lutris/util/wine/prefix.py @@ -116,8 +116,8 @@ def desktop_integration(self, desktop_dir=None): # Security: Remove other symlinks. for item in os.li...
microsoft__Qcodes-5565
Cannot exit ipython with running qcodes.Monitor() ### Steps to reproduce iPython version 8.10, qcodes version 0.42, Windows 10 Pro 22H2 1. open ipython 2. from qcodes import Monitor monitor = Monitor() 3. exit ipython It hangs instead of closing iPython. The terminal must be terminated.
[ { "content": "#! /usr/bin/env python\n# vim:fenc=utf-8\n#\n# Copyright © 2017 unga <giulioungaretti@me.com>\n#\n# Distributed under terms of the MIT license.\n\"\"\"\nMonitor a set of parameters in a background thread\nstream output over websocket\n\nTo start monitor, run this file, or if qcodes is installed as...
[ { "content": "#! /usr/bin/env python\n# vim:fenc=utf-8\n#\n# Copyright © 2017 unga <giulioungaretti@me.com>\n#\n# Distributed under terms of the MIT license.\n\"\"\"\nMonitor a set of parameters in a background thread\nstream output over websocket\n\nTo start monitor, run this file, or if qcodes is installed as...
diff --git a/docs/changes/newsfragments/improved.5565 b/docs/changes/newsfragments/improved.5565 new file mode 100644 index 00000000000..215545d8587 --- /dev/null +++ b/docs/changes/newsfragments/improved.5565 @@ -0,0 +1 @@ +qcodes.Monitor now runs as a daemon thread, resolving issues with closing python or ipython wit...
searxng__searxng-3024
Keep the number of pages display when no results are found when page number is superior to 1 <!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SearXNG --> **Is your feature request related to a problem? Please describe.** If you go to the next page but no engines return results, you lose the ability...
[ { "content": "import re\nfrom collections import defaultdict\nfrom operator import itemgetter\nfrom threading import RLock\nfrom typing import List, NamedTuple, Set\nfrom urllib.parse import urlparse, unquote\n\nfrom searx import logger\nfrom searx import utils\nfrom searx.engines import engines\nfrom searx.met...
[ { "content": "import re\nfrom collections import defaultdict\nfrom operator import itemgetter\nfrom threading import RLock\nfrom typing import List, NamedTuple, Set\nfrom urllib.parse import urlparse, unquote\n\nfrom searx import logger\nfrom searx import utils\nfrom searx.engines import engines\nfrom searx.met...
diff --git a/searx/results.py b/searx/results.py index caf02213db4..471d1698140 100644 --- a/searx/results.py +++ b/searx/results.py @@ -232,7 +232,7 @@ def extend(self, engine_name, results): if engine_name in engines: histogram_observe(standard_result_count, 'engine', engine_name, 'result', 'cou...
pre-commit__pre-commit-427
setup.cfg prevent pre-commit to install For some reason I have a setup.cfg file in the root directory of my repo for my app where the parameter **install_scripts** is set to **/usr/sbin**. This prevent pre-commit to set up and crash. Here is a repro in a fresh git repository containing only **setup.cfg** file and **.p...
[ { "content": "from __future__ import unicode_literals\n\nimport contextlib\nimport distutils.spawn\nimport os\nimport sys\n\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import UNSET\nfrom pre_commit.envcontext import Var\nfrom pre_commit.languages import helpers\nfrom pre_commit.uti...
[ { "content": "from __future__ import unicode_literals\n\nimport contextlib\nimport distutils.spawn\nimport os\nimport sys\n\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import UNSET\nfrom pre_commit.envcontext import Var\nfrom pre_commit.languages import helpers\nfrom pre_commit.uti...
diff --git a/pre_commit/languages/python.py b/pre_commit/languages/python.py index 7eadb8df4..d785bbc9d 100644 --- a/pre_commit/languages/python.py +++ b/pre_commit/languages/python.py @@ -73,7 +73,7 @@ def install_environment( venv_cmd.extend(['-p', norm_version(version)]) else: venv...
secdev__scapy-757
srloop produces output despite of verbose = 0 (almost mute) # cat testsrloop.py ``` from scapy.all import srloop,IP,ICMP print "aa" srloop(IP(dst="8.8.8.8") / ICMP(), verbose=0, count=1) print "bb" ``` # python testsrloop.py aa bb**nd...** _Note extra output here_ # pip freeze |grep scapy scapy==2.3...
[ { "content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## This program is published under a GPLv2 license\n\n\"\"\"\nFunctions to send and receive packets.\n\"\"\"\n\nfrom __future__ import absolute_impo...
[ { "content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## This program is published under a GPLv2 license\n\n\"\"\"\nFunctions to send and receive packets.\n\"\"\"\n\nfrom __future__ import absolute_impo...
diff --git a/scapy/sendrecv.py b/scapy/sendrecv.py index 1fc6ce38023..b09ec55d13a 100644 --- a/scapy/sendrecv.py +++ b/scapy/sendrecv.py @@ -436,7 +436,8 @@ def __sr_loop(srfunc, pkts, prn=lambda x:x[1].summary(), prnfail=lambda x:x.summ break count -= 1 start = time.t...
weni-ai__bothub-engine-197
Rest API just generate HTTP urls next links (List Views) and absolute urls are generated to HTTP protocol because the all requests are make in port 80.
[ { "content": "from setuptools import setup, find_packages\n\n\nsetup(\n name='bothub',\n version='1.15.0',\n description='bothub',\n packages=find_packages(),\n install_requires=[\n 'python-decouple',\n 'requests',\n 'django==2.0.6',\n 'djangorestframework==3.7.7',\n ...
[ { "content": "from setuptools import setup, find_packages\n\n\nsetup(\n name='bothub',\n version='1.15.1',\n description='bothub',\n packages=find_packages(),\n install_requires=[\n 'python-decouple',\n 'requests',\n 'django==2.0.6',\n 'djangorestframework==3.7.7',\n ...
diff --git a/bothub/settings.py b/bothub/settings.py index 087eb8a6..2919241c 100644 --- a/bothub/settings.py +++ b/bothub/settings.py @@ -239,3 +239,8 @@ 'SUPPORTED_LANGUAGES', default='en|pt', cast=cast_supported_languages) + + +# SECURE PROXY SSL HEADER + +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_...
internetarchive__openlibrary-4168
Coverstore: Properly deal with covers = [None] <!-- What issue does this PR close? --> Closes https://sentry.archive.org/sentry/ol-covers/issues/11156 <!-- What does this PR achieve? [feature|hotfix|fix|refactor] --> Sometimes `covers` is stored as `[None]` or `[-1]` to indicate that there are no covers. The cu...
[ { "content": "from __future__ import print_function\nimport web\nimport simplejson\nimport os\nimport datetime\nimport time\nimport logging\nimport array\nimport memcache\nimport requests\n\nfrom openlibrary.coverstore import config, db, ratelimit\nfrom openlibrary.coverstore.coverlib import save_image, read_im...
[ { "content": "from __future__ import print_function\nimport web\nimport simplejson\nimport os\nimport datetime\nimport time\nimport logging\nimport array\nimport memcache\nimport requests\n\nfrom openlibrary.coverstore import config, db, ratelimit\nfrom openlibrary.coverstore.coverlib import save_image, read_im...
diff --git a/openlibrary/coverstore/code.py b/openlibrary/coverstore/code.py index bb0f6a33d6e..8d43b77426f 100644 --- a/openlibrary/coverstore/code.py +++ b/openlibrary/coverstore/code.py @@ -39,7 +39,7 @@ def get_cover_id(olkeys): covers = doc.get('photos' if is_author else 'covers', []) # Sometimes...
saulpw__visidata-2018
Parquet Large String columns are typed vlen by default **Small description** I have a parquet file which contains string columns: [australian_public_holidays_2014_2020.zip](https://github.com/saulpw/visidata/files/12389440/australian_public_holidays_2014_2020.zip) **Expected result** In DuckDB, it looks lik...
[ { "content": "from collections import defaultdict\n\nfrom visidata import Sheet, VisiData, TypedWrapper, anytype, date, vlen, Column, vd\n\n\n\n@VisiData.api\ndef open_arrow(vd, p):\n 'Apache Arrow IPC file format'\n return ArrowSheet(p.name, source=p)\n\n\n@VisiData.api\ndef open_arrows(vd, p):\n 'Apa...
[ { "content": "from collections import defaultdict\n\nfrom visidata import Sheet, VisiData, TypedWrapper, anytype, date, vlen, Column, vd\n\n\n\n@VisiData.api\ndef open_arrow(vd, p):\n 'Apache Arrow IPC file format'\n return ArrowSheet(p.name, source=p)\n\n\n@VisiData.api\ndef open_arrows(vd, p):\n 'Apa...
diff --git a/visidata/loaders/arrow.py b/visidata/loaders/arrow.py index 017bc0582..f58a507c6 100644 --- a/visidata/loaders/arrow.py +++ b/visidata/loaders/arrow.py @@ -44,7 +44,7 @@ def arrow_to_vdtype(t): pa.lib.Type_LARGE_BINARY: vlen, # pa.lib.Type_FIXED_SIZE_BINARY: bytes, # pa.lib...
ydataai__ydata-profiling-1023
Incorrect duplicate rows count ### Current Behaviour The duplicated rows count is different between pandas and pandas-profiling when there are nan's in columns ### Expected Behaviour The count should be equal ### Data Description I attach a simple example ![image](https://user-images.githubusercontent.com/61322...
[ { "content": "from typing import Any, Dict, Optional, Sequence, Tuple\n\nimport pandas as pd\n\nfrom pandas_profiling.config import Settings\nfrom pandas_profiling.model.duplicates import get_duplicates\n\n\n@get_duplicates.register(Settings, pd.DataFrame, Sequence)\ndef pandas_get_duplicates(\n config: Sett...
[ { "content": "from typing import Any, Dict, Optional, Sequence, Tuple\n\nimport pandas as pd\n\nfrom pandas_profiling.config import Settings\nfrom pandas_profiling.model.duplicates import get_duplicates\n\n\n@get_duplicates.register(Settings, pd.DataFrame, Sequence)\ndef pandas_get_duplicates(\n config: Sett...
diff --git a/src/pandas_profiling/model/pandas/duplicates_pandas.py b/src/pandas_profiling/model/pandas/duplicates_pandas.py index f05a62785..6254c7d01 100644 --- a/src/pandas_profiling/model/pandas/duplicates_pandas.py +++ b/src/pandas_profiling/model/pandas/duplicates_pandas.py @@ -35,7 +35,7 @@ def pandas_get_duplic...
OCHA-DAP__hdx-ckan-1829
Organization view pages result in 500 error Only on stag. I tested several different orgs. ![image](https://cloud.githubusercontent.com/assets/1654485/5165739/e9046902-73e8-11e4-9358-19cd8652c0c8.png)
[ { "content": "import logging, re\nimport ckan.plugins as plugins\nimport ckan.plugins.toolkit as tk\nimport ckan.lib.plugins as lib_plugins\n\ndef convert_country(q):\n for c in tk.get_action('group_list')({'user':'127.0.0.1'},{'all_fields': True}):\n if re.findall(c['display_name'].lower(),q.lower())...
[ { "content": "import logging, re\nimport ckan.plugins as plugins\nimport ckan.plugins.toolkit as tk\nimport ckan.lib.plugins as lib_plugins\n\ndef convert_country(q):\n for c in tk.get_action('group_list')({'user':'127.0.0.1'},{'all_fields': True}):\n if re.findall(c['display_name'].lower(),q.lower())...
diff --git a/ckanext-hdx_search/ckanext/hdx_search/plugin.py b/ckanext-hdx_search/ckanext/hdx_search/plugin.py index b22daac691..09ccea6c1d 100644 --- a/ckanext-hdx_search/ckanext/hdx_search/plugin.py +++ b/ckanext-hdx_search/ckanext/hdx_search/plugin.py @@ -36,7 +36,7 @@ def after_map(self, map): return map ...
ros__ros_comm-2171
non persistent rospy ServiceProxy is not thread-safe Relevant code https://github.com/ros/ros_comm/blob/090daa56f57d18c39946f107bcee5e3efefb2cac/clients/rospy/src/rospy/impl/tcpros_service.py#L481-L537 The self.transport gets set during a service proxy call, and then gets unset if the proxy is not persistent. ...
[ { "content": "# Software License Agreement (BSD License)\n#\n# Copyright (c) 2008, Willow Garage, Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# * Redistributions of so...
[ { "content": "# Software License Agreement (BSD License)\n#\n# Copyright (c) 2008, Willow Garage, Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# * Redistributions of so...
diff --git a/clients/rospy/src/rospy/impl/tcpros_service.py b/clients/rospy/src/rospy/impl/tcpros_service.py index e8652235ac..70c4f3d5d2 100644 --- a/clients/rospy/src/rospy/impl/tcpros_service.py +++ b/clients/rospy/src/rospy/impl/tcpros_service.py @@ -510,7 +510,8 @@ def call(self, *args, **kwds): excep...
Bitmessage__PyBitmessage-1334
Crashing on Boot $ python src/bitmessagemain.py Loading existing config files from /home/.config/PyBitmessage/ 2018-08-05 13:19:02,170 - WARNING - Using default logger configuration 2018-08-05 13:19:02,592 - CRITICAL - Unhandled exception Traceback (most recent call last): File "src/bitmessagemain.py", line 507...
[ { "content": "import json\nimport os\nimport pickle\n# import sys\nimport threading\nimport time\n\nimport state\nfrom bmconfigparser import BMConfigParser\nfrom debug import logger\n\nknownNodesLock = threading.Lock()\nknownNodes = {stream: {} for stream in range(1, 4)}\n\nknownNodesTrimAmount = 2000\n\n# forg...
[ { "content": "import json\nimport os\nimport pickle\n# import sys\nimport threading\nimport time\n\nimport state\nfrom bmconfigparser import BMConfigParser\nfrom debug import logger\n\nknownNodesLock = threading.Lock()\nknownNodes = {stream: {} for stream in range(1, 4)}\n\nknownNodesTrimAmount = 2000\n\n# forg...
diff --git a/src/knownnodes.py b/src/knownnodes.py index 5ffd65d16a..ac2d668c47 100644 --- a/src/knownnodes.py +++ b/src/knownnodes.py @@ -98,7 +98,7 @@ def readKnownNodes(): except ValueError: source.seek(0) pickle_deserialize_old_knownnodes(source) - excep...
dbt-labs__dbt-core-6951
[CT-1880] [Feature] Enable "merge" incremental strategy for postgres 15 ### Is this your first time submitting a feature request? - [X] I have read the [expectations for open source contributors](https://docs.getdbt.com/docs/contributing/oss-expectations) - [X] I have searched the existing issues, and I could not f...
[ { "content": "from datetime import datetime\nfrom dataclasses import dataclass\nfrom typing import Optional, Set, List, Any\n\nfrom dbt.adapters.base.meta import available\nfrom dbt.adapters.base.impl import AdapterConfig, ConstraintSupport\nfrom dbt.adapters.sql import SQLAdapter\nfrom dbt.adapters.postgres im...
[ { "content": "from datetime import datetime\nfrom dataclasses import dataclass\nfrom typing import Optional, Set, List, Any\n\nfrom dbt.adapters.base.meta import available\nfrom dbt.adapters.base.impl import AdapterConfig, ConstraintSupport\nfrom dbt.adapters.sql import SQLAdapter\nfrom dbt.adapters.postgres im...
diff --git a/.changes/unreleased/Features-20230211-163236.yaml b/.changes/unreleased/Features-20230211-163236.yaml new file mode 100644 index 00000000000..8ad95bbe85a --- /dev/null +++ b/.changes/unreleased/Features-20230211-163236.yaml @@ -0,0 +1,6 @@ +kind: Features +body: Add merge as valid incremental strategy for ...
mitmproxy__mitmproxy-5894
"raw" view is not raw, adds extra backslash #### Problem Description I just noticed during https://github.com/mitmproxy/mitmproxy/issues/5469#issuecomment-1191343747 #### Steps to reproduce the behavior: http.txt ``` HTTP/1.1 200 OK Content-Type: text/plain Content-Length: 1 \ ``` 1. `ncat -l 1337...
[ { "content": "from . import base\nfrom mitmproxy.utils import strutils\n\n\nclass ViewRaw(base.View):\n name = \"Raw\"\n\n def __call__(self, data, **metadata):\n return \"Raw\", base.format_text(strutils.bytes_to_escaped_str(data, True))\n\n def render_priority(self, data: bytes, **metadata) ->...
[ { "content": "from . import base\n\n\nclass ViewRaw(base.View):\n name = \"Raw\"\n\n def __call__(self, data, **metadata):\n return \"Raw\", base.format_text(data)\n\n def render_priority(self, data: bytes, **metadata) -> float:\n return 0.1 * float(bool(data))\n", "path": "mitmproxy/...
diff --git a/CHANGELOG.md b/CHANGELOG.md index fc72f5d1ba..3c0175badf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ ([#5725](https://github.com/mitmproxy/mitmproxy/pull/5725), @mhils) * Add `replay.server.add` command for adding flows to server replay buffer ([#5851](https://github.com/mitmproxy/m...
boto__botocore-1312
Error when trying to read 0 byte from StreamingBody Referring to the read method of `StreamingBody`: https://github.com/boto/botocore/blob/c632931a6cc5eab4113c976d430bcb9c059f829f/botocore/response.py#L69-L81 If anyone asks for 0 bytes from a StreamingBody, the conditional on line 76 will pass because chunk is empt...
[ { "content": "# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/\n# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the L...
[ { "content": "# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/\n# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the L...
diff --git a/.changes/next-release/enhancement-Response-34923.json b/.changes/next-release/enhancement-Response-34923.json new file mode 100644 index 0000000000..555e537a0d --- /dev/null +++ b/.changes/next-release/enhancement-Response-34923.json @@ -0,0 +1,5 @@ +{ + "type": "enhancement", + "description": "Allow rea...
CTFd__CTFd-1250
Fails to start when reverse proxy is configured with boolean <!-- If this is a bug report please fill out the template below. If this is a feature request please describe the behavior that you'd like to see. --> **Environment**: - CTFd Version/Commit: 22c1323 - Operating System: Ubuntu 18.04 - Web Br...
[ { "content": "import datetime\nimport os\nimport sys\nfrom distutils.version import StrictVersion\n\nfrom flask import Flask, Request\nfrom flask_migrate import upgrade\nfrom jinja2 import FileSystemLoader\nfrom jinja2.sandbox import SandboxedEnvironment\nfrom six.moves import input\nfrom werkzeug.middleware.pr...
[ { "content": "import datetime\nimport os\nimport sys\nfrom distutils.version import StrictVersion\n\nfrom flask import Flask, Request\nfrom flask_migrate import upgrade\nfrom jinja2 import FileSystemLoader\nfrom jinja2.sandbox import SandboxedEnvironment\nfrom six.moves import input\nfrom werkzeug.middleware.pr...
diff --git a/CTFd/__init__.py b/CTFd/__init__.py index ed0a0880c..55a543f34 100644 --- a/CTFd/__init__.py +++ b/CTFd/__init__.py @@ -177,7 +177,7 @@ def create_app(config="CTFd.config.Config"): reverse_proxy = app.config.get("REVERSE_PROXY") if reverse_proxy: - if "," in reverse_proxy: + ...
freqtrade__freqtrade-3490
I get the same profit / loss report in all time frames <!-- Have you searched for similar issues before posting it? Yes If you have discovered a bug in the bot, please [search our issue tracker](https://github.com/freqtrade/freqtrade/issues?q=is%3Aissue). If it hasn't been reported, please create a new issue. ...
[ { "content": "\"\"\"\nFunctions to handle deprecated settings\n\"\"\"\n\nimport logging\nfrom typing import Any, Dict\n\nfrom freqtrade.exceptions import OperationalException\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef check_conflicting_settings(config: Dict[str, Any],\n sec...
[ { "content": "\"\"\"\nFunctions to handle deprecated settings\n\"\"\"\n\nimport logging\nfrom typing import Any, Dict\n\nfrom freqtrade.exceptions import OperationalException\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef check_conflicting_settings(config: Dict[str, Any],\n sec...
diff --git a/freqtrade/configuration/deprecated_settings.py b/freqtrade/configuration/deprecated_settings.py index cefc6ac1470..03ed41ab81e 100644 --- a/freqtrade/configuration/deprecated_settings.py +++ b/freqtrade/configuration/deprecated_settings.py @@ -72,4 +72,9 @@ def process_temporary_deprecated_settings(config:...
NVIDIA__NeMo-3552
from_pretrained() does not update configuration in exp_manager **Describe the bug** When fine tuning from a NeMo model (ex. stt_en_cn1024), the exp_manager's cfg is not updated properly. I can see that in my run the model uses one config, but WandB reports another. This issue did not occur in v1.4.0 and happened...
[ { "content": "# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2....
[ { "content": "# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2....
diff --git a/nemo/core/classes/modelPT.py b/nemo/core/classes/modelPT.py index e5ece5002cff..7cacd2cbc940 100644 --- a/nemo/core/classes/modelPT.py +++ b/nemo/core/classes/modelPT.py @@ -1153,6 +1153,10 @@ def cfg(self, cfg): self._cfg = cfg self._set_hparams(OmegaConf.create({'cfg': self._cfg})) + ...
keras-team__keras-5939
RuntimeError: Unable to create link (Name already exists) : Bidirectionnal name ? I'm up-to-date with the master branch of Keras, and have the same kind of problem than here : https://github.com/fchollet/keras/issues/new When I save my model, equiped with a bidirectional layer, that appears : autoencoder.autoe...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport copy\nfrom ..engine import Layer\nfrom ..engine import InputSpec\nfrom .. import backend as K\n\n\nclass Wrapper(Layer):\n \"\"\"Abstract wrapper base class.\n\n Wrappers take another layer and augment it in various wa...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport copy\nfrom ..engine import Layer\nfrom ..engine import InputSpec\nfrom .. import backend as K\n\n\nclass Wrapper(Layer):\n \"\"\"Abstract wrapper base class.\n\n Wrappers take another layer and augment it in various wa...
diff --git a/keras/layers/wrappers.py b/keras/layers/wrappers.py index 663d39848866..451e6f4abcec 100644 --- a/keras/layers/wrappers.py +++ b/keras/layers/wrappers.py @@ -229,8 +229,10 @@ def reset_states(self): self.backward_layer.reset_states() def build(self, input_shape): - self.forward_layer...
TheAlgorithms__Python-5734
Rewrite *other* fibonacci.py I opened issue #5665 to have `fibonacci.py` rewritten, but apparently there are multiple files with that name. The PR that @citharus made (#5677) revamps the file `dynamic_programming/fibonacci.py` (thanks for your contributions btw!) whereas this issue seeks to revamp the file `maths/fibon...
[ { "content": "# fibonacci.py\n\"\"\"\nCalculates the Fibonacci sequence using iteration, recursion, and a simplified\nform of Binet's formula\n\nNOTE 1: the iterative and recursive functions are more accurate than the Binet's\nformula function because the iterative function doesn't use floats\n\nNOTE 2: the Bin...
[ { "content": "# fibonacci.py\n\"\"\"\nCalculates the Fibonacci sequence using iteration, recursion, and a simplified\nform of Binet's formula\n\nNOTE 1: the iterative and recursive functions are more accurate than the Binet's\nformula function because the iterative function doesn't use floats\n\nNOTE 2: the Bin...
diff --git a/maths/fibonacci.py b/maths/fibonacci.py index b009ea9df38a..9b193b74a827 100644 --- a/maths/fibonacci.py +++ b/maths/fibonacci.py @@ -95,8 +95,8 @@ def fib_binet(n: int) -> list[int]: NOTE 1: this function diverges from fib_iterative at around n = 71, likely due to compounding floating-point arit...
RedHatInsights__insights-core-2915
Remove CalledProcessError logs generated while creating a core3 archive Failing commands [generate a CalledProcessError in the collection log during serialization](https://github.com/RedHatInsights/insights-core/blob/master/insights/core/serde.py#L194). Those errors are already captured in the archive metadata, and the...
[ { "content": "\"\"\"\nThe serde module provides decorators that allow developers to register\nserializer and deserializer functions for types. It also provides a\n:py:class`Hydration` class that uses registered serde functions to save and\nload objects from the file system. The Hydration class includes a\n:py:f...
[ { "content": "\"\"\"\nThe serde module provides decorators that allow developers to register\nserializer and deserializer functions for types. It also provides a\n:py:class`Hydration` class that uses registered serde functions to save and\nload objects from the file system. The Hydration class includes a\n:py:f...
diff --git a/insights/core/serde.py b/insights/core/serde.py index 154b96f797..adff200feb 100644 --- a/insights/core/serde.py +++ b/insights/core/serde.py @@ -191,7 +191,6 @@ def dehydrate(self, comp, broker): doc["results"] = marshal(value, root=self.data, pool=self.pool) except Exception...
aio-libs__aiohttp-2543
Drop await aiohttp.request(...) Closing request/session is too error-prone in the case, especially if an exception was generated. The only robust solution is prohibiting `await request()` syntax but supporting `async with request() as resp:` only. After implementing proposed restriction we'll get very clean conte...
[ { "content": "\"\"\"HTTP Client for asyncio.\"\"\"\n\nimport asyncio\nimport base64\nimport hashlib\nimport json\nimport os\nimport sys\nimport traceback\nimport warnings\n\nfrom multidict import CIMultiDict, MultiDict, MultiDictProxy, istr\nfrom yarl import URL\n\nfrom . import connector as connector_mod\nfrom...
[ { "content": "\"\"\"HTTP Client for asyncio.\"\"\"\n\nimport asyncio\nimport base64\nimport hashlib\nimport json\nimport os\nimport sys\nimport traceback\nimport warnings\n\nfrom multidict import CIMultiDict, MultiDict, MultiDictProxy, istr\nfrom yarl import URL\n\nfrom . import connector as connector_mod\nfrom...
diff --git a/CHANGES/2362.feature b/CHANGES/2362.feature new file mode 100644 index 00000000000..0b0369b1e29 --- /dev/null +++ b/CHANGES/2362.feature @@ -0,0 +1,2 @@ +Forbid synchronous context managers for `ClientSession` and test +server/client. diff --git a/aiohttp/client.py b/aiohttp/client.py index a453358b806..6d...
geopandas__geopandas-535
ENH: passthrough additional kwargs for buffer The shapely `buffer` method has some more options (see https://shapely.readthedocs.io/en/latest/manual.html#object.buffer), we could pass them through
[ { "content": "from warnings import warn\n\nimport numpy as np\nimport pandas as pd\nfrom pandas import Series, DataFrame, MultiIndex\nfrom pandas.core.indexing import _NDFrameIndexer\nfrom shapely.geometry import box, MultiPoint, MultiLineString, MultiPolygon\nfrom shapely.ops import cascaded_union, unary_union...
[ { "content": "from warnings import warn\n\nimport numpy as np\nimport pandas as pd\nfrom pandas import Series, DataFrame, MultiIndex\nfrom pandas.core.indexing import _NDFrameIndexer\nfrom shapely.geometry import box, MultiPoint, MultiLineString, MultiPolygon\nfrom shapely.ops import cascaded_union, unary_union...
diff --git a/geopandas/base.py b/geopandas/base.py index 8b1bec89db..8d8423e612 100644 --- a/geopandas/base.py +++ b/geopandas/base.py @@ -295,8 +295,8 @@ def sindex(self): self._generate_sindex() return self._sindex - def buffer(self, distance, resolution=16): - return gpd.GeoSeries([...
searx__searx-2764
searx.webadapter and utils/standalone_searx.py issues <!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SEARX --> **Version of Searx, commit number if you are using on master branch and stipulate if you forked Searx** <!-- If you are running on master branch using git execute this command in order ...
[ { "content": "#!/usr/bin/env python\n\"\"\"Script to run searx from terminal.\n\nGetting categories without initiate the engine will only return `['general']`\n\n>>> import searx.engines\n... list(searx.engines.categories.keys())\n['general']\n>>> import searx.search\n... searx.search.initialize()\n... list(sea...
[ { "content": "#!/usr/bin/env python\n\"\"\"Script to run searx from terminal.\n\nGetting categories without initiate the engine will only return `['general']`\n\n>>> import searx.engines\n... list(searx.engines.categories.keys())\n['general']\n>>> import searx.search\n... searx.search.initialize()\n... list(sea...
diff --git a/searx_extra/standalone_searx.py b/searx_extra/standalone_searx.py index f52b7e80cb..b30762d3fd 100755 --- a/searx_extra/standalone_searx.py +++ b/searx_extra/standalone_searx.py @@ -31,7 +31,7 @@ ... engine_cs = list(searx.engines.categories.keys()) ... # load module ... spec = importlib.util.spec_from_...
bridgecrewio__checkov-3626
CKV_DOCKER_10 mistakes quoted absolute paths for relative paths **Describe the issue** CKV_DOCKER_10 mistakes quoted absolute paths for relative paths. **Examples** ``` cat << EOF > Dockerfile FROM alpine:3.16 WORKDIR "/app" EOF checkov --check CKV_DOCKER_10 --file Dockerfile ``` ![image](https://user-i...
[ { "content": "from __future__ import annotations\n\nimport re\n\nfrom checkov.common.models.enums import CheckCategories, CheckResult\nfrom checkov.dockerfile.base_dockerfile_check import BaseDockerfileCheck\n\nISABSOLUTE = re.compile(\"(^/[A-Za-z0-9-_+]*)|(^[A-Za-z0-9-_+]:\\\\\\\\.*)|(^\\\\$[{}A-Za-z0-9-_+].*)...
[ { "content": "from __future__ import annotations\n\nimport re\n\nfrom checkov.common.models.enums import CheckCategories, CheckResult\nfrom checkov.dockerfile.base_dockerfile_check import BaseDockerfileCheck\n\nISABSOLUTE = re.compile(\"^\\\"?((/[A-Za-z0-9-_+]*)|([A-Za-z0-9-_+]:\\\\\\\\.*)|(\\\\$[{}A-Za-z0-9-_+...
diff --git a/checkov/dockerfile/checks/WorkdirIsAbsolute.py b/checkov/dockerfile/checks/WorkdirIsAbsolute.py index f59cbcdf0c..b48c597fa8 100644 --- a/checkov/dockerfile/checks/WorkdirIsAbsolute.py +++ b/checkov/dockerfile/checks/WorkdirIsAbsolute.py @@ -5,7 +5,7 @@ from checkov.common.models.enums import CheckCategor...
ipython__ipython-9228
Output for semicolon-terminated lines with comments cf https://github.com/JuliaLang/IJulia.jl/issues/109 The output of a semicolon-terminated line with comment is not suppressed in IPython. ``` b = 1 b; # foo ``` give `Out[13]: 1` ``` b = 1 b; ``` does not. Havent found such and issue on our tracker. @takluyver...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Displayhook for IPython.\n\nThis defines a callable class that IPython uses for `sys.displayhook`.\n\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom __future__ import print_function\n\nimport sys\...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Displayhook for IPython.\n\nThis defines a callable class that IPython uses for `sys.displayhook`.\n\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom __future__ import print_function\n\nimport sys\...
diff --git a/IPython/core/displayhook.py b/IPython/core/displayhook.py index 5f0fd4846ca..860c744c74f 100644 --- a/IPython/core/displayhook.py +++ b/IPython/core/displayhook.py @@ -96,7 +96,7 @@ def quiet(self): tokens = list(tokenize.generate_tokens(sio.readline)) for token in reversed(tokens): - ...
liqd__a4-meinberlin-4993
breadcrumb navigation does not work properly **URL:**https://meinberlin-dev.liqd.net/budgeting/2023-00998/ **user:** user with code **expected behaviour:** breadcrumb navigation works properly **behaviour:** project page, enter code above map, get redirected to list, vote on list, go into proposal detail -> breadbru...
[ { "content": "import datetime\nfrom urllib.parse import parse_qs\nfrom urllib.parse import urlparse\n\nimport django_filters\nfrom django.urls import resolve\nfrom django.urls import reverse\nfrom django.utils.translation import gettext_lazy as _\n\nfrom adhocracy4.categories import filters as category_filters\...
[ { "content": "import datetime\nfrom urllib.parse import parse_qs\nfrom urllib.parse import urlparse\n\nimport django_filters\nfrom django.urls import resolve\nfrom django.urls import reverse\nfrom django.utils.translation import gettext_lazy as _\n\nfrom adhocracy4.categories import filters as category_filters\...
diff --git a/meinberlin/apps/budgeting/templates/meinberlin_budgeting/proposal_list.html b/meinberlin/apps/budgeting/templates/meinberlin_budgeting/proposal_list.html index a44c1d85a5..dbe0c00129 100644 --- a/meinberlin/apps/budgeting/templates/meinberlin_budgeting/proposal_list.html +++ b/meinberlin/apps/budgeting/tem...
sanic-org__sanic-2770
Circular import in target file accidentally triggers 'No module named ... found' ### Is there an existing issue for this? - [X] I have searched the existing issues ### Describe the bug While developing it appears that I accidentally caused a circular import which Python traces back to starting in the file I have my ...
[ { "content": "import os\nimport shutil\nimport sys\n\nfrom argparse import Namespace\nfrom functools import partial\nfrom textwrap import indent\nfrom typing import List, Union\n\nfrom sanic.app import Sanic\nfrom sanic.application.logo import get_logo\nfrom sanic.cli.arguments import Group\nfrom sanic.cli.base...
[ { "content": "import os\nimport shutil\nimport sys\n\nfrom argparse import Namespace\nfrom functools import partial\nfrom textwrap import indent\nfrom typing import List, Union\n\nfrom sanic.app import Sanic\nfrom sanic.application.logo import get_logo\nfrom sanic.cli.arguments import Group\nfrom sanic.cli.base...
diff --git a/sanic/cli/app.py b/sanic/cli/app.py index 07d02c7ed5..b8db98b98c 100644 --- a/sanic/cli/app.py +++ b/sanic/cli/app.py @@ -180,6 +180,10 @@ def _get_app(self, app_loader: AppLoader): " Example File: project/sanic_server.py -> app\n" " Example Module: project.sanic...
internetarchive__openlibrary-7922
Update solr Docker tag to v8.11.2 [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [solr](https://togithub.com/apache/solr) | minor | `8.10.1` -> `8.11.2` | --- ### Configuration 📅 **Sch...
[ { "content": "#!/usr/bin/env python\nimport os\n\nroot = os.path.dirname(__file__)\nOVERRIDES = {'type': \"Literal['work', 'author', 'subject']\"}\n\n\ndef generate():\n \"\"\"This function generates the types.py file.\"\"\"\n import xml.etree.ElementTree as ET\n\n # read the managed-schema xml file\n ...
[ { "content": "#!/usr/bin/env python\nimport os\n\nroot = os.path.dirname(__file__)\nOVERRIDES = {'type': \"Literal['work', 'author', 'subject']\"}\n\n\ndef generate():\n \"\"\"This function generates the types.py file.\"\"\"\n import xml.etree.ElementTree as ET\n\n # read the managed-schema xml file\n ...
diff --git a/compose.yaml b/compose.yaml index c997f9e49ec..d69cdb30b54 100644 --- a/compose.yaml +++ b/compose.yaml @@ -17,7 +17,7 @@ services: max-file: "4" solr: - image: solr:8.10.1 + image: solr:9.2.1 expose: - 8983 environment: @@ -34,7 +34,7 @@ services: -Dsolr.autoC...
jschneier__django-storages-1154
GS_BLOB_CHUNK_SIZE not respected for reuploading existing files Using the Gcloud backend, if a file with a given name already exists in the bucket, the `GS_BLOB_CHUNK_SIZE` setting is not taken into account for the upload. This is clearly visible in this snippet; https://github.com/jschneier/django-storages/blob/620...
[ { "content": "import mimetypes\nimport warnings\nfrom datetime import timedelta\nfrom tempfile import SpooledTemporaryFile\n\nfrom django.core.exceptions import ImproperlyConfigured, SuspiciousOperation\nfrom django.core.files.base import File\nfrom django.utils import timezone\nfrom django.utils.deconstruct im...
[ { "content": "import mimetypes\nimport warnings\nfrom datetime import timedelta\nfrom tempfile import SpooledTemporaryFile\n\nfrom django.core.exceptions import ImproperlyConfigured, SuspiciousOperation\nfrom django.core.files.base import File\nfrom django.utils import timezone\nfrom django.utils.deconstruct im...
diff --git a/AUTHORS b/AUTHORS index 7f7baecfa..73afceb70 100644 --- a/AUTHORS +++ b/AUTHORS @@ -48,6 +48,7 @@ By order of apparition, thanks: * Dan Hook * François Freitag (S3) * Uxío Fuentefría (S3) + * wigeria (Google Cloud Storage patch) Extra thanks to Marty for adding this in Django, diff -...
pypa__setuptools-1388
URL to Visual Studio download is dead The url in this message is no longer active: https://github.com/pypa/setuptools/blob/818ba40529993d8f318fe282bdb8420455dbf926/setuptools/msvc.py#L232-L236 The current best URL is `https://visualstudio.microsoft.com/downloads/` and the title is "Build Tools for Visual Studio"
[ { "content": "\"\"\"\nImproved support for Microsoft Visual C++ compilers.\n\nKnown supported compilers:\n--------------------------\nMicrosoft Visual C++ 9.0:\n Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64)\n Microsoft Windows SDK 6.1 (x86, x64, ia64)\n Microsoft Windows SDK 7.0 (x86, x64,...
[ { "content": "\"\"\"\nImproved support for Microsoft Visual C++ compilers.\n\nKnown supported compilers:\n--------------------------\nMicrosoft Visual C++ 9.0:\n Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64)\n Microsoft Windows SDK 6.1 (x86, x64, ia64)\n Microsoft Windows SDK 7.0 (x86, x64,...
diff --git a/changelog.d/1388.change.rst b/changelog.d/1388.change.rst new file mode 100644 index 0000000000..b98dc966df --- /dev/null +++ b/changelog.d/1388.change.rst @@ -0,0 +1 @@ +Fixed "Microsoft Visual C++ Build Tools" link in exception when Visual C++ not found. diff --git a/setuptools/msvc.py b/setuptools/msvc....
kivy__kivy-3326
RstDocument don't allow the right space for images If you try to add images to RstDocument they will come on the text and not after. On the realese **1.8.0** it was great, i have do some research but i didn't find what changed ``` python BoxLayout: RstDocument: text: "==================\nTitle\n===========...
[ { "content": "'''\nreStructuredText renderer\n=========================\n\n.. versionadded:: 1.1.0\n\n`reStructuredText <http://docutils.sourceforge.net/rst.html>`_ is an\neasy-to-read, what-you-see-is-what-you-get plaintext markup syntax and parser\nsystem.\n\n.. warning::\n\n This widget is highly experime...
[ { "content": "'''\nreStructuredText renderer\n=========================\n\n.. versionadded:: 1.1.0\n\n`reStructuredText <http://docutils.sourceforge.net/rst.html>`_ is an\neasy-to-read, what-you-see-is-what-you-get plaintext markup syntax and parser\nsystem.\n\n.. warning::\n\n This widget is highly experime...
diff --git a/kivy/uix/rst.py b/kivy/uix/rst.py index 4b17373759..284bdc9101 100644 --- a/kivy/uix/rst.py +++ b/kivy/uix/rst.py @@ -952,7 +952,7 @@ def dispatch_visit(self, node): image = RstImage(source=uri) align = node.get('align', 'center') - root = AnchorLayout(size_hint_y...
carltongibson__django-filter-1637
[2.1.0] BaseCSVWidget.value_from_datadict — AttributeError: 'list' object has no attribute 'split' I ran into … ``` Traceback (most recent call last): [..] File "/usr/local/lib/python3.7/site-packages/django/forms/forms.py", line 393, in _clean_fields value = field.widget.value_from_datadict(self.data, sel...
[ { "content": "from collections.abc import Iterable\nfrom copy import deepcopy\nfrom itertools import chain\nfrom re import search, sub\n\nfrom django import forms\nfrom django.db.models.fields import BLANK_CHOICE_DASH\nfrom django.forms.utils import flatatt\nfrom django.utils.datastructures import MultiValueDic...
[ { "content": "from collections.abc import Iterable\nfrom copy import deepcopy\nfrom itertools import chain\nfrom re import search, sub\n\nfrom django import forms\nfrom django.db.models.fields import BLANK_CHOICE_DASH\nfrom django.forms.utils import flatatt\nfrom django.utils.datastructures import MultiValueDic...
diff --git a/django_filters/widgets.py b/django_filters/widgets.py index fe99fec9..f5c99b11 100644 --- a/django_filters/widgets.py +++ b/django_filters/widgets.py @@ -205,6 +205,10 @@ def value_from_datadict(self, data, files, name): if value is not None: if value == "": # empty value should pars...
mne-tools__mne-bids-1135
doc build fails: "tut-ieeg-localize" moved Our doc build is failing with a warning because the reference to `tut-ieeg-localize` cannot be found anymore. Was this something in MNE-Python that has now moved? @alexrockhill do you know more? :-) > /home/circleci/project/doc/auto_examples/convert_ieeg_to_bids.rst:1083: W...
[ { "content": "\"\"\"Configure details for documentation with sphinx.\"\"\"\nimport os\nimport sys\nfrom datetime import date\n\nimport sphinx_gallery # noqa: F401\nfrom sphinx_gallery.sorting import ExampleTitleSortKey\n\nimport mne_bids\n\n\n# If extensions (or modules to document with autodoc) are in another...
[ { "content": "\"\"\"Configure details for documentation with sphinx.\"\"\"\nimport os\nimport sys\nfrom datetime import date\n\nimport sphinx_gallery # noqa: F401\nfrom sphinx_gallery.sorting import ExampleTitleSortKey\n\nimport mne_bids\n\n\n# If extensions (or modules to document with autodoc) are in another...
diff --git a/doc/conf.py b/doc/conf.py index 89e2538e4..0a704e939 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -166,6 +166,7 @@ intersphinx_mapping = { 'python': ('https://docs.python.org/3', None), 'mne': ('https://mne.tools/dev', None), + 'mne-gui-addons': ('https://mne.tools/mne-gui-addons', None), ...
deis__deis-1521
deis apps:destroy not destroying the app logs Steps to reproduce ``` 1) Create an App using deis create 2) deis apps:logs --app=<appName> ``` the above command should show 204 no content available as we haven't launched the app yet ``` 3) git push deis master 4) deis apps:destroy --app=<appName> ``` Follow 1 a...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nData models for the Deis API.\n\"\"\"\n\nfrom __future__ import unicode_literals\nimport etcd\nimport importlib\nimport logging\nimport os\nimport subprocess\n\nfrom celery.canvas import group\nfrom django.conf import settings\nfrom django.contrib.auth.models imp...
[ { "content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nData models for the Deis API.\n\"\"\"\n\nfrom __future__ import unicode_literals\nimport etcd\nimport importlib\nimport logging\nimport os\nimport subprocess\n\nfrom celery.canvas import group\nfrom django.conf import settings\nfrom django.contrib.auth.models imp...
diff --git a/controller/api/models.py b/controller/api/models.py index e36b6431a7..65188014d2 100644 --- a/controller/api/models.py +++ b/controller/api/models.py @@ -139,6 +139,10 @@ def create(self, *args, **kwargs): def delete(self, *args, **kwargs): for c in self.container_set.all(): c.de...
jupyterhub__jupyterhub-4720
modifyable api_page_default_limit variable on the admin page <!-- Thank you for contributing. These HTML comments will not render in the issue, but you can delete them once you've read them if you prefer! --> ### Proposed change It is rather annoying that the number of the listed servers (`api_page_default_limit`...
[ { "content": "#!/usr/bin/env python3\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport os\nimport shutil\nimport sys\nfrom subprocess import check_call\n\nfrom setuptools import Command, setup\nfrom setuptools.command.bdist_egg import bdist_egg\nfro...
[ { "content": "#!/usr/bin/env python3\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport os\nimport shutil\nimport sys\nfrom subprocess import check_call\n\nfrom setuptools import Command, setup\nfrom setuptools.command.bdist_egg import bdist_egg\nfro...
diff --git a/.gitignore b/.gitignore index c39f6ba91a..e3ca05fa0e 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,5 @@ docs/source/reference/metrics.rst oldest-requirements.txt jupyterhub-proxy.pid examples/server-api/service-token + +*.hot-update* diff --git a/jsx/package-lock.json b/jsx/package-lock.json ind...
strawberry-graphql__strawberry-2455
ContrainedFloatValue from pydantic needs support <!-- Provide a general summary of the bug in the title above. --> <!--- This template is entirely optional and can be removed, but is here to help both you and us. --> <!--- Anything on lines wrapped in comments like these will not show up in the final text. --> #...
[ { "content": "import builtins\nfrom decimal import Decimal\nfrom typing import Any, List, Optional, Type\nfrom uuid import UUID\n\nimport pydantic\nfrom pydantic import BaseModel\nfrom pydantic.typing import get_args, get_origin, is_new_type, new_type_supertype\nfrom pydantic.utils import lenient_issubclass\n\n...
[ { "content": "import builtins\nfrom decimal import Decimal\nfrom typing import Any, List, Optional, Type\nfrom uuid import UUID\n\nimport pydantic\nfrom pydantic import BaseModel\nfrom pydantic.typing import get_args, get_origin, is_new_type, new_type_supertype\nfrom pydantic.utils import lenient_issubclass\n\n...
diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..7b17f3fb9d --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,13 @@ +Release type: minor + +Support constrained float field types in Pydantic models. + +i.e. + +```python +import pydantic + +class Model(pydantic.BaseModel): + field: pydantic.confloat...
wagtail__wagtail-3277
Elasticsearch backend indexes draft updates of existing pages ### Issue Summary When saving a draft version of an existing live page the Elasticsearch backend reindexes the page with the draft content. The reindexed content will potentially cause frontend search results to include the page if the search query matche...
[ { "content": "from __future__ import absolute_import, unicode_literals\n\nfrom django.db.models.signals import post_delete, post_save\n\nfrom wagtail.wagtailsearch import index\n\n\ndef post_save_signal_handler(instance, **kwargs):\n index.insert_or_update_object(instance)\n\n\ndef post_delete_signal_handler...
[ { "content": "from __future__ import absolute_import, unicode_literals\n\nfrom django.db.models.signals import post_delete, post_save\n\nfrom wagtail.wagtailsearch import index\n\n\ndef post_save_signal_handler(instance, update_fields=None, **kwargs):\n if update_fields is not None:\n # fetch a fresh ...
diff --git a/wagtail/wagtailsearch/signal_handlers.py b/wagtail/wagtailsearch/signal_handlers.py index e522bb2891b4..559ef9262f26 100644 --- a/wagtail/wagtailsearch/signal_handlers.py +++ b/wagtail/wagtailsearch/signal_handlers.py @@ -5,7 +5,13 @@ from wagtail.wagtailsearch import index -def post_save_signal_handl...
internetarchive__openlibrary-8076
Display author date(s) with name for librarians <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> Author disambiguation is difficult and even more difficult when the author names all look the same for different identities. To see precisely which author is associated ...
[ { "content": "from dataclasses import dataclass\nimport itertools\nimport time\nimport copy\nimport json\nimport logging\nimport re\nfrom typing import Any, cast\nfrom collections.abc import Iterable\nfrom unicodedata import normalize\nimport requests\nimport web\nfrom requests import Response\nimport urllib\n\...
[ { "content": "from dataclasses import dataclass\nimport itertools\nimport time\nimport copy\nimport json\nimport logging\nimport re\nfrom typing import Any, cast\nfrom collections.abc import Iterable\nfrom unicodedata import normalize\nimport requests\nimport web\nfrom requests import Response\nimport urllib\n\...
diff --git a/openlibrary/macros/BookByline.html b/openlibrary/macros/BookByline.html index 34ab4f3f2ed..6a5b5c1b16f 100644 --- a/openlibrary/macros/BookByline.html +++ b/openlibrary/macros/BookByline.html @@ -1,21 +1,26 @@ -$def with(author_names_and_urls, limit=None, overflow_url=None, attrs='') +$def with(author_name...
bids-standard__pybids-663
UnicodeDecodeError in index.py I am working on a python package that uses templateflow which uses pybids. One of our users is running into a UnicodeDecodeError: https://github.com/yeatmanlab/pyAFQ/issues/267 It looks like it may have a similar to this issue: https://github.com/bids-standard/pybids/issues/69 I.e., c...
[ { "content": "\"\"\"File-indexing functionality. \"\"\"\n\nimport os\nimport json\nfrom collections import defaultdict\nfrom pathlib import Path\n\nfrom bids_validator import BIDSValidator\n\nimport bids.config\nfrom ..utils import listify, make_bidsfile\nfrom ..exceptions import BIDSConflictingValuesError\n\nf...
[ { "content": "\"\"\"File-indexing functionality. \"\"\"\n\nimport os\nimport json\nfrom collections import defaultdict\nfrom pathlib import Path\n\nfrom bids_validator import BIDSValidator\n\nimport bids.config\nfrom ..utils import listify, make_bidsfile\nfrom ..exceptions import BIDSConflictingValuesError\n\nf...
diff --git a/bids/layout/index.py b/bids/layout/index.py index a6d37c7e0..fdc043408 100644 --- a/bids/layout/index.py +++ b/bids/layout/index.py @@ -275,7 +275,7 @@ def _index_metadata(self): file_data[key] = defaultdict(list) if ext == dot + 'json': - with ope...
cocotb__cocotb-2469
ipython_support and pytest assertion rewriting don't work together When running `make MODULE=cocotb.ipython_support` while in any of the examples or tests I get the following error. ``` 0.00ns ERROR cocotb.regression regression.py:408 in _score_test Test Failed: ...
[ { "content": "# Copyright (c) 2013 Potential Ventures Ltd\n# Copyright (c) 2013 SolarFlare Communications Inc\n# All rights reserved.\n\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redistributions of...
[ { "content": "# Copyright (c) 2013 Potential Ventures Ltd\n# Copyright (c) 2013 SolarFlare Communications Inc\n# All rights reserved.\n\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redistributions of...
diff --git a/cocotb/__init__.py b/cocotb/__init__.py index 4fa5c6f04e..38e008a630 100644 --- a/cocotb/__init__.py +++ b/cocotb/__init__.py @@ -297,7 +297,7 @@ def _initialise_testbench_(argv_): # import the test modules. from _pytest.config import Config from _pytest.assertion imp...
facebookresearch__ParlAI-1632
Training transformer model on dialydialog with poor results Hi everyone, after training a transfomer/generator model with the dailydialog task, I received poor result interacting with the trained model. Below you can find the parameters I used for training and a screenshot of the "conversation". My question is, what...
[ { "content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\n\n\"\"\"\nGeneric PyTorch-based Generator agent. Implements quite a bit of boilerplate,\ninc...
[ { "content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\n\n\"\"\"\nGeneric PyTorch-based Generator agent. Implements quite a bit of boilerplate,\ninc...
diff --git a/parlai/core/torch_generator_agent.py b/parlai/core/torch_generator_agent.py index f92dc8eda1d..a4d09a26270 100644 --- a/parlai/core/torch_generator_agent.py +++ b/parlai/core/torch_generator_agent.py @@ -603,7 +603,10 @@ def eval_step(self, batch): ) elif self.beam_size == 1: ...
pymedusa__Medusa-10212
Unable to add `1883` from TMDB **Describe the bug** Want to add the show `1883` to my list from TMDB where it is available but get no results. https://www.themoviedb.org/tv/118357-1883 ![image](https://user-images.githubusercontent.com/4103090/147637425-c4d102a4-6c33-4fad-89b6-40a9a64b548a.png) Not sure it this i...
[ { "content": "# coding=utf-8\n\n\"\"\"TMDB module.\"\"\"\nfrom __future__ import division\nfrom __future__ import unicode_literals\n\nimport logging\nfrom builtins import range\nfrom collections import OrderedDict\nfrom datetime import datetime, timedelta\n\nfrom dateutil import parser\n\nfrom medusa.app import...
[ { "content": "# coding=utf-8\n\n\"\"\"TMDB module.\"\"\"\nfrom __future__ import division\nfrom __future__ import unicode_literals\n\nimport logging\nfrom builtins import range\nfrom collections import OrderedDict\nfrom datetime import datetime, timedelta\n\nfrom dateutil import parser\n\nfrom medusa.app import...
diff --git a/medusa/indexers/tmdb/api.py b/medusa/indexers/tmdb/api.py index 68677fb172..69f5aa4b45 100644 --- a/medusa/indexers/tmdb/api.py +++ b/medusa/indexers/tmdb/api.py @@ -199,6 +199,8 @@ def search(self, series): mapped_results = [] if results: mapped_results = self._map_results(r...
liberapay__liberapay.com-405
Payday's log messages don't show the progress From https://github.com/liberapay/salon/issues/64#issuecomment-240387083: > Now that the HTTPS connection to MangoPay is reused we don't have any progress indicator left in payday logs, we should probably print one message for each transfer we do. Payday's log messages do...
[ { "content": "from __future__ import print_function, unicode_literals\n\nfrom datetime import date\nimport os\nimport os.path\nimport pickle\n\nimport aspen.utils\nfrom psycopg2 import IntegrityError\n\nfrom liberapay import constants\nfrom liberapay.billing.exchanges import transfer\nfrom liberapay.exceptions ...
[ { "content": "from __future__ import print_function, unicode_literals\n\nfrom datetime import date\nimport os\nimport os.path\nimport pickle\n\nimport aspen.utils\nfrom psycopg2 import IntegrityError\n\nfrom liberapay import constants\nfrom liberapay.billing.exchanges import transfer\nfrom liberapay.exceptions ...
diff --git a/liberapay/billing/payday.py b/liberapay/billing/payday.py index bb661db465..b7ba64ba2d 100644 --- a/liberapay/billing/payday.py +++ b/liberapay/billing/payday.py @@ -411,7 +411,10 @@ def check_balances(cursor): def transfer_for_real(self, transfers): db = self.db - for t in transfers...
encode__django-rest-framework-6472
limit_choices_to and Q objects After upgrading from 3.8 -> 3.9 I've encountered an issue with the new limit_choices_to foreign key changes. ``` filter() argument after ** must be a mapping, not Q ``` It seems the issue was documented in the original merge and a fix was proposed but I can't find an existing PR t...
[ { "content": "\"\"\"\nHelper functions for mapping model fields to a dictionary of default\nkeyword arguments that should be used for their equivalent serializer fields.\n\"\"\"\nimport inspect\n\nfrom django.core import validators\nfrom django.db import models\nfrom django.utils.text import capfirst\n\nfrom re...
[ { "content": "\"\"\"\nHelper functions for mapping model fields to a dictionary of default\nkeyword arguments that should be used for their equivalent serializer fields.\n\"\"\"\nimport inspect\n\nfrom django.core import validators\nfrom django.db import models\nfrom django.utils.text import capfirst\n\nfrom re...
diff --git a/rest_framework/utils/field_mapping.py b/rest_framework/utils/field_mapping.py index 991f20f17a..f11b4b94e6 100644 --- a/rest_framework/utils/field_mapping.py +++ b/rest_framework/utils/field_mapping.py @@ -251,7 +251,9 @@ def get_relation_kwargs(field_name, relation_info): limit_choices_to = model_f...
microsoft__DeepSpeed-4770
nv-sd CI test failure The Nightly CI for https://github.com/microsoft/DeepSpeed/actions/runs/7073374056 failed.
[ { "content": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\nimport torch\nfrom ..features.cuda_graph import CUDAGraph\n\n\nclass DSUNet(CUDAGraph, torch.nn.Module):\n\n def __init__(self, unet, enable_cuda_graph=True):\n super().__init__(enable_cu...
[ { "content": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\nimport torch\nfrom ..features.cuda_graph import CUDAGraph\n\n\nclass DSUNet(CUDAGraph, torch.nn.Module):\n\n def __init__(self, unet, enable_cuda_graph=True):\n super().__init__(enable_cu...
diff --git a/deepspeed/model_implementations/diffusers/unet.py b/deepspeed/model_implementations/diffusers/unet.py index 27627914cfcb..7da571975958 100644 --- a/deepspeed/model_implementations/diffusers/unet.py +++ b/deepspeed/model_implementations/diffusers/unet.py @@ -68,7 +68,8 @@ def _forward(self, ...
ivy-llc__ivy-18936
Fix reduction_ops.test_torch_mean | | | |---|---| |paddle|<a href="https://github.com/unifyai/ivy/actions/runs/6401575843/job/17376881374"><img src=https://img.shields.io/badge/-failure-red></a> |numpy|<a href="https://github.com/unifyai/ivy/actions/runs/6401575843/job/17376881374"><img src=https://img.shields.i...
[ { "content": "import ivy\r\nfrom ivy.func_wrapper import with_unsupported_dtypes\r\nfrom ivy.functional.frontends.torch.func_wrapper import (\r\n to_ivy_arrays_and_back,\r\n numpy_to_torch_style_args,\r\n)\r\nfrom collections import namedtuple\r\nimport ivy.functional.frontends.torch as torch_frontend\r\n...
[ { "content": "import ivy\r\nfrom ivy.func_wrapper import with_unsupported_dtypes\r\nfrom ivy.functional.frontends.torch.func_wrapper import (\r\n to_ivy_arrays_and_back,\r\n numpy_to_torch_style_args,\r\n)\r\nfrom collections import namedtuple\r\nimport ivy.functional.frontends.torch as torch_frontend\r\n...
diff --git a/ivy/functional/frontends/torch/reduction_ops.py b/ivy/functional/frontends/torch/reduction_ops.py index 3da44907cdac3..9d396e94ecc12 100644 --- a/ivy/functional/frontends/torch/reduction_ops.py +++ b/ivy/functional/frontends/torch/reduction_ops.py @@ -65,9 +65,11 @@ def sum(input, dim=None, keepdim=False, ...
rucio__rucio-6417
Unused subscription name in `subscriptions/<account>/<name>/Rules/States` endpoint ### Description The endpoint requires specifying a subscription name https://github.com/rucio/rucio/blob/fc3973a83b9d658fba5ef9f645f5816a594d4586/lib/rucio/web/rest/flaskapi/v1/subscriptions.py#L626-L627 However, it returns rule s...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright European Organization for Nuclear Research (CERN) since 2012\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://w...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright European Organization for Nuclear Research (CERN) since 2012\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://w...
diff --git a/lib/rucio/web/rest/flaskapi/v1/subscriptions.py b/lib/rucio/web/rest/flaskapi/v1/subscriptions.py index 97d4ee9934..b395531f33 100644 --- a/lib/rucio/web/rest/flaskapi/v1/subscriptions.py +++ b/lib/rucio/web/rest/flaskapi/v1/subscriptions.py @@ -530,7 +530,7 @@ def get(self, account, name=None): ...
conda-forge__conda-smithy-971
Fix linter error on missing target_platform Invoking `conda smithy recipe-lint` on the [conda-forge/go1.4-feedstock/meta.yaml]( https://github.com/conda-forge/go1.4-bootstrap-feedstock/blob/master/recipe/meta.yaml) file yields the following exception: ``` ± conda smithy recipe-lint Traceback (most recent call las...
[ { "content": "import shutil\nimport tempfile\nimport jinja2\nimport six\nimport datetime\nimport time\nfrom collections import defaultdict\nfrom contextlib import contextmanager\n\n@contextmanager\ndef tmp_directory():\n tmp_dir = tempfile.mkdtemp('_recipe')\n yield tmp_dir\n shutil.rmtree(tmp_dir)\n\n...
[ { "content": "import shutil\nimport tempfile\nimport jinja2\nimport six\nimport datetime\nimport time\nfrom collections import defaultdict\nfrom contextlib import contextmanager\n\n@contextmanager\ndef tmp_directory():\n tmp_dir = tempfile.mkdtemp('_recipe')\n yield tmp_dir\n shutil.rmtree(tmp_dir)\n\n...
diff --git a/conda_smithy/utils.py b/conda_smithy/utils.py index dea621b93..af2dfe716 100644 --- a/conda_smithy/utils.py +++ b/conda_smithy/utils.py @@ -44,6 +44,7 @@ def render_meta_yaml(text): defaultdict(lambda : ''), datetime=datetime, ...
coala__coala-1445
Spelling error in ContextManager `coalib/misc/ContextManagers.py` function `prepare_file` has a spelling error - `Can creates a temporary file ...` should be `Can create a temporary file ...`
[ { "content": "from contextlib import contextmanager, closing\nimport sys\nimport os\nfrom io import StringIO\nimport builtins\nimport signal\nimport threading\nimport platform\nimport tempfile\n\nfrom coalib.misc.MutableValue import MutableValue\n\n\n@contextmanager\ndef subprocess_timeout(sub_process, seconds,...
[ { "content": "from contextlib import contextmanager, closing\nimport sys\nimport os\nfrom io import StringIO\nimport builtins\nimport signal\nimport threading\nimport platform\nimport tempfile\n\nfrom coalib.misc.MutableValue import MutableValue\n\n\n@contextmanager\ndef subprocess_timeout(sub_process, seconds,...
diff --git a/coalib/misc/ContextManagers.py b/coalib/misc/ContextManagers.py index cfd1ea3e63..c0d7fb21db 100644 --- a/coalib/misc/ContextManagers.py +++ b/coalib/misc/ContextManagers.py @@ -171,7 +171,7 @@ def prepare_file(lines, create_tempfile=True, tempfile_kwargs={}): """ -...
MongoEngine__mongoengine-1435
Deleting an element from middle of ListField results in an incorrect list. ``` python import mongoengine as me class TestList(me.Document): test_list = me.ListField(me.IntField()) def test(): me.connect('test_list', host='mongomock://localhost') vals = [1, 2, 3, 4] test_list = TestList(test_list=vals...
[ { "content": "import itertools\nimport weakref\n\nimport six\n\nfrom mongoengine.common import _import_class\nfrom mongoengine.errors import DoesNotExist, MultipleObjectsReturned\n\n__all__ = ('BaseDict', 'BaseList', 'EmbeddedDocumentList')\n\n\nclass BaseDict(dict):\n \"\"\"A special dict so we can watch an...
[ { "content": "import itertools\nimport weakref\n\nimport six\n\nfrom mongoengine.common import _import_class\nfrom mongoengine.errors import DoesNotExist, MultipleObjectsReturned\n\n__all__ = ('BaseDict', 'BaseList', 'EmbeddedDocumentList')\n\n\nclass BaseDict(dict):\n \"\"\"A special dict so we can watch an...
diff --git a/mongoengine/base/datastructures.py b/mongoengine/base/datastructures.py index 5e90a2e55..8a7681e5d 100644 --- a/mongoengine/base/datastructures.py +++ b/mongoengine/base/datastructures.py @@ -138,10 +138,7 @@ def __setitem__(self, key, value, *args, **kwargs): return super(BaseList, self).__setite...
freedomofpress__securedrop-3115
[0.6.0] duplicated help string for update and check_for_updates ## Description Help strings are accidentally duplicated for two subcommands of `securedrop-admin` ## Steps to Reproduce `./securedrop-admin -h` ## Expected Behavior You get a unique string describing each possible command ## Actual Behavi...
[ { "content": "# -*- mode: python; coding: utf-8 -*-\n#\n# Copyright (C) 2013-2018 Freedom of the Press Foundation & al\n# Copyright (C) 2018 Loic Dachary <loic@dachary.org>\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...
[ { "content": "# -*- mode: python; coding: utf-8 -*-\n#\n# Copyright (C) 2013-2018 Freedom of the Press Foundation & al\n# Copyright (C) 2018 Loic Dachary <loic@dachary.org>\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...
diff --git a/admin/securedrop_admin/__init__.py b/admin/securedrop_admin/__init__.py index 43e6c2672e..0606575639 100755 --- a/admin/securedrop_admin/__init__.py +++ b/admin/securedrop_admin/__init__.py @@ -590,7 +590,7 @@ class ArgParseFormatterCombo(argparse.ArgumentDefaultsHelpFormatter, parse_update.set_defaul...
redis__redis-py-2966
Redis.json().objlen returns type list instead of int **Version**: redis-stack-server:7.2.0-v2 via docker; redis-py 5.0.0 **Platform**: macOS **Description**: Redis.json().objlen returns type list instead of int. The typing hint suggests it should return int instead of list. In redis-cli, it does return int though...
[ { "content": "import os\nfrom json import JSONDecodeError, loads\nfrom typing import Dict, List, Optional, Tuple, Union\n\nfrom redis.exceptions import DataError\nfrom redis.utils import deprecated_function\n\nfrom ._util import JsonType\nfrom .decoders import decode_dict_keys\nfrom .path import Path\n\n\nclass...
[ { "content": "import os\nfrom json import JSONDecodeError, loads\nfrom typing import Dict, List, Optional, Tuple, Union\n\nfrom redis.exceptions import DataError\nfrom redis.utils import deprecated_function\n\nfrom ._util import JsonType\nfrom .decoders import decode_dict_keys\nfrom .path import Path\n\n\nclass...
diff --git a/redis/commands/json/commands.py b/redis/commands/json/commands.py index 4c2e58369c..b37dc37687 100644 --- a/redis/commands/json/commands.py +++ b/redis/commands/json/commands.py @@ -121,7 +121,9 @@ def objkeys( """ # noqa return self.execute_command("JSON.OBJKEYS", name, str(path), keys=...
celery__celery-5355
Django fixup appends to PYTHONPATH instead of prepending Hi, ## Environment & Settings **Celery version**: 4.2.1 (windowlicker) # Steps to Reproduce We are using Celery + Django in [dissemin](https://github.com/dissemin/dissemin/). We have a Django app named "statistics" which is actually a name conflicting ...
[ { "content": "\"\"\"Django-specific customization.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport os\nimport sys\nimport warnings\nfrom datetime import datetime\nfrom importlib import import_module\n\nfrom kombu.utils.imports import symbol_by_name\nfrom kombu.utils.objects import cach...
[ { "content": "\"\"\"Django-specific customization.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport os\nimport sys\nimport warnings\nfrom datetime import datetime\nfrom importlib import import_module\n\nfrom kombu.utils.imports import symbol_by_name\nfrom kombu.utils.objects import cach...
diff --git a/celery/fixups/django.py b/celery/fixups/django.py index 917ea701a2c..34f36f38153 100644 --- a/celery/fixups/django.py +++ b/celery/fixups/django.py @@ -57,8 +57,10 @@ def __init__(self, app): self._worker_fixup = None def install(self): - # Need to add project directory to path - ...
pyinstaller__pyinstaller-8040
TypeError: UpdateResource() takes no keyword arguments 引用了python 3.10.9·pyinstaller 6.1.0·imagehash 4.3.1·pyperclip 1.8.2和pyautogui 0.9.54模块,但是报错,打包的程序也用不了
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2023, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
[ { "content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2023, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens...
diff --git a/PyInstaller/utils/win32/winresource.py b/PyInstaller/utils/win32/winresource.py index 535f02a2fc..f21d66c57d 100644 --- a/PyInstaller/utils/win32/winresource.py +++ b/PyInstaller/utils/win32/winresource.py @@ -148,7 +148,7 @@ def add_or_update_resource(filename, data, res_type, names=None, languages=None) ...
scipy__scipy-19047
DOC: error in scipy.integrate.DOP853 ### Issue with current documentation: This doesn't make sense: `Note that this is not a literate translation` I suppose it was meant to be: `Note that this is not a literal translation` ### Idea or request for content: _No response_ ### Additional context (e.g. screensh...
[ { "content": "import numpy as np\nfrom .base import OdeSolver, DenseOutput\nfrom .common import (validate_max_step, validate_tol, select_initial_step,\n norm, warn_extraneous, validate_first_step)\nfrom . import dop853_coefficients\n\n# Multiply steps computed from asymptotic behaviour of er...
[ { "content": "import numpy as np\nfrom .base import OdeSolver, DenseOutput\nfrom .common import (validate_max_step, validate_tol, select_initial_step,\n norm, warn_extraneous, validate_first_step)\nfrom . import dop853_coefficients\n\n# Multiply steps computed from asymptotic behaviour of er...
diff --git a/scipy/integrate/_ivp/rk.py b/scipy/integrate/_ivp/rk.py index 763d2739d7bb..fb2ce238b640 100644 --- a/scipy/integrate/_ivp/rk.py +++ b/scipy/integrate/_ivp/rk.py @@ -406,7 +406,7 @@ class DOP853(RungeKutta): """Explicit Runge-Kutta method of order 8. This is a Python implementation of "DOP853" ...
spacetelescope__jwql-517
DEPENDENCY_LINKS in setup.py causing bug in logging_functions With the introduction of the `DEPENDENCY_LINKS` variable in `setup.py`, the logging of monitors is now failing to log the versions of depenencies listed, since the `REQUIRES` is not immediately followed by `setup()`: ```python for i, line in enumerate(da...
[ { "content": "import numpy as np\nfrom setuptools import setup\nfrom setuptools import find_packages\n\nVERSION = '0.22.0'\n\nAUTHORS = 'Matthew Bourque, Misty Cracraft, Joe Filippazzo, Bryan Hilbert, '\nAUTHORS += 'Graham Kanarek, Catherine Martlin, Johannes Sahlmann, Ben Sunnquist'\n\nDESCRIPTION = 'The James...
[ { "content": "import numpy as np\nfrom setuptools import setup\nfrom setuptools import find_packages\n\nVERSION = '0.22.0'\n\nAUTHORS = 'Matthew Bourque, Misty Cracraft, Joe Filippazzo, Bryan Hilbert, '\nAUTHORS += 'Graham Kanarek, Catherine Martlin, Johannes Sahlmann, Ben Sunnquist'\n\nDESCRIPTION = 'The James...
diff --git a/setup.py b/setup.py index 490f1b995..de0d0f3ee 100644 --- a/setup.py +++ b/setup.py @@ -9,6 +9,7 @@ DESCRIPTION = 'The James Webb Space Telescope Quicklook Project' +DEPENDENCY_LINKS = ['git+https://github.com/spacetelescope/jwst#0.13.0'] REQUIRES = [ 'asdf>=2.3.3', 'astropy>=3.2.1', @@ -38...
huggingface__diffusers-4452
example/texual_inversion/ multi text inversion is actually not working. ### Describe the bug https://github.com/huggingface/diffusers/blob/4c4fe042a7f718f30f6bd897b967ff800e035347/examples/textual_inversion/textual_inversion.py#L629C1-L648 https://github.com/huggingface/diffusers/blob/4c4fe042a7f718f30f6bd897b967ff...
[ { "content": "#!/usr/bin/env python\n# coding=utf-8\n# Copyright 2023 The HuggingFace Inc. team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# h...
[ { "content": "#!/usr/bin/env python\n# coding=utf-8\n# Copyright 2023 The HuggingFace Inc. team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# h...
diff --git a/examples/textual_inversion/textual_inversion.py b/examples/textual_inversion/textual_inversion.py index 51d1e483ab94..78dd578b2d4e 100644 --- a/examples/textual_inversion/textual_inversion.py +++ b/examples/textual_inversion/textual_inversion.py @@ -708,7 +708,7 @@ def main(): data_root=args.train...
docker__docker-py-915
Probably invalid version checking in container creation Hi. I've stumbled upon something i think is a not up-to-date code. utils.py at line 794 in my distribution (1.6.0) states following: ``` if compare_version('1.10', version) >= 0: message = ('{0!r} parameter has no effect on create_container().' ...
[ { "content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir...
[ { "content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir...
diff --git a/docker/utils/utils.py b/docker/utils/utils.py index dc46f1ef4..07d57d12f 100644 --- a/docker/utils/utils.py +++ b/docker/utils/utils.py @@ -889,7 +889,7 @@ def create_container_config( if compare_version('1.10', version) >= 0: message = ('{0!r} parameter has no effect on create_container()....
geopandas__geopandas-1560
BUG: CRS property is not pyproj.CRS object in empty GeoDataFrame ```python import geopandas import pyproj df = geopandas.geodataframe.GeoDataFrame(crs='epsg:32638') # this does not work in versions above 0.8.0 assert type(df.crs) is pyproj.crs.crs.CRS df.crs = 'epsg:32638' # this works in both versions 0.8...
[ { "content": "import json\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom pandas import DataFrame, Series\n\nfrom shapely.geometry import mapping, shape\nfrom shapely.geometry.base import BaseGeometry\n\n\nfrom pyproj import CRS\n\nfrom geopandas.array import GeometryArray, from_shapely, Geome...
[ { "content": "import json\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom pandas import DataFrame, Series\n\nfrom shapely.geometry import mapping, shape\nfrom shapely.geometry.base import BaseGeometry\n\n\nfrom pyproj import CRS\n\nfrom geopandas.array import GeometryArray, from_shapely, Geome...
diff --git a/geopandas/geodataframe.py b/geopandas/geodataframe.py index de1ca27263..8b2e089a0b 100644 --- a/geopandas/geodataframe.py +++ b/geopandas/geodataframe.py @@ -90,7 +90,7 @@ def __init__(self, *args, **kwargs): # need to set this before calling self['geometry'], because # getitem accesses...
nautobot__nautobot-604
OPTIONS returns all Status choices instead of ones only related to the specific model <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reporting reproducible bugs. If you need assistance with Nautobot installation, or if you have a general question, pleas...
[ { "content": "from collections import OrderedDict\n\nfrom rest_framework import serializers\n\n\nclass MultipleChoiceJSONField(serializers.MultipleChoiceField):\n \"\"\"A MultipleChoiceField that renders the received value as a JSON-compatible list rather than a set.\"\"\"\n\n def to_internal_value(self, ...
[ { "content": "from collections import OrderedDict\n\nfrom rest_framework import serializers\n\n\nclass MultipleChoiceJSONField(serializers.MultipleChoiceField):\n \"\"\"A MultipleChoiceField that renders the received value as a JSON-compatible list rather than a set.\"\"\"\n\n def to_internal_value(self, ...
diff --git a/nautobot/extras/api/fields.py b/nautobot/extras/api/fields.py index bc210f1b781..ec2052ba68b 100644 --- a/nautobot/extras/api/fields.py +++ b/nautobot/extras/api/fields.py @@ -38,6 +38,12 @@ def to_internal_value(self, data): data = data.lower() return super().to_internal_value(data) ...
flairNLP__flair-160
Flair depends on AWS CLI (boto library etc) --- should be removed/optional I assume that the usual Flair user does not need any AWS dependency, therefore the hard AWS CLI dependency (defined in `setup.py`) should be removed or at least made optional.
[ { "content": "from setuptools import setup, find_packages\n\nsetup(\n name='flair',\n version='0.3.0',\n description='A very simple framework for state-of-the-art NLP',\n long_description=open(\"README.md\", encoding='utf-8').read(),\n long_description_content_type=\"text/markdown\",\n author=...
[ { "content": "from setuptools import setup, find_packages\n\nsetup(\n name='flair',\n version='0.3.0',\n description='A very simple framework for state-of-the-art NLP',\n long_description=open(\"README.md\", encoding='utf-8').read(),\n long_description_content_type=\"text/markdown\",\n author=...
diff --git a/setup.py b/setup.py index b86fbc47bc..b1e2f6eddf 100644 --- a/setup.py +++ b/setup.py @@ -13,14 +13,12 @@ license='MIT', install_requires=[ 'torch==0.4.1', - 'awscli==1.14.32', 'gensim==3.4.0', 'typing==3.6.4', 'tqdm==4.23.4', 'segtok==1.5.6', ...
pretix__pretix-1043
Invoice information consistency During checkout, if I choose "business customer", enter a company name, and then reconsider and switch to the individual customer interface, the "company name" name field gets hidden, but its value is still visible in the next step.
[ { "content": "import logging\nfrom decimal import Decimal\n\nimport dateutil.parser\nimport pytz\nimport vat_moss.errors\nimport vat_moss.id\nfrom django import forms\nfrom django.contrib import messages\nfrom django.core.exceptions import ValidationError\nfrom django.utils.translation import ugettext_lazy as _...
[ { "content": "import logging\nfrom decimal import Decimal\n\nimport dateutil.parser\nimport pytz\nimport vat_moss.errors\nimport vat_moss.id\nfrom django import forms\nfrom django.contrib import messages\nfrom django.core.exceptions import ValidationError\nfrom django.utils.translation import ugettext_lazy as _...
diff --git a/src/pretix/base/forms/questions.py b/src/pretix/base/forms/questions.py index de4614dd371..6223afaed05 100644 --- a/src/pretix/base/forms/questions.py +++ b/src/pretix/base/forms/questions.py @@ -216,6 +216,8 @@ def __init__(self, *args, **kwargs): def clean(self): data = self.cleaned_data ...
great-expectations__great_expectations-3464
Use cleaner solution for non-truncating division in python 2 Prefer `from __future__ import division` to `1.*x/y`
[ { "content": "import copy\nimport datetime\nimport hashlib\nimport logging\nimport os\nimport pickle\nimport random\nimport warnings\nfrom functools import partial\nfrom io import BytesIO\nfrom typing import Any, Callable, Iterable, List, Optional, Tuple, Union\n\nimport pandas as pd\n\nimport great_expectation...
[ { "content": "import copy\nimport datetime\nimport hashlib\nimport logging\nimport os\nimport pickle\nimport random\nimport warnings\nfrom functools import partial\nfrom io import BytesIO\nfrom typing import Any, Callable, Iterable, List, Optional, Tuple, Union\n\nimport pandas as pd\n\nimport great_expectation...
diff --git a/docs/guides/connecting_to_your_data/advanced/how_to_configure_a_dataconnector_for_splitting_and_sampling_a_file_system_or_blob_store.md b/docs/guides/connecting_to_your_data/advanced/how_to_configure_a_dataconnector_for_splitting_and_sampling_a_file_system_or_blob_store.md new file mode 100644 index 000000...
python-poetry__poetry-8218
default pyproject.toml from poetry init -n improperly handles src layout; reports installation success even though it cannot actually be imported <!-- All the below information must be provided for others to understand and help with your issue. --> - **Poetry version**: 1.4.0 - **Python version**: ``` Poetry Versi...
[ { "content": "from __future__ import annotations\n\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\nfrom typing import Any\n\nfrom packaging.utils import canonicalize_name\nfrom poetry.core.utils.helpers import module_name\nfrom tomlkit import inline_table\nfrom tomlkit import loads\nfrom tomlkit im...
[ { "content": "from __future__ import annotations\n\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\nfrom typing import Any\n\nfrom packaging.utils import canonicalize_name\nfrom poetry.core.utils.helpers import module_name\nfrom tomlkit import inline_table\nfrom tomlkit import loads\nfrom tomlkit im...
diff --git a/src/poetry/layouts/layout.py b/src/poetry/layouts/layout.py index 85733a7bef6..8225ec74a0d 100644 --- a/src/poetry/layouts/layout.py +++ b/src/poetry/layouts/layout.py @@ -96,7 +96,7 @@ def get_package_include(self) -> InlineTable | None: if self.basedir != Path(): package.append("fro...
learningequality__kolibri-1761
The mastery completion sign updates only after a page refresh and not real time. ## Summary A learner had completed and came out of the exercise and found the green completed tick did not get updated real time, but after refreshing the page the completed tick appeared. ## System information - Version: Kolibri ...
[ { "content": "\"\"\"\nImplements custom auth backends as described in the Django docs, for our custom user classes -- FacilityUser and\nDeviceOwner. The appropriate classes should be listed in the AUTHENTICATION_BACKENDS. Note that authentication\nbackends are checked in the order they're listed.\n\"\"\"\n\nfro...
[ { "content": "\"\"\"\nImplements custom auth backends as described in the Django docs, for our custom user classes -- FacilityUser and\nDeviceOwner. The appropriate classes should be listed in the AUTHENTICATION_BACKENDS. Note that authentication\nbackends are checked in the order they're listed.\n\"\"\"\n\nfro...
diff --git a/kolibri/auth/backends.py b/kolibri/auth/backends.py index 46355097ca7..ec7d665ee74 100644 --- a/kolibri/auth/backends.py +++ b/kolibri/auth/backends.py @@ -21,7 +21,7 @@ def authenticate(self, username=None, password=None, facility=None): :param facility: a Facility :return: A FacilityUse...
pytorch__ignite-1048
Bug adding handler in case of decoration + class function + filtered event ## 🐛 Bug description I would like to report a bug using handler defined by decorated function in a class with filtered event. The following code reproduces all possible situations to add an handler defined w/wo decoration in a class or no...
[ { "content": "import inspect\nfrom typing import Callable\n\n\ndef _check_signature(fn: Callable, fn_description: str, *args, **kwargs) -> None:\n signature = inspect.signature(fn)\n try: # try without engine\n signature.bind(*args, **kwargs)\n except TypeError as exc:\n fn_params = list...
[ { "content": "import inspect\nfrom typing import Callable\n\n\ndef _check_signature(fn: Callable, fn_description: str, *args, **kwargs) -> None:\n # if handler with filter, check the handler rather than the decorator\n if hasattr(fn, \"_parent\"):\n signature = inspect.signature(fn._parent())\n ...
diff --git a/ignite/engine/utils.py b/ignite/engine/utils.py index 41c2924fa3cc..a09c0f3f6466 100644 --- a/ignite/engine/utils.py +++ b/ignite/engine/utils.py @@ -3,7 +3,11 @@ def _check_signature(fn: Callable, fn_description: str, *args, **kwargs) -> None: - signature = inspect.signature(fn) + # if handler ...
jschneier__django-storages-1000
S3Boto3StorageFile's readlines always return bytes even if mode is set to `rt` Sample code ``` with default_storage.open(path, 'rt') as file: print(file.readlines()) ``` you get something like ``` [b'"Number","Name","Date","Datetime"'] ```
[ { "content": "import mimetypes\nimport os\nimport posixpath\nimport tempfile\nimport threading\nimport warnings\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom tempfile import SpooledTemporaryFile\nfrom urllib.parse import parse_qsl\nfrom urllib.parse import urlencode\nfrom urllib.parse imp...
[ { "content": "import mimetypes\nimport os\nimport posixpath\nimport tempfile\nimport threading\nimport warnings\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom tempfile import SpooledTemporaryFile\nfrom urllib.parse import parse_qsl\nfrom urllib.parse import urlencode\nfrom urllib.parse imp...
diff --git a/storages/backends/s3boto3.py b/storages/backends/s3boto3.py index f1d4e1c38..5122aa937 100644 --- a/storages/backends/s3boto3.py +++ b/storages/backends/s3boto3.py @@ -167,6 +167,9 @@ def readline(self, *args, **kwargs): raise AttributeError("File was not opened in read mode.") return...
netbox-community__netbox-6920
Example ADMINS should show a tuple ### Change Type Correction ### Area Configuration parameters ### Proposed Changes [configuration.example.py](https://github.com/netbox-community/netbox/blob/v2.11.10/netbox/netbox/configuration.example.py#L69-L73) says "Specify one or more name and email address tuples representi...
[ { "content": "#########################\n# #\n# Required settings #\n# #\n#########################\n\n# This is a list of valid fully-qualified domain names (FQDNs) for the NetBox server. NetBox will not permit write\n# access to the server via any other hostname...
[ { "content": "#########################\n# #\n# Required settings #\n# #\n#########################\n\n# This is a list of valid fully-qualified domain names (FQDNs) for the NetBox server. NetBox will not permit write\n# access to the server via any other hostname...
diff --git a/netbox/netbox/configuration.example.py b/netbox/netbox/configuration.example.py index a5c5521f32e..cac4a9c85e4 100644 --- a/netbox/netbox/configuration.example.py +++ b/netbox/netbox/configuration.example.py @@ -69,7 +69,7 @@ # Specify one or more name and email address tuples representing NetBox administ...
ibis-project__ibis-8445
bug: regression: slow to compute name of deeply nested expressions ### What happened? ```python import ibis x = ibis.literal(1) for i in range(100): x = x + 1 # if I hardcode the name, this is instantaneous # x = x.name(f"step_{i}") x ``` If I ctrl-c this after a few seconds, I see see eg `...
[ { "content": "from __future__ import annotations\n\nfrom abc import abstractmethod\nfrom typing import Generic, Optional\n\nfrom public import public\nfrom typing_extensions import Any, Self, TypeVar\n\nimport ibis.expr.datashape as ds\nimport ibis.expr.datatypes as dt\nimport ibis.expr.rules as rlz\nfrom ibis ...
[ { "content": "from __future__ import annotations\n\nfrom abc import abstractmethod\nfrom typing import Generic, Optional\n\nfrom public import public\nfrom typing_extensions import Any, Self, TypeVar\n\nimport ibis.expr.datashape as ds\nimport ibis.expr.datatypes as dt\nimport ibis.expr.rules as rlz\nfrom ibis ...
diff --git a/ibis/expr/operations/core.py b/ibis/expr/operations/core.py index 96d724f1e281..03b16957ad22 100644 --- a/ibis/expr/operations/core.py +++ b/ibis/expr/operations/core.py @@ -85,7 +85,11 @@ def __coerce__( # TODO(kszucs): figure out how to represent not named arguments @property def name(self...
google__jax-6232
linear_transpose involving fft seemingly incorrect I was planning to implement functionality that requires me to be able to take the transpose of a complicated linear function, which includes fourier transforms. I noticed that the fft module seems to implement the rules for transposition; the last few lines of https://...
[ { "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# https://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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
diff --git a/jax/_src/lax/fft.py b/jax/_src/lax/fft.py index 5774fdbe0c0b..7ac0c43cd6de 100644 --- a/jax/_src/lax/fft.py +++ b/jax/_src/lax/fft.py @@ -114,7 +114,9 @@ def _irfft_transpose(t, fft_lengths): scale = 1 / prod(fft_lengths) out = scale * mask * x assert out.dtype == _complex_dtype(t.dtype), (out.dty...
feast-dev__feast-1284
Python SDK: start_offline_to_online_ingestion Fails with default ingestion jar configuration ## Expected Behavior In the [minimal_ride_hailing.ipynb](https://github.com/feast-dev/feast/blob/11e1fa7/examples/minimal/minimal_ride_hailing.ipynb) example notebook, I expect the following cell to run: ``` job = client.st...
[ { "content": "import logging\nimport os\nimport random\nimport string\nimport time\nfrom datetime import datetime\nfrom typing import Any, Dict, List, NamedTuple, Optional\nfrom urllib.parse import urlparse, urlunparse\n\nimport pytz\nimport yaml\n\nfrom feast.pyspark.abc import BQ_SPARK_PACKAGE\n\n__all__ = [\...
[ { "content": "import logging\nimport os\nimport random\nimport string\nimport time\nfrom datetime import datetime\nfrom typing import Any, Dict, List, NamedTuple, Optional\nfrom urllib.parse import urlparse, urlunparse\n\nimport pytz\nimport yaml\n\nfrom feast.pyspark.abc import BQ_SPARK_PACKAGE\n\n__all__ = [\...
diff --git a/sdk/python/feast/pyspark/launchers/aws/emr_utils.py b/sdk/python/feast/pyspark/launchers/aws/emr_utils.py index 1194ba72d33..15127b38f11 100644 --- a/sdk/python/feast/pyspark/launchers/aws/emr_utils.py +++ b/sdk/python/feast/pyspark/launchers/aws/emr_utils.py @@ -81,7 +81,11 @@ def _random_string(length) -...
adamchainz__django-cors-headers-141
Add DNT to default allowed headers Discussed in #78, PR exists at zestedesavoir/django-cors-middleware#8
[ { "content": "default_headers = (\n 'x-requested-with',\n 'content-type',\n 'accept',\n 'origin',\n 'authorization',\n 'x-csrftoken',\n 'user-agent',\n 'accept-encoding',\n)\n\ndefault_methods = (\n 'GET',\n 'POST',\n 'PUT',\n 'PATCH',\n 'DELETE',\n 'OPTIONS',\n)\n", ...
[ { "content": "default_headers = (\n 'accept',\n 'accept-encoding',\n 'authorization',\n 'content-type',\n 'dnt',\n 'origin',\n 'user-agent',\n 'x-csrftoken',\n 'x-requested-with',\n)\n\ndefault_methods = (\n 'DELETE',\n 'GET',\n 'OPTIONS',\n 'PATCH',\n 'POST',\n 'PUT...
diff --git a/HISTORY.rst b/HISTORY.rst index b4eec3d0..89811e35 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -5,6 +5,8 @@ Pending ------- * New release notes go here. +* Add the 'Do Not Track' header ``'DNT'`` to the default for + ``CORS_ALLOW_HEADERS``. 1.2.2 (2016-10-05) ------------------ diff --git a/READ...
learningequality__kolibri-1733
Login ID and Password fields for a learner/user should not be case sensitive. ## Summary Login ID and Password fields for a learner/user should not be case sensitive, this is especially for young learners and they struggle a lot to login itself. Please consider this change for Nalanda branch. ## System informa...
[ { "content": "\"\"\"\nImplements custom auth backends as described in the Django docs, for our custom user classes -- FacilityUser and\nDeviceOwner. The appropriate classes should be listed in the AUTHENTICATION_BACKENDS. Note that authentication\nbackends are checked in the order they're listed.\n\"\"\"\n\nfro...
[ { "content": "\"\"\"\nImplements custom auth backends as described in the Django docs, for our custom user classes -- FacilityUser and\nDeviceOwner. The appropriate classes should be listed in the AUTHENTICATION_BACKENDS. Note that authentication\nbackends are checked in the order they're listed.\n\"\"\"\n\nfro...
diff --git a/kolibri/auth/backends.py b/kolibri/auth/backends.py index 46355097ca7..ec7d665ee74 100644 --- a/kolibri/auth/backends.py +++ b/kolibri/auth/backends.py @@ -21,7 +21,7 @@ def authenticate(self, username=None, password=None, facility=None): :param facility: a Facility :return: A FacilityUse...