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 ⌀ |
|---|---|---|---|---|
wagtail__wagtail-11768 | Update keyboard shortcuts menu button & dialog icon to a new 'keyboard' icon
### Is your proposal related to a problem?
#11717 introduced a new keyboard shortcuts dialog as part of the work for https://github.com/wagtail/wagtail/issues/3949
For simplicity, we used an existing 'regex' icon for this, it would be ni... | [
{
"content": "from django.conf import settings\nfrom django.contrib.auth.models import Permission\nfrom django.urls import reverse, reverse_lazy\nfrom django.utils.functional import cached_property\nfrom django.utils.http import urlencode\nfrom django.utils.translation import gettext\nfrom django.utils.translat... | [
{
"content": "from django.conf import settings\nfrom django.contrib.auth.models import Permission\nfrom django.urls import reverse, reverse_lazy\nfrom django.utils.functional import cached_property\nfrom django.utils.http import urlencode\nfrom django.utils.translation import gettext\nfrom django.utils.translat... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index fd06d15feecb..8ec545d43646 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -18,7 +18,7 @@ Changelog
* Implement new universal listings design for image listing view (Sage Abdullah)
* Implement new universal listings design for document listing view (Sage Abdullah)
... |
jazzband__django-simple-history-31 | templates missing from pypi packages
The templates directory is missing from the tarballs uploaded to pypi.
```
from simple_history.admin import SimpleHistoryAdmin
admin.site.register(MyModel, SimpleHistoryAdmin)
```
there is a history button in the admin page but it fails miserably to find the templates.
| [
{
"content": "from setuptools import setup, find_packages\n\n\nsetup(\n name='django-simple-history',\n version='1.2.2',\n description='Store model history and view/revert changes from admin site.',\n long_description='\\n'.join((\n open('README.rst').read(),\n open('CHANGES.rst').read... | [
{
"content": "from setuptools import setup, find_packages\n\n\nsetup(\n name='django-simple-history',\n version='1.2.3',\n description='Store model history and view/revert changes from admin site.',\n long_description='\\n'.join((\n open('README.rst').read(),\n open('CHANGES.rst').read... | diff --git a/CHANGES.rst b/CHANGES.rst
index b524c5bab..3bce3e250 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,7 +1,7 @@
CHANGES
=======
-1.2.2 (2013-04-22)
+1.2.3 (2013-04-22)
------------------
- Fixed packaging bug: added admin template files to PyPI package
diff --git a/README.rst b/README.rst
index 9ae... |
litestar-org__litestar-771 | Properly indented docstrings result in incorrectly rendered Markdown in openapi docs
**Describe the bug**
A properly formatted docstring is indented to match the indentation of the function or method. The markdown rendering that is passed into the API docs seems to be interpreting these indentations in such a way th... | [
{
"content": "from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, cast\n\nfrom pydantic_openapi_schema.v3_1_0.operation import Operation\nfrom pydantic_openapi_schema.v3_1_0.path_item import PathItem\n\nfrom starlite.openapi.parameters import create_parameter_for_handler\nfrom starlite.openapi.reques... | [
{
"content": "from inspect import cleandoc\nfrom typing import TYPE_CHECKING, Dict, List, Optional, Tuple, cast\n\nfrom pydantic_openapi_schema.v3_1_0.operation import Operation\nfrom pydantic_openapi_schema.v3_1_0.path_item import PathItem\n\nfrom starlite.openapi.parameters import create_parameter_for_handler... | diff --git a/starlite/openapi/path_item.py b/starlite/openapi/path_item.py
index 0bc46076bb..c4e79a7d9e 100644
--- a/starlite/openapi/path_item.py
+++ b/starlite/openapi/path_item.py
@@ -1,3 +1,4 @@
+from inspect import cleandoc
from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, cast
from pydantic_opena... |
rucio__rucio-1573 | Problems with accessing the REST API and the WebUI in the development docker container
Motivation
----------
It is not possible to access the REST API under 'https://localhost/proxy' and to access the Web UI under 'https://localhost/ui/' within the docker container build with the Dockerfile under /etc/docker/dev.
... | [
{
"content": "# 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#... | [
{
"content": "# 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#... | diff --git a/etc/docker/dev/Dockerfile b/etc/docker/dev/Dockerfile
index 0cf592e303..93214d15db 100644
--- a/etc/docker/dev/Dockerfile
+++ b/etc/docker/dev/Dockerfile
@@ -81,7 +81,8 @@ RUN mkdir /var/log/rucio /var/log/rucio/trace && chmod 777 /var/log/rucio
COPY etc/docker/dev/rucio.cfg etc/rucio.cfg
COPY etc/alem... |
locustio__locust-746 | Default implementation of on_request_success and _failure lacks **kwargs declaration
### Description of issue / feature request
When implementing new (custom) client or trying to inject more metadata into results the user will usually need to introduce dedicated success/failure handlers that may extend the default lis... | [
{
"content": "import hashlib\nimport time\nfrom collections import namedtuple, OrderedDict\nfrom copy import copy\nfrom itertools import chain\n\nimport gevent\nimport six\nfrom six.moves import xrange\n\nfrom . import events\nfrom .exception import StopLocust\nfrom .log import console_logger\n\nSTATS_NAME_WIDT... | [
{
"content": "import hashlib\nimport time\nfrom collections import namedtuple, OrderedDict\nfrom copy import copy\nfrom itertools import chain\n\nimport gevent\nimport six\nfrom six.moves import xrange\n\nfrom . import events\nfrom .exception import StopLocust\nfrom .log import console_logger\n\nSTATS_NAME_WIDT... | diff --git a/locust/stats.py b/locust/stats.py
index d0cd9b586f..7b9af9038e 100644
--- a/locust/stats.py
+++ b/locust/stats.py
@@ -554,10 +554,10 @@ def median_from_dict(total, count):
A global instance for holding the statistics. Should be removed eventually.
"""
-def on_request_success(request_type, name, respons... |
goauthentik__authentik-6105 | OAuth source is added to user attributes each time user write is run
**Describe the bug**
The user attribute `goauthentik.io/user/sources` gets appended each time an user write stage is run.
```
goauthentik.io/user/sources:
- Wordpress
- Wordpress
- Wordpress
- Wordpress
- Wordpress
...
```
*... | [
{
"content": "\"\"\"Write stage logic\"\"\"\nfrom typing import Any, Optional\n\nfrom django.contrib.auth import update_session_auth_hash\nfrom django.db import transaction\nfrom django.db.utils import IntegrityError, InternalError\nfrom django.http import HttpRequest, HttpResponse\nfrom django.utils.translatio... | [
{
"content": "\"\"\"Write stage logic\"\"\"\nfrom typing import Any, Optional\n\nfrom django.contrib.auth import update_session_auth_hash\nfrom django.db import transaction\nfrom django.db.utils import IntegrityError, InternalError\nfrom django.http import HttpRequest, HttpResponse\nfrom django.utils.translatio... | diff --git a/authentik/stages/user_write/stage.py b/authentik/stages/user_write/stage.py
index 2319e7414dae..4de0f8135e6c 100644
--- a/authentik/stages/user_write/stage.py
+++ b/authentik/stages/user_write/stage.py
@@ -124,7 +124,8 @@ def update_user(self, user: User):
connection: UserSourceConnection = se... |
DataDog__dd-trace-py-1116 | DDLogger rewrites LogRecord.msg, which causes Sentry events duplication
Sentry uses `LogRecord.msg` to identify log events. LogRecord.msg is the log message template, to be formatted on demand.
When rewriting `msg`, one should not enrich it with arbitrary values, like `logging_bucket.skipped`.
The line
```
... | [
{
"content": "import collections\nimport logging\n\nfrom ..utils.formats import get_env\n\n\ndef get_logger(name):\n \"\"\"\n Retrieve or create a ``DDLogger`` instance.\n\n This function mirrors the behavior of `logging.getLogger`.\n\n If no logger with the provided name has been fetched before the... | [
{
"content": "import collections\nimport logging\n\nfrom ..utils.formats import get_env\n\n\ndef get_logger(name):\n \"\"\"\n Retrieve or create a ``DDLogger`` instance.\n\n This function mirrors the behavior of `logging.getLogger`.\n\n If no logger with the provided name has been fetched before the... | diff --git a/ddtrace/internal/logger.py b/ddtrace/internal/logger.py
index f14037cc9eb..6b993053168 100644
--- a/ddtrace/internal/logger.py
+++ b/ddtrace/internal/logger.py
@@ -110,7 +110,8 @@ def handle(self, record):
if logging_bucket.bucket != current_bucket:
# Append count of skipped messages ... |
python-telegram-bot__python-telegram-bot-1734 | Python supported versions need to be updated in docs
Not really a bug, but for example it still says Python 3.4 is supported in readme and setup explanations.
Copy-pasting from https://pypi.org/project/python-telegram-bot/ :
> This library provides a pure Python interface for the Telegram Bot API. It’s compatible... | [
{
"content": "#!/usr/bin/env python\n\"\"\"The setup and build script for the python-telegram-bot library.\"\"\"\n\nimport codecs\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef requirements():\n \"\"\"Build the requirements list for this project\"\"\"\n requirements_list = []\n\n with... | [
{
"content": "#!/usr/bin/env python\n\"\"\"The setup and build script for the python-telegram-bot library.\"\"\"\n\nimport codecs\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef requirements():\n \"\"\"Build the requirements list for this project\"\"\"\n requirements_list = []\n\n with... | diff --git a/README.rst b/README.rst
index 4c7e5a57015..918601beff9 100644
--- a/README.rst
+++ b/README.rst
@@ -83,7 +83,7 @@ Introduction
This library provides a pure Python interface for the
`Telegram Bot API <https://core.telegram.org/bots/api>`_.
-It's compatible with Python versions 2.7, 3.3+ and `PyPy <http:... |
ethereum__web3.py-306 | Transform Markdown on PyPi release
### What was wrong?
README is not readable on PyPI: https://pypi.python.org/pypi/web3/1.4.0
`setuptools-markdown` allows to publish README.md on PyPi
- https://pypi.python.org/pypi/setuptools-markdown
#### Cute Animal Picture

| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport os\nimport sys\n\nfrom setuptools import (\n setup,\n find_packages,\n)\n\n\nDIR = os.path.dirname(os.path.abspath(__file__))\n\n\nreadme = open(os.path.join(DIR, 'README.md')).read()\n\ninstall_requires = [\n \"cytoolz>=0.8.2\",\n ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport os\nimport sys\n\nfrom setuptools import (\n setup,\n find_packages,\n)\n\n\nDIR = os.path.dirname(os.path.abspath(__file__))\n\n\nreadme = open(os.path.join(DIR, 'README.md')).read()\n\ninstall_requires = [\n \"cytoolz>=0.8.2\",\n ... | diff --git a/setup.py b/setup.py
index dbf5c3ab24..5f23d34b92 100644
--- a/setup.py
+++ b/setup.py
@@ -32,12 +32,13 @@
name='web3',
version='3.13.5',
description="""Web3.py""",
- long_description=readme,
+ long_description_markdown_filename='README.md',
author='Piper Merriam',
author_emai... |
Netflix__lemur-245 | Internal Server Error hitting auth/login API
Hitting the `/auth/login` API with a GET request returns an HTTP 500 error. The resource needs to be authenticated.
| [
{
"content": "\"\"\"\n.. module: lemur.auth.views\n :platform: Unix\n :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more\n :license: Apache, see LICENSE for more details.\n.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>\n\"\"\"\nimport jwt\nimport base64\nimport requests\n\nfrom flask im... | [
{
"content": "\"\"\"\n.. module: lemur.auth.views\n :platform: Unix\n :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more\n :license: Apache, see LICENSE for more details.\n.. moduleauthor:: Kevin Glisson <kglisson@netflix.com>\n\"\"\"\nimport jwt\nimport base64\nimport requests\n\nfrom flask im... | diff --git a/lemur/auth/views.py b/lemur/auth/views.py
index 7493cb3720..b5f828cbf0 100644
--- a/lemur/auth/views.py
+++ b/lemur/auth/views.py
@@ -9,7 +9,7 @@
import base64
import requests
-from flask import g, Blueprint, current_app
+from flask import Blueprint, current_app
from flask.ext.restful import reqpars... |
digitalfabrik__integreat-cms-489 | Embedding live content not working
### Describe the Bug
<!-- A clear and concise description of what the bug is. -->
At the moment, embedding live content in pages is not working.
### Steps to Reproduce
1. Go to a region, e.g. "Augsburg"
2. Click on a page, e.g. "Welcome"
3. In the dropdown "Embed live conten... | [
{
"content": "\"\"\"\n\nReturns:\n [type]: [description]\n\"\"\"\nimport json\nimport logging\nimport os\nimport uuid\n\nfrom django.contrib import messages\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.decorators import login_required, permission_required\nfrom django.core.except... | [
{
"content": "\"\"\"\n\nReturns:\n [type]: [description]\n\"\"\"\nimport json\nimport logging\nimport os\nimport uuid\n\nfrom django.contrib import messages\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.decorators import login_required, permission_required\nfrom django.core.except... | diff --git a/src/cms/views/pages/page_actions.py b/src/cms/views/pages/page_actions.py
index 914c5c31e2..08e8f11a28 100644
--- a/src/cms/views/pages/page_actions.py
+++ b/src/cms/views/pages/page_actions.py
@@ -509,7 +509,7 @@ def get_pages_list_ajax(request):
page.save()
return JsonResponse({"nolist"... |
cal-itp__benefits-281 | Better HTTP response code handling in Eligibility API
In the Eligibility API `Client`, we currently attempt to parse the response as if it were a JWT, regardless of response code:
From https://github.com/cal-itp/benefits/blob/dev/benefits/eligibility/api.py#L145
```python
try:
r = requests.get(self.verifier... | [
{
"content": "\"\"\"\nThe eligibility application: Eligibility Verification API implementation.\n\"\"\"\nimport datetime\nimport json\nimport logging\nimport uuid\n\nfrom jwcrypto import common as jwcrypto, jwe, jws, jwt\nimport requests\n\nfrom benefits.settings import ALLOWED_HOSTS\n\n\nlogger = logging.getLo... | [
{
"content": "\"\"\"\nThe eligibility application: Eligibility Verification API implementation.\n\"\"\"\nimport datetime\nimport json\nimport logging\nimport uuid\n\nfrom jwcrypto import common as jwcrypto, jwe, jws, jwt\nimport requests\n\nfrom benefits.settings import ALLOWED_HOSTS\n\n\nlogger = logging.getLo... | diff --git a/benefits/eligibility/api.py b/benefits/eligibility/api.py
index 09b7b3b185..a79b535bd0 100644
--- a/benefits/eligibility/api.py
+++ b/benefits/eligibility/api.py
@@ -154,8 +154,13 @@ def _request(self, sub, name):
except requests.HTTPError as e:
raise ApiError(e)
- logger.deb... |
buildbot__buildbot-3873 | Buildbot gives up on EC2 spot instance requests before EC2 does
This ticket is a migrated Trac ticket [2935](http://trac.buildbot.net/ticket/2935)
People contributed to the original ticket: @unknown_contributor, @djmitche
Ticket created on: `Oct 09 2014`
Ticket last modified on: `Dec 19 2015`
---
When Eight receives... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | diff --git a/master/buildbot/worker/ec2.py b/master/buildbot/worker/ec2.py
index 7dba29360fba..8dc4b91f1f6f 100644
--- a/master/buildbot/worker/ec2.py
+++ b/master/buildbot/worker/ec2.py
@@ -599,5 +599,8 @@ def _wait_for_request(self, reservation):
log.msg('%s %s failed to fulfill spot request %s with stat... |
opsdroid__opsdroid-1660 | Add a config option to disable registering a route for /
In the web server by default a route is registered for the base / path. This should be configurable in case a user wants to register their own.
| [
{
"content": "\"\"\"Submodule to handle web requests in opsdroid.\"\"\"\n\nimport json\nimport logging\nimport ssl\n\nfrom aiohttp import web\n\nfrom opsdroid import __version__\n\n\n_LOGGER = logging.getLogger(__name__)\n\n\nclass Web:\n \"\"\"Create class for opsdroid Web server.\"\"\"\n\n def __init__(... | [
{
"content": "\"\"\"Submodule to handle web requests in opsdroid.\"\"\"\n\nimport json\nimport logging\nimport ssl\n\nfrom aiohttp import web\n\nfrom opsdroid import __version__\n\n\n_LOGGER = logging.getLogger(__name__)\n\n\nclass Web:\n \"\"\"Create class for opsdroid Web server.\"\"\"\n\n def __init__(... | diff --git a/opsdroid/configuration/example_configuration.yaml b/opsdroid/configuration/example_configuration.yaml
index e73909f10..c7e468d35 100644
--- a/opsdroid/configuration/example_configuration.yaml
+++ b/opsdroid/configuration/example_configuration.yaml
@@ -37,6 +37,7 @@ welcome-message: true
## Configure the w... |
ansible__molecule-1474 | Docs: Confusing advice on create vs converge playbooks
In the [docs for the Ansible provisioner](https://molecule.readthedocs.io/en/latest/configuration.html#id12) it says (emphasis mine):
> Reserve the create and destroy playbooks for provisioning. Do not attempt to gather facts or perform operations on the provision... | [
{
"content": "# Copyright (c) 2015-2018 Cisco Systems, Inc.\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# rights... | [
{
"content": "# Copyright (c) 2015-2018 Cisco Systems, Inc.\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# rights... | diff --git a/molecule/provisioner/ansible.py b/molecule/provisioner/ansible.py
index ae7107dd27..1cf2434ae0 100644
--- a/molecule/provisioner/ansible.py
+++ b/molecule/provisioner/ansible.py
@@ -50,7 +50,7 @@ class Ansible(base.Base):
attempt to gather facts or perform operations on the provisioned nodes
... |
explosion__spaCy-866 | 💫 Lemmatizer should apply rules on OOV words
@juanmirocks points out in #327 that the lemmatizer fails on OOV words:
```python
>>> nlp.vocab.morphology.lemmatizer(u'endosomes', 'noun', morphology={'number': 'plur'})set([u'endosomes'])
>>> nlp.vocab.morphology.lemmatizer(u'chromosomes', 'noun', morphology={'numb... | [
{
"content": "from __future__ import unicode_literals, print_function\nimport codecs\nimport pathlib\n\nimport ujson as json\n\nfrom .symbols import POS, NOUN, VERB, ADJ, PUNCT\n\n\nclass Lemmatizer(object):\n @classmethod\n def load(cls, path, rules=None):\n index = {}\n exc = {}\n f... | [
{
"content": "from __future__ import unicode_literals, print_function\nimport codecs\nimport pathlib\n\nimport ujson as json\n\nfrom .symbols import POS, NOUN, VERB, ADJ, PUNCT\n\n\nclass Lemmatizer(object):\n @classmethod\n def load(cls, path, rules=None):\n index = {}\n exc = {}\n f... | diff --git a/spacy/lemmatizer.py b/spacy/lemmatizer.py
index 960467a0bcb..630334bf7fe 100644
--- a/spacy/lemmatizer.py
+++ b/spacy/lemmatizer.py
@@ -86,13 +86,16 @@ def lemmatize(string, index, exceptions, rules):
#if string in index:
# forms.append(string)
forms.extend(exceptions.get(string, []))
+ ... |
getnikola__nikola-2108 | output/assets/css/code.css is orphaned?
```
~/blog$ nikola build
Scanning posts................done!
copy_assets:output/assets/css/base.css
Scanning posts................done!
~/blog$
~/blog$ nikola build
Scanning posts................done!
~/blog$ nikola check -f
Scanning posts................done!
WARNING: check: Fi... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2015 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2015 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi... | diff --git a/CHANGES.txt b/CHANGES.txt
index b3c38a8d4f..e273bc4a26 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -11,6 +11,7 @@ Features
Bugfixes
--------
+* Fix false orphan report for code.css and robots.txt (Issue #2106)
* Fix reST post list date formatting error (Issue #2104)
* Deprecated ``RSS_TEASERS``, ``... |
Project-MONAI__MONAI-2229 | If image reader chokes on a file, put the file name into exception message
**Is your feature request related to a problem? Please describe.**
I am running training on a big set (5000) of images, and somewhere in the middle I get `TypeError: stat: path should be string, bytes, os.PathLike or integer, not float`. I have... | [
{
"content": "# Copyright 2020 - 2021 MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by appli... | [
{
"content": "# Copyright 2020 - 2021 MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by appli... | diff --git a/monai/transforms/transform.py b/monai/transforms/transform.py
index 4ef94b2756..ec99d74620 100644
--- a/monai/transforms/transform.py
+++ b/monai/transforms/transform.py
@@ -51,7 +51,7 @@ def apply_transform(transform: Callable, data, map_items: bool = True):
if not isinstance(transform, transform... |
conda__conda-6918 | deprecate 'conda help' in favor of --help CLI flag
With the install on Windows 10:
_platform : win-64 conda version : 4.3.30
conda is private : False conda-env version : 4.3.30
conda-build version : 3.0.22 python version : 3.6.3.final.0
requests version : 2.18.4 root environment : C:\Anaconda3 ... | [
{
"content": "# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\nfrom __future__ import absolute_import, division, print_function, u... | [
{
"content": "# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\nfrom __future__ import absolute_import, division, print_function, u... | diff --git a/conda/cli/main_help.py b/conda/cli/main_help.py
index 59d6baebca1..cb3eee7fc86 100644
--- a/conda/cli/main_help.py
+++ b/conda/cli/main_help.py
@@ -5,7 +5,6 @@
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
from __future__ import absolute_import, division, print_function, unicode_l... |
scikit-image__scikit-image-7392 | In `scikit-image==0.23.1` `img_as_ubyte` stop accepting `np.ulonglong`
### Description:
Code to validate supported types:
https://github.com/scikit-image/scikit-image/blob/ea6c1c637d8e8c377a5e76bd82a7e9a74f9b7b89/skimage/util/dtype.py#L272-L273
Seems like sometimes numpy provides `numpy.ulonglong` dtype that is... | [
{
"content": "import warnings\nfrom warnings import warn\n\nimport numpy as np\n\n\n__all__ = [\n 'img_as_float32',\n 'img_as_float64',\n 'img_as_float',\n 'img_as_int',\n 'img_as_uint',\n 'img_as_ubyte',\n 'img_as_bool',\n 'dtype_limits',\n]\n\n_integer_types = (\n np.int8,\n np.i... | [
{
"content": "import warnings\nfrom warnings import warn\n\nimport numpy as np\n\n\n__all__ = [\n 'img_as_float32',\n 'img_as_float64',\n 'img_as_float',\n 'img_as_int',\n 'img_as_uint',\n 'img_as_ubyte',\n 'img_as_bool',\n 'dtype_limits',\n]\n\n# Some of these may or may not be aliases ... | diff --git a/skimage/util/dtype.py b/skimage/util/dtype.py
index 7aa7a658620..0b69b7b33ac 100644
--- a/skimage/util/dtype.py
+++ b/skimage/util/dtype.py
@@ -15,17 +15,29 @@
'dtype_limits',
]
+# Some of these may or may not be aliases depending on architecture & platform
_integer_types = (
np.int8,
+ np... |
Parsl__parsl-3238 | parsl.providers.cluster_provider _write_submit_script should return nothing, rather than constant True
**Describe the bug**
_write_submit_script in parsl.providers.cluster_provider indicates failure by raising an exception, and so should not be returning a True (or False) value. Instead it should return None by eith... | [
{
"content": "import logging\nfrom abc import abstractmethod\nfrom string import Template\n\nfrom parsl.providers.errors import SchedulerMissingArgs, ScriptPathError\nfrom parsl.launchers.base import Launcher\nfrom parsl.launchers.errors import BadLauncher\nfrom parsl.providers.base import ExecutionProvider\n\n... | [
{
"content": "import logging\nfrom abc import abstractmethod\nfrom string import Template\n\nfrom parsl.providers.errors import SchedulerMissingArgs, ScriptPathError\nfrom parsl.launchers.base import Launcher\nfrom parsl.launchers.errors import BadLauncher\nfrom parsl.providers.base import ExecutionProvider\n\n... | diff --git a/parsl/providers/cluster_provider.py b/parsl/providers/cluster_provider.py
index b7d48e39ba..20fbe62645 100644
--- a/parsl/providers/cluster_provider.py
+++ b/parsl/providers/cluster_provider.py
@@ -91,7 +91,7 @@ def _write_submit_script(self, template, script_filename, job_name, configs):
- ... |
kivy__python-for-android-3027 | Fix sqlalchemy recipe
Fix sqlalchemy build errors and bump sqlalchemy from 1.3.3 to 2.0+.
| [
{
"content": "from pythonforandroid.recipe import CompiledComponentsPythonRecipe\n\n\nclass SQLAlchemyRecipe(CompiledComponentsPythonRecipe):\n name = 'sqlalchemy'\n version = '1.3.3'\n url = 'https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-{version}.tar.gz'\n call_hostpython_via_tar... | [
{
"content": "from pythonforandroid.recipe import PyProjectRecipe\n\n\nclass SQLAlchemyRecipe(PyProjectRecipe):\n name = 'sqlalchemy'\n version = '2.0.30'\n url = 'https://github.com/sqlalchemy/sqlalchemy/archive/refs/tags/rel_{}.tar.gz'\n depends = ['setuptools']\n\n @property\n def versioned... | diff --git a/pythonforandroid/recipes/sqlalchemy/__init__.py b/pythonforandroid/recipes/sqlalchemy/__init__.py
index 9837a59d09..3b6ab683cb 100644
--- a/pythonforandroid/recipes/sqlalchemy/__init__.py
+++ b/pythonforandroid/recipes/sqlalchemy/__init__.py
@@ -1,15 +1,15 @@
-from pythonforandroid.recipe import CompiledCo... |
vllm-project__vllm-1631 | Error while creating inference server with EleutherAI/gpt-j-6b model.
I am trying to run GPTj-6b on an instance with 8 L4 GPU getting the below error. Using version 0.2. but tried with latest as well.
python -m vllm.entrypoints.api_server --model EleutherAI/gpt-j-6b --tensor-parallel-size 8 --dtype float1... | [
{
"content": "# coding=utf-8\n# Adapted from\n# https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/gptj/modeling_gptj.py\n# Copyright 2023 The vLLM team.\n# Copyright 2021 The EleutherAI and HuggingFace Teams. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.... | [
{
"content": "# coding=utf-8\n# Adapted from\n# https://github.com/huggingface/transformers/blob/v4.28.0/src/transformers/models/gptj/modeling_gptj.py\n# Copyright 2023 The vLLM team.\n# Copyright 2021 The EleutherAI and HuggingFace Teams. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.... | diff --git a/vllm/model_executor/models/gpt_j.py b/vllm/model_executor/models/gpt_j.py
index 3606fdc76fb..f61eab73b3a 100644
--- a/vllm/model_executor/models/gpt_j.py
+++ b/vllm/model_executor/models/gpt_j.py
@@ -250,7 +250,7 @@ def load_weights(self,
if att_weight_name not in name:
... |
Lightning-AI__torchmetrics-1052 | Usage of MetricCollection throws warnings that compute method was called before update.
## 🐛 Bug
MetricCollection is using groups now. For e.g. Precision(), Recall(), F1Score() are put in a same group. These groups aren't being updated. Warnings are issued, but I've not checked whether the results are calculated co... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 319943835bd..dcb9e90b19e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -78,6 +78,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed default value for `mdmc_average` in `Accuracy` ([#1036](https://github.com/PyTorchLightning/met... |
arviz-devs__arviz-1038 | plot_posterior writes auto instead of point estimate name
**Describe the bug**
`plot_posterior` should write the name of the point estimate, however it currently writes `auto` if `auto` is passed as point estimate. This can be seen in the [docs example](https://arviz-devs.github.io/arviz/examples/matplotlib/mpl_plot_p... | [
{
"content": "\"\"\"Plot posterior densities.\"\"\"\nfrom typing import Optional\n\nfrom ..data import convert_to_dataset\nfrom .plot_utils import (\n xarray_var_iter,\n _scale_fig_size,\n default_grid,\n get_coords,\n filter_plotters_list,\n get_plotting_function,\n)\nfrom ..utils import _var... | [
{
"content": "\"\"\"Plot posterior densities.\"\"\"\nfrom typing import Optional\n\nfrom ..data import convert_to_dataset\nfrom .plot_utils import (\n xarray_var_iter,\n _scale_fig_size,\n default_grid,\n get_coords,\n filter_plotters_list,\n get_plotting_function,\n)\nfrom ..utils import _var... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index aa50c73bdd..6b472923b9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@
* Rename flat_inference_data_to_dict (#1003)
* Violinplot: fix histogram (#997)
* Convert all instances of SyntaxWarning to UserWarning (#1016)
+* Fix `point_estimate` in `plot_posteri... |
urllib3__urllib3-1018 | Chunked uploads do not deduplicate the Host header field.
When using `urlopen` with a headers dictionary that includes the `Host` header, the `Host` header from the user will be preferred to the automatic one added by httplib. This is not true when calling `urlopen` with `chunked=True`, because `request_chunked` does n... | [
{
"content": "from __future__ import absolute_import\nimport datetime\nimport logging\nimport os\nimport sys\nimport socket\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport warnings\nfrom .packages import six\nfrom .packages.six.moves.http_client import HTTPConnection as _HTTPConnectio... | [
{
"content": "from __future__ import absolute_import\nimport datetime\nimport logging\nimport os\nimport sys\nimport socket\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport warnings\nfrom .packages import six\nfrom .packages.six.moves.http_client import HTTPConnection as _HTTPConnectio... | diff --git a/CHANGES.rst b/CHANGES.rst
index 2546fe2826..8999505c0f 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -18,6 +18,8 @@ dev (master)
* Empty filenames in multipart headers are now emitted as such, rather than
being supressed. (Issue #1015)
+* Prefer user-supplied Host headers on chunked uploads. (Issue #... |
ESMCI__cime-515 | .cesm_proj causes screwy things to happen when it has multiple lines
Danica noticed this. She had a list of project numbers in her ~/.cesm_proj and in cime4 -- it just took the first and runs happily. In cime5.0.9 -- however, it reads in the whole list, and then hangs when it tries to submit. The utility in having a li... | [
{
"content": "\"\"\"\nCommon functions used by cime python scripts\nWarning: you cannot use CIME Classes in this module as it causes circular dependencies\n\"\"\"\nimport logging, gzip, sys, os, time, re, shutil, glob\n\n# Return this error code if the scripts worked but tests failed\nTESTS_FAILED_ERR_CODE = 10... | [
{
"content": "\"\"\"\nCommon functions used by cime python scripts\nWarning: you cannot use CIME Classes in this module as it causes circular dependencies\n\"\"\"\nimport logging, gzip, sys, os, time, re, shutil, glob\n\n# Return this error code if the scripts worked but tests failed\nTESTS_FAILED_ERR_CODE = 10... | diff --git a/utils/python/CIME/utils.py b/utils/python/CIME/utils.py
index 74854d7f808..109c8854106 100644
--- a/utils/python/CIME/utils.py
+++ b/utils/python/CIME/utils.py
@@ -530,7 +530,10 @@ def get_project(machobj=None):
projectfile = os.path.abspath(os.path.join(os.path.expanduser("~"), ".cesm_proj"))
if... |
conan-io__conan-15834 | [bug] Problem with ``parse_musl_libc``
### Environment details
Introduced in https://github.com/conan-io/conan/pull/15683
cc @jwillikers
```python
if ldd_output is None:
first_line = ldd_output.partition("\n")[0]
```
This is broken and will crash. Realized because the IDE linter was marking it.
C... | [
{
"content": "import os\nimport platform\nimport re\nimport tempfile\nimport textwrap\n\nfrom conan.api.output import ConanOutput\nfrom conans.model.version import Version\nfrom conans.util.files import load, save\nfrom conans.util.runners import check_output_runner, detect_runner\n\n\ndef detect_os():\n the... | [
{
"content": "import os\nimport platform\nimport re\nimport tempfile\nimport textwrap\n\nfrom conan.api.output import ConanOutput\nfrom conans.model.version import Version\nfrom conans.util.files import load, save\nfrom conans.util.runners import check_output_runner, detect_runner\n\n\ndef detect_os():\n the... | diff --git a/conan/internal/api/detect_api.py b/conan/internal/api/detect_api.py
index f7449347694..b4edeb5683e 100644
--- a/conan/internal/api/detect_api.py
+++ b/conan/internal/api/detect_api.py
@@ -172,7 +172,7 @@ def _detect_musl_libc(ldd="/usr/bin/ldd"):
check_output_runner(f"{ldd}", stderr=stderr, ig... |
systemd__mkosi-2228 | Debian tools which use /etc/alternatives break
Regression caused by https://github.com/systemd/mkosi/pull/2201, already reported in https://github.com/systemd/mkosi/issues/2206.
When putting a keyring in `/etc/apt/trusted.gpg.d`, eventually `apt-key` will be called, which will make a call to `awk`. On debian that is... | [
{
"content": "# SPDX-License-Identifier: LGPL-2.1+\nimport contextlib\nimport enum\nimport logging\nimport os\nimport subprocess\nimport sys\nfrom collections.abc import Mapping, Sequence\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom mkosi.log import ARG_DEBUG_SHELL\nfrom mkosi.mounts import fi... | [
{
"content": "# SPDX-License-Identifier: LGPL-2.1+\nimport contextlib\nimport enum\nimport logging\nimport os\nimport subprocess\nimport sys\nfrom collections.abc import Mapping, Sequence\nfrom pathlib import Path\nfrom typing import Optional\n\nfrom mkosi.log import ARG_DEBUG_SHELL\nfrom mkosi.mounts import fi... | diff --git a/mkosi/bubblewrap.py b/mkosi/bubblewrap.py
index f49154dc8..56c5db1da 100644
--- a/mkosi/bubblewrap.py
+++ b/mkosi/bubblewrap.py
@@ -86,6 +86,7 @@ def bwrap(
# This mount is writable so bwrap can create extra directories or symlinks inside of it as needed. This isn't a
# problem as the pac... |
biolab__orange3-5279 | OWDatasets: Reduce width
<!--
If something's not right with Orange, fill out the bug report template at:
https://github.com/biolab/orange3/issues/new?assignees=&labels=bug+report&template=bug_report.md&title=
If you have an idea for a new feature, fill out the feature request template at:
https://github.com/biola... | [
{
"content": "import logging\nimport numbers\nimport os\nimport traceback\n\nfrom xml.sax.saxutils import escape\nfrom concurrent.futures import ThreadPoolExecutor, Future\n\nfrom types import SimpleNamespace\nfrom typing import Optional, Dict, Tuple, List\nfrom collections import namedtuple\n\nfrom AnyQt.QtWid... | [
{
"content": "import logging\nimport numbers\nimport os\nimport traceback\n\nfrom xml.sax.saxutils import escape\nfrom concurrent.futures import ThreadPoolExecutor, Future\n\nfrom types import SimpleNamespace\nfrom typing import Optional, Dict, Tuple, List\nfrom collections import namedtuple\n\nfrom AnyQt.QtWid... | diff --git a/Orange/widgets/data/owdatasets.py b/Orange/widgets/data/owdatasets.py
index 21c0c1309b0..caf3cafb5cd 100644
--- a/Orange/widgets/data/owdatasets.py
+++ b/Orange/widgets/data/owdatasets.py
@@ -377,10 +377,13 @@ def __set_index(self, f):
self.__on_selection
)
+ scw = self.view.... |
secdev__scapy-758 | tcpdump: expression rejects all packets
Hi there,
any ideas on the following error?
It is a simple arp sniff that fails in a docker image:
```sniff (prn=arp_handler, filter="arp", store=0)```
```2017-07-16 16:24:09,stdout,scapy.error.Scapy_Exception: Filter parse error
2017-07-16 16:24:09,stdout, raise Scapy_... | [
{
"content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## This program is published under a GPLv2 license\n\n\"\"\"\nLinux specific functions.\n\"\"\"\n\nfrom __future__ import absolute_import\nimport sy... | [
{
"content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## This program is published under a GPLv2 license\n\n\"\"\"\nLinux specific functions.\n\"\"\"\n\nfrom __future__ import absolute_import\nimport sy... | diff --git a/scapy/arch/linux.py b/scapy/arch/linux.py
index 30cdb416cea..9ad10235e1c 100644
--- a/scapy/arch/linux.py
+++ b/scapy/arch/linux.py
@@ -139,12 +139,17 @@ def attach_filter(s, bpf_filter, iface):
conf.iface if iface is None else iface,
bpf_filter,
))
- except OSError as... |
mabel-dev__opteryx-1691 | 🪲 VIEWs load error should be in debug mode only
### Thank you for taking the time to report a problem with Opteryx.
_To help us to respond to your request we ask that you try to provide the below detail about the bug._
**Describe the bug** _A clear and specific description of what the bug is. What the error, incor... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, s... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, s... | diff --git a/opteryx/__version__.py b/opteryx/__version__.py
index 53678cab5..49715a78b 100644
--- a/opteryx/__version__.py
+++ b/opteryx/__version__.py
@@ -1,4 +1,4 @@
-__build__ = 523
+__build__ = 526
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... |
googleapis__python-spanner-django-214 | dbapi: ensure that Cursor.__commit_preceding_batch flushes everything on DQL
If we encounter a DQL statement such as SELECT, we MUST flush any previously batched operations and run them immediately otherwise we encounter a situation where duplicate table create statements will be issued because the command issued right... | [
{
"content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/spanner/dbapi/cursor.py b/spanner/dbapi/cursor.py
index d9baa4e0d9..bb2cbf8ac6 100644
--- a/spanner/dbapi/cursor.py
+++ b/spanner/dbapi/cursor.py
@@ -165,7 +165,14 @@ def __execute_insert_no_params(self, transaction, sql):
def __commit_preceding_batch(self, op=None):
last_op = self.__last_op
... |
pytorch__ignite-846 | Bug with average="recall" in Confusion matrix
## 🐛 Bug description
```python
from ignite.metrics import ConfusionMatrix
cm = ConfusionMatrix(num_classes=3, average="recall")
cm.confusion_matrix[0, 0] = 50
cm.confusion_matrix[0, 1] = 50
cm.confusion_matrix[0, 2] = 50
cm.confusion_matrix[1, 0] = 24
cm.... | [
{
"content": "import numbers\nfrom typing import Optional, Union, Any, Callable, Sequence\n\nimport torch\n\nfrom ignite.metrics import Metric, MetricsLambda\nfrom ignite.exceptions import NotComputableError\nfrom ignite.metrics.metric import sync_all_reduce, reinit__is_reduced\n\n__all__ = [\"ConfusionMatrix\"... | [
{
"content": "import numbers\nfrom typing import Optional, Union, Any, Callable, Sequence\n\nimport torch\n\nfrom ignite.metrics import Metric, MetricsLambda\nfrom ignite.exceptions import NotComputableError\nfrom ignite.metrics.metric import sync_all_reduce, reinit__is_reduced\n\n__all__ = [\"ConfusionMatrix\"... | diff --git a/ignite/metrics/confusion_matrix.py b/ignite/metrics/confusion_matrix.py
index d4d986ee51c7..9ad089101d98 100644
--- a/ignite/metrics/confusion_matrix.py
+++ b/ignite/metrics/confusion_matrix.py
@@ -120,7 +120,7 @@ def compute(self) -> torch.Tensor:
if self.average == "samples":
... |
psf__black-2852 | Make all documentation files .md
For consistency and ease of contributing. Or at least, figure out why we can't use .md for everything.
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/stable/config\n\n# -- Path setup ------------------------------... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/stable/config\n\n# -- Path setup ------------------------------... | diff --git a/docs/conf.py b/docs/conf.py
index 2801e0eed19..e9fdebb5546 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -105,11 +105,15 @@ def make_pypi_svg(version: str) -> None:
# Prettier support formatting some MyST syntax but not all, so let's disable the
# unsupported yet still enabled by default ones.
myst_di... |
pytest-dev__pytest-django-885 | Email based user model without username field
I recently worked on a Django project with a custom user model, which uses an email as the username field and does not use the original username field. To make pytest-django work I have locally overwritten some fixtures of pytest-django.
To eventually get rid of the over... | [
{
"content": "\"\"\"All pytest-django fixtures\"\"\"\n\n\nimport os\nfrom contextlib import contextmanager\nfrom functools import partial\n\nimport pytest\n\nfrom . import live_server_helper\nfrom .django_compat import is_django_unittest\nfrom .lazy_django import skip_if_no_django\n\n__all__ = [\n \"django_d... | [
{
"content": "\"\"\"All pytest-django fixtures\"\"\"\n\n\nimport os\nfrom contextlib import contextmanager\nfrom functools import partial\n\nimport pytest\n\nfrom . import live_server_helper\nfrom .django_compat import is_django_unittest\nfrom .lazy_django import skip_if_no_django\n\n__all__ = [\n \"django_d... | diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py
index df163d661..392ca6d86 100644
--- a/pytest_django/fixtures.py
+++ b/pytest_django/fixtures.py
@@ -293,11 +293,12 @@ def admin_user(db, django_user_model, django_username_field):
# so we can assume so as well.
user = UserModel._defa... |
quantumlib__Cirq-5211 | cirq-web doesn't support LineQubit
```python
import cirq
import cirq_web
cirq_circuit = cirq.Circuit(cirq.H(cirq.LineQubit(0)))
cirq_web.Circuit3D(cirq_circuit).generate_html_file(
file_name="circuit_viewer.html",
open_in_browser=True,
)
```
results in
```
AttributeError: 'LineQubit' object has... | [
{
"content": "# Copyright 2021 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 2021 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-web/cirq_web/circuits/circuit.py b/cirq-web/cirq_web/circuits/circuit.py
index e610253d5a0..348b0913664 100644
--- a/cirq-web/cirq_web/circuits/circuit.py
+++ b/cirq-web/cirq_web/circuits/circuit.py
@@ -87,5 +87,10 @@ def _build_3D_symbol(self, operation, moment) -> Operation3DSymbol:
symbol_... |
gratipay__gratipay.com-4662 | Replace temporary 'email2' param with 'email' when verifying emails
In https://github.com/gratipay/gratipay.com/pull/3965, we changed the value of the `email` parameter to be query-string encoded instead of raw text. To make this backward compatible, we changed the parameter name from `email` to `email2` and retained s... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport uuid\nfrom datetime import timedelta\n\nfrom aspen.utils import utcnow\nfrom psycopg2 import IntegrityError\n\nimport gratipay\nfrom gratipay.exceptions import EmailAlreadyVerified... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport uuid\nfrom datetime import timedelta\n\nfrom aspen.utils import utcnow\nfrom psycopg2 import IntegrityError\n\nimport gratipay\nfrom gratipay.exceptions import EmailAlreadyVerified... | diff --git a/gratipay/models/participant/email.py b/gratipay/models/participant/email.py
index 029fe337ee..7f6da22007 100644
--- a/gratipay/models/participant/email.py
+++ b/gratipay/models/participant/email.py
@@ -159,7 +159,7 @@ def get_email_verification_link(self, c, email, *packages):
nonce = self.get_ema... |
sunpy__sunpy-5860 | Adding units for CDF files of Solar Orbiter/EPD [sunpy.io.cdf]
### Description
The nice new function `sunpy.io.cdf.read_cdf` has problems understanding the units for differential intensity from the CDF files of the Solar Orbiter EPD instrument suite (EPT, STEP, HET, SIS).
``` python
>>> read_cdf('solo_L2_epd-ep... | [
{
"content": "import cdflib\nimport pandas as pd\nfrom cdflib.epochs import CDFepoch\n\nimport astropy.units as u\n\nfrom sunpy import log\nfrom sunpy.timeseries import GenericTimeSeries\nfrom sunpy.util.exceptions import warn_user\n\n__all__ = ['read_cdf']\n\n\ndef read_cdf(fname):\n \"\"\"\n Read a CDF ... | [
{
"content": "import cdflib\nimport pandas as pd\nfrom cdflib.epochs import CDFepoch\n\nimport astropy.units as u\n\nfrom sunpy import log\nfrom sunpy.timeseries import GenericTimeSeries\nfrom sunpy.util.exceptions import warn_user\n\n__all__ = ['read_cdf']\n\n\ndef read_cdf(fname):\n \"\"\"\n Read a CDF ... | diff --git a/sunpy/io/cdf.py b/sunpy/io/cdf.py
index ea2b1d013f2..75af49b7cc9 100644
--- a/sunpy/io/cdf.py
+++ b/sunpy/io/cdf.py
@@ -170,6 +170,9 @@ def read_cdf(fname):
'1/(cm**2-s-sr-MeV/nuc.)': 1 / (u.cm**2 * u.s * u.sr * u.MeV),
'1/(cm^2 sec ster MeV)': 1 / (u.cm**2 * u.s * u.sr * ... |
tensorflow__model-optimization-576 | Pruning: Training with Near 100% Target Sparsity Fails
**Describe the bug**
Pruning with high target sparsity (e.g. 0.99) causes a error.
**System information**
TensorFlow installed from (source or binary):
TensorFlow version: any
TensorFlow Model Optimization version: 0.2.1
Python version: any
**Des... | [
{
"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/RELEASE.md b/RELEASE.md
index e3f030baf..a5959bef9 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -62,6 +62,7 @@ Tested against TensorFlow nightly, and Python 3.
Keras pruning API:
Tested against TensorFlow 1.14.0, 2.0.0, and nightly, and Python 3.
+Pruning now doesn't remove the last remaining connection... |
openai__gym-220 | Invalid assert in box2d/lunar_lander.py
I'm trying to use LunarLander-v2, but I'm getting an immediate error upon instantiation:
```
>>> import gym
>>> ll = gym.make('LunarLander-v2')
[2016-06-19 04:35:14,379] Making new env: LunarLander-v2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Fil... | [
{
"content": "import sys, math\nimport numpy as np\n\nimport Box2D\nfrom Box2D.b2 import (edgeShape, circleShape, fixtureDef, polygonShape, revoluteJointDef, contactListener)\n\nimport gym\nfrom gym import spaces\nfrom gym.utils import seeding\n\n# Rocket trajectory optimization is a classic topic in Optimal Co... | [
{
"content": "import sys, math\nimport numpy as np\n\nimport Box2D\nfrom Box2D.b2 import (edgeShape, circleShape, fixtureDef, polygonShape, revoluteJointDef, contactListener)\n\nimport gym\nfrom gym import spaces\nfrom gym.utils import seeding\n\n# Rocket trajectory optimization is a classic topic in Optimal Co... | diff --git a/gym/envs/box2d/lunar_lander.py b/gym/envs/box2d/lunar_lander.py
index 9fe4e5aecbb..61ce6428abf 100644
--- a/gym/envs/box2d/lunar_lander.py
+++ b/gym/envs/box2d/lunar_lander.py
@@ -86,13 +86,14 @@ def __init__(self):
self.particles = []
self.prev_reward = None
- self._reset()
... |
DDMAL__CantusDB-726 | Ensure that dummy users (i.e. old indexers) can't log in.
Currently, on NewCantus we have created dummy users for people who had an Indexer object but no User account on OldCantus. These dummy users have randomly generated email addresses and no passwords, the rationale being that a user with no password will not be ab... | [
{
"content": "from django.core.management.base import BaseCommand\nfrom django.contrib.auth import get_user_model\nimport requests, json\nfrom faker import Faker\n\nINDEXER_ID_FILE = \"indexer_list.txt\"\n\n\ndef get_id_list(file_path):\n indexer_list = []\n file = open(file_path, \"r\")\n for line in ... | [
{
"content": "from django.core.management.base import BaseCommand\nfrom django.contrib.auth import get_user_model\nimport requests, json\nfrom faker import Faker\n\nINDEXER_ID_FILE = \"indexer_list.txt\"\n\n\ndef get_id_list(file_path):\n indexer_list = []\n file = open(file_path, \"r\")\n for line in ... | diff --git a/django/cantusdb_project/main_app/management/commands/sync_indexers.py b/django/cantusdb_project/main_app/management/commands/sync_indexers.py
index 9dd6cfcf7..ceb98b15d 100644
--- a/django/cantusdb_project/main_app/management/commands/sync_indexers.py
+++ b/django/cantusdb_project/main_app/management/comma... |
GeotrekCE__Geotrek-admin-1541 | Infrastructure CONDITION - Should not be mandatory
Many will just localize their infrastructures.
| [
{
"content": "from django.db import models\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib.gis.db import models as gismodels\n\nfrom extended_choices import Choices\nfrom mapentity.models import MapEntityMixin\n\nfrom geotrek.common.utils import classproperty\nfrom geotrek.core.mod... | [
{
"content": "from django.db import models\nfrom django.utils.translation import ugettext_lazy as _\nfrom django.contrib.gis.db import models as gismodels\n\nfrom extended_choices import Choices\nfrom mapentity.models import MapEntityMixin\n\nfrom geotrek.common.utils import classproperty\nfrom geotrek.core.mod... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index 25f47b29fa..56fd866bd8 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -7,6 +7,7 @@ CHANGELOG
**Bug fixes**
+* Condition field of infrastructures is no more required
* Fix zipfile detection at import.
* Fix error handling at import (raise exc... |
hydroshare__hydroshare-1690 | "Web App" needs a space (not "WebApp")
On the open web app button there needs to be a space:

| [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('hs_tools_resource', '0009_auto_20160929_1543'),\n ]\n\n operations = [\n migrations.RemoveField(\... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('hs_tools_resource', '0009_auto_20160929_1543'),\n ]\n\n operations = [\n migrations.AlterField(\n... | diff --git a/hs_tools_resource/migrations/0010_auto_20161203_1913.py b/hs_tools_resource/migrations/0010_auto_20161203_1913.py
index 51698c0636..788a0073ef 100644
--- a/hs_tools_resource/migrations/0010_auto_20161203_1913.py
+++ b/hs_tools_resource/migrations/0010_auto_20161203_1913.py
@@ -11,14 +11,15 @@ class Migrati... |
rlworkgroup__garage-1598 | garage_benchmark can not run without Google Cloud credential
By default, log files in benchmark will not upload to GCP storage. However, now garage_benchmark cannot run without GCP credential, and will get errors like `google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials.` @gita... | [
{
"content": "\"\"\"Helper functions for benchmarks.\n\nA decorator and a function are provided for benchmarks. They essentially\ntake care log directory configuration and result plotting.\n\nThe decorator can be with or without parameters to specify options for\nplotting and JSON exporting used for automatic b... | [
{
"content": "\"\"\"Helper functions for benchmarks.\n\nA decorator and a function are provided for benchmarks. They essentially\ntake care log directory configuration and result plotting.\n\nThe decorator can be with or without parameters to specify options for\nplotting and JSON exporting used for automatic b... | diff --git a/benchmarks/src/garage_benchmarks/helper.py b/benchmarks/src/garage_benchmarks/helper.py
index ca204f961f..87d401272e 100644
--- a/benchmarks/src/garage_benchmarks/helper.py
+++ b/benchmarks/src/garage_benchmarks/helper.py
@@ -45,8 +45,6 @@ def my_benchmarks():
_log_dir = None
_auto = False
-_bucket = s... |
kartoza__prj.app-815 | Error when spammer tries to hit sponsors page
I am getting lots of errors like this:
```python
ERROR 2018-02-20 01:59:48,578 base 500 140635683981056 Sentry responded with an error: HTTP Error 502: Bad Gateway (url: http://sentry.kartoza.com/api/8/store/)
{u'culprit': u'changes.views.sponsor in get_object',
u'ev... | [
{
"content": "__author__ = 'rischan'\n\n\nimport os\nimport time\nimport logging\n\nfrom django.core.urlresolvers import reverse\nfrom django.db.models import Q\nfrom django.shortcuts import get_object_or_404, render\nfrom django.http import HttpResponse\nfrom django.views.generic import (\n TemplateView,\n ... | [
{
"content": "__author__ = 'rischan'\n\n\nimport os\nimport time\nimport logging\n\nfrom django.core.urlresolvers import reverse\nfrom django.db.models import Q\nfrom django.shortcuts import get_object_or_404, render\nfrom django.http import HttpResponse\nfrom django.views.generic import (\n TemplateView,\n ... | diff --git a/django_project/changes/views/sponsor.py b/django_project/changes/views/sponsor.py
index cd0f14d78..855390385 100644
--- a/django_project/changes/views/sponsor.py
+++ b/django_project/changes/views/sponsor.py
@@ -266,8 +266,11 @@ def get_object(self, queryset=None):
project_slug = self.kwargs.g... |
mathesar-foundation__mathesar-2317 | InternalError while running the install script for demo mode
## Description
<!-- A clear and concise description of what the bug is. -->
While executing the `load_datasets(engine)` module of the install.py script of the demo app, the following error occurs:
```
InternalError: (psycopg2.errors.DependentObjectsStill... | [
{
"content": "import bz2\nimport os\n\nfrom sqlalchemy import text\nfrom sqlalchemy.exc import OperationalError\n\nfrom db.engine import create_future_engine\n\nfrom demo.arxiv_skeleton import setup_and_register_schema_for_receiving_arxiv_data\nfrom mathesar.models.base import Table, Schema, PreviewColumnSettin... | [
{
"content": "import bz2\nimport os\n\nfrom sqlalchemy import text\nfrom sqlalchemy.exc import OperationalError\n\nfrom db.engine import create_future_engine\n\nfrom demo.arxiv_skeleton import setup_and_register_schema_for_receiving_arxiv_data\nfrom mathesar.models.base import Table, Schema, PreviewColumnSettin... | diff --git a/demo/install.py b/demo/install.py
index da100a04b0..414e6387b1 100644
--- a/demo/install.py
+++ b/demo/install.py
@@ -39,7 +39,7 @@ def _load_library_dataset(engine):
Destructive, and will knock out any previous "Library Management"
schema in the given database.
"""
- drop_schema_query = ... |
django-oscar__django-oscar-2441 | PhoneNumberField breaks customer address registration
PhoneNumber cause TypeError on json encoding for saving the billing address in session
Thats the same error as #1067 but for billing addresses.
| [
{
"content": "class CheckoutSessionData(object):\n \"\"\"\n Responsible for marshalling all the checkout session data\n\n Multi-stage checkouts often require several forms to be submitted and their\n data persisted until the final order is placed. This class helps store and\n organise checkout fo... | [
{
"content": "class CheckoutSessionData(object):\n \"\"\"\n Responsible for marshalling all the checkout session data\n\n Multi-stage checkouts often require several forms to be submitted and their\n data persisted until the final order is placed. This class helps store and\n organise checkout fo... | diff --git a/src/oscar/apps/checkout/utils.py b/src/oscar/apps/checkout/utils.py
index e670d85096b..ef0827353f1 100644
--- a/src/oscar/apps/checkout/utils.py
+++ b/src/oscar/apps/checkout/utils.py
@@ -165,7 +165,13 @@ def bill_to_new_address(self, address_fields):
"""
Store address fields for a billin... |
comic__grand-challenge.org-3116 | Annotation CIV disapears after uploading image CIV
**Describe the bug**
When uploading a Generic Overlay CIV to an archive item that contains one or multiple annotations CIVs (tested with 2D bounding box and point annotations), those annotations disappear.
**To Reproduce**
Steps to reproduce the behavior:
1. Go t... | [
{
"content": "from celery import chain, group, shared_task\nfrom django.conf import settings\nfrom django.db import transaction\nfrom django.db.transaction import on_commit\n\nfrom grandchallenge.archives.models import Archive, ArchiveItem\nfrom grandchallenge.cases.models import Image, RawImageUploadSession\nf... | [
{
"content": "from celery import chain, group, shared_task\nfrom django.conf import settings\nfrom django.db import transaction\nfrom django.db.transaction import on_commit\n\nfrom grandchallenge.archives.models import Archive, ArchiveItem\nfrom grandchallenge.cases.models import Image, RawImageUploadSession\nf... | diff --git a/app/grandchallenge/archives/static/archives/js/archive_item_update.mjs b/app/grandchallenge/archives/static/archives/js/archive_item_update.mjs
new file mode 100644
index 0000000000..1b97d0775f
--- /dev/null
+++ b/app/grandchallenge/archives/static/archives/js/archive_item_update.mjs
@@ -0,0 +1,10 @@
+$('#... |
pypi__warehouse-669 | Figure out uWSGI Configuration Options
We're currently serving Warehouse on Heroku using gunicorn with the eventlet workers. I started using gunicorn because it's simple, and eventually switched from sync to eventlet workers so that we weren't trivially DoSable by having someone hold open connections (since Heroku's ro... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/Dockerfile b/Dockerfile
index 1182cf97c2ec..8c769304d3dd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -23,6 +23,7 @@ RUN set -x \
&& apt-get install gcc libpq-dev libffi-dev --no-install-recommends -y \
&& pip install -U pip setuptools \
&& pip install pyinotify \
+ && pip install -c requi... |
obspy__obspy-2509 | Cannot write zero sample rate trace data as miniSEED
**Description of bug**
ObsPy cannot write zero sample rate miniSEED. This is important for non time series data, such as LOG channels.
**To reproduce the bug**
1.) Download some zero sample rate LOG data from the DMC.
e.g. http://service.iris.edu/fdsnws/datas... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nMSEED bindings to ObsPy core module.\n\"\"\"\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nfrom future.builtins import * # NOQA\nfrom future.utils import native_str\n\nimport ctypes as C # NOQA\nim... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nMSEED bindings to ObsPy core module.\n\"\"\"\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nfrom future.builtins import * # NOQA\nfrom future.utils import native_str\n\nimport ctypes as C # NOQA\nim... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 8e4eaa2fbf5..71c79ff688f 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -101,6 +101,7 @@ master:
to int32 data, otherwise raises ObsPyMSEEDError. (see #2356)
* The recordanalyzer can now detect calibration blockettes 300, 310,
and 320 (see #2370).
+ ... |
encode__django-rest-framework-7389 | Error mapping Python regex to OpenAPI.
## Checklist
- [ v ] I have verified that that issue exists against the `master` branch of Django REST framework.
- [ v ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [ v ] This is not a usage question. (Those should be dir... | [
{
"content": "import re\nimport warnings\nfrom collections import OrderedDict\nfrom decimal import Decimal\nfrom operator import attrgetter\nfrom urllib.parse import urljoin\n\nfrom django.core.validators import (\n DecimalValidator, EmailValidator, MaxLengthValidator, MaxValueValidator,\n MinLengthValida... | [
{
"content": "import re\nimport warnings\nfrom collections import OrderedDict\nfrom decimal import Decimal\nfrom operator import attrgetter\nfrom urllib.parse import urljoin\n\nfrom django.core.validators import (\n DecimalValidator, EmailValidator, MaxLengthValidator, MaxValueValidator,\n MinLengthValida... | diff --git a/rest_framework/schemas/openapi.py b/rest_framework/schemas/openapi.py
index 9b3082822a..9774a94c76 100644
--- a/rest_framework/schemas/openapi.py
+++ b/rest_framework/schemas/openapi.py
@@ -554,7 +554,9 @@ def map_field_validators(self, field, schema):
if isinstance(v, URLValidator):
... |
django-cms__django-cms-3265 | Working with AliasPlugin crashes in Django 1.4.x
Fresh djangocms-installer install on Py2.7.5 and Dj1.4.13. Creating an AliasPlugin works fine, but dragging it into a placeholder, or attempting to delete one produces the error below. Testing was performed with a normal TextPlugin and a normal and otherwise-empty, Place... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom cms.models import CMSPlugin, Placeholder\nfrom cms.utils.compat.dj import python_2_unicode_compatible\nfrom django.db import models\n\n\n@python_2_unicode_compatible\nclass AliasPluginModel(CMSPlugin):\n plugin = models.ForeignKey(CMSPlugin, editable=False, related... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom cms.models import CMSPlugin, Placeholder\nfrom cms.utils.compat.dj import python_2_unicode_compatible\nfrom django.utils.encoding import force_text\nfrom django.db import models\n\n\n@python_2_unicode_compatible\nclass AliasPluginModel(CMSPlugin):\n plugin = models... | diff --git a/cms/models/aliaspluginmodel.py b/cms/models/aliaspluginmodel.py
index a49c9fe374d..da3dd0d98ee 100644
--- a/cms/models/aliaspluginmodel.py
+++ b/cms/models/aliaspluginmodel.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from cms.models import CMSPlugin, Placeholder
from cms.utils.compat.dj import python_2_u... |
PokemonGoF__PokemonGo-Bot-2305 | evolve_all "all" is not working
### Expected Behavior
Bot would try to evolve all eligible pokemon when "evolve_all": "all" is set
### Actual Behavior
Bot does not evolve anything when "evolve_all": "all" is set. If I set it to "evolve_all": "all,Weedle" I get the following output:
```
[19:11:08] Starting Pokemon... | [
{
"content": "from pokemongo_bot import logger\nfrom pokemongo_bot.human_behaviour import sleep\nfrom pokemongo_bot.item_list import Item\nfrom pokemongo_bot.cell_workers.base_task import BaseTask\n\nclass EvolveAll(BaseTask):\n def initialize(self):\n self.evolve_all = self.config.get('evolve_all', [... | [
{
"content": "from pokemongo_bot import logger\nfrom pokemongo_bot.human_behaviour import sleep\nfrom pokemongo_bot.item_list import Item\nfrom pokemongo_bot.cell_workers.base_task import BaseTask\n\nclass EvolveAll(BaseTask):\n def initialize(self):\n self.evolve_all = self.config.get('evolve_all', [... | diff --git a/pokemongo_bot/cell_workers/evolve_all.py b/pokemongo_bot/cell_workers/evolve_all.py
index 7a7a19e020..38a3a32d13 100644
--- a/pokemongo_bot/cell_workers/evolve_all.py
+++ b/pokemongo_bot/cell_workers/evolve_all.py
@@ -9,9 +9,10 @@ def initialize(self):
self.evolve_speed = self.config.get('evolve_s... |
netbox-community__netbox-4303 | IP Prefix Family returned doesn't match swagger definition
### Environment
* Python version: 3.7.6
* NetBox version: v2.7.7
Swagger definition for Prefix.Family does not match the swagger definition.
### Steps to Reproduce
1. Get a prefix object `wget http://netbox/api/ipam/prefixes/210/`
2. Notice object ... | [
{
"content": "from drf_yasg import openapi\nfrom drf_yasg.inspectors import FieldInspector, NotHandled, PaginatorInspector, FilterInspector, SwaggerAutoSchema\nfrom drf_yasg.utils import get_serializer_ref_name\nfrom rest_framework.fields import ChoiceField\nfrom rest_framework.relations import ManyRelatedField... | [
{
"content": "from drf_yasg import openapi\nfrom drf_yasg.inspectors import FieldInspector, NotHandled, PaginatorInspector, FilterInspector, SwaggerAutoSchema\nfrom drf_yasg.utils import get_serializer_ref_name\nfrom rest_framework.fields import ChoiceField\nfrom rest_framework.relations import ManyRelatedField... | diff --git a/docs/release-notes/version-2.7.md b/docs/release-notes/version-2.7.md
index e32b9d3555c..9743b15d982 100644
--- a/docs/release-notes/version-2.7.md
+++ b/docs/release-notes/version-2.7.md
@@ -10,6 +10,7 @@
## Bug Fixes
* [#4277](https://github.com/netbox-community/netbox/issues/4277) - Fix filtering of... |
aws-cloudformation__cfn-lint-1164 | E2532 parameters in step function map
*cfn-lint version: (`cfn-lint --version`)* 0.24.4
*Description of issue.*
Using `parameters` in a `map` state gives this error:
`E2532: Check State Machine Definition for proper syntax`
This is an allowed property for map states: https://docs.aws.amazon.com/step-functio... | [
{
"content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w... | [
{
"content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w... | diff --git a/src/cfnlint/rules/resources/stepfunctions/StateMachine.py b/src/cfnlint/rules/resources/stepfunctions/StateMachine.py
index 18890d827d..3896977f24 100644
--- a/src/cfnlint/rules/resources/stepfunctions/StateMachine.py
+++ b/src/cfnlint/rules/resources/stepfunctions/StateMachine.py
@@ -55,7 +55,7 @@ def _ch... |
Kinto__kinto-474 | Do not require cliquet master branch in dev
As discussed with @Natim @almet
| [
{
"content": "import os\nimport binascii\nimport codecs\nfrom kinto import logger\n\nHERE = os.path.abspath(os.path.dirname(__file__))\n\n\ndef render_template(template, destination, **kwargs):\n template = os.path.join(HERE, template)\n folder = os.path.dirname(destination)\n\n if not os.path.exists(f... | [
{
"content": "import os\nimport codecs\n\nfrom cliquet import utils as cliquet_utils\n\nfrom kinto import logger\n\nHERE = os.path.abspath(os.path.dirname(__file__))\n\n\ndef render_template(template, destination, **kwargs):\n template = os.path.join(HERE, template)\n folder = os.path.dirname(destination)... | diff --git a/kinto/config/__init__.py b/kinto/config/__init__.py
index 3b2ed3287..19d009a56 100644
--- a/kinto/config/__init__.py
+++ b/kinto/config/__init__.py
@@ -1,6 +1,8 @@
import os
-import binascii
import codecs
+
+from cliquet import utils as cliquet_utils
+
from kinto import logger
HERE = os.path.abspath(... |
LMFDB__lmfdb-4199 | Refine search box knowls open in weird places
On
https://www.lmfdb.org/ModularForm/GL2/Q/holomorphic/?hst=List&level=67&weight=2&search_type=List
clicking on bad p. or char causes a knowl to open that misformats the entire table of refine search boxes, this does not happen for primitive character or Nk^2 so I beli... | [
{
"content": "from .utilities import display_knowl\nfrom sage.structure.unique_representation import UniqueRepresentation\n\n\nclass TdElt(object):\n _wrap_type = 'td'\n def _add_class(self, D, clsname):\n if 'class' in D:\n D['class'] = D['class'] + ' ' + clsname\n else:\n ... | [
{
"content": "from .utilities import display_knowl\nfrom sage.structure.unique_representation import UniqueRepresentation\n\n\nclass TdElt(object):\n _wrap_type = 'td'\n def _add_class(self, D, clsname):\n if 'class' in D:\n D['class'] = D['class'] + ' ' + clsname\n else:\n ... | diff --git a/lmfdb/classical_modular_forms/templates/cmf_full_gamma1_space.html b/lmfdb/classical_modular_forms/templates/cmf_full_gamma1_space.html
index a468c532f0..a6c3f60f8e 100644
--- a/lmfdb/classical_modular_forms/templates/cmf_full_gamma1_space.html
+++ b/lmfdb/classical_modular_forms/templates/cmf_full_gamma1_... |
pypi__warehouse-11273 | The metadata "homepage" link rendered twice on PyPI
With the most current tools, and following the recommendations of [_PEP 621 – Storing project metadata in `pyproject.toml`_](https://peps.python.org/pep-0621/), package publishers end up with duplicate homepage links rendered on the UI:
![Screen Shot 2022-04-20 at ... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/requirements.txt b/requirements.txt
index 3850563ea2f5..f01137cbb171 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-# This is only used for dependabot and Travis CI
+# This is only used for dependabot and Github Actions CI
-r requirements/main.txt
-r requirements/deploy.txt
-r req... |
LMFDB__lmfdb-4193 | Refine search box knowls open in weird places
On
https://www.lmfdb.org/ModularForm/GL2/Q/holomorphic/?hst=List&level=67&weight=2&search_type=List
clicking on bad p. or char causes a knowl to open that misformats the entire table of refine search boxes, this does not happen for primitive character or Nk^2 so I beli... | [
{
"content": "from .utilities import display_knowl\nfrom sage.structure.unique_representation import UniqueRepresentation\n\n\nclass TdElt(object):\n _wrap_type = 'td'\n def _add_class(self, D, clsname):\n if 'class' in D:\n D['class'] = D['class'] + ' ' + clsname\n else:\n ... | [
{
"content": "from .utilities import display_knowl\nfrom sage.structure.unique_representation import UniqueRepresentation\n\n\nclass TdElt(object):\n _wrap_type = 'td'\n def _add_class(self, D, clsname):\n if 'class' in D:\n D['class'] = D['class'] + ' ' + clsname\n else:\n ... | diff --git a/lmfdb/utils/search_boxes.py b/lmfdb/utils/search_boxes.py
index 4176cdcd17..4da87d91dd 100644
--- a/lmfdb/utils/search_boxes.py
+++ b/lmfdb/utils/search_boxes.py
@@ -385,12 +385,10 @@ def __init__(self, name, label, select_box, **kwds):
def label_html(self, info=None):
colspan = self.label_co... |
pypi__warehouse-13221 | Display organization member roles in a matrix
To improve user experience, the roles within an organization can be displayed in a matrix with check marks to indicate what each type of user can and cannot do.
The description of billing manager should also say what that role cannot do.
| [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/warehouse/locale/messages.pot b/warehouse/locale/messages.pot
index 4bb4d0d52af4..a0a92795230c 100644
--- a/warehouse/locale/messages.pot
+++ b/warehouse/locale/messages.pot
@@ -1133,8 +1133,8 @@ msgstr ""
#: warehouse/templates/manage/account/webauthn-provision.html:44
#: warehouse/templates/manage/orga... |
DataDog__dd-trace-py-4041 | Memory leak while handling large trace from long-running celery tasks
TL;DR
A long running celery task keeps adding to a large trace that's already larger than the API payload limit, using a lot of memory and causing a memory usage spike during serialization, all for a trace that's going to be dropped anyway.
##... | [
{
"content": "import functools\nimport json\nimport logging\nimport os\nfrom os import environ\nfrom os import getpid\nimport sys\nfrom threading import RLock\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typing import S... | [
{
"content": "import functools\nimport json\nimport logging\nimport os\nfrom os import environ\nfrom os import getpid\nimport sys\nfrom threading import RLock\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typing import S... | diff --git a/ddtrace/tracer.py b/ddtrace/tracer.py
index f1aaae6013f..381513f77f0 100644
--- a/ddtrace/tracer.py
+++ b/ddtrace/tracer.py
@@ -215,7 +215,7 @@ def __init__(
)
self._single_span_sampling_rules = get_span_sampling_rules() # type: List[SpanSamplingRule]
self._writer = writer ... |
celery__celery-4399 | Build task documentation with sphinx fails (error while formatting arguments)
## Checklist
this has been tested with both version 4.0.2 and master (8c8354f)
## Steps to reproduce
```bash
$ git clone https://github.com/inveniosoftware/invenio-indexer.git
$ cd invenio-indexer/
$ pip install -e .[all]
$ sphin... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Sphinx documentation plugin used to document tasks.\n\nIntroduction\n============\n\nUsage\n-----\n\nAdd the extension to your :file:`docs/conf.py` configuration module:\n\n.. code-block:: python\n\n extensions = (...,\n 'celery.contrib.sphinx')\n... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Sphinx documentation plugin used to document tasks.\n\nIntroduction\n============\n\nUsage\n-----\n\nAdd the extension to your :file:`docs/conf.py` configuration module:\n\n.. code-block:: python\n\n extensions = (...,\n 'celery.contrib.sphinx')\n... | diff --git a/celery/contrib/sphinx.py b/celery/contrib/sphinx.py
index ae17f80be30..e9cbc2e7123 100644
--- a/celery/contrib/sphinx.py
+++ b/celery/contrib/sphinx.py
@@ -29,11 +29,13 @@
Use ``.. autotask::`` to manually document a task.
"""
from __future__ import absolute_import, unicode_literals
-from inspect import... |
ansible__ansible-modules-core-4601 | get_url + file:/// protocol is broken
<!--- Verify first that your issue/request is not already reported in GitHub -->
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
get_url module
##### ANSIBLE VERSION
```
$ ansible --version
ansible 2.1.0 (devel de9e70e590) last updated 2016/04/21 10:44:10 (GMT -400)
lib/ansi... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Jan-Piet Mens <jpmens () gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Founda... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Jan-Piet Mens <jpmens () gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Founda... | diff --git a/network/basics/get_url.py b/network/basics/get_url.py
index 6a85b161141..1fc76048e92 100644
--- a/network/basics/get_url.py
+++ b/network/basics/get_url.py
@@ -209,7 +209,7 @@ def url_get(module, url, dest, use_proxy, last_mod_time, force, timeout=10, head
module.exit_json(url=url, dest=dest, chan... |
Lightning-AI__torchmetrics-1116 | Minor discrepancy in AveragePrecision documentation for `average="none"`
## 📚 Documentation
The [documentation](https://torchmetrics.readthedocs.io/en/latest/classification/average_precision.html) for the `torchmetrics.AveragePrecision` class and `torchmetrics.functional.average_precision()` function state that set... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c8f9fad25a9..93fc6fdf72a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -49,6 +49,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Skip box conversion if no boxes are present in `MeanAveragePrecision` ([#1097](https://github.com/Lig... |
vyperlang__vyper-1537 | Types not always enforced on events
Haven't dug deeply on this one but something equivalent to this is compiling for me:
```python
Sale: event({eth_sold: indexed(uint256(wei))})
@public
def logSale(amount: uint256):
log.Sale(amount)
```
| [
{
"content": "from vyper import ast\nfrom vyper.exceptions import (\n InvalidLiteralException,\n TypeMismatchException,\n)\nfrom vyper.parser.expr import (\n Expr,\n)\nfrom vyper.parser.lll_node import (\n LLLnode,\n)\nfrom vyper.parser.parser_utils import (\n base_type_conversion,\n byte_arra... | [
{
"content": "from vyper import ast\nfrom vyper.exceptions import (\n InvalidLiteralException,\n TypeMismatchException,\n)\nfrom vyper.parser.expr import (\n Expr,\n)\nfrom vyper.parser.lll_node import (\n LLLnode,\n)\nfrom vyper.parser.parser_utils import (\n base_type_conversion,\n byte_arra... | diff --git a/.gitignore b/.gitignore
index edead13748..1aff8b9178 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,6 +38,3 @@ docs/modules.rst
.tox
.mypy_cache
.hypothesis
-
-# vyper version
-
diff --git a/tests/parser/features/test_logging.py b/tests/parser/features/test_logging.py
index 46bff7f93e..152ca51588 10064... |
Kinto__kinto-986 | Heartbeat leaves tombstones
Heartbeat leaves tombstones
| [
{
"content": "import random\nfrom collections import namedtuple\nfrom pyramid.settings import asbool\n\nfrom kinto.core.logs import logger\nfrom . import generators\n\n\nFilter = namedtuple('Filter', ['field', 'value', 'operator'])\n\"\"\"Filtering properties.\"\"\"\n\nSort = namedtuple('Sort', ['field', 'direc... | [
{
"content": "import random\nfrom collections import namedtuple\nfrom pyramid.settings import asbool\n\nfrom kinto.core.logs import logger\nfrom . import generators\n\n\nFilter = namedtuple('Filter', ['field', 'value', 'operator'])\n\"\"\"Filtering properties.\"\"\"\n\nSort = namedtuple('Sort', ['field', 'direc... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 4eac5d40d..b0dd25b01 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -17,6 +17,7 @@ Protocol is now at version **1.13**. See `API changelog`_.
- Permissions are now correctly removed from permission backend when a parent
object is deleted (fixes #898)
+- Heartbea... |
gammapy__gammapy-1220 | Negative values in flux point errors
I'm investigating what is causing the vertical bars when plotting flux points from my RXJ1713 analysis described here [(link)](https://github.com/gammasky/cta-analyses/blob/master/dc-1-checks/rx_j1713/RXJ_gammapy_data_analysis.ipynb). See spectrum shown below:
:
try:
result = brentq(ts_diff, amplitude_min, amplitude_max,
... |
pwndbg__pwndbg-384 | Add `desc` to ArgparsedCommand; move some commmands to Argparsed~
* adds optional keyword argument - `desc` - to `ArgparsedCommand` so we don't have to create `argparse.ArgumentParser` if we don't want any parameters
* adds prints for cases when plt/gotplt sections doesnt have any symbols (so user will get an output... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport argparse\nimport functools\n\nimport gdb\n\nimport pwndbg.chain\nimport pwndbg.color\nim... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport argparse\nimport functools\n\nimport gdb\nimport six\n\nimport pwndbg.chain\nimport pwnd... | diff --git a/pwndbg/commands/__init__.py b/pwndbg/commands/__init__.py
index 711592a21f2..b4aa2783da2 100644
--- a/pwndbg/commands/__init__.py
+++ b/pwndbg/commands/__init__.py
@@ -9,6 +9,7 @@
import functools
import gdb
+import six
import pwndbg.chain
import pwndbg.color
@@ -225,7 +226,7 @@ def __init__(self, ... |
Pyomo__pyomo-2597 | Unallowed character (@) found in CPLEX solution file path/name
## Summary
On Linux, solving a model with CPLEX solver where the user has a name of the form `user@D01.arc.local` is not allowed.
### Steps to reproduce the issue
As outlined in Summary above
### Error Message
```console
Traceback (most rece... | [
{
"content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2008-2022\n# National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n... | [
{
"content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2008-2022\n# National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n... | diff --git a/pyomo/solvers/plugins/solvers/CPLEX.py b/pyomo/solvers/plugins/solvers/CPLEX.py
index 7fb16249fa9..ea33fabf2fd 100644
--- a/pyomo/solvers/plugins/solvers/CPLEX.py
+++ b/pyomo/solvers/plugins/solvers/CPLEX.py
@@ -66,8 +66,10 @@ def _validate_file_name(cplex, filename, description):
"CPLEX o... |
openshift__openshift-ansible-2300 | RequestHeaderIdentityProvider clientCommonNames option
https://github.com/openshift/origin/pull/8443
https://github.com/openshift/openshift-docs/pull/1888/files
RequestHeaderIdentityProvider now has an option to specify which client certificates are accepted. Previously, any client certificate validated by the specifi... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# vim: expandtab:tabstop=4:shiftwidth=4\n'''\nCustom filters for use in openshift-master\n'''\nimport copy\nimport sys\nimport yaml\n\nfrom ansible import errors\nfrom distutils.version import LooseVersion\n\n# pylint: disable=no-name-in-module,import-er... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# vim: expandtab:tabstop=4:shiftwidth=4\n'''\nCustom filters for use in openshift-master\n'''\nimport copy\nimport sys\nimport yaml\n\nfrom ansible import errors\nfrom distutils.version import LooseVersion\n\n# pylint: disable=no-name-in-module,import-er... | diff --git a/filter_plugins/openshift_master.py b/filter_plugins/openshift_master.py
index 048cd04c7a2..d196d6c1f88 100644
--- a/filter_plugins/openshift_master.py
+++ b/filter_plugins/openshift_master.py
@@ -237,7 +237,11 @@ def __init__(self, api_version, idp):
self._required += [['headers']]
self._... |
Mailu__Mailu-2018 | DKIM with multiple mail domains
I have a few small mail domains in mailu and I have setup DMARC records with rua and ruf mail addresses. The DMARC record vor domainA reads:
_dmarc.domainA.ch. 600 IN TXT "v=DMARC1; p=reject; rua=mailto:admin@smtp.masterdomain.ch; ruf=mailto:admin@smtp.masterdomain.ch; adkim=s; aspf=s... | [
{
"content": "\"\"\" Mailu config storage model\n\"\"\"\n\nimport os\nimport smtplib\nimport json\n\nfrom datetime import date\nfrom email.mime import text\nfrom itertools import chain\n\nimport flask_sqlalchemy\nimport sqlalchemy\nimport passlib.context\nimport passlib.hash\nimport passlib.registry\nimport tim... | [
{
"content": "\"\"\" Mailu config storage model\n\"\"\"\n\nimport os\nimport smtplib\nimport json\n\nfrom datetime import date\nfrom email.mime import text\nfrom itertools import chain\n\nimport flask_sqlalchemy\nimport sqlalchemy\nimport passlib.context\nimport passlib.hash\nimport passlib.registry\nimport tim... | diff --git a/core/admin/mailu/models.py b/core/admin/mailu/models.py
index 01711a60f..561a4ab6e 100644
--- a/core/admin/mailu/models.py
+++ b/core/admin/mailu/models.py
@@ -243,6 +243,13 @@ def dns_dmarc(self):
ruf = f' ruf=mailto:{ruf}@{domain};' if ruf else ''
return f'_dmarc.{self.name}. 60... |
pypa__setuptools-2857 | [FR] Deprecate support for custom commands inheriting from distutils
### What's the problem this feature will solve?
From #2849, it is clear that many projects still inherit directly from distutils when creating customised commands.
As per [PEP 632](https://www.python.org/dev/peps/pep-0632/) this practice is deprec... | [
{
"content": "\"\"\"setuptools.command.egg_info\n\nCreate a distribution's .egg-info directory and contents\"\"\"\n\nfrom distutils.filelist import FileList as _FileList\nfrom distutils.errors import DistutilsInternalError\nfrom distutils.util import convert_path\nfrom distutils import log\nimport distutils.err... | [
{
"content": "\"\"\"setuptools.command.egg_info\n\nCreate a distribution's .egg-info directory and contents\"\"\"\n\nfrom distutils.filelist import FileList as _FileList\nfrom distutils.errors import DistutilsInternalError\nfrom distutils.util import convert_path\nfrom distutils import log\nimport distutils.err... | diff --git a/changelog.d/2856.deprecation.rst b/changelog.d/2856.deprecation.rst
new file mode 100644
index 0000000000..fe4144b4f1
--- /dev/null
+++ b/changelog.d/2856.deprecation.rst
@@ -0,0 +1,2 @@
+Support for custom commands that inherit directly from ``distutils`` is
+**deprecated**. Users should extend classes pr... |
kivy__kivy-7985 | Kivy Logger doesn't take into account non-string messages
**Software Versions**
* Python: *
* OS: *
* Kivy: `master`
* Kivy installation method: `source`
**Describe the bug**
Kivy Logger doesn't take into account non-string messages, and fails with:
`AttributeError: ... object has no attribute 'replace'`
... | [
{
"content": "'''\nLogger object\n=============\n\nThe Kivy `Logger` class provides a singleton logger instance. This instance\nexposes a standard Python\n`logger <https://docs.python.org/3/library/logging.html>`_ object but adds\nsome convenient features.\n\nAll the standard logging levels are available : `tra... | [
{
"content": "'''\nLogger object\n=============\n\nThe Kivy `Logger` class provides a singleton logger instance. This instance\nexposes a standard Python\n`logger <https://docs.python.org/3/library/logging.html>`_ object but adds\nsome convenient features.\n\nAll the standard logging levels are available : `tra... | diff --git a/kivy/logger.py b/kivy/logger.py
index 55dcfbc4cd..7ed494ca5e 100644
--- a/kivy/logger.py
+++ b/kivy/logger.py
@@ -361,7 +361,7 @@ class ColoredLogRecord(logging.LogRecord):
@classmethod
def _format_message(cls, message):
- return message.replace(
+ return str(message).replace(
... |
nerfstudio-project__nerfstudio-824 | Depth normalization inconsistent for packed vs. nonpacked samples
**Describe the bug**
When the raymarching samples are packed, the depth is calculated according to `sum_i w_i t_i`: https://github.com/nerfstudio-project/nerfstudio/blob/863fc77ab5f247ff3ce3c80f192173063529b036/nerfstudio/model_components/renderers.py#L... | [
{
"content": "# Copyright 2022 The Nerfstudio Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\... | [
{
"content": "# Copyright 2022 The Nerfstudio Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\... | diff --git a/nerfstudio/model_components/renderers.py b/nerfstudio/model_components/renderers.py
index 025194ee4c..9604a1d5ff 100644
--- a/nerfstudio/model_components/renderers.py
+++ b/nerfstudio/model_components/renderers.py
@@ -234,6 +234,8 @@ def forward(
if ray_indices is not None and num_rays is not ... |
python-discord__bot-730 | User command fails for certain custom statuses
Basic support for handling custom user activity (status?) was added by #648 (Parent: #647) after Discord introduced the feature. However, this seems to be broken for the case where a user sets an emoji as their status without any accompanying text:
 -> Embed:
# Custom status
custom_status = ''
for ac... |
goauthentik__authentik-9255 | The SCIM JSON for User and Group schema attribute allows only one value
The SCIM JSON for User and Group schema attribute allows only one value. The schemas attribute check should only check for a minimum number of entries not for a maximum.
For example I would like to be able so support the following
... | [
{
"content": "\"\"\"Custom SCIM schemas\"\"\"\n\nfrom pydanticscim.group import Group as BaseGroup\nfrom pydanticscim.responses import PatchRequest as BasePatchRequest\nfrom pydanticscim.responses import SCIMError as BaseSCIMError\nfrom pydanticscim.service_provider import Bulk, ChangePassword, Filter, Patch, S... | [
{
"content": "\"\"\"Custom SCIM schemas\"\"\"\n\nfrom pydanticscim.group import Group as BaseGroup\nfrom pydanticscim.responses import PatchRequest as BasePatchRequest\nfrom pydanticscim.responses import SCIMError as BaseSCIMError\nfrom pydanticscim.service_provider import Bulk, ChangePassword, Filter, Patch, S... | diff --git a/authentik/providers/scim/clients/schema.py b/authentik/providers/scim/clients/schema.py
index 21f187f45e40..678cd8a47f21 100644
--- a/authentik/providers/scim/clients/schema.py
+++ b/authentik/providers/scim/clients/schema.py
@@ -13,14 +13,18 @@
class User(BaseUser):
"""Modified User schema with adde... |
great-expectations__great_expectations-1722 | [BUG] Duplicate `usage_statistics` message is sent when building data_docs with CLI
**Describe the bug**
When building DataDocs through the CLI (handled by the `build_docs()` function), the DataContext's `context.build_data_docs()` function is called twice.
First `context.build_data_docs()` is called using the `dr... | [
{
"content": "import atexit\nimport datetime\nimport json\nimport logging\nimport platform\nimport signal\nimport sys\nimport threading\nfrom functools import wraps\nfrom queue import Queue\n\nimport jsonschema\nimport requests\n\nfrom great_expectations import __version__ as ge_version\nfrom great_expectations... | [
{
"content": "import atexit\nimport datetime\nimport json\nimport logging\nimport platform\nimport signal\nimport sys\nimport threading\nfrom functools import wraps\nfrom queue import Queue\n\nimport jsonschema\nimport requests\n\nfrom great_expectations import __version__ as ge_version\nfrom great_expectations... | diff --git a/great_expectations/core/usage_statistics/usage_statistics.py b/great_expectations/core/usage_statistics/usage_statistics.py
index 401bf13822a6..35eb96fa3a48 100644
--- a/great_expectations/core/usage_statistics/usage_statistics.py
+++ b/great_expectations/core/usage_statistics/usage_statistics.py
@@ -244,6... |
google__fuzzbench-732 | Make coverage graphs show numbers properly when we have large number of fuzzers
E.g.


| [
{
"content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/analysis/plotting.py b/analysis/plotting.py
index f20d3f416..8dca7853b 100644
--- a/analysis/plotting.py
+++ b/analysis/plotting.py
@@ -398,7 +398,9 @@ def write_unique_coverage_ranking_plot(self, unique_region_cov_df_combined,
image_path):
"""Writes ran... |
conda__conda-build-1572 | conda build --check fails when using source_files directive
Using conda-build 2.0.6
Reproduce by creating a recipe with a source_files directive
```
conda` build --check recipe
Traceback (most recent call last):
File "REDACTED/miniconda2/bin/conda-build", line 6, in <module>
sys.exit(conda_build.cli.main_build.m... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport glob\nimport logging\nimport os\nimport re\nimport sys\nfrom os.path import isfile, join\n\nfrom .conda_interface import iteritems, PY3, text_type\nfrom .conda_interface import memoized, md5_file\nfrom .conda_interface impo... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport glob\nimport logging\nimport os\nimport re\nimport sys\nfrom os.path import isfile, join\n\nfrom .conda_interface import iteritems, PY3, text_type\nfrom .conda_interface import memoized, md5_file\nfrom .conda_interface impo... | diff --git a/conda_build/metadata.py b/conda_build/metadata.py
index b0f0b8e902..a090885ee2 100644
--- a/conda_build/metadata.py
+++ b/conda_build/metadata.py
@@ -296,7 +296,7 @@ def _git_clean(source_meta):
'requirements': ['build', 'run', 'conflicts'],
'app': ['entry', 'icon', 'summary', 'type', 'cli_opts',... |
jazzband__django-axes-119 | Not sending lockout signal
The library doesn't send the lockout signal. Tried both with decorator and middleware.
Debugging check_request, it does not pass through it when locking out the user, maybe the control
``` python
if is_already_locked(request):
```
in watch_login prevents the signal sending by returning dire... | [
{
"content": "import logging\nimport socket\n\nfrom datetime import timedelta\n\nfrom django.conf import settings\nfrom django.contrib.auth import logout\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.http import HttpResponse\nfrom django.http import HttpResponseRedirect\nfrom django.shortc... | [
{
"content": "import logging\nimport socket\n\nfrom datetime import timedelta\n\nfrom django.conf import settings\nfrom django.contrib.auth import logout\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.http import HttpResponse\nfrom django.http import HttpResponseRedirect\nfrom django.shortc... | diff --git a/axes/decorators.py b/axes/decorators.py
index 4a8a6b58..d8b195a8 100644
--- a/axes/decorators.py
+++ b/axes/decorators.py
@@ -428,7 +428,7 @@ def check_request(request, login_unsuccessful):
user_lockable = is_user_lockable(request)
# no matter what, we want to lock them out if they're past the nu... |
NVIDIA__NVFlare-194 | Clients don't shut down
Using admin API with
```
runner.run(run_number, args.app, restart_all_first=False, shutdown_on_error=True, shutdown_at_end=True,
timeout=7200, min_clients=args.min_clients)
```
clients don't shut down after end of run.
Similarly when using the admin client console.
... | [
{
"content": "# Copyright (c) 2021-2022, 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/LICEN... | [
{
"content": "# Copyright (c) 2021-2022, 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/LICEN... | diff --git a/nvflare/private/fed/server/training_cmds.py b/nvflare/private/fed/server/training_cmds.py
index a0e73aa04b..002b29346c 100644
--- a/nvflare/private/fed/server/training_cmds.py
+++ b/nvflare/private/fed/server/training_cmds.py
@@ -459,13 +459,13 @@ def _shutdown_app_on_clients(self, conn: Connection) -> boo... |
matrix-org__synapse-7191 | Server admins should be able to bypass restrictions on creating aliases
otherwise administration tools can't do their job
| [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2014-2016 OpenMarket Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright 2014-2016 OpenMarket Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | diff --git a/changelog.d/7191.feature b/changelog.d/7191.feature
new file mode 100644
index 000000000000..83d5685bb2c4
--- /dev/null
+++ b/changelog.d/7191.feature
@@ -0,0 +1 @@
+Admin users are no longer required to be in a room to create an alias for it.
diff --git a/synapse/handlers/directory.py b/synapse/handlers/d... |
optuna__optuna-1600 | Update Kubernetes example of "simple" to avoid potential errors
https://github.com/optuna/optuna/blob/a5a55a6354b3c60dd7e3a08adcbc3818e90599f0/examples/kubernetes/simple/sklearn_distributed.py#L45-L54
Like https://github.com/optuna/optuna/pull/1536, we should create a study before running the script.
| [
{
"content": "\"\"\"\nOptuna distributed optimization example that optimizes\nan sklearn classifier for the Iris dataset on Kubernetes.\n\nThis example's code is mostly the same as the sklearn_simple.py example, except for two things:\n\n1 - It gives a name to the study and sets load_if_exists to True\nin order... | [
{
"content": "\"\"\"\nOptuna distributed optimization example that optimizes\nan sklearn classifier for the Iris dataset on Kubernetes.\n\nThis example's code is mostly the same as the sklearn_simple.py example, except for two things:\n\n1 - It gives a name to the study and sets load_if_exists to True\nin order... | diff --git a/examples/kubernetes/simple/Dockerfile b/examples/kubernetes/simple/Dockerfile
index 91b110321b..07f2381043 100644
--- a/examples/kubernetes/simple/Dockerfile
+++ b/examples/kubernetes/simple/Dockerfile
@@ -5,3 +5,4 @@ WORKDIR /usr/src/
RUN pip install --no-cache-dir optuna scikit-learn psycopg2-binary
... |
vaexio__vaex-674 | Error printing DataFrames with certain types of virtual columns
When trying to print or display a dataframe with a certain type of virtual columngs, but only using a subset of the columns crashes with `NameError: name 'do_not_understand_expression' is not defined`.
See a fully reproducible example below.
```
imp... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import division\nimport logging\nimport collections\nimport ast\nimport _ast\nimport string\nimport numpy as np\nimport math\nimport sys\nimport six\nimport copy\nimport difflib\n\n\nlogger = logging.getLogger(\"expr\")\nlogger.setLevel(logging.ERROR)\n\n\n... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import division\nimport logging\nimport collections\nimport ast\nimport _ast\nimport string\nimport numpy as np\nimport math\nimport sys\nimport six\nimport copy\nimport difflib\n\n\nlogger = logging.getLogger(\"expr\")\nlogger.setLevel(logging.ERROR)\n\n\n... | diff --git a/packages/vaex-core/vaex/expresso.py b/packages/vaex-core/vaex/expresso.py
index 2559008223..fd88ed4bd7 100644
--- a/packages/vaex-core/vaex/expresso.py
+++ b/packages/vaex-core/vaex/expresso.py
@@ -357,6 +357,8 @@ def visit_BinOp(self, node):
return "({left} * {right})".format(left=left, r... |
interlegis__sapl-2651 | Label de Relatoria errada
A label de Relatoria está aparecendo com um `None` e com a data em formato mm-dd-yyyy (isso foi percebido na AL-AM).
## Comportamento Esperado
Não aparecer nada se for None e data formatada no padrão dd-mm-yyyy.
## Comportamento Atual
A label de Relatoria está aparecendo com um `None` ... | [
{
"content": "\nfrom django.contrib.auth.models import Group\nfrom django.contrib.contenttypes.fields import GenericRelation\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db import models\nfrom django.db.models.functions import Concat\nfrom django.template import defaultfilters\nfrom ... | [
{
"content": "\nfrom django.contrib.auth.models import Group\nfrom django.contrib.contenttypes.fields import GenericRelation\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db import models\nfrom django.db.models.functions import Concat\nfrom django.template import defaultfilters\nfrom ... | diff --git a/sapl/materia/models.py b/sapl/materia/models.py
index 452a01d6f..af4cb1231 100644
--- a/sapl/materia/models.py
+++ b/sapl/materia/models.py
@@ -666,10 +666,15 @@ class Meta:
verbose_name_plural = _('Relatorias')
def __str__(self):
- return _('%(materia)s - %(tipo)s - %(data)s') % {
+... |
sublimelsp__LSP-1110 | Double requests for documentHighlight
I've noticed that setting a cursor on some symbol makes the `documentHighlight` underline blink once.
Checked logs and saw the request being made twice on each cursor movement:
```
:: --> pyls textDocument/documentHighlight(12): {'textDocument': {'uri': 'file:////LSP/plugin/hi... | [
{
"content": "import sublime\nfrom .core.protocol import Request, Range, DocumentHighlightKind\nfrom .core.registry import LSPViewEventListener\nfrom .core.settings import settings\nfrom .core.typing import List, Dict, Optional\nfrom .core.views import range_to_region, text_document_position_params\nfrom .core.... | [
{
"content": "import sublime\nfrom .core.protocol import Request, Range, DocumentHighlightKind\nfrom .core.registry import LSPViewEventListener\nfrom .core.settings import settings\nfrom .core.typing import List, Dict, Optional\nfrom .core.views import range_to_region, text_document_position_params\nfrom .core.... | diff --git a/plugin/highlights.py b/plugin/highlights.py
index 362ed4bd7..50b006327 100644
--- a/plugin/highlights.py
+++ b/plugin/highlights.py
@@ -43,9 +43,11 @@ def on_selection_modified_async(self) -> None:
current_point = self.view.sel()[0].begin()
except IndexError:
... |
Kinto__kinto-1279 | HTTP 500 while fetching the permission endpoint using the account plugin.
Error while fetching the permissions endpoint using the account plugin.
```
File "~/kinto/venv/lib/python3.6/site-packages/cornice/service.py", line 491, in wrapper
response = view_()
File "~/kinto/venv/lib/python3.6/site-packages/k... | [
{
"content": "import colander\nfrom pyramid.security import NO_PERMISSION_REQUIRED\nfrom pyramid.settings import aslist\n\nfrom kinto.authorization import PERMISSIONS_INHERITANCE_TREE\nfrom kinto.core import utils as core_utils, resource\nfrom kinto.core.storage import Sort\nfrom kinto.core.storage.memory impor... | [
{
"content": "import colander\nfrom pyramid.security import NO_PERMISSION_REQUIRED\nfrom pyramid.settings import aslist\n\nfrom kinto.authorization import PERMISSIONS_INHERITANCE_TREE\nfrom kinto.core import utils as core_utils, resource\nfrom kinto.core.storage import Sort\nfrom kinto.core.storage.memory impor... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 463336533..40bd67124 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -6,7 +6,9 @@ This document describes changes between each past release.
7.2.2 (unreleased)
------------------
-- Nothing changed yet.
+**Bug fixes**
+
+- Fix permissions endpoint when using accoun... |
privacyidea__privacyidea-807 | LdapServerPoolExhaustedError on Authentications
Webserver - Uwsgi/Nginx
Hello,
I am seeing the LDAPServerPoolExhaustedError on /validate/check.
From the [source code](https://github.com/privacyidea/privacyidea/blob/master/privacyidea/lib/resolvers/LDAPIdResolver.py#L87) I see the default is 2 cycles (active) o... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2014 Cornelius Kölbel\n# contact: corny@cornelinux.de\n#\n# 2017-07-20 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Fix unicode usernames\n# 2017-01-23 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Add certifica... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2014 Cornelius Kölbel\n# contact: corny@cornelinux.de\n#\n# 2017-07-20 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Fix unicode usernames\n# 2017-01-23 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Add certifica... | diff --git a/privacyidea/lib/resolvers/LDAPIdResolver.py b/privacyidea/lib/resolvers/LDAPIdResolver.py
index abdd161cbf..b36f1b699c 100644
--- a/privacyidea/lib/resolvers/LDAPIdResolver.py
+++ b/privacyidea/lib/resolvers/LDAPIdResolver.py
@@ -754,7 +754,12 @@ def getResolverClassDescriptor(cls):
... |
joke2k__faker-1567 | `ElementsType` requires `Sequence[T]`, not just `Iterable[T]`?
The definition for `ElementsType` currently requires a sequence, or dict keys:
https://github.com/joke2k/faker/blob/7093e5ab9b5e894e04807130b75dc940c7a9d53a/faker/providers/__init__.py#L18
I can't see why it needs to be a _sequence_ though, i.e. havin... | [
{
"content": "import re\nimport string\n\nfrom collections import OrderedDict\nfrom typing import Any, Dict, KeysView, List, Optional, Sequence, TypeVar, Union\n\nfrom ..generator import Generator\nfrom ..utils.distribution import choices_distribution, choices_distribution_unique\n\n_re_hash = re.compile(r\"#\"... | [
{
"content": "import re\nimport string\n\nfrom collections import OrderedDict\nfrom typing import Any, Collection, List, Optional, Sequence, TypeVar, Union\n\nfrom ..generator import Generator\nfrom ..utils.distribution import choices_distribution, choices_distribution_unique\n\n_re_hash = re.compile(r\"#\")\n_... | diff --git a/faker/providers/__init__.py b/faker/providers/__init__.py
index 84e7b2f190..2a9e16eacb 100644
--- a/faker/providers/__init__.py
+++ b/faker/providers/__init__.py
@@ -2,7 +2,7 @@
import string
from collections import OrderedDict
-from typing import Any, Dict, KeysView, List, Optional, Sequence, TypeVar,... |
zostera__django-bootstrap4-186 | Bump setuptools from 60.10.0 to 62.3.1
Bumps [setuptools](https://github.com/pypa/setuptools) from 60.10.0 to 62.3.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pypa/setuptools/blob/main/CHANGES.rst">setuptools's changelog</a>.</em></p>
<blockquote>
<h2>v62.3.1</h2>
<p>Misc
^... | [
{
"content": "",
"path": "src/bootstrap4/__init__.py"
},
{
"content": "#!/usr/local/bin/python\n\n\nimport os\n\nfrom setuptools import find_packages, setup\n\nwith open(os.path.join(os.path.dirname(__file__), \"README.rst\")) as readme_file:\n readme = readme_file.read()\n\nwith open(os.path.joi... | [
{
"content": "try:\n from _version import version\nexcept ImportError:\n try:\n from setuptools_scm import get_version\n\n version = get_version()\n except ImportError:\n version = \"???\"\n__version__ = version\n",
"path": "src/bootstrap4/__init__.py"
},
{
"content": "... | diff --git a/.gitignore b/.gitignore
index 59f056a3..9dacaf8f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,7 @@
+# Version generated by setuptools_scm
+src/bootstrap4/_version.py
+
+# Python
*.py[cod]
# C extensions
diff --git a/requirements.txt b/requirements.txt
index ac3605f1..0845f2de 100644
--- a/requir... |
frappe__frappe-12549 | Social login cannot be finished while a new user is logging in with without gender attribute provided
<!--
Welcome to the Frappe Framework issue tracker! Before creating an issue, please heed the following:
1. This tracker should only be used to report bugs and request features / enhancements to Frappe
- For q... | [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\nfrom __future__ import unicode_literals\nimport frappe\nimport frappe.utils\nimport json, jwt\nimport base64\nfrom frappe import _\nfrom frappe.utils.password import get_decrypted_password\nfrom... | [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\nfrom __future__ import unicode_literals\nimport frappe\nimport frappe.utils\nimport json, jwt\nimport base64\nfrom frappe import _\nfrom frappe.utils.password import get_decrypted_password\nfrom... | diff --git a/frappe/utils/oauth.py b/frappe/utils/oauth.py
index 40bde6c2cc6c..6596701ee394 100644
--- a/frappe/utils/oauth.py
+++ b/frappe/utils/oauth.py
@@ -231,14 +231,14 @@ def update_oauth_user(user, data, provider):
save = True
user = frappe.new_doc("User")
- gender = (data.get("gender") or "").title()
+... |
translate__translate-3880 | csv2po new line
Hi there, i have CSV with:
```csv
"yellow pencil","żółty\nołówek"
"photo description","opis zdjęcia"
```
And converted with csv2po:
```po
msgid "yellow pencil"
msgstr "żółtynołówek"
msgid "photo description"
msgstr "opis zdjęcia"
```
How to convert with save format "\n", script del... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2002-2006 Zuza Software Foundation\n#\n# This file is part of translate.\n#\n# translate 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 v... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2002-2006 Zuza Software Foundation\n#\n# This file is part of translate.\n#\n# translate 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 v... | diff --git a/translate/convert/test_csv2po.py b/translate/convert/test_csv2po.py
index a1dc9ca8b9..215249ea94 100644
--- a/translate/convert/test_csv2po.py
+++ b/translate/convert/test_csv2po.py
@@ -1,3 +1,6 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
from translate.convert import csv2po, te... |
Flexget__Flexget-345 | Imdb watchlist html parser fix
### Motivation for changes:
imdb_watchlist fails to retrieve list 'ratings' because soup is unable to detect correct total_item_count. Different div classes are used for 'ratings' and 'lsXXXXXXXXX'.
### Detailed changes:
- Update parser to locate correct total_item_count on both list... | [
{
"content": "from __future__ import unicode_literals, division, absolute_import\nimport os\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom netrc import netrc, NetrcParseError\nimport logging\nimport base64\n\nfrom flexget import plugin, validator\nfrom flexget.entry import Entry\nfrom flex... | [
{
"content": "from __future__ import unicode_literals, division, absolute_import\nimport os\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom netrc import netrc, NetrcParseError\nimport logging\nimport base64\n\nfrom flexget import plugin, validator\nfrom flexget.entry import Entry\nfrom flex... | diff --git a/flexget/plugins/plugin_transmission.py b/flexget/plugins/plugin_transmission.py
index c2484357bd..6f2422b693 100644
--- a/flexget/plugins/plugin_transmission.py
+++ b/flexget/plugins/plugin_transmission.py
@@ -358,7 +358,10 @@ def _make_torrent_options_dict(self, config, entry):
if 'include_subs' ... |
litestar-org__litestar-2105 | Bug: passing wrapper_class to StructLoggingConfig causes Pydantic exception
### Description
When trying to hook up structlog to starlite v1.51.12, I got the Pydantic exception below on starting up the app. I tried the same with the litestar v2 beta hello-world app, and it worked. I realize this may not get fixed in v1... | [
{
"content": "from abc import ABC, abstractmethod\nfrom importlib.util import find_spec\nfrom logging import INFO\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Dict,\n List,\n Literal,\n Optional,\n Type,\n Union,\n cast,\n)\n\nfrom pydantic import BaseModel, Field, v... | [
{
"content": "from abc import ABC, abstractmethod\nfrom importlib.util import find_spec\nfrom logging import INFO\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Dict,\n List,\n Literal,\n Optional,\n Type,\n Union,\n cast,\n)\n\nfrom pydantic import BaseModel, Field, v... | diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 0000000000..6c97be0d36
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,10 @@
+# Code owner settings for `litestar`
+# @maintainers should be assigned to all reviews.
+# Most specific assignment takes precedence though, so if you add a mor... |
WeblateOrg__weblate-2226 | Change the pull request title
Is it possible to create pull requests with some other title than "Update from Weblate."?
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © 2012 - 2018 Michal Čihař <michal@cihar.com>\n#\n# This file is part of Weblate <https://weblate.org/>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the ... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © 2012 - 2018 Michal Čihař <michal@cihar.com>\n#\n# This file is part of Weblate <https://weblate.org/>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the ... | diff --git a/docs/admin/config.rst b/docs/admin/config.rst
index 8722a00a01e1..4ec878ddd8b2 100644
--- a/docs/admin/config.rst
+++ b/docs/admin/config.rst
@@ -427,6 +427,14 @@ defaults to ``True``.
:ref:`component`
+.. setting:: DEFAULT_PULL_MESSAGE
+
+DEFAULT_PULL_MESSAGE
+--------------------
+
+Default pull ... |
mlcommons__GaNDLF-808 | Fix some code style issues reported by codacy
**Is your feature request related to a problem? Please describe.**
Codacy has reported a few issues to fix that relate to the code style: https://app.codacy.com/gh/mlcommons/GaNDLF/issues/current?levels=Warning&categories=CodeStyle
**Describe the solution you'd like**
... | [
{
"content": "import os, pickle\nfrom typing import Optional\nfrom pathlib import Path\n\nfrom GANDLF.training_manager import TrainingManager, TrainingManager_split\nfrom GANDLF.inference_manager import InferenceManager\nfrom GANDLF.config_manager import ConfigManager\nfrom GANDLF.utils import (\n populate_h... | [
{
"content": "from typing import Optional\nfrom pathlib import Path\n\nfrom GANDLF.training_manager import TrainingManager, TrainingManager_split\nfrom GANDLF.inference_manager import InferenceManager\nfrom GANDLF.config_manager import ConfigManager\nfrom GANDLF.utils import (\n populate_header_in_parameters... | diff --git a/GANDLF/cli/main_run.py b/GANDLF/cli/main_run.py
index f9676f76b..45e303254 100644
--- a/GANDLF/cli/main_run.py
+++ b/GANDLF/cli/main_run.py
@@ -1,4 +1,3 @@
-import os, pickle
from typing import Optional
from pathlib import Path
@@ -9,7 +8,6 @@
populate_header_in_parameters,
parseTrainingCSV,
... |
chainer__chainer-285 | A confusing error occurs when GPU and CPU arrays are mixed on `numerical_grad`
In this case, unreadable error occurs. We nee to check if arrays are not mixed.
| [
{
"content": "import numpy\nimport six\n\nfrom chainer import cuda\n\n\ndef numerical_grad_cpu(f, inputs, grad_outputs, eps=1e-3):\n grads = tuple(numpy.zeros_like(x) for x in inputs)\n for x, gx in zip(inputs, grads):\n flat_x = x.ravel()\n flat_gx = gx.ravel()\n for i in six.moves.r... | [
{
"content": "import numpy\nimport six\n\nfrom chainer import cuda\n\n\ndef numerical_grad_cpu(f, inputs, grad_outputs, eps=1e-3):\n grads = tuple(numpy.zeros_like(x) for x in inputs)\n for x, gx in zip(inputs, grads):\n flat_x = x.ravel()\n flat_gx = gx.ravel()\n for i in six.moves.r... | diff --git a/chainer/gradient_check.py b/chainer/gradient_check.py
index 31ce85422c62..f81821be4270 100644
--- a/chainer/gradient_check.py
+++ b/chainer/gradient_check.py
@@ -73,9 +73,18 @@ def numerical_grad(f, inputs, grad_outputs, eps=1e-3):
"""
assert eps > 0
- if any(isinstance(x, cuda.GPUArray) for... |
pytorch__audio-1182 | Python 2 Deprecated
The 0.4.0 release of torchaudio was the last one supporting python 2, and master no longer officially supports python 2. We're looking to strip the code of python 2 references.
- [x] No longer use package `six` and `backports` for cross-compatibility
- [x] Convert to inline type hinting
- [x] No ... | [
{
"content": "#!/usr/bin/env python\nimport os\nimport shutil\nimport subprocess\nfrom pathlib import Path\nfrom setuptools import setup, find_packages\nimport distutils.command.clean\n\nfrom build_tools import setup_helpers\n\nROOT_DIR = Path(__file__).parent.resolve()\n\n\n# Creating the version file\nversion... | [
{
"content": "#!/usr/bin/env python\nimport os\nimport shutil\nimport subprocess\nfrom pathlib import Path\nfrom setuptools import setup, find_packages\nimport distutils.command.clean\n\nfrom build_tools import setup_helpers\n\nROOT_DIR = Path(__file__).parent.resolve()\n\n\n# Creating the version file\nversion... | diff --git a/setup.py b/setup.py
index 8168472ecf..8ecc41c1cc 100644
--- a/setup.py
+++ b/setup.py
@@ -73,8 +73,9 @@ def run(self):
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Programming Language :: C++",
- "Programming Language :: Python :: 2.7",
- ... |
geopandas__geopandas-3148 | BUG: InvalidVersion error when writing a file on disk with engine=fiona
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
Issue alrerady reported in [esri forum](https://community.esri.com/t5/arcgis-pro-questions/arcgispro-... | [
{
"content": "import os\nfrom packaging.version import Version\nfrom pathlib import Path\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import is_integer_dtype\n\nimport pyproj\nfrom shapely.geometry import mapping\nfrom shapely.geometry.base import BaseGeometry\n\nfrom geopa... | [
{
"content": "import os\nfrom packaging.version import Version\nfrom pathlib import Path\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import is_integer_dtype\n\nimport pyproj\nfrom shapely.geometry import mapping\nfrom shapely.geometry.base import BaseGeometry\n\nfrom geopa... | diff --git a/geopandas/io/file.py b/geopandas/io/file.py
index 98fe7f8a26..a8ce309ef0 100644
--- a/geopandas/io/file.py
+++ b/geopandas/io/file.py
@@ -635,10 +635,12 @@ def _to_file_fiona(df, filename, driver, schema, crs, mode, **kwargs):
with fiona_env():
crs_wkt = None
try:
- gdal_v... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.