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
⌀
spack__spack-14928
Specifying more than one operating_system in the same compilers.yaml entry For convenience, I'm using the same configuration files for two Macs that run a different MacOS version (one with Sierra, the other with High Sierra, but apart from that they are identical from spack's point of view: same compilers installed, sa...
[ { "content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom __future__ import print_function\n\nimport argparse\nimport sys\nfrom six import iteritems...
[ { "content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom __future__ import print_function\n\nimport argparse\nimport sys\nfrom six import iteritems...
diff --git a/lib/spack/spack/cmd/compiler.py b/lib/spack/spack/cmd/compiler.py index c9647898ef0f1b..625466f8c7f250 100644 --- a/lib/spack/spack/cmd/compiler.py +++ b/lib/spack/spack/cmd/compiler.py @@ -142,7 +142,7 @@ def compiler_info(args): for flag, flag_value in iteritems(c.flags): ...
optuna__optuna-1680
Use function annotation syntax for Type Hints. After dropping Python 2.7 support at #710, we can define type hints with function annotation syntax. ~~Do you have a plan to update the coding style guideline?~~ https://github.com/optuna/optuna/wiki/Coding-Style-Conventions ## Progress - [x] `optuna/integration/s...
[ { "content": "from optuna.pruners import BasePruner\nfrom optuna import type_checking\n\nif type_checking.TYPE_CHECKING:\n from optuna.study import Study # NOQA\n from optuna.trial import FrozenTrial # NOQA\n\n\nclass NopPruner(BasePruner):\n \"\"\"Pruner which never prunes trials.\n\n Example:\n\...
[ { "content": "import optuna\nfrom optuna.pruners import BasePruner\n\n\nclass NopPruner(BasePruner):\n \"\"\"Pruner which never prunes trials.\n\n Example:\n\n .. testcode::\n\n import numpy as np\n from sklearn.datasets import load_iris\n from sklearn.linear_model ...
diff --git a/optuna/pruners/_nop.py b/optuna/pruners/_nop.py index 86e6e58536..984d3d7248 100644 --- a/optuna/pruners/_nop.py +++ b/optuna/pruners/_nop.py @@ -1,9 +1,5 @@ +import optuna from optuna.pruners import BasePruner -from optuna import type_checking - -if type_checking.TYPE_CHECKING: - from optuna.study imp...
nipy__nipype-954
TraitError with 'transform0DerivedInitialMovingTranslation.mat' not found Hi guys, I'm running antsRegistration on the latest Nipype (Master branch, commit 4d855cb786) using the parameter initial-moving-transform-com, set to 0: antsRegistration --collapse-linear-transforms-to-fixed-image-header 0 --collapse-output-tr...
[ { "content": "\"\"\"The ants module provides basic functions for interfacing with ants functions.\n\n Change directory to provide relative paths for doctests\n >>> import os\n >>> filepath = os.path.dirname( os.path.realpath( __file__ ) )\n >>> datadir = os.path.realpath(os.path.join(filepath, '../../te...
[ { "content": "\"\"\"The ants module provides basic functions for interfacing with ants functions.\n\n Change directory to provide relative paths for doctests\n >>> import os\n >>> filepath = os.path.dirname( os.path.realpath( __file__ ) )\n >>> datadir = os.path.realpath(os.path.join(filepath, '../../te...
diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index ac0b812fc8..e19ecc6120 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -688,7 +688,7 @@ def _list_outputs(self): transformCount, ...
scipy__scipy-20086
BUG: `import scipy._lib._testutils` raises exception in some MacOS contexts ### Describe your issue. I believe SciPy has the same issue that NumPy had some months back, where some MacOS versions fail to parse in the expected way by `packaging.tags`. Perhaps this is an upstream problem, but I saw that NumPy decided to ...
[ { "content": "\"\"\"\nGeneric test utilities.\n\n\"\"\"\n\nimport os\nimport re\nimport sys\nimport numpy as np\nimport inspect\nimport sysconfig\n\n\n__all__ = ['PytestTester', 'check_free_memory', '_TestPythranFunc', 'IS_MUSL']\n\n\nIS_MUSL = False\ntry:\n # Note that packaging is not a dependency, hence w...
[ { "content": "\"\"\"\nGeneric test utilities.\n\n\"\"\"\n\nimport os\nimport re\nimport sys\nimport numpy as np\nimport inspect\nimport sysconfig\n\n\n__all__ = ['PytestTester', 'check_free_memory', '_TestPythranFunc', 'IS_MUSL']\n\n\nIS_MUSL = False\n# alternate way is\n# from packaging.tags import sys_tags\n#...
diff --git a/scipy/_lib/_testutils.py b/scipy/_lib/_testutils.py index f1c0a147f694..69f4f09e01b0 100644 --- a/scipy/_lib/_testutils.py +++ b/scipy/_lib/_testutils.py @@ -15,17 +15,13 @@ IS_MUSL = False -try: - # Note that packaging is not a dependency, hence we need this try-except: - from packaging.tags im...
interlegis__sapl-2147
Audiências Públicas sem possibilidade de Edição Ao criar uma Audiência Pública e salva-la, não aparecem os metadados da matéria legislativa inseridas no preenchimento. Ao clicar em Editar, só aparece o título da audiência criada. grato
[ { "content": "from django.http import HttpResponse\nfrom django.views.decorators.clickjacking import xframe_options_exempt\nfrom django.views.generic import UpdateView\nfrom sapl.crud.base import RP_DETAIL, RP_LIST, Crud\n\nfrom .forms import AudienciaForm\nfrom .models import AudienciaPublica\n\n\ndef index(re...
[ { "content": "from django.http import HttpResponse\nfrom django.views.decorators.clickjacking import xframe_options_exempt\nfrom django.views.generic import UpdateView\nfrom sapl.crud.base import RP_DETAIL, RP_LIST, Crud\n\nfrom .forms import AudienciaForm\nfrom .models import AudienciaPublica\n\n\ndef index(re...
diff --git a/sapl/audiencia/views.py b/sapl/audiencia/views.py index bdfc6993c..c999cf4ff 100644 --- a/sapl/audiencia/views.py +++ b/sapl/audiencia/views.py @@ -34,9 +34,10 @@ class UpdateView(Crud.UpdateView): def get_initial(self): initial = super(UpdateView, self).get_initial() - i...
googleapis__google-cloud-python-2496
Datastore fetch needs to encapsulate all gRPC errors This code: ``` python try: start_date = datetime.datetime(1990, 1, 1) query = client.query(kind='Task') query.add_filter( 'created', '>', start_date) query.add_filter( 'priority', '>', 3) return li...
[ { "content": "# Copyright 2014 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
[ { "content": "# Copyright 2014 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
diff --git a/datastore/google/cloud/datastore/connection.py b/datastore/google/cloud/datastore/connection.py index c2701c218bef..e84457a011ea 100644 --- a/datastore/google/cloud/datastore/connection.py +++ b/datastore/google/cloud/datastore/connection.py @@ -276,7 +276,13 @@ def run_query(self, project, request_pb): ...
MycroftAI__mycroft-core-2985
Add note about legal issues when using gTTS in public or commercial projects originally opened in the OVOS plugin repo > I've just posted an issue about potential legal issues with this API in the gTTS repo: [pndurette/gTTS#309](https://github.com/pndurette/gTTS/issues/309) > > From the plugin description people ...
[ { "content": "# Copyright 2017 Mycroft AI Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli...
[ { "content": "# Copyright 2017 Mycroft AI Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli...
diff --git a/mycroft/tts/google_tts.py b/mycroft/tts/google_tts.py index be755f8786f1..c47c510313b9 100755 --- a/mycroft/tts/google_tts.py +++ b/mycroft/tts/google_tts.py @@ -70,6 +70,13 @@ def __init__(self, lang, config): self._google_lang = None super(GoogleTTS, self).__init__(lang, config, GoogleT...
adfinis__timed-backend-651
Upgrade PostgreSQL to a non EOL version As per 923f8e23f2e1e30fd43d8ee09c6fbb0d18028013 we seem to be using a PostgreSQL version that was EOLed February 13, 2020. We should upgrade to a version that is not EOL, basically all versions >9.4 are still in support. See here for the available versions and their support...
[ { "content": "\"\"\"Models for the employment app.\"\"\"\n\nfrom datetime import date, timedelta\n\nfrom dateutil import rrule\nfrom django.conf import settings\nfrom django.contrib.auth.models import AbstractUser, UserManager\nfrom django.core.validators import MaxValueValidator, MinValueValidator\nfrom django...
[ { "content": "\"\"\"Models for the employment app.\"\"\"\n\nfrom datetime import date, timedelta\n\nfrom dateutil import rrule\nfrom django.conf import settings\nfrom django.contrib.auth.models import AbstractUser, UserManager\nfrom django.core.validators import MaxValueValidator, MinValueValidator\nfrom django...
diff --git a/docker-compose.yml b/docker-compose.yml index 78986949..5e46ca97 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: db: - image: postgres:9.4 + image: postgres:12.4 ports: - 5432:5432 volumes: diff --git a/timed/employment/models.p...
Kinto__kinto-850
Return 400 if a group contains system.Everyone or a group URL Unless I'm mistaken: - We don't support groups for anonymous requests - We don't support recursivity in groups definitions So we should reject with `400` if such groups definitons are created
[ { "content": "import colander\n\nfrom kinto.core import resource, utils\nfrom kinto.core.events import ResourceChanged, ACTIONS\nfrom pyramid.events import subscriber\n\n\nclass GroupSchema(resource.ResourceSchema):\n members = colander.SchemaNode(colander.Sequence(),\n colan...
[ { "content": "import colander\n\nfrom kinto.core import resource, utils\nfrom kinto.core.events import ResourceChanged, ACTIONS\nfrom pyramid.events import subscriber\n\n\ndef validate_member(node, member):\n if member.startswith('/buckets/') or member == 'system.Everyone':\n raise colander.Invalid(no...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d5dd31449..584cefbcc 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,6 +10,7 @@ This document describes changes between each past release. - Make sure we redirect endpoints with trailing slashes with the default bucket plugin. (#848) - Fix group association whe...
geopandas__geopandas-358
Allow 'k' number of classes greater than 9 for choropleth schemes Setting a maximum value of 9 for choropleth schemes is unnecessarily limiting.
[ { "content": "from __future__ import print_function\n\nimport warnings\n\nimport numpy as np\nfrom six import next\nfrom six.moves import xrange\nfrom shapely.geometry import Polygon\n\n\ndef plot_polygon(ax, poly, facecolor='red', edgecolor='black', alpha=0.5, linewidth=1.0, **kwargs):\n \"\"\" Plot a singl...
[ { "content": "from __future__ import print_function\n\nimport warnings\n\nimport numpy as np\nfrom six import next\nfrom six.moves import xrange\nfrom shapely.geometry import Polygon\n\n\ndef plot_polygon(ax, poly, facecolor='red', edgecolor='black', alpha=0.5, linewidth=1.0, **kwargs):\n \"\"\" Plot a singl...
diff --git a/geopandas/plotting.py b/geopandas/plotting.py index 38d404e30e..4174408544 100644 --- a/geopandas/plotting.py +++ b/geopandas/plotting.py @@ -324,10 +324,6 @@ class identifier and the bins. scheme = 'quantiles' warnings.warn('Unrecognized scheme "{0}". Using "Quantiles" ' ...
pypa__pipenv-3843
Symlinks are not resolved properly to check location. https://github.com/pypa/pipenv/blob/237034018a8a2053b0b3b744623ef7f87694fb0e/pipenv/project.py#L50-L54 https://github.com/pypa/pipenv/blob/237034018a8a2053b0b3b744623ef7f87694fb0e/pipenv/environment.py#L508-L519 The path is never resolved if it is an absolute ...
[ { "content": "# -*- coding: utf-8 -*-\nimport base64\nimport fnmatch\nimport glob\nimport hashlib\nimport io\nimport json\nimport operator\nimport os\nimport re\nimport sys\n\nimport six\nimport toml\nimport tomlkit\nimport vistir\n\nfrom first import first\n\nimport pipfile\nimport pipfile.api\n\nfrom .vendor....
[ { "content": "# -*- coding: utf-8 -*-\nimport base64\nimport fnmatch\nimport glob\nimport hashlib\nimport io\nimport json\nimport operator\nimport os\nimport re\nimport sys\n\nimport six\nimport toml\nimport tomlkit\nimport vistir\n\nfrom first import first\n\nimport pipfile\nimport pipfile.api\n\nfrom .vendor....
diff --git a/news/3842.bugfix.rst b/news/3842.bugfix.rst new file mode 100644 index 0000000000..fb21be89de --- /dev/null +++ b/news/3842.bugfix.rst @@ -0,0 +1 @@ +Resolve the symlinks when the path is absolute. diff --git a/pipenv/project.py b/pipenv/project.py index d0d668bfc8..c4b0c9419b 100644 --- a/pipenv/project.p...
ipython__ipython-5252
Not able to connect qtconsole in Windows 8 Hi, I'm using Windows *. I have a fairly recent anaconda installation. But, I cant seem to run the qtconsole from a notebook. I first tried the `%qtconsole` magic from an IPython notebook, but the qtconsole window comes up, but the prompt is not there. I then tried to connect ...
[ { "content": "\"\"\"Utilities to manipulate JSON objects.\n\"\"\"\n#-----------------------------------------------------------------------------\n# Copyright (C) 2010-2011 The IPython Development Team\n#\n# Distributed under the terms of the BSD License. The full license is in\n# the file COPYING.txt, dis...
[ { "content": "\"\"\"Utilities to manipulate JSON objects.\n\"\"\"\n#-----------------------------------------------------------------------------\n# Copyright (C) 2010-2011 The IPython Development Team\n#\n# Distributed under the terms of the BSD License. The full license is in\n# the file COPYING.txt, dis...
diff --git a/IPython/utils/jsonutil.py b/IPython/utils/jsonutil.py index 68630bed933..b16f14d3744 100644 --- a/IPython/utils/jsonutil.py +++ b/IPython/utils/jsonutil.py @@ -36,6 +36,10 @@ ISO8601 = "%Y-%m-%dT%H:%M:%S.%f" ISO8601_PAT=re.compile(r"^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(\.\d{1,6})?Z?([\+\-]\d{2}:?\d{2})...
sunpy__sunpy-4430
Wrong plot in goes hek m25 example <!-- We know asking good questions takes effort, and we appreciate your time. Thank you. Please be aware that everyone has to follow our code of conduct: https://github.com/sunpy/sunpy/blob/master/CODE_OF_CONDUCT.rst Also that these comments are hidden when you submit this gi...
[ { "content": "\"\"\"\n==============================\nFlare times on a GOES XRS plot\n==============================\n\nHow to plot flare times as provided by the HEK on a GOES XRS plot.\n\"\"\"\nimport matplotlib.pyplot as plt\n\nfrom sunpy.net import Fido\nfrom sunpy.net import attrs as a\nfrom sunpy.net impo...
[ { "content": "\"\"\"\n==============================\nFlare times on a GOES XRS plot\n==============================\n\nHow to plot flare times as provided by the HEK on a GOES XRS plot.\n\"\"\"\nimport matplotlib.pyplot as plt\n\nfrom sunpy.net import Fido\nfrom sunpy.net import attrs as a\nfrom sunpy.net impo...
diff --git a/examples/time_series/goes_hek_m25.py b/examples/time_series/goes_hek_m25.py index e7a59ef6ce0..42615f2444b 100644 --- a/examples/time_series/goes_hek_m25.py +++ b/examples/time_series/goes_hek_m25.py @@ -34,9 +34,9 @@ # Lets plot everything together fig, ax = plt.subplots() goes.plot() -ax.axvline(parse...
networkx__networkx-3916
Pajek export assumes Graph node's id attribute to be int castable In pajek export it reads https://github.com/networkx/networkx/blob/b0ca6ce081cc6e66d509c5f7fed60728da821c25/networkx/readwrite/pajek.py#L57 I was wondering, since NetworkX supports arbitrary Python objects as Graph nodes where does the assumption come...
[ { "content": "\"\"\"\n*****\nPajek\n*****\nRead graphs in Pajek format.\n\nThis implementation handles directed and undirected graphs including\nthose with self loops and parallel edges.\n\nFormat\n------\nSee http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm\nfor format information.\n\n\"\"\"\n\nim...
[ { "content": "\"\"\"\n*****\nPajek\n*****\nRead graphs in Pajek format.\n\nThis implementation handles directed and undirected graphs including\nthose with self loops and parallel edges.\n\nFormat\n------\nSee http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm\nfor format information.\n\n\"\"\"\n\nim...
diff --git a/networkx/readwrite/pajek.py b/networkx/readwrite/pajek.py index da2238986b1..0cec872d303 100644 --- a/networkx/readwrite/pajek.py +++ b/networkx/readwrite/pajek.py @@ -54,7 +54,12 @@ def generate_pajek(G): na = G.nodes.get(n, {}).copy() x = na.pop('x', 0.0) y = na.pop('y', 0.0) -...
conda-forge__conda-smithy-1486
conda-smithy doesn't recognise test/script for outputs `conda-build` supports test scripts for outputs in the `test/script` key: https://github.com/conda/conda-build/blob/e458431a7f4becc6d786af6f1a11ee06f64c1513/conda_build/create_test.py#L37-L52 but conda-smithy doesn't recognise this: https://github.com/cond...
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom collections.abc import Sequence, Mapping\n\nstr_type = str\n\nimport copy\nfrom glob import glob\nimport io\nimport itertools\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\n\nimport github\n\nfrom conda_build.metadata import (\n ensure_valid...
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom collections.abc import Sequence, Mapping\n\nstr_type = str\n\nimport copy\nfrom glob import glob\nimport io\nimport itertools\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\n\nimport github\n\nfrom conda_build.metadata import (\n ensure_valid...
diff --git a/conda_smithy/lint_recipe.py b/conda_smithy/lint_recipe.py index f81c266e3..389f04ece 100644 --- a/conda_smithy/lint_recipe.py +++ b/conda_smithy/lint_recipe.py @@ -187,6 +187,8 @@ def lintify(meta, recipe_dir=None, conda_forge=False): test_out = get_section(out, "test", lints) ...
pallets__click-1630
BOOL should accept "on" and "off" The `BOOL` parameter type should accept & convert the strings "on" and "off". With this change, `BOOL` would support all of the boolean strings that `configparser` supports.
[ { "content": "import os\nimport stat\nfrom datetime import datetime\n\nfrom ._compat import _get_argv_encoding\nfrom ._compat import filename_to_ui\nfrom ._compat import get_filesystem_encoding\nfrom ._compat import get_strerror\nfrom ._compat import open_stream\nfrom .exceptions import BadParameter\nfrom .util...
[ { "content": "import os\nimport stat\nfrom datetime import datetime\n\nfrom ._compat import _get_argv_encoding\nfrom ._compat import filename_to_ui\nfrom ._compat import get_filesystem_encoding\nfrom ._compat import get_strerror\nfrom ._compat import open_stream\nfrom .exceptions import BadParameter\nfrom .util...
diff --git a/CHANGES.rst b/CHANGES.rst index cd40f7891..0fce1bc22 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -28,6 +28,7 @@ Unreleased matched name. This makes behavior such as help text and ``Context.invoked_subcommand`` consistent when using patterns like ``AliasedGroup``. :issue:`1422` +- The ``B...
mitmproxy__mitmproxy-1323
[tests actually pass] Remove harextractor example If nobody objects, this PR (temporarily) removes the harextractor example, which depends on harparser, a Python2-only library. It's probably worth the time to rewrite this without any dependencies, but first we want to get a Python 3 release out of the door.
[ { "content": "\"\"\"\n This inline script utilizes harparser.HAR from\n https://github.com/JustusW/harparser to generate a HAR log object.\n\"\"\"\nimport six\nimport sys\nimport pytz\nfrom harparser import HAR\n\nfrom datetime import datetime\n\n\nclass _HARLog(HAR.log):\n # The attributes need to be ...
[ { "content": "\"\"\"\n This inline script utilizes harparser.HAR from\n https://github.com/JustusW/harparser to generate a HAR log object.\n\"\"\"\nimport six\nimport sys\nimport pytz\nfrom harparser import HAR\n\nfrom datetime import datetime\n\n\nclass _HARLog(HAR.log):\n # The attributes need to be ...
diff --git a/examples/har_extractor.py b/examples/har_extractor.py index d6b50c2131..a5c0551921 100644 --- a/examples/har_extractor.py +++ b/examples/har_extractor.py @@ -60,6 +60,12 @@ def start(context): suit your actual needs of HAR generation. As it will probably be necessary to cluster logs by IP...
encode__httpx-2354
httpx is deleting url query parameters that do not explicitly specify a value The following program ```python import asyncio import httpx async def main(): async with httpx.AsyncClient() as client: r = await client.get("https://httpbin.org/get?foobar", params={'hello': "world"}) print(r.url...
[ { "content": "import typing\nfrom urllib.parse import parse_qs, quote, unquote, urlencode\n\nimport idna\nimport rfc3986\nimport rfc3986.exceptions\n\nfrom ._exceptions import InvalidURL\nfrom ._types import PrimitiveData, QueryParamTypes, URLTypes\nfrom ._utils import primitive_value_to_str\n\n\nclass URL:\n ...
[ { "content": "import typing\nfrom urllib.parse import parse_qs, quote, unquote, urlencode\n\nimport idna\nimport rfc3986\nimport rfc3986.exceptions\n\nfrom ._exceptions import InvalidURL\nfrom ._types import PrimitiveData, QueryParamTypes, URLTypes\nfrom ._utils import primitive_value_to_str\n\n\nclass URL:\n ...
diff --git a/httpx/_urls.py b/httpx/_urls.py index cf4df384c1..1211bbba9a 100644 --- a/httpx/_urls.py +++ b/httpx/_urls.py @@ -540,7 +540,7 @@ def __init__( items: typing.Sequence[typing.Tuple[str, PrimitiveData]] if value is None or isinstance(value, (str, bytes)): value = value.decode("...
lmfit__lmfit-py-208
Can't set 0 as upper boundary for parameters Fitting a parameter with a negative value as lower boundary and 0 as the upper boundary fails because of the check if lower and upper boundaries are equal: /usr/local/lib/python3.4/site-packages/lmfit/parameter.py in _getval(self) 369 if self.max < self.min: ...
[ { "content": "\"\"\"\nParameter class\n\"\"\"\nfrom __future__ import division\nfrom numpy import arcsin, cos, sin, sqrt, inf, nan\nimport json\nimport sys\nfrom copy import deepcopy\ntry:\n from collections import OrderedDict\nexcept ImportError:\n from ordereddict import OrderedDict\n\nfrom . import unc...
[ { "content": "\"\"\"\nParameter class\n\"\"\"\nfrom __future__ import division\nfrom numpy import arcsin, cos, sin, sqrt, inf, nan\nimport json\nimport sys\nfrom copy import deepcopy\ntry:\n from collections import OrderedDict\nexcept ImportError:\n from ordereddict import OrderedDict\n\nfrom . import unc...
diff --git a/lmfit/parameter.py b/lmfit/parameter.py index f68553c5f..da922d553 100644 --- a/lmfit/parameter.py +++ b/lmfit/parameter.py @@ -377,9 +377,9 @@ def _getval(self): self.max = inf if self.max < self.min: self.max, self.min = self.min, self.max - if abs((1.0*self.max...
carpentries__amy-1153
Filter workshops by Country Allowing filtering of workshop by Country would be extreemley useful. Filter workshops by Country Allowing filtering of workshop by Country would be extreemley useful.
[ { "content": "import re\n\nimport django_filters\nfrom django.db.models import Q\nfrom django.forms import widgets\nfrom django_countries import Countries\n\nfrom workshops.forms import bootstrap_helper_filter\nfrom workshops.models import (\n Event,\n Organization,\n Person,\n Airport,\n EventRe...
[ { "content": "import re\n\nimport django_filters\nfrom django.db.models import Q\nfrom django.forms import widgets\nfrom django_countries import Countries\n\nfrom workshops.forms import bootstrap_helper_filter\nfrom workshops.models import (\n Event,\n Organization,\n Person,\n Airport,\n EventRe...
diff --git a/workshops/filters.py b/workshops/filters.py index bb31171de..fccf83ef4 100644 --- a/workshops/filters.py +++ b/workshops/filters.py @@ -123,6 +123,8 @@ class EventFilter(AMYFilterSet): choices=(EMPTY_SELECTION, ) + Event.INVOICED_CHOICES, ) + country = AllCountriesFilter() + class M...
holoviz__holoviews-1969
Error when trying to export plot using geoviews tiles with datashader Adding `%%output fig='png' filename='eclipses'` to any of the nyc taxi notebooks (there are several versions of this and the one I'm specifically using is the one included in the scipy 2017 holoviews tutorial) results in the following exception for m...
[ { "content": "\"\"\"\nPublic API for all plotting renderers supported by HoloViews,\nregardless of plotting package or backend.\n\"\"\"\nfrom __future__ import unicode_literals\n\nfrom io import BytesIO\nimport os, base64\nfrom contextlib import contextmanager\n\nimport param\nfrom ..core.io import Exporter\nfr...
[ { "content": "\"\"\"\nPublic API for all plotting renderers supported by HoloViews,\nregardless of plotting package or backend.\n\"\"\"\nfrom __future__ import unicode_literals\n\nfrom io import BytesIO\nimport os, base64\nfrom contextlib import contextmanager\n\nimport param\nfrom ..core.io import Exporter\nfr...
diff --git a/holoviews/plotting/renderer.py b/holoviews/plotting/renderer.py index 2f600e0c63..c59661117c 100644 --- a/holoviews/plotting/renderer.py +++ b/holoviews/plotting/renderer.py @@ -276,6 +276,8 @@ def html(self, obj, fmt=None, css=None, comm=True, **kwargs): html = tag.format(src=src, mime_type=mime_...
aws-powertools__powertools-lambda-python-921
DeprecationWarning for distutils in Python 3.10 (will be removed in Python 3.12) <!--- Provide a general summary of the issue in the Title above --> <!--- How has this issue affected you? What are you trying to accomplish? --> **What were you trying to accomplish?** Run tests utilizing aws-lambda-powertools. ...
[ { "content": "from distutils.util import strtobool\nfrom typing import Any, Optional, Union\n\n\ndef resolve_truthy_env_var_choice(env: str, choice: Optional[bool] = None) -> bool:\n \"\"\"Pick explicit choice over truthy env value, if available, otherwise return truthy env value\n\n NOTE: Environment var...
[ { "content": "from typing import Any, Optional, Union\n\n\ndef strtobool(value):\n value = value.lower()\n if value in (\"y\", \"yes\", \"t\", \"true\", \"on\", \"1\"):\n return 1\n elif value in (\"n\", \"no\", \"f\", \"false\", \"off\", \"0\"):\n return 0\n else:\n raise Value...
diff --git a/aws_lambda_powertools/shared/functions.py b/aws_lambda_powertools/shared/functions.py index 0b117cc32bb..51f55b2cf2f 100644 --- a/aws_lambda_powertools/shared/functions.py +++ b/aws_lambda_powertools/shared/functions.py @@ -1,7 +1,16 @@ -from distutils.util import strtobool from typing import Any, Optiona...
django-cms__django-cms-2422
Live/Draft switch causes 404 If the page hasn't been published yet clicking on the draft/live switch in the cms toolbar causes to load ?edit_off which is a 404. The button maybe should be disabled if the page is not published.
[ { "content": "# -*- coding: utf-8 -*-\nfrom cms.api import get_page_draft\nfrom cms.constants import TEMPLATE_INHERITANCE_MAGIC\nfrom cms.exceptions import LanguageError\nfrom cms.models import Title\nfrom cms.toolbar.items import TemplateItem\nfrom cms.toolbar_base import CMSToolbar\nfrom cms.utils.i18n import...
[ { "content": "# -*- coding: utf-8 -*-\nfrom cms.api import get_page_draft\nfrom cms.constants import TEMPLATE_INHERITANCE_MAGIC\nfrom cms.exceptions import LanguageError\nfrom cms.models import Title\nfrom cms.toolbar.items import TemplateItem\nfrom cms.toolbar_base import CMSToolbar\nfrom cms.utils.i18n import...
diff --git a/cms/cms_toolbar.py b/cms/cms_toolbar.py index ddd947786de..881343f2af9 100644 --- a/cms/cms_toolbar.py +++ b/cms/cms_toolbar.py @@ -178,7 +178,7 @@ def populate(self): self.toolbar.add_button(title, url=publish_url, extra_classes=classes, side=self.toolbar.RIGHT, ...
open-mmlab__mmcv-172
shape check of impad function In this [line](https://github.com/open-mmlab/mmcv/blob/8829ff0dfd9b9c9484cbce17f5cecd1128b61723/mmcv/image/transforms/geometry.py#L182): Instead of `for i in range(len(shape) - 1): assert shape[i] >= img.shape[i]` Should it be `for i in range(len(shape)): assert shape...
[ { "content": "# Copyright (c) Open-MMLab. All rights reserved.\nfrom __future__ import division\n\nimport cv2\nimport numpy as np\n\n\ndef imflip(img, direction='horizontal'):\n \"\"\"Flip an image horizontally or vertically.\n\n Args:\n img (ndarray): Image to be flipped.\n direction (str):...
[ { "content": "# Copyright (c) Open-MMLab. All rights reserved.\nfrom __future__ import division\n\nimport cv2\nimport numpy as np\n\n\ndef imflip(img, direction='horizontal'):\n \"\"\"Flip an image horizontally or vertically.\n\n Args:\n img (ndarray): Image to be flipped.\n direction (str):...
diff --git a/mmcv/image/transforms/geometry.py b/mmcv/image/transforms/geometry.py index 3a9ad59535..409d7f4dc8 100644 --- a/mmcv/image/transforms/geometry.py +++ b/mmcv/image/transforms/geometry.py @@ -180,7 +180,7 @@ def impad(img, shape, pad_val=0): if len(shape) < len(img.shape): shape = shape + (img....
napari__napari-1752
Grid mode auto-zoom should be improved ## 🚀 Feature When using grid view with just two layers, the zoom is set as if I was looking at a 4x4 grid. imho it should be a bit smarter and zoom in further. Here's a small example to reproduce: ``` import numpy as np import napari n = 28 image = np.random.random(...
[ { "content": "import numpy as np\n\nfrom ..utils.events import EmitterGroup, Event\nfrom ..utils.key_bindings import KeymapHandler, KeymapProvider\nfrom ..utils.theme import palettes\nfrom ._viewer_mouse_bindings import dims_scroll\nfrom .add_layers_mixin import AddLayersMixin\nfrom .axes import Axes\nfrom .cam...
[ { "content": "import numpy as np\n\nfrom ..utils.events import EmitterGroup, Event\nfrom ..utils.key_bindings import KeymapHandler, KeymapProvider\nfrom ..utils.theme import palettes\nfrom ._viewer_mouse_bindings import dims_scroll\nfrom .add_layers_mixin import AddLayersMixin\nfrom .axes import Axes\nfrom .cam...
diff --git a/napari/_tests/test_with_screenshot.py b/napari/_tests/test_with_screenshot.py index b533d8984e6..203fbcff029 100644 --- a/napari/_tests/test_with_screenshot.py +++ b/napari/_tests/test_with_screenshot.py @@ -256,7 +256,7 @@ def test_grid_mode(make_test_viewer): # enter grid view viewer.grid_vie...
translate__pootle-5932
IntegrityError: (1062, "Duplicate entry 'xxx-stats' for key > 'pootle_revision_content_type_id_xxx_uniq'") This error has been spotted in the wild. From code review its hard to see how its happening, and i ~~havent~~ managed to reproduce - *by clicking very fast on editor buttons* ~~It may be related to update_st...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport uuid\n\...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport uuid\n\...
diff --git a/pootle/apps/pootle_revision/utils.py b/pootle/apps/pootle_revision/utils.py index 6370183bffb..44ce144adcf 100644 --- a/pootle/apps/pootle_revision/utils.py +++ b/pootle/apps/pootle_revision/utils.py @@ -169,7 +169,10 @@ def create_revisions(self, parents, keys=None): def update(self, keys=None): ...
statsmodels__statsmodels-1023
no bse in robust with norm=TrimmedMean I'm trying out different options for RLM. I don't know what the answer is (non-differentiability ?) ``` hsalta = RLM(endog, exog, M=robust.norms.TrimmedMean()).fit() >>> hsalta.bse Traceback (most recent call last): File "<stdin>", line 1, in <module> File "e:\josef\eclipse...
[ { "content": "import numpy as np\n\n#TODO: add plots to weighting functions for online docs.\n\nclass RobustNorm(object):\n \"\"\"\n The parent class for the norms used for robust regression.\n\n Lays out the methods expected of the robust norms to be used\n by statsmodels.RLM.\n\n Parameters\n ...
[ { "content": "import numpy as np\n\n#TODO: add plots to weighting functions for online docs.\n\nclass RobustNorm(object):\n \"\"\"\n The parent class for the norms used for robust regression.\n\n Lays out the methods expected of the robust norms to be used\n by statsmodels.RLM.\n\n Parameters\n ...
diff --git a/statsmodels/robust/norms.py b/statsmodels/robust/norms.py index b04f5f29a2d..17ca183e1a8 100644 --- a/statsmodels/robust/norms.py +++ b/statsmodels/robust/norms.py @@ -555,7 +555,7 @@ def weights(self, z): test = self._subset(z) return test - def psi_derive(self, z): + def psi_der...
ansible-collections__community.vmware-680
vmware_cluster_info does not provide correct data for enabled_vsan <!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically --> ##### SUMMARY ...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# Copyright: (c) 2018, Ansible Project\n# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# Copyright: (c) 2018, Ansible Project\n# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print...
diff --git a/changelogs/fragments/673-vmware_cluster_info.yml b/changelogs/fragments/673-vmware_cluster_info.yml new file mode 100644 index 0000000000..b1715db9e1 --- /dev/null +++ b/changelogs/fragments/673-vmware_cluster_info.yml @@ -0,0 +1,2 @@ +bugfixes: +- vmware_cluster_info - return VSAN status correctly (https...
chainer__chainer-601
chainer.functions.Parameter cannot accept cupy.ndarray ``` In [1]: import numpy, chainer, cupy In [2]: p = chainer.functions.Parameter(numpy.arange(12, dtype=numpy.float32)) In [3]: p = chainer.functions.Parameter(cupy.arange(12, dtype=numpy.float32)) --------------------------------------------------------------------...
[ { "content": "import numpy\n\nfrom chainer import function\nfrom chainer.utils import type_check\n\n\nclass Parameter(function.Function):\n\n \"\"\"Function that outputs its weight array.\n\n This is a parameterized function that takes no input and returns a variable\n holding a shallow copy of the par...
[ { "content": "import numpy\n\nfrom chainer import cuda\nfrom chainer import function\nfrom chainer.utils import type_check\n\n\nclass Parameter(function.Function):\n\n \"\"\"Function that outputs its weight array.\n\n This is a parameterized function that takes no input and returns a variable\n holding...
diff --git a/chainer/functions/connection/parameter.py b/chainer/functions/connection/parameter.py index 7629d6aa7c30..26623705765a 100644 --- a/chainer/functions/connection/parameter.py +++ b/chainer/functions/connection/parameter.py @@ -1,5 +1,6 @@ import numpy +from chainer import cuda from chainer import functi...
hyperledger__aries-cloudagent-python-2897
Connectionless OOB with attachments results in attribute error As reported by @nodlesh after errors seen in AATH: > Since approximately April 9th the AATH OOB tests have been failing. These tests have credential V1 or V2 or proof V1 or V2 attachments. There is an error that happens on the receiver/holder agent on th...
[ { "content": "\"\"\"Record for out of band invitations.\"\"\"\n\nimport json\nfrom typing import Any, Mapping, Optional, Union\n\nfrom marshmallow import fields, validate\n\nfrom .....connections.models.conn_record import ConnRecord\nfrom .....core.profile import ProfileSession\nfrom .....messaging.decorators.s...
[ { "content": "\"\"\"Record for out of band invitations.\"\"\"\n\nimport json\nfrom typing import Any, Mapping, Optional, Union\n\nfrom marshmallow import fields, validate\n\nfrom .....connections.models.conn_record import ConnRecord\nfrom .....core.profile import ProfileSession\nfrom .....messaging.decorators.s...
diff --git a/aries_cloudagent/protocols/out_of_band/v1_0/models/oob_record.py b/aries_cloudagent/protocols/out_of_band/v1_0/models/oob_record.py index e99201bd4f..d79e226121 100644 --- a/aries_cloudagent/protocols/out_of_band/v1_0/models/oob_record.py +++ b/aries_cloudagent/protocols/out_of_band/v1_0/models/oob_record....
projectmesa__mesa-1869
jupyterviz agent space and measures flash on mesa 2.1.4 **Describe the bug** When I run my simulations on the latest release (v2.1.4), my agent space and charts flicker. **Expected behavior** In mesa 2.1.2 these render smoothly and update without any flickering. **To Reproduce** My code base is here if you wa...
[ { "content": "import sys\nimport threading\n\nimport matplotlib.pyplot as plt\nimport networkx as nx\nimport reacton.ipywidgets as widgets\nimport solara\nfrom matplotlib.figure import Figure\nfrom matplotlib.ticker import MaxNLocator\nfrom solara.alias import rv\n\nimport mesa\n\n# Avoid interactive backend\np...
[ { "content": "import sys\nimport threading\n\nimport matplotlib.pyplot as plt\nimport networkx as nx\nimport reacton.ipywidgets as widgets\nimport solara\nfrom matplotlib.figure import Figure\nfrom matplotlib.ticker import MaxNLocator\nfrom solara.alias import rv\n\nimport mesa\n\n# Avoid interactive backend\np...
diff --git a/mesa/experimental/jupyter_viz.py b/mesa/experimental/jupyter_viz.py index de12a08374e..62515637557 100644 --- a/mesa/experimental/jupyter_viz.py +++ b/mesa/experimental/jupyter_viz.py @@ -60,8 +60,10 @@ def make_model(): def handle_change_model_params(name: str, value: any): set_model_paramet...
open-mmlab__mmdeploy-700
pytorch2onnx fails with mmedit models error with master branch ``` TypeError: forward_dummy() got an unexpected keyword argument 'img_metas' ```
[ { "content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport os.path as osp\nfrom typing import Any, Optional, Union\n\nimport mmcv\nimport torch\n\nfrom mmdeploy.apis.core.pipeline_manager import no_mp\nfrom mmdeploy.utils import (get_backend, get_dynamic_axes, get_input_shape,\n ...
[ { "content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport os.path as osp\nfrom typing import Any, Optional, Union\n\nimport mmcv\nimport torch\n\nfrom mmdeploy.apis.core.pipeline_manager import no_mp\nfrom mmdeploy.utils import (get_backend, get_dynamic_axes, get_input_shape,\n ...
diff --git a/mmdeploy/apis/pytorch2onnx.py b/mmdeploy/apis/pytorch2onnx.py index 104ca487fd..e7bef9d239 100644 --- a/mmdeploy/apis/pytorch2onnx.py +++ b/mmdeploy/apis/pytorch2onnx.py @@ -61,7 +61,11 @@ def torch2onnx(img: Any, torch_model = task_processor.init_pytorch_model(model_checkpoint) data, model_inp...
pallets__werkzeug-1472
Debugger pin calls getuser(), which can fail inside Docker When launching an application with the Werkzeug debugger in Docker with a custom UID, the debugger fails while trying to construct a PIN. ```pytb Traceback (most recent call last): File "/usr/local/bin/flask", line 10, in <module> sys.exit(main()) ...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.debug\n ~~~~~~~~~~~~~~\n\n WSGI application traceback debugger.\n\n :copyright: 2007 Pallets\n :license: BSD-3-Clause\n\"\"\"\nimport getpass\nimport hashlib\nimport json\nimport mimetypes\nimport os\nimport pkgutil\nimport re\nimport sys\n...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.debug\n ~~~~~~~~~~~~~~\n\n WSGI application traceback debugger.\n\n :copyright: 2007 Pallets\n :license: BSD-3-Clause\n\"\"\"\nimport getpass\nimport hashlib\nimport json\nimport mimetypes\nimport os\nimport pkgutil\nimport re\nimport sys\n...
diff --git a/CHANGES.rst b/CHANGES.rst index de7205245..e3207d35a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -92,6 +92,9 @@ Unreleased incorrectly classify some frames. (:pr:`1421`) - Clicking the error message at the top of the interactive debugger will jump down to the bottom of the traceback. (:pr:`1...
Mailu__Mailu-2177
Manage user authentication and permissions Currently no authentication is implemented. Multiple issues will have to be tackled: - complete permission scheme or simple admin role plus admins per domain? - how to store user passwords (shared format between Flask-admin and dovecot)? - how should the initial use be created...
[ { "content": "#!/usr/bin/python3\n\nimport os\nimport logging as log\nimport sys\n\nlog.basicConfig(stream=sys.stderr, level=os.environ.get(\"LOG_LEVEL\", \"INFO\"))\n\nos.system(\"flask mailu advertise\")\nos.system(\"flask db upgrade\")\n\naccount = os.environ.get(\"INITIAL_ADMIN_ACCOUNT\")\ndomain = os.envir...
[ { "content": "#!/usr/bin/python3\n\nimport os\nimport logging as log\nimport sys\n\nlog.basicConfig(stream=sys.stderr, level=os.environ.get(\"LOG_LEVEL\", \"INFO\"))\n\nos.system(\"flask mailu advertise\")\nos.system(\"flask db upgrade\")\n\naccount = os.environ.get(\"INITIAL_ADMIN_ACCOUNT\")\ndomain = os.envir...
diff --git a/core/admin/start.py b/core/admin/start.py index 529f62d66..1964be5f8 100755 --- a/core/admin/start.py +++ b/core/admin/start.py @@ -35,7 +35,7 @@ def test_DNS(): resolver.nameservers=[ns] while True: try: - result = resolver.query('example.org', dns.rdatatype.A...
HypothesisWorks__hypothesis-2601
Reuse up to `max_examples` examples when generation is disabled https://github.com/HypothesisWorks/hypothesis/blob/caccabbd107757ee6e9de1de7e3cff5474d9ccc5/hypothesis-python/src/hypothesis/internal/conjecture/engine.py#L544 No matter how many examples are in the database, we'll use at most 10% of our example budget ...
[ { "content": "# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Most of this work is copyright (C) 2013-2020 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full list of people who ma...
[ { "content": "# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Most of this work is copyright (C) 2013-2020 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full list of people who ma...
diff --git a/AUTHORS.rst b/AUTHORS.rst index d2eba97147..554cbbe216 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -10,6 +10,7 @@ their individual contributions. * `Adam Johnson <https://github.com/adamchainz>`_ * `Adam Sven Johnson <https://www.github.com/pkqk>`_ +* `Afrida Tabassum <https://github.com/oxfordhalfbl...
pyqtgraph__pyqtgraph-309
unexpected 'str' during Arrow test testing on Windows Python 3.4.4/Qt5.5.1/ PyQtgraph github of 20160102, I have thefollowing error on "Arrow" test: ``` Using PyQt5 (default graphics system) Using PyQt5 (default graphics system) Using PyQt5 (default graphics system) Using PyQt5 (default graphics system) Traceback (mo...
[ { "content": "from ..Qt import QtGui, QtCore\nfrom . import ArrowItem\nimport numpy as np\nfrom ..Point import Point\nimport weakref\nfrom .GraphicsObject import GraphicsObject\n\n__all__ = ['CurvePoint', 'CurveArrow']\nclass CurvePoint(GraphicsObject):\n \"\"\"A GraphicsItem that sets its location to a poin...
[ { "content": "from ..Qt import QtGui, QtCore\nfrom . import ArrowItem\nimport numpy as np\nfrom ..Point import Point\nimport weakref\nfrom .GraphicsObject import GraphicsObject\n\n__all__ = ['CurvePoint', 'CurveArrow']\nclass CurvePoint(GraphicsObject):\n \"\"\"A GraphicsItem that sets its location to a poin...
diff --git a/pyqtgraph/graphicsItems/CurvePoint.py b/pyqtgraph/graphicsItems/CurvePoint.py index bb6beebcd1..f7682a4361 100644 --- a/pyqtgraph/graphicsItems/CurvePoint.py +++ b/pyqtgraph/graphicsItems/CurvePoint.py @@ -91,6 +91,11 @@ def paint(self, *args): pass def makeAnimation(self, prop='positio...
ManimCommunity__manim-3003
`Circumscribe` shows shape after animation if `run_time` is passed outside the `Circumscribe` instance and is different than 1 ## Description of bug / unexpected behavior If the `run_time` argument is passed to `Scene.play()` instead of passing it directly to `Circumscribe` AND the run_time is different than 1, the sh...
[ { "content": "\"\"\"Tools for displaying multiple animations at once.\"\"\"\n\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Callable, Sequence\n\nimport numpy as np\n\nfrom manim.mobject.opengl.opengl_mobject import OpenGLGroup\n\nfrom .._config import config\nfrom ..animation.anima...
[ { "content": "\"\"\"Tools for displaying multiple animations at once.\"\"\"\n\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Callable, Sequence\n\nimport numpy as np\n\nfrom manim.mobject.opengl.opengl_mobject import OpenGLGroup\n\nfrom .._config import config\nfrom ..animation.anima...
diff --git a/manim/animation/composition.py b/manim/animation/composition.py index 4c4f1db52a..f3848b6a76 100644 --- a/manim/animation/composition.py +++ b/manim/animation/composition.py @@ -166,7 +166,7 @@ def next_animation(self) -> None: self.update_active_animation(self.active_index + 1) def interpo...
getredash__redash-6561
The 'Create your first Dashboard' newbie link will not dispear even I create dashboards ### Issue Summary The 'Create your first Dashboard' newbie link will not dispear even I create dashboards. Other newbie link works fine. I tried a completely new Redash instance, this issue still exists. I remember there is a com...
[ { "content": "from flask_login import current_user, login_required\n\nfrom redash import models\nfrom redash.authentication import current_org\nfrom redash.handlers import routes\nfrom redash.handlers.base import json_response, org_scoped_rule\n\n\n@routes.route(org_scoped_rule(\"/api/organization/status\"), me...
[ { "content": "from flask_login import current_user, login_required\n\nfrom redash import models\nfrom redash.authentication import current_org\nfrom redash.handlers import routes\nfrom redash.handlers.base import json_response, org_scoped_rule\n\n\n@routes.route(org_scoped_rule(\"/api/organization/status\"), me...
diff --git a/redash/handlers/organization.py b/redash/handlers/organization.py index a4ddab0b60..4fa004f5f6 100644 --- a/redash/handlers/organization.py +++ b/redash/handlers/organization.py @@ -15,7 +15,7 @@ def organization_status(org_slug=None): "data_sources": models.DataSource.all(current_org, group_ids=c...
conan-io__conan-2347
conan doesn't supply -m32/-m64 to CMake in case of MinGW To help us debug your issue please explain: - [x] I've read the [CONTRIBUTING guide](https://raw.githubusercontent.com/conan-io/conan/develop/.github/CONTRIBUTING.md). - [x] I've specified the Conan version, operating system version and any tool that can be r...
[ { "content": "import os\nimport platform\n\nfrom collections import OrderedDict\n\nfrom conans.client import defs_to_string, join_arguments\nfrom conans.client.tools import cross_building\nfrom conans.client.tools.oss import get_cross_building_settings\nfrom conans.errors import ConanException\nfrom conans.mode...
[ { "content": "import os\nimport platform\n\nfrom collections import OrderedDict\n\nfrom conans.client import defs_to_string, join_arguments\nfrom conans.client.tools import cross_building\nfrom conans.client.tools.oss import get_cross_building_settings\nfrom conans.errors import ConanException\nfrom conans.mode...
diff --git a/conans/client/build/cmake.py b/conans/client/build/cmake.py index d55f0fddcb9..d97c5b25550 100644 --- a/conans/client/build/cmake.py +++ b/conans/client/build/cmake.py @@ -260,7 +260,7 @@ def _get_cmake_definitions(self): ret["CONAN_COMPILER_VERSION"] = str(self._compiler_version) #...
HypothesisWorks__hypothesis-3165
Test against Pyjion JIT in CI https://github.com/tonybaloney/Pyjion has recently reached version 1.0, and so I think it would be appropriate to test against it in our CI. Implementation-wise, that means installing *CPython* as usual, then adding `pip install pyjion` and running tests with `pyjion -m pytest ...`. Prob...
[ { "content": "# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Most of this work is copyright (C) 2013-2021 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full list of people who ma...
[ { "content": "# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Most of this work is copyright (C) 2013-2021 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full list of people who ma...
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3f14a101ce..aa26ee7853 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,6 +31,7 @@ jobs: - check-pypy38 - check-py39 - check-py310 + # - check-py310-pyjion # see notes in ...
celery__kombu-676
Test failure with Python 3.6.0 The failures are not present in 3.5.0: ``` =================================== FAILURES =================================== ___________________________ test_Consumer.test_purge ___________________________ self = <t.unit.test_messaging.test_Consumer object at 0xf263c08c> def...
[ { "content": "\"\"\"Sending and receiving messages.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nfrom itertools import count\n\nfrom .common import maybe_declare\nfrom .compression import compress\nfrom .connection import maybe_channel, is_connection\nfrom .entity import Exchange, Queue, m...
[ { "content": "\"\"\"Sending and receiving messages.\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nfrom itertools import count\n\nfrom .common import maybe_declare\nfrom .compression import compress\nfrom .connection import maybe_channel, is_connection\nfrom .entity import Exchange, Queue, m...
diff --git a/kombu/messaging.py b/kombu/messaging.py index 03e7e154a..e1800b521 100644 --- a/kombu/messaging.py +++ b/kombu/messaging.py @@ -397,7 +397,8 @@ def revive(self, channel): """Revive consumer after connection loss.""" self._active_tags.clear() channel = self.channel = maybe_channel...
ManimCommunity__manim-3436
Stroke width is ignored for StreamLines when using a single color ## Description of bug / unexpected behavior The stroke width for StreamLines is ignored if only a single color is used. This is not the case when color schemes are used. ## Expected behavior I would expect StreamLines to obey the `stroke_width` parame...
[ { "content": "\"\"\"Mobjects representing vector fields.\"\"\"\n\nfrom __future__ import annotations\n\n__all__ = [\n \"VectorField\",\n \"ArrowVectorField\",\n \"StreamLines\",\n]\n\nimport itertools as it\nimport random\nfrom math import ceil, floor\nfrom typing import Callable, Iterable, Sequence\n\...
[ { "content": "\"\"\"Mobjects representing vector fields.\"\"\"\n\nfrom __future__ import annotations\n\n__all__ = [\n \"VectorField\",\n \"ArrowVectorField\",\n \"StreamLines\",\n]\n\nimport itertools as it\nimport random\nfrom math import ceil, floor\nfrom typing import Callable, Iterable, Sequence\n\...
diff --git a/manim/mobject/vector_field.py b/manim/mobject/vector_field.py index 67bdd5e6a2..44432bbd23 100644 --- a/manim/mobject/vector_field.py +++ b/manim/mobject/vector_field.py @@ -829,7 +829,9 @@ def outside_box(p): step = max(1, int(len(points) / self.max_anchors_per_line)) line.set_po...
pretix__pretix-3037
Line breaks in location field of ICS file needs to be converted ### Problem and impact When I insert an address with multiple lines in the event location field, the linebreak `\n` in the downloaded ICS file gets ignored by the calendar apps and the address is written without any space. In most apps the location field...
[ { "content": "#\n# This file is part of pretix (Community Edition).\n#\n# Copyright (C) 2014-2020 Raphael Michel and contributors\n# Copyright (C) 2020-2021 rami.io GmbH and contributors\n#\n# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General\n# Pu...
[ { "content": "#\n# This file is part of pretix (Community Edition).\n#\n# Copyright (C) 2014-2020 Raphael Michel and contributors\n# Copyright (C) 2020-2021 rami.io GmbH and contributors\n#\n# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General\n# Pu...
diff --git a/src/pretix/presale/ical.py b/src/pretix/presale/ical.py index cab76414312..464827a656a 100644 --- a/src/pretix/presale/ical.py +++ b/src/pretix/presale/ical.py @@ -57,7 +57,7 @@ def get_public_ical(events): vevent.add('summary').value = str(ev.name) vevent.add('dtstamp').value = creation_...
nf-core__tools-1263
Non-updated lint tip message ## Description of the bug Linting with files applicable for auto-fixing gives the following message: ``` Tip: Some of these linting errors can automatically be resolved with the following command: nf-core lint . --fix files_unchanged ``` However the `.` declaration has bee...
[ { "content": "import rich\nfrom rich.console import Console\nfrom rich.table import Table\nimport logging\n\nimport nf_core.utils\n\nlog = logging.getLogger(__name__)\n\n# Create a console used by all lint tests\nconsole = Console(force_terminal=nf_core.utils.rich_force_colors())\n\n\ndef print_joint_summary(li...
[ { "content": "import rich\nfrom rich.console import Console\nfrom rich.table import Table\nimport logging\n\nimport nf_core.utils\n\nlog = logging.getLogger(__name__)\n\n# Create a console used by all lint tests\nconsole = Console(force_terminal=nf_core.utils.rich_force_colors())\n\n\ndef print_joint_summary(li...
diff --git a/CHANGELOG.md b/CHANGELOG.md index e22884f09c..3c968d89c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ * Changed `questionary` `ask()` to `unsafe_ask()` to not catch `KeyboardInterupts` ([#1237](https://github.com/nf-core/tools/issues/1237)) * Fixed bug in `nf-core launch` due to revisio...
digitalfabrik__integreat-cms-435
Manual creation of Languages results in Bugsplash at page view. ### Describe the Bug If a system is set up manually without the test data. The manual language setup results in a error when opening the list view of the pages. ![grafik](https://user-images.githubusercontent.com/15608678/87561440-fc768b00-c6bc-11ea-8853...
[ { "content": "import logging\n\nfrom django import template\n\nfrom ..models import Language\n\nlogger = logging.getLogger(__name__)\nregister = template.Library()\n\n\n@register.simple_tag\ndef get_translation(instance, language_code):\n return instance.translations.filter(language__code=language_code).firs...
[ { "content": "import logging\n\nfrom django import template\n\nfrom ..models import Language\n\nlogger = logging.getLogger(__name__)\nregister = template.Library()\n\n\n@register.simple_tag\ndef get_translation(instance, language_code):\n return instance.translations.filter(language__code=language_code).firs...
diff --git a/src/cms/locale/de/LC_MESSAGES/django.po b/src/cms/locale/de/LC_MESSAGES/django.po index 7c49cc1060..67798046e3 100644 --- a/src/cms/locale/de/LC_MESSAGES/django.po +++ b/src/cms/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 1.0\n" "Report-Msgid-Bugs-To: \n" -"PO...
cornellius-gp__gpytorch-576
linear kernel breaks when given certain types of active_dims Hey, So the linear kernel will break with some types of given active_dims arguments. I'll lay those out here. ``` import numpy as np import gpytorch import torch torch.set_default_tensor_type('torch.DoubleTensor') X = np.array([range(100*10)]).re...
[ { "content": "#!/usr/bin/env python3\n\nimport torch\n\nfrom .. import settings, beta_features\nfrom ..utils.memoize import cached\nfrom .lazy_tensor import LazyTensor\nfrom .non_lazy_tensor import lazify\n\n\nclass LazyEvaluatedKernelTensor(LazyTensor):\n def _check_args(self, x1, x2, kernel, batch_dims=Non...
[ { "content": "#!/usr/bin/env python3\n\nimport torch\n\nfrom .. import settings, beta_features\nfrom ..utils.memoize import cached\nfrom .lazy_tensor import LazyTensor\nfrom .non_lazy_tensor import lazify\n\n\nclass LazyEvaluatedKernelTensor(LazyTensor):\n def _check_args(self, x1, x2, kernel, batch_dims=Non...
diff --git a/gpytorch/lazy/lazy_evaluated_kernel_tensor.py b/gpytorch/lazy/lazy_evaluated_kernel_tensor.py index d5c611b88..8394e28d0 100644 --- a/gpytorch/lazy/lazy_evaluated_kernel_tensor.py +++ b/gpytorch/lazy/lazy_evaluated_kernel_tensor.py @@ -258,9 +258,12 @@ def evaluate_kernel(self): x2 = self.x2 ...
common-workflow-language__cwltool-653
Second expression in concatenated valueFrom is ignored In the CommandLineTool: ```yaml cwlVersion: v1.0 requirements: - class: InlineJavascriptRequirement inputs: - id: parameter inputBinding: valueFrom: $("a ")$("string") type: string? outputs: [] class: CommandLineTool baseCommand: echo ...
[ { "content": "from __future__ import absolute_import\nimport copy\nimport json\nimport logging\nimport re\nfrom typing import Any, AnyStr, Dict, List, Text, Union\nfrom .utils import docker_windows_path_adjust\nimport six\nfrom six import u\n\nfrom . import sandboxjs\nfrom .errors import WorkflowException\nfrom...
[ { "content": "from __future__ import absolute_import\nimport copy\nimport json\nimport logging\nimport re\nfrom typing import Any, AnyStr, Dict, List, Text, Union\nfrom .utils import docker_windows_path_adjust\nimport six\nfrom six import u\n\nfrom . import sandboxjs\nfrom .errors import WorkflowException\nfrom...
diff --git a/cwltool/expression.py b/cwltool/expression.py index 19606ba8e..e16b9a492 100644 --- a/cwltool/expression.py +++ b/cwltool/expression.py @@ -185,7 +185,7 @@ def interpolate(scan, rootvars, e = evaluator(scan[w[0] + 1:w[1]], jslib, rootvars, fullJS=fullJS, timeout=time...
ESMCI__cime-4418
Issue running short-term archiver when 'ncdump' is not in the PATH This is a minor one, and an easy fix, I think, but if people more familiar with CIME want to offer guidance on whether a warning is adequate here, or an error is preferred, I'm all ears. In short, if you run the short-term archiver and 'ncdump' isn't...
[ { "content": "\"\"\"\nshort term archiving\ncase_st_archive, restore_from_archive, archive_last_restarts\nare members of class Case from file case.py\n\"\"\"\n\nimport shutil, glob, re, os\n\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.utils import (\n run_and_log_case_status,\n ls_sorted_by_m...
[ { "content": "\"\"\"\nshort term archiving\ncase_st_archive, restore_from_archive, archive_last_restarts\nare members of class Case from file case.py\n\"\"\"\n\nimport shutil, glob, re, os\n\nfrom CIME.XML.standard_module_setup import *\nfrom CIME.utils import (\n run_and_log_case_status,\n ls_sorted_by_m...
diff --git a/CIME/case/case_st_archive.py b/CIME/case/case_st_archive.py index 64005b13d09..7ff0773c9b0 100644 --- a/CIME/case/case_st_archive.py +++ b/CIME/case/case_st_archive.py @@ -364,8 +364,10 @@ def get_histfiles_for_restarts( histfiles = set() rest_hist_varname = archive.get_entry_value("rest_history_...
netbox-community__netbox-1925
Exception when creating a new interface via API with VLANs assigned ### Issue type [ ] Feature request <!-- An enhancement of existing functionality --> [x] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the documentation --> ### Environment * Python version:...
[ { "content": "from __future__ import unicode_literals\n\nfrom collections import OrderedDict\n\nfrom rest_framework import serializers\nfrom rest_framework.validators import UniqueTogetherValidator\n\nfrom circuits.models import Circuit, CircuitTermination\nfrom dcim.constants import (\n CONNECTION_STATUS_CH...
[ { "content": "from __future__ import unicode_literals\n\nfrom collections import OrderedDict\n\nfrom rest_framework import serializers\nfrom rest_framework.validators import UniqueTogetherValidator\n\nfrom circuits.models import Circuit, CircuitTermination\nfrom dcim.constants import (\n CONNECTION_STATUS_CH...
diff --git a/netbox/dcim/api/serializers.py b/netbox/dcim/api/serializers.py index ea87c409803..d458bc64632 100644 --- a/netbox/dcim/api/serializers.py +++ b/netbox/dcim/api/serializers.py @@ -743,7 +743,7 @@ def validate(self, data): if vlan.site not in [device.site, None]: raise serializ...
pytorch__vision-2081
Need to put `norm_layer` as a parameter. https://github.com/pytorch/vision/blob/684f48db4e6f619389da3a6957b3edebf794ae79/torchvision/models/detection/backbone_utils.py#L47 It works fine with resnet50_fpn, but when I try to use another backbone, for example `resnext101_32x8d` `norm_layer=misc_nn_ops.FrozenBatchNor...
[ { "content": "from collections import OrderedDict\nfrom torch import nn\nfrom torchvision.ops.feature_pyramid_network import FeaturePyramidNetwork, LastLevelMaxPool\n\nfrom torchvision.ops import misc as misc_nn_ops\nfrom .._utils import IntermediateLayerGetter\nfrom .. import resnet\n\n\nclass BackboneWithFPN(...
[ { "content": "from collections import OrderedDict\nfrom torch import nn\nfrom torchvision.ops.feature_pyramid_network import FeaturePyramidNetwork, LastLevelMaxPool\n\nfrom torchvision.ops import misc as misc_nn_ops\nfrom .._utils import IntermediateLayerGetter\nfrom .. import resnet\n\n\nclass BackboneWithFPN(...
diff --git a/torchvision/models/detection/backbone_utils.py b/torchvision/models/detection/backbone_utils.py index f5335c451d9..a64e44df6d6 100644 --- a/torchvision/models/detection/backbone_utils.py +++ b/torchvision/models/detection/backbone_utils.py @@ -41,10 +41,10 @@ def forward(self, x): return x -de...
translate__translate-3709
YAML serialization raises an exception when a node disappears https://github.com/translate/translate/blob/e5d4d38fbcc7fb310683e7b12f9ae7deab9d7788/translate/storage/yaml.py#L142 ```Exception Value: 'str' object does not support item assignment``` In my case (through weblate), the existing file has: ``` it: b...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2016 Michal Čihař\n#\n# This file is part of the Translate Toolkit.\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 ver...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2016 Michal Čihař\n#\n# This file is part of the Translate Toolkit.\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 ver...
diff --git a/translate/storage/test_yaml.py b/translate/storage/test_yaml.py index afbf0e38a6..868a910370 100644 --- a/translate/storage/test_yaml.py +++ b/translate/storage/test_yaml.py @@ -323,6 +323,20 @@ def test_abbreviated_dictionary(self): assert out.getvalue() == '''martin: {name: Martin D'vloper, job:...
fedora-infra__bodhi-4825
bodhi-client doesn't gracefully handle Ctrl+C when asking for an auth token This was reported [here](https://bugzilla.redhat.com/show_bug.cgi?id=2102585): ``` $ fedora-easy-karma Logging into Bodhi... Authenticating... Please open your browser to: https://id.fedoraproject.org/openidc/Authorization?... Paste he...
[ { "content": "\"\"\"A generic OIDC client that can use OOB or not.\"\"\"\nfrom functools import partial\nfrom http.server import BaseHTTPRequestHandler, HTTPServer\nimport json\nimport os\nimport re\nimport threading\n\nfrom authlib.integrations.base_client.errors import OAuthError\nfrom authlib.integrations.re...
[ { "content": "\"\"\"A generic OIDC client that can use OOB or not.\"\"\"\nfrom functools import partial\nfrom http.server import BaseHTTPRequestHandler, HTTPServer\nimport json\nimport os\nimport re\nimport threading\n\nfrom authlib.integrations.base_client.errors import OAuthError\nfrom authlib.integrations.re...
diff --git a/bodhi-client/bodhi/client/oidcclient.py b/bodhi-client/bodhi/client/oidcclient.py index 336a7574e4..a0f90f008a 100644 --- a/bodhi-client/bodhi/client/oidcclient.py +++ b/bodhi-client/bodhi/client/oidcclient.py @@ -169,8 +169,10 @@ def login_with_browser(self, uri): ), ...
NVIDIA__NVFlare-1850
[BUG] AdminAPI not passing SNI when connecting to the nvflare-server **Describe the bug** In our setup with NVFlare we noticed that at some case admin shell wouldn't be able to connect to server, even though the client running in same exact environment / network would be able to connect to our server. After some deb...
[ { "content": "# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2....
[ { "content": "# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2....
diff --git a/nvflare/fuel/hci/client/api.py b/nvflare/fuel/hci/client/api.py index b7852b39ae..557586a982 100644 --- a/nvflare/fuel/hci/client/api.py +++ b/nvflare/fuel/hci/client/api.py @@ -739,7 +739,7 @@ def _try_command(self, cmd_ctx: CommandContext): ssl_ctx.load_cert_chain(certfile=self.client_ce...
mne-tools__mne-python-10894
update path handling in examples/preprocessing/otp.py all of our `data_path` functions now return `pathlib.Path` objects, which allows things like the following: https://github.com/mne-tools/mne-python/blob/37a9e5587443109515a85cdc4396af4e014ecf82/examples/datasets/brainstorm_data.py#L32-L35 Compare this to the o...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n.. _ex-otp:\n\n===========================================================\nPlot sensor denoising using oversampled temporal projection\n===========================================================\n\nThis demonstrates denoising using the OTP algorithm :footcite:`La...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n.. _ex-otp:\n\n===========================================================\nPlot sensor denoising using oversampled temporal projection\n===========================================================\n\nThis demonstrates denoising using the OTP algorithm :footcite:`La...
diff --git a/examples/preprocessing/otp.py b/examples/preprocessing/otp.py index bec12d6e005..e2bf81f7480 100644 --- a/examples/preprocessing/otp.py +++ b/examples/preprocessing/otp.py @@ -15,7 +15,6 @@ # %% -import os.path as op import mne import numpy as np @@ -34,8 +33,7 @@ dipole_number = 1 data_path =...
nipy__nipype-3571
optmization_schema error in GTMPVC - petsurfer interface ### Summary Input and output relation for optimization_schema (input) does not match 'opt' in output in the GTMPVC class in the petsurfer interface. ### Actual behavior Traceback: if self.inputs.opt: AttributeError: 'GTMPVCInputSpec' object has no...
[ { "content": "# -*- coding: utf-8 -*-\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"Provides interfaces to various commands for running PET analyses provided by FreeSurfer\n\"\"\"\n\nimport os\n\nfrom ... import logging\nfrom ..base im...
[ { "content": "# -*- coding: utf-8 -*-\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"Provides interfaces to various commands for running PET analyses provided by FreeSurfer\n\"\"\"\n\nimport os\n\nfrom ... import logging\nfrom ..base im...
diff --git a/nipype/interfaces/freesurfer/petsurfer.py b/nipype/interfaces/freesurfer/petsurfer.py index 33602d2711..272cba6e21 100644 --- a/nipype/interfaces/freesurfer/petsurfer.py +++ b/nipype/interfaces/freesurfer/petsurfer.py @@ -557,7 +557,7 @@ def _list_outputs(self): outputs["rbv"] = os.path.join(p...
edgedb__edgedb-6005
Creating deep nested type gives error `could not serialize result in worker subprocess` <!-- Please search existing issues to avoid creating duplicates. --> - EdgeDB Version: EdgeDB CLI 2.2.0+35980b5 EdgeDB Instance "version": "2.6+db69671", - OS Version: MacOS 12.6 (21G115) The schema has some types connect...
[ { "content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2008-present MagicStack Inc. and the EdgeDB 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...
[ { "content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2008-present MagicStack Inc. and the EdgeDB 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...
diff --git a/edb/graphql/extension.pyx b/edb/graphql/extension.pyx index 3551b6c53ab..7f9cc965a5a 100644 --- a/edb/graphql/extension.pyx +++ b/edb/graphql/extension.pyx @@ -176,28 +176,20 @@ async def handle_request( if debug.flags.server: markup.dump(ex) - ex_type = type(ex) - if ...
DjangoGirls__djangogirls-699
TinyMCE - Unable to switch to "Source Code" from the toolbar ![image (1)](https://user-images.githubusercontent.com/52964908/133939364-2948df45-03d4-42be-8c35-d440bf93d25e.png) I would like to edit the HTML code directly for our website contents (Django Girls Antananarivo workshop), but it doesn't have that option ev...
[ { "content": "from django import forms\nfrom tinymce.widgets import AdminTinyMCE\n\n\nclass EventPageContentForm(forms.ModelForm):\n\n class Meta:\n widgets = {\n 'content': AdminTinyMCE()\n }\n fields = (\n 'event',\n 'name',\n 'content',\n ...
[ { "content": "import tinymce\n\nfrom django import forms\nfrom tinymce.widgets import AdminTinyMCE\n\n\nclass EventPageContentForm(forms.ModelForm):\n\n class Meta:\n widgets = {\n 'content': AdminTinyMCE(\n mce_attrs={\n 'plugins': tinymce.settings.DEFAULT...
diff --git a/core/admin/forms/event_page_content.py b/core/admin/forms/event_page_content.py index c01fe627a..31c92efe1 100644 --- a/core/admin/forms/event_page_content.py +++ b/core/admin/forms/event_page_content.py @@ -1,3 +1,5 @@ +import tinymce + from django import forms from tinymce.widgets import AdminTinyMCE ...
vllm-project__vllm-4159
[Bug]: LLM is not getting loaded on multiple GPUs but works fine on a single GPU ### Your current environment ``` PyTorch version: 2.1.2 Is debug build: False CUDA used to build PyTorch: 12.1 ROCM used to build PyTorch: N/A OS: Ubuntu 20.04.6 LTS (x86_64) GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 Cla...
[ { "content": "from contextlib import contextmanager\nfrom typing import Optional\n\nimport torch\nimport torch.distributed as dist\n\nfrom vllm.logger import init_logger\n\ntry:\n import pynvml\n\n from vllm._C import custom_ar\nexcept ImportError:\n # For AMD GPUs\n custom_ar = None\n pynvml = N...
[ { "content": "from contextlib import contextmanager\nfrom typing import Optional\n\nimport torch\nimport torch.distributed as dist\n\nfrom vllm.logger import init_logger\n\ntry:\n import pynvml\n\n from vllm._C import custom_ar\nexcept ImportError:\n # For AMD GPUs\n custom_ar = None\n pynvml = N...
diff --git a/vllm/distributed/device_communicators/custom_all_reduce.py b/vllm/distributed/device_communicators/custom_all_reduce.py index f83caef879d..7602897d3dd 100644 --- a/vllm/distributed/device_communicators/custom_all_reduce.py +++ b/vllm/distributed/device_communicators/custom_all_reduce.py @@ -145,8 +145,10 @...
liqd__adhocracy4-1528
project duplicate functionality with image **URL:** https://meinberlin-dev.liqd.net/dashboard/projects/fake-project-799/basic/ **user:** moderator/ initiator/admin/ **expected behaviour:** When a project is duplicated, images of the new (duplicated) project are saved correctly **behaviour:** *Duplicated new project'...
[ { "content": "from copy import deepcopy\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.shortcuts import get_object_or_404\nfrom django.shortcuts import redirect\nfrom django.urls import NoRe...
[ { "content": "from copy import deepcopy\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.shortcuts import get_object_or_404\nfrom django.shortcuts import redirect\nfrom django.urls import NoRe...
diff --git a/adhocracy4/dashboard/mixins.py b/adhocracy4/dashboard/mixins.py index fc16faa9d..8d6c4819b 100644 --- a/adhocracy4/dashboard/mixins.py +++ b/adhocracy4/dashboard/mixins.py @@ -167,12 +167,6 @@ def post(self, request, *args, **kwargs): project_clone = deepcopy(project) project_cl...
mitmproxy__mitmproxy-610
"Cannot copy binary data to clipboard." when attempting to copy JSON response to clipboard To replicate, make the following request: ``` GET /rest/v3/showtimelist?count=1&date=2015-06-03&format=json&mediafmt=mp4&page=1&partner=20078C967592&profile=large&theaters=W7514&sed=20150603&sig=uxFJEEPP7SFVgS1pV5NkGbUgsTQ= HTTP...
[ { "content": "from __future__ import absolute_import\n\nimport urwid\nimport urwid.util\nimport os\n\nfrom .. import utils\nfrom ..protocol.http import CONTENT_MISSING, decoded\nfrom . import signals\nimport netlib.utils\n\ntry:\n import pyperclip\nexcept:\n pyperclip = False\n\n\nVIEW_FLOW_REQUEST = 0\nV...
[ { "content": "from __future__ import absolute_import\n\nimport urwid\nimport urwid.util\nimport os\n\nfrom .. import utils\nfrom ..protocol.http import CONTENT_MISSING, decoded\nfrom . import signals\nimport netlib.utils\n\ntry:\n import pyperclip\nexcept:\n pyperclip = False\n\n\nVIEW_FLOW_REQUEST = 0\nV...
diff --git a/libmproxy/console/common.py b/libmproxy/console/common.py index 57d4c994d4..e5bebf7f27 100644 --- a/libmproxy/console/common.py +++ b/libmproxy/console/common.py @@ -284,8 +284,16 @@ def copy_flow(part, scope, flow, master, state): signals.status_message.send(message="No contents to copy.") ...
huggingface__transformers-6717
Huggingface create_optimizer method not working ## Environment info - `transformers` version: 3.0.2 - Platform: Windows-10-10.0.18362-SP0 - Python version: 3.6.6 - PyTorch version (GPU?): 1.5.0+cpu (False) - Tensorflow version (GPU?): 2.2.0 (False) - Using GPU in script?: No - Using distributed or paralle...
[ { "content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\...
[ { "content": "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\...
diff --git a/src/transformers/optimization_tf.py b/src/transformers/optimization_tf.py index 7043bcdf1f3e..610a7b23bbce 100644 --- a/src/transformers/optimization_tf.py +++ b/src/transformers/optimization_tf.py @@ -221,9 +221,9 @@ def _decay_weights_op(self, var, learning_rate, apply_state): ) ret...
Cog-Creators__Red-DiscordBot-2576
"Failed to install libraries" message outputs a raw list # Command bugs <!-- Did you find a bug with a command? Fill out the following: --> #### Command name `[p]cog install` #### What cog is this command from? Downloader #### What were you expecting to happen? A nice pretty output from the "Fai...
[ { "content": "import asyncio\nimport contextlib\nimport os\nimport shutil\nimport sys\nfrom pathlib import Path\nfrom sys import path as syspath\nfrom typing import Tuple, Union, Iterable\n\nimport discord\nfrom redbot.core import checks, commands, Config\nfrom redbot.core.bot import Red\nfrom redbot.core.data_...
[ { "content": "import asyncio\nimport contextlib\nimport os\nimport shutil\nimport sys\nfrom pathlib import Path\nfrom sys import path as syspath\nfrom typing import Tuple, Union, Iterable\n\nimport discord\nfrom redbot.core import checks, commands, Config\nfrom redbot.core.bot import Red\nfrom redbot.core.data_...
diff --git a/redbot/cogs/downloader/downloader.py b/redbot/cogs/downloader/downloader.py index 354020f38b7..aad81a0079c 100644 --- a/redbot/cogs/downloader/downloader.py +++ b/redbot/cogs/downloader/downloader.py @@ -305,10 +305,11 @@ async def _cog_install(self, ctx, repo: Repo, cog_name: str): return ...
getredash__redash-3423
Widget turns into a textbox when a visualization is removed Current behavior: when deleting a visualization in use in some dashboard, the widget using it turns into a text box. Expected behavior: the widget should be removed. Bonus behavior: warn the user if the visualization is currently in use before deleting.
[ { "content": "import cStringIO\nimport csv\nimport datetime\nimport calendar\nimport logging\nimport time\nimport pytz\n\nimport xlsxwriter\nfrom six import python_2_unicode_compatible, text_type\nfrom sqlalchemy import distinct, or_, and_, UniqueConstraint\nfrom sqlalchemy.dialects import postgresql\nfrom sqla...
[ { "content": "import cStringIO\nimport csv\nimport datetime\nimport calendar\nimport logging\nimport time\nimport pytz\n\nimport xlsxwriter\nfrom six import python_2_unicode_compatible, text_type\nfrom sqlalchemy import distinct, or_, and_, UniqueConstraint\nfrom sqlalchemy.dialects import postgresql\nfrom sqla...
diff --git a/redash/models/__init__.py b/redash/models/__init__.py index 69af5fcf44..032b0782a2 100644 --- a/redash/models/__init__.py +++ b/redash/models/__init__.py @@ -922,7 +922,7 @@ def copy(self): class Widget(TimestampMixin, BelongsToOrgMixin, db.Model): id = Column(db.Integer, primary_key=True) visua...
quantumlib__Cirq-3165
Factoring 21 using Shor algorithm allocates 1TB unitary **Description of the issue** An attempt to factor 21 using cirq's [Shor algorithm example](https://github.com/quantumlib/Cirq/blob/master/examples/shor.py) attempts to allocate 1TB unitary. **How to reproduce the issue** As shown by the description of the...
[ { "content": "# Copyright 2019 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ { "content": "# Copyright 2019 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
diff --git a/cirq/sim/clifford/clifford_simulator.py b/cirq/sim/clifford/clifford_simulator.py index 2e901985e93..d46b4aa98ab 100644 --- a/cirq/sim/clifford/clifford_simulator.py +++ b/cirq/sim/clifford/clifford_simulator.py @@ -66,9 +66,9 @@ def is_supported_operation(op: 'cirq.Operation') -> bool: if isinsta...
rucio__rucio-1908
Wrong cms RSE name pattern used when attaching dids Motivation ---------- in lib/rucio/common/schema/cms.py the RSE Name pattern is `^T[0-3]_[A-Z]{2}((_[A-Za-z0-9]+)+)$` while the pattern for the rse property of ATTACHMENT is `^([A-Z0-9]+([_-][A-Z0-9]+)*)$` as a result when we add replicas to a CMS RSE w...
[ { "content": "'''\n Copyright European Organization for Nuclear Research (CERN)\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 http://www.apache.org/licenses/LICENSE-2.0\n\n...
[ { "content": "'''\n Copyright European Organization for Nuclear Research (CERN)\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 http://www.apache.org/licenses/LICENSE-2.0\n\n...
diff --git a/lib/rucio/common/schema/cms.py b/lib/rucio/common/schema/cms.py index 7e69e67732..8739d789ea 100644 --- a/lib/rucio/common/schema/cms.py +++ b/lib/rucio/common/schema/cms.py @@ -269,7 +269,7 @@ "name": NAME, "rse": {"description": "RSE name", ...
horovod__horovod-2039
Running horovod.spark.run with env=os.environ fails Example: horovod.spark.run(fn, num_proc=2, env=os.environ) That `env` is an object, not a dictionary. It cannot be pickled: ``` Traceback (most recent call last): File "horovod/run/common/util/tiny_shell_exec.py", line 32, in execute exit_code = ...
[ { "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/run/mpi_run.py b/horovod/run/mpi_run.py index 06fd92a03d..9dbfc5a7d0 100644 --- a/horovod/run/mpi_run.py +++ b/horovod/run/mpi_run.py @@ -134,6 +134,10 @@ def mpi_run(settings, nics, env, command, stdout=None, stderr=None): stderr: Stderr of the mpi process. Only used when...
open-telemetry__opentelemetry-python-964
Add HTTP user-agent to WSGI instrumentation As discussed for ASGI in [#716 (comment)](https://github.com/open-telemetry/opentelemetry-python/pull/716/files#r428364828), the WSGI instrumentation should also set an attribute from the user-agent in a HTTP request.
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ { "content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
diff --git a/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py b/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py index 8a2d0bec085..289016fe529 100644 --- a/instrumentation/opentelemetry-instrumentation-wsgi/src/op...
openstates__openstates-scrapers-2199
MD failing since at least 2018-03-10 MD has been failing since 2018-03-10 Based on automated runs it appears that MD has not run successfully in 2 days (2018-03-10). ``` 00:45:30 INFO scrapelib: GET - http://mgaleg.maryland.gov/webmga/frmMain.aspx?id=HB1807&stab=01&pid=billpage&tab=subject3&ys=2018rs 00:45:31 INFO...
[ { "content": "import re\nimport datetime\n\nimport lxml.html\nfrom pupa.scrape import Scraper, Bill, VoteEvent\n\nfrom pupa.utils.generic import convert_pdf\n\nCHAMBERS = {\n 'upper': ('SB', 'SJ'),\n 'lower': ('HB', 'HJ'),\n}\n\nclassifiers = {\n r'Committee Amendment .+? Adopted': 'amendment-passage',...
[ { "content": "import re\nimport datetime\n\nimport lxml.html\nfrom pupa.scrape import Scraper, Bill, VoteEvent\n\nfrom pupa.utils.generic import convert_pdf\n\nCHAMBERS = {\n 'upper': ('SB', 'SJ'),\n 'lower': ('HB', 'HJ'),\n}\n\nclassifiers = {\n r'Committee Amendment .+? Adopted': 'amendment-passage',...
diff --git a/openstates/md/bills.py b/openstates/md/bills.py index efe6382ab1..95686f277a 100644 --- a/openstates/md/bills.py +++ b/openstates/md/bills.py @@ -218,7 +218,8 @@ def parse_vote_pdf(self, vote_url, bill): passed = vote_counts[0] > vote_counts[1] motion = re.split(r'\s{2,}', lines[page_in...
apache__airflow-33404
Fix lost runs in `CronTriggerTimetable` closes: #27399 Fix lost runs in `CronTriggerTimetable` by resetting seconds and microseconds in `start_time_candidates`. <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this wo...
[ { "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n...
[ { "content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n...
diff --git a/airflow/timetables/trigger.py b/airflow/timetables/trigger.py index 7807542da5a63..e5c5b7c15304a 100644 --- a/airflow/timetables/trigger.py +++ b/airflow/timetables/trigger.py @@ -89,7 +89,7 @@ def next_dagrun_info( else: next_start_time = self._align_to_next(restriction.earli...
armada-ths__ais-873
Production settings crashes Output from AWS: ``` 5/22/2023, 9:26:58 PM GMT+2 | return self._call_chain(*args) | web -- | -- | -- 5/22/2023, 9:26:58 PM GMT+2 | File "/usr/local/lib/python3.10/urllib/request.py", line 496, in _call_chain | web 5/22/2023, 9:26:58 PM GMT+2 | result = func(*args) | web 5/22/2023, 9:...
[ { "content": "\"\"\"\nThis is the settings file containing settings common to both the\ndevelopment and production environments.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.co...
[ { "content": "\"\"\"\nThis is the settings file containing settings common to both the\ndevelopment and production environments.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.co...
diff --git a/ais/common/settings.py b/ais/common/settings.py index bb11d0fc5..b17407911 100644 --- a/ais/common/settings.py +++ b/ais/common/settings.py @@ -19,6 +19,7 @@ INSTALLED_APPS = ( "whitenoise.runserver_nostatic", + "ebhealthcheck.apps.EBHealthCheckConfig", "django.contrib.admin", "django....
django-json-api__django-rest-framework-json-api-362
Demo site 500 Following links on demo site return Server Error 500: [http://json-api.jerel.co/](http://json-api.jerel.co/) ``` "blogs": "http://json-api.jerel.co/blogs", "entries": "http://json-api.jerel.co/entries", ``` Note other links work: ``` "authors": "http://json-api.jerel.c...
[ { "content": "import inflection\nfrom django.db.models.query import QuerySet\nfrom django.utils import six\nfrom django.utils.translation import ugettext_lazy as _\nfrom rest_framework.exceptions import ParseError\nfrom rest_framework.serializers import * # noqa: F403\n\nfrom rest_framework_json_api.exceptions...
[ { "content": "import inflection\nfrom django.db.models.query import QuerySet\nfrom django.utils import six\nfrom django.utils.translation import ugettext_lazy as _\nfrom rest_framework.exceptions import ParseError\nfrom rest_framework.serializers import * # noqa: F403\n\nfrom rest_framework_json_api.exceptions...
diff --git a/docs/getting-started.md b/docs/getting-started.md index 3dc4ef6e..336f4486 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -69,7 +69,9 @@ From Source ## Running the example app git clone https://github.com/django-json-api/django-rest-framework-json-api.git - cd django-rest-...
zestedesavoir__zds-site-3230
Un template qui n'est pas variabilisé Comme on peut le constater dans le template [opensearch.xml](https://github.com/zestedesavoir/zds-site/blob/3e91b083ee882396abf4dc0d508595d9bdb101d7/templates/search/opensearch.xml#L13) il y'a une valeur en dur qui y traine. Il faut remplacer la ligne : ``` python <Contact>http:...
[ { "content": "# coding: utf-8\nfrom django.db.models import Q\n\nfrom django.shortcuts import render\nfrom django.core.urlresolvers import reverse\nfrom haystack.views import SearchView\n\nfrom zds import settings\nfrom zds.utils.paginator import paginator_range\n\n\nclass CustomSearchView(SearchView):\n\n d...
[ { "content": "# coding: utf-8\nfrom django.db.models import Q\n\nfrom django.shortcuts import render\nfrom django.core.urlresolvers import reverse\nfrom haystack.views import SearchView\n\nfrom zds import settings\nfrom zds.utils.paginator import paginator_range\n\n\nclass CustomSearchView(SearchView):\n\n d...
diff --git a/templates/search/opensearch.xml b/templates/search/opensearch.xml index 405d8d0dad..59af2edd01 100644 --- a/templates/search/opensearch.xml +++ b/templates/search/opensearch.xml @@ -10,7 +10,7 @@ <OutputEncoding>UTF-8</OutputEncoding> <AdultContent>false</AdultContent> <Language>{{ languag...
mitmproxy__mitmproxy-2784
Traceback when viewing certain gifs Open the attached flow dump in mitmproxy console. When viewing the content, observe the traceback that flashes to screen. A number of issues here: - [ ] Kaitai should be able to parse this gif. It's not technically correct, but I've seen this often, especially with single-pixel t...
[ { "content": "# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild\n\nimport array\nimport struct\nimport zlib\nfrom enum import Enum\nfrom pkg_resources import parse_version\n\nfrom kaitaistruct import __version__ as ks_version, KaitaiStruct, KaitaiStream, BytesIO\...
[ { "content": "# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild\n\nimport array\nimport struct\nimport zlib\nfrom enum import Enum\nfrom pkg_resources import parse_version\n\nfrom kaitaistruct import __version__ as ks_version, KaitaiStruct, KaitaiStream, BytesIO\...
diff --git a/mitmproxy/contrib/kaitaistruct/gif.py b/mitmproxy/contrib/kaitaistruct/gif.py index 820df568c3..76d7fc167a 100644 --- a/mitmproxy/contrib/kaitaistruct/gif.py +++ b/mitmproxy/contrib/kaitaistruct/gif.py @@ -35,9 +35,11 @@ def __init__(self, _io, _parent=None, _root=None): self.global_color_tabl...
coreruleset__coreruleset-2615
Regex assembler seems to be broken again. ### Describe the bug `util/regexp-assemble/regexp-assemble.py --log-level DEBUG update 942521` ``` Processing 942521, chain offset 0 detected processor: <class 'NoneType'> Found simple comment Found simple comment Found simple comment Found simple comment Found simpl...
[ { "content": "from msc_pyparser import MSCWriter\nfrom lib.operators.parser import Parser\n\n\nclass Updater(Parser):\n def run(self, process_all: bool):\n self.perform_compare_or_update(process_all, self.update_regex)\n self.write_updates()\n\n def update_regex(\n self,\n rule...
[ { "content": "from msc_pyparser import MSCWriter\nfrom lib.operators.parser import Parser\n\n\nclass Updater(Parser):\n def run(self, process_all: bool):\n self.perform_compare_or_update(process_all, self.update_regex)\n self.write_updates()\n\n def update_regex(\n self,\n rule...
diff --git a/util/regexp-assemble/lib/operators/updater.py b/util/regexp-assemble/lib/operators/updater.py index bae4b2946..c6e6c20fe 100644 --- a/util/regexp-assemble/lib/operators/updater.py +++ b/util/regexp-assemble/lib/operators/updater.py @@ -20,8 +20,7 @@ def update_regex( def write_updates(self): ...
deepset-ai__haystack-6533
Private (gen) model from HF fails running in promptnode **Describe the bug** (generative) private models on huggingface can't be run, since they append `use_auth_token` to the model kwargs which is not expected. That means: - using private models from HF within the Promptnode does not work - if you configure an a...
[ { "content": "from typing import Optional, Union, List, Dict, Any\nimport logging\nimport os\n\nfrom haystack.nodes.prompt.invocation_layer import PromptModelInvocationLayer, TokenStreamingHandler\nfrom haystack.nodes.prompt.invocation_layer.handlers import DefaultTokenStreamingHandler\nfrom haystack.nodes.prom...
[ { "content": "from typing import Optional, Union, List, Dict, Any\nimport logging\nimport os\n\nfrom haystack.nodes.prompt.invocation_layer import PromptModelInvocationLayer, TokenStreamingHandler\nfrom haystack.nodes.prompt.invocation_layer.handlers import DefaultTokenStreamingHandler\nfrom haystack.nodes.prom...
diff --git a/haystack/nodes/prompt/invocation_layer/hugging_face.py b/haystack/nodes/prompt/invocation_layer/hugging_face.py index 83a1cfc9f2..97cf80c718 100644 --- a/haystack/nodes/prompt/invocation_layer/hugging_face.py +++ b/haystack/nodes/prompt/invocation_layer/hugging_face.py @@ -183,7 +183,8 @@ def _prepare_pipe...
obspy__obspy-2554
UnboundLocalError while reading an inventory Hi ! I loaded some station.xml files from a datacenter using Arclink, and I got an error while loading them with obspy. Here is the code: ```python from obspy import read_inventory read_inventory("data/UB.XXXX.xml") ``` Here is the error: ``` Traceback (...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nObsPy implementation for parsing the arclink inventory format\nto an Inventory object.\n\nThis is a modified version of obspy.io.stationxml and obspy.io.sc3ml.\n\n:author:\n Mathijs Koymans (koymans@knmi.nl), 29.2016 - [Jollyfant@GitHub]\n...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nObsPy implementation for parsing the arclink inventory format\nto an Inventory object.\n\nThis is a modified version of obspy.io.stationxml and obspy.io.sc3ml.\n\n:author:\n Mathijs Koymans (koymans@knmi.nl), 29.2016 - [Jollyfant@GitHub]\n...
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index bc6b7b1a6cd..9986bb343cb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -106,6 +106,9 @@ plots (see #2471, #2477) * Fixed a bug in Stream.plot(type='section', reftime=..., ...) that caused wrong relative start times of traces relative to given reftime ...
nilearn__nilearn-2140
test_mask_reducer failing on circle CI testing the mask reducer from nilearn.decompositions.base sometimes fails on circleCI, e.g. https://travis-ci.org/nilearn/nilearn/builds/583674961?utm_source=github_status&utm_medium=notification the process gets a SIGABRT could be due to the recent unvendoring of joblib, a...
[ { "content": "\"\"\"\nMachine Learning module for NeuroImaging in python\n--------------------------------------------------\n\nDocumentation is available in the docstrings and online at\nhttp://nilearn.github.io.\n\nContents\n--------\nNilearn aims at simplifying the use of the scikit-learn package in the cont...
[ { "content": "\"\"\"\nMachine Learning module for NeuroImaging in python\n--------------------------------------------------\n\nDocumentation is available in the docstrings and online at\nhttp://nilearn.github.io.\n\nContents\n--------\nNilearn aims at simplifying the use of the scikit-learn package in the cont...
diff --git a/nilearn/__init__.py b/nilearn/__init__.py index 7bfee2f735..5d39246d7b 100644 --- a/nilearn/__init__.py +++ b/nilearn/__init__.py @@ -35,11 +35,17 @@ import gzip import sys import warnings +import os from distutils.version import LooseVersion from .version import _check_module_dependencies, __vers...
aws-cloudformation__cfn-lint-1887
Exception processing E3037 for AWS::S3::Bucket.Transition.TransitionDate ``` $ cfn-lint --version cfn-lint 0.44.5 ``` The `TransitionDate` property is defined with `PrimitiveType: "Timestamp"`: ```yaml AWSTemplateFormatVersion: 2010-09-09 Resources: Bucket: Type: AWS::S3::Bucket Properties: ...
[ { "content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport hashlib\nimport json\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\n\nfrom cfnlint.helpers import RESOURCE_SPECS\n\n\nclass ListDuplic...
[ { "content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport hashlib\nimport json\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\n\nfrom cfnlint.helpers import RESOURCE_SPECS\n\n\nclass ListDuplic...
diff --git a/src/cfnlint/rules/resources/properties/ListDuplicates.py b/src/cfnlint/rules/resources/properties/ListDuplicates.py index 88ee9fc186..5b2543bc05 100644 --- a/src/cfnlint/rules/resources/properties/ListDuplicates.py +++ b/src/cfnlint/rules/resources/properties/ListDuplicates.py @@ -34,7 +34,7 @@ def _check_...
ietf-tools__datatracker-6268
xml parsing heuristics crash if a reference has anchor "STD", "FYI", "RFC", or "BCP" ### Describe the issue I'm trying to submit a draft. On my first attempt, I realized that I tagged the wrong commit and missed some important changes from a co-author. So when I received the email, I cancelled the submission. I h...
[ { "content": "# Copyright The IETF Trust 2022, All Rights Reserved\n# -*- coding: utf-8 -*-\nimport datetime\nimport io\nimport re\nimport xml2rfc\n\nimport debug # pyflakes: ignore\n\nfrom contextlib import ExitStack\nfrom xml2rfc.util.date import augment_date, extract_date\nfrom ietf.utils.timezone import da...
[ { "content": "# Copyright The IETF Trust 2022, All Rights Reserved\n# -*- coding: utf-8 -*-\nimport datetime\nimport io\nimport re\nimport xml2rfc\n\nimport debug # pyflakes: ignore\n\nfrom contextlib import ExitStack\nfrom xml2rfc.util.date import augment_date, extract_date\nfrom ietf.utils.timezone import da...
diff --git a/ietf/utils/xmldraft.py b/ietf/utils/xmldraft.py index fab2a89b53..52b899488a 100644 --- a/ietf/utils/xmldraft.py +++ b/ietf/utils/xmldraft.py @@ -88,8 +88,9 @@ def _document_name(self, ref): # check the anchor next anchor = ref.get("anchor").lower() # always give back lowercase ...
jupyterhub__zero-to-jupyterhub-k8s-405
allow setting service account from config.ayml We currently disable [service accounts](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) for all user pods, disallowing kubernetes API access. This is the correct default for us, but we should allow users to easily override it if they ne...
[ { "content": "import os\nimport sys\nimport yaml\nfrom tornado.httpclient import AsyncHTTPClient\n\ndef get_config(key, default=None):\n \"\"\"\n Find a config item of a given name & return it\n\n Parses everything as YAML, so lists and dicts are available too\n \"\"\"\n path = os.path.join('/etc...
[ { "content": "import os\nimport sys\nimport yaml\nfrom tornado.httpclient import AsyncHTTPClient\n\ndef get_config(key, default=None):\n \"\"\"\n Find a config item of a given name & return it\n\n Parses everything as YAML, so lists and dicts are available too\n \"\"\"\n path = os.path.join('/etc...
diff --git a/doc/source/security.md b/doc/source/security.md index 581abbd15b..37b76a4bbe 100644 --- a/doc/source/security.md +++ b/doc/source/security.md @@ -135,3 +135,30 @@ rbac: We strongly **discourage disabling** the RBAC rules and remind you that this action will open up security vulnerabilities. Proceed with...
chainer__chainer-208
Show warning when old scikits.cuda is found `scikits.cuda` is deprecated now, but users can install new package `scikit-cuda` on a machine which has old one. We don't know what happens in such case. We strongly recommend uninstall old `scikits.cuda` and the install new one. Note that when I installed `scikits.cuda` an...
[ { "content": "\"\"\"Device, context and memory management on PyCUDA and scikits.cuda.\n\nChainer uses PyCUDA facilities (with very thin wrapper) to exploit the speed of\nGPU computation. Following modules and classes are imported to :mod:`cuda`\nmodule for convenience (refer to this table when reading chainer's...
[ { "content": "\"\"\"Device, context and memory management on PyCUDA and scikits.cuda.\n\nChainer uses PyCUDA facilities (with very thin wrapper) to exploit the speed of\nGPU computation. Following modules and classes are imported to :mod:`cuda`\nmodule for convenience (refer to this table when reading chainer's...
diff --git a/chainer/cuda.py b/chainer/cuda.py index 43b111c0e85f..3151200ee690 100644 --- a/chainer/cuda.py +++ b/chainer/cuda.py @@ -34,12 +34,28 @@ """ import atexit import os +import warnings import numpy import pkg_resources import six try: + try: + pkg_resources.require('scikits.cuda') + e...
privacyidea__privacyidea-2280
Support other keytypes with SSHKey Token We would like to import other public key types like ecdsa into the SSHKey token type. * [x] The UI and the /token/init API needs to allow this. * [x] We also need to check, if the keytype is saved and returned correctly by GET /authitem
[ { "content": "# -*- coding: utf-8 -*-\n#\n# privacyIDEA\n# Jul 18, 2014 Cornelius Kölbel\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 AFFERO GENERAL PUBLIC LICENSE\n# License as published ...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# privacyIDEA\n# Jul 18, 2014 Cornelius Kölbel\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 AFFERO GENERAL PUBLIC LICENSE\n# License as published ...
diff --git a/privacyidea/lib/tokens/sshkeytoken.py b/privacyidea/lib/tokens/sshkeytoken.py index cc7767c387..d128a338c3 100644 --- a/privacyidea/lib/tokens/sshkeytoken.py +++ b/privacyidea/lib/tokens/sshkeytoken.py @@ -125,8 +125,10 @@ def update(self, param): getParam(param, "sshkey", required) ...
ivy-llc__ivy-20857
fftshift This subtask is to add the `fftshift` function to the Jax frontend
[ { "content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back\n\n\n@to_ivy_arrays_and_back\ndef fft(a, n=None, axis=-1, norm=None):\n if norm is None:\n norm = \"backward\"\n return ivy.fft(a, axis, norm=norm, n=n)\n", "path": "ivy/functional/fr...
[ { "content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back\nfrom ivy.func_wrapper import with_unsupported_dtypes\n\n\n@to_ivy_arrays_and_back\n@with_unsupported_dtypes({\"2.4.2 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\ndef fftshift(x, axes=None,...
diff --git a/ivy/functional/frontends/jax/numpy/fft.py b/ivy/functional/frontends/jax/numpy/fft.py index 942378d3b70f2..9ee319df55d42 100644 --- a/ivy/functional/frontends/jax/numpy/fft.py +++ b/ivy/functional/frontends/jax/numpy/fft.py @@ -1,6 +1,25 @@ # local import ivy from ivy.functional.frontends.jax.func_wrapp...
open-mmlab__mmsegmentation-1463
STDC training on fp16: Input type (torch.cuda.FloatTensor) and weight type (torch.cuda.HalfTensor) should be the same 在stdc1_512x1024_80k_cityscapes.py中添加了 ``` optimizer_config = dict(type='Fp16OptimizerHook', loss_scale='dynamic') fp16 = dict() ``` 后再次进行训练则出现了以下报错 ![avatar](https://img-blog.csdnimg.cn/97204a9e0c...
[ { "content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\nimport torch.nn.functional as F\n\nfrom ..builder import HEADS\nfrom .fcn_head import FCNHead\n\n\n@HEADS.register_module()\nclass STDCHead(FCNHead):\n \"\"\"This head is the implementation of `Rethinking BiSeNet For Real-time\n ...
[ { "content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\nimport torch.nn.functional as F\n\nfrom ..builder import HEADS\nfrom .fcn_head import FCNHead\n\n\n@HEADS.register_module()\nclass STDCHead(FCNHead):\n \"\"\"This head is the implementation of `Rethinking BiSeNet For Real-time\n ...
diff --git a/mmseg/models/decode_heads/stdc_head.py b/mmseg/models/decode_heads/stdc_head.py index 1e678ace14..1cf3732ceb 100644 --- a/mmseg/models/decode_heads/stdc_head.py +++ b/mmseg/models/decode_heads/stdc_head.py @@ -37,7 +37,7 @@ def losses(self, seg_logit, seg_label): # parameters. However, it is a con...
Gallopsled__pwntools-1247
Infinite loop for a specially crafted escape sequence Hi, here is a small script to reproduce the issue: ``` #!/usr/bin/env python from pwn import * print('\x1bP\x1b') ``` Note: if one receives '\x1bP\x1b' in a `p = process()` via `p.recv()` and then launches `p.interactive()`, even `Ctrl+C` cannot stop th...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\n\nimport atexit\nimport fcntl\nimport os\nimport re\nimport signal\nimport struct\nimport sys\nimport termios\nimport threading\nimport traceback\n\nfrom pwnlib.context import ContextType\nfrom pwnlib.term import termcap\n\n_...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import division\n\nimport atexit\nimport fcntl\nimport os\nimport re\nimport signal\nimport struct\nimport sys\nimport termios\nimport threading\nimport traceback\n\nfrom pwnlib.context import ContextType\nfrom pwnlib.term import termcap\n\n_...
diff --git a/pwnlib/term/term.py b/pwnlib/term/term.py index 4cd476fb1..ed5d79e35 100644 --- a/pwnlib/term/term.py +++ b/pwnlib/term/term.py @@ -246,9 +246,7 @@ def parse(s): out = [] buf = map(ord, s) i = 0 - while True: - if i >= len(buf): - break + while i < len(buf): ...
open-mmlab__mmdetection-6795
Wrong docs in BaseDetector forward_train() In https://github.com/open-mmlab/mmdetection/blob/f3817df55709e4b13098ebaa9cf72a77b68ce994/mmdet/models/detectors/base.py?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L66 ``...
[ { "content": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom abc import ABCMeta, abstractmethod\nfrom collections import OrderedDict\n\nimport mmcv\nimport numpy as np\nimport torch\nimport torch.distributed as dist\nfrom mmcv.runner import BaseModule, auto_fp16\n\nfrom mmdet.core.visualization import im...
[ { "content": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom abc import ABCMeta, abstractmethod\nfrom collections import OrderedDict\n\nimport mmcv\nimport numpy as np\nimport torch\nimport torch.distributed as dist\nfrom mmcv.runner import BaseModule, auto_fp16\n\nfrom mmdet.core.visualization import im...
diff --git a/mmdet/models/detectors/base.py b/mmdet/models/detectors/base.py index f1b450cd5f1..bf64bce63e8 100644 --- a/mmdet/models/detectors/base.py +++ b/mmdet/models/detectors/base.py @@ -63,7 +63,7 @@ def extract_feats(self, imgs): def forward_train(self, imgs, img_metas, **kwargs): """ Arg...
litestar-org__litestar-1719
Bug: Issue with ChannelsPlugin and __future__.annotations ### Description While working with the new Channels feature, I found a bug that affects Litestar's ability to generate the route argument signature when passing `channels: ChannelsPlugin` to a route handler while `from __future__ import annotations` is active...
[ { "content": "from __future__ import annotations\n\nimport asyncio\nfrom asyncio import CancelledError, Queue, Task, create_task\nfrom contextlib import AbstractAsyncContextManager, asynccontextmanager, suppress\nfrom functools import partial\nfrom os.path import join as join_path\nfrom typing import TYPE_CHECK...
[ { "content": "from __future__ import annotations\n\nimport asyncio\nfrom asyncio import CancelledError, Queue, Task, create_task\nfrom contextlib import AbstractAsyncContextManager, asynccontextmanager, suppress\nfrom functools import partial\nfrom os.path import join as join_path\nfrom typing import TYPE_CHECK...
diff --git a/litestar/channels/plugin.py b/litestar/channels/plugin.py index c64b06592c..2f7859df59 100644 --- a/litestar/channels/plugin.py +++ b/litestar/channels/plugin.py @@ -111,6 +111,7 @@ def on_app_init(self, app_config: AppConfig) -> AppConfig: """Plugin hook. Set up a ``channels`` dependency, add rou...
statsmodels__statsmodels-6292
nonparametric.KDEUnivariate returns zero bandwidth Hi, Does anyone have an idea why the following dataset makes KDEUnivariate return zero bandwidth? ``` data = np.array([1,1,1,1,2]) kde_sm = sm.nonparametric.KDEUnivariate(data.astype('double')) kde_sm.fit(bw="silverman") sup = kde_sm.support den = kde_sm.densi...
[ { "content": "import numpy as np\nfrom scipy.stats import scoreatpercentile as sap\n\nfrom statsmodels.compat.pandas import Substitution\nfrom statsmodels.sandbox.nonparametric import kernels\n\ndef _select_sigma(X):\n \"\"\"\n Returns the smaller of std(X, ddof=1) or normalized IQR(X) over axis 0.\n\n ...
[ { "content": "import numpy as np\nfrom scipy.stats import scoreatpercentile as sap\n\nfrom statsmodels.compat.pandas import Substitution\nfrom statsmodels.sandbox.nonparametric import kernels\n\ndef _select_sigma(X):\n \"\"\"\n Returns the smaller of std(X, ddof=1) or normalized IQR(X) over axis 0.\n\n ...
diff --git a/statsmodels/nonparametric/bandwidths.py b/statsmodels/nonparametric/bandwidths.py index c4ba216f1b3..329b717a327 100644 --- a/statsmodels/nonparametric/bandwidths.py +++ b/statsmodels/nonparametric/bandwidths.py @@ -168,8 +168,10 @@ def select_bandwidth(x, bw, kernel): bw = bw.lower() if bw not i...
ansible-collections__community.general-4853
sudoers module does not handle state: absent properly ### Summary The `community.general.sudoers` module does not handle `state: absent` properly. If the file specified by `name` does not exist, it gets created, with possibly invalid content. As a side effect, `commands` and `user`/`group` is required, although these...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n\n# Copyright: (c) 2019, Jon Ellis (@JonEllis) <ellis.jp@gmail.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n\n# Copyright: (c) 2019, Jon Ellis (@JonEllis) <ellis.jp@gmail.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\...
diff --git a/changelogs/fragments/4852-sudoers-state-absent.yml b/changelogs/fragments/4852-sudoers-state-absent.yml new file mode 100644 index 00000000000..013041a15f3 --- /dev/null +++ b/changelogs/fragments/4852-sudoers-state-absent.yml @@ -0,0 +1,2 @@ +bugfixes: + - "sudoers - fix incorrect handling of ``state: ab...
ESMCI__cime-2052
Error check compset name Improve error checking on compset name, if an alias isn't matched make sure that the compset name (now assumed to be a longname) lists 7 components. Test suite: scripts_regression_tests.py hand tests of create_newcase Test baseline: Test namelist changes: Test status: bit for bit Fi...
[ { "content": "from CIME.utils import run_cmd, run_cmd_no_fail, expect, get_timestamp\n\nimport sys, getpass, logging\n\n# Constants\nESMCI_REMOTE_NAME = \"esmci_remote_for_split\"\nESMCI_URL = \"git@github.com:ESMCI/CIME.git\"\nSPLIT_TAG_PREFIX = \"acme-split-\"\nMERGE_TAG_PREFIX = \"to-acme-\"\n\n#############...
[ { "content": "from CIME.utils import run_cmd, run_cmd_no_fail, expect, get_timestamp\n\nimport sys, getpass, logging\n\n# Constants\nESMCI_REMOTE_NAME = \"esmci_remote_for_split\"\nESMCI_URL = \"git@github.com:ESMCI/CIME.git\"\nSPLIT_TAG_PREFIX = \"acme-split-\"\nMERGE_TAG_PREFIX = \"to-acme-\"\n\n#############...
diff --git a/config/acme/machines/config_batch.xml b/config/acme/machines/config_batch.xml index 46fddb8e31e..e78cad82638 100644 --- a/config/acme/machines/config_batch.xml +++ b/config/acme/machines/config_batch.xml @@ -181,7 +181,6 @@ <directive>-t {{ job_wallclock_time }}</directive> <directive>-o {{ j...
secdev__scapy-1080
Trifle (Windows only): unnecessary doubled .strip() Scapy version: v2.4.0rc3-31 System: Windows10 Python Version: 2.7.14 ``` diff --git a/scapy/arch/windows/__init__.py b/scapy/arch/windows/__init__.py index 6641970..886342d 100755 --- a/scapy/arch/windows/__init__.py +++ b/scapy/arch/windows/__init__.py @@ -...
[ { "content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## Copyright (C) Gabriel Potter <gabriel@potter.fr>\n## This program is published under a GPLv2 license\n\n\"\"\"\nCustomizations needed to support ...
[ { "content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## Copyright (C) Gabriel Potter <gabriel@potter.fr>\n## This program is published under a GPLv2 license\n\n\"\"\"\nCustomizations needed to support ...
diff --git a/scapy/arch/windows/__init__.py b/scapy/arch/windows/__init__.py index 664197086a5..491cbe729e5 100755 --- a/scapy/arch/windows/__init__.py +++ b/scapy/arch/windows/__init__.py @@ -521,7 +521,8 @@ def channel(self): Only available with Npcap.""" # According to https://nmap.org/npcap/guide/...
certbot__certbot-4243
--cert-name option not honored on new SSL certificate issuance Hello, ```shell root@stretch:~# certbot-auto --version certbot 0.11.1 ``` ```shell # certbot-auto \ certonly \ --non-interactive \ --agree-tos --email <email> \ --staging \ --webroot --webroot-path <path> \ --allow-subset-of-names \ --domain ...
[ { "content": "\"\"\"Tools for managing certificates.\"\"\"\nimport datetime\nimport logging\nimport os\nimport pytz\nimport traceback\nimport zope.component\n\nfrom certbot import errors\nfrom certbot import interfaces\nfrom certbot import ocsp\nfrom certbot import storage\nfrom certbot import util\n\nfrom cert...
[ { "content": "\"\"\"Tools for managing certificates.\"\"\"\nimport datetime\nimport logging\nimport os\nimport pytz\nimport traceback\nimport zope.component\n\nfrom certbot import errors\nfrom certbot import interfaces\nfrom certbot import ocsp\nfrom certbot import storage\nfrom certbot import util\n\nfrom cert...
diff --git a/certbot/cert_manager.py b/certbot/cert_manager.py index 71a5fe6fabf..35d539a1691 100644 --- a/certbot/cert_manager.py +++ b/certbot/cert_manager.py @@ -100,7 +100,10 @@ def lineage_for_certname(cli_config, certname): configs_dir = cli_config.renewal_configs_dir # Verify the directory is there ...
ranaroussi__yfinance-830
Please add Top Holdings for ETFs For instance for [https://finance.yahoo.com/quote/QQQ/](https://finance.yahoo.com/quote/QQQ/): ``` Apple Inc | AAPL | 11.00% Microsoft Corp | MSFT | 9.82% Amazon.com Inc | AMZN | 8.35% Facebook Inc A | FB | 4.01% Facebook Inc Class A | FB | 4.01% Tesla Inc | TSLA | 3.90% Alpha...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Yahoo! Finance market data downloader (+fix for Pandas Datareader)\n# https://github.com/ranaroussi/yfinance\n#\n# Copyright 2017-2019 Ran Aroussi\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this fi...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Yahoo! Finance market data downloader (+fix for Pandas Datareader)\n# https://github.com/ranaroussi/yfinance\n#\n# Copyright 2017-2019 Ran Aroussi\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this fi...
diff --git a/yfinance/base.py b/yfinance/base.py index 9099fef3d..539c2065c 100644 --- a/yfinance/base.py +++ b/yfinance/base.py @@ -370,6 +370,13 @@ def cleanup(data): except Exception: pass + # For ETFs, provide this valuable data: the top holdings of the ETF + try: + ...
pytorch__pytorch-4407
Pytorch docs:RNN weight_ih_l[k] shape error In pytorch docs,torch.nn.RNN parts show that variable **weight_ih_l[k]** has shape of input_size x hidden_size,however it should be hidden_size x input_size.
[ { "content": "import math\nimport torch\nimport warnings\n\nfrom .module import Module\nfrom ..parameter import Parameter\nfrom ..utils.rnn import PackedSequence\n\n\nclass RNNBase(Module):\n\n def __init__(self, mode, input_size, hidden_size,\n num_layers=1, bias=True, batch_first=False,\n ...
[ { "content": "import math\nimport torch\nimport warnings\n\nfrom .module import Module\nfrom ..parameter import Parameter\nfrom ..utils.rnn import PackedSequence\n\n\nclass RNNBase(Module):\n\n def __init__(self, mode, input_size, hidden_size,\n num_layers=1, bias=True, batch_first=False,\n ...
diff --git a/torch/nn/modules/rnn.py b/torch/nn/modules/rnn.py index f70aec31d9504b..d9015853cd2986 100644 --- a/torch/nn/modules/rnn.py +++ b/torch/nn/modules/rnn.py @@ -296,7 +296,8 @@ class RNN(RNNBase): Attributes: weight_ih_l[k]: the learnable input-hidden weights of the k-th layer, - of...
medtagger__MedTagger-490
Incorrect usage of slashes ## Current Behavior MedTagger services incorrectly use slashes at the end of namespaces making it incorrect according to REST practises. E.g endpoint for returning all scans looks like this: `GET /api/v1/scans/` ## Expected Behavior MedTagger services should not use slashes at the...
[ { "content": "\"\"\"Module responsible for definition of Scans service available via HTTP REST API.\"\"\"\nimport json\nfrom typing import Any\n\nfrom flask import request\nfrom flask_restplus import Resource\nfrom jsonschema import validate, ValidationError, Draft4Validator\nfrom jsonschema.exceptions import b...
[ { "content": "\"\"\"Module responsible for definition of Scans service available via HTTP REST API.\"\"\"\nimport json\nfrom typing import Any\n\nfrom flask import request\nfrom flask_restplus import Resource\nfrom jsonschema import validate, ValidationError, Draft4Validator\nfrom jsonschema.exceptions import b...
diff --git a/backend/medtagger/api/scans/service_rest.py b/backend/medtagger/api/scans/service_rest.py index 34330ad3..3ab2a3e5 100644 --- a/backend/medtagger/api/scans/service_rest.py +++ b/backend/medtagger/api/scans/service_rest.py @@ -17,7 +17,7 @@ scans_ns = api.namespace('scans', 'Methods related with scans') ...
paperless-ngx__paperless-ngx-3652
[BUG] ConsumerError [Errno 1] Operation not permitted ### Description PDF files can no longer be consumed. Neither by e-mail, nor by copying it to the inbox. Version 1.16.1 Updated to 1.16.2 error remains. ### Steps to reproduce - Forwarding a PDF to paperless - Saving a PDF in the Paperless Inbox ### Webse...
[ { "content": "import datetime\nimport hashlib\nimport os\nimport shutil\nimport tempfile\nimport uuid\nfrom pathlib import Path\nfrom subprocess import CompletedProcess\nfrom subprocess import run\nfrom typing import Optional\nfrom typing import Type\n\nimport magic\nfrom asgiref.sync import async_to_sync\nfrom...
[ { "content": "import datetime\nimport hashlib\nimport os\nimport shutil\nimport tempfile\nimport uuid\nfrom pathlib import Path\nfrom subprocess import CompletedProcess\nfrom subprocess import run\nfrom typing import Optional\nfrom typing import Type\n\nimport magic\nfrom asgiref.sync import async_to_sync\nfrom...
diff --git a/src/documents/consumer.py b/src/documents/consumer.py index f2da2ff42a2..fde8e2d4c23 100644 --- a/src/documents/consumer.py +++ b/src/documents/consumer.py @@ -582,7 +582,12 @@ def apply_overrides(self, document): def _write(self, storage_type, source, target): with open(source, "rb") as read...
openfun__marsha-2578
check_live_state pop from empty list ## Bug Report **Problematic Behavior** The management command check_live_state has a recurring error, it tries to pop a value from an empty list. This list comes from cloudwatch service : https://github.com/openfun/marsha/blob/29e1f78ed6e288f7bba3c198bb7b7179e7af4fe0/src/backe...
[ { "content": "\"\"\"Check live state management command.\"\"\"\n\nfrom datetime import datetime, timedelta, timezone\nimport json\nimport re\n\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\n\nimport boto3\nfrom dateutil.parser import isoparse\n\nfrom marsha.core.defaults...
[ { "content": "\"\"\"Check live state management command.\"\"\"\n\nfrom datetime import datetime, timedelta, timezone\nimport json\nimport re\n\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand\n\nimport boto3\nfrom dateutil.parser import isoparse\n\nfrom marsha.core.defaults...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 308b97d08c..bc5154493f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ Versioning](https://semver.org/spec/v2.0.0.html). ### Fixed +- Correctly set startime with filtering medialive logs - Remove non existing fields in PortabilityRequestAdmin - Correc...
NVIDIA__TransformerEngine-627
The version v1.2 has compatibility issues with PyTorch 2.0.1, causing errors during execution. Hello, I encountered the following error while using version v1.2 of Transformer Engine: `no_torch_dynamo = lambda recursive=True: lambda f: torch._dynamo.disable(f, recursive=recursive). The error message is TypeError...
[ { "content": "# Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n#\n# See LICENSE for license information.\n\n\"\"\"NVFuser functions and JIT utilities\"\"\"\nimport os\nfrom typing import Callable, Optional, Tuple\n\nimport torch\n\njit_fuser = torch.jit.script\nif torch.__versio...
[ { "content": "# Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n#\n# See LICENSE for license information.\n\n\"\"\"NVFuser functions and JIT utilities\"\"\"\nimport os\nfrom typing import Callable, Optional, Tuple\n\nimport torch\n\njit_fuser = torch.jit.script\nif torch.__versio...
diff --git a/transformer_engine/pytorch/jit.py b/transformer_engine/pytorch/jit.py index 0412865661..c321577141 100644 --- a/transformer_engine/pytorch/jit.py +++ b/transformer_engine/pytorch/jit.py @@ -22,7 +22,12 @@ no_torch_dynamo = lambda recursive=True: lambda func: func if torch.__version__ >= "2": import ...
conan-io__conan-4888
Remote lookup in offline mode Hello, Following up the small issue that I had during my demo at swampUP: I was trying to create a package for which I had every build requirement recipe already exported and thus available. I was expecting to get an error: >no such package with current options/settings: **bui...
[ { "content": "import os\n\nfrom conans.client.graph.graph import (BINARY_BUILD, BINARY_CACHE, BINARY_DOWNLOAD, BINARY_MISSING,\n BINARY_SKIP, BINARY_UPDATE,\n RECIPE_EDITABLE, BINARY_EDITABLE,\n REC...
[ { "content": "import os\n\nfrom conans.client.graph.graph import (BINARY_BUILD, BINARY_CACHE, BINARY_DOWNLOAD, BINARY_MISSING,\n BINARY_SKIP, BINARY_UPDATE,\n RECIPE_EDITABLE, BINARY_EDITABLE,\n REC...
diff --git a/conans/client/graph/graph_binaries.py b/conans/client/graph/graph_binaries.py index 0c5d3e55282..68699f5cd04 100644 --- a/conans/client/graph/graph_binaries.py +++ b/conans/client/graph/graph_binaries.py @@ -121,6 +121,9 @@ def _evaluate_node(self, node, build_mode, update, evaluated_nodes, remote_name) ...
obspy__obspy-2310
incorrect bitmask in libgcf libgcf.py, line 107, masks the bottom 4 bits for the compresssion code: ` compression = compress & 0b00001111 # get compression code` This should mask off only the bottom 3 bits (the 4th is allocated for something else in the near future): ` compression = compress & 0b00000111 #...
[ { "content": "# -*- coding: utf-8 -*-\n# reads Guralp Compressed Format (GCF) Files\n# By Ran Novitsky Nof @ BSL, 2016\n# ran.nof@gmail.com\n# Based on Guralp's GCF reference (GCF-RFC-GCFR, Issue C, 2011-01-05)\n# more details available from: http://www.guralp.com/apps/ok?doc=GCF_Intro\n# last access: June, 201...
[ { "content": "# -*- coding: utf-8 -*-\n# reads Guralp Compressed Format (GCF) Files\n# By Ran Novitsky Nof @ BSL, 2016\n# ran.nof@gmail.com\n# Based on Guralp's GCF reference (GCF-RFC-GCFR, Issue C, 2011-01-05)\n# more details available from: http://www.guralp.com/apps/ok?doc=GCF_Intro\n# last access: June, 201...
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3d5f2a844e8..b2a1e52ec9f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -44,6 +44,8 @@ object to CNV (see #2001) - obspy.io.css: * Fix automatic filetype detection (see #2160 and #2162) + - obspy.io.gcf: + * Fix bitmask in getting compression code (see #...