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
⌀
apluslms__a-plus-1225
Course exercise list API must not show hidden course modules to students From the comment https://github.com/apluslms/a-plus/pull/1090#issuecomment-1615351930 After the pull request #1090, `CachedContent` includes hidden modules too. Students must not see hidden modules in the course exercise list API, but now they ...
[ { "content": "import re\n\nfrom rest_framework import filters, viewsets, status, mixins\nfrom rest_framework.decorators import action\nfrom rest_framework.exceptions import ParseError\nfrom rest_framework.response import Response\nfrom rest_framework.settings import api_settings\nfrom rest_framework_extensions....
[ { "content": "import re\n\nfrom rest_framework import filters, viewsets, status, mixins\nfrom rest_framework.decorators import action\nfrom rest_framework.exceptions import ParseError\nfrom rest_framework.response import Response\nfrom rest_framework.settings import api_settings\nfrom rest_framework_extensions....
diff --git a/course/api/views.py b/course/api/views.py index 5f48db8f9..895dd66e4 100644 --- a/course/api/views.py +++ b/course/api/views.py @@ -257,7 +257,8 @@ def __module_to_dict(self, module, **kwargs): def list(self, request, *args, **kwargs): modules = [] for module in self.content.data['mo...
rotki__rotki-212
Kraken balances query will fail due to BCH/BSV fork ## Problem Definition BCH forked into BCHSV and Kraken started also supporting BCHSV. Rotkehlchen does not currently handle this correctly ## Task Handle BCHSV for Kraken
[ { "content": "#!/usr/bin/env python\n#\n# Good kraken and python resource:\n# https://github.com/zertrin/clikraken/tree/master/clikraken\nimport base64\nimport hashlib\nimport hmac\nimport logging\nimport time\nfrom typing import Dict, List, Optional, Tuple, Union, cast\nfrom urllib.parse import urlencode\n\nfr...
[ { "content": "#!/usr/bin/env python\n#\n# Good kraken and python resource:\n# https://github.com/zertrin/clikraken/tree/master/clikraken\nimport base64\nimport hashlib\nimport hmac\nimport logging\nimport time\nfrom typing import Dict, List, Optional, Tuple, Union, cast\nfrom urllib.parse import urlencode\n\nfr...
diff --git a/docs/changelog.rst b/docs/changelog.rst index 3d213d5373..536f4970e7 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,8 @@ Changelog ========= +* :bug:`211` Handle the BCHSV fork in Kraken properly. + * :release:`0.5.0 <2018-11-10>` * :bug:`201` Having ICN in Kraken from 31/10 to 3...
unionai-oss__pandera-1139
Pandas indexes are not coerced when `coerce=True` specified at schema level **Describe the bug** Pandas indexes are not coerced when `coerce=True` is specified at the schema level. This subsequently causes a `SchemaError` to be raised later on, of the general form ``` pandera.errors.SchemaError: expected series '...
[ { "content": "\"\"\"Pandas Parsing, Validation, and Error Reporting Backends.\"\"\"\n\nimport copy\nimport itertools\nimport traceback\nfrom typing import Any, List, Optional\n\nimport pandas as pd\n\nfrom pandera.backends.pandas.base import ColumnInfo, PandasSchemaBackend\nfrom pandera.backends.pandas.utils im...
[ { "content": "\"\"\"Pandas Parsing, Validation, and Error Reporting Backends.\"\"\"\n\nimport copy\nimport itertools\nimport traceback\nfrom typing import Any, List, Optional\n\nimport pandas as pd\n\nfrom pandera.backends.pandas.base import ColumnInfo, PandasSchemaBackend\nfrom pandera.backends.pandas.utils im...
diff --git a/pandera/backends/pandas/container.py b/pandera/backends/pandas/container.py index 1e24fb592..a4c32eb7c 100644 --- a/pandera/backends/pandas/container.py +++ b/pandera/backends/pandas/container.py @@ -449,7 +449,7 @@ def _try_coercion(coerce_fn, obj): if schema.coerce: # coerci...
fossasia__open-event-server-5226
Validate order expiry time to be between 1 to 60 minutes. **Is your feature request related to a problem? Please describe.** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> The order expiry time should always be between 1 to 60 minutes. Validation error should be ...
[ { "content": "import pytz\nfrom flask_rest_jsonapi.exceptions import ObjectNotFound\nfrom marshmallow import validates_schema, validate\nfrom marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Relationship\nfrom pytz import timezone\nfrom sqlalchemy.orm.exc import NoResultFound\n\nfrom app...
[ { "content": "import pytz\nfrom flask_rest_jsonapi.exceptions import ObjectNotFound\nfrom marshmallow import validates_schema, validate\nfrom marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Relationship\nfrom pytz import timezone\nfrom sqlalchemy.orm.exc import NoResultFound\n\nfrom app...
diff --git a/app/api/schema/events.py b/app/api/schema/events.py index 5162f38ab8..5033367efa 100644 --- a/app/api/schema/events.py +++ b/app/api/schema/events.py @@ -107,7 +107,7 @@ def validate_timezone(self, data, original_data): ical_url = fields.Url(dump_only=True) xcal_url = fields.Url(dump_only=True) ...
bridgecrewio__checkov-5406
Allow var-file to be passed as environment variable **Describe the issue** Currently you can only pass a Terraform var-file via a command line argument (--var-file). It would be useful to be able to source this from an environment variable. **Version (please complete the following information):** - Checkov Versio...
[ { "content": "from __future__ import annotations\n\nfrom io import StringIO\nfrom typing import Any, TYPE_CHECKING, cast\n\nimport configargparse\n\nfrom checkov.common.bridgecrew.check_type import checkov_runners\nfrom checkov.common.runners.runner_registry import OUTPUT_CHOICES, SUMMARY_POSITIONS\nfrom checko...
[ { "content": "from __future__ import annotations\n\nfrom io import StringIO\nfrom typing import Any, TYPE_CHECKING, cast\n\nimport configargparse\n\nfrom checkov.common.bridgecrew.check_type import checkov_runners\nfrom checkov.common.runners.runner_registry import OUTPUT_CHOICES, SUMMARY_POSITIONS\nfrom checko...
diff --git a/checkov/common/util/ext_argument_parser.py b/checkov/common/util/ext_argument_parser.py index f36d4641e7..6007f08899 100644 --- a/checkov/common/util/ext_argument_parser.py +++ b/checkov/common/util/ext_argument_parser.py @@ -391,6 +391,7 @@ def add_parser_args(self) -> None: "https://www...
pypa__pipenv-976
Fails if two conflicting "requires" sections are present. I stumbled upon this since, at some point, an extra `requires` section was added to my `Pipifile`. I'm not able to reproduce the circumstances that lead to such a malformed configuration file, but still the reaction of `pipenv` is quite baffling. ##### Descr...
[ { "content": "# -*- coding: utf-8 -*-\nimport json\nimport os\nimport re\nimport sys\nimport base64\nimport hashlib\n\nimport contoml\nimport delegator\nimport pipfile\nimport toml\n\nfrom .utils import (\n mkdir_p, convert_deps_from_pip, pep423_name, recase_file,\n find_requirements, is_file, is_vcs, pyt...
[ { "content": "# -*- coding: utf-8 -*-\nimport json\nimport os\nimport re\nimport sys\nimport base64\nimport hashlib\n\nimport contoml\nimport delegator\nimport pipfile\nimport toml\n\nfrom .utils import (\n mkdir_p, convert_deps_from_pip, pep423_name, recase_file,\n find_requirements, is_file, is_vcs, pyt...
diff --git a/pipenv/project.py b/pipenv/project.py index 027da5422d..36a2bd4244 100644 --- a/pipenv/project.py +++ b/pipenv/project.py @@ -227,6 +227,14 @@ def parsed_pipfile(self): with open(self.pipfile_location) as f: contents = f.read() + sections = re.findall("\[[a-zA-Z-]+\]", conten...
streamlink__streamlink-974
Unable to play Dailymotion live stream ### Checklist - [x] This is a bug report. - [ ] This is a feature request. - [ ] This is a plugin (improvement) request. - [ ] I have read the contribution guidelines. ### Description Streamlink cannot read the live stream http://www.dailymotion.com/video/x3b68jn ##...
[ { "content": "import json\nimport re\n\nfrom functools import reduce\n\nfrom streamlink.compat import urlparse, range\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import http, validate\nfrom streamlink.stream import HDSStream, HLSStream, HTTPStream, RTMPStream\nfrom streamlink.stream.playli...
[ { "content": "import json\nimport re\n\nfrom functools import reduce\n\nfrom streamlink.compat import urlparse, range\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import http, validate\nfrom streamlink.stream import HDSStream, HLSStream, HTTPStream, RTMPStream\nfrom streamlink.stream.playli...
diff --git a/src/streamlink/plugins/dailymotion.py b/src/streamlink/plugins/dailymotion.py index c61c2dec247..16c030099c6 100644 --- a/src/streamlink/plugins/dailymotion.py +++ b/src/streamlink/plugins/dailymotion.py @@ -128,7 +128,12 @@ def _get_live_streams(self, params, swf_url): continue ...
numba__numba-5024
semantic constant prop needs to run before static* rewrites <!-- Thanks for opening an issue! To help the Numba team handle your information efficiently, please first ensure that there is no other issue present that already describes the issue you have (search at https://github.com/numba/numba/issues?&q=is%3Aissu...
[ { "content": "from __future__ import print_function, division, absolute_import\n\nfrom collections import namedtuple\nimport sys\nimport copy\nimport warnings\nfrom .tracing import event\n\nfrom numba import (bytecode, interpreter, postproc, typing, utils, config,\n errors,)\nfrom numba.targe...
[ { "content": "from __future__ import print_function, division, absolute_import\n\nfrom collections import namedtuple\nimport sys\nimport copy\nimport warnings\nfrom .tracing import event\n\nfrom numba import (bytecode, interpreter, postproc, typing, utils, config,\n errors,)\nfrom numba.targe...
diff --git a/numba/compiler.py b/numba/compiler.py index 6370da14d22..f5bdaa263c4 100644 --- a/numba/compiler.py +++ b/numba/compiler.py @@ -441,9 +441,9 @@ def define_nopython_pipeline(state, name='nopython'): # pre typing if not state.flags.no_rewrites: - pm.add_pass(GenericRewrites, "n...
zalando__patroni-1364
Question: DCS Read timeout error (3.333 seconds) Hello team, I am using patroni with consul. The setup was working fine. Recently got random master down alerts. Patroni connection to consul gets timed out at 3.33 seconds and it shutsdown master and brings it back up in few seconds. ``` Patroni- ttl: 30, loop_w...
[ { "content": "from __future__ import absolute_import\nimport json\nimport logging\nimport os\nimport re\nimport socket\nimport ssl\nimport time\nimport urllib3\n\nfrom consul import ConsulException, NotFound, base\nfrom urllib3.exceptions import HTTPError\nfrom six.moves.urllib.parse import urlencode, urlparse,...
[ { "content": "from __future__ import absolute_import\nimport json\nimport logging\nimport os\nimport re\nimport socket\nimport ssl\nimport time\nimport urllib3\n\nfrom consul import ConsulException, NotFound, base\nfrom urllib3.exceptions import HTTPError\nfrom six.moves.urllib.parse import urlencode, urlparse,...
diff --git a/docs/ENVIRONMENT.rst b/docs/ENVIRONMENT.rst index 427afd445..812039571 100644 --- a/docs/ENVIRONMENT.rst +++ b/docs/ENVIRONMENT.rst @@ -46,7 +46,7 @@ Consul - **PATRONI\_CONSUL\_KEY**: (optional) File with the client key. Can be empty if the key is part of certificate. - **PATRONI\_CONSUL\_DC**: (optio...
vispy__vispy-1702
Scaling not working correctly for markers When I set `scaling=True` when setting the data in `MarkersVisual#set_data()`, only rotating around the scene (no zooming) makes the points' sizes to vary. I hope this is not the expected behaviour. Here is a snippet which demonstrates this. Run it and rotate the camera around...
[ { "content": "# -*- coding: utf-8 -*-\n# -----------------------------------------------------------------------------\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n# -----------------------------------------------------...
[ { "content": "# -*- coding: utf-8 -*-\n# -----------------------------------------------------------------------------\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n# -----------------------------------------------------...
diff --git a/vispy/visuals/markers.py b/vispy/visuals/markers.py index 3f4d09eef2..25685dcbf6 100644 --- a/vispy/visuals/markers.py +++ b/vispy/visuals/markers.py @@ -620,7 +620,8 @@ def _prepare_draw(self, view): view.view_program['u_px_scale'] = view.transforms.pixel_scale if self.scaling: ...
projectmesa__mesa-783
The order of the cell content of MultiGrid is non-deterministic This is because the cell content is a Python `set`, and `set` doesn't preserve insertion order. It is possible to use `dict` for Python >=3.6 instead, but this requires a lot of redefinition of the methods `__iter__` and `__getitem__`.
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nMesa Space Module\n=================\n\nObjects used to add a spatial component to a model.\n\nGrid: base grid, a simple list-of-lists.\nSingleGrid: grid which strictly enforces one object per cell.\nMultiGrid: extension to Grid where each cell is a set of objects....
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nMesa Space Module\n=================\n\nObjects used to add a spatial component to a model.\n\nGrid: base grid, a simple list-of-lists.\nSingleGrid: grid which strictly enforces one object per cell.\nMultiGrid: extension to Grid where each cell is a set of objects....
diff --git a/mesa/space.py b/mesa/space.py index 9b32c5517e7..ebb5cd40012 100644 --- a/mesa/space.py +++ b/mesa/space.py @@ -424,12 +424,13 @@ class MultiGrid(Grid): @staticmethod def default_val(): """ Default value for new cell elements. """ - return set() + return [] def _plac...
getnikola__nikola-923
Thumbnail generation fails with no reason At the moment: ``` [2013-11-19T12:48:09Z] WARNING: render_galleries: \ Can't thumbnail galleries/xbox/ori-label.jpg, using original image as thumbnail ``` Should be: ``` [2013-11-19T12:48:09Z] WARNING: render_galleries: \ Can't thumbnail galleries/xbox/ori-label.jpg, using o...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2013 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2013 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi...
diff --git a/nikola/plugins/task/galleries.py b/nikola/plugins/task/galleries.py index 3adbee8497..c81f939f7b 100644 --- a/nikola/plugins/task/galleries.py +++ b/nikola/plugins/task/galleries.py @@ -540,8 +540,9 @@ def resize_image(self, src, dst, max_size): try: im.thumbnail(size, Image.A...
Qiskit__qiskit-9651
Random-circuit conditional generation outputs incorrect typed comparison values ### Environment - **Qiskit Terra version**: 0.23.2 - **Python version**: 3.10 - **Operating system**: macOS ### What is happening? The output of `qiskit.circuit.random.random_circuit` for 64+ qubits with `conditional=True` can cause ...
[ { "content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any ...
[ { "content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any ...
diff --git a/qiskit/circuit/random/utils.py b/qiskit/circuit/random/utils.py index 2b8911252d34..2a079b304fab 100644 --- a/qiskit/circuit/random/utils.py +++ b/qiskit/circuit/random/utils.py @@ -191,7 +191,8 @@ def random_circuit( ): operation = gate(*parameters[p_start:p_end]) ...
nautobot__nautobot-5335
Migration ipam.0022 fails when specific duplicate IPAM objects are present <!-- 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, please start a ...
[ { "content": "from datetime import datetime, time\nimport uuid\n\nfrom django.conf import settings\nfrom django.db import migrations\nfrom django.utils.timezone import make_aware\n\nfrom nautobot.core.models.managers import TagsManager\nfrom nautobot.core.models.utils import serialize_object\nfrom nautobot.core...
[ { "content": "from datetime import datetime, time\nimport uuid\n\nfrom django.conf import settings\nfrom django.db import migrations\nfrom django.utils.timezone import make_aware\n\nfrom nautobot.core.models.managers import TagsManager\nfrom nautobot.core.models.utils import serialize_object\nfrom nautobot.core...
diff --git a/changes/5334.fixed b/changes/5334.fixed new file mode 100644 index 00000000000..192fcbc6fb4 --- /dev/null +++ b/changes/5334.fixed @@ -0,0 +1 @@ +Fixed migration from 1.x failing when specific duplicate prefixes are present. diff --git a/nautobot/ipam/migrations/0022_aggregate_to_prefix_data_migration.py b...
django-haystack__django-haystack-1656
App server won't start if GDAL library is not setup * [x] Tested with the latest Haystack release * [x] Tested with the current Haystack master branch ## Expected behaviour Setting up GDAL library should be optional, if someone doesn't want to use LocationField ## Actual behaviour django.contrib.gis.geos.Poi...
[ { "content": "# encoding: utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport re\nfrom inspect import ismethod\n\nfrom django.contrib.gis.geos import Point\nfrom django.template import loader\nfrom django.utils import datetime_safe, six\n\nfrom haystack.exceptions...
[ { "content": "# encoding: utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport re\nfrom inspect import ismethod\n\nfrom django.template import loader\nfrom django.utils import datetime_safe, six\n\nfrom haystack.exceptions import SearchFieldError\nfrom haystack.uti...
diff --git a/haystack/fields.py b/haystack/fields.py index fd3d586fa..023df08e3 100644 --- a/haystack/fields.py +++ b/haystack/fields.py @@ -4,7 +4,6 @@ import re from inspect import ismethod -from django.contrib.gis.geos import Point from django.template import loader from django.utils import datetime_safe, six ...
safe-global__safe-config-service-1107
Bad logo URL when creating a new Safe App **Describe the bug** When inserting a new Safe App, `None` is added to the logo image URL instead of the `app_id`. Re-uploading the image for the Safe App solves the problem. **To Reproduce** Steps to reproduce the behavior: - Create a new Safe App. - Check the path ...
[ { "content": "import os\nfrom enum import Enum\nfrom typing import IO, Union\n\nfrom django.contrib.postgres.fields import ArrayField\nfrom django.core.exceptions import ValidationError\nfrom django.core.files.images import get_image_dimensions\nfrom django.core.validators import RegexValidator\nfrom django.db ...
[ { "content": "import os\nimport uuid\nfrom enum import Enum\nfrom typing import IO, Union\n\nfrom django.contrib.postgres.fields import ArrayField\nfrom django.core.exceptions import ValidationError\nfrom django.core.files.images import get_image_dimensions\nfrom django.core.validators import RegexValidator\nfr...
diff --git a/src/safe_apps/models.py b/src/safe_apps/models.py index 04a6a45f..3ad211ea 100644 --- a/src/safe_apps/models.py +++ b/src/safe_apps/models.py @@ -1,4 +1,5 @@ import os +import uuid from enum import Enum from typing import IO, Union @@ -17,7 +18,7 @@ def safe_app_icon_path(instance: "SafeApp", filen...
elastic__apm-agent-python-1301
Cookie value from request header is not getting sanitized Hi, The APM python agent is silently throwing error when trying to sanitize the cookie value from request header. On debugging, I found that we are reading the cookie value incorrectly from context. Instead of reading the cookie value using `event["con...
[ { "content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c...
[ { "content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c...
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index d0fec2e1f..3c11b6646 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -43,6 +43,7 @@ endif::[] [float] ===== Bug fixes +* Fixed cookie sanitization when Cookie is capitalized {pull}1301[#1301] * Fix a bug with exception capturing for bad UUIDs {...
Pyomo__pyomo-544
Simulator fails when differential variables are not used in a constraint This bug is isolated to when casadi is used as the integration package. The toy model below produces an error when the `simulate` function is called: ``` from pyomo.environ import * from pyomo.dae import * m = ConcreteModel() m.t = Contin...
[ { "content": "# _________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2014 Sandia Corporation.\n# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,\n# the U.S. Government retains certain rights in th...
[ { "content": "# _________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2014 Sandia Corporation.\n# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,\n# the U.S. Government retains certain rights in th...
diff --git a/pyomo/dae/simulator.py b/pyomo/dae/simulator.py index 8599a9e3774..c79d8ee456a 100644 --- a/pyomo/dae/simulator.py +++ b/pyomo/dae/simulator.py @@ -622,6 +622,14 @@ def _rhsfun(t, x): return residual self._rhsfun = _rhsfun + # Add any diffvars not added...
pretix__pretix-1776
Wrong PositionId on imported Orders When importing multiple OrderPositions into a single Order, the resulting OrderPositions will all have the same positionid `1`. Wrong PositionId on imported Orders When importing multiple OrderPositions into a single Order, the resulting OrderPositions will all have the same position...
[ { "content": "import csv\nimport io\nfrom decimal import Decimal\n\nfrom django.core.exceptions import ValidationError\nfrom django.db import transaction\nfrom django.utils.timezone import now\nfrom django.utils.translation import gettext as _\n\nfrom pretix.base.i18n import LazyLocaleException, language\nfrom ...
[ { "content": "import csv\nimport io\nfrom decimal import Decimal\n\nfrom django.core.exceptions import ValidationError\nfrom django.db import transaction\nfrom django.utils.timezone import now\nfrom django.utils.translation import gettext as _\n\nfrom pretix.base.i18n import LazyLocaleException, language\nfrom ...
diff --git a/src/pretix/base/services/orderimport.py b/src/pretix/base/services/orderimport.py index 5db3eb03b17..ed463d2b3bd 100644 --- a/src/pretix/base/services/orderimport.py +++ b/src/pretix/base/services/orderimport.py @@ -103,7 +103,7 @@ def import_orders(event: Event, fileid: str, settings: dict, locale: str, u...
scikit-image__scikit-image-1086
filter.threshold_isodata fails on 16-bit int images The problem is the following line in threshholding.py:threshold_isodata(): ``` binnums = np.arange(pmf.size, dtype=np.uint8) ``` Obviously the histogram bin numbers for images with more than 255 intensity levels don't get generated properly, leading to hilarity....
[ { "content": "__all__ = ['threshold_adaptive',\n 'threshold_otsu',\n 'threshold_yen',\n 'threshold_isodata']\n\nimport numpy as np\nimport scipy.ndimage\nfrom skimage.exposure import histogram\n\n\ndef threshold_adaptive(image, block_size, method='gaussian', offset=0,\n ...
[ { "content": "__all__ = ['threshold_adaptive',\n 'threshold_otsu',\n 'threshold_yen',\n 'threshold_isodata']\n\nimport numpy as np\nimport scipy.ndimage\nfrom skimage.exposure import histogram\n\n\ndef threshold_adaptive(image, block_size, method='gaussian', offset=0,\n ...
diff --git a/skimage/filter/tests/test_thresholding.py b/skimage/filter/tests/test_thresholding.py index f0a68f7dd0a..8464cb21e45 100644 --- a/skimage/filter/tests/test_thresholding.py +++ b/skimage/filter/tests/test_thresholding.py @@ -67,6 +67,12 @@ def test_isodata_blank_zero(self): def test_isodata_linspace(se...
ludwig-ai__ludwig-626
bug: test_visualization.py::test_visualization_calibration_1_vs_all_output_saved fails with IndexError in seaborn regplot() function **Describe the bug** Unit test ``` tests/ integration_tests/ test_visualization.py::test_visualization_calibration_1_vs_all_output_saved ``` fails with `IndexError` excepti...
[ { "content": "#! /usr/bin/env python\n# coding=utf-8\n# Copyright (c) 2019 Uber Technologies, 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.or...
[ { "content": "#! /usr/bin/env python\n# coding=utf-8\n# Copyright (c) 2019 Uber Technologies, 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.or...
diff --git a/ludwig/utils/visualization_utils.py b/ludwig/utils/visualization_utils.py index 208500f56e2..eb0371dc5f3 100644 --- a/ludwig/utils/visualization_utils.py +++ b/ludwig/utils/visualization_utils.py @@ -849,7 +849,7 @@ def calibration_plot( # sns.tsplot(mean_predicted_values[i], fraction_positives[i]...
rasterio__rasterio-1085
GDAL GetMetadataItem('BLOCK_SIZE_%d_%d' % (c, r), 'TIFF') I have been using GDAL/QGIS (carry over from my remote sensing days) for deep learning in digital pathology. We primarily deal with JPEG tiles in TIFF pyramid images. I have since found rasterio which is so much more convenient. However, one feature I need is...
[ { "content": "#!/usr/bin/env python\n\n# Two environmental variables influence this script.\n#\n# GDAL_CONFIG: the path to a gdal-config program that points to GDAL headers,\n# libraries, and data files.\n#\n# PACKAGE_DATA: if defined, GDAL and PROJ4 data files will be copied into the\n# source or binary distri...
[ { "content": "#!/usr/bin/env python\n\n# Two environmental variables influence this script.\n#\n# GDAL_CONFIG: the path to a gdal-config program that points to GDAL headers,\n# libraries, and data files.\n#\n# PACKAGE_DATA: if defined, GDAL and PROJ4 data files will be copied into the\n# source or binary distri...
diff --git a/CHANGES.txt b/CHANGES.txt index ac939a6ef..e0841e28c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -19,12 +19,14 @@ Breaking changes: Passing a ``boundless`` keyword argument to this function will result in a warning. + New features: - Float precision read/write windows are now supported throu...
privacyidea__privacyidea-1480
Migrate EMail, TAN and VASCO token to Python 3 This slightly changes behavior: The VASCO token initialization now throws a ``ParameterError`` if the secret couldn't be decoded.
[ { "content": "# -*- coding: utf-8 -*-\n#\n# 2017-08-11 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# initial writeup\n#\n# License: AGPLv3\n# contact: http://www.privacyidea.org\n#\n# This code is free software; you can redistribute it and/or\n# modify it under the terms of the GNU AFFE...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# 2017-08-11 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# initial writeup\n#\n# License: AGPLv3\n# contact: http://www.privacyidea.org\n#\n# This code is free software; you can redistribute it and/or\n# modify it under the terms of the GNU AFFE...
diff --git a/pi-manage b/pi-manage index 091f443218..1e36f7c0f8 100755 --- a/pi-manage +++ b/pi-manage @@ -85,6 +85,7 @@ from sqlalchemy import create_engine, desc, MetaData from sqlalchemy.orm import sessionmaker from privacyidea.lib.auditmodules.sqlaudit import LogEntry from privacyidea.lib.audit import getAudit +...
Project-MONAI__MONAI-2060
ignore `label` in the workflow if it's not tensor **Is your feature request related to a problem? Please describe.** During evaluation, now we use `prepare_batch` to extract `image` and `label` fields if existing the key. But maybe we don't want to load `label` for inference and didn't apply transforms, so need to ign...
[ { "content": "# Copyright 2020 - 2021 MONAI Consortium\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by appli...
[ { "content": "# Copyright 2020 - 2021 MONAI Consortium\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by appli...
diff --git a/monai/engines/utils.py b/monai/engines/utils.py index d16ab3cfbb..265a63ee0c 100644 --- a/monai/engines/utils.py +++ b/monai/engines/utils.py @@ -107,7 +107,7 @@ def default_prepare_batch( """ if not isinstance(batchdata, dict): raise AssertionError("default prepare_batch expects diction...
pwr-Solaar__Solaar-769
Permissions error each start Hi, I've got a Permissions error each start of my system: > Permissions error Found a Logitech Receiver (/dev/hidraw3), but did not have permission to open it. If you've just installed Solaar, try removing the receiver and plugging it back in. I must remove the receiver and plug ...
[ { "content": "# -*- python-mode -*-\n# -*- coding: UTF-8 -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the...
[ { "content": "# -*- python-mode -*-\n# -*- coding: UTF-8 -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the...
diff --git a/ChangeLog b/ChangeLog index 0cab146488..541de069b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +New: + * Don't complain for receivers that are for other seats + 1.0.2rc2: * Remove packaging directory tree as it is not maintained * Pip installs udev rule and solaar autostart when doing i...
python-pillow__Pillow-4088
ValueError: box offset can't be negative ### What did you do? I wanted to transform a PNG file using `PIL.ImageOps.fit()`. ### What did you expect to happen? I expected to get back the transformed image. ### What actually happened? ``` Traceback (most recent call last): File "example.py", line 6, in <modul...
[ { "content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# standard image operations\n#\n# History:\n# 2001-10-20 fl Created\n# 2001-10-23 fl Added autocontrast operator\n# 2001-12-18 fl Added Kevin's fit operator\n# 2004-03-14 fl Fixed potential division by zero in equalize\n# 2005-05-05 fl Fixed e...
[ { "content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# standard image operations\n#\n# History:\n# 2001-10-20 fl Created\n# 2001-10-23 fl Added autocontrast operator\n# 2001-12-18 fl Added Kevin's fit operator\n# 2004-03-14 fl Fixed potential division by zero in equalize\n# 2005-05-05 fl Fixed e...
diff --git a/Tests/test_imageops.py b/Tests/test_imageops.py index 85529a708ec..2cdbbe02f85 100644 --- a/Tests/test_imageops.py +++ b/Tests/test_imageops.py @@ -81,6 +81,16 @@ def test_1pxfit(self): newimg = ImageOps.fit(hopper("RGB").resize((100, 1)), (35, 35)) self.assertEqual(newimg.size, (35, 35))...
openmc-dev__openmc-2226
Elastic distributions are not used in thermal.py I think I came across a bug. [Here](https://github.com/openmc-dev/openmc/blob/cbd8376238a71c36a57385df4c18471d5a785d64/openmc/data/thermal.py#L733) and [here](https://github.com/openmc-dev/openmc/blob/cbd8376238a71c36a57385df4c18471d5a785d64/openmc/data/thermal.py#L736) ...
[ { "content": "from collections.abc import Iterable\nfrom collections import namedtuple\nfrom difflib import get_close_matches\nfrom numbers import Real\nfrom io import StringIO\nimport itertools\nimport os\nimport re\nimport tempfile\nfrom warnings import warn\n\nimport numpy as np\nimport h5py\n\nimport openmc...
[ { "content": "from collections.abc import Iterable\nfrom collections import namedtuple\nfrom difflib import get_close_matches\nfrom numbers import Real\nfrom io import StringIO\nimport itertools\nimport os\nimport re\nimport tempfile\nfrom warnings import warn\n\nimport numpy as np\nimport h5py\n\nimport openmc...
diff --git a/openmc/data/thermal.py b/openmc/data/thermal.py index 3d5f2df64eb..7e66b6319a3 100644 --- a/openmc/data/thermal.py +++ b/openmc/data/thermal.py @@ -730,10 +730,10 @@ def from_ace(cls, ace_or_filename, name=None): if ace.nxs[5] == 3: xs = incoherent_xs - dist =...
nf-core__tools-2061
--git-remote for custom module repository requires https:// for install (but not other commands) ### Description of the bug I noticed some command under `nf-core modules ...` work with a `--git-remote git@...` (e.g. list) but others do not (e.g. install) and fail in a unique way where it keeps rewriting the modules.js...
[ { "content": "import copy\nimport datetime\nimport json\nimport logging\nimport os\nimport shutil\nimport tempfile\nfrom pathlib import Path\n\nimport git\nimport questionary\nfrom git.exc import GitCommandError\n\nimport nf_core.modules.modules_repo\nimport nf_core.modules.modules_utils\nimport nf_core.utils\n...
[ { "content": "import copy\nimport datetime\nimport json\nimport logging\nimport os\nimport shutil\nimport tempfile\nfrom pathlib import Path\n\nimport git\nimport questionary\nfrom git.exc import GitCommandError\n\nimport nf_core.modules.modules_repo\nimport nf_core.modules.modules_utils\nimport nf_core.utils\n...
diff --git a/CHANGELOG.md b/CHANGELOG.md index b0ae4b39fc..8c39115f5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ - Substitute ModulesCommand and SubworkflowsCommand by ComponentsCommand ([#2000](https://github.com/nf-core/tools/pull/2000)) - Don't print source file + line number on logging message...
hpcaitech__ColossalAI-4975
[tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests
[ { "content": "import argparse\nfrom typing import Callable, List, Union\n\nimport evaluate\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\nfrom data import GLUEDataBuilder\nfrom torch.optim import Optimizer\nfrom torch.optim.lr_scheduler import _LRScheduler as LRScheduler\nfrom torch.uti...
[ { "content": "import argparse\nfrom typing import Callable, List, Union\n\nimport evaluate\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\nfrom data import GLUEDataBuilder\nfrom torch.optim import Optimizer\nfrom torch.optim.lr_scheduler import _LRScheduler as LRScheduler\nfrom torch.uti...
diff --git a/.github/workflows/example_check_on_schedule.yml b/.github/workflows/example_check_on_schedule.yml index 5ed128c3ebc5..8a168c8581d4 100644 --- a/.github/workflows/example_check_on_schedule.yml +++ b/.github/workflows/example_check_on_schedule.yml @@ -24,7 +24,29 @@ jobs: all_loc=$( IFS=',' ; echo "...
conan-io__conan-4096
Conan Server 1.10 is broken #### Description Hi! I'm trying to start conan server but seems like is broken. $ conan_server > Traceback (most recent call last): > File "/opt/miniconda3/bin/conan_server", line 7, in <module> > from conans.conan_server import run > File "/opt/miniconda3/lib/python...
[ { "content": "#!/usr/bin/python\nimport os\nfrom conans.server.service.authorize import BasicAuthorizer, BasicAuthenticator\nfrom conans.server.conf import get_server_store\nfrom conans.server.rest.server import ConanServer\nfrom conans.server.crypto.jwt.jwt_credentials_manager import JWTCredentialsManager\nfro...
[ { "content": "#!/usr/bin/python\nimport os\nfrom conans.server.service.authorize import BasicAuthorizer, BasicAuthenticator\nfrom conans.server.conf import get_server_store\nfrom conans.server.rest.server import ConanServer\nfrom conans.server.crypto.jwt.jwt_credentials_manager import JWTCredentialsManager\nfro...
diff --git a/conans/server/server_launcher.py b/conans/server/server_launcher.py index cc993cc0066..7484c5555a0 100644 --- a/conans/server/server_launcher.py +++ b/conans/server/server_launcher.py @@ -44,7 +44,7 @@ def __init__(self): self.ra = ConanServer(server_config.port, credentials_manager, updown_auth_m...
buildbot__buildbot-4576
util.RemoteUserAuth raises builtins.TypeError RemoteUserAuth (nginx http basic auth) fails with Type error, because the result of the regex match has values of type `bytes`, e.g.: `{'username': b'foobar'}` Full stacktrace ```python Traceback (most recent call last): File "/.../python3.5/site-packa...
[ { "content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n...
[ { "content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n...
diff --git a/master/buildbot/newsfragments/fix_remoteuserauth_typestr.bugfix b/master/buildbot/newsfragments/fix_remoteuserauth_typestr.bugfix new file mode 100644 index 000000000000..dfe871e08b58 --- /dev/null +++ b/master/buildbot/newsfragments/fix_remoteuserauth_typestr.bugfix @@ -0,0 +1 @@ +Fix RemoteUserAuth.maybe...
internetarchive__openlibrary-8366
Better Editor for "Alternative Names" Many Editors have plenty of broken Alternative names like the name in lower case but otherwise identical, abbreviations wix different spaces (i.e. Edmund E. W. / Edmund E.W. / Edmund e. w.). ### Describe the problem that you'd like solved Easier editing. Maybe like the Authors ...
[ { "content": "\"\"\"Handlers for adding and editing books.\"\"\"\n\nimport io\nimport web\nimport json\nimport csv\nimport datetime\n\nfrom typing import Literal, overload, NoReturn\n\nfrom infogami import config\nfrom infogami.core.db import ValidationException\nfrom infogami.utils import delegate\nfrom infoga...
[ { "content": "\"\"\"Handlers for adding and editing books.\"\"\"\n\nimport io\nimport web\nimport json\nimport csv\nimport datetime\n\nfrom typing import Literal, overload, NoReturn\n\nfrom infogami import config\nfrom infogami.core.db import ValidationException\nfrom infogami.utils import delegate\nfrom infoga...
diff --git a/openlibrary/plugins/upstream/addbook.py b/openlibrary/plugins/upstream/addbook.py index 9c59df568ac..f1cb074855b 100644 --- a/openlibrary/plugins/upstream/addbook.py +++ b/openlibrary/plugins/upstream/addbook.py @@ -1010,9 +1010,7 @@ def process_input(self, i): author = trim_doc(i.author) ...
interlegis__sapl-2283
Impossibilidade de editar legislatura <!--- Forneça um resumo geral da _issue_ no título acima --> ## Comportamento Esperado <!--- Se você está descrevendo um _bug_, conte-nos o que deveria acontecer. --> <!--- Se você está sugerindo uma mudança/melhoria, conte-nos como deve funcionar. --> É esperado que se possa...
[ { "content": "from datetime import timedelta\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Fieldset, Layout\nfrom django import forms\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group, User\nfrom django.contrib.contenttypes.models impo...
[ { "content": "from datetime import timedelta\n\nfrom crispy_forms.helper import FormHelper\nfrom crispy_forms.layout import Fieldset, Layout\nfrom django import forms\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group, User\nfrom django.contrib.contenttypes.models impo...
diff --git a/sapl/parlamentares/forms.py b/sapl/parlamentares/forms.py index 207bc2bc7..6ae314785 100644 --- a/sapl/parlamentares/forms.py +++ b/sapl/parlamentares/forms.py @@ -142,7 +142,7 @@ def clean(self): pk = self.instance.pk - ultima_legislatura = Legislatura.objects.filter(data_inicio__lte=d...
python__mypy-12068
Unexpected type inference changes related to enum value attributes In this example, the behavior changed in #11962: ```py from enum import IntEnum from typing import Any class C(IntEnum): X = 0 Y = 1 Z = 2 def f1(c: C) -> None: x = {'x': c.value} # Old: builtins.dict[builtins.str*, bui...
[ { "content": "\"\"\"Calculation of the least upper bound types (joins).\"\"\"\n\nfrom mypy.backports import OrderedDict\nfrom typing import List, Optional, Tuple\n\nfrom mypy.types import (\n Type, AnyType, NoneType, TypeVisitor, Instance, UnboundType, TypeVarType, CallableType,\n TupleType, TypedDictType...
[ { "content": "\"\"\"Calculation of the least upper bound types (joins).\"\"\"\n\nfrom mypy.backports import OrderedDict\nfrom typing import List, Optional, Tuple\n\nfrom mypy.types import (\n Type, AnyType, NoneType, TypeVisitor, Instance, UnboundType, TypeVarType, CallableType,\n TupleType, TypedDictType...
diff --git a/mypy/join.py b/mypy/join.py index d298b495fdc5..161c65ea800c 100644 --- a/mypy/join.py +++ b/mypy/join.py @@ -175,15 +175,15 @@ def join_types(s: Type, t: Type, instance_joiner: Optional[InstanceJoiner] = Non s = mypy.typeops.true_or_false(s) t = mypy.typeops.true_or_false(t) + if is...
biolab__orange3-text-176
Chardet fails on Slovenian characters Preprocess Text fails with Slovenian stopword list. Seems like a chardet issue.
[ { "content": "import os\n\nimport re\nfrom gensim import corpora\nfrom nltk.corpus import stopwords\n\n__all__ = ['BaseTokenFilter', 'StopwordsFilter', 'LexiconFilter', 'RegexpFilter', 'FrequencyFilter']\n\n\nclass BaseTokenFilter:\n name = NotImplemented\n\n def __call__(self, corpus):\n if len(co...
[ { "content": "import os\nimport re\n\nfrom Orange.data.io import detect_encoding\nfrom gensim import corpora\nfrom nltk.corpus import stopwords\n\n__all__ = ['BaseTokenFilter', 'StopwordsFilter', 'LexiconFilter', 'RegexpFilter', 'FrequencyFilter']\n\n\nclass BaseTokenFilter:\n name = NotImplemented\n\n de...
diff --git a/orangecontrib/text/preprocess/filter.py b/orangecontrib/text/preprocess/filter.py index e1bfaf69a..c193d4599 100644 --- a/orangecontrib/text/preprocess/filter.py +++ b/orangecontrib/text/preprocess/filter.py @@ -1,6 +1,7 @@ import os - import re + +from Orange.data.io import detect_encoding from gensim ...
zestedesavoir__zds-site-5845
Un simple membre ne peut pas ajouter une raison au masquage Lorsqu'on est un simple membre, on n'a pas la possibilité d'ajouter une raison au masquage d'un message sur le forum (pour justifier => HS / déjà répondu / a côté de la plaque) alors qu'un staff peut ajouter un commentaire sur la raison du masquage. Un simple ...
[ { "content": "from datetime import datetime\n\nfrom django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.http import Http404\nfrom django.shortcuts import get_object_or_404\nfrom django.utils.translation import ugettext as _\nfrom django.views.generic.detail import Si...
[ { "content": "from datetime import datetime\n\nfrom django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.http import Http404\nfrom django.shortcuts import get_object_or_404\nfrom django.utils.translation import ugettext as _\nfrom django.views.generic.detail import Si...
diff --git a/templates/misc/message.part.html b/templates/misc/message.part.html index e33f380d1b..c0b4f92f1c 100644 --- a/templates/misc/message.part.html +++ b/templates/misc/message.part.html @@ -74,12 +74,12 @@ </a> <form action="{{ hide_link...
celery__celery-6020
Unable to use mysql SSL parameters in create_engine() PR for proposed fix to this issue: https://github.com/celery/celery/pull/6020 # Checklist - [x] I have verified that the issue exists against the `master` branch of Celery. - [ ] This has already been asked to the [discussion group](https://groups.google.com/fo...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"SQLAlchemy session.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nfrom kombu.utils.compat import register_after_fork\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.orm import sessio...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"SQLAlchemy session.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nfrom kombu.utils.compat import register_after_fork\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.orm import sessio...
diff --git a/celery/backends/database/session.py b/celery/backends/database/session.py index ec002ed8862..76ec748427b 100644 --- a/celery/backends/database/session.py +++ b/celery/backends/database/session.py @@ -39,7 +39,9 @@ def get_engine(self, dburi, **kwargs): engine = self._engines[dburi] = creat...
Lightning-AI__torchmetrics-2144
Dont bring the defect from LPIPS to torchmetrics ## 🐛 Bug It is a common bug (specially designed feature?) from LPIPS when it is served as a loss function. Please refers to [This page](https://github.com/richzhang/PerceptualSimilarity/issues/121). You may observe that it is a small change by adding an eps. Unfo...
[ { "content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli...
[ { "content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli...
diff --git a/CHANGELOG.md b/CHANGELOG.md index ff0dd083d3e..e26ef438ddb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- +- Fixed numerical stability bug in `LearnedPerceptualImagePatchSimilarity` metric ([...
sublimelsp__LSP-285
Feature request: Toggle diagnostic panel Hi Tom, I have a suggestion. Right now I have a keyboard shortcut to open the diagnostic panel `ctrl+shift+m`. As you can see. When I open the panel with that keybinding, and press the keybinding again the panel is still visible. ![notoggle](https://user-images.githubuse...
[ { "content": "import html\nimport os\nimport sublime\nimport sublime_plugin\n\ntry:\n from typing import Any, List, Dict, Tuple, Callable, Optional\n assert Any and List and Dict and Tuple and Callable and Optional\nexcept ImportError:\n pass\n\nfrom .core.settings import settings, PLUGIN_NAME\nfrom .c...
[ { "content": "import html\nimport os\nimport sublime\nimport sublime_plugin\n\ntry:\n from typing import Any, List, Dict, Tuple, Callable, Optional\n assert Any and List and Dict and Tuple and Callable and Optional\nexcept ImportError:\n pass\n\nfrom .core.settings import settings, PLUGIN_NAME\nfrom .c...
diff --git a/plugin/diagnostics.py b/plugin/diagnostics.py index a617656d0..0dfd25e5a 100644 --- a/plugin/diagnostics.py +++ b/plugin/diagnostics.py @@ -206,7 +206,13 @@ def clear_diagnostics_status(self): class LspShowDiagnosticsPanelCommand(sublime_plugin.WindowCommand): def run(self): ensure_diagnosti...
rotki__rotki-3215
Please support UNIUP, UNIDOWN on Binance ## Abstract Please support UNIUP, UNIDOWN on Binance
[ { "content": "from typing import Dict, Optional\n\nfrom rotkehlchen.assets.asset import (\n WORLD_TO_BINANCE,\n WORLD_TO_BITFINEX,\n WORLD_TO_BITTREX,\n WORLD_TO_COINBASE_PRO,\n WORLD_TO_FTX,\n WORLD_TO_ICONOMI,\n WORLD_TO_KRAKEN,\n WORLD_TO_KUCOIN,\n WORLD_TO_POLONIEX,\n Asset,\n)...
[ { "content": "from typing import Dict, Optional\n\nfrom rotkehlchen.assets.asset import (\n WORLD_TO_BINANCE,\n WORLD_TO_BITFINEX,\n WORLD_TO_BITTREX,\n WORLD_TO_COINBASE_PRO,\n WORLD_TO_FTX,\n WORLD_TO_ICONOMI,\n WORLD_TO_KRAKEN,\n WORLD_TO_KUCOIN,\n WORLD_TO_POLONIEX,\n Asset,\n)...
diff --git a/docs/changelog.rst b/docs/changelog.rst index afa25ccfde..53f4c25e77 100755 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,7 @@ Changelog * :bug:`3198` Firefox docker users will now see a regularly sized Gitcoin icon under the history menu. * :bug:`3199` Users will now properly see the no...
Qiskit__qiskit-5440
Pulse builder equispace context doesn't work with multiple channels. <!-- ⚠️ If you do not respect this template, your issue will be closed --> <!-- ⚠️ Make sure to browse the opened and closed issues --> ### What is the current behavior? Equispaced context of pulse builder doesn't work as expected. This is repo...
[ { "content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2019.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any ...
[ { "content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2019.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any ...
diff --git a/qiskit/pulse/transforms.py b/qiskit/pulse/transforms.py index d415301ff727..cdf6def23acc 100644 --- a/qiskit/pulse/transforms.py +++ b/qiskit/pulse/transforms.py @@ -452,10 +452,11 @@ def align_equispaced(schedule: Schedule, Notes: This context is convenient for writing PDD or Hahn echo seque...
encode__django-rest-framework-3006
Invalid Unicode byte in Authorization token raises an DjangoUnicodeDecodeError When we sent an invalid/unicode byte in token authentication we got a `500 Internal Server Error` (`DjangoUnicodeDecodeError`) instead of a `401 Unauthorized`: ``` python headers = {'Authorization':'token cfbcf941f2fa06a0647b7dc4cb7839199b4...
[ { "content": "\"\"\"\nProvides various authentication policies.\n\"\"\"\nfrom __future__ import unicode_literals\nimport base64\nfrom django.contrib.auth import authenticate\nfrom django.middleware.csrf import CsrfViewMiddleware\nfrom django.utils.translation import ugettext_lazy as _\nfrom rest_framework impor...
[ { "content": "\"\"\"\nProvides various authentication policies.\n\"\"\"\nfrom __future__ import unicode_literals\nimport base64\nfrom django.contrib.auth import authenticate\nfrom django.middleware.csrf import CsrfViewMiddleware\nfrom django.utils.translation import ugettext_lazy as _\nfrom rest_framework impor...
diff --git a/rest_framework/authentication.py b/rest_framework/authentication.py index 8b5c200907..598c727880 100644 --- a/rest_framework/authentication.py +++ b/rest_framework/authentication.py @@ -170,7 +170,13 @@ def authenticate(self, request): msg = _('Invalid token header. Token string should not con...
napari__napari-4948
Starting a plugin dock widget from the commandline no longer works ## 🐛 Bug Since the last commit https://github.com/napari/napari/commit/9ea0159ad2b690556fe56ce480886d8f0b79ffae starting a dock widget from the command line with the `-w` option no longer works on npe2 packages, readers work as expected. Once the G...
[ { "content": "\"\"\"\nnapari command line viewer.\n\"\"\"\nimport argparse\nimport logging\nimport os\nimport runpy\nimport sys\nimport warnings\nfrom ast import literal_eval\nfrom pathlib import Path\nfrom textwrap import wrap\nfrom typing import Any, Dict, List\n\nfrom .utils.translations import trans\n\n\ncl...
[ { "content": "\"\"\"\nnapari command line viewer.\n\"\"\"\nimport argparse\nimport logging\nimport os\nimport runpy\nimport sys\nimport warnings\nfrom ast import literal_eval\nfrom pathlib import Path\nfrom textwrap import wrap\nfrom typing import Any, Dict, List\n\nfrom .utils.translations import trans\n\n\ncl...
diff --git a/napari/__main__.py b/napari/__main__.py index 9565f4ae00b..9b336d8fe2e 100644 --- a/napari/__main__.py +++ b/napari/__main__.py @@ -266,10 +266,11 @@ def _run(): else: if args.with_: - from .plugins import _npe2, plugin_manager + from .plugins import _initialize_plugin...
conan-io__conan-8728
[feature] Consider using CMake's `include_guard()` in `conan_toolchain.cmake` Right now at the beginning of `conan_toolchain.cmake` `CMakeToolchain` generates: ```cmake # Avoid including toolchain file several times (bad if appending to variables like # CMAKE_CXX_FLAGS. See https://github.com/android/ndk/issues/...
[ { "content": "import textwrap\nfrom collections import OrderedDict\n\nimport six\nfrom jinja2 import DictLoader, Environment\n\nfrom conans.util.files import save\n\n\nclass Variables(OrderedDict):\n _configuration_types = None # Needed for py27 to avoid infinite recursion\n\n def __init__(self):\n ...
[ { "content": "import textwrap\nfrom collections import OrderedDict\n\nimport six\nfrom jinja2 import DictLoader, Environment\n\nfrom conans.util.files import save\n\n\nclass Variables(OrderedDict):\n _configuration_types = None # Needed for py27 to avoid infinite recursion\n\n def __init__(self):\n ...
diff --git a/conan/tools/cmake/base.py b/conan/tools/cmake/base.py index 1feabc3b000..e66fcd6ff35 100644 --- a/conan/tools/cmake/base.py +++ b/conan/tools/cmake/base.py @@ -71,10 +71,8 @@ class CMakeToolchainBase(object): # Avoid including toolchain file several times (bad if appending to variables like ...
django-compressor__django-compressor-648
compress management command is still using django.utils.importlib #608
[ { "content": "# flake8: noqa\nimport os\nimport sys\n\nfrom fnmatch import fnmatch\nfrom optparse import make_option\n\nimport django\nfrom django.core.management.base import NoArgsCommand, CommandError\nimport django.template\nfrom django.template import Context\nfrom django.utils import six\nfrom django.utils...
[ { "content": "# flake8: noqa\nimport os\nimport sys\n\nfrom fnmatch import fnmatch\nfrom optparse import make_option\n\nimport django\nfrom django.core.management.base import NoArgsCommand, CommandError\nimport django.template\nfrom django.template import Context\nfrom django.utils import six\nfrom django.utils...
diff --git a/compressor/management/commands/compress.py b/compressor/management/commands/compress.py index b7fdff5be..ac555e917 100644 --- a/compressor/management/commands/compress.py +++ b/compressor/management/commands/compress.py @@ -11,7 +11,10 @@ from django.template import Context from django.utils import six ...
pypi__warehouse-12149
Support for mathematical expressions in Markdown **What's the problem this feature will solve?** GitHub has [started supporting mathematical expressions in Markdown](https://github.blog/2022-05-19-math-support-in-markdown/). It would be nice to have the same possibility in PyPi, since oftentimes the `README.md` on Gi...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
diff --git a/tests/unit/test_csp.py b/tests/unit/test_csp.py index a7d4aa942c5d..dbbb42a88c73 100644 --- a/tests/unit/test_csp.py +++ b/tests/unit/test_csp.py @@ -229,6 +229,7 @@ def test_includeme(): "'sha256-U3hKDidudIaxBDEzwGJApJgPEf2mWk6cfMWghrAa6i0='", "https://cdn...
interlegis__sapl-2070
Erro ao imprimir etiquetas (campo descrição estourando) Nome da Cidade: | Birigui Estado: | São Paulo Casa Legislativa: | Câmara Municipal Bom dia, Começamos hoje a utilizar a versão 3.1 do SAPL que foi migrado ontem. Mas estamos com um problema na impressão das etiquetas do protocolo administrativo. O problema e...
[ { "content": "# parameters=sessao,imagem,data,lst_protocolos,dic_cabecalho,lst_rodape,dic_filtro\n\n\"\"\"relatorio_protocolo.py\n External method para gerar o arquivo rml da etiqueta de protocolo\n Autor: Luciano De Fazio\n Empresa: OpenLegis Consultoria\n versão: 1.0\n\"\"\"\nimport time\n\nfrom trml...
[ { "content": "# parameters=sessao,imagem,data,lst_protocolos,dic_cabecalho,lst_rodape,dic_filtro\n\n\"\"\"relatorio_protocolo.py\n External method para gerar o arquivo rml da etiqueta de protocolo\n Autor: Luciano De Fazio\n Empresa: OpenLegis Consultoria\n versão: 1.0\n\"\"\"\nimport time\n\nfrom trml...
diff --git a/sapl/relatorios/templates/pdf_etiqueta_protocolo_gerar.py b/sapl/relatorios/templates/pdf_etiqueta_protocolo_gerar.py index 38057791f..8b9c3b2cc 100755 --- a/sapl/relatorios/templates/pdf_etiqueta_protocolo_gerar.py +++ b/sapl/relatorios/templates/pdf_etiqueta_protocolo_gerar.py @@ -98,7 +98,11 @@ def prot...
scrapy__scrapy-5384
Type error when we try to retrieve the `FEEDS` setting via CLI and it has a `Path` objects as a key <!-- Thanks for taking an interest in Scrapy! If you have a question that starts with "How to...", please see the Scrapy Community page: https://scrapy.org/community/. The GitHub issue tracker's purpose is to deal...
[ { "content": "import json\nimport copy\nfrom collections.abc import MutableMapping\nfrom importlib import import_module\nfrom pprint import pformat\n\nfrom scrapy.settings import default_settings\n\n\nSETTINGS_PRIORITIES = {\n 'default': 0,\n 'command': 10,\n 'project': 20,\n 'spider': 30,\n 'cmd...
[ { "content": "import json\nimport copy\nfrom collections.abc import MutableMapping\nfrom importlib import import_module\nfrom pprint import pformat\n\nfrom scrapy.settings import default_settings\n\n\nSETTINGS_PRIORITIES = {\n 'default': 0,\n 'command': 10,\n 'project': 20,\n 'spider': 30,\n 'cmd...
diff --git a/scrapy/settings/__init__.py b/scrapy/settings/__init__.py index 1fe1e6fd17c..6b1ad082854 100644 --- a/scrapy/settings/__init__.py +++ b/scrapy/settings/__init__.py @@ -375,9 +375,13 @@ def __len__(self): return len(self.attributes) def _to_dict(self): - return {k: (v._to_dict() if is...
jupyterhub__jupyterhub-646
Correct spelling error in SSL message When starting JupyterHub without SSL configured properly and `--no-ssl` flag isn't used, the error message printed (from `start_proxy()`, defined in `app.py`) misspells the name of the project: ``` python " Refusing to run JuptyterHub without SSL." " If you are terminating SSL in ...
[ { "content": "#!/usr/bin/env python3\n\"\"\"The multi-user notebook application\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport atexit\nimport binascii\nimport logging\nimport os\nimport signal\nimport socket\nimport sys\nimport threading\...
[ { "content": "#!/usr/bin/env python3\n\"\"\"The multi-user notebook application\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport atexit\nimport binascii\nimport logging\nimport os\nimport signal\nimport socket\nimport sys\nimport threading\...
diff --git a/jupyterhub/app.py b/jupyterhub/app.py index dcc025cca7..79c5c3ecae 100644 --- a/jupyterhub/app.py +++ b/jupyterhub/app.py @@ -1018,7 +1018,7 @@ def start_proxy(self): " There better be SSL termination happening somewhere else...") else: self.log.error( - ...
horovod__horovod-2683
bug in checking sample_weights this line ```if sample_weights: ``` in [here](https://github.com/horovod/horovod/blob/994913a2abc5812042a5c3540ced5b3316d23b72/horovod/spark/torch/remote.py#L268) should change to ```if sample_weights is not None: ``` otherwise it complains about ```RuntimeError: bool value of T...
[ { "content": "# Copyright 2019 Uber Technologies, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\...
[ { "content": "# Copyright 2019 Uber Technologies, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\...
diff --git a/horovod/spark/torch/remote.py b/horovod/spark/torch/remote.py index d55686b08a..e1b9da13a0 100644 --- a/horovod/spark/torch/remote.py +++ b/horovod/spark/torch/remote.py @@ -265,7 +265,7 @@ def prepare_batch(row): if cuda_available: inputs = [input.cuda...
Qiskit__qiskit-2110
Cannot map a single qubit to a given device qubit that is not zero <!-- ⚠️ If you do not respect this template, your issue will be closed --> <!-- ⚠️ Make sure to browse the opened and closed issues --> ### Information - **Qiskit Terra version**: master - **Python version**: - **Operating system**: ### What...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright 2018, IBM.\n#\n# This source code is licensed under the Apache License, Version 2.0 found in\n# the LICENSE.txt file in the root directory of this source tree.\n\n\"\"\"Tools for compiling a batch of quantum circuits.\"\"\"\nimport logging\nimport warnings\n\...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright 2018, IBM.\n#\n# This source code is licensed under the Apache License, Version 2.0 found in\n# the LICENSE.txt file in the root directory of this source tree.\n\n\"\"\"Tools for compiling a batch of quantum circuits.\"\"\"\nimport logging\nimport warnings\n\...
diff --git a/qiskit/transpiler/transpiler.py b/qiskit/transpiler/transpiler.py index a30e8363d1ff..4395ea8ae215 100644 --- a/qiskit/transpiler/transpiler.py +++ b/qiskit/transpiler/transpiler.py @@ -179,12 +179,6 @@ def transpile_dag(dag, basis_gates=None, coupling_map=None, # TODO: `basis_gates` will be removed a...
lutris__lutris-3739
Gamescope failure Spot the issue, I can't. Just enabled gamescope with latest version but it seems there is invalid syntax. Started initial process 34578 from gamescope -f -- gamemoderun /home/theriddick/.local/share/lutris/runners/wine/lutris-ge-6.18-1-x86_64/bin/wine /mnt/GamesNVMe/Games/Encased A Sci-Fi Post-Apo...
[ { "content": "\"\"\"Transform runner parameters to data usable for runtime execution\"\"\"\nimport os\nimport shlex\nimport stat\n\nfrom lutris.util import system\nfrom lutris.util.linux import LINUX_SYSTEM\nfrom lutris.util.log import logger\n\n\ndef get_mangohud_conf(system_config):\n \"\"\"Return correct ...
[ { "content": "\"\"\"Transform runner parameters to data usable for runtime execution\"\"\"\nimport os\nimport shlex\nimport stat\n\nfrom lutris.util import system\nfrom lutris.util.linux import LINUX_SYSTEM\nfrom lutris.util.log import logger\n\n\ndef get_mangohud_conf(system_config):\n \"\"\"Return correct ...
diff --git a/lutris/runner_interpreter.py b/lutris/runner_interpreter.py index 2245a87529..ac50bc6b5e 100644 --- a/lutris/runner_interpreter.py +++ b/lutris/runner_interpreter.py @@ -107,7 +107,8 @@ def get_launch_parameters(runner, gameplay_info): def get_gamescope_args(launch_arguments, system_config): """Ins...
LibraryOfCongress__concordia-436
Questions page to various help links As a user, when I click `Questions?` button in the transcription, I am taken to a page where I am given choices based on what I need help with. I can see three boxes that link out to: - Discussion forum: I want to talk about what I am finding - Help Center: I want to know how to...
[ { "content": "from django.conf import settings\nfrom django.conf.urls import url\nfrom django.contrib import admin\nfrom django.http import Http404, HttpResponseForbidden\nfrom django.urls import include, path\nfrom django.views.defaults import page_not_found, permission_denied, server_error\n\nfrom concordia.a...
[ { "content": "from django.conf import settings\nfrom django.conf.urls import url\nfrom django.contrib import admin\nfrom django.http import Http404, HttpResponseForbidden\nfrom django.urls import include, path, re_path\nfrom django.views.defaults import page_not_found, permission_denied, server_error\nfrom mach...
diff --git a/concordia/templates/transcriptions/asset_detail.html b/concordia/templates/transcriptions/asset_detail.html index 1a49cf585..33f07091f 100644 --- a/concordia/templates/transcriptions/asset_detail.html +++ b/concordia/templates/transcriptions/asset_detail.html @@ -142,7 +142,7 @@ <h2>Tags</h2> ...
litestar-org__litestar-2384
Bug: converting objects to a Bool in debug response ### Description The function `litestar.middleware.exceptions._debug_response.get_symbol_name` [on line 51](https://github.com/litestar-org/litestar/blob/main/litestar/middleware/exceptions/_debug_response.py#L51): ```py instance_or_cls = locals_dict.get("self") o...
[ { "content": "from __future__ import annotations\n\nfrom html import escape\nfrom inspect import getinnerframes\nfrom pathlib import Path\nfrom traceback import format_exception\nfrom typing import TYPE_CHECKING, Any\n\nfrom litestar.enums import MediaType\nfrom litestar.response import Response\nfrom litestar....
[ { "content": "from __future__ import annotations\n\nfrom html import escape\nfrom inspect import getinnerframes\nfrom pathlib import Path\nfrom traceback import format_exception\nfrom typing import TYPE_CHECKING, Any\n\nfrom litestar.enums import MediaType\nfrom litestar.response import Response\nfrom litestar....
diff --git a/litestar/middleware/exceptions/_debug_response.py b/litestar/middleware/exceptions/_debug_response.py index 4ed4a921f5..3cdd86dc6f 100644 --- a/litestar/middleware/exceptions/_debug_response.py +++ b/litestar/middleware/exceptions/_debug_response.py @@ -48,8 +48,9 @@ def get_symbol_name(frame: FrameInfo) -...
cisagov__manage.get.gov-1413
Django Admin: Update fields for adding a new "user domain role" ### Issue description Currently, when adding a "user domain role," the User and Domain fields appear as a standard dropdown, which makes it difficult to find and select the correct entries. This could lead to an unintended selection. ![Image](https://g...
[ { "content": "import logging\nfrom django import forms\nfrom django.http import HttpResponse\nfrom django_fsm import get_available_FIELD_transitions\nfrom django.contrib import admin, messages\nfrom django.contrib.auth.admin import UserAdmin as BaseUserAdmin\nfrom django.contrib.auth.models import Group\nfrom d...
[ { "content": "import logging\nfrom django import forms\nfrom django.http import HttpResponse\nfrom django_fsm import get_available_FIELD_transitions\nfrom django.contrib import admin, messages\nfrom django.contrib.auth.admin import UserAdmin as BaseUserAdmin\nfrom django.contrib.auth.models import Group\nfrom d...
diff --git a/src/registrar/admin.py b/src/registrar/admin.py index 6585d602a..2f9bc97c5 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -322,7 +322,7 @@ class WebsiteAdmin(ListHeaderAdmin): class UserDomainRoleAdmin(ListHeaderAdmin): - """Custom domain role admin class.""" + """Custom use...
getsentry__sentry-python-2205
[TwP] Fallback to propagation context if span is None https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/scope.py#L608-L612 Instead of checking for `has_tracing_enabled`, I suggest we only check for an existing span on the scope, with a fallback on using the Propagation Context. PHP for inspiration...
[ { "content": "from copy import copy\nfrom collections import deque\nfrom itertools import chain\nimport os\nimport uuid\n\nfrom sentry_sdk.attachments import Attachment\nfrom sentry_sdk._functools import wraps\nfrom sentry_sdk.tracing_utils import (\n Baggage,\n extract_sentrytrace_data,\n has_tracing_...
[ { "content": "from copy import copy\nfrom collections import deque\nfrom itertools import chain\nimport os\nimport uuid\n\nfrom sentry_sdk.attachments import Attachment\nfrom sentry_sdk._functools import wraps\nfrom sentry_sdk.tracing_utils import (\n Baggage,\n extract_sentrytrace_data,\n has_tracing_...
diff --git a/sentry_sdk/scope.py b/sentry_sdk/scope.py index 3ad61d31d5..c25b5efec2 100644 --- a/sentry_sdk/scope.py +++ b/sentry_sdk/scope.py @@ -605,11 +605,11 @@ def _drop(cause, ty): contexts = event.setdefault("contexts", {}) - if has_tracing_enabled(options): - if self._span is not ...
getsentry__sentry-python-70
Breadcrumbs type error We're having an issue with v0.3.2 where `popleft` is called on a list type: ``` File "/srv/frontend/project/lib/python3.5/site-packages/sentry_sdk/hub.py" in add_breadcrumb 209. scope._breadcrumbs.popleft() Exception Type: AttributeError at / Exception Value: 'list' object ...
[ { "content": "import sys\nimport copy\nfrom datetime import datetime\nfrom contextlib import contextmanager\n\nfrom sentry_sdk._compat import with_metaclass\nfrom sentry_sdk.scope import Scope\nfrom sentry_sdk.utils import (\n exc_info_from_error,\n event_from_exception,\n logger,\n ContextVar,\n)\n...
[ { "content": "import sys\nimport copy\nfrom datetime import datetime\nfrom contextlib import contextmanager\n\nfrom sentry_sdk._compat import with_metaclass\nfrom sentry_sdk.scope import Scope\nfrom sentry_sdk.utils import (\n exc_info_from_error,\n event_from_exception,\n logger,\n ContextVar,\n)\n...
diff --git a/sentry_sdk/hub.py b/sentry_sdk/hub.py index b161a4d40e..a7056c660c 100644 --- a/sentry_sdk/hub.py +++ b/sentry_sdk/hub.py @@ -205,8 +205,8 @@ def add_breadcrumb(self, crumb=None, hint=None, **kwargs): scope._breadcrumbs.append(crumb) else: logger.info("before breadcrumb d...
scikit-hep__pyhf-1767
scipy reference objects can't be found for docs ### Summary The docs are failing to build as we're hitting the warning ```pytb WARNING: failed to reach any of the inventories with the following issues: intersphinx inventory 'https://docs.scipy.org/doc/scipy/reference/objects.inv' not readable due to ValueError:...
[ { "content": "#\n# pyhf documentation build configuration file, created by\n# sphinx-quickstart on Fri Feb 9 11:58:49 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#...
[ { "content": "#\n# pyhf documentation build configuration file, created by\n# sphinx-quickstart on Fri Feb 9 11:58:49 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#...
diff --git a/docs/conf.py b/docs/conf.py index 7bb6962aaa..642bf1fc9e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -73,7 +73,7 @@ def setup(app): intersphinx_mapping = { 'python': ('https://docs.python.org/3', None), 'numpy': ('https://numpy.org/doc/stable/', None), - 'scipy': ('https://docs.scipy.org/...
celery__celery-8432
Invalid format of 'date_done' field in celery.task_results with backend mongodb <!-- Please fill this template entirely and do not erase parts of it. We reserve the right to close without a response bug reports which are incomplete. --> # Checklist <!-- To check an item on the list replace [ ] with [x]. --> - ...
[ { "content": "\"\"\"MongoDB result store backend.\"\"\"\nfrom datetime import datetime, timedelta\n\nfrom kombu.exceptions import EncodeError\nfrom kombu.utils.objects import cached_property\nfrom kombu.utils.url import maybe_sanitize_url, urlparse\n\nfrom celery import states\nfrom celery.exceptions import Imp...
[ { "content": "\"\"\"MongoDB result store backend.\"\"\"\nfrom datetime import datetime, timedelta\n\nfrom kombu.exceptions import EncodeError\nfrom kombu.utils.objects import cached_property\nfrom kombu.utils.url import maybe_sanitize_url, urlparse\n\nfrom celery import states\nfrom celery.exceptions import Imp...
diff --git a/celery/backends/mongodb.py b/celery/backends/mongodb.py index 654ca3710c9..c64fe380807 100644 --- a/celery/backends/mongodb.py +++ b/celery/backends/mongodb.py @@ -182,7 +182,8 @@ def _store_result(self, task_id, result, state, traceback=None, request=None, **kwargs): """Sto...
pytorch__vision-3353
torchvision.dataset.STL10.__load_folds() loads image indices using uint8. ## 🐛 Bug <!-- A clear and concise description of what the bug is. --> There seems a bug to load STL-10 dataset using torchvision.dataset.STL10. I think the bug causes from "uint8" used on _load_folds() function. The maximum range of uint8 i...
[ { "content": "from PIL import Image\nimport os\nimport os.path\nimport numpy as np\nfrom typing import Any, Callable, Optional, Tuple\n\nfrom .vision import VisionDataset\nfrom .utils import check_integrity, download_and_extract_archive, verify_str_arg\n\n\nclass STL10(VisionDataset):\n \"\"\"`STL10 <https:/...
[ { "content": "from PIL import Image\nimport os\nimport os.path\nimport numpy as np\nfrom typing import Any, Callable, Optional, Tuple\n\nfrom .vision import VisionDataset\nfrom .utils import check_integrity, download_and_extract_archive, verify_str_arg\n\n\nclass STL10(VisionDataset):\n \"\"\"`STL10 <https:/...
diff --git a/torchvision/datasets/stl10.py b/torchvision/datasets/stl10.py index 35c71bd2cf1..50e9af882bc 100644 --- a/torchvision/datasets/stl10.py +++ b/torchvision/datasets/stl10.py @@ -181,7 +181,7 @@ def __load_folds(self, folds: Optional[int]) -> None: self.root, self.base_folder, self.folds_list_fil...
ARM-DOE__ACT-348
Attributes on coordinate variable dropped after applying qcfilter.add_test() to data variable After applying `ds.qcfilter.add_test()` to a data variable, the attributes on the coordinate variable dimensioning the tested variable are removed. This happens for act-atmos versions 1.0.2 and 1.0.3, but not 0.7.2 and before....
[ { "content": "\"\"\"\nFunctions and methods for creating ancillary quality control variables\nand filters (masks) which can be used with various corrections\nroutines in ACT.\n\n\"\"\"\n\nimport numpy as np\nimport xarray as xr\nimport dask\n\nfrom act.qc import qctests, comparison_tests\n\n\n@xr.register_datas...
[ { "content": "\"\"\"\nFunctions and methods for creating ancillary quality control variables\nand filters (masks) which can be used with various corrections\nroutines in ACT.\n\n\"\"\"\n\nimport numpy as np\nimport xarray as xr\nimport dask\n\nfrom act.qc import qctests, comparison_tests\n\n\n@xr.register_datas...
diff --git a/act/qc/qcfilter.py b/act/qc/qcfilter.py index 3bacd87a8e..4282a6ade0 100644 --- a/act/qc/qcfilter.py +++ b/act/qc/qcfilter.py @@ -162,8 +162,10 @@ def create_qc_variable(self, var_name, flag_type=False, except AttributeError: qc_data = np.zeros_like(self._obj[var_name].values, dtype=n...
pypa__pipenv-4521
Pipenv install ignores updates to VCS (Git) branch/tag in 'ref' Following the instructions [here](https://pipenv.pypa.io/en/latest/basics/#a-note-about-vcs-dependencies) and migrating from a requirements.txt file, I have created a Pipfile to install a dependency from VCS (Git). ``` [packages] my_app = {editable = ...
[ { "content": "# -*- coding=utf-8 -*-\nfrom __future__ import absolute_import, print_function\n\nimport contextlib\nimport importlib\nimport io\nimport json\nimport operator\nimport os\nimport site\nimport sys\n\nfrom sysconfig import get_paths, get_python_version\n\nimport itertools\nimport pkg_resources\nimpor...
[ { "content": "# -*- coding=utf-8 -*-\nfrom __future__ import absolute_import, print_function\n\nimport contextlib\nimport importlib\nimport io\nimport json\nimport operator\nimport os\nimport site\nimport sys\n\nfrom sysconfig import get_paths, get_python_version\n\nimport itertools\nimport pkg_resources\nimpor...
diff --git a/news/4387.bugfix.rst b/news/4387.bugfix.rst new file mode 100644 index 0000000000..a17b5690d2 --- /dev/null +++ b/news/4387.bugfix.rst @@ -0,0 +1 @@ +Fix a bug that VCS dependencies always satisfy even if the ref has changed. diff --git a/pipenv/environment.py b/pipenv/environment.py index 508b615ee9..88c6...
aws__aws-cli-4147
aws cloudformation prints S3 upload progress to STDOUT When running `aws cloudformation package`, the output must not include the S3 upload progress. It currently includes the combined output of the S3 file upload as well as packaged CloudFormation itself making it impossible to use via STDOUT. See the full repro...
[ { "content": "# Copyright 2012-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n...
[ { "content": "# Copyright 2012-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n...
diff --git a/awscli/customizations/s3uploader.py b/awscli/customizations/s3uploader.py index 38e8cc8d0193..e640b94ba55a 100644 --- a/awscli/customizations/s3uploader.py +++ b/awscli/customizations/s3uploader.py @@ -220,8 +220,8 @@ def on_progress(self, future, bytes_transferred, **kwargs): with self._lock: ...
Lightning-AI__pytorch-lightning-918
Test pass shouldn't require both test_step and test_end ## 🐛 Bug `trainer.test(...)` requires implementation of both `test_step` and `test_end`, but the warning says you only need to implement either or both. https://github.com/PyTorchLightning/pytorch-lightning/blob/56dddf970825b1ad2b598c9b9b23a8a77add8964/py...
[ { "content": "\"\"\"\nValidation loop\n===============\n\nThe lightning validation loop handles everything except the actual computations of your model.\nTo decide what will happen in your validation loop, define the `validation_step` function.\nBelow are all the things lightning automates for you in the valida...
[ { "content": "\"\"\"\nValidation loop\n===============\n\nThe lightning validation loop handles everything except the actual computations of your model.\nTo decide what will happen in your validation loop, define the `validation_step` function.\nBelow are all the things lightning automates for you in the valida...
diff --git a/pytorch_lightning/trainer/evaluation_loop.py b/pytorch_lightning/trainer/evaluation_loop.py index 37847393a10cc..db514cdd7451d 100644 --- a/pytorch_lightning/trainer/evaluation_loop.py +++ b/pytorch_lightning/trainer/evaluation_loop.py @@ -301,8 +301,8 @@ def evaluate(self, model, dataloaders, max_batches,...
yt-project__yt-4145
BUG: incorrect conversion from array to boolean ### Bug report **Bug summary** This line https://github.com/yt-project/yt/blob/2f4766957a2e88461cf1473bb5873335e80b529d/yt/frontends/flash/io.py#L164 triggers a bunch of `DeprecationWarning`s in testing ``` /home/fido/workspace/yt_py38_git/yt/frontends/flash/io....
[ { "content": "import sys\nfrom itertools import groupby\n\nimport numpy as np\n\nfrom yt.geometry.selection_routines import AlwaysSelector\nfrom yt.utilities.io_handler import BaseIOHandler\n\nif sys.version_info >= (3, 8):\n from functools import cached_property\nelse:\n from yt._maintenance.backports im...
[ { "content": "import sys\nfrom itertools import groupby\n\nimport numpy as np\n\nfrom yt.geometry.selection_routines import AlwaysSelector\nfrom yt.utilities.io_handler import BaseIOHandler\n\nif sys.version_info >= (3, 8):\n from functools import cached_property\nelse:\n from yt._maintenance.backports im...
diff --git a/yt/frontends/flash/io.py b/yt/frontends/flash/io.py index 9247c6a9c76..7758d2700c5 100644 --- a/yt/frontends/flash/io.py +++ b/yt/frontends/flash/io.py @@ -145,7 +145,7 @@ def _read_particle_fields(self, chunks, ptf, selector): if _xyz[0].size > 0: bxyz.append(_xyz) ...
freedomofpress__securedrop-6102
1.8.0 translation feedback: say replies are saved, not stored ## Description From [AO](https://weblate.securedrop.org/translate/securedrop/securedrop/en/?checksum=a6f950dfa57047f3): "Your reply has been saved." might be better than "Your reply has been stored."
[ { "content": "# -*- coding: utf-8 -*-\nfrom datetime import datetime\nfrom typing import Union\n\nimport werkzeug\nfrom flask import (Blueprint, request, current_app, session, url_for, redirect,\n render_template, g, flash, abort, Markup, escape)\nfrom flask_babel import gettext\nfrom sqlalche...
[ { "content": "# -*- coding: utf-8 -*-\nfrom datetime import datetime\nfrom typing import Union\n\nimport werkzeug\nfrom flask import (Blueprint, request, current_app, session, url_for, redirect,\n render_template, g, flash, abort, Markup, escape)\nfrom flask_babel import gettext\nfrom sqlalche...
diff --git a/securedrop/journalist_app/main.py b/securedrop/journalist_app/main.py index 1075d637a8..60151f400a 100644 --- a/securedrop/journalist_app/main.py +++ b/securedrop/journalist_app/main.py @@ -163,7 +163,8 @@ def reply() -> werkzeug.Response: "<b>{}</b> {}".format( ...
ckan__ckan-6532
CKAN 2.9.4 cannot load JS translations when using Python 2.7 This code is not Python 2.7 compatible: https://github.com/ckan/ckan/blob/6731c5a821a6a5f4bdaa20f4e793e0b6ba44f823/ckan/views/api.py#L482 In Python 2, `encoding` is not a valid argument for the `open` function, but it is for the `json.load`. Here is ...
[ { "content": "# encoding: utf-8\n\nimport os\nimport logging\nimport html\n\nfrom flask import Blueprint, make_response\n\nfrom werkzeug.exceptions import BadRequest\n\nimport ckan.model as model\nfrom ckan.common import json, _, g, request\nfrom ckan.lib.helpers import url_for\nfrom ckan.lib.base import render...
[ { "content": "# encoding: utf-8\n\nimport os\nimport logging\nimport html\nimport io\n\nfrom flask import Blueprint, make_response\n\nfrom werkzeug.exceptions import BadRequest\n\nimport ckan.model as model\nfrom ckan.common import json, _, g, request\nfrom ckan.lib.helpers import url_for\nfrom ckan.lib.base im...
diff --git a/ckan/views/api.py b/ckan/views/api.py index 703f0305654..e70bc9f2977 100644 --- a/ckan/views/api.py +++ b/ckan/views/api.py @@ -3,6 +3,7 @@ import os import logging import html +import io from flask import Blueprint, make_response @@ -449,7 +450,7 @@ def i18n_js_translations(lang, ver=API_REST_DEFA...
kubeflow__pipelines-6993
[bug] TFX sample fails after upgrading to 1.4 ### What steps did you take <!-- A clear and concise description of what the bug is.--> * MLMD & TFX upgrade: https://github.com/kubeflow/pipelines/pull/6910 ### What happened: * Check test: https://oss-prow.knative.dev/view/gs/oss-prow/logs/kubeflow-pipeline-po...
[ { "content": "#!/usr/bin/env python3\n# Copyright 2019 The Kubeflow Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0...
[ { "content": "#!/usr/bin/env python3\n# Copyright 2019 The Kubeflow Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0...
diff --git a/samples/core/parameterized_tfx_oss/parameterized_tfx_oss.py b/samples/core/parameterized_tfx_oss/parameterized_tfx_oss.py index 81bfcbd77b8..bc616408154 100644 --- a/samples/core/parameterized_tfx_oss/parameterized_tfx_oss.py +++ b/samples/core/parameterized_tfx_oss/parameterized_tfx_oss.py @@ -164,7 +164,...
pytorch__text-153
ValueError: Got input vectors of type <type 'str'>, expected str or Vectors object when I run the code, it has the error, **Traceback (most recent call last): File "test/example.py", line 16, in <module> inputs.vocab.load_vectors('glove.840B.300d') File "/Users/wangyuan/anaconda2/lib/python2.7/site-packages...
[ { "content": "from __future__ import unicode_literals\nimport array\nfrom collections import defaultdict\nimport io\nimport logging\nimport os\nimport zipfile\n\nimport six\nfrom six.moves.urllib.request import urlretrieve\nimport torch\nfrom tqdm import tqdm\nimport tarfile\n\nfrom .utils import reporthook\n\n...
[ { "content": "from __future__ import unicode_literals\nimport array\nfrom collections import defaultdict\nimport io\nimport logging\nimport os\nimport zipfile\n\nimport six\nfrom six.moves.urllib.request import urlretrieve\nimport torch\nfrom tqdm import tqdm\nimport tarfile\n\nfrom .utils import reporthook\n\n...
diff --git a/test/test_vocab.py b/test/test_vocab.py index c6025c98b2..7253e6b0e5 100644 --- a/test/test_vocab.py +++ b/test/test_vocab.py @@ -51,7 +51,7 @@ def test_vocab_download_fasttext_vectors(self): # to test string aliases. for i in range(3): if i == 2: - vectors = "...
iterative__dvc-6242
Update pygtrie to 2.4.2? DVC seems to pin pygtrie to version 2.3.2 I'm wondering what the reason is, and if it would feasible to either upgrade to or allow usage of 2.4.2? Currently I'm unable to install dvc alongside another project that does require the latest pygtrie.
[ { "content": "import importlib.util\nimport os\nfrom pathlib import Path\n\nfrom setuptools import find_packages, setup\nfrom setuptools.command.build_py import build_py as _build_py\n\n# Prevents pkg_resources import in entry point script,\n# see https://github.com/ninjaaron/fast-entry_points.\n# This saves ab...
[ { "content": "import importlib.util\nimport os\nfrom pathlib import Path\n\nfrom setuptools import find_packages, setup\nfrom setuptools.command.build_py import build_py as _build_py\n\n# Prevents pkg_resources import in entry point script,\n# see https://github.com/ninjaaron/fast-entry_points.\n# This saves ab...
diff --git a/setup.py b/setup.py index be3d5ff41e..744eaf8168 100644 --- a/setup.py +++ b/setup.py @@ -80,7 +80,7 @@ def run(self): "dataclasses==0.7; python_version < '3.7'", "flatten_dict>=0.3.0,<1", "tabulate>=0.8.7", - "pygtrie==2.3.2", + "pygtrie>=2.3.2", "dpath>=2.0.1,<3", "shtab>=1...
encode__httpx-737
Version 0.11.0 This one is a big deal, since it reintroduces the sync client, and is essentially a 1.0 pre-release in terms of how the API looks. ```python >>> import httpx >>> httpx.get('https://www.example.com') <Response [200 OK]> ``` 🎉✨ **TA-DA!** ✨🎉 --- # Release notes ## 0.11.0 (January 9th, ...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport re\nfrom pathlib import Path\n\nfrom setuptools import setup\n\n\ndef get_version(package):\n \"\"\"\n Return package version as listed in `__version__` in `init.py`.\n \"\"\"\n version = Path(package, \"__version__.py\").read_te...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport re\nfrom pathlib import Path\n\nfrom setuptools import setup\n\n\ndef get_version(package):\n \"\"\"\n Return package version as listed in `__version__` in `init.py`.\n \"\"\"\n version = Path(package, \"__version__.py\").read_te...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 57ad60d5bb..81ef15ac43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,35 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## 0.11.0 (January 9th, 2019) + ...
piskvorky__gensim-2689
LeveshteinSimilarityIndex fails when called from SparseTermSimilarityMatrix <!-- **IMPORTANT**: - Use the [Gensim mailing list](https://groups.google.com/forum/#!forum/gensim) to ask general or usage questions. Github issues are only for bug reports. - Check [Recipes&FAQ](https://github.com/RaRe-Technologies/gensi...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2018 Vit Novotny <witiko@mail.muni.cz>\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\"\"\"\nThis module provides a namespace for functions that use the Levenshtein distance.\n\"\"\"\n\nfrom itertoo...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2018 Vit Novotny <witiko@mail.muni.cz>\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\"\"\"\nThis module provides a namespace for functions that use the Levenshtein distance.\n\"\"\"\n\nimport itert...
diff --git a/gensim/similarities/levenshtein.py b/gensim/similarities/levenshtein.py index e517c51217..ca39e68dd0 100644 --- a/gensim/similarities/levenshtein.py +++ b/gensim/similarities/levenshtein.py @@ -8,7 +8,7 @@ This module provides a namespace for functions that use the Levenshtein distance. """ -from itert...
xonsh__xonsh-2813
Tab Completion broken for directories with spaces ## xonfig ~ $ xonfig ``` +------------------+----------------------+ | xonsh | 0.7.3 | | Git SHA | 55d69ee6 | | Commit Date | Aug 11 10:22:24 2018 | | Python | 3.7.0 | | PLY ...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"The readline based xonsh shell.\n\nPortions of this code related to initializing the readline library\nare included from the IPython project. The IPython project is:\n\n* Copyright (c) 2008-2014, IPython Development Team\n* Copyright (c) 2001-2007, Fernando Perez <f...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"The readline based xonsh shell.\n\nPortions of this code related to initializing the readline library\nare included from the IPython project. The IPython project is:\n\n* Copyright (c) 2008-2014, IPython Development Team\n* Copyright (c) 2001-2007, Fernando Perez <f...
diff --git a/news/rlcomp.rst b/news/rlcomp.rst new file mode 100644 index 0000000000..67237bad6f --- /dev/null +++ b/news/rlcomp.rst @@ -0,0 +1,14 @@ +**Added:** None + +**Changed:** None + +**Deprecated:** None + +**Removed:** None + +**Fixed:** + +* Fixed issue with TAB completion in readline not replacing values + ...
borgbackup__borg-2100
IntegrityError: Invalid segment entry size In an attempt to expunge multiple checkpoints I used a script similar to: ``` #!/bin/sh set -eu borg list :: | grep checkpoint | cut -d ' ' -f1 | while read l; do borg delete ::${l} done ``` The client is running borg 1.0.9 on OSX and the server (OpenBSD) i...
[ { "content": "from configparser import ConfigParser\nfrom binascii import unhexlify\nfrom datetime import datetime\nfrom itertools import islice\nimport errno\nimport os\nimport shutil\nimport struct\nfrom zlib import crc32\n\nimport msgpack\n\nfrom .logger import create_logger\nlogger = create_logger()\n\nfrom...
[ { "content": "from configparser import ConfigParser\nfrom binascii import unhexlify\nfrom datetime import datetime\nfrom itertools import islice\nimport errno\nimport os\nimport shutil\nimport struct\nfrom zlib import crc32\n\nimport msgpack\n\nfrom .logger import create_logger\nlogger = create_logger()\n\nfrom...
diff --git a/borg/repository.py b/borg/repository.py index dd49b368bf..058e894e3e 100644 --- a/borg/repository.py +++ b/borg/repository.py @@ -670,7 +670,8 @@ def get_write_fd(self, no_new=False, raise_full=False): if not os.path.exists(dirname): os.mkdir(dirname) ...
mesonbuild__meson-3399
Allow running run_command() without capturing binary output which will fail to decode ``` Program glslc found: YES (/usr/local/bin/glslc) Traceback (most recent call last): File "/data/git/meson/mesonbuild/mesonmain.py", line 369, in run app.generate() File "/data/git/meson/mesonbuild/mesonmain.py", line 1...
[ { "content": "# Copyright 2012-2015 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless req...
[ { "content": "# Copyright 2012-2015 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless req...
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 9b00c28918a2..8a2b67c531ce 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -749,7 +749,9 @@ def expand_arguments(args): return expended_args def Popen_safe(args, write=None, stderr=subprocess.PIPE, **kwargs): - if sys.vers...
magenta__magenta-1365
DRUMS_RNN: when trying to run --eval on drums_rnn I get "ValueError: invalid every_n_iter=0." Some very strange behavior here. I am comparing lstm behavior here to that of [LSTMetallica](https://github.com/keunwoochoi/LSTMetallica). So using the same midi library of metallica drums, I went through the normal drums_r...
[ { "content": "# Copyright 2016 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ...
[ { "content": "# Copyright 2016 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ...
diff --git a/magenta/models/shared/events_rnn_train.py b/magenta/models/shared/events_rnn_train.py index aae39c727f..ce1e6954f3 100644 --- a/magenta/models/shared/events_rnn_train.py +++ b/magenta/models/shared/events_rnn_train.py @@ -98,7 +98,13 @@ def run_eval(build_graph_fn, train_dir, eval_dir, num_batches, nu...
PlasmaPy__PlasmaPy-644
Add binder links to generated example notebooks Stumbled upon at #638 * Binder is a cool tool I'd love to learn more about * https://sphinx-gallery.github.io/configuration.html#binder-links is pretty cool * https://github.com/mne-tools/mne-bids/pull/207/files is an implementation
[ { "content": "#!/usr/bin/env python3.6\n# -*- coding: utf-8 -*-\n#\n# PlasmaPy documentation build configuration file, created by\n# sphinx-quickstart on Wed May 31 18:16:46 2017.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configurati...
[ { "content": "#!/usr/bin/env python3.6\n# -*- coding: utf-8 -*-\n#\n# PlasmaPy documentation build configuration file, created by\n# sphinx-quickstart on Wed May 31 18:16:46 2017.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configurati...
diff --git a/docs/conf.py b/docs/conf.py index a1e755983e..702182d11d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -180,4 +180,15 @@ # path where to save gallery generated examples 'backreferences_dir': 'gen_modules/backreferences', 'gallery_dirs': 'auto_examples', + 'binder': { + # Required...
aws-cloudformation__cfn-lint-2691
E2506 prevents using SourceSecurityGroupId for non-vpc security groups https://github.com/aws-cloudformation/cfn-lint/blob/4a7af2bd53a9ad1ccaba3a509437c53102ade522/src/cfnlint/rules/resources/ectwo/SecurityGroupIngress.py#L33-L40 I couldn't see any reason in the [cloudformation reference](https://docs.aws.amazon.com...
[ { "content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nfrom cfnlint.rules import CloudFormationLintRule, RuleMatch\n\n\nclass SecurityGroupIngress(CloudFormationLintRule):\n \"\"\"Check if EC2 Security Group Ingress Properties\"\"\"\n...
[ { "content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nfrom cfnlint.rules import CloudFormationLintRule, RuleMatch\n\n\nclass SecurityGroupIngress(CloudFormationLintRule):\n \"\"\"Check if EC2 Security Group Ingress Properties\"\"\"\n...
diff --git a/src/cfnlint/rules/resources/ectwo/SecurityGroupIngress.py b/src/cfnlint/rules/resources/ectwo/SecurityGroupIngress.py index c77cf9984c..607852edfe 100644 --- a/src/cfnlint/rules/resources/ectwo/SecurityGroupIngress.py +++ b/src/cfnlint/rules/resources/ectwo/SecurityGroupIngress.py @@ -36,19 +36,6 @@ def ch...
pwndbg__pwndbg-1806
Our Breakpoint class should reset all stop caches Essentially what I wrote here https://github.com/pwndbg/pwndbg/pull/1799#discussion_r1267211887 - instead of clearing only registers cache, we should clear all caches that were registered to be cleared by the 'stop' event in our Breakpoint class: https://github.com/p...
[ { "content": "import gdb\n\nimport pwndbg.lib.cache\n\n\nclass Breakpoint(gdb.Breakpoint):\n \"\"\"\n Breakpoint class, similar to gdb.Breakpoint, but clears the caches\n associated with the stop event before determining whether it should stop the\n inferior or not.\n\n Unlike gdb.Breakpoint, use...
[ { "content": "import gdb\n\nimport pwndbg.lib.cache\n\n\nclass Breakpoint(gdb.Breakpoint):\n \"\"\"\n Breakpoint class, similar to gdb.Breakpoint, but clears the caches\n associated with the stop event before determining whether it should stop the\n inferior or not.\n\n Unlike gdb.Breakpoint, use...
diff --git a/pwndbg/gdblib/bpoint.py b/pwndbg/gdblib/bpoint.py index 39c84631c5b..051f6cf5985 100644 --- a/pwndbg/gdblib/bpoint.py +++ b/pwndbg/gdblib/bpoint.py @@ -15,7 +15,7 @@ class Breakpoint(gdb.Breakpoint): def stop(self): # Clear the cache for the stop event. - pwndbg.gdblib.regs.__getattr...
google__mobly-69
ad.is_rootable fails to identify the build properly if adb server isn't running already There is an edge case where `ad.is_rootable` incorrectly returns 'True', in which case we issue `adb root` call, causing some NBU devices to stop responding to adb commands. The edge case is: adb server is not running prior to st...
[ { "content": "#!/usr/bin/env python3.4\n#\n# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n...
[ { "content": "#!/usr/bin/env python3.4\n#\n# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n...
diff --git a/mobly/controllers/android_device.py b/mobly/controllers/android_device.py index 70f5453f..dfa69d1a 100644 --- a/mobly/controllers/android_device.py +++ b/mobly/controllers/android_device.py @@ -463,8 +463,15 @@ def is_adb_root(self): @property def is_rootable(self): - build_type = self.a...
fossasia__open-event-server-2532
Bug: Kubernetes Deployment Info shown on heroku Do not try to show Kubernetes deployment info when not hosted on Kubernetes
[ { "content": "import os\n\nfrom flask_admin import expose\n\nfrom app.views.admin.super_admin.super_admin_base import SuperAdminBaseView\nfrom ....helpers.data_getter import DataGetter\nfrom app.helpers.helpers import get_latest_heroku_release, get_commit_info, get_count\nfrom app.models.user import ATTENDEE,TR...
[ { "content": "import os\n\nfrom flask_admin import expose\n\nfrom app.views.admin.super_admin.super_admin_base import SuperAdminBaseView\nfrom ....helpers.data_getter import DataGetter\nfrom app.helpers.helpers import get_latest_heroku_release, get_commit_info, get_count\nfrom app.models.user import ATTENDEE,TR...
diff --git a/app/views/admin/super_admin/super_admin.py b/app/views/admin/super_admin/super_admin.py index a60dac0c43..19c45ab61c 100644 --- a/app/views/admin/super_admin/super_admin.py +++ b/app/views/admin/super_admin/super_admin.py @@ -53,7 +53,7 @@ def index_view(self): events=events, ...
python__mypy-7717
Mypy not treating bytes as typing.ByteString According to the [docs](https://docs.python.org/3/library/typing.html#typing.ByteString), an argument typed as `bytes` should also accept `bytearray` and `memoryview`, but this doesn't seem to be the case. The following example demonstrates this: ```python def process...
[ { "content": "\"\"\"Calculate some properties of classes.\n\nThese happen after semantic analysis and before type checking.\n\"\"\"\n\nfrom typing import List, Set, Optional\nfrom typing_extensions import Final\n\nfrom mypy.nodes import (\n Node, TypeInfo, Var, Decorator, OverloadedFuncDef, SymbolTable, Call...
[ { "content": "\"\"\"Calculate some properties of classes.\n\nThese happen after semantic analysis and before type checking.\n\"\"\"\n\nfrom typing import List, Set, Optional\nfrom typing_extensions import Final\n\nfrom mypy.nodes import (\n Node, TypeInfo, Var, Decorator, OverloadedFuncDef, SymbolTable, Call...
diff --git a/mypy/semanal_classprop.py b/mypy/semanal_classprop.py index 8f8ccd91fc6b..c9772276d7d8 100644 --- a/mypy/semanal_classprop.py +++ b/mypy/semanal_classprop.py @@ -30,6 +30,7 @@ TYPE_PROMOTIONS_PYTHON3 = TYPE_PROMOTIONS.copy() # type: Final TYPE_PROMOTIONS_PYTHON3.update({ 'builtins.bytearray': 'byte...
adamchainz__django-cors-headers-451
Cannot whitelist `file://`, which means I cannot work around a Chrome bug Chrome on Android isn't letting some people login to our app. There's the [bug in chrome on Android](https://bugs.chromium.org/p/chromium/issues/detail?id=991107) that I'm trying to work around. The workaround, however, requires whitelisting "fil...
[ { "content": "import re\nfrom collections.abc import Sequence\nfrom numbers import Integral\nfrom urllib.parse import urlparse\n\nfrom django.conf import settings\nfrom django.core import checks\n\nfrom corsheaders.conf import conf\n\nre_type = type(re.compile(\"\"))\n\n\n@checks.register\ndef check_settings(ap...
[ { "content": "import re\nfrom collections.abc import Sequence\nfrom numbers import Integral\nfrom urllib.parse import urlparse\n\nfrom django.conf import settings\nfrom django.core import checks\n\nfrom corsheaders.conf import conf\n\nre_type = type(re.compile(\"\"))\n\n\n@checks.register\ndef check_settings(ap...
diff --git a/HISTORY.rst b/HISTORY.rst index 5f8dbae4..c93fc7eb 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -6,6 +6,9 @@ Pending .. Insert new release notes below this line +* Support the value `file://` for origins which is accidentally sent by some + versions of Chrome on Android. + 3.1.0 (2019-08-13) -----...
openmc-dev__openmc-2915
Wrong directive in docstring The docs for `Cell.from_xml_element` don't render correctly. `:math:` instead of `:func:` was used.
[ { "content": "from collections.abc import Iterable\nfrom math import cos, sin, pi\nfrom numbers import Real\n\nimport lxml.etree as ET\nimport numpy as np\nfrom uncertainties import UFloat\n\nimport openmc\nimport openmc.checkvalue as cv\nfrom ._xml import get_text\nfrom .mixin import IDManagerMixin\nfrom .regi...
[ { "content": "from collections.abc import Iterable\nfrom math import cos, sin, pi\nfrom numbers import Real\n\nimport lxml.etree as ET\nimport numpy as np\nfrom uncertainties import UFloat\n\nimport openmc\nimport openmc.checkvalue as cv\nfrom ._xml import get_text\nfrom .mixin import IDManagerMixin\nfrom .regi...
diff --git a/openmc/cell.py b/openmc/cell.py index 0af6ea2b451..998640930ad 100644 --- a/openmc/cell.py +++ b/openmc/cell.py @@ -722,7 +722,7 @@ def from_xml_element(cls, elem, surfaces, materials, get_universe): Dictionary mapping surface IDs to :class:`openmc.Surface` instances materials : dict ...
systemd__mkosi-2467
bootctl: not found in s390x host build image when execute command `mkosi -d fedora --architecture s390x -f qemu --bootable no` on a `s390x` host. encounter the error as ``` >>> Running trigger-install scriptlet: systemd-udev-0:253.15-2.fc38.s390x >>> Stop trigger-install scriptlet: systemd-udev-0:253.15-2.fc38.s...
[ { "content": "# SPDX-License-Identifier: LGPL-2.1+\n\nimport asyncio\nimport base64\nimport contextlib\nimport enum\nimport errno\nimport fcntl\nimport hashlib\nimport logging\nimport os\nimport random\nimport shutil\nimport socket\nimport struct\nimport subprocess\nimport sys\nimport tempfile\nimport uuid\nfro...
[ { "content": "# SPDX-License-Identifier: LGPL-2.1+\n\nimport asyncio\nimport base64\nimport contextlib\nimport enum\nimport errno\nimport fcntl\nimport hashlib\nimport logging\nimport os\nimport random\nimport shutil\nimport socket\nimport struct\nimport subprocess\nimport sys\nimport tempfile\nimport uuid\nfro...
diff --git a/mkosi/qemu.py b/mkosi/qemu.py index 4339c554f..89941678b 100644 --- a/mkosi/qemu.py +++ b/mkosi/qemu.py @@ -141,6 +141,10 @@ class KernelType(StrEnum): @classmethod def identify(cls, config: Config, path: Path) -> "KernelType": + if not find_binary("bootctl", root=config.tools()): + ...
netbox-community__netbox-12863
Include "add" button on navigation menu for wireless links ### NetBox version v3.5.3 ### Python version 3.8 ### Steps to Reproduce The Current view in the sidebar for the `Connections > Wireless Links` contains the `Import` button but not the `Add` button which is available in the main view. <img width="1440" a...
[ { "content": "from django.utils.translation import gettext as _\n\nfrom netbox.registry import registry\nfrom . import *\n\n#\n# Nav menus\n#\n\nORGANIZATION_MENU = Menu(\n label=_('Organization'),\n icon_class='mdi mdi-domain',\n groups=(\n MenuGroup(\n label=_('Sites'),\n ...
[ { "content": "from django.utils.translation import gettext as _\n\nfrom netbox.registry import registry\nfrom . import *\n\n#\n# Nav menus\n#\n\nORGANIZATION_MENU = Menu(\n label=_('Organization'),\n icon_class='mdi mdi-domain',\n groups=(\n MenuGroup(\n label=_('Sites'),\n ...
diff --git a/netbox/netbox/navigation/menu.py b/netbox/netbox/navigation/menu.py index 6e5bcfc23f4..d139546d99b 100644 --- a/netbox/netbox/navigation/menu.py +++ b/netbox/netbox/navigation/menu.py @@ -102,7 +102,7 @@ label=_('Connections'), items=( get_model_item('dcim', 'cabl...
lhotse-speech__lhotse-138
Bug: broken import from augmentations Hi I installed the latest pip version of lhotse and I am getting an import error when using the lhotse CLI: Setup: ``` python3.7.0 lhotse==0.2.0 ``` To reproduce, try either from the following lines: ``` lhotse convert-kaldi <data-dir> 16000 <other-data-dir> python -c...
[ { "content": "from .common import AugmentFn\nfrom .torchaudio import *\nfrom .wavaugment import WavAugmenter, is_wav_augment_available\n", "path": "lhotse/augmentation/__init__.py" }, { "content": "# coding=utf-8\nimport os\nfrom pathlib import Path\n\nfrom setuptools import find_packages, setup\n\n...
[ { "content": "from .common import AugmentFn\nfrom .torchaudio import *\nfrom .wavaugment import WavAugmenter, is_wav_augment_available, available_wav_augmentations\n", "path": "lhotse/augmentation/__init__.py" }, { "content": "# coding=utf-8\nimport os\nfrom pathlib import Path\n\nfrom setuptools im...
diff --git a/lhotse/augmentation/__init__.py b/lhotse/augmentation/__init__.py index cb7bea103..cabd9f37b 100644 --- a/lhotse/augmentation/__init__.py +++ b/lhotse/augmentation/__init__.py @@ -1,3 +1,3 @@ from .common import AugmentFn from .torchaudio import * -from .wavaugment import WavAugmenter, is_wav_augment_ava...
sublimelsp__LSP-1623
LSP sometimes confuses autocompletion even in unrelated syntaxes **Describe the bug** Every here and then I find me surprised by ST's mini_auto_completion to commit different content than it previews. See how it shows `true` and commits `terminator` in the following code snippet. ![Animation](https://user-images....
[ { "content": "from .code_actions import actions_manager\nfrom .code_actions import CodeActionsByConfigName\nfrom .completion import LspResolveDocsCommand\nfrom .core.logging import debug\nfrom .core.promise import Promise\nfrom .core.protocol import CodeLens\nfrom .core.protocol import Command\nfrom .core.proto...
[ { "content": "from .code_actions import actions_manager\nfrom .code_actions import CodeActionsByConfigName\nfrom .completion import LspResolveDocsCommand\nfrom .core.logging import debug\nfrom .core.promise import Promise\nfrom .core.protocol import CodeLens\nfrom .core.protocol import Command\nfrom .core.proto...
diff --git a/plugin/documents.py b/plugin/documents.py index 15b54fcf9..7ea5a2fd0 100644 --- a/plugin/documents.py +++ b/plugin/documents.py @@ -639,7 +639,7 @@ def render_highlights_on_main_thread() -> None: # --- textDocument/complete ------------------------------------------------------------------------------...
paperless-ngx__paperless-ngx-2205
[BUG] Filtering is inconsistent: tag exclusion does not apply with search term ### Description Filtering documents is not working as expected in some cases. When filtering for tags, it is possible to include/exclude or exactly match tags. That functionality is lost when using a search term at the same time. I assum...
[ { "content": "import logging\nimport math\nimport os\nfrom contextlib import contextmanager\n\nfrom dateutil.parser import isoparse\nfrom django.conf import settings\nfrom documents.models import Document\nfrom whoosh import classify\nfrom whoosh import highlight\nfrom whoosh import query\nfrom whoosh.fields im...
[ { "content": "import logging\nimport math\nimport os\nfrom contextlib import contextmanager\n\nfrom dateutil.parser import isoparse\nfrom django.conf import settings\nfrom documents.models import Document\nfrom whoosh import classify\nfrom whoosh import highlight\nfrom whoosh import query\nfrom whoosh.fields im...
diff --git a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html b/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.html index 9ce3c8da225..e82d173343a 100644 --- a/src-ui/src/app/components/common/filterable-dropdown/filterable-dropdown.component.ht...
chainer__chainer-6283
test_backprop.py does not pass in debug mode Version: current master 03157f852002dcdcb04e03e6da03315976ce7434 ``` $ CHAINER_DEBUG=1 pytest tests/chainer_tests/test_backprop.py ``` #### Result ``` E AttributeError: 'NoneType' object has no attribute 'dtype' TestFunctionOutputNone_use_chainerx_false__chai...
[ { "content": "import collections\nimport contextlib\nimport heapq\nimport inspect\nimport traceback\nimport weakref\n\nimport numpy\nimport six\n\nimport chainer\nfrom chainer import _backprop_utils\nfrom chainer import backend\nfrom chainer.backends import cuda\nfrom chainer import configuration\nfrom chainer ...
[ { "content": "import collections\nimport contextlib\nimport heapq\nimport inspect\nimport traceback\nimport weakref\n\nimport numpy\nimport six\n\nimport chainer\nfrom chainer import _backprop_utils\nfrom chainer import backend\nfrom chainer.backends import cuda\nfrom chainer import configuration\nfrom chainer ...
diff --git a/chainer/function_node.py b/chainer/function_node.py index 11b1d5b9cfdc..ee7a87a444c0 100644 --- a/chainer/function_node.py +++ b/chainer/function_node.py @@ -339,11 +339,11 @@ def apply(self, inputs): # NaN check of output values if is_debug: - if any(chainer.backend._contain...
pypa__virtualenv-1964
AttributeError: 'NoneType' object has no attribute 'group' with virtualenv 20.0.32 on CygWin **Issue** We are also testing on CygWin (using appveyor), and since this morning, tox fails creating a virtualenv with an AttributeError. Unfortunately, tox does not display the entire traceback, but just the exception. Since...
[ { "content": "from __future__ import absolute_import, unicode_literals\n\nimport os\nimport re\nimport sys\nimport sysconfig\nfrom abc import ABCMeta, abstractmethod\n\nfrom six import add_metaclass\n\nfrom virtualenv.util.six import ensure_text\n\nfrom .activator import Activator\n\nif sys.version_info >= (3, ...
[ { "content": "from __future__ import absolute_import, unicode_literals\n\nimport os\nimport re\nimport sys\nimport sysconfig\nfrom abc import ABCMeta, abstractmethod\n\nfrom six import add_metaclass\n\nfrom virtualenv.util.six import ensure_text\n\nfrom .activator import Activator\n\nif sys.version_info >= (3, ...
diff --git a/docs/changelog/1962.bugfix.rst b/docs/changelog/1962.bugfix.rst new file mode 100644 index 000000000..8dd3eba87 --- /dev/null +++ b/docs/changelog/1962.bugfix.rst @@ -0,0 +1 @@ +Fix Nonetype error in cygwin if POSIX path in dest - by :user:`danyeaw`. diff --git a/src/virtualenv/activation/via_template.py b...
Kinto__kinto-158
Add custom (meta) data on buckets and collections For some use-cases, it might become useful to be able to store some custom attributes in buckets or collections (e.g. metadata like application version, contact email or whatever). Currently both Collection and Bucket resources do not define extra fields in their sche...
[ { "content": "import colander\nimport jsonschema\nfrom cliquet import resource\nfrom jsonschema import exceptions as jsonschema_exceptions\n\nfrom kinto.views import NameGenerator, object_exists_or_404\n\n\nclass JSONSchemaMapping(colander.SchemaNode):\n def schema_type(self, **kw):\n return colander....
[ { "content": "import colander\nimport jsonschema\nfrom cliquet import resource\nfrom jsonschema import exceptions as jsonschema_exceptions\n\nfrom kinto.views import NameGenerator, object_exists_or_404\n\n\nclass JSONSchemaMapping(colander.SchemaNode):\n def schema_type(self, **kw):\n return colander....
diff --git a/kinto/tests/test_views_collections.py b/kinto/tests/test_views_collections.py index c69232d0e..6ea7d2977 100644 --- a/kinto/tests/test_views_collections.py +++ b/kinto/tests/test_views_collections.py @@ -64,6 +64,18 @@ def test_wrong_create_permissions_cannot_be_added_on_collections(self): ...
ipython__ipython-2063
setup fails for python3 with LANG=C since Jörgen was added do release.py python3 fails due to the umlaut on systems with LANG=C ``` $ LANG=C python3.2 setup.py build Traceback (most recent call last): File "setup.py", line 61, in <module> from setupbase import target_update File "/tmp/ipython-ipython-da134db/s...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Release data for the IPython project.\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2008, IPython Development Team.\n# Copyright (c) 2001, Fernando Perez <fernando.perez@colorado.edu>\n# Copyright (c) 2001...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"Release data for the IPython project.\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2008, IPython Development Team.\n# Copyright (c) 2001, Fernando Perez <fernando.perez@colorado.edu>\n# Copyright (c) 2001...
diff --git a/IPython/core/release.py b/IPython/core/release.py index 70656f8f45c..720edc7dc11 100644 --- a/IPython/core/release.py +++ b/IPython/core/release.py @@ -114,7 +114,7 @@ 'Brian' : ('Brian E Granger', 'ellisonbg@gmail.com'), 'Min' : ('Min Ragan-Kelley', 'benjaminrk@gmail.com'),...
mindsdb__lightwood-397
Error when using 'force_disable_cache' in time series task * Lightwood version: staging (post 0.51.0 release) With us_consumption.csv dataset, training fails when using `advanced_args={'force_disable_cache': True}`, we get the following stack trace: ``` ERROR:mindsdb-logger-802183d6-3bdb-11eb-a895-4cedfb644c83--...
[ { "content": "import importlib\nimport inspect\nimport copy\nimport random\nimport string\n\nimport torch\nimport numpy as np\nimport pandas as pd\nfrom torch.utils.data import Dataset\n\nfrom lightwood.mixers.helpers.transformer import Transformer\nfrom lightwood.encoders.time_series.helpers.common import gene...
[ { "content": "import importlib\nimport inspect\nimport copy\nimport random\nimport string\n\nimport torch\nimport numpy as np\nimport pandas as pd\nfrom torch.utils.data import Dataset\n\nfrom lightwood.mixers.helpers.transformer import Transformer\nfrom lightwood.encoders.time_series.helpers.common import gene...
diff --git a/lightwood/api/data_source.py b/lightwood/api/data_source.py index 8a2bc394d..ab371093a 100644 --- a/lightwood/api/data_source.py +++ b/lightwood/api/data_source.py @@ -229,6 +229,9 @@ def __getitem__(self, idx): elif not self.enable_cache: if col_name in self.data_fram...
cornellius-gp__gpytorch-1371
ZeroMean for Batch Independent Multioutput GP I'm following the Batch Independent Multioutput GP example, but instead of using a constant mean, I would like each dimension to use a zero mean (maybe this is a bad idea?). ``` class ZeroMeanIndependentMultitaskGPModel(gpytorch.models.ExactGP): def __init__(self, ...
[ { "content": "#!/usr/bin/env python3\n\nimport torch\n\nfrom .mean import Mean\n\n\nclass ZeroMean(Mean):\n def forward(self, input):\n return torch.zeros(input.shape[:-1], dtype=input.dtype, device=input.device)\n", "path": "gpytorch/means/zero_mean.py" } ]
[ { "content": "#!/usr/bin/env python3\n\nimport torch\n\nfrom ..utils.broadcasting import _mul_broadcast_shape\nfrom .mean import Mean\n\n\nclass ZeroMean(Mean):\n def __init__(self, batch_shape=torch.Size(), **kwargs):\n super(ZeroMean, self).__init__()\n self.batch_shape = batch_shape\n\n d...
diff --git a/gpytorch/means/zero_mean.py b/gpytorch/means/zero_mean.py index 6866a5110..5ce071dfe 100644 --- a/gpytorch/means/zero_mean.py +++ b/gpytorch/means/zero_mean.py @@ -2,9 +2,18 @@ import torch +from ..utils.broadcasting import _mul_broadcast_shape from .mean import Mean class ZeroMean(Mean): + d...
flairNLP__flair-1717
predict(sentence, multi_class_prob=True) in TextClassification no longer works **Describe the bug** predict(sentence, multi_class_prob=True) used to give probabilities for all labels, but now only give out one label and associated probability. I have to revert to earlier commit to produce multiple class probabilitie...
[ { "content": "import logging\nfrom pathlib import Path\nfrom typing import List, Union, Callable, Dict, Optional\n\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data.dataset import Dataset\nfrom tqdm import tqdm\nimport numpy as np\n\nimport sklearn.metrics as metrics\nimport flair.nn\nimport flair.emb...
[ { "content": "import logging\nfrom pathlib import Path\nfrom typing import List, Union, Callable, Dict, Optional\n\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data.dataset import Dataset\nfrom tqdm import tqdm\nimport numpy as np\n\nimport sklearn.metrics as metrics\nimport flair.nn\nimport flair.emb...
diff --git a/flair/models/text_classification_model.py b/flair/models/text_classification_model.py index 98e36dce75..8d568c58c7 100644 --- a/flair/models/text_classification_model.py +++ b/flair/models/text_classification_model.py @@ -231,7 +231,7 @@ def predict( for (sentence, labels) in zip(batch, ...
ibis-project__ibis-4766
feat: support more unsigned integer operations I notice that many operations that I'd expect to work on unsigned integer types, do not. ``` In [2]: import ibis In [6]: import ibis.expr.datatypes as dt In [9]: t = ibis.table([("uint1", dt.uint64), ("uint2", dt.uint64)]) In [10]: t.uint1 - t.uint2 ---------...
[ { "content": "from __future__ import annotations\n\nimport collections\nimport functools\nfrom typing import Any, Iterator\n\nimport pandas as pd\nfrom multipledispatch import Dispatcher\nfrom public import public\n\nimport ibis.expr.datatypes.core as dt\nfrom ibis.common.exceptions import IbisTypeError\n\ncast...
[ { "content": "from __future__ import annotations\n\nimport collections\nimport functools\nfrom typing import Any, Iterator\n\nimport pandas as pd\nfrom multipledispatch import Dispatcher\nfrom public import public\n\nimport ibis.expr.datatypes.core as dt\nfrom ibis.common.exceptions import IbisTypeError\n\ncast...
diff --git a/ibis/backends/pandas/tests/execution/conftest.py b/ibis/backends/pandas/tests/execution/conftest.py index 32ed188181b6..8ca8c43e9f1c 100644 --- a/ibis/backends/pandas/tests/execution/conftest.py +++ b/ibis/backends/pandas/tests/execution/conftest.py @@ -24,6 +24,7 @@ def df(): 'plain_datetimes...
svthalia__concrexit-3685
Sales order admin 400 on filter by exact shift ### Describe the bug See [CONCREXIT-1DV](https://thalia.sentry.io/issues/5217944171/). When filtering like this: <img width="684" alt="image" src="https://github.com/svthalia/concrexit/assets/41264528/b80217b9-aad4-40d0-a591-2ab38cc7d24b"> You get a 400 on e.g. `http...
[ { "content": "from functools import partial\n\nfrom django.contrib import admin, messages\nfrom django.contrib.admin import SimpleListFilter, register\nfrom django.forms import Field\nfrom django.http import HttpRequest\nfrom django.urls import resolve\nfrom django.utils import timezone\nfrom django.utils.trans...
[ { "content": "from functools import partial\n\nfrom django.contrib import admin, messages\nfrom django.contrib.admin import SimpleListFilter, register\nfrom django.forms import Field\nfrom django.http import HttpRequest\nfrom django.urls import resolve\nfrom django.utils import timezone\nfrom django.utils.trans...
diff --git a/website/sales/admin/order_admin.py b/website/sales/admin/order_admin.py index 16b9967e1..767eac854 100644 --- a/website/sales/admin/order_admin.py +++ b/website/sales/admin/order_admin.py @@ -95,6 +95,7 @@ class OrderShiftFilter(AutocompleteFilter): title = _("shift") field_name = "shift" re...
openfun__richie-2035
Cookiecutter bootstrap failure ## Bug Report **Problematic Behavior** The `nightly round` job warns us that there is a problem with cookiecutter template. **Additional context/Screenshots** [Add any other context about the problem here. If applicable, add screenshots to help explain.](https://app.circleci.com/p...
[ { "content": "\"\"\"\n{{cookiecutter.site}} urls\n\"\"\"\nfrom django.conf import settings\nfrom django.conf.urls.i18n import i18n_patterns\nfrom django.contrib import admin\nfrom django.contrib.sitemaps.views import sitemap\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\nfrom django.urls ...
[ { "content": "\"\"\"\n{{cookiecutter.site}} urls\n\"\"\"\nfrom django.conf import settings\nfrom django.conf.urls.i18n import i18n_patterns\nfrom django.contrib import admin\nfrom django.contrib.sitemaps.views import sitemap\nfrom django.contrib.staticfiles.urls import staticfiles_urlpatterns\nfrom django.urls ...
diff --git a/cookiecutter/{{cookiecutter.organization}}-richie-site-factory/env.d/development.dist b/cookiecutter/{{cookiecutter.organization}}-richie-site-factory/env.d/development.dist index cecdc24d0c..eec91ee64c 100644 --- a/cookiecutter/{{cookiecutter.organization}}-richie-site-factory/env.d/development.dist +++ b...
pre-commit__pre-commit-1721
init-templatedir installing hooks to wrong directory I was trying to use the init-templatedir functionality of pre-commit and ran into a weird problem: Using Windows 10, pre-commit 2.9.2, git version 2.29.2.windows.1 I followed the example on the pre-commit.com website and used: ``` git config --global init.tem...
[ { "content": "import logging\nimport os.path\nimport sys\nfrom typing import Dict\nfrom typing import List\nfrom typing import MutableMapping\nfrom typing import Optional\nfrom typing import Set\n\nfrom pre_commit.errors import FatalError\nfrom pre_commit.util import CalledProcessError\nfrom pre_commit.util imp...
[ { "content": "import logging\nimport os.path\nimport sys\nfrom typing import Dict\nfrom typing import List\nfrom typing import MutableMapping\nfrom typing import Optional\nfrom typing import Set\n\nfrom pre_commit.errors import FatalError\nfrom pre_commit.util import CalledProcessError\nfrom pre_commit.util imp...
diff --git a/pre_commit/git.py b/pre_commit/git.py index 8e22dcf0f..156e53d20 100644 --- a/pre_commit/git.py +++ b/pre_commit/git.py @@ -201,7 +201,10 @@ def check_for_cygwin_mismatch() -> None: """See https://github.com/pre-commit/pre-commit/issues/354""" if sys.platform in ('cygwin', 'win32'): # pragma: no...