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 ⌀ |
|---|---|---|---|---|
projectmesa__mesa-128 | Grid move_agent to same position
Grid's move_agent method errors out when trying to move the agent to the same position.
| [
{
"content": "'''\nMesa Space Module\n=================================\n\nObjects used to add a spatial component to a model.\n\nGrid: base grid, a simple list-of-lists.\nSingleGrid: grid which strictly enforces one object per cell.\nMultiGrid: extension to Grid where each cell is a set of objects.\n\n'''\n# I... | [
{
"content": "'''\nMesa Space Module\n=================================\n\nObjects used to add a spatial component to a model.\n\nGrid: base grid, a simple list-of-lists.\nSingleGrid: grid which strictly enforces one object per cell.\nMultiGrid: extension to Grid where each cell is a set of objects.\n\n'''\n# I... | diff --git a/mesa/space.py b/mesa/space.py
index bdc19a29492..69b3625c22c 100644
--- a/mesa/space.py
+++ b/mesa/space.py
@@ -220,9 +220,8 @@ def move_agent(self, agent, pos):
stored in a 'pos' tuple.
pos: Tuple of new position to move the agent to.
'''
-
- self._place_ag... |
keras-team__autokeras-276 | Upgrade raw image reading to imageio.imread
<!---
**If you are reporting a bug:**
* Verify that your issue is not being currently addressed by other issues or pull requests.
* Please note that Auto-Keras is only compatible with **Python 3.6**.
* Tag the issue with the `bug report` tag.
-->
### Bug Descriptio... | [
{
"content": "import csv\nimport os\nimport pickle\nimport sys\nimport tempfile\nimport zipfile\n\nimport requests\nimport torch\nfrom scipy import ndimage\n\nfrom autokeras.constant import Constant\n\n\nclass NoImprovementError(Exception):\n def __init__(self, message):\n self.message = message\n\n\n... | [
{
"content": "import csv\nimport os\nimport pickle\nimport sys\nimport tempfile\nimport zipfile\n\nimport imageio\nimport requests\nimport torch\n\nfrom autokeras.constant import Constant\n\n\nclass NoImprovementError(Exception):\n def __init__(self, message):\n self.message = message\n\n\nclass Early... | diff --git a/autokeras/utils.py b/autokeras/utils.py
index 039caa299..d838d9549 100644
--- a/autokeras/utils.py
+++ b/autokeras/utils.py
@@ -5,9 +5,9 @@
import tempfile
import zipfile
+import imageio
import requests
import torch
-from scipy import ndimage
from autokeras.constant import Constant
@@ -195,5 +19... |
DjangoGirls__djangogirls-874 | Event.MultipleObjectsReturned: get() returned more than one Event -- it returned 2!
Sentry Issue: [DJANGO-GIRLS-WEBSITE-4V](https://sentry.io/organizations/django-girls/issues/3800729247/?referrer=github_integration)
```
Event.MultipleObjectsReturned: get() returned more than one Event -- it returned 2!
(1 additional ... | [
{
"content": "from datetime import date, datetime, timedelta\n\nimport requests\nfrom django.utils import timezone\nfrom django_date_extensions.fields import ApproximateDate\n\nfrom .models import Event\n\nNOMINATIM_URL = \"https://nominatim.openstreetmap.org/search\"\n\n\ndef get_coordinates_for_city(city, cou... | [
{
"content": "from datetime import date, datetime, timedelta\n\nimport requests\nfrom django.utils import timezone\nfrom django_date_extensions.fields import ApproximateDate\n\nfrom .models import Event\n\nNOMINATIM_URL = \"https://nominatim.openstreetmap.org/search\"\n\n\ndef get_coordinates_for_city(city, cou... | diff --git a/core/utils.py b/core/utils.py
index ca8d5a3ca..c8771ccee 100644
--- a/core/utils.py
+++ b/core/utils.py
@@ -27,6 +27,8 @@ def get_event(page_url, is_user_authenticated, is_preview):
event = Event.objects.get(page_url=page_url)
except Event.DoesNotExist:
return None
+ except Event.... |
frappe__frappe-4874 | Email Copy Issue
> "Whenever we send emails of any documents (eg. to customers), and we tick "Send me a copy", it appears that ERPNext not only cc's the user into the email, but ALSO bcc's the user. The end result is that the user gets 2 (TWO) copies of the email each time. This problem has only occurred since the upgr... | [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\nfrom __future__ import unicode_literals, absolute_import\nfrom six.moves import range\nfrom six import string_types\nimport frappe\nimport json\nfrom email.utils import formataddr\nfrom frappe.c... | [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# MIT License. See license.txt\n\nfrom __future__ import unicode_literals, absolute_import\nfrom six.moves import range\nfrom six import string_types\nimport frappe\nimport json\nfrom email.utils import formataddr\nfrom frappe.c... | diff --git a/frappe/core/doctype/communication/email.py b/frappe/core/doctype/communication/email.py
index f37e35142858..bac3c4ed35ac 100755
--- a/frappe/core/doctype/communication/email.py
+++ b/frappe/core/doctype/communication/email.py
@@ -374,9 +374,6 @@ def get_bcc(doc, recipients=None, fetched_from_email_account=... |
paperless-ngx__paperless-ngx-2860 | [BUG] Gmail 'tag' rule removes current label on email
### Description
Some of my emails in Gmail are labeled when received and Gmail supports emails having multiple labels. When paperless imports the email attachment the current label is removed and replaced by the 'Paperless' (my action parameter) label.
Is there ... | [
{
"content": "import datetime\nimport itertools\nimport logging\nimport os\nimport re\nimport tempfile\nimport traceback\nfrom datetime import date\nfrom datetime import timedelta\nfrom fnmatch import fnmatch\nfrom typing import Dict\nfrom typing import List\nfrom typing import Union\n\nimport magic\nimport pat... | [
{
"content": "import datetime\nimport itertools\nimport logging\nimport os\nimport re\nimport tempfile\nimport traceback\nfrom datetime import date\nfrom datetime import timedelta\nfrom fnmatch import fnmatch\nfrom typing import Dict\nfrom typing import List\nfrom typing import Union\n\nimport magic\nimport pat... | diff --git a/src/paperless_mail/mail.py b/src/paperless_mail/mail.py
index e90ad46eb0c..eb5e856f6fe 100644
--- a/src/paperless_mail/mail.py
+++ b/src/paperless_mail/mail.py
@@ -165,7 +165,7 @@ def get_criteria(self):
def post_consume(self, M: MailBox, message_uid: str, parameter: str):
if re.search(r"gm... |
getpelican__pelican-1219 | CATEGORIES_URL doesn't honor it's default value
First of all, thanks for this great software. But, when I'm using the variable CATEGORIES_URL in templates (category.html), it doesn't have it's default value (as said on the documentation: CATEGORIES_URL ('categories/')). I need to explicitly set this value in pelican.co... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport six\n\nimport copy\nimport inspect\nimport os\nimport locale\nimport logging\n\ntry:\n # SourceFileLoader is the recommended way in 3.3+\n from importlib.machinery import SourceFileLoader\n load_sourc... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport six\n\nimport copy\nimport inspect\nimport os\nimport locale\nimport logging\n\ntry:\n # SourceFileLoader is the recommended way in 3.3+\n from importlib.machinery import SourceFileLoader\n load_sourc... | diff --git a/docs/settings.rst b/docs/settings.rst
index e33d8e09c..30507efd4 100644
--- a/docs/settings.rst
+++ b/docs/settings.rst
@@ -248,8 +248,8 @@ Setting name (default value) What does it do?
use the default language.
`PAGE_LANG... |
aws__aws-cli-1894 | aws cloudformation create-change-set with 'template-url' broken
```
$ aws --region eu-west-1 cloudformation create-change-set --change-set-name test --stack-name autobuild --template-url https://s3-eu-west-1.amazonaws.com/BUCKET/TEMPLATE.json --parameters ... --capabilities CAPABILITY_IAM
Error parsing parameter '--t... | [
{
"content": "# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.... | [
{
"content": "# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.... | diff --git a/awscli/paramfile.py b/awscli/paramfile.py
index e1cfe1867058..f446e29f6c83 100644
--- a/awscli/paramfile.py
+++ b/awscli/paramfile.py
@@ -29,6 +29,7 @@
'apigateway.put-integration.uri',
'cloudformation.create-stack.template-url',
'cloudformation.update-stack.template-url',
+ 'cloudformati... |
dbt-labs__dbt-core-2649 | dbt clean regression
### Describe the bug
In dbt 0.16.1 `dbt clean` fails without a profile:
```bash
(dbt) dbt$ dbt --version
installed version: 0.16.1
latest version: 0.17.0
Your version of dbt is out of date! You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation
(dbt)... | [
{
"content": "import os.path\nimport os\nimport shutil\n\nfrom dbt.task.base import ConfiguredTask\nfrom dbt.logger import GLOBAL_LOGGER as logger\n\n\nclass CleanTask(ConfiguredTask):\n\n def __is_project_path(self, path):\n proj_path = os.path.abspath('.')\n return not os.path.commonprefix(\n... | [
{
"content": "import os.path\nimport os\nimport shutil\n\nfrom dbt.task.base import BaseTask\nfrom dbt.logger import GLOBAL_LOGGER as logger\nfrom dbt.config import UnsetProfileConfig\n\n\nclass CleanTask(BaseTask):\n ConfigType = UnsetProfileConfig\n\n def __is_project_path(self, path):\n proj_pat... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index caed4ad9287..fedcda61b1e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,8 @@
### Fixes
-- fast-fail option with adapters that don't support cancelling queries will now passthrough the original error messages ([#2644](https://github.com/fishtown-analytics/dbt/... |
spacetelescope__jwql-601 | Build tests for Bad Pixel Monitor
| [
{
"content": "import numpy as np\nfrom setuptools import setup\nfrom setuptools import find_packages\n\nVERSION = '0.23.0'\n\nAUTHORS = 'Matthew Bourque, Lauren Chambers, Misty Cracraft, Mike Engesser, Mees Fix, Joe Filippazzo, Bryan Hilbert, '\nAUTHORS += 'Graham Kanarek, Teagan King, Catherine Martlin, Maria ... | [
{
"content": "import numpy as np\nfrom setuptools import setup\nfrom setuptools import find_packages\n\nVERSION = '0.23.0'\n\nAUTHORS = 'Matthew Bourque, Lauren Chambers, Misty Cracraft, Mike Engesser, Mees Fix, Joe Filippazzo, Bryan Hilbert, '\nAUTHORS += 'Graham Kanarek, Teagan King, Catherine Martlin, Maria ... | diff --git a/docs/source/tests.rst b/docs/source/tests.rst
index 297cf92b3..e37003a9c 100644
--- a/docs/source/tests.rst
+++ b/docs/source/tests.rst
@@ -8,6 +8,13 @@ test_api_views.py
:members:
:undoc-members:
+test_bad_pixel_monitor.py
+-------------------------
+.. automodule:: jwql.tests.test_bad_pixel_m... |
nvaccess__nvda-10544 | NVDA fails to navigate to landmarks in EdgeHTML-based content
**Note:** The problem occurs not only in the Microsoft Edge browser, but in all places which display content via EdgeHTML (e.g. the Twitter app for Windows 10). I can provide logs for the issue, if necessary.
### Steps to reproduce:
1. Launch NVDA.
2. O... | [
{
"content": "#A part of NonVisual Desktop Access (NVDA)\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n#Copyright (C) 2015-2017 NV Access Limited, Babbage B.V.\r\n\r\nfrom ctypes import byref\r\nfrom comtypes import COMError\r\nfrom comtypes.automation... | [
{
"content": "#A part of NonVisual Desktop Access (NVDA)\r\n#This file is covered by the GNU General Public License.\r\n#See the file COPYING for more details.\r\n#Copyright (C) 2015-2017 NV Access Limited, Babbage B.V.\r\n\r\nfrom ctypes import byref\r\nfrom comtypes import COMError\r\nfrom comtypes.automation... | diff --git a/source/UIABrowseMode.py b/source/UIABrowseMode.py
index a0b23a621ab..b63117f779d 100644
--- a/source/UIABrowseMode.py
+++ b/source/UIABrowseMode.py
@@ -422,7 +422,7 @@ def _iterNodesByType(self,nodeType,direction="next",pos=None):
elif nodeType == "landmark":
condition = UIAHandler.handler.clientOb... |
canonical__snapcraft-4566 | Validate component names do not begin with `snap-`
### What needs to get done
Component names in a `snapcraft.yaml` cannot begin with `snap-`.
### Why it needs to get done
These names are reserved for `snapd`.
| [
{
"content": "# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-\n#\n# Copyright 2022-2023 Canonical Ltd.\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 version 3 as\n# published by the Free Software Foundation.\n#\n# This... | [
{
"content": "# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-\n#\n# Copyright 2022-2023 Canonical Ltd.\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 version 3 as\n# published by the Free Software Foundation.\n#\n# This... | diff --git a/snapcraft/projects.py b/snapcraft/projects.py
index 23d3173648..aef5c41606 100644
--- a/snapcraft/projects.py
+++ b/snapcraft/projects.py
@@ -216,6 +216,11 @@ def _validate_component_name(name: str) -> None:
"Component names can only use ASCII lowercase letters and hyphens"
)
+ i... |
alltheplaces__alltheplaces-3342 | Spider superonefoods is broken
During the global build at 2021-09-22-14-42-27, spider **superonefoods** failed with **0 features** and **1 errors**.
Here's [the log](https://data.alltheplaces.xyz/runs/2021-09-22-14-42-27/logs/superonefoods.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-09-22-14-42-27/ou... | [
{
"content": "# -*- coding: utf-8 -*-\nimport json\nimport scrapy\n\nfrom locations.items import GeojsonPointItem\n\n\nclass SuperonefoodsSpider(scrapy.Spider):\n name = \"superonefoods\"\n item_attributes = { 'brand': \"Super One Foods\" }\n allowed_domains = [\"www.superonefoods.com\"]\n start_url... | [
{
"content": "# -*- coding: utf-8 -*-\nimport json\nimport scrapy\n\nfrom locations.items import GeojsonPointItem\n\n\nclass SuperonefoodsSpider(scrapy.Spider):\n name = \"superonefoods\"\n item_attributes = { 'brand': \"Super One Foods\" }\n allowed_domains = [\"www.superonefoods.com\"]\n start_url... | diff --git a/locations/spiders/superonefoods.py b/locations/spiders/superonefoods.py
index 59e779e57c3..a6abca56bfc 100644
--- a/locations/spiders/superonefoods.py
+++ b/locations/spiders/superonefoods.py
@@ -15,7 +15,7 @@ class SuperonefoodsSpider(scrapy.Spider):
def parse(self, response):
# retrieve j... |
holoviz__panel-633 | [CONDA] Require minimum numpy version
[This line](https://github.com/pyviz/panel/blob/72e6fb47c53afc606fe7a96e4da6a3513f5c16c6/panel/layout.py#L818) does not work when using older versions of numpy.
Can be added [here](https://github.com/pyviz/panel/blob/72e6fb47c53afc606fe7a96e4da6a3513f5c16c6/setup.py#L87-L91).
... | [
{
"content": "\"\"\"\nDefines Layout classes which may be used to arrange panes and widgets\nin flexible ways to build complex dashboards.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nfrom collections import OrderedDict\n\nimport param\nimport numpy as np\n\nfrom bokeh.layouts ... | [
{
"content": "\"\"\"\nDefines Layout classes which may be used to arrange panes and widgets\nin flexible ways to build complex dashboards.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nfrom collections import OrderedDict\n\nimport param\nimport numpy as np\n\nfrom bokeh.layouts ... | diff --git a/panel/layout.py b/panel/layout.py
index e883a8b2bc..7289c9c8e4 100644
--- a/panel/layout.py
+++ b/panel/layout.py
@@ -807,7 +807,7 @@ def _yoffset(self):
@property
def _object_grid(self):
- grid = np.full((self.nrows, self.ncols), None)
+ grid = np.full((self.nrows, self.ncols), N... |
spack__spack-31180 | spack bootstrap mirror does not work
### Steps to reproduce
I tried to make a bootstrap mirror into a local directory with
```console
$ spack --debug bootstrap mirror bootstrap-behind-firewall
==> [2022-06-15-15:19:26.252534] Imported bootstrap from built-in commands
==> [2022-06-15-15:19:26.257927] Imported boo... | [
{
"content": "# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\nfrom __future__ import print_function\n\nimport os.path\nimport shutil\nimport tempfile\n\nimport... | [
{
"content": "# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\nfrom __future__ import print_function\n\nimport os.path\nimport shutil\nimport tempfile\n\nimport... | diff --git a/lib/spack/spack/cmd/bootstrap.py b/lib/spack/spack/cmd/bootstrap.py
index e1bb4b034f285c..c4048b02fa941a 100644
--- a/lib/spack/spack/cmd/bootstrap.py
+++ b/lib/spack/spack/cmd/bootstrap.py
@@ -379,7 +379,9 @@ def _remove(args):
def _mirror(args):
- mirror_dir = os.path.join(args.root_dir, LOCAL_MI... |
keras-team__keras-19598 | imdb.load_data function returns a python list instead of ndarray object
In Keras 3.2.1 the imdb.load_data function returns a Python list instead of a ndarray object as described in the function documentation.
In Keras 2.15 the train and test data are converted to a ndarray using the following statements before return... | [
{
"content": "\"\"\"IMDB sentiment classification dataset.\"\"\"\n\nimport json\n\nimport numpy as np\n\nfrom keras.src.api_export import keras_export\nfrom keras.src.utils.file_utils import get_file\nfrom keras.src.utils.python_utils import remove_long_seq\n\n\n@keras_export(\"keras.datasets.imdb.load_data\")\... | [
{
"content": "\"\"\"IMDB sentiment classification dataset.\"\"\"\n\nimport json\n\nimport numpy as np\n\nfrom keras.src.api_export import keras_export\nfrom keras.src.utils.file_utils import get_file\nfrom keras.src.utils.python_utils import remove_long_seq\n\n\n@keras_export(\"keras.datasets.imdb.load_data\")\... | diff --git a/keras/src/datasets/imdb.py b/keras/src/datasets/imdb.py
index a8b5537b111f..f38dfaf0a158 100644
--- a/keras/src/datasets/imdb.py
+++ b/keras/src/datasets/imdb.py
@@ -135,8 +135,8 @@ def load_data(
xs = [[w for w in x if skip_top <= w < num_words] for x in xs]
idx = len(x_train)
- x_train... |
instadeepai__Mava-627 | [TEST] Jax System Core Parameter Client
### What do you want to test?
Jax system core parameter client (in `mava/systems/jax/`)
### Outline of test structure
* Unit tests
* Test components and hooks
### Definition of done
Passing checks, cover all hooks, edge cases considered
### Mandatory checklist before... | [
{
"content": "# python3\n# Copyright 2021 InstaDeep Ltd. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.... | [
{
"content": "# python3\n# Copyright 2021 InstaDeep Ltd. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.... | diff --git a/mava/systems/jax/parameter_client.py b/mava/systems/jax/parameter_client.py
index ba3d78363..c37853fe3 100644
--- a/mava/systems/jax/parameter_client.py
+++ b/mava/systems/jax/parameter_client.py
@@ -244,6 +244,6 @@ def _copy(self, new_parameters: Dict[str, Any]) -> None:
else:
... |
jupyterhub__zero-to-jupyterhub-k8s-2616 | Adopt kubernetes_asyncio client for KubeSpawner 3.x
KubeSpawner 3.x will use tomplus/kubernetes_asyncio instead of the official synchronous K8s client. This change reflects that difference in the underlying implementation.
| [
{
"content": "import glob\nimport os\nimport re\nimport sys\n\nfrom binascii import a2b_hex\n\nfrom tornado.httpclient import AsyncHTTPClient\nfrom kubernetes import client\nfrom jupyterhub.utils import url_path_join\n\n# Make sure that modules placed in the same directory as the jupyterhub config are added to ... | [
{
"content": "import glob\nimport os\nimport re\nimport sys\n\nfrom binascii import a2b_hex\n\nfrom tornado.httpclient import AsyncHTTPClient\nfrom kubernetes_asyncio import client\nfrom jupyterhub.utils import url_path_join\n\n# Make sure that modules placed in the same directory as the jupyterhub config are a... | diff --git a/images/hub/requirements.txt b/images/hub/requirements.txt
index 5d2183f800..c62c2e7f4a 100644
--- a/images/hub/requirements.txt
+++ b/images/hub/requirements.txt
@@ -4,23 +4,27 @@
#
# ./dependencies freeze --upgrade
#
+aiohttp==3.8.1
+ # via kubernetes-asyncio
+aiosignal==1.2.0
+ # via aiohttp
... |
qutebrowser__qutebrowser-1439 | Better support for special keys
Currently special keys (e.g. `<Ctrl-x>`) can only be used standalone.
Ideally they should be usable with a count, and inside of a keychain (e.g. `g<ctrl-g>` or whatever).
| [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | diff --git a/qutebrowser/keyinput/basekeyparser.py b/qutebrowser/keyinput/basekeyparser.py
index 5402bce77dd..56d6bd5be64 100644
--- a/qutebrowser/keyinput/basekeyparser.py
+++ b/qutebrowser/keyinput/basekeyparser.py
@@ -127,7 +127,9 @@ def _handle_special_key(self, e):
except KeyError:
self._debu... |
pymedusa__Medusa-4319 | HeBits provider failed to find HD torrents
When using 'html5lib' HeBits provider failed to find HD torrents (720p) for me.
Switching to with BS4Parser(data, 'html.parser') as html: fix the issue for me.
Please consider to switch to html.parser or fixing html5lib search.
| [
{
"content": "# coding=utf-8\n\n\"\"\"Provider code for HeBits.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport re\n\nfrom medusa import tv\nfrom medusa.bs4_parser import BS4Parser\nfrom medusa.helper.common import (\n convert_size,\n try_int,\n)\nfrom medusa.logger.adapters.sty... | [
{
"content": "# coding=utf-8\n\n\"\"\"Provider code for HeBits.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport re\n\nfrom medusa import tv\nfrom medusa.bs4_parser import BS4Parser\nfrom medusa.helper.common import (\n convert_size,\n try_int,\n)\nfrom medusa.logger.adapters.sty... | diff --git a/medusa/providers/torrent/html/hebits.py b/medusa/providers/torrent/html/hebits.py
index 98dd7ab59b..e8e0f8a815 100644
--- a/medusa/providers/torrent/html/hebits.py
+++ b/medusa/providers/torrent/html/hebits.py
@@ -111,7 +111,7 @@ def parse(self, data, mode):
"""
items = []
- with... |
google-research__text-to-text-transfer-transformer-72 | Run T5 on a CPU for inference
Hi, great work on T5!
I'm looking to run T5 on a CPU for interactive predictions only, no fine-tuning. The given notebook provides great instructions for using T5 with a TPU, but I'm struggling to find how I could use it with a CPU?
I've tried changing the notebook similar to this... | [
{
"content": "# Copyright 2020 The T5 Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl... | [
{
"content": "# Copyright 2020 The T5 Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl... | diff --git a/t5/models/mtf_model.py b/t5/models/mtf_model.py
index 9723027a..15796785 100644
--- a/t5/models/mtf_model.py
+++ b/t5/models/mtf_model.py
@@ -126,7 +126,9 @@ def __init__(
iterations_per_loop: integer, steps per train loop
"""
- mesh_shape = utils.tpu_mesh_shape(tpu_topology, model_paralle... |
aws-powertools__powertools-lambda-python-1022 | batch: different behaviour for all-items-failed in cold start vs. warm start
We're attempting to use `aws_lambda_powertools.utilities.batch` to handle retries etc. for an SQS queue. We're observing differences between a cold lambda and a warm lambda (i.e. previously processed an SQS message) for a batch containing a si... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nBatch processing utilities\n\"\"\"\nimport copy\nimport logging\nimport sys\nfrom abc import ABC, abstractmethod\nfrom enum import Enum\nfrom typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union, overload\n\nfrom aws_lambda_powertools.middleware_... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nBatch processing utilities\n\"\"\"\nimport copy\nimport logging\nimport sys\nfrom abc import ABC, abstractmethod\nfrom enum import Enum\nfrom typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union, overload\n\nfrom aws_lambda_powertools.middleware_... | diff --git a/aws_lambda_powertools/utilities/batch/base.py b/aws_lambda_powertools/utilities/batch/base.py
index 21b59328ef0..bccaccb4615 100644
--- a/aws_lambda_powertools/utilities/batch/base.py
+++ b/aws_lambda_powertools/utilities/batch/base.py
@@ -351,6 +351,7 @@ def _prepare(self):
"""
self.succ... |
pypi__warehouse-6334 | warehouse: Change default scope from disabled to hidden
Prevents empty value submission, which in turn causes a routing
match failure, which in turn causes a 404 instead of a form error.
cc @di
| [
{
"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/manage/views.py b/warehouse/manage/views.py
index 2b523c493abf..d67ba640d5fd 100644
--- a/warehouse/manage/views.py
+++ b/warehouse/manage/views.py
@@ -579,7 +579,7 @@ def default_response(self):
def manage_macaroons(self):
return self.default_response
- @view_config(request_me... |
ocf__ocfweb-162 | Misleading error message when trying to register an account and you already have one
"This CalNet account has already submitted a request for approval. If you believe this is an error, please contact us with your CalNet UID: xxx.”
| [
{
"content": "import ocflib.account.search as search\nimport ocflib.account.validators as validators\nimport ocflib.misc.validators\nimport ocflib.ucb.directory as directory\nfrom Crypto.PublicKey import RSA\nfrom django import forms\nfrom django.conf import settings\nfrom django.core.urlresolvers import revers... | [
{
"content": "import ocflib.account.search as search\nimport ocflib.account.validators as validators\nimport ocflib.misc.validators\nimport ocflib.ucb.directory as directory\nfrom Crypto.PublicKey import RSA\nfrom django import forms\nfrom django.conf import settings\nfrom django.core.urlresolvers import revers... | diff --git a/ocfweb/account/register.py b/ocfweb/account/register.py
index fefb4a217..3600b3385 100644
--- a/ocfweb/account/register.py
+++ b/ocfweb/account/register.py
@@ -35,6 +35,7 @@ def request_account(request):
request,
'account/register/already-has-account.html',
{
+ ... |
zalando__patroni-2080 | documentation build failure with sphinx-4.2.0
**Describe the bug**
On Debian unstable, patroni fails to build with the latest sphinx:
```
Running Sphinx v4.2.0
making output directory... done
Exception occurred:
File "/<<PKGBUILDDIR>>/docs/conf.py", line 207, in setup
app.add_stylesheet("custom.css")... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Patroni documentation build configuration file, created by\n# sphinx-quickstart on Mon Dec 19 16:54:09 2016.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration ... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Patroni documentation build configuration file, created by\n# sphinx-quickstart on Mon Dec 19 16:54:09 2016.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration ... | diff --git a/docs/conf.py b/docs/conf.py
index 20fa354c8..ae19400cd 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -194,4 +194,7 @@
# A possibility to have an own stylesheet, to add new rules or override existing ones
# For the latter case, the CSS specificity of the rules should be higher than the default ones
def... |
spack__spack-2022 | `spack checksum` finds wrong URLs
I was having some problems getting spack to find the correct URL for files.
With these settings
``` python
homepage = "http://fishshell.com/"
url = "http://fishshell.com/files/2.2.0/fish-2.2.0.tar.gz"
list_url = homepage
```
I get the following result (with wrong UR... | [
{
"content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ... | [
{
"content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ... | diff --git a/var/spack/repos/builtin/packages/fish/package.py b/var/spack/repos/builtin/packages/fish/package.py
index 0e85f410c19fb3..fb784b7571a6c4 100644
--- a/var/spack/repos/builtin/packages/fish/package.py
+++ b/var/spack/repos/builtin/packages/fish/package.py
@@ -32,8 +32,7 @@ class Fish(Package):
homepag... |
apluslms__a-plus-802 | Edit course menu has outdated link to Glyphicons
A+ edit course - menu - add menu item. The menu item has an icon. The hint in the icon field has outdated link to the Bootstrap documentation. You can not find the right icons in that link anymore. The link must be fixed. That is very easy to do.
https://github.com/ap... | [
{
"content": "from django.core.exceptions import ValidationError\nfrom django.urls import reverse\nfrom django.db import models\nfrom django.utils.functional import cached_property\nfrom django.utils.translation import gettext_lazy as _\nfrom urllib.parse import urljoin, urlsplit\n\nfrom course.models import Co... | [
{
"content": "from django.core.exceptions import ValidationError\nfrom django.urls import reverse\nfrom django.db import models\nfrom django.utils.functional import cached_property\nfrom django.utils.translation import gettext_lazy as _\nfrom urllib.parse import urljoin, urlsplit\n\nfrom course.models import Co... | diff --git a/external_services/models.py b/external_services/models.py
index f50d1930d..29cc290ac 100644
--- a/external_services/models.py
+++ b/external_services/models.py
@@ -209,7 +209,7 @@ class MenuItem(UrlMixin, models.Model):
max_length=32,
null=True,
blank=True,
- help_text=_("... |
statsmodels__statsmodels-3014 | BUG adfuller _str missing in ResultsStore
reported by Alan on the mailing list
```
statsmodels\tsa\stattools.pyc in __str__(self)
23 class ResultsStore(object):
24 def __str__(self):
---> 25 return self._str # pylint: disable=E1101
AttributeError: 'ResultsStore' object has no attribute '_str'
`... | [
{
"content": "\"\"\"\nStatistical tools for time series analysis\n\"\"\"\nfrom statsmodels.compat.python import (iteritems, range, lrange, string_types, lzip,\n zip, map)\nimport numpy as np\nfrom numpy.linalg import LinAlgError\nfrom scipy import stats\nfrom statsmodels.regressio... | [
{
"content": "\"\"\"\nStatistical tools for time series analysis\n\"\"\"\nfrom statsmodels.compat.python import (iteritems, range, lrange, string_types, lzip,\n zip, map)\nimport numpy as np\nfrom numpy.linalg import LinAlgError\nfrom scipy import stats\nfrom statsmodels.regressio... | diff --git a/statsmodels/tsa/stattools.py b/statsmodels/tsa/stattools.py
index 78488ff4c9e..10388fc56da 100644
--- a/statsmodels/tsa/stattools.py
+++ b/statsmodels/tsa/stattools.py
@@ -276,6 +276,7 @@ def adfuller(x, maxlag=None, regression="c", autolag='AIC',
"unit root")
resstore.HA =... |
deis__deis-2513 | make discovery-url is doesn't work .
shows no rule to create discovery-url .stop!
i have search the old issues,it didn't solve the problem.
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# deis documentation build configuration file, created by\n# sphinx-quickstart on Fri Jul 26 12:12:00 2013.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n# ... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# deis documentation build configuration file, created by\n# sphinx-quickstart on Fri Jul 26 12:12:00 2013.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n# ... | diff --git a/docs/_includes/_get-the-source.rst b/docs/_includes/_get-the-source.rst
new file mode 100644
index 0000000000..21f48b4cce
--- /dev/null
+++ b/docs/_includes/_get-the-source.rst
@@ -0,0 +1,24 @@
+Get the Source
+--------------
+
+The `source code`_ for Deis must be on your workstation to run the commands in... |
getmoto__moto-1701 | SSM `get_parameter_by_path` should return root parameters when path is just '/'
When you have a parameter with out any path in its name ie: `Name='foo', Description='A test parameter', Value='bar', Type='String'` and you run call get_parameters_by_path and pass in a Path of `'/'` it will return all parameters that don'... | [
{
"content": "from __future__ import unicode_literals\n\nfrom collections import defaultdict\n\nfrom moto.core import BaseBackend, BaseModel\nfrom moto.ec2 import ec2_backends\n\nimport datetime\nimport time\nimport uuid\n\n\nclass Parameter(BaseModel):\n def __init__(self, name, value, type, description, ke... | [
{
"content": "from __future__ import unicode_literals\n\nfrom collections import defaultdict\n\nfrom moto.core import BaseBackend, BaseModel\nfrom moto.ec2 import ec2_backends\n\nimport datetime\nimport time\nimport uuid\n\n\nclass Parameter(BaseModel):\n def __init__(self, name, value, type, description, ke... | diff --git a/moto/ssm/models.py b/moto/ssm/models.py
index aaeccc887792..bdc98e61b3ec 100644
--- a/moto/ssm/models.py
+++ b/moto/ssm/models.py
@@ -100,7 +100,7 @@ def get_parameters_by_path(self, path, with_decryption, recursive, filters=None)
# difference here.
path = path.rstrip('/') + '/'
... |
encode__django-rest-framework-8752 | Add support to Python 3.11
## Checklist
- [ ] Raised initially as discussion #...
- [x] This cannot be dealt with as a third party library. (We prefer new functionality to be [in the form of third party libraries](https://www.django-rest-framework.org/community/third-party-packages/#about-third-party-packages) wher... | [
{
"content": "#!/usr/bin/env python3\nimport os\nimport re\nimport shutil\nimport sys\nfrom io import open\n\nfrom setuptools import find_packages, setup\n\nCURRENT_PYTHON = sys.version_info[:2]\nREQUIRED_PYTHON = (3, 6)\n\n# This check and everything above must remain compatible with Python 2.7.\nif CURRENT_PY... | [
{
"content": "#!/usr/bin/env python3\nimport os\nimport re\nimport shutil\nimport sys\nfrom io import open\n\nfrom setuptools import find_packages, setup\n\nCURRENT_PYTHON = sys.version_info[:2]\nREQUIRED_PYTHON = (3, 6)\n\n# This check and everything above must remain compatible with Python 2.7.\nif CURRENT_PY... | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index c88dc55cd9..b635573f26 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -19,6 +19,7 @@ jobs:
- '3.8'
- '3.9'
- '3.10'
+ - '3.11'
steps:
- uses: actions/checkout@v3
diff --g... |
apache__tvm-7709 | [BUG][Threefry] Seg fault when running threefry_generate with some out_shape
Segmentation fault occurs when the `out_shape` of `threefry_generate` setted to some cases.
### To Reproduce
#### environment:
Ubuntu 18.04, llvm version 8.0.1
#### script:
```python
import tvm
import tvm.relay
import tvm.testing
im... | [
{
"content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n... | [
{
"content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n... | diff --git a/python/tvm/topi/random/kernel.py b/python/tvm/topi/random/kernel.py
index 728cd682fa42..a09a5f3f4ae3 100644
--- a/python/tvm/topi/random/kernel.py
+++ b/python/tvm/topi/random/kernel.py
@@ -141,7 +141,7 @@ def mix(a, b, rotation):
return [x, y]
# temporary buffer for holding the results of ... |
paperless-ngx__paperless-ngx-2456 | [BUG] Sorting tags by color does not work
### Description
When click on the header field for the "Color" column the order of the tags never changes.
### Steps to reproduce
1. Go to "Tag Management"
2. Click on "Color" table header
3. Little arrow besides header name indicates sorting but no changes in sort order o... | [
{
"content": "import itertools\nimport json\nimport logging\nimport os\nimport tempfile\nimport urllib\nimport uuid\nimport zipfile\nfrom datetime import datetime\nfrom pathlib import Path\nfrom time import mktime\nfrom unicodedata import normalize\nfrom urllib.parse import quote\n\nimport pathvalidate\nfrom dj... | [
{
"content": "import itertools\nimport json\nimport logging\nimport os\nimport tempfile\nimport urllib\nimport uuid\nimport zipfile\nfrom datetime import datetime\nfrom pathlib import Path\nfrom time import mktime\nfrom unicodedata import normalize\nfrom urllib.parse import quote\n\nimport pathvalidate\nfrom dj... | diff --git a/src/documents/views.py b/src/documents/views.py
index 6f0be216423..87862fe0723 100644
--- a/src/documents/views.py
+++ b/src/documents/views.py
@@ -176,7 +176,7 @@ def get_serializer_class(self):
permission_classes = (IsAuthenticated,)
filter_backends = (DjangoFilterBackend, OrderingFilter)
... |
celery__celery-3850 | celery.utils.time.maybe_make_aware docstring incorrect
The docstring for [celery.utils.time.maybe_make_aware](https://github.com/celery/celery/blob/master/celery/utils/time.py#L321) claims that it doesn't do anything if dt is already timezone-aware, but this is incorrect, as it will try to convert to the localtime or u... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Utilities related to dates, times, intervals, and timezones.\"\"\"\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport numbers\nimport os\nimport sys\nimport time as _time\n\nfrom calendar import monthrange\nfrom datetime import date, ... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Utilities related to dates, times, intervals, and timezones.\"\"\"\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport numbers\nimport os\nimport sys\nimport time as _time\n\nfrom calendar import monthrange\nfrom datetime import date, ... | diff --git a/celery/utils/time.py b/celery/utils/time.py
index 12103addfa2..0d696af0554 100644
--- a/celery/utils/time.py
+++ b/celery/utils/time.py
@@ -322,9 +322,10 @@ def maybe_make_aware(dt, tz=None):
"""Convert dt to aware datetime, do nothing if dt is already aware."""
if is_naive(dt):
dt = to_... |
searx__searx-274 | Use the method setting for opensearch.xml
In the preferences, there is a setting for setting the method (POST or GET) you want to use, but when you add searx to your web browser's search engines, you can only search with POST (except Chrome that can only handle GET method).
It seems logical to use the method the user ... | [
{
"content": "#!/usr/bin/env python\n\n'''\nsearx is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nsearx is distributed i... | [
{
"content": "#!/usr/bin/env python\n\n'''\nsearx is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nsearx is distributed i... | diff --git a/searx/webapp.py b/searx/webapp.py
index 6e7c8e7dad..6a53871220 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -687,6 +687,10 @@ def robots():
@app.route('/opensearch.xml', methods=['GET'])
def opensearch():
method = 'post'
+
+ if request.cookies.get('method', 'POST') == 'GET':
+ met... |
keras-team__autokeras-716 | improve code quality using Codacy
<!---
**If you are reporting a bug:**
* Verify that your issue is not being currently addressed by other issues or pull requests.
* Please note that Auto-Keras is only compatible with **Python 3.6**.
* Tag the issue with the `bug report` tag.
-->
### Bug Description
<!---
... | [
{
"content": "import functools\n\nimport kerastuner\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.python.util import nest\n\nfrom autokeras import const\nfrom autokeras import meta_model\nfrom autokeras import tuner\nfrom autokeras import utils\nfrom autokeras.hypermodel import head\nfrom autoke... | [
{
"content": "import functools\n\nimport kerastuner\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.python.util import nest\n\nfrom autokeras import meta_model\nfrom autokeras import tuner\nfrom autokeras import utils\nfrom autokeras.hypermodel import head\nfrom autokeras.hypermodel import node\nf... | diff --git a/autokeras/auto_model.py b/autokeras/auto_model.py
index 6b3987e7c..4deec890e 100644
--- a/autokeras/auto_model.py
+++ b/autokeras/auto_model.py
@@ -5,7 +5,6 @@
import tensorflow as tf
from tensorflow.python.util import nest
-from autokeras import const
from autokeras import meta_model
from autokeras ... |
geopandas__geopandas-2298 | BUG: Missing _crs attribute when using sjoin on grouped gdf and latest version of pandas
- [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.
- [ ] (optional) I have confirmed this bug exists on the main branch of geopandas.... | [
{
"content": "import contextlib\nfrom distutils.version import LooseVersion\nimport importlib\nimport os\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nimport pyproj\nimport shapely\nimport shapely.geos\n\n\n# -----------------------------------------------------------------------------\n# pandas ... | [
{
"content": "import contextlib\nfrom distutils.version import LooseVersion\nimport importlib\nimport os\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nimport pyproj\nimport shapely\nimport shapely.geos\n\n\n# -----------------------------------------------------------------------------\n# pandas ... | diff --git a/geopandas/_compat.py b/geopandas/_compat.py
index 000db2a602..f233eee849 100644
--- a/geopandas/_compat.py
+++ b/geopandas/_compat.py
@@ -19,6 +19,7 @@
PANDAS_GE_11 = str(pd.__version__) >= LooseVersion("1.1.0")
PANDAS_GE_115 = str(pd.__version__) >= LooseVersion("1.1.5")
PANDAS_GE_12 = str(pd.__version... |
googleapis__python-spanner-django-445 | django: implement SchemaEditor.quote_value()
For example:
```
======================================================================
ERROR: test_extra_args (schema.test_logging.SchemaLoggerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/hom... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file or at\n# https://developers.google.com/open-source/licenses/bsd\n\nfrom django.db import NotSupportedError\nfrom django.db.backends.base.schema import BaseDatabaseS... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file or at\n# https://developers.google.com/open-source/licenses/bsd\n\nfrom django.db import NotSupportedError\nfrom django.db.backends.base.schema import BaseDatabaseS... | diff --git a/django_spanner/schema.py b/django_spanner/schema.py
index 7e8426e2e4..c0a113f99c 100644
--- a/django_spanner/schema.py
+++ b/django_spanner/schema.py
@@ -199,8 +199,7 @@ def add_index(self, model, index):
super().add_index(model, index)
def quote_value(self, value):
- # TODO: a real ... |
docker__docker-py-1255 | Client should tolerate trailing slashes in base_url
docker/compose#3869
| [
{
"content": "import base64\nimport io\nimport os\nimport os.path\nimport json\nimport shlex\nimport sys\nimport tarfile\nimport tempfile\nimport warnings\nfrom distutils.version import StrictVersion\nfrom datetime import datetime\nfrom fnmatch import fnmatch\n\nimport requests\nimport six\n\nfrom .. import con... | [
{
"content": "import base64\nimport io\nimport os\nimport os.path\nimport json\nimport shlex\nimport sys\nimport tarfile\nimport tempfile\nimport warnings\nfrom distutils.version import StrictVersion\nfrom datetime import datetime\nfrom fnmatch import fnmatch\n\nimport requests\nimport six\n\nfrom .. import con... | diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index b565732d6..e1c7ad0ce 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -453,8 +453,8 @@ def parse_host(addr, is_win32=False, tls=False):
"Bind address needs a port: {0}".format(addr))
if proto == "http+unix" or proto ==... |
pex-tool__pex-865 | --index-url option is not passed to the build step in PEX
Hello
With pex 2.1.0, I have an issue when trying to package an app with dependencies using an external PyPi server.
The options used in the commande line is not passed to pip in the end leading to an error.
Here is an example :
Input command :
`p... | [
{
"content": "# coding=utf-8\n# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import absolute_import\n\nimport functools\nimport json\nimport os\nimport subprocess\nfrom collections import OrderedDict, default... | [
{
"content": "# coding=utf-8\n# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import absolute_import\n\nimport functools\nimport json\nimport os\nimport subprocess\nfrom collections import OrderedDict, default... | diff --git a/pex/resolver.py b/pex/resolver.py
index 2648a2fe9..0f6f34e0f 100644
--- a/pex/resolver.py
+++ b/pex/resolver.py
@@ -410,6 +410,8 @@ def _spawn_wheel_build(self, built_wheels_dir, build_request):
distributions=[build_request.source_path],
wheel_dir=build_result.build_dir,
cache=self._ca... |
bookwyrm-social__bookwyrm-611 | Expand book data task is re-setting default editions
it should not.
| [
{
"content": "''' functionality outline for a book data connector '''\nfrom abc import ABC, abstractmethod\nfrom dataclasses import asdict, dataclass\nimport logging\nfrom urllib3.exceptions import RequestError\n\nfrom django.db import transaction\nimport requests\nfrom requests.exceptions import SSLError\n\nfr... | [
{
"content": "''' functionality outline for a book data connector '''\nfrom abc import ABC, abstractmethod\nfrom dataclasses import asdict, dataclass\nimport logging\nfrom urllib3.exceptions import RequestError\n\nfrom django.db import transaction\nimport requests\nfrom requests.exceptions import SSLError\n\nfr... | diff --git a/bookwyrm/connectors/abstract_connector.py b/bookwyrm/connectors/abstract_connector.py
index f822fc5d11..2cbcda47c4 100644
--- a/bookwyrm/connectors/abstract_connector.py
+++ b/bookwyrm/connectors/abstract_connector.py
@@ -145,8 +145,9 @@ def create_edition_from_data(self, work, edition_data):
edit... |
encode__starlette-434 | Path prefix for PATH_INFO with WSGIMiddleware
When mounting an app (e.g. Django) through `WSGIMiddleware` it seems to be required to also adjust `PATH_INFO` accordingly.
With the following, Django would e.g. redirect to "/admin/" (without the outer "/dj" prefix).
```python
djapp = django.core.wsgi.get_wsgi_appli... | [
{
"content": "import asyncio\nimport io\nimport sys\nimport typing\n\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.types import ASGIInstance, Message, Receive, Scope, Send\n\n\ndef build_environ(scope: Scope, body: bytes) -> dict:\n \"\"\"\n Builds a scope and request body into a WS... | [
{
"content": "import asyncio\nimport io\nimport sys\nimport typing\n\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.types import ASGIInstance, Message, Receive, Scope, Send\n\n\ndef build_environ(scope: Scope, body: bytes) -> dict:\n \"\"\"\n Builds a scope and request body into a WS... | diff --git a/starlette/middleware/wsgi.py b/starlette/middleware/wsgi.py
index 182ce3b8d..a64a37710 100644
--- a/starlette/middleware/wsgi.py
+++ b/starlette/middleware/wsgi.py
@@ -13,7 +13,7 @@ def build_environ(scope: Scope, body: bytes) -> dict:
"""
environ = {
"REQUEST_METHOD": scope["method"],
-... |
magenta__magenta-573 | TypeError: __init__() got multiple values for keyword argument 'dtype'
When I run the following command:
```
image_stylization_transform \
--num_styles=10 \
--checkpoint=multistyle-pastiche-generator-monet.ckpt \
--input_image=1.jpg \
--which_styles="{0:0.1,1:0.1,2:0.1,3:0.1,4:0.1,5:0.1,6:0.1,7:0.... | [
{
"content": "# Copyright 2016 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | [
{
"content": "# Copyright 2016 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | diff --git a/magenta/models/image_stylization/ops.py b/magenta/models/image_stylization/ops.py
index e84179cae4..6d15ad0910 100644
--- a/magenta/models/image_stylization/ops.py
+++ b/magenta/models/image_stylization/ops.py
@@ -201,7 +201,7 @@ def _weighted_variable(name, initializer, weights, num_categories):
beta... |
liqd__a4-product-1113 | poll-comment export seems to be broken
```
Environment:
Request Method: GET
Request URL: http://localhost:8004/liqd-orga/dashboard/modules/umfrage/poll/export/
Django Version: 2.2.6
Python Version: 3.7.3
Installed Applications:
('django.contrib.sites',
'django.contrib.admin',
'django.contrib.auth',
'... | [
{
"content": "from django.http import Http404\nfrom django.shortcuts import get_object_or_404\nfrom django.shortcuts import render_to_response\nfrom django.urls import reverse\nfrom django.views import generic\n\nfrom adhocracy4.dashboard import mixins as dashboard_mixins\nfrom adhocracy4.projects.mixins import... | [
{
"content": "from django.http import Http404\nfrom django.shortcuts import get_object_or_404\nfrom django.shortcuts import render_to_response\nfrom django.urls import reverse\nfrom django.views import generic\n\nfrom adhocracy4.dashboard import mixins as dashboard_mixins\nfrom adhocracy4.projects.mixins import... | diff --git a/apps/polls/views.py b/apps/polls/views.py
index 7be8768eb..1b454d0e7 100644
--- a/apps/polls/views.py
+++ b/apps/polls/views.py
@@ -81,5 +81,8 @@ def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['comment_export'] = reverse(
'a4dashboa... |
inventree__InvenTree-3779 | Language settings not saved
### Please verify that this bug has NOT been raised before.
- [X] I checked and didn't find similar issue
### Describe the bug*
Each time I startup firefox and log on inventree I have to change the language settings.
### Steps to Reproduce
I use a computer and browser set in french bu... | [
{
"content": "\"\"\"Django settings for InvenTree project.\n\nIn practice the settings in this file should not be adjusted,\ninstead settings can be configured in the config.yaml file\nlocated in the top level project directory.\n\nThis allows implementation configuration to be hidden from source control,\nas w... | [
{
"content": "\"\"\"Django settings for InvenTree project.\n\nIn practice the settings in this file should not be adjusted,\ninstead settings can be configured in the config.yaml file\nlocated in the top level project directory.\n\nThis allows implementation configuration to be hidden from source control,\nas w... | diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py
index c14d957147fa..a6c6d816f2cd 100644
--- a/InvenTree/InvenTree/settings.py
+++ b/InvenTree/InvenTree/settings.py
@@ -607,6 +607,8 @@
# Internationalization
# https://docs.djangoproject.com/en/dev/topics/i18n/
LANGUAGE_CODE = get_settin... |
conda__conda-build-1839 | conda build 2.1.6 sporadic failures
After updating 2.1.5 to 2.1.6, I now have sporadic (non reproductible) failures with conda build
```bash
RuntimeError: Can't build <whatever> due to unsatisfiable dependencies:
Packages/dependencies missing in current linux-64 channels:
- openssl
- zlib
- ...
```
,... | [
{
"content": "# (c) 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.\n\nfrom __future__ import absolute_import, division, print_function\n\nfrom co... | [
{
"content": "# (c) 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.\n\nfrom __future__ import absolute_import, division, print_function\n\nfrom co... | diff --git a/conda_build/inspect.py b/conda_build/inspect.py
index a4826adc54..3274ff8bc7 100644
--- a/conda_build/inspect.py
+++ b/conda_build/inspect.py
@@ -237,6 +237,7 @@ def inspect_linkages(packages, prefix=sys.prefix, untracked=False,
depmap = defaultdict(list)
pkgmap[pkg] = depmap
dep... |
CiviWiki__OpenCiviWiki-1468 | Fix symmetrical relationship warning
### Idea summary
Our Civi model has a relationship to itself with a `related_name` defined, causing the following warning to appear.
### Further details
```
WARNINGS:
threads.Civi.linked_civis: (fields.W345) related_name has no effect on ManyToManyField with a symmetrical... | [
{
"content": "import datetime\nimport json\nimport math\nimport os\nfrom calendar import month_name\n\nfrom categories.models import Category\nfrom common.utils import PathAndRename\nfrom core.constants import CIVI_TYPES\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom dja... | [
{
"content": "import datetime\nimport json\nimport math\nimport os\nfrom calendar import month_name\n\nfrom categories.models import Category\nfrom common.utils import PathAndRename\nfrom core.constants import CIVI_TYPES\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom dja... | diff --git a/project/threads/models.py b/project/threads/models.py
index e2b148cb..a4a39672 100644
--- a/project/threads/models.py
+++ b/project/threads/models.py
@@ -231,7 +231,7 @@ class Civi(models.Model):
tags = TaggableManager()
- linked_civis = models.ManyToManyField("self", related_name="links", blan... |
frappe__frappe-25168 | Bug: list index out of range error in User Permission
When I want to set in a User Permission the field applicable_for, I always get an out of range error:
` File "apps/frappe/frappe/app.py", line 110, in application
response = frappe.api.handle(request)
File "apps/frappe/frappe/api/__init__.py", line 49, in... | [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# License: MIT. See LICENSE\n\nimport json\nimport re\nfrom typing import TypedDict\n\nfrom typing_extensions import NotRequired # not required in 3.11+\n\nimport frappe\n\n# Backward compatbility\nfrom frappe import _, is_whit... | [
{
"content": "# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors\n# License: MIT. See LICENSE\n\nimport json\nimport re\nfrom typing import TypedDict\n\nfrom typing_extensions import NotRequired # not required in 3.11+\n\nimport frappe\n\n# Backward compatbility\nfrom frappe import _, is_whit... | diff --git a/frappe/desk/search.py b/frappe/desk/search.py
index 1523e9326b2a..85b4a9fdfb00 100644
--- a/frappe/desk/search.py
+++ b/frappe/desk/search.py
@@ -260,6 +260,8 @@ def to_string(parts):
if meta.show_title_field_in_link:
for item in res:
item = list(item)
+ if len(item) == 1:
+ item = [item[0], ... |
Textualize__textual-2621 | Pushing a screen should send Leave message
If you have an action that opens a screen, it leaves the footer stuck in the highlight state.
I think we need to call `_set_mouse_over(None)` on the current screen when pushing another screen.
| [
{
"content": "from __future__ import annotations\n\nfrom collections import defaultdict\nfrom typing import ClassVar, Optional\n\nimport rich.repr\nfrom rich.console import RenderableType\nfrom rich.text import Text\n\nfrom .. import events\nfrom ..reactive import reactive\nfrom ..widget import Widget\n\n\n@ric... | [
{
"content": "from __future__ import annotations\n\nfrom collections import defaultdict\nfrom typing import ClassVar, Optional\n\nimport rich.repr\nfrom rich.console import RenderableType\nfrom rich.text import Text\n\nfrom .. import events\nfrom ..reactive import reactive\nfrom ..widget import Widget\n\n\n@ric... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2ba7ec1535..d838c46f50 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed
- `Placeholder` now sets its color cycle per app https://github.com/Textualize/textual/issues/2590
+... |
statsmodels__statsmodels-8835 | Use sharex=True in plotting seasonal decomposition
This is a tiny change in the `plot` method of `DecomposeResult` (in statsmodels.tsa.seasonal). I started to use it just a few minutes ago on a quite long time series (8760 samples), so that in a interactive Matlplotlib plot, it is useful to zoom horizontally. Unfortuna... | [
{
"content": "\"\"\"\nSeasonal Decomposition by Moving Averages\n\"\"\"\nimport numpy as np\nimport pandas as pd\nfrom pandas.core.nanops import nanmean as pd_nanmean\n\nfrom statsmodels.tools.validation import PandasWrapper, array_like\nfrom statsmodels.tsa.stl._stl import STL\nfrom statsmodels.tsa.filters.fil... | [
{
"content": "\"\"\"\nSeasonal Decomposition by Moving Averages\n\"\"\"\nimport numpy as np\nimport pandas as pd\nfrom pandas.core.nanops import nanmean as pd_nanmean\n\nfrom statsmodels.tools.validation import PandasWrapper, array_like\nfrom statsmodels.tsa.stl._stl import STL\nfrom statsmodels.tsa.filters.fil... | diff --git a/statsmodels/tsa/forecasting/tests/test_stl.py b/statsmodels/tsa/forecasting/tests/test_stl.py
index 97277483f9e..f673886b5e7 100644
--- a/statsmodels/tsa/forecasting/tests/test_stl.py
+++ b/statsmodels/tsa/forecasting/tests/test_stl.py
@@ -40,6 +40,16 @@ def test_smoke(data):
assert hasattr(res.model_... |
Textualize__rich-911 | [BUG] Line pointer in Syntax doesn't render on "legacy Windows"
**Describe the bug**
Line pointer in Rich's `Syntax` class doesn't render on so-called "legacy Windows" cmd.
I was expecting Rich to use a different character on "legacy Windows" so that it can be rendered, similarly to what's done to box drawing charac... | [
{
"content": "import os.path\nimport platform\nimport textwrap\nfrom abc import ABC, abstractmethod\nfrom typing import Any, Dict, Optional, Set, Tuple, Type, Union\n\nfrom pygments.lexers import get_lexer_by_name, guess_lexer_for_filename\nfrom pygments.style import Style as PygmentsStyle\nfrom pygments.styles... | [
{
"content": "import os.path\nimport platform\nimport textwrap\nfrom abc import ABC, abstractmethod\nfrom typing import Any, Dict, Optional, Set, Tuple, Type, Union\n\nfrom pygments.lexers import get_lexer_by_name, guess_lexer_for_filename\nfrom pygments.style import Style as PygmentsStyle\nfrom pygments.styles... | diff --git a/rich/syntax.py b/rich/syntax.py
index 5485fd37a..1f9e0421d 100644
--- a/rich/syntax.py
+++ b/rich/syntax.py
@@ -480,7 +480,7 @@ def __rich_console__(
padding = _Segment(" " * numbers_column_width + " ", background_style)
new_line = _Segment("\n")
- line_pointer = "❱ "
+ li... |
Lightning-AI__torchmetrics-1454 | change `targets.dtype` to the type of `outputs` in the intern of `StructuralSimilarityIndexMeasure().update()`?
## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->
### Motivation
<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., ... | [
{
"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 1edf4b27f75..aedaad41c9e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed type checking on the `maximize` parameter at the initialization of `MetricTracker` ([#1428](h... |
apache__tvm-3195 | OpenCL grouped convolutions "did you forget to bind"
It's possible that this is a usage question rather than a bug.
However, I have been trying to run grouped convolutions on OpenCL devices, using models imported from ONNX.
OpenCL models work when the number of `groups==1`, and when `groups==input_channels`, but ... | [
{
"content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n... | [
{
"content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n... | diff --git a/topi/python/topi/cuda/group_conv2d_nchw.py b/topi/python/topi/cuda/group_conv2d_nchw.py
index be4ae3554e33..cbdb3cb8031d 100644
--- a/topi/python/topi/cuda/group_conv2d_nchw.py
+++ b/topi/python/topi/cuda/group_conv2d_nchw.py
@@ -346,6 +346,8 @@ def schedule_conv2d_nchw_cuda(cfg, outs):
def _callback(... |
scipy__scipy-20511 | BUG: scipy.special.logsumexp raises ValueError for a zero-size array
### Describe your issue.
[`scipy.special.logsumexp`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.logsumexp.html) raises a `ValueError` for a zero-size array (see below).
Mathematically, the correct answer for a zero-size arr... | [
{
"content": "import numpy as np\nfrom scipy._lib._util import _asarray_validated\n\n__all__ = [\"logsumexp\", \"softmax\", \"log_softmax\"]\n\n\ndef logsumexp(a, axis=None, b=None, keepdims=False, return_sign=False):\n \"\"\"Compute the log of the sum of exponentials of input elements.\n\n Parameters\n ... | [
{
"content": "import numpy as np\nfrom scipy._lib._util import _asarray_validated\n\n__all__ = [\"logsumexp\", \"softmax\", \"log_softmax\"]\n\n\ndef logsumexp(a, axis=None, b=None, keepdims=False, return_sign=False):\n \"\"\"Compute the log of the sum of exponentials of input elements.\n\n Parameters\n ... | diff --git a/scipy/special/_logsumexp.py b/scipy/special/_logsumexp.py
index 9d15fa9aa082..50b59102822d 100644
--- a/scipy/special/_logsumexp.py
+++ b/scipy/special/_logsumexp.py
@@ -102,7 +102,8 @@ def logsumexp(a, axis=None, b=None, keepdims=False, return_sign=False):
# Scale by real part for complex inputs, b... |
pretalx__pretalx-338 | Unable to add questions
The following link doesn't do anything: `https://[Domain]/orga/event/[CFP_name]/cfp/questions/new`
## Expected Behavior
Being be to create a question
## Current Behavior
Unable to create a question
## Possible Solution
Fix the edit button.
## Steps to Reproduce (for bugs)
... | [
{
"content": "from csp.decorators import csp_update\nfrom django.contrib import messages\nfrom django.db import transaction\nfrom django.db.models.deletion import ProtectedError\nfrom django.forms.models import inlineformset_factory\nfrom django.shortcuts import redirect\nfrom django.utils.decorators import met... | [
{
"content": "from csp.decorators import csp_update\nfrom django.contrib import messages\nfrom django.db import transaction\nfrom django.db.models.deletion import ProtectedError\nfrom django.forms.models import inlineformset_factory\nfrom django.shortcuts import redirect\nfrom django.utils.decorators import met... | diff --git a/src/pretalx/orga/views/cfp.py b/src/pretalx/orga/views/cfp.py
index a2dd740cb0..88758523d0 100644
--- a/src/pretalx/orga/views/cfp.py
+++ b/src/pretalx/orga/views/cfp.py
@@ -83,7 +83,8 @@ class CfPQuestionDetail(PermissionRequired, ActionFromUrl, CreateOrUpdateView):
write_permission_required = 'orga.... |
internetarchive__openlibrary-8831 | `providers/isbndb.py` crashes when the `'subjects'` value is a literal `None`
<!-- IMPORTANT: Before posting, be sure to redact or remove sensitive data, such as passwords, secret keys, session cookies, etc. -->
<!-- What problem are we solving? What does the experience look like today? What are the symptoms? -->
#... | [
{
"content": "import re\nimport json\nimport logging\nimport os\nfrom typing import Any, Final\nimport requests\n\nfrom json import JSONDecodeError\n\nfrom openlibrary.config import load_config\nfrom openlibrary.core.imports import Batch\nfrom openlibrary.plugins.upstream.utils import get_marc21_language\nfrom ... | [
{
"content": "import re\nimport json\nimport logging\nimport os\nfrom typing import Any, Final\nimport requests\n\nfrom json import JSONDecodeError\n\nfrom openlibrary.config import load_config\nfrom openlibrary.core.imports import Batch\nfrom openlibrary.plugins.upstream.utils import get_marc21_language\nfrom ... | diff --git a/scripts/providers/isbndb.py b/scripts/providers/isbndb.py
index a2e7fc266a2..a2c3d3398b2 100644
--- a/scripts/providers/isbndb.py
+++ b/scripts/providers/isbndb.py
@@ -71,7 +71,7 @@ def __init__(self, data: dict[str, Any]):
self.languages = self._get_languages(data)
self.source_records = ... |
marshmallow-code__webargs-525 | Parsing arguments always returns None
parsing the arguments always returns None, even if trying the most basic syntax taken from the [quick start page](https://webargs.readthedocs.io/en/latest/quickstart.html#basic-usage). Maybe I have a typo I failed to see.
Versions:
Flask: 1.1.2
Marshmallow: 3.6.0
Flask-marshm... | [
{
"content": "import functools\nimport inspect\nimport typing\nimport logging\nimport warnings\nfrom collections.abc import Mapping\nimport json\n\nimport marshmallow as ma\nfrom marshmallow import ValidationError\nfrom marshmallow.utils import missing\n\nfrom webargs.compat import MARSHMALLOW_VERSION_INFO\nfro... | [
{
"content": "import functools\nimport inspect\nimport typing\nimport logging\nimport warnings\nfrom collections.abc import Mapping\nimport json\n\nimport marshmallow as ma\nfrom marshmallow import ValidationError\nfrom marshmallow.utils import missing\n\nfrom webargs.compat import MARSHMALLOW_VERSION_INFO\nfro... | diff --git a/src/webargs/core.py b/src/webargs/core.py
index d242a931..c2e103c6 100644
--- a/src/webargs/core.py
+++ b/src/webargs/core.py
@@ -269,6 +269,10 @@ def parse(
error_status_code=error_status_code,
error_headers=error_headers,
)
+ warnings.warn(
+ ... |
ansible__ansible-modules-core-5658 | junos_config: obj, end = self.raw_decode(s, idx=_w(s, 0).end()) -> TypeError: expected string or buffer
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
junos_config
##### ANSIBLE VERSION
```
```
##### CONFIGURATION
##### OS / ENVIRONMENT
##### SUMMARY
##### STEPS TO REPRODUCE
```
Run Junos... | [
{
"content": "#!/usr/bin/python\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 Foundation, either version 3 of the License, or\n# (at your option) any later vers... | [
{
"content": "#!/usr/bin/python\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 Foundation, either version 3 of the License, or\n# (at your option) any later vers... | diff --git a/network/junos/junos_config.py b/network/junos/junos_config.py
index f0814a0b56b..af0134764f8 100644
--- a/network/junos/junos_config.py
+++ b/network/junos/junos_config.py
@@ -242,7 +242,7 @@ def load_config(module, result):
kwargs['commit'] = not module.check_mode
if module.params['src']:
- ... |
wagtail__wagtail-7590 | Panel heading attribute ignored when nested in MultiFieldPanel
### Issue Summary
When a panel (`FieldPanel`, `StreamFieldPanel`, etc.) is nested in a `MultiFieldPanel`, the `heading` attribute of the nested panel is ignored.
### Steps to Reproduce
1. (for example) Start a new project with `wagtail start mypr... | [
{
"content": "import functools\nimport re\n\nfrom django import forms\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured\nfrom django.core.signals import setting_changed\nfrom... | [
{
"content": "import functools\nimport re\n\nfrom django import forms\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured\nfrom django.core.signals import setting_changed\nfrom... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 82f273b496e1..6cd6f68a501e 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -75,6 +75,7 @@ Changelog
* Fix: Nested InlinePanel usage no longer fails to save when creating two or more items (Indresh P, Rinish Sam, Anirudh V S)
* Fix: Changed relation name used for ad... |
kserve__kserve-1463 | Storage initializer download tar.gz or zip from uri with query params fails
/kind bug
**What steps did you take and what happened:**
[A clear and concise description of what the bug is.]
1. actually i am using Seldon with KFServing Storage Initializer
2. use v0.5.0 storage initializer image
3. specify storage ... | [
{
"content": "# Copyright 2020 kubeflow.org.\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 applica... | [
{
"content": "# Copyright 2020 kubeflow.org.\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 applica... | diff --git a/python/kfserving/kfserving/storage.py b/python/kfserving/kfserving/storage.py
index 9b048d3e6aa..f8fdeb2a52e 100644
--- a/python/kfserving/kfserving/storage.py
+++ b/python/kfserving/kfserving/storage.py
@@ -228,7 +228,7 @@ def _download_local(uri, out_dir=None):
def _download_from_uri(uri, out_dir=No... |
Netflix__lemur-387 | Lemur should re-direct you to 'next' page after login.
Lemur should do the right thing and re-direct back to the correct page after a login prompt.
| [
{
"content": "from __future__ import unicode_literals # at top of module\n\nimport os\nimport sys\nimport base64\nimport time\nimport arrow\nimport requests\nimport json\nfrom gunicorn.config import make_settings\n\nfrom cryptography.fernet import Fernet\n\nfrom lockfile import LockFile, LockTimeout\n\nfrom ... | [
{
"content": "from __future__ import unicode_literals # at top of module\n\nimport os\nimport sys\nimport base64\nimport time\nimport arrow\nimport requests\nimport json\nfrom gunicorn.config import make_settings\n\nfrom cryptography.fernet import Fernet\n\nfrom lockfile import LockFile, LockTimeout\n\nfrom ... | diff --git a/lemur/manage.py b/lemur/manage.py
index 86e6b8df0a..d0608f5f7e 100755
--- a/lemur/manage.py
+++ b/lemur/manage.py
@@ -864,7 +864,7 @@ def run(self, window):
def main():
manager.add_command("start", LemurServer())
- manager.add_command("runserver", Server(host='127.0.0.1'))
+ manager.add_comma... |
docker__docker-py-122 | Sanitize base_url
I spent ages trying to find out why all non-GET operations were failing. It turns out I had an extra slash (`/`) at the end of the `base_url` passed into `Client()`.
So I entered `c = Client("http://myhost.com/")` instead of `c = Client("http://myhost.com")`.
The traceback was not very clear:
``` p... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | diff --git a/docker/client.py b/docker/client.py
index fd4c9e199..cadfe7ffe 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -70,6 +70,8 @@ def __init__(self, base_url="unix://var/run/docker.sock", version="1.6",
super(Client, self).__init__()
if base_url.startswith('unix:///'):
ba... |
getsentry__sentry-python-2762 | Strawberry integration crashes if no query is in request
### How do you use Sentry?
Sentry Saas (sentry.io)
### Version
1.40.2
### Steps to Reproduce
Running an app with the StrawberryIntegration crashes if graphql endpoint is called with no `query` field in the input data.
1. Place the attached litestar app co... | [
{
"content": "import hashlib\nfrom functools import cached_property\nfrom inspect import isawaitable\nfrom sentry_sdk import configure_scope, start_span\nfrom sentry_sdk.consts import OP\nfrom sentry_sdk.integrations import Integration, DidNotEnable\nfrom sentry_sdk.integrations.logging import ignore_logger\nfr... | [
{
"content": "import hashlib\nfrom functools import cached_property\nfrom inspect import isawaitable\nfrom sentry_sdk import configure_scope, start_span\nfrom sentry_sdk.consts import OP\nfrom sentry_sdk.integrations import Integration, DidNotEnable\nfrom sentry_sdk.integrations.logging import ignore_logger\nfr... | diff --git a/sentry_sdk/integrations/strawberry.py b/sentry_sdk/integrations/strawberry.py
index 3d450e0692..5bc4184bee 100644
--- a/sentry_sdk/integrations/strawberry.py
+++ b/sentry_sdk/integrations/strawberry.py
@@ -145,6 +145,9 @@ def on_operation(self):
operation_type = "query"
op = OP.GRAPHQL_QU... |
huggingface__transformers-10070 | BertGenerationTokenizer provides an unexpected value for BertGenerationModel
- `transformers` version: 4.2.2
- PyTorch version (GPU?): 1.7.0+cu101
- tokenizers: @n1t0, @LysandreJik
## Information
in both models BertGenerationEncoder, BertGenerationDecoder, there's no need for `token_type_ids` however the BertG... | [
{
"content": "# coding=utf-8\n# Copyright (c) 2020, 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/lic... | [
{
"content": "# coding=utf-8\n# Copyright (c) 2020, 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/lic... | diff --git a/src/transformers/models/bert_generation/tokenization_bert_generation.py b/src/transformers/models/bert_generation/tokenization_bert_generation.py
index 92525e852748..ce6728639355 100644
--- a/src/transformers/models/bert_generation/tokenization_bert_generation.py
+++ b/src/transformers/models/bert_generati... |
falconry__falcon-1653 | Setup.py uses the imp module that is deprecated
while trying to run `python setup.py test` I get the warning
`DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses`
Since python 2 is no longer supported I think we can migrate to `importlib`
| [
{
"content": "import glob\nimport imp\nimport io\nimport os\nfrom os import path\nimport re\nimport sys\n\nfrom setuptools import Extension, find_packages, setup\n\nMYDIR = path.abspath(os.path.dirname(__file__))\n\nVERSION = imp.load_source('version', path.join('.', 'falcon', 'version.py'))\nVERSION = VERSION.... | [
{
"content": "import glob\nimport importlib\nimport io\nimport os\nfrom os import path\nimport re\nimport sys\n\nfrom setuptools import Extension, find_packages, setup\n\nMYDIR = path.abspath(os.path.dirname(__file__))\n\nVERSION = importlib.import_module('falcon.version')\nVERSION = VERSION.__version__\n\nREQU... | diff --git a/setup.py b/setup.py
index 7db19507a..6aef39f66 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,5 @@
import glob
-import imp
+import importlib
import io
import os
from os import path
@@ -10,7 +10,7 @@
MYDIR = path.abspath(os.path.dirname(__file__))
-VERSION = imp.load_source('version', path.join('.... |
pymedusa__Medusa-10390 | [APP SUBMITTED]: ValueError: invalid literal for int() with base 10: ''
### INFO
**Python Version**: `3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]`
**Operating System**: `Linux-4.19.0-12-amd64-x86_64-with-debian-10.6`
**Locale**: `UTF-8`
**Branch**: [develop](../tree/develop)
**Database**: `44.19`
**Commit**: py... | [
{
"content": "# coding=utf-8\n\"\"\"Imdb indexer api module.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport locale\nimport logging\nfrom collections import OrderedDict, namedtuple\nfrom datetime import datetime\nfrom itertools import chain\nfrom time import time\n\nfrom imdbpie import imdbpie\n\nfro... | [
{
"content": "# coding=utf-8\n\"\"\"Imdb indexer api module.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport locale\nimport logging\nfrom collections import OrderedDict, namedtuple\nfrom datetime import datetime\nfrom itertools import chain\nfrom time import time\n\nfrom imdbpie import imdbpie\n\nfro... | diff --git a/medusa/indexers/imdb/api.py b/medusa/indexers/imdb/api.py
index 7920046242..815d662c7b 100644
--- a/medusa/indexers/imdb/api.py
+++ b/medusa/indexers/imdb/api.py
@@ -69,7 +69,10 @@ def imdb_id(self, value):
self.series_id = int(self._imdb_id.split('tt')[-1])
else:
self._i... |
benoitc__gunicorn-1277 | socket is not registered: gthread worker crash
I'm using gunicorn 19.4.1, and I haven't been able to figure out how to reproduce this reliably, but I'm seeing the following crash periodically in my gthread workers. This causes the worker to exit and the master to spawn a new one. I also found the following StackOverflo... | [
{
"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\n# design:\n# a threaded worker accepts connections in the main loop, accepted\n# connections are are added to the thread pool as a connection job. On\n# keepalive co... | [
{
"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\n# design:\n# a threaded worker accepts connections in the main loop, accepted\n# connections are are added to the thread pool as a connection job. On\n# keepalive co... | diff --git a/gunicorn/workers/gthread.py b/gunicorn/workers/gthread.py
index 7327a3188..fcdcc7a77 100644
--- a/gunicorn/workers/gthread.py
+++ b/gunicorn/workers/gthread.py
@@ -179,6 +179,9 @@ def murder_keepalived(self):
except EnvironmentError as e:
if e.errno != errno.EB... |
tobymao__sqlglot-2095 | Unable to parse the oracle query when "#" is present in the column names
Hello,
Parser is throwing an error when there is "#" character is present in the column name.
**Code for your reference -**
```
import sqlglot.expressions as exp
query ="""
SELECT A.COL#, B.COL2 FROM SCHEMA1.TABLE1 A
"""
expressi... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, parser, tokens, transforms\nfrom sqlglot.dialects.dialect import Dialect, no_ilike_sql, rename_func, trim_sql\nfrom sqlglot.helper import seq_get\nfrom sqlglot.tokens import TokenType\n\n\ndef _parse_xm... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, parser, tokens, transforms\nfrom sqlglot.dialects.dialect import Dialect, no_ilike_sql, rename_func, trim_sql\nfrom sqlglot.helper import seq_get\nfrom sqlglot.tokens import TokenType\n\n\ndef _parse_xm... | diff --git a/sqlglot/dialects/oracle.py b/sqlglot/dialects/oracle.py
index c43c020d61..fe31a9129e 100644
--- a/sqlglot/dialects/oracle.py
+++ b/sqlglot/dialects/oracle.py
@@ -166,7 +166,7 @@ def xmltable_sql(self, expression: exp.XMLTable) -> str:
return f"XMLTABLE({self.sep('')}{self.indent(this + passing... |
geopandas__geopandas-1089 | Pass keywords to colorbar construction
Hey all,
Amazing tool – thank you so much for putting it together and managing it so well.
I'm sure there is an easy fix to this, but I'm having trouble accessing the legend object from a chloropleth plot. I'd imagine ax.get_legend() should return it, but that doesn't seem to ... | [
{
"content": "from __future__ import print_function\n\nimport warnings\n\nimport numpy as np\nimport pandas as pd\n\n\ndef _flatten_multi_geoms(geoms, colors=None):\n \"\"\"\n Returns Series like geoms and colors, except that any Multi geometries\n are split into their components and colors are repeate... | [
{
"content": "from __future__ import print_function\n\nimport warnings\n\nimport numpy as np\nimport pandas as pd\n\n\ndef _flatten_multi_geoms(geoms, colors=None):\n \"\"\"\n Returns Series like geoms and colors, except that any Multi geometries\n are split into their components and colors are repeate... | diff --git a/geopandas/plotting.py b/geopandas/plotting.py
index 476085cffb..3422e49b31 100644
--- a/geopandas/plotting.py
+++ b/geopandas/plotting.py
@@ -590,7 +590,9 @@ def plot_dataframe(
from matplotlib.colors import Normalize
from matplotlib import cm
- norm = Normalize(vmin=mn, vmax=mx)... |
holoviz__panel-5818 | find_requirements includes datetime and random
I'm on the current `main` branch of Panel.
When I use `find_requirements` like below I get "packages" included like `datetime` and `random` from the `stdlib`.
```python
from panel.io.convert import find_requirements
code = """
import panel as pn
import pandas as ... | [
{
"content": "\"\"\"\nUtilities for executing Python code and rendering the resulting output\nusing a similar MIME-type based rendering system as implemented by\nIPython.\n\nAttempts to limit the actual MIME types that have to be rendered on\nto a minimum simplifying frontend implementation:\n\n - applicatio... | [
{
"content": "\"\"\"\nUtilities for executing Python code and rendering the resulting output\nusing a similar MIME-type based rendering system as implemented by\nIPython.\n\nAttempts to limit the actual MIME types that have to be rendered on\nto a minimum simplifying frontend implementation:\n\n - applicatio... | diff --git a/panel/io/mime_render.py b/panel/io/mime_render.py
index e5238ce9b4..47f9ed5437 100644
--- a/panel/io/mime_render.py
+++ b/panel/io/mime_render.py
@@ -34,6 +34,8 @@
#---------------------------------------------------------------------
def _stdlibs():
+ if sys.version_info[:2] >= (3, 10):
+ re... |
googleapis__python-bigquery-1504 | ipywidgets extra pinned too tightly
https://github.com/googleapis/python-bigquery/blob/v3.4.2/setup.py#L70
I notice we have `"ipywidgets==7.7.1"`. This will likely give folks trouble as ipywidgets is updated. We should try to expand this when we can.
| [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | diff --git a/setup.py b/setup.py
index e1b018098..2119e0191 100644
--- a/setup.py
+++ b/setup.py
@@ -67,7 +67,7 @@
pyarrow_dependency,
"db-dtypes>=0.3.0,<2.0.0dev",
],
- "ipywidgets": ["ipywidgets==7.7.1"],
+ "ipywidgets": ["ipywidgets>=7.7.0,<8.0.1"],
"geopandas": ["geopandas>=0.9.0, ... |
sopel-irc__sopel-1464 | Config filename is mis-parsed when running configuration wizard from command line
~~`-w` / `--configure-all` and~~ `--configure-modules` does not drop the file extension `.cfg` from the specified file when searching for a config file to use (unlike just launching the bot, where as the extension does seem to be dropped,... | [
{
"content": "# coding=utf-8\n\"\"\"\nThe config object provides a simplified to access Sopel's configuration file.\nThe sections of the file are attributes of the object, and the keys in the\nsection are attributes of that. So, for example, the ``eggs`` attribute in the\n``[spam]`` section can be accessed from... | [
{
"content": "# coding=utf-8\n\"\"\"\nThe config object provides a simplified to access Sopel's configuration file.\nThe sections of the file are attributes of the object, and the keys in the\nsection are attributes of that. So, for example, the ``eggs`` attribute in the\n``[spam]`` section can be accessed from... | diff --git a/sopel/config/__init__.py b/sopel/config/__init__.py
index 473fff3521..ea72ef81e8 100644
--- a/sopel/config/__init__.py
+++ b/sopel/config/__init__.py
@@ -212,7 +212,7 @@ def _modules(self):
def _wizard(section, config=None):
dotdir = os.path.expanduser('~/.sopel')
- configpath = os.path.join(dot... |
geopandas__geopandas-1544 | BUG: test_numerical_operations fails under pandas 1.1.0
[Failure](https://travis-ci.org/github/geopandas/geopandas/jobs/712675986#L2140) in `test_numerical_operations` (`idxmin` error type) -> pandas-dev/pandas#32749. Even though it is a known regression in pandas, we should handle it (at least skip tests for now).
| [
{
"content": "from distutils.version import LooseVersion\nimport importlib\nimport os\nimport warnings\n\nimport pandas as pd\nimport shapely\n\n# -----------------------------------------------------------------------------\n# pandas compat\n# -------------------------------------------------------------------... | [
{
"content": "from distutils.version import LooseVersion\nimport importlib\nimport os\nimport warnings\n\nimport pandas as pd\nimport shapely\n\n# -----------------------------------------------------------------------------\n# pandas compat\n# -------------------------------------------------------------------... | diff --git a/geopandas/_compat.py b/geopandas/_compat.py
index bdf6176b03..907678bc55 100644
--- a/geopandas/_compat.py
+++ b/geopandas/_compat.py
@@ -12,7 +12,7 @@
PANDAS_GE_025 = str(pd.__version__) >= LooseVersion("0.25.0")
PANDAS_GE_10 = str(pd.__version__) >= LooseVersion("0.26.0.dev")
-PANDAS_GE_11 = str(pd._... |
svthalia__concrexit-2190 | Visual quirk in the login failure message
### Describe the bug
When you fail to log in on desktop (or probably any wider screen) the message saying this shows up on the left and the login fields are offset to the right. I would expect the message to appear on top, while the login fields were to stay in the same horizo... | [
{
"content": "from django import template\n\nregister = template.Library()\n\n\n@register.inclusion_tag(\"includes/alert.html\")\ndef alert(alert_type=\"info\", message=None, dismissible=False, extra_classes=\"\"):\n if dismissible:\n extra_classes += \" alert-dimissable\"\n return {\n \"typ... | [
{
"content": "from django import template\n\nregister = template.Library()\n\n\n@register.inclusion_tag(\"includes/alert.html\")\ndef alert(alert_type=\"info\", message=None, dismissible=False, extra_classes=\"\"):\n if dismissible:\n extra_classes += \" alert-dismissible\"\n return {\n \"ty... | diff --git a/website/thaliawebsite/templates/includes/alert.html b/website/thaliawebsite/templates/includes/alert.html
index 9d80e89bf..16b375a08 100644
--- a/website/thaliawebsite/templates/includes/alert.html
+++ b/website/thaliawebsite/templates/includes/alert.html
@@ -1,9 +1,8 @@
-<div class="alert alert-{{ type }}... |
dask__dask-555 | Fold + List accumulator
This is odd behavior:
``` python
import dask.bag as db
bag = db.from_sequence(range(0, 8, 1))
def append(accum, value):
accum.append(value)
return accum
def extend(accum, value):
accum.extend(value)
return accum
bag.fold(append, extend, initial=[]).compute()
## -- End past... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport itertools\nimport math\nimport tempfile\nimport inspect\nimport gzip\nimport zlib\nimport bz2\nimport os\n\nfrom fnmatch import fnmatchcase\nfrom glob import glob\nfrom collections import Iterable, Iterator, defaultdict\nfr... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport itertools\nimport math\nimport tempfile\nimport inspect\nimport gzip\nimport zlib\nimport bz2\nimport os\n\nfrom fnmatch import fnmatchcase\nfrom glob import glob\nfrom collections import Iterable, Iterator, defaultdict\nfr... | diff --git a/dask/bag/core.py b/dask/bag/core.py
index 51074e25f00..d3fcc3a5ecc 100644
--- a/dask/bag/core.py
+++ b/dask/bag/core.py
@@ -361,6 +361,8 @@ def fold(self, binop, combine=None, initial=no_default):
"""
a = next(names)
b = next(names)
+ if isinstance(initial, list):
+ ... |
meltano__meltano-7488 | bug: Cloud CLI logs auth token at info level
### Meltano Version
cloud branch
### Python Version
NA
### Bug scope
CLI (options, error messages, logging, etc.)
### Operating System
N/A
### Description
Running `meltano cloud login` results in the input shown below. Running `meltano-cloud login` does not.
A go... | [
{
"content": "\"\"\"Authentication for Meltano Cloud.\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport sys\nimport tempfile\nimport typing as t\nimport webbrowser\nfrom contextlib import asynccontextmanager\nfrom http import HTTPStatus\nfrom pathlib import Path\nfrom urllib.parse import url... | [
{
"content": "\"\"\"Authentication for Meltano Cloud.\"\"\"\n\nfrom __future__ import annotations\n\nimport asyncio\nimport sys\nimport tempfile\nimport typing as t\nimport webbrowser\nfrom contextlib import asynccontextmanager\nfrom http import HTTPStatus\nfrom pathlib import Path\nfrom urllib.parse import url... | diff --git a/src/cloud-cli/meltano/cloud/api/auth/auth.py b/src/cloud-cli/meltano/cloud/api/auth/auth.py
index 51dcbcbbf4..c459699bf0 100644
--- a/src/cloud-cli/meltano/cloud/api/auth/auth.py
+++ b/src/cloud-cli/meltano/cloud/api/auth/auth.py
@@ -124,7 +124,7 @@ async def handle_logout(_):
web.get("/lo... |
fossasia__open-event-server-6357 | is_paytm_activated shouldn't be a read only attribute
**Describe the bug**
Alipay, Omise, and PayPal have a property to enable them(e.g. `is_paypal_activated`). They were hybrid properties(condition was like `if client_key and secret_key then true`), so they had a dump_only=True. We need to remove this as we've moved... | [
{
"content": "from marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Schema\n\nfrom app.api.helpers.utilities import dasherize\nfrom app.settings import Environment\nfrom utils.common import use_defaults\n\n\nclass SettingSchemaPublic(Schema):\n \"\"\"\n Public Api schema for settin... | [
{
"content": "from marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Schema\n\nfrom app.api.helpers.utilities import dasherize\nfrom app.settings import Environment\nfrom utils.common import use_defaults\n\n\nclass SettingSchemaPublic(Schema):\n \"\"\"\n Public Api schema for settin... | diff --git a/app/api/schema/settings.py b/app/api/schema/settings.py
index f7b9fef2c3..1039db1436 100644
--- a/app/api/schema/settings.py
+++ b/app/api/schema/settings.py
@@ -58,7 +58,7 @@ class Meta:
#
# Online Payment Flags
#
- is_paytm_activated = fields.Bool(dump_only=True, allow_none=False, defau... |
wagtail__wagtail-1019 | Remove built dependencies
This commit removes libsass and Pillow from the setup.py dependency list. This greatly improves install performance and also means that the basic Wagtail installation is pure-python (so no build tools need to be on the end users host machine).
None of these dependencies are directly called fr... | [
{
"content": "#!/usr/bin/env python\n\nimport sys, os\n\nfrom wagtail.wagtailcore import __version__\n\n\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from distutils.core import setup\n\n\n# Hack to prevent \"TypeError: 'NoneType' object is not callable\" error\n# in multiproc... | [
{
"content": "#!/usr/bin/env python\n\nimport sys, os\n\nfrom wagtail.wagtailcore import __version__\n\n\ntry:\n from setuptools import setup, find_packages\nexcept ImportError:\n from distutils.core import setup\n\n\n# Hack to prevent \"TypeError: 'NoneType' object is not callable\" error\n# in multiproc... | diff --git a/docs/getting_started/creating_your_project.rst b/docs/getting_started/creating_your_project.rst
index 83cb54014fe0..38ffc3521f4a 100644
--- a/docs/getting_started/creating_your_project.rst
+++ b/docs/getting_started/creating_your_project.rst
@@ -20,7 +20,7 @@ Running it
Firstly, open up a command line she... |
GoogleCloudPlatform__professional-services-666 | CAI Export Pipeline is broken: KeyError: "definitions [while running 'assign_group_by_key']"
Hello @bmenasha,
pipeline is broken since yesterday evening.
I imagine something has changed on google side?
Can you help please?
thanks a lot in advanced
```
{
"insertId": "8652472802243659974:124764:0:75485",
"jso... | [
{
"content": "#!/usr/bin/env python\n#\n# Copyright 2019 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# ... | [
{
"content": "#!/usr/bin/env python\n#\n# Copyright 2019 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# ... | diff --git a/tools/asset-inventory/asset_inventory/api_schema.py b/tools/asset-inventory/asset_inventory/api_schema.py
index a088f1a008..c748aa1dc8 100644
--- a/tools/asset-inventory/asset_inventory/api_schema.py
+++ b/tools/asset-inventory/asset_inventory/api_schema.py
@@ -269,7 +269,7 @@ def _get_cache_key(cls, resou... |
facebookresearch__hydra-793 | [Bug] MISSING for Object Conf cls argument
# 🐛 Bug
OmegaConf cls argument should not be a mandatory value if target is defined. Can we change this to be an optional value with None being the default?
** Stack trace/error message **
```
omegaconf.errors.MissingMandatoryValue: Missing mandatory value: scheduler... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nfrom dataclasses import dataclass, field\nfrom enum import Enum\nfrom typing import Any, Callable, Dict\n\nfrom omegaconf import MISSING\n\nTaskFunction = Callable[[Any], Any]\n\n\n@dataclass\n# This extends Dict[str, Any] to ... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nfrom dataclasses import dataclass, field\nfrom enum import Enum\nfrom typing import Any, Callable, Dict\n\nfrom omegaconf import MISSING\n\nTaskFunction = Callable[[Any], Any]\n\n\n@dataclass\n# This extends Dict[str, Any] to ... | diff --git a/hydra/types.py b/hydra/types.py
index b1a99ae46ce..1e2139b1552 100644
--- a/hydra/types.py
+++ b/hydra/types.py
@@ -18,13 +18,6 @@ class ObjectConf(Dict[str, Any]):
# parameters to pass to cls when calling it
params: Any = field(default_factory=dict)
- # cls is deprecated, use target, cls wi... |
scikit-hep__pyhf-1105 | pyhf contrib download fails gracelessly with invalid URL
# Description
calling `pyhf contrib download` (just to see what it does) fails pretty violently. hould we make itt a bit nicer @matthewfeickert
?
```
pyhf contrib download
Traceback (most recent call last):
File "/Users/lukasheinrich/Code/pyhfdev/dev... | [
{
"content": "\"\"\"CLI for functionality that will get migrated out eventually.\"\"\"\nimport logging\nimport click\nfrom pathlib import Path\n\nfrom ..contrib import utils\n\nlogging.basicConfig()\nlog = logging.getLogger(__name__)\n\n\n@click.group(name=\"contrib\")\ndef cli():\n \"\"\"\n Contrib exper... | [
{
"content": "\"\"\"CLI for functionality that will get migrated out eventually.\"\"\"\nimport logging\nimport click\nfrom pathlib import Path\n\nfrom ..contrib import utils\n\nlogging.basicConfig()\nlog = logging.getLogger(__name__)\n\n\n@click.group(name=\"contrib\")\ndef cli():\n \"\"\"\n Contrib exper... | diff --git a/src/pyhf/cli/contrib.py b/src/pyhf/cli/contrib.py
index 6285e4a334..a460aea07f 100644
--- a/src/pyhf/cli/contrib.py
+++ b/src/pyhf/cli/contrib.py
@@ -25,8 +25,8 @@ def cli():
@cli.command()
-@click.argument("archive-url", default="-")
-@click.argument("output-directory", default="-")
+@click.argument(... |
speechbrain__speechbrain-194 | pytorch 1.5 much slower than 1.4
I did some first experiments, and apparently the issue could be connected to jit. In fact, the significant slow down happens when using our custom rnn called ligru (that is the only module we compile):
model | pytorch1.5 | pytorch1.4
ligru-jit 2 min 51 s... | [
{
"content": "\"\"\"Library implementing recurrent neural networks.\n\nAuthors\n * Mirco Ravanelli 2020\n * Ju-Chieh Chou 2020\n * Jianyuan Zhong 2020\n\"\"\"\n\nimport torch\nimport logging\nimport torch.nn as nn\nfrom speechbrain.nnet.attention import (\n ContentBasedAttention,\n LocationAwareAttention,... | [
{
"content": "\"\"\"Library implementing recurrent neural networks.\n\nAuthor\n Mirco Ravanelli 2020, Ju-Chieh Chou 2020\n\"\"\"\n\nimport torch\nimport logging\nimport torch.nn as nn\nfrom speechbrain.nnet.attention import (\n ContentBasedAttention,\n LocationAwareAttention,\n)\n\n# Temporany fix for ... | diff --git a/recipes/minimal_examples/neural_networks/ASR_seq2seq/example_asr_seq2seq_experiment.py b/recipes/minimal_examples/neural_networks/ASR_seq2seq/example_asr_seq2seq_experiment.py
index eae895bdf3..8f001aed00 100755
--- a/recipes/minimal_examples/neural_networks/ASR_seq2seq/example_asr_seq2seq_experiment.py
++... |
pymodbus-dev__pymodbus-1355 | pymodbus.simulator fails with no running event loop
### Versions
* Python: 3.9.2
* OS: Debian Bullseye
* Pymodbus: 3.1.3 latest dev branch
* Modbus Hardware (if used):
### Pymodbus Specific
* Server: tcp - sync/async
* Client: tcp - sync/async
### Description
Executing pymodbus.simulator from the comma... | [
{
"content": "#!/usr/bin/env python3\n\"\"\"HTTP server for modbus simulator.\n\nThe modbus simulator contain 3 distint parts:\n\n- Datastore simulator, to define registers and their behaviour including actions: (simulator)(../../datastore/simulator.py)\n- Modbus server: (server)(./http_server.py)\n- HTTP serve... | [
{
"content": "#!/usr/bin/env python3\n\"\"\"HTTP server for modbus simulator.\n\nThe modbus simulator contain 3 distint parts:\n\n- Datastore simulator, to define registers and their behaviour including actions: (simulator)(../../datastore/simulator.py)\n- Modbus server: (server)(./http_server.py)\n- HTTP serve... | diff --git a/pymodbus/server/simulator/main.py b/pymodbus/server/simulator/main.py
index 44e62b360..79961333b 100755
--- a/pymodbus/server/simulator/main.py
+++ b/pymodbus/server/simulator/main.py
@@ -106,11 +106,16 @@ def get_commandline():
return cmd_args
-def main():
- """Run server."""
+async def run_ma... |
dask__dask-256 | dot_graph does not work in stable version
I try to generate visual graphs as [described in documentation](http://dask.pydata.org/en/latest/inspect.html), but get:
`'module' object has no attribute 'to_pydot'`
The graphviz is installed with homebrew. Dask is installed from conda (latest stable release):
```
In [15]: d... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport networkx as nx\nfrom dask.core import istask, get_dependencies\n\n\ndef make_hashable(x):\n try:\n hash(x)\n return x\n except TypeError:\n return hash(str(x))\n\n\ndef lower(func):\n while has... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport networkx as nx\nfrom dask.core import istask, get_dependencies\n\n\ndef make_hashable(x):\n try:\n hash(x)\n return x\n except TypeError:\n return hash(str(x))\n\n\ndef lower(func):\n while has... | diff --git a/dask/dot.py b/dask/dot.py
index 847e14a4c1c..b44aef60206 100644
--- a/dask/dot.py
+++ b/dask/dot.py
@@ -60,7 +60,11 @@ def to_networkx(d, data_attributes=None, function_attributes=None):
def write_networkx_to_dot(dg, filename='mydask'):
import os
- p = nx.to_pydot(dg)
+ try:
+ p = nx.t... |
googleapis__google-api-python-client-723 | discovery.build_from_document fails when running with Python3
The `discovery.build_from_document` function assumes that `service` is of type `str`, however when running in Python3 instead of `str` it can be of type `bytes`.
Because of this wrong assumption, the function fails on [line 337](https://github.com/googlea... | [
{
"content": "# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unles... | [
{
"content": "# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unles... | diff --git a/googleapiclient/discovery.py b/googleapiclient/discovery.py
index 33595931a16..771d9fcd3d0 100644
--- a/googleapiclient/discovery.py
+++ b/googleapiclient/discovery.py
@@ -333,6 +333,8 @@ def build_from_document(
if isinstance(service, six.string_types):
service = json.loads(service)
+ elif isin... |
dask__distributed-3652 | Variable delete raises KeyError
It seems that there is an unhandled KeyError in the scheduler variable delete logic.
If using the asynchronous API only visible in the scheduler logs but it does mean that Variables will be "leaking" and staying around instead of being deleted.
It happens regardless of whether you ... | [
{
"content": "import asyncio\nfrom collections import defaultdict\nimport logging\nimport uuid\n\nfrom tlz import merge\n\nfrom .client import Future, _get_global_client, Client\nfrom .utils import tokey, log_errors, TimeoutError, ignoring\nfrom .worker import get_client\n\nlogger = logging.getLogger(__name__)\... | [
{
"content": "import asyncio\nfrom collections import defaultdict\nimport logging\nimport uuid\n\nfrom tlz import merge\n\nfrom .client import Future, _get_global_client, Client\nfrom .utils import tokey, log_errors, TimeoutError, ignoring\nfrom .worker import get_client\n\nlogger = logging.getLogger(__name__)\... | diff --git a/distributed/tests/test_variable.py b/distributed/tests/test_variable.py
index 6e3b3bcdad6..c7bae2dbfb7 100644
--- a/distributed/tests/test_variable.py
+++ b/distributed/tests/test_variable.py
@@ -2,6 +2,7 @@
import random
from time import sleep
import sys
+import logging
import pytest
from tornado i... |
holoviz__holoviews-6102 | rasterize=True no longer works with any geoviews parameters in hvplot (e.g. geo=True, crs=ccrs.PlateCarree())
Hey everyone,
I created a new environment with the latest packages from conda (hvplot 0.9.2, datashader 0.16.0, geoviews 1.11.0, spatialpandas 0.4.10, **holoviews 1.18.2**) and have started encountering an e... | [
{
"content": "import sys\n\nimport numpy as np\nimport param\nfrom bokeh.models import CustomJSHover, DatetimeAxis\n\nfrom ...core.util import cartesian_product, dimension_sanitizer, isfinite\nfrom ...element import Raster\nfrom ..util import categorical_legend\nfrom .chart import PointPlot\nfrom .element impor... | [
{
"content": "import sys\n\nimport numpy as np\nimport param\nfrom bokeh.models import CustomJSHover, DatetimeAxis\n\nfrom ...core.util import cartesian_product, dimension_sanitizer, isfinite\nfrom ...element import Raster\nfrom ..util import categorical_legend\nfrom .chart import PointPlot\nfrom .element impor... | diff --git a/holoviews/plotting/bokeh/raster.py b/holoviews/plotting/bokeh/raster.py
index e10c3ecdd9..9245bc86b6 100644
--- a/holoviews/plotting/bokeh/raster.py
+++ b/holoviews/plotting/bokeh/raster.py
@@ -82,7 +82,8 @@ def _postprocess_hover(self, renderer, source):
}
"""
for ke... |
django-haystack__django-haystack-1544 | Problem with pagination when missing ``q`` GET parameter for ``SearchView``
* [x] Tested with the latest Haystack release
* [x] Tested with the current Haystack master branch
## Actual behaviour
Suppose ``haystack.generic_views.SearchView`` is bound to ``/search`` url.
When I enter the search url ``/search``... | [
{
"content": "# encoding: utf-8\n\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom django.conf import settings\nfrom django.core.paginator import Paginator\nfrom django.views.generic import FormView\nfrom django.views.generic.edit import FormMixin\nfrom django.views.ge... | [
{
"content": "# encoding: utf-8\n\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom django.conf import settings\nfrom django.core.paginator import Paginator\nfrom django.views.generic import FormView\nfrom django.views.generic.edit import FormMixin\nfrom django.views.ge... | diff --git a/haystack/generic_views.py b/haystack/generic_views.py
index c8f2ddb95..def14dfb3 100644
--- a/haystack/generic_views.py
+++ b/haystack/generic_views.py
@@ -58,7 +58,7 @@ def get_form_kwargs(self):
Returns the keyword arguments for instantiating the form.
"""
kwargs = {'initial': ... |
rotki__rotki-3495 | Fee assets is not properly handled in bitstamp
## Problem Definition
Fee assets is not correctly initialized in bitstamp with the possibility of raising a `UnknownAsset` error
## Logs
```
[17/08/2021 13:38:35 CEST] ERROR rotkehlchen.greenlets: Query history of bitstamp exchange died with exception: Unknown as... | [
{
"content": "import hashlib\nimport hmac\nimport logging\nimport uuid\nfrom http import HTTPStatus\nfrom json.decoder import JSONDecodeError\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Dict,\n List,\n NamedTuple,\n Optional,\n Tuple,\n Union,\n overload,\n)\nfrom u... | [
{
"content": "import hashlib\nimport hmac\nimport logging\nimport uuid\nfrom http import HTTPStatus\nfrom json.decoder import JSONDecodeError\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Dict,\n List,\n NamedTuple,\n Optional,\n Tuple,\n Union,\n overload,\n)\nfrom u... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index b1268e828b..1ca84eeadd 100755
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -11,6 +11,7 @@ Changelog
* :bug:`3421` Users will now be able to see solana properly in coinbase assets
* :bug:`3418` Users will now be able to finish import from crypto.com's ... |
ansible__ansible-modules-extras-204 | rabbitmq_user fails when no password provided
Even though the `password` param is specified as optional, the `rabbitmq_user` module fails when it is not provided.
```
Stacktrace:
File "<stdin>", line 1595, in <module>
File "<stdin>", line 240, in main
File "<stdin>", line 165, in add
File "<stdin>", line 131, ... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2013, Chatham Financial <oss@chathamfinancial.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 Softwa... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2013, Chatham Financial <oss@chathamfinancial.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 Softwa... | diff --git a/messaging/rabbitmq_user.py b/messaging/rabbitmq_user.py
index 1cbee360dff..b19ec1fc097 100644
--- a/messaging/rabbitmq_user.py
+++ b/messaging/rabbitmq_user.py
@@ -162,7 +162,11 @@ def _get_permissions(self):
return dict()
def add(self):
- self._exec(['add_user', self.username, self.... |
ray-project__ray-3578 | Fix formatting of PyPI package description.
See https://pypi.org/project/ray/.
Note that we can test this out first at https://test.pypi.org/project/ray/.
| [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\n\nfrom setuptools import setup, find_packages, Distribution\nimport setuptools.command.build_ext as _build_ext\n\n# ... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\n\nfrom setuptools import setup, find_packages, Distribution\nimport setuptools.command.build_ext as _build_ext\n\n# ... | diff --git a/.travis.yml b/.travis.yml
index e8c95fcc1859f..cce1ee8dfcec8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -55,6 +55,9 @@ matrix:
# Run Python linting, ignore dict vs {} (C408), others are defaults
- flake8 --exclude=python/ray/core/generated/,doc/source/conf.py,python/ray/cloudpickle/ --... |
google__turbinia-1016 | NameError: name 'celery_task' is not defined
Please see traceback below, but getting `NameError: name 'celery_task' is not defined ` in line 807, in process_tasks.format(celery_task.id, timeout))
```
Traceback (most recent call last):
File "/usr/local/bin/turbiniactl", line 33, in <module>
sys.exit(load_e... | [
{
"content": "#-*- coding: utf-8 -*-\n# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Un... | [
{
"content": "#-*- coding: utf-8 -*-\n# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Un... | diff --git a/turbinia/task_manager.py b/turbinia/task_manager.py
index 717bc7b58..0ad0c45b0 100644
--- a/turbinia/task_manager.py
+++ b/turbinia/task_manager.py
@@ -804,7 +804,7 @@ def process_tasks(self):
if timeout:
log.warning(
'Task {0:s} timed on server out after {0:d} seconds. A... |
great-expectations__great_expectations-6084 | Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`
| [
{
"content": "from typing import Any, Dict, Optional, Tuple\n\nimport altair as alt\nimport numpy as np\nimport pandas as pd\nfrom scipy import stats as stats\n\nfrom great_expectations.core import ExpectationConfiguration\nfrom great_expectations.execution_engine import ExecutionEngine\nfrom great_expectations... | [
{
"content": "from typing import Any, Dict, Optional, Tuple\n\nimport altair as alt\nimport numpy as np\nimport pandas as pd\nfrom scipy import stats as stats\n\nfrom great_expectations.core import ExpectationConfiguration\nfrom great_expectations.execution_engine import ExecutionEngine\nfrom great_expectations... | diff --git a/great_expectations/expectations/core/expect_column_kl_divergence_to_be_less_than.py b/great_expectations/expectations/core/expect_column_kl_divergence_to_be_less_than.py
index 3295de0c7fa0..4666b6cc4597 100644
--- a/great_expectations/expectations/core/expect_column_kl_divergence_to_be_less_than.py
+++ b/g... |
DDMAL__CantusDB-1481 | Duplicate results show up in source search
From Debra:
> https://cantusdatabase.org/sources/?segment=4063&general=&indexing=klassen&provenance=¢ury=&fullSource=
>
> I searched for the name of an indexer and I have many duplicates being returned (of the same thing). Is this finding every instance of that name ... | [
{
"content": "from django.views.generic import (\n DetailView,\n ListView,\n CreateView,\n UpdateView,\n DeleteView,\n TemplateView,\n)\nfrom django.db.models import Q, Prefetch, Value\nfrom main_app.models import (\n Century,\n Chant,\n Feast,\n Genre,\n Provenance,\n Segmen... | [
{
"content": "from django.views.generic import (\n DetailView,\n ListView,\n CreateView,\n UpdateView,\n DeleteView,\n TemplateView,\n)\nfrom django.db.models import Q, Prefetch, Value\nfrom main_app.models import (\n Century,\n Chant,\n Feast,\n Genre,\n Provenance,\n Segmen... | diff --git a/django/cantusdb_project/main_app/views/source.py b/django/cantusdb_project/main_app/views/source.py
index de6881a35..5aa81fdef 100644
--- a/django/cantusdb_project/main_app/views/source.py
+++ b/django/cantusdb_project/main_app/views/source.py
@@ -321,8 +321,12 @@ def get_queryset(self):
)
... |
paperless-ngx__paperless-ngx-6306 | [BUG] PDF rotate leads to bulk_update_documents() error
### Description
I tried the new Actions->Rotate feature in 2.7.0. The UI shows the "Rotate confirm" window, I choose the proper rotation, and click on Proceed. It says "Rotation will begin in the background. Close and re-open the document after the operation ha... | [
{
"content": "import hashlib\nimport itertools\nimport logging\nimport os\nfrom typing import Optional\n\nfrom celery import chord\nfrom django.conf import settings\nfrom django.db.models import Q\n\nfrom documents.data_models import ConsumableDocument\nfrom documents.data_models import DocumentMetadataOverride... | [
{
"content": "import hashlib\nimport itertools\nimport logging\nimport os\nfrom typing import Optional\n\nfrom celery import chord\nfrom django.conf import settings\nfrom django.db.models import Q\n\nfrom documents.data_models import ConsumableDocument\nfrom documents.data_models import DocumentMetadataOverride... | diff --git a/src/documents/bulk_edit.py b/src/documents/bulk_edit.py
index 6b676733dfe..362c28e20b8 100644
--- a/src/documents/bulk_edit.py
+++ b/src/documents/bulk_edit.py
@@ -195,7 +195,7 @@ def rotate(doc_ids: list[int], degrees: int):
logger.exception(f"Error rotating document {doc.id}: {e}")
if... |
TheAlgorithms__Python-8766 | I found typo in graphs/greedy_best_first
### What would you like to share?
The dx and dy are reversed!
https://github.com/TheAlgorithms/Python/blob/ce43a8ac4ad14e1639014d374b1137906218cfe3/graphs/greedy_best_first.py#L61-L63
Expected correction
```python
dx = abs(self.pos_x - self.goal_x)
dy = abs(self.pos_y - ... | [
{
"content": "\"\"\"\nhttps://en.wikipedia.org/wiki/Best-first_search#Greedy_BFS\n\"\"\"\n\nfrom __future__ import annotations\n\nPath = list[tuple[int, int]]\n\ngrid = [\n [0, 0, 0, 0, 0, 0, 0],\n [0, 1, 0, 0, 0, 0, 0], # 0 are free path whereas 1's are obstacles\n [0, 0, 0, 0, 0, 0, 0],\n [0, 0, ... | [
{
"content": "\"\"\"\nhttps://en.wikipedia.org/wiki/Best-first_search#Greedy_BFS\n\"\"\"\n\nfrom __future__ import annotations\n\nPath = list[tuple[int, int]]\n\ngrid = [\n [0, 0, 0, 0, 0, 0, 0],\n [0, 1, 0, 0, 0, 0, 0], # 0 are free path whereas 1's are obstacles\n [0, 0, 0, 0, 0, 0, 0],\n [0, 0, ... | diff --git a/graphs/greedy_best_first.py b/graphs/greedy_best_first.py
index d49e65b9d814..35f7ca9feeef 100644
--- a/graphs/greedy_best_first.py
+++ b/graphs/greedy_best_first.py
@@ -58,8 +58,8 @@ def calculate_heuristic(self) -> float:
The heuristic here is the Manhattan Distance
Could elaborate to o... |
rucio__rucio-2391 | config cache prevents updating a value before expiration
Motivation
----------
```python
config.set('throttler', 'release_strategy', 'fifo')
config.set('throttler', 'release_strategy', 'grouped_fifo')
```
will result in a database duplicate exception because `config.set()` checks if there is already a value which... | [
{
"content": "# Copyright 2014-2019 CERN for the benefit of the ATLAS collaboration.\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/LICE... | [
{
"content": "# Copyright 2014-2019 CERN for the benefit of the ATLAS collaboration.\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/LICE... | diff --git a/lib/rucio/core/config.py b/lib/rucio/core/config.py
index 7904e64598..a61f32079c 100644
--- a/lib/rucio/core/config.py
+++ b/lib/rucio/core/config.py
@@ -200,7 +200,7 @@ def set(section, option, value, session=None):
:param session: The database session in use.
"""
- if not has_option(sectio... |
conda__conda-5373 | confusing messages at downgrading
When I willfully downgrade a package, confusing dialogs are given related to dependency conflicts, possibly because the same dialog/logging is used when an automatic downgrade requirement was being determined:
```bash
(stable) └─❱❱❱ conda install pandas=0.19 ... | [
{
"content": "\"\"\"\nHandle the planning of installs and their execution.\n\nNOTE:\n conda.install uses canonical package names in its interface functions,\n whereas conda.resolve uses package filenames, as those are used as index\n keys. We try to keep fixes to this \"impedance mismatch\" local to t... | [
{
"content": "\"\"\"\nHandle the planning of installs and their execution.\n\nNOTE:\n conda.install uses canonical package names in its interface functions,\n whereas conda.resolve uses package filenames, as those are used as index\n keys. We try to keep fixes to this \"impedance mismatch\" local to t... | diff --git a/conda/plan.py b/conda/plan.py
index 67c686db8f5..306eaf61d29 100644
--- a/conda/plan.py
+++ b/conda/plan.py
@@ -235,7 +235,7 @@ def format(s, pkg):
print(format(oldfmt[pkg] + arrow + newfmt[pkg], pkg))
if downgraded:
- print("\nThe following packages will be DOWNGRADED due to dep... |
lutris__lutris-3940 | Installing from Lutris can fail silently
### Bug description
Some Lutris games can't be installed, but give no error- Install just does nothing.
This seems to happen for games with no installation scripts. The example I have is "Attack of the Earthlings"- that is on Lutris as "https://lutris.net/games/attack-of-t... | [
{
"content": "# pylint: disable=wrong-import-position\n#\n# Copyright (C) 2021 Mathieu Comandon <strider@strycore.com>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either versio... | [
{
"content": "# pylint: disable=wrong-import-position\n#\n# Copyright (C) 2021 Mathieu Comandon <strider@strycore.com>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either versio... | diff --git a/lutris/gui/application.py b/lutris/gui/application.py
index 86100fcf4d..58a2cf8f42 100644
--- a/lutris/gui/application.py
+++ b/lutris/gui/application.py
@@ -514,8 +514,7 @@ def on_game_install(self, game):
if installers:
self.show_installer_window(installers)
else:
- ... |
mitmproxy__mitmproxy-2808 | Mitmproxy crashes, when viewing response body in url-encoded mode
##### Steps to reproduce the problem:
1. Run mitmproxy.
2. `n` -> `Enter` -> `Enter` -> `m` -> `url-encoded`
_I am seeing:_
```
Traceback (most recent call last):
File "/home/kajoj/Mitmproxy/mitmproxy/mitmproxy/tools/console/master.py", line ... | [
{
"content": "# Default view cutoff *in lines*\nimport typing\n\nVIEW_CUTOFF = 512\n\nKEY_MAX = 30\n\nTTextType = typing.Union[str, bytes] # FIXME: This should be either bytes or str ultimately.\nTViewLine = typing.List[typing.Tuple[str, TTextType]]\nTViewResult = typing.Tuple[str, typing.Iterator[TViewLine]]\... | [
{
"content": "# Default view cutoff *in lines*\nimport typing\n\nVIEW_CUTOFF = 512\n\nKEY_MAX = 30\n\nTTextType = typing.Union[str, bytes] # FIXME: This should be either bytes or str ultimately.\nTViewLine = typing.List[typing.Tuple[str, TTextType]]\nTViewResult = typing.Tuple[str, typing.Iterator[TViewLine]]\... | diff --git a/mitmproxy/contentviews/base.py b/mitmproxy/contentviews/base.py
index bdab1e9957..dbaa6cccf3 100644
--- a/mitmproxy/contentviews/base.py
+++ b/mitmproxy/contentviews/base.py
@@ -49,8 +49,9 @@ def format_dict(
]
entries, where key is padded to a uniform width.
"""
- max_key_len = max(len(k... |
pypa__pip-2308 | pip6.0.4 can not work under python3.4, windows7 64bit.
use" pip list" command, met a error:
``` python
Traceback (most recent call last):
File "C:\Python34\Scripts\pip-script.py", line 9, in <module>
load_entry_point('pip==6.0.4', 'console_scripts', 'pip')()
File "C:\Python34\lib\site-packages\pip-6.0.4-py3.4... | [
{
"content": "import os.path\n\nfrom pip.compat import get_path_uid\n\n\ndef check_path_owner(path, uid):\n previous = None\n while path != previous:\n if os.path.lexists(path):\n # Actually do the ownership check\n try:\n if get_path_uid(path) != os.geteuid():\... | [
{
"content": "import os\nimport os.path\n\nfrom pip.compat import get_path_uid\n\n\ndef check_path_owner(path, uid):\n # If we don't have a way to check the effective uid of this process, then\n # we'll just assume that we own the directory.\n if not hasattr(os, \"geteuid\"):\n return True\n\n ... | diff --git a/pip/utils/filesystem.py b/pip/utils/filesystem.py
index a14674edcd8..445baa3206d 100644
--- a/pip/utils/filesystem.py
+++ b/pip/utils/filesystem.py
@@ -1,9 +1,15 @@
+import os
import os.path
from pip.compat import get_path_uid
def check_path_owner(path, uid):
+ # If we don't have a way to check... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.