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 ⌀ |
|---|---|---|---|---|
inventree__InvenTree-1890 | Can't start inventree server
It seems that error at `https://api.exchangerate.host/latest` blocks server startup.
```
# curl https://api.exchangerate.host/latest
<html>
<head><title>521 Origin Down</title></head>
<body bgcolor="white">
<center><h1>521 Origin Down</h1></center>
<hr><center>cloudflare-nginx</cen... | [
{
"content": "from common.settings import currency_code_default, currency_codes\n\nfrom djmoney.contrib.exchange.backends.base import SimpleExchangeBackend\n\n\nclass InvenTreeExchange(SimpleExchangeBackend):\n \"\"\"\n Backend for automatically updating currency exchange rates.\n\n Uses the exchangera... | [
{
"content": "from common.settings import currency_code_default, currency_codes\nfrom urllib.error import HTTPError, URLError\n\nfrom djmoney.contrib.exchange.backends.base import SimpleExchangeBackend\n\n\nclass InvenTreeExchange(SimpleExchangeBackend):\n \"\"\"\n Backend for automatically updating curre... | diff --git a/InvenTree/InvenTree/exchange.py b/InvenTree/InvenTree/exchange.py
index c75a827cc708..9981e52ff77e 100644
--- a/InvenTree/InvenTree/exchange.py
+++ b/InvenTree/InvenTree/exchange.py
@@ -1,4 +1,5 @@
from common.settings import currency_code_default, currency_codes
+from urllib.error import HTTPError, URLEr... |
dotkom__onlineweb4-1680 | 'Suspensjon' is spelled incorrectly
It is written suspensjon, not suspansjon
| [
{
"content": "# -*- coding: utf-8 -*-\nimport json\nimport logging\nimport re\nimport uuid\nfrom smtplib import SMTPException\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.auth.forms import PasswordChangeF... | [
{
"content": "# -*- coding: utf-8 -*-\nimport json\nimport logging\nimport re\nimport uuid\nfrom smtplib import SMTPException\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.auth.forms import PasswordChangeF... | diff --git a/apps/profiles/views.py b/apps/profiles/views.py
index 64d5f71d2..2cd797220 100644
--- a/apps/profiles/views.py
+++ b/apps/profiles/views.py
@@ -83,8 +83,8 @@ def _create_profile_context(request):
],
'suspensions': [
# Tuple syntax ('title', list_of_marks, is_collapsed)
- ... |
pulp__pulpcore-5272 | Cannot upload content via pulp-container because of the change made to the `Upload` model
The following commit broke the pulp-container upload: https://github.com/pulp/pulpcore/commit/9192c2bf0ccb0e0a2df595fd3efdd0980c80ff34.
Traceback:
```
pulp_1 | pulp [adbae673f9b7498d8240989c1bba93ff]: django.request:ERROR:... | [
{
"content": "from django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group as BaseGroup\nfrom django.db import models\nfrom django_lifecycle import hook, LifecycleModelMixin\n\nfrom pulpcore.app.models import BaseModel\nfrom pulpcore.app.util import get_viewset_for_model, get_cur... | [
{
"content": "from django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group as BaseGroup\nfrom django.db import models\nfrom django_lifecycle import hook, LifecycleModelMixin\n\nfrom pulpcore.app.models import BaseModel\nfrom pulpcore.app.util import get_viewset_for_model, get_cur... | diff --git a/CHANGES/plugin_api/5267.bugfix b/CHANGES/plugin_api/5267.bugfix
new file mode 100644
index 0000000000..d4c6d14fce
--- /dev/null
+++ b/CHANGES/plugin_api/5267.bugfix
@@ -0,0 +1 @@
+Fixed a bug where models with auto assign permissions failed when no viewset was attached.
diff --git a/pulpcore/app/models/acc... |
SeldonIO__MLServer-1104 | mlserver >= 1.3 doesn't work with MLflow
After the release of `mlserver==1.3.1`, one of our tests in `https://github.com/mlflow/mlflow` started failing with the following error. We're investigating the cause.
https://github.com/mlflow/mlflow/actions/runs/4716614587/jobs/8364498235?pr=8241#step:7:8138
```
2023-04... | [
{
"content": "import asyncio\nimport os\nimport shutil\n\nfrom typing import Optional, Dict, List\n\nfrom ..settings import ModelSettings\nfrom ..utils import to_absolute_path\nfrom ..model import MLModel\nfrom ..settings import Settings\nfrom ..env import Environment, compute_hash\nfrom ..registry import model... | [
{
"content": "import asyncio\nimport os\nimport shutil\n\nfrom typing import Optional, Dict, List\n\nfrom ..settings import ModelSettings\nfrom ..utils import to_absolute_path\nfrom ..model import MLModel\nfrom ..settings import Settings\nfrom ..env import Environment, compute_hash\nfrom ..registry import model... | diff --git a/mlserver/parallel/registry.py b/mlserver/parallel/registry.py
index 86bd51ce8..55c1109f9 100644
--- a/mlserver/parallel/registry.py
+++ b/mlserver/parallel/registry.py
@@ -130,6 +130,12 @@ def model_initialiser(self, model_settings: ModelSettings) -> MLModel:
# as normal.
return m... |
python-pillow__Pillow-4326 | Saving as GIF throws exception when source image has "comment" metadata
### What did you do?
Attempted to open a png image file, and save it as a gif file.
### What did you expect to happen?
The file should have been successfully saved/converted
### What actually happened?
This exception was thrown:
```
Trac... | [
{
"content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# GIF file handling\n#\n# History:\n# 1995-09-01 fl Created\n# 1996-12-14 fl Added interlace support\n# 1996-12-30 fl Added animation support\n# 1997-01-05 fl Added write support, fixed local colour map bug\n# 1997-02-23 fl Make sure to load r... | [
{
"content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# GIF file handling\n#\n# History:\n# 1995-09-01 fl Created\n# 1996-12-14 fl Added interlace support\n# 1996-12-30 fl Added animation support\n# 1997-01-05 fl Added write support, fixed local colour map bug\n# 1997-02-23 fl Make sure to load r... | diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py
index bbd589ada44..61c3d8f788b 100644
--- a/Tests/test_file_gif.py
+++ b/Tests/test_file_gif.py
@@ -565,14 +565,18 @@ def test_comment(self):
im.info["comment"], b"File written by Adobe Photoshop\xa8 4.0"
)
- out = s... |
ansible-collections__community.general-6077 | [zypper] "msg: Zypper run command failed with return code 5." when using community.general.zypper module on MicroOS
### Summary
Using the following snippet on a freshly installed MicroOS will result in the zypper module not using `transactional-update`.
```yaml
---
- hosts: test
tasks:
- name: Install fai... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2013, Patrick Callahan <pmc@patrickcallahan.com>\n# based on\n# openbsd_pkg\n# Copyright (c) 2013\n# Patrik Lundin <patrik.lundin.swe@gmail.com>\n#\n# yum\n# Copyright (c) 2012, Red Hat, Inc\n# Wr... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2013, Patrick Callahan <pmc@patrickcallahan.com>\n# based on\n# openbsd_pkg\n# Copyright (c) 2013\n# Patrik Lundin <patrik.lundin.swe@gmail.com>\n#\n# yum\n# Copyright (c) 2012, Red Hat, Inc\n# Wr... | diff --git a/changelogs/fragments/5615-zypper-transactional-update.yml b/changelogs/fragments/5615-zypper-transactional-update.yml
new file mode 100644
index 00000000000..5eb6bb84058
--- /dev/null
+++ b/changelogs/fragments/5615-zypper-transactional-update.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - "zypper - make package mana... |
encode__django-rest-framework-3509 | Keep max_length when converting TextField to CharField in ModelSerializer
When Django makes a ModelForm out of a Model it validates the max_length of any TextFields (if specified) even though it is not enforced on a database level. I realize this did not use to be the case and that may be why DRF does not currently do ... | [
{
"content": "\"\"\"\nHelper functions for mapping model fields to a dictionary of default\nkeyword arguments that should be used for their equivelent serializer fields.\n\"\"\"\nimport inspect\n\nfrom django.core import validators\nfrom django.db import models\nfrom django.utils.text import capfirst\n\nfrom re... | [
{
"content": "\"\"\"\nHelper functions for mapping model fields to a dictionary of default\nkeyword arguments that should be used for their equivelent serializer fields.\n\"\"\"\nimport inspect\n\nfrom django.core import validators\nfrom django.db import models\nfrom django.utils.text import capfirst\n\nfrom re... | diff --git a/rest_framework/utils/field_mapping.py b/rest_framework/utils/field_mapping.py
index 8206578ee3..f109ad80d4 100644
--- a/rest_framework/utils/field_mapping.py
+++ b/rest_framework/utils/field_mapping.py
@@ -123,7 +123,8 @@ def get_field_kwargs(field_name, model_field):
# Ensure that max_length is passe... |
jupyterhub__zero-to-jupyterhub-k8s-3162 | Update values schema to allow key `enabled`
<!-- Thank you for contributing. These HTML comments will not render in the issue, but you can delete them once you've read them if you prefer! -->
### Proposed change
<!-- Use this section to describe the feature you'd like to be added. -->
Update values schema to all... | [
{
"content": "# Configuration file for Sphinx to build our documentation to HTML.\n#\n# Configuration reference: https://www.sphinx-doc.org/en/master/usage/configuration.html\n#\nimport datetime\nimport json\nimport os\nimport re\nimport subprocess\n\nimport yaml\n\n# -- Project information --------------------... | [
{
"content": "# Configuration file for Sphinx to build our documentation to HTML.\n#\n# Configuration reference: https://www.sphinx-doc.org/en/master/usage/configuration.html\n#\nimport datetime\nimport json\nimport os\nimport re\nimport subprocess\n\nimport yaml\n\n# -- Project information --------------------... | diff --git a/docs/source/conf.py b/docs/source/conf.py
index 5eba916402..c2ce1a2196 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -217,6 +217,7 @@ def parse_schema(d, md=[], depth=0, pre=""):
"https://your-domain-name.com", # example
"https://kubernetes.io/docs/tutorials/kubernetes-basics/", ... |
mdn__kuma-7185 | Django User admin not working related to stripe_customer_id
**Summary**
<img width="1450" alt="Screen Shot 2020-05-20 at 1 01 52 PM" src="https://user-images.githubusercontent.com/26739/82475221-28e5a080-9a9a-11ea-948f-be97bf2c15d6.png">
There *exists* a user with that username.
The user is there. I can manually ... | [
{
"content": "from django.contrib import admin\nfrom django.contrib.auth.admin import UserAdmin as BaseUserAdmin\nfrom django.utils.html import format_html\n\nfrom kuma.core.urlresolvers import reverse\nfrom kuma.core.utils import urlparams\n\nfrom .models import User, UserBan, UserSubscription\n\n\n@admin.regi... | [
{
"content": "from django.contrib import admin\nfrom django.contrib.auth.admin import UserAdmin as BaseUserAdmin\nfrom django.utils.html import format_html\n\nfrom kuma.core.urlresolvers import reverse\nfrom kuma.core.utils import urlparams\n\nfrom .models import User, UserBan, UserSubscription\n\n\n@admin.regi... | diff --git a/kuma/users/admin.py b/kuma/users/admin.py
index 23f6c78a7e3..0060b952254 100644
--- a/kuma/users/admin.py
+++ b/kuma/users/admin.py
@@ -24,15 +24,18 @@ class IsStripeCustomer(admin.SimpleListFilter):
def lookups(self, request, model_admin):
return (
- (True, "Yes"),
- ... |
ethereum__web3.py-2920 | Add sign_typed_data method to AsyncEth class
### What was wrong?
Some methods are still unavailable on the AsyncEth class.
Related to Issue # missing sign_typed_data
### How was it fixed?
Added class, tests & updated docs (split into 2 commits)
### Todo:
- [ ] Add entry to the [release notes](https://gi... | [
{
"content": "import asyncio\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awaitable,\n Callable,\n List,\n Optional,\n Tuple,\n Type,\n Union,\n overload,\n)\nimport warnings\n\nfrom eth_typing import (\n Address,\n BlockNumber,\n ChecksumAddress,\n HexStr,\n)\nfrom ... | [
{
"content": "import asyncio\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awaitable,\n Callable,\n List,\n Optional,\n Tuple,\n Type,\n Union,\n overload,\n)\nimport warnings\n\nfrom eth_typing import (\n Address,\n BlockNumber,\n ChecksumAddress,\n HexStr,\n)\nfrom ... | diff --git a/docs/providers.rst b/docs/providers.rst
index aac27b9a61..e660937db2 100644
--- a/docs/providers.rst
+++ b/docs/providers.rst
@@ -296,6 +296,7 @@ Eth
- :meth:`web3.eth.sign_transaction() <web3.eth.Eth.sign_transaction>`
- :meth:`web3.eth.replace_transaction() <web3.eth.Eth.replace_transaction>`
- :meth:... |
internetarchive__openlibrary-5909 | Add TESTING flag for scripts/oldumps.sh given the long runtimes
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
### Describe the problem that you'd like solved
<!-- A clear and concise description of what you want to happen. -->
See review feedback on #5892
... | [
{
"content": "\"\"\"Library for generating and processing Open Library data dumps.\n\nGlossary:\n\n* dump - Dump of latest revisions of all documents.\n* cdump - Complete dump. Dump of all revisions of all documents.\n* idump - Incremental dump. Dump of all revisions created in the given day.\n\"\"\"\n\nimport ... | [
{
"content": "\"\"\"Library for generating and processing Open Library data dumps.\n\nGlossary:\n\n* dump - Dump of latest revisions of all documents.\n* cdump - Complete dump. Dump of all revisions of all documents.\n* idump - Incremental dump. Dump of all revisions created in the given day.\n\"\"\"\n\nimport ... | diff --git a/openlibrary/data/dump.py b/openlibrary/data/dump.py
index 5629827f7e8..7a782a02a66 100644
--- a/openlibrary/data/dump.py
+++ b/openlibrary/data/dump.py
@@ -107,9 +107,12 @@ def generate_cdump(data_file, date=None):
# False
# >>> "2010-05-17T10:20:30" < "2010-05-17Z"
# True
+ #
+ ... |
coala__coala-4611 | ConfigurationGathering.py: Add :return: for warn_config_absent
https://github.com/coala/coala/blob/master/coalib/settings/ConfigurationGathering.py#L138
difficulty/newcomer
<!-- Hello! If you're filing a bug, please include every step so as to help us reproduce it on our machines. If you're unsure about how to file... | [
{
"content": "import os\nimport re\nimport sys\nimport logging\n\nfrom coalib.collecting.Collectors import (\n collect_all_bears_from_sections, filter_section_bears_by_languages)\nfrom coalib.misc import Constants\nfrom coalib.output.ConfWriter import ConfWriter\nfrom coalib.output.printers.LOG_LEVEL import ... | [
{
"content": "import os\nimport re\nimport sys\nimport logging\n\nfrom coalib.collecting.Collectors import (\n collect_all_bears_from_sections, filter_section_bears_by_languages)\nfrom coalib.misc import Constants\nfrom coalib.output.ConfWriter import ConfWriter\nfrom coalib.output.printers.LOG_LEVEL import ... | diff --git a/coalib/settings/ConfigurationGathering.py b/coalib/settings/ConfigurationGathering.py
index bd3396a6bf..27436502a3 100644
--- a/coalib/settings/ConfigurationGathering.py
+++ b/coalib/settings/ConfigurationGathering.py
@@ -149,6 +149,8 @@ def warn_config_absent(sections, argument, log_printer):
:param ... |
cupy__cupy-2923 | Windows: module 'numpy' has no attribute 'complex256'
In file: [cupy/cupyx/scipy/ndimage/filters.py] (https://github.com/cupy/cupy/blob/master/cupyx/scipy/ndimage/filters.py)
Line 83: ` if input.dtype in (numpy.complex64, numpy.complex128, numpy.complex256):`
There is a check for numpy.complex256. On Windows the... | [
{
"content": "import numpy\n\nimport cupy\nfrom cupy import util\n\n\ndef correlate(input, weights, output=None, mode='reflect', cval=0.0, origin=0):\n \"\"\"Multi-dimensional correlate.\n\n The array is correlated with the given kernel.\n\n Args:\n input (cupy.ndarray): The input array.\n ... | [
{
"content": "import cupy\nfrom cupy import util\n\n\ndef correlate(input, weights, output=None, mode='reflect', cval=0.0, origin=0):\n \"\"\"Multi-dimensional correlate.\n\n The array is correlated with the given kernel.\n\n Args:\n input (cupy.ndarray): The input array.\n weights (cupy.... | diff --git a/cupyx/scipy/ndimage/filters.py b/cupyx/scipy/ndimage/filters.py
index 1d4224e02ad..3cd9cbbeaea 100644
--- a/cupyx/scipy/ndimage/filters.py
+++ b/cupyx/scipy/ndimage/filters.py
@@ -1,5 +1,3 @@
-import numpy
-
import cupy
from cupy import util
@@ -80,7 +78,7 @@ def _get_output(output, input, shape=None):... |
oppia__oppia-2694 | Consolidate CollectionBackendApiService and WritableCollectionBackendApiService
There are two services used for communicating collection objects between the backend and frontend:
- `CollectionBackendApiService`, which is used to retrieve, and cache, collections in the frontend
- `WritableCollectionBackendApiService`, w... | [
{
"content": "# coding: utf-8\n#\n# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licen... | [
{
"content": "# coding: utf-8\n#\n# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licen... | diff --git a/assets/i18n/en.json b/assets/i18n/en.json
index 5300ed1a90879..8ff57f02f7a8b 100644
--- a/assets/i18n/en.json
+++ b/assets/i18n/en.json
@@ -38,6 +38,7 @@
"I18N_ERROR_PAGE_TITLE_500": "Error 500 - Oppia",
"I18N_FOOTER_ABOUT": "About",
"I18N_FOOTER_ABOUT_ALL_CAPS": "ABOUT OPPIA",
+ "I18N_FOOTER_AUT... |
spotify__luigi-739 | Latest Luigi version breaks my hadoop jobs
I used to be able to initialize a class like
```
class MyStreamingJob(luigi.hadoop.JobTask):
param = luigi.Parameter()
```
with code like
```
MyStreamingJob('param_value')
```
but now this results in an error
```
luigi.parameter.MissingParameterException: MyStreamingJ... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\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": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\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/luigi/task.py b/luigi/task.py
index e41d35397f..6cdac3d37c 100644
--- a/luigi/task.py
+++ b/luigi/task.py
@@ -326,7 +326,7 @@ def get_param_values(cls, params, args, kwargs):
exc_desc = '%s[args=%s, kwargs=%s]' % (task_name, args, kwargs)
# Fill in the positional arguments
- posi... |
scoutapp__scout_apm_python-517 | Core agent update to 1.2.9
We've had a few bug fixes and improvements with the CA. Please bump to 1.2.9 in python CA manager.
| [
{
"content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport logging\nimport os\nimport warnings\n\nfrom scout_apm.compat import string_type\nfrom scout_apm.core import platform_detection\n\nlogger = logging.getLogger(__name__)\n\n\nclass ScoutConfig... | [
{
"content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport logging\nimport os\nimport warnings\n\nfrom scout_apm.compat import string_type\nfrom scout_apm.core import platform_detection\n\nlogger = logging.getLogger(__name__)\n\n\nclass ScoutConfig... | diff --git a/src/scout_apm/core/config.py b/src/scout_apm/core/config.py
index cb926623..c6c8f53d 100644
--- a/src/scout_apm/core/config.py
+++ b/src/scout_apm/core/config.py
@@ -213,7 +213,7 @@ def __init__(self):
"core_agent_launch": True,
"core_agent_log_level": "info",
"core_a... |
ckan__ckan-6180 | Can't use `solr_user` and `solr_password` in Python 3
**CKAN version**
2.9
**Describe the bug**
When setting the `solr_user` and `solr_password` config options running Python 3 you get a startup error:
```
File "/usr/lib/ckan/src/ckan/ckan/lib/search/__init__.py", line 309, in check_solr_schema_version
... | [
{
"content": "# encoding: utf-8\n\nfrom __future__ import print_function\nimport logging\nimport sys\nimport cgitb\nimport warnings\nimport xml.dom.minidom\n\nimport requests\n\nfrom ckan.common import asbool, config\nimport ckan.model as model\nimport ckan.plugins as p\nimport ckan.logic as logic\n\nfrom ckan.... | [
{
"content": "# encoding: utf-8\n\nfrom __future__ import print_function\nimport logging\nimport sys\nimport cgitb\nimport warnings\nimport base64\nimport xml.dom.minidom\n\nimport requests\n\nfrom ckan.common import asbool, config\nimport ckan.model as model\nimport ckan.plugins as p\nimport ckan.logic as logi... | diff --git a/ckan/lib/search/__init__.py b/ckan/lib/search/__init__.py
index 50fd2adddf0..45ce05a5e15 100644
--- a/ckan/lib/search/__init__.py
+++ b/ckan/lib/search/__init__.py
@@ -5,6 +5,7 @@
import sys
import cgitb
import warnings
+import base64
import xml.dom.minidom
import requests
@@ -259,7 +260,7 @@ def _g... |
microsoft__DeepSpeed-4373 | [BUG] PDSH_SSH_ARGS_APPEND environment variable is replaced (instead of appended to)
**Describe the bug**
When using the `pdsh` launcher, the runner replaces any existing content of the PDSH_SSH_ARGS_APPEND environment variable, instead of adding to it. As a result, any existing values the user has set in the shell wi... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\nimport os\nimport sys\nimport shutil\nimport subprocess\nimport warnings\nfrom shlex import split\nfrom abc import ABC, abstractmethod\nfrom deepspeed.accelerator import get_accelerator\nfrom ..uti... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n# SPDX-License-Identifier: Apache-2.0\n\n# DeepSpeed Team\n\nimport os\nimport sys\nimport shutil\nimport subprocess\nimport warnings\nfrom shlex import split\nfrom abc import ABC, abstractmethod\nfrom deepspeed.accelerator import get_accelerator\nfrom ..uti... | diff --git a/deepspeed/launcher/multinode_runner.py b/deepspeed/launcher/multinode_runner.py
index 3f4552224f81..5b879efee469 100644
--- a/deepspeed/launcher/multinode_runner.py
+++ b/deepspeed/launcher/multinode_runner.py
@@ -66,7 +66,7 @@ def parse_user_args(self):
def get_cmd(self, environment, active_resources... |
MongoEngine__mongoengine-1430 | Drop Python 2.6 support
For the most relevant discussion about the topic, see #1294.
Plan:
1. In the upcoming minor release, I'm going to include `warnings.warn(msg, DeprecationWarning)`. with the message saying "Python v2.6 support is deprecated and is going to be dropped entirely in the upcoming v0.11.0 release. ... | [
{
"content": "\"\"\"Helper functions and types to aid with Python 2.5 - 3 support.\"\"\"\n\nimport sys\nimport pymongo\n\n\nif pymongo.version_tuple[0] < 3:\n IS_PYMONGO_3 = False\nelse:\n IS_PYMONGO_3 = True\n\nPY3 = sys.version_info[0] == 3\n\nif PY3:\n import codecs\n from io import BytesIO as St... | [
{
"content": "\"\"\"Helper functions and types to aid with Python 2.6 - 3 support.\"\"\"\n\nimport sys\nimport warnings\n\nimport pymongo\n\n\n# Show a deprecation warning for people using Python v2.6\n# TODO remove in mongoengine v0.11.0\nif sys.version_info[0] == 2 and sys.version_info[1] == 6:\n warnings.... | diff --git a/.travis.yml b/.travis.yml
index 8d764a322..4721a0868 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: python
python:
-- '2.6'
+- '2.6' # TODO remove in v0.11.0
- '2.7'
- '3.3'
- '3.4'
diff --git a/mongoengine/python_support.py b/mongoengine/python_support.py
index 5bb9038dd..f4b... |
intel__dffml-197 | docs: Switch HTML theme to sphinx_rtd_theme
https://sphinx-rtd-theme.readthedocs.io/en/stable/installing.html
| [
{
"content": "# SPDX-License-Identifier: MIT\n# Copyright (c) 2019 Intel Corporation\nimport ast\nfrom io import open\nfrom setuptools import find_packages, setup\n\nwith open(\"dffml/version.py\", \"r\") as f:\n for line in f:\n if line.startswith(\"VERSION\"):\n VERSION = ast.literal_eval... | [
{
"content": "# SPDX-License-Identifier: MIT\n# Copyright (c) 2019 Intel Corporation\nimport ast\nfrom io import open\nfrom setuptools import find_packages, setup\n\nwith open(\"dffml/version.py\", \"r\") as f:\n for line in f:\n if line.startswith(\"VERSION\"):\n VERSION = ast.literal_eval... | diff --git a/.travis.yml b/.travis.yml
index eab416733f..0e8eefe728 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -36,7 +36,7 @@ before_install:
- docker pull mariadb:10
- mkdir -p /home/travis/.cache/
- mkdir -p /home/travis/.local/bin/
-- pip install coverage codecov sphinx sphinxcontrib-asyncio black
+- pip insta... |
googleapis__python-bigquery-978 | Test TestBigQuery.test_transaction_info is flaky.
https://source.cloud.google.com/results/invocations/2ca6ab31-ba0f-4a6b-ab53-55943a5bac42/targets/cloud-devrel%2Fclient-libraries%2Fpython%2Fgoogleapis%2Fpython-bigquery%2Fpresubmit%2Fsystem-3.8/log
This test fails pretty regularly for me.
| [
{
"content": "# Copyright 2015 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 2015 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/google/cloud/bigquery/job/base.py b/google/cloud/bigquery/job/base.py
index 72db5a63c..698181092 100644
--- a/google/cloud/bigquery/job/base.py
+++ b/google/cloud/bigquery/job/base.py
@@ -357,6 +357,11 @@ def reservation_usage(self):
def transaction_info(self) -> Optional[TransactionInfo]:
""... |
ManimCommunity__manim-3126 | Error message redirecting to missing documentation
Hi. I am working with manim for the first time and I encountered this:
```
Manim Community v0.17.2
sh: 1: dvisvgm: not found
<traceback>
ValueError: Your installation does not support converting .dvi files to SVG. Consider updating dvisvgm to at least version 2.... | [
{
"content": "\"\"\"Interface for writing, compiling, and converting ``.tex`` files.\n\n.. SEEALSO::\n\n :mod:`.mobject.svg.tex_mobject`\n\n\"\"\"\n\nfrom __future__ import annotations\n\nimport hashlib\nimport os\nimport re\nimport unicodedata\nfrom pathlib import Path\n\nfrom manim.utils.tex import TexTemp... | [
{
"content": "\"\"\"Interface for writing, compiling, and converting ``.tex`` files.\n\n.. SEEALSO::\n\n :mod:`.mobject.svg.tex_mobject`\n\n\"\"\"\n\nfrom __future__ import annotations\n\nimport hashlib\nimport os\nimport re\nimport unicodedata\nfrom pathlib import Path\n\nfrom manim.utils.tex import TexTemp... | diff --git a/.github/ISSUE_TEMPLATE/installation_issue.md b/.github/ISSUE_TEMPLATE/installation_issue.md
index b3e6d423c7..02d16b78ea 100644
--- a/.github/ISSUE_TEMPLATE/installation_issue.md
+++ b/.github/ISSUE_TEMPLATE/installation_issue.md
@@ -11,7 +11,7 @@ assignees: ''
- [ ] I have followed the latest version o... |
GPflow__GPflow-285 | minibatches with _optimize_tf
Apologies if I'm missing something with usage here, but it seems that minibatches are not actually changing when using a tensorflow optimizer. Is the optimize function intended to be called once per batch? This requires a recompile each time so I suspect not.
When I moved the lines
`fe... | [
{
"content": "# Copyright 2016 James Hensman, Mark van der Wilk, Valentine Svensson, alexggmatthews, fujiisoup\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.a... | [
{
"content": "# Copyright 2016 James Hensman, Mark van der Wilk, Valentine Svensson, alexggmatthews, fujiisoup\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.a... | diff --git a/GPflow/model.py b/GPflow/model.py
index 6e37444d0..d75d03cbc 100755
--- a/GPflow/model.py
+++ b/GPflow/model.py
@@ -223,11 +223,11 @@ def _optimize_tf(self, method, callback, maxiter):
"""
opt_step = self._compile(optimizer=method)
feed_dict = {}
- self.update_feed_dict(se... |
psf__black-2649 | parser: correctly identify error location on soft-keywords
Currently it only throws the error on the first-seen node (?):
```
(.venv) (3.9.5) [ 6:53ÖS ] [ isidentical@msi:~ ]
$ cat t.py 140ms
def something():
... | [
{
"content": "\"\"\"\nParse Python code and perform AST validation.\n\"\"\"\nimport ast\nimport platform\nimport sys\nfrom typing import Any, Iterable, Iterator, List, Set, Tuple, Type, Union\n\nif sys.version_info < (3, 8):\n from typing_extensions import Final\nelse:\n from typing import Final\n\n# lib2... | [
{
"content": "\"\"\"\nParse Python code and perform AST validation.\n\"\"\"\nimport ast\nimport platform\nimport sys\nfrom typing import Any, Iterable, Iterator, List, Set, Tuple, Type, Union\n\nif sys.version_info < (3, 8):\n from typing_extensions import Final\nelse:\n from typing import Final\n\n# lib2... | diff --git a/CHANGES.md b/CHANGES.md
index 7214405c429..c0cf60af98a 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -15,6 +15,7 @@
times, like `match re.match()` (#2661)
- Fix assignment to environment variables in Jupyter Notebooks (#2642)
- Add `flake8-simplify` and `flake8-comprehensions` plugins (#2653)
+- Fix par... |
crytic__slither-1057 | Yul calldata offset and length support
### Describe the desired feature
In solidity 0.7.5, `.offset` and `.length` were added to calldata variables of dynamic arrays in yul as described in https://blog.soliditylang.org/2020/11/18/solidity-0.7.5-release-announcement/.
It appears that currently slither is missing sup... | [
{
"content": "import abc\nimport json\nfrom typing import Optional, Dict, List, Union\n\nfrom slither.core.cfg.node import NodeType, Node, link_nodes\nfrom slither.core.cfg.scope import Scope\nfrom slither.core.compilation_unit import SlitherCompilationUnit\nfrom slither.core.declarations import (\n Function... | [
{
"content": "import abc\nimport json\nfrom typing import Optional, Dict, List, Union\n\nfrom slither.core.cfg.node import NodeType, Node, link_nodes\nfrom slither.core.cfg.scope import Scope\nfrom slither.core.compilation_unit import SlitherCompilationUnit\nfrom slither.core.declarations import (\n Function... | diff --git a/slither/solc_parsing/yul/parse_yul.py b/slither/solc_parsing/yul/parse_yul.py
index 7f31399c57..3c4768d091 100644
--- a/slither/solc_parsing/yul/parse_yul.py
+++ b/slither/solc_parsing/yul/parse_yul.py
@@ -773,6 +773,14 @@ def parse_yul_identifier(root: YulScope, _node: YulNode, ast: Dict) -> Optional[
... |
svthalia__concrexit-2591 | Updating promo requests
**Describe the bug**
It is not possible to update the promo request within a week of the publish date
**How to reproduce**
Create a promo request
Try to update the designer within a week to publish date
**Expected behavior**
The request can only be created more than a week before... | [
{
"content": "from django import forms\nfrom django.utils import timezone\n\nfrom promotion.models import PromotionRequest\nfrom thaliawebsite.settings import PROMO_PUBLISH_DATE_TIMEDELTA\n\n\nclass PromotionRequestForm(forms.ModelForm):\n class Meta:\n model = PromotionRequest\n fields = [\n ... | [
{
"content": "from django import forms\nfrom django.utils import timezone\n\nfrom promotion.models import PromotionRequest\nfrom thaliawebsite.settings import PROMO_PUBLISH_DATE_TIMEDELTA\n\n\nclass PromotionRequestForm(forms.ModelForm):\n class Meta:\n model = PromotionRequest\n fields = [\n ... | diff --git a/website/promotion/forms.py b/website/promotion/forms.py
index 1ea001f31..e63eeac75 100644
--- a/website/promotion/forms.py
+++ b/website/promotion/forms.py
@@ -20,11 +20,6 @@ class Meta:
def clean_publish_date(self):
publish_date = self.cleaned_data.get("publish_date")
- create_time_... |
cookiecutter__cookiecutter-django-3435 | pre-commit config file excluding files that are not supposed to be excluded
## What happened?
In file: ` cookiecutter-django/{{cookiecutter.project_slug}}/.pre-commit-config.yaml ` line number 1:
`exclude: 'docs|node_modules|migrations|.git|.tox'` using this statement it excludes any file/directory with word 'docs' i... | [
{
"content": "# Generated by Django 3.1.7 on 2021-02-04 14:49\n\nfrom django.db import migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('sites', '0003_set_site_domain_and_name'),\n ]\n\n operations = [\n migrations.AlterModelOptions(\n name='site',... | [
{
"content": "# Generated by Django 3.1.7 on 2021-02-04 14:49\n\nfrom django.db import migrations\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n (\"sites\", \"0003_set_site_domain_and_name\"),\n ]\n\n operations = [\n migrations.AlterModelOptions(\n name=\"s... | diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore
index 613e8beab8..424c8cdc46 100644
--- a/{{cookiecutter.project_slug}}/.gitignore
+++ b/{{cookiecutter.project_slug}}/.gitignore
@@ -327,13 +327,13 @@ Session.vim
tags
### Project template
-{% if cookiecutter.use_mailh... |
e2nIEE__pandapower-1987 | Shunt values for CIGRE HV network are incorrect
### Issue Report Checklist
* [x] Searched the [issues page](https://github.com/e2nIEE/pandapower/issues) for similar reports
* [x] Read the relevant sections of the [documentation](https://pandapower.readthedocs.io/en/latest/about.html)
* [x] Browse the [tutorials](... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2023 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\n\nfrom pandas import read_json\nfrom numpy import nan\nimport pandapower as pp\ntry:\n import pandapl... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2023 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\n\nfrom pandas import read_json\nfrom numpy import nan\nimport pandapower as pp\ntry:\n import pandapl... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 82b8743cb..c9f7da2bf 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,10 @@
Change Log
=============
+[upcoming release] - 2023-..-..
+-------------------------------
+- [FIXED] recorrection of shunt values in CIGRE HV
+
[2.12.1] - 2023-04-18
-------------... |
urllib3__urllib3-1439 | 'Failed to parse headers' warning logged when getting message/rfc822 content
I've been investigating an [issue](https://github.com/boto/botocore/issues/1551) I've recently discovered when retrieving objects from S3. I've now tracked it to `urllib3`; this test case (which I've added to `urllib3/test/with_dummyserver/tes... | [
{
"content": "from __future__ import absolute_import\nfrom ..packages.six.moves import http_client as httplib\n\nfrom ..exceptions import HeaderParsingError\n\n\ndef is_fp_closed(obj):\n \"\"\"\n Checks whether a given file-like object is closed.\n\n :param obj:\n The file-like object to check.\... | [
{
"content": "from __future__ import absolute_import\nfrom ..packages.six.moves import http_client as httplib\n\nfrom ..exceptions import HeaderParsingError\n\n\ndef is_fp_closed(obj):\n \"\"\"\n Checks whether a given file-like object is closed.\n\n :param obj:\n The file-like object to check.\... | diff --git a/CHANGES.rst b/CHANGES.rst
index 5f2f65559c..0b912d0b37 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -13,6 +13,9 @@ dev (master)
* Drop support for EOL Python 2.6 (Pull #1429 and Pull #1430)
+* Fixed bug where responses with header Content-Type: message/* erroneously
+ raised HeaderParsingError, resu... |
privacyidea__privacyidea-1669 | Failed to enroll U2F token on latest Chrome
# What did you try to do?
Enroll U2F token on Chrome
# What outcome did you expect?
Being able to enroll U2F token on Chrome
# What outcome did you experience?
Failed to enroll U2F token on Chrome
# Configuration
* privacyIDEA Version: 2.23.5
* Install... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# 2018-02-13 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Allow expired attestation certificate\n# 2017-04-18 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Save attestation cert info to tokeninfo\n# 2015-11-22 Cornelius Kölbel... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# 2018-02-13 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Allow expired attestation certificate\n# 2017-04-18 Cornelius Kölbel <cornelius.koelbel@netknights.it>\n# Save attestation cert info to tokeninfo\n# 2015-11-22 Cornelius Kölbel... | diff --git a/privacyidea/lib/tokens/u2ftoken.py b/privacyidea/lib/tokens/u2ftoken.py
index af15f333c6..a800bb8578 100644
--- a/privacyidea/lib/tokens/u2ftoken.py
+++ b/privacyidea/lib/tokens/u2ftoken.py
@@ -348,7 +348,7 @@ def get_init_detail(self, params=None, user=None):
if not app_id:
r... |
urllib3__urllib3-2026 | Refresh the ConnectionPool.urlopen docstring
- Missing the `url` parameter from docs
- Mentions non-existing `post_url`?
- I'm sure there's more, likely good to put eyeballs on it :)
| [
{
"content": "from __future__ import absolute_import\n\nimport errno\nimport logging\nimport socket\nimport sys\nimport warnings\nfrom socket import error as SocketError\nfrom socket import timeout as SocketTimeout\n\nfrom .connection import (\n BaseSSLError,\n BrokenPipeError,\n DummyConnection,\n ... | [
{
"content": "from __future__ import absolute_import\n\nimport errno\nimport logging\nimport socket\nimport sys\nimport warnings\nfrom socket import error as SocketError\nfrom socket import timeout as SocketTimeout\n\nfrom .connection import (\n BaseSSLError,\n BrokenPipeError,\n DummyConnection,\n ... | diff --git a/src/urllib3/connectionpool.py b/src/urllib3/connectionpool.py
index da1931eeb3..4708c5bfc7 100644
--- a/src/urllib3/connectionpool.py
+++ b/src/urllib3/connectionpool.py
@@ -551,10 +551,12 @@ def urlopen(
:param method:
HTTP request method (such as GET, POST, PUT, etc.)
+ :pa... |
translate__pootle-6574 | Configurable logo url and favicon
It would be nice to have a configurable logo in the config file like you did for the name of pootle site (`POOTLE_TITLE`) instead of creating a custom template or editing the css of the default one.
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nfrom django.co... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nfrom django.co... | diff --git a/docs/releases/2.8.0.rst b/docs/releases/2.8.0.rst
index 4eb1d24364b..5b14b7e4305 100644
--- a/docs/releases/2.8.0.rst
+++ b/docs/releases/2.8.0.rst
@@ -309,8 +309,9 @@ Changes in settings
sessions are always remembered.
- :setting:`POOTLE_EMAIL_FEEDBACK_ENABLED` was added, to allow disabling
sending... |
getredash__redash-1484 | Wrong sort for Date column
It happens if sort by date column with UI.
Screenshot shows everything.
<img width="544" alt="2016-12-06 14 37 07" src="https://cloud.githubusercontent.com/assets/7091907/20924299/dea511b4-bbc1-11e6-8ffd-2bdda4bcbbd8.png">
| [
{
"content": "from itertools import chain\n\nimport sqlparse\nfrom flask import jsonify, request\nfrom flask_login import login_required\nfrom flask_restful import abort\nfrom funcy import distinct, take\nfrom sqlalchemy.orm.exc import StaleDataError\n\nfrom redash import models\nfrom redash.handlers.base impor... | [
{
"content": "from itertools import chain\n\nimport sqlparse\nfrom flask import jsonify, request\nfrom flask_login import login_required\nfrom flask_restful import abort\nfrom funcy import distinct, take\nfrom sqlalchemy.orm.exc import StaleDataError\n\nfrom redash import models\nfrom redash.handlers.base impor... | diff --git a/client/app/components/dynamic-table/dynamic-table.html b/client/app/components/dynamic-table/dynamic-table.html
index 49669c408b..ed2bf3a7cd 100644
--- a/client/app/components/dynamic-table/dynamic-table.html
+++ b/client/app/components/dynamic-table/dynamic-table.html
@@ -3,7 +3,7 @@
<thead>
<tr... |
dask__distributed-4850 | DEBUG log messages imply UCX config options are invalid
When debugging is enabled, distributed outputs the following messages:
```
distributed.comm.ucx - DEBUG - Key: cuda_copy with value: False not a valid UCX configuration option.
distributed.comm.ucx - DEBUG - Key: tcp with value: False not a valid UCX configurat... | [
{
"content": "\"\"\"\n:ref:`UCX`_ based communications for distributed.\n\nSee :ref:`communications` for more.\n\n.. _UCX: https://github.com/openucx/ucx\n\"\"\"\nimport logging\nimport struct\nimport weakref\n\nimport dask\n\nfrom ..utils import (\n CancelledError,\n ensure_ip,\n get_ip,\n get_ipv6... | [
{
"content": "\"\"\"\n:ref:`UCX`_ based communications for distributed.\n\nSee :ref:`communications` for more.\n\n.. _UCX: https://github.com/openucx/ucx\n\"\"\"\nimport logging\nimport struct\nimport weakref\n\nimport dask\n\nfrom ..utils import (\n CancelledError,\n ensure_ip,\n get_ip,\n get_ipv6... | diff --git a/distributed/comm/ucx.py b/distributed/comm/ucx.py
index b0bb62b5852..36bd310eb5c 100644
--- a/distributed/comm/ucx.py
+++ b/distributed/comm/ucx.py
@@ -512,11 +512,9 @@ def _scrub_ucx_config():
options["NET_DEVICES"] = net_devices
# ANY UCX options defined in config will overwrite high ... |
django-cms__django-cms-2784 | LanguageCookieMiddleware
cms.middleware.language.LanguageCookieMiddleware raises unicode/decode error on russian versions of chrome & chromium, firefox etc.
| [
{
"content": "# -*- coding: utf-8 -*-\nimport datetime\n\nfrom django.utils.translation import get_language\nfrom django.conf import settings\n\n\nclass LanguageCookieMiddleware(object):\n def process_response(self, request, response):\n language = get_language()\n if settings.LANGUAGE_COOKIE_N... | [
{
"content": "# -*- coding: utf-8 -*-\nimport datetime\n\nfrom django.utils.translation import get_language\nfrom django.conf import settings\n\n\nclass LanguageCookieMiddleware(object):\n def process_response(self, request, response):\n language = get_language()\n if settings.LANGUAGE_COOKIE_N... | diff --git a/cms/middleware/language.py b/cms/middleware/language.py
index d30802d7cf5..3b2569d5ac9 100644
--- a/cms/middleware/language.py
+++ b/cms/middleware/language.py
@@ -12,7 +12,6 @@ def process_response(self, request, response):
request.COOKIES[settings.LANGUAGE_COOKIE_NAME] == languag... |
ansible__ansible-modules-core-3025 | [v2.1] git module always reports changed --check mode when version= is not explicitly specified
**Ansible Version**
ansible 2.1.0 (devel c485981d1a) last updated 2016/02/12 08:50:29 (GMT +300)
lib/ansible/modules/core: (detached HEAD 8d126bd877) last updated 2016/02/12 08:50:23 (GMT +300)
lib/ansible/modules/extra... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software ... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software ... | diff --git a/source_control/git.py b/source_control/git.py
index 4830e8ea67b..eec76e4133f 100644
--- a/source_control/git.py
+++ b/source_control/git.py
@@ -819,6 +819,8 @@ def main():
if local_mods:
module.exit_json(changed=True, before=before, after=remote_head,
msg=... |
googleapis__google-cloud-python-10079 | Spanner: IndexError: pop from empty list in _merge_struct
#### Environment details
. OS type and version: Debian 9
. Python version: 3.7
. google-cloud-spanner version: 1.13.0
#### Steps to reproduce
1. Do any query that brings thousands of results (Issue happens more often after 15k rows). I'm getting th... | [
{
"content": "# Copyright 2016 Google LLC 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 LLC 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/spanner/google/cloud/spanner_v1/streamed.py b/spanner/google/cloud/spanner_v1/streamed.py
index ddb240a68a91..5d1a31e93124 100644
--- a/spanner/google/cloud/spanner_v1/streamed.py
+++ b/spanner/google/cloud/spanner_v1/streamed.py
@@ -276,6 +276,12 @@ def _merge_struct(lhs, rhs, type_):
"""Helper for '... |
pytorch__pytorch-64679 | torch.distributed.launch/run - make OMP warning message a log.warning rather than a stdout print
## 🚀 Feature
Make the warning message about the default `OMP_NUM_THREADS` set by `torch.distributed.launch` and `torch.distributed.run` use `logger.warning(msg)` rather than a print statement.
## Motivation
Users can ... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree.\n\n\"\"\"\nThis module provides similar functionality as ``tor... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree.\n\n\"\"\"\nThis module provides similar functionality as ``tor... | diff --git a/torch/distributed/run.py b/torch/distributed/run.py
index 5ef693b2c0ad10..d2e33b2239fe49 100644
--- a/torch/distributed/run.py
+++ b/torch/distributed/run.py
@@ -520,7 +520,7 @@ def config_from_args(args) -> Tuple[LaunchConfig, Union[Callable, str], List[str
nproc_per_node = determine_local_world_size... |
bids-standard__pybids-833 | Pandas method FutureWarning: frame.append
With:
- Python 3.9.7
- pybids 0.15.0
- pandas 0.14.0
I'm getting the following `FutureWarning` when running `bids = BIDSLayout(self.dataset.path, derivatives=True)`:
```
...bids/variables/entities.py:245: FutureWarning: The frame.append method is deprecated and will b... | [
{
"content": "\"\"\" Data classes for internal BIDS data hierarchy. \"\"\"\n\nfrom itertools import chain\nfrom collections import namedtuple\n\nimport pandas as pd\n\nfrom . import collections as clc\nfrom bids.utils import matches_entities\n\n\nclass Node(object):\n \"\"\"Base class for objects that repres... | [
{
"content": "\"\"\" Data classes for internal BIDS data hierarchy. \"\"\"\n\nfrom itertools import chain\nfrom collections import namedtuple\n\nimport pandas as pd\n\nfrom . import collections as clc\nfrom bids.utils import matches_entities\n\n\nclass Node(object):\n \"\"\"Base class for objects that repres... | diff --git a/bids/variables/entities.py b/bids/variables/entities.py
index 19f11c1ae..486f18524 100644
--- a/bids/variables/entities.py
+++ b/bids/variables/entities.py
@@ -241,8 +241,11 @@ def create_node(self, level, entities, *args, **kwargs):
entities = dict(entities, node_index=len(self.nodes), level=le... |
vllm-project__vllm-1514 | Array Index Overflow for Large #Blocks
Suppose we have 64K blocks, and the key cache shape of a single layer is `[64K, 32, 16, 16, 8]` (LLaMA-7B). For slot mapping, the maximum value is `64K * 32 * 16 * 16 * 8 = 4194304K > INT_MAX`, which overflow.
## Env
`PyTorch 2.0.1 + vLLM 0.2.0 + cuda-11.7`
## Simple reprod... | [
{
"content": "\"\"\"A GPU worker class.\"\"\"\nimport os\nfrom typing import Dict, List, Tuple, Optional\n\nimport torch\nimport torch.distributed\n\nfrom vllm.config import (CacheConfig, ModelConfig, ParallelConfig,\n SchedulerConfig)\nfrom vllm.model_executor import get_model, InputMet... | [
{
"content": "\"\"\"A GPU worker class.\"\"\"\nimport os\nfrom typing import Dict, List, Tuple, Optional\n\nimport torch\nimport torch.distributed\n\nfrom vllm.config import (CacheConfig, ModelConfig, ParallelConfig,\n SchedulerConfig)\nfrom vllm.model_executor import get_model, InputMet... | diff --git a/csrc/attention/attention_kernels.cu b/csrc/attention/attention_kernels.cu
index ee6b715adae..78e8d8ecd6d 100644
--- a/csrc/attention/attention_kernels.cu
+++ b/csrc/attention/attention_kernels.cu
@@ -175,7 +175,10 @@ __device__ void paged_attention_kernel(
// dot product with the query.
const int* bl... |
Qiskit__qiskit-1394 | Compile and execute use a progress bar even if a single circuit is passed.
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Informations
- **Qiskit Terra version**: master
- **Python version**: 3.7
- **Operating system**... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright 2018, IBM.\n#\n# This source code is licensed under the Apache License, Version 2.0 found in\n# the LICENSE.txt file in the root directory of this source tree.\n\n# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n# Copyright (c) 2011 and later, ... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright 2018, IBM.\n#\n# This source code is licensed under the Apache License, Version 2.0 found in\n# the LICENSE.txt file in the root directory of this source tree.\n\n# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n# Copyright (c) 2011 and later, ... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index d2c5b6434084..3ec1ba5776fc 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -109,6 +109,7 @@ Fixed
(#1226)
- Fixed a bug where the transpiler moved middle-of-circuit measurements to the
end (#1334)
+- parallel_map no longer creates a progress bar for a single cir... |
ESMCI__cime-466 | Allow replacement of config_compilers.xml with config_build.xml
This is an improvement on the xml schema that we want in cime5.1
| [
{
"content": "\"\"\"\nWrapper around all env XML for a case.\n\nAll interaction with and between the module files in XML/ takes place\nthrough the Case module.\n\"\"\"\nfrom copy import deepcopy\nimport glob, os, shutil, traceback\nfrom CIME.XML.standard_module_setup import *\n\nfrom CIME.utils ... | [
{
"content": "\"\"\"\nWrapper around all env XML for a case.\n\nAll interaction with and between the module files in XML/ takes place\nthrough the Case module.\n\"\"\"\nfrom copy import deepcopy\nimport glob, os, shutil, traceback\nfrom CIME.XML.standard_module_setup import *\n\nfrom CIME.utils ... | diff --git a/utils/python/CIME/case.py b/utils/python/CIME/case.py
index 3208b0b6b0e..5be8fc921de 100644
--- a/utils/python/CIME/case.py
+++ b/utils/python/CIME/case.py
@@ -710,8 +710,11 @@ def _create_caseroot_tools(self):
# Create Macros file.
machine = self.get_value("MACH")
- if os.getenv... |
conda__conda-5112 | typify for str + NoneType is wrong
https://github.com/conda/conda/pull/5107#issuecomment-296356913
It still seems to me as if `typify()` is doing something wrong:
```python
>>> from conda._vendor.auxlib.configuration import typify
>>> typify('false', str)
'false'
>>> typify('false', (str, type(None)))
'False'
... | [
{
"content": "\"\"\"Collection of functions to coerce conversion of types with an intelligent guess.\"\"\"\nfrom collections import Mapping\nfrom itertools import chain\nfrom re import IGNORECASE, compile\n\nfrom enum import Enum\n\nfrom .compat import NoneType, integer_types, isiterable, iteritems, string_type... | [
{
"content": "\"\"\"Collection of functions to coerce conversion of types with an intelligent guess.\"\"\"\nfrom collections import Mapping\nfrom itertools import chain\nfrom re import IGNORECASE, compile\n\nfrom enum import Enum\n\nfrom .compat import NoneType, integer_types, isiterable, iteritems, string_type... | diff --git a/conda/_vendor/auxlib/type_coercion.py b/conda/_vendor/auxlib/type_coercion.py
index 96d387c458e..f4aa34124e0 100644
--- a/conda/_vendor/auxlib/type_coercion.py
+++ b/conda/_vendor/auxlib/type_coercion.py
@@ -231,8 +231,8 @@ def typify(value, type_hint=None):
elif not (type_hint - (STRING_TYPES_SET... |
sublimelsp__LSP-242 | space wrongly triggers autocompletion
following https://github.com/tomv564/LSP/pull/197#discussion_r151605795
<img width="418" alt="screen shot 2017-11-17 at 12 23 30 am" src="https://user-images.githubusercontent.com/1690993/32930648-f23bb3be-cb2d-11e7-96bf-437671397099.png">
It could be reproduced by typing `y`... | [
{
"content": "import sublime\nimport sublime_plugin\n\ntry:\n from typing import Any, List, Dict, Tuple, Callable, Optional\n assert Any and List and Dict and Tuple and Callable and Optional\nexcept ImportError:\n pass\n\nfrom .core.protocol import Request\nfrom .core.settings import settings\nfrom .co... | [
{
"content": "import sublime\nimport sublime_plugin\n\ntry:\n from typing import Any, List, Dict, Tuple, Callable, Optional\n assert Any and List and Dict and Tuple and Callable and Optional\nexcept ImportError:\n pass\n\nfrom .core.protocol import Request\nfrom .core.settings import settings\nfrom .co... | diff --git a/plugin/completion.py b/plugin/completion.py
index 34fbedff8..3b781bae1 100644
--- a/plugin/completion.py
+++ b/plugin/completion.py
@@ -168,6 +168,10 @@ def on_modified(self):
if self.view.sel()[0].begin() < self.last_location:
self.last_location = 0
self.view.run_command... |
wright-group__WrightTools-530 | apply_rcparams needs to tell matplotlib about amssymb
[Line #551](https://github.com/wright-group/WrightTools/blob/development/WrightTools/artists/_base.py#L551)
`matplotlib.rcParams['text.latex.preamble'] = '\\usepackage[cm]{sfmath}'`
should instead be:
`matplotlib.rcParams['text.latex.preamble'] = '\\usepackage[cm... | [
{
"content": "\"\"\"Base tools for visualizing data.\"\"\"\n\n\n# --- import --------------------------------------------------------------------------------------\n\n\nimport numpy as np\n\nimport matplotlib\nfrom matplotlib.axes import SubplotBase, subplot_class_factory\nimport matplotlib.pyplot as plt\nfrom ... | [
{
"content": "\"\"\"Base tools for visualizing data.\"\"\"\n\n\n# --- import --------------------------------------------------------------------------------------\n\n\nimport numpy as np\n\nimport matplotlib\nfrom matplotlib.axes import SubplotBase, subplot_class_factory\nimport matplotlib.pyplot as plt\nfrom ... | diff --git a/WrightTools/artists/_base.py b/WrightTools/artists/_base.py
index 774c6ad87..5ae6cb9e9 100644
--- a/WrightTools/artists/_base.py
+++ b/WrightTools/artists/_base.py
@@ -548,7 +548,8 @@ def apply_rcparams(kind='fast'):
elif kind == 'publication':
matplotlib.rcParams['text.usetex'] = True
... |
pypi__warehouse-1659 | Update elasticsearch-dsl to 5.1.0
There's a new version of [elasticsearch-dsl](https://pypi.python.org/pypi/elasticsearch-dsl) available.
You are currently using **5.0.0**. I have updated it to **5.1.0**
These links might come in handy: <a href="http://pypi.python.org/pypi/elasticsearch-dsl">PyPI</a> | <a href="ht... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/requirements/main.txt b/requirements/main.txt
index fe303e142d06..35bd11f3e462 100644
--- a/requirements/main.txt
+++ b/requirements/main.txt
@@ -74,9 +74,9 @@ disposable-email-domains==0.0.6 \
docutils==0.13.1 \
--hash=sha256:de454f1015958450b72641165c08afe7023cd7e3944396448f2fb1b0ccba9d77 \
--... |
mathesar-foundation__mathesar-1861 | Implement _array mathesar type
- [ ] Cell component for array type
- [ ] Type specific handling for items within array
- [ ] Handle filtering, grouping
| [
{
"content": "\"\"\"\nThis file describes UI data types and how they map to DB-layer database types (subclasses\nof db.types.base.DatabaseType).\n\"\"\"\nfrom enum import Enum\nfrom collections.abc import Collection\nfrom db.types.base import (\n DatabaseType, PostgresType, MathesarCustomType\n)\nfrom db.typ... | [
{
"content": "\"\"\"\nThis file describes UI data types and how they map to DB-layer database types (subclasses\nof db.types.base.DatabaseType).\n\"\"\"\nfrom enum import Enum\nfrom collections.abc import Collection\nfrom db.types.base import (\n DatabaseType, PostgresType, MathesarCustomType\n)\nfrom db.typ... | diff --git a/mathesar/database/types.py b/mathesar/database/types.py
index 677b282ff1..414ca8a772 100644
--- a/mathesar/database/types.py
+++ b/mathesar/database/types.py
@@ -112,12 +112,18 @@ class UIType(Enum):
MathesarCustomType.MATHESAR_JSON_OBJECT,
}
)
+ ARRAY = (
+ 'array',
+ ... |
quantumlib__Cirq-841 | Add __repr__ to XmonDevice
See e.g. `TrialResult` or `Circuit` for how these should work.
```python
def __repr__(self):
return ('TrialResult(params={!r}, '
'repetitions={!r}, '
'measurements={!r})').format(self.params,
self... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/cirq/google/xmon_device.py b/cirq/google/xmon_device.py
index 97046367ef8..13c3cb19644 100644
--- a/cirq/google/xmon_device.py
+++ b/cirq/google/xmon_device.py
@@ -195,6 +195,15 @@ def col(self, col: int) -> List[GridQubit]:
"""Returns the qubits in the given column, in ascending order."""
... |
mne-tools__mne-bids-117 | [MAINT] Avoid using reserved keywords/funcs as variable names
I noticed this: https://github.com/mne-tools/mne-bids/blob/master/mne_bids/utils.py#L29
where the `dir` clashes with a built-in function called `dir`.
Fix coming from me with some more ENHs
| [
{
"content": "\"\"\"Utility and helper functions for MNE-BIDS.\"\"\"\n# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>\n# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Teon Brooks <teon.brooks@gmail.com>\n# Chris Holdgraf <choldgraf@berkeley.edu>\n# S... | [
{
"content": "\"\"\"Utility and helper functions for MNE-BIDS.\"\"\"\n# Authors: Mainak Jas <mainak.jas@telecom-paristech.fr>\n# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Teon Brooks <teon.brooks@gmail.com>\n# Chris Holdgraf <choldgraf@berkeley.edu>\n# S... | diff --git a/mne_bids/utils.py b/mne_bids/utils.py
index e48cc2d6b..4426033a1 100644
--- a/mne_bids/utils.py
+++ b/mne_bids/utils.py
@@ -25,12 +25,12 @@
from .io import _parse_ext
-def print_dir_tree(dir):
- """Recursively print a directory tree starting from `dir`."""
- if not op.exists(dir):
- raise... |
dotkom__onlineweb4-420 | Mark rules error for anonymous users on events
'AnonymousUser' object has no attribute 'mark_rules'
| [
{
"content": "from django import forms\nfrom captcha.fields import CaptchaField\n\nclass CaptchaForm(forms.Form):\n def __init__(self, *args, **kwargs):\n user = kwargs.pop('user', None)\n super(CaptchaForm, self).__init__(*args, **kwargs)\n # Removing mark rules field if user has alread... | [
{
"content": "from django import forms\nfrom captcha.fields import CaptchaField\n\nclass CaptchaForm(forms.Form):\n def __init__(self, *args, **kwargs):\n user = kwargs.pop('user', None)\n super(CaptchaForm, self).__init__(*args, **kwargs)\n # Removing mark rules field if user has alread... | diff --git a/apps/events/forms.py b/apps/events/forms.py
index f02dc1187..7770ac03b 100644
--- a/apps/events/forms.py
+++ b/apps/events/forms.py
@@ -6,7 +6,7 @@ def __init__(self, *args, **kwargs):
user = kwargs.pop('user', None)
super(CaptchaForm, self).__init__(*args, **kwargs)
# Removing m... |
dmlc__dgl-3214 | Small typo in GAT tutorial
## 📚 Documentation
Hi there,
there's a small typo in this tutorial page for GAT: https://docs.dgl.ai/en/v0.7.0/tutorials/models/1_gnn/9_gat.html
```
**GAN** uses weighting neighbor features with feature dependent and structure-free normalization, in the style of attention.
```
... | [
{
"content": "\"\"\"\n.. _model-gat:\n\nUnderstand Graph Attention Network\n=======================================\n\n**Authors:** `Hao Zhang <https://github.com/sufeidechabei/>`_, `Mufei Li\n<https://github.com/mufeili>`_, `Minjie Wang\n<https://jermainewang.github.io/>`_ `Zheng Zhang\n<https://shanghai.nyu.... | [
{
"content": "\"\"\"\n.. _model-gat:\n\nUnderstand Graph Attention Network\n=======================================\n\n**Authors:** `Hao Zhang <https://github.com/sufeidechabei/>`_, `Mufei Li\n<https://github.com/mufeili>`_, `Minjie Wang\n<https://jermainewang.github.io/>`_ `Zheng Zhang\n<https://shanghai.nyu.... | diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index b429d34dcaa4..b9a3c5777081 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -8,7 +8,7 @@ Please feel free to remove inapplicable items for your PR.
- [ ] Changes are complete (i.e. I finished c... |
open-telemetry__opentelemetry-python-1317 | Avoid logging in lock
As per the comment [here](https://github.com/open-telemetry/opentelemetry-python/commit/27dc6916fc5c920c2861eb5c6c4f0f938fea5886#r43626614), it would be best not to call to logger within the lock
| [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py
index 04faa19ec20..a350e3687a6 100644
--- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py
+++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py
@@ -373,11 +373,15 @@ d... |
benoitc__gunicorn-2879 | Wrong HTTP status code on Request Header Fields Too Large
When the request header gets too large (e.g. a lot of cookies), gunicorn returns HTTP 400 instead of HTTP 431, which can mask the real problem through proxies. Gunicorn should return the right HTTP error code.
| [
{
"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\nimport io\nimport os\nimport signal\nimport sys\nimport time\nimport traceback\nfrom datetime import datetime\nfrom random import randint\nfrom ssl import SSLError\n... | [
{
"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\nimport io\nimport os\nimport signal\nimport sys\nimport time\nimport traceback\nfrom datetime import datetime\nfrom random import randint\nfrom ssl import SSLError\n... | diff --git a/THANKS b/THANKS
index 117134970..453da465d 100644
--- a/THANKS
+++ b/THANKS
@@ -168,6 +168,7 @@ Steven Cummings <estebistec@gmail.com>
Sébastien Fievet <zyegfryed@gmail.com>
Talha Malik <talham7391@hotmail.com>
TedWantsMore <TedWantsMore@gmx.com>
+Teko012 <112829523+Teko012@users.noreply.github.com>
Th... |
zalando__patroni-1324 | `dest` argument default value is platform dependant
We should use `os.path.join` to handle path separators
| [
{
"content": "import abc\nimport datetime\nimport os\nimport psycopg2\nimport json\nimport shutil\nimport signal\nimport six\nimport subprocess\nimport sys\nimport tempfile\nimport threading\nimport time\nimport yaml\n\n\n@six.add_metaclass(abc.ABCMeta)\nclass AbstractController(object):\n\n def __init__(sel... | [
{
"content": "import abc\nimport datetime\nimport os\nimport psycopg2\nimport json\nimport shutil\nimport signal\nimport six\nimport subprocess\nimport sys\nimport tempfile\nimport threading\nimport time\nimport yaml\n\n\n@six.add_metaclass(abc.ABCMeta)\nclass AbstractController(object):\n\n def __init__(sel... | diff --git a/features/environment.py b/features/environment.py
index d7ba4e824..3ffca4df9 100644
--- a/features/environment.py
+++ b/features/environment.py
@@ -258,7 +258,7 @@ def cancel_background(self):
def backup_source(self):
return 'postgres://{username}:{password}@{host}:{port}/{database}'.format(*... |
sagemath__sage-36173 | Unoptimal memory complexity of `sage.matrix.berlekamp`
The code here is unoptimal:
https://github.com/sagemath/sage/blob/6695becb762aebab78ef47d0fb12eae52be5d79d/src/sage/matrix/berlekamp_massey.py#L90-L98
For example, the following code uses a lot of memory:
```python
sage: from sage.matrix.berlekamp_massey ... | [
{
"content": "\"\"\"\nMinimal Polynomials of Linear Recurrence Sequences\n\nAUTHORS:\n\n- William Stein\n\"\"\"\n# ****************************************************************************\n# Copyright (C) 2005 William Stein <wstein@gmail.com>\n#\n# Distributed under the terms of the GNU General Publi... | [
{
"content": "\"\"\"\nMinimal Polynomials of Linear Recurrence Sequences\n\nAUTHORS:\n\n- William Stein\n\"\"\"\n# ****************************************************************************\n# Copyright (C) 2005 William Stein <wstein@gmail.com>\n#\n# Distributed under the terms of the GNU General Publi... | diff --git a/src/sage/matrix/berlekamp_massey.py b/src/sage/matrix/berlekamp_massey.py
index 716ed428745..ccebc227119 100644
--- a/src/sage/matrix/berlekamp_massey.py
+++ b/src/sage/matrix/berlekamp_massey.py
@@ -84,15 +84,11 @@ def berlekamp_massey(a):
K = a[0].parent().fraction_field()
except AttributeE... |
kivy__python-for-android-1513 | Didn't find any valid dependency graphs. - Flask and websocket-client
In my app I use both flask and websocket-client. However, when i try to add both of these dependencies to my app, p4a fails. However, when I build my app only with `flask`, or only with `websocket-client` p4a works correctly.
```
p4a apk --private ... | [
{
"content": "from pythonforandroid.toolchain import Recipe\n\n# if android app crashes on start with \"ImportError: No module named websocket\"\n#\n# copy the 'websocket' directory into your app directory to force inclusion.\n#\n# see my example at https://github.com/debauchery1st/example_kivy_websocket-re... | [
{
"content": "from pythonforandroid.toolchain import Recipe\n\n# if android app crashes on start with \"ImportError: No module named websocket\"\n#\n# copy the 'websocket' directory into your app directory to force inclusion.\n#\n# see my example at https://github.com/debauchery1st/example_kivy_websocket-re... | diff --git a/pythonforandroid/recipes/websocket-client/__init__.py b/pythonforandroid/recipes/websocket-client/__init__.py
index 9fecee3101..ac44aecea9 100644
--- a/pythonforandroid/recipes/websocket-client/__init__.py
+++ b/pythonforandroid/recipes/websocket-client/__init__.py
@@ -15,15 +15,13 @@
class WebSocketCli... |
zestedesavoir__zds-site-6343 | Lien erroné dans le MP d'ajout à la rédaction d'un contenu
**Description du bug**
Le second lien du MP que l'on reçoit lorsqu'on est ajouté comme auteur à un contenu mène vers une page 404.
**Comment reproduire ?**
La liste des étapes qui permet de reproduire le bug :
1. Avec `user1`, créer un billet
2. ... | [
{
"content": "from django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.models import User\nfrom django.shortcuts import get_object_or_404, redirect\nfrom django.template.loader import render_to_string\nfrom django.urls import reverse\nfrom django.utils.text import format_l... | [
{
"content": "from django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.models import User\nfrom django.shortcuts import get_object_or_404, redirect\nfrom django.template.loader import render_to_string\nfrom django.urls import reverse\nfrom django.utils.text import format_l... | diff --git a/zds/tutorialv2/views/authors.py b/zds/tutorialv2/views/authors.py
index 9f933d69d3..0d58b4f1d8 100644
--- a/zds/tutorialv2/views/authors.py
+++ b/zds/tutorialv2/views/authors.py
@@ -46,7 +46,9 @@ def form_valid(self, form):
self.object.validation_private_message.add_participant(user)
... |
Cloud-CV__EvalAI-674 | Hosts: User cannot see all of his Host Teams
## CURRENT STATE -
`challenge-host-teams` page only shows teams `created_by` the user.
## ISSUE -
On `challenge-host-teams` page, user should be able to see all host teams he is a part of.
## RELATED ISSUE -
#607 Refer to this issue also.
| [
{
"content": "from rest_framework import permissions, status\nfrom rest_framework.decorators import (api_view,\n authentication_classes,\n permission_classes,\n throttle_classes,)\nfrom rest_framewo... | [
{
"content": "from rest_framework import permissions, status\nfrom rest_framework.decorators import (api_view,\n authentication_classes,\n permission_classes,\n throttle_classes,)\nfrom rest_framewo... | diff --git a/README.md b/README.md
index bd3e8390ed..5d4bd246d2 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ EvalAI is an open source web application that helps researchers, students and da
Setting up EvalAI on your local machine is really easy.
Follow this guide to setup your development machine.
-1. I... |
carpentries__amy-1689 | Workshops with tag "circuits" don't trigger the 7 days post-workshop email
example: https://amy.carpentries.org/workshops/event/2020-07-21-nmcsa-online/
cc: @Talishask
| [
{
"content": "from datetime import timedelta, date\nimport logging\nfrom typing import Optional, Dict\n\nfrom django.conf import settings\nfrom django.contrib.sites.models import Site\nfrom django.core.mail import EmailMultiAlternatives\nfrom django.template.exceptions import (\n TemplateSyntaxError,\n Te... | [
{
"content": "from datetime import timedelta, date\nimport logging\nfrom typing import Optional, Dict\n\nfrom django.conf import settings\nfrom django.contrib.sites.models import Site\nfrom django.core.mail import EmailMultiAlternatives\nfrom django.template.exceptions import (\n TemplateSyntaxError,\n Te... | diff --git a/amy/autoemails/actions.py b/amy/autoemails/actions.py
index dce837918..ed268a178 100644
--- a/amy/autoemails/actions.py
+++ b/amy/autoemails/actions.py
@@ -466,7 +466,7 @@ def check(event: Event):
# must have "automated-email" tag
and event.tags.filter(name__icontains="automated-e... |
oppia__oppia-2476 | Update the "collections" section of the creator dashboard to use the newer summary tiles.
In the creator dashboard, the "collections" tab shows long horizontal cards. These are out of sync with the rest of the site, and should instead be replaced with the smaller collection summary tiles that are used in the library pa... | [
{
"content": "# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | [
{
"content": "# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | diff --git a/core/controllers/dashboard.py b/core/controllers/dashboard.py
index d4be6fd0f2b0e..cafd80ae23793 100644
--- a/core/controllers/dashboard.py
+++ b/core/controllers/dashboard.py
@@ -204,6 +204,7 @@ def _round_average_ratings(rating):
'created_on': utils.get_time_in_millisecs(
... |
encode__starlette-1574 | Denying WebSocket connection in WebSocketEndpoint.on_connect leads to Exception
### Discussed in https://github.com/encode/starlette/discussions/1555
<div type='discussions-op-text'>
<sup>Originally posted by **dingensundso** March 27, 2022</sup>
I created a WebSocketEndpoint class in which I want to deny the co... | [
{
"content": "import asyncio\nimport json\nimport typing\n\nfrom starlette import status\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.exceptions import HTTPException\nfrom starlette.requests import Request\nfrom starlette.responses import PlainTextResponse, Response\nfrom starlette.types... | [
{
"content": "import asyncio\nimport json\nimport typing\n\nfrom starlette import status\nfrom starlette.concurrency import run_in_threadpool\nfrom starlette.exceptions import HTTPException\nfrom starlette.requests import Request\nfrom starlette.responses import PlainTextResponse, Response\nfrom starlette.types... | diff --git a/starlette/endpoints.py b/starlette/endpoints.py
index 73367c257..f2468a326 100644
--- a/starlette/endpoints.py
+++ b/starlette/endpoints.py
@@ -80,7 +80,9 @@ async def dispatch(self) -> None:
data = await self.decode(websocket, message)
await self.on_receive(websoc... |
pypa__pip-4425 | pip install -h output is wrong about pyc
* Pip version: 9.0.1
* Python version: 3.5
* Operating system: Linux
### Description:
pip install -h says
--compile Compile py files to pyc
--no-compile Do not compile py files to pyc
pyc is only correct for some Python interpret... | [
{
"content": "from __future__ import absolute_import\n\nimport logging\nimport operator\nimport os\nimport tempfile\nimport shutil\ntry:\n import wheel\nexcept ImportError:\n wheel = None\n\nfrom pip.req import RequirementSet\nfrom pip.basecommand import RequirementCommand\nfrom pip.locations import virtu... | [
{
"content": "from __future__ import absolute_import\n\nimport logging\nimport operator\nimport os\nimport tempfile\nimport shutil\ntry:\n import wheel\nexcept ImportError:\n wheel = None\n\nfrom pip.req import RequirementSet\nfrom pip.basecommand import RequirementCommand\nfrom pip.locations import virtu... | diff --git a/news/4316.bugfix b/news/4316.bugfix
new file mode 100644
index 00000000000..5fec2ac480c
--- /dev/null
+++ b/news/4316.bugfix
@@ -0,0 +1 @@
+Generalize help text for ``compile``/``no-compile` flags.
diff --git a/pip/commands/install.py b/pip/commands/install.py
index 1af43a1b6aa..a49dfa78624 100644
--- a/pi... |
Parsl__parsl-175 | PathLike behavior for File
With the recent changes to the DataFuture behavior and the File based model that we are moving to in general, we want to have File behave as closely to old behavior as possible so that there's least amount of code breakage. This is one such case:
Earlier we could do this since the result o... | [
{
"content": "\"\"\"Define the File Type.\n\nThe primary purpose of the File object is to track the protocol to be used\nto transfer the file as well as to give the appropriate filepath depending\non where(client-side, remote-side, intermediary-side) the File.filepath is\nbeing called from\n\"\"\"\n\nimport os\... | [
{
"content": "\"\"\"Define the File Type.\n\nThe primary purpose of the File object is to track the protocol to be used\nto transfer the file as well as to give the appropriate filepath depending\non where(client-side, remote-side, intermediary-side) the File.filepath is\nbeing called from\n\"\"\"\n\nimport os\... | diff --git a/parsl/data_provider/files.py b/parsl/data_provider/files.py
index 5e974259e8..f73c8f32b9 100644
--- a/parsl/data_provider/files.py
+++ b/parsl/data_provider/files.py
@@ -15,7 +15,7 @@
logger = logging.getLogger(__name__)
-class File(object):
+class File(str):
"""The Parsl File Class.
This ... |
pyodide__pyodide-931 | CLAPACK.js is missing from the dev branch
For some reason, I started to see the CLAPACK.js missing error when using pyodide from https://cdn.jsdelivr.net/pyodide/dev/full/:
```
Couldn't load package from URL https://cdn.jsdelivr.net/pyodide/dev/full/CLAPACK.js
```
| [
{
"content": "#!/usr/bin/env python3\n\n\"\"\"\nBuild all of the packages in a given directory.\n\"\"\"\n\nimport argparse\nfrom functools import total_ordering\nimport json\nfrom pathlib import Path\nfrom queue import Queue, PriorityQueue\nimport shutil\nimport subprocess\nimport sys\nfrom threading import Thr... | [
{
"content": "#!/usr/bin/env python3\n\n\"\"\"\nBuild all of the packages in a given directory.\n\"\"\"\n\nimport argparse\nfrom functools import total_ordering\nimport json\nfrom pathlib import Path\nfrom queue import Queue, PriorityQueue\nimport shutil\nimport subprocess\nimport sys\nfrom threading import Thr... | diff --git a/pyodide_build/buildall.py b/pyodide_build/buildall.py
index fd4dd0c0d30..4612fe7fc79 100755
--- a/pyodide_build/buildall.py
+++ b/pyodide_build/buildall.py
@@ -220,11 +220,15 @@ def build_packages(packages_dir: Path, outputdir: Path, args) -> None:
"import_name_to_package_name": {},
}
+ ... |
chainer__chainer-249 | Add type check to LeakyReLU function
Related to #123
| [
{
"content": "from chainer import cuda\nfrom chainer import function\n\n\ndef _kern():\n return cuda.elementwise(\n 'float* y, const float* cond, const float* x, float slope',\n 'y[i] = cond[i] >= 0 ? x[i] : slope * x[i]', 'lrelu')\n\n\nclass LeakyReLU(function.Function):\n\n \"\"\"Leaky rec... | [
{
"content": "import numpy\n\nfrom chainer import cuda\nfrom chainer import function\nfrom chainer.utils import type_check\n\n\ndef _kern():\n return cuda.elementwise(\n 'float* y, const float* cond, const float* x, float slope',\n 'y[i] = cond[i] >= 0 ? x[i] : slope * x[i]', 'lrelu')\n\n\nclas... | diff --git a/chainer/functions/leaky_relu.py b/chainer/functions/leaky_relu.py
index 8675d421ca76..8042276cab4e 100644
--- a/chainer/functions/leaky_relu.py
+++ b/chainer/functions/leaky_relu.py
@@ -1,5 +1,8 @@
+import numpy
+
from chainer import cuda
from chainer import function
+from chainer.utils import type_check... |
encode__django-rest-framework-2195 | JSONP renderer fails to escape U+2028 and U+2029
When Unicode is enabled for JSON output, the JSONP renderer fails to escape U+2028 and U+2029 which are [valid in JSON but invalid in JavaScript](http://timelessrepo.com/json-isnt-a-javascript-subset).
Try adding this simple model to the example app from the README:
``... | [
{
"content": "\"\"\"\nRenderers are used to serialize a response into specific media types.\n\nThey give us a generic way of being able to handle various media types\non the response, such as JSON encoded data or HTML output.\n\nREST framework also provides an HTML renderer the renders the browsable API.\n\"\"\... | [
{
"content": "\"\"\"\nRenderers are used to serialize a response into specific media types.\n\nThey give us a generic way of being able to handle various media types\non the response, such as JSON encoded data or HTML output.\n\nREST framework also provides an HTML renderer the renders the browsable API.\n\"\"\... | diff --git a/rest_framework/renderers.py b/rest_framework/renderers.py
index e87d16d0d0..64ad5a0654 100644
--- a/rest_framework/renderers.py
+++ b/rest_framework/renderers.py
@@ -102,6 +102,11 @@ def render(self, data, accepted_media_type=None, renderer_context=None):
# and may (or may not) be unicode.
... |
strawberry-graphql__strawberry-3099 | Unable to use Unions with Generics
## Describe the Bug
Not sure if it is a bug or something non supported but when passing a union to a generic type strawberry is unable to initialize the schema.
The following example would work using a single strawberry type with Connection, but it fails when using an union
... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, List, Optional, Union, cast\nfrom typing_extensions import Protocol\n\nfrom strawberry.custom_scalar import ScalarDefinition\nfrom strawberry.directive import StrawberryDirective\nfrom strawberry.enum import EnumDefinition, En... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, List, Optional, Union, cast\nfrom typing_extensions import Protocol\n\nfrom strawberry.custom_scalar import ScalarDefinition\nfrom strawberry.directive import StrawberryDirective\nfrom strawberry.enum import EnumDefinition, En... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index ae6881baea..ca79670804 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -3,7 +3,7 @@ repos:
rev: 23.7.0
hooks:
- id: black
- exclude: ^tests/\w+/snapshots/
+ exclude: ^(tests/\w+/snapshots/|tests/pyt... |
mars-project__mars-46 | [TEST]Specialized tests needed under Windows
As plasma store does not support Windows currently, cases for web sessions on a mock server are needed to make sure Mars client works properly under Windows.
| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://... | diff --git a/.travis.yml b/.travis.yml
index 03065a8b20..a7290a109a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,15 +1,32 @@
language: python
-python:
- - "2.7"
- - "3.5"
- - "3.6"
matrix:
include:
- - os: linux
+ - sudo: required
+ os: linux
+ python: "2.7"
+ services:
+ - doc... |
ansible__ansible-modules-extras-3314 | Certificate expiration date parsing fails in letsencrypt module
<!---
Please do not report issues/requests related to Ansible modules here !!
Report them to the appropriate modules-core or modules-extras project:
- https://github.com/ansible/ansible-modules-core/issues
- https://github.com/ansible/ansible-modules-... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2016 Michael Gruener <michael.gruener@chaosmoon.net>\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 Soft... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2016 Michael Gruener <michael.gruener@chaosmoon.net>\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 Soft... | diff --git a/web_infrastructure/letsencrypt.py b/web_infrastructure/letsencrypt.py
index a43014a8ab4..16e185757ba 100644
--- a/web_infrastructure/letsencrypt.py
+++ b/web_infrastructure/letsencrypt.py
@@ -20,6 +20,7 @@
import binascii
import copy
+import locale
import textwrap
from datetime import datetime
@@ -... |
microsoft__Qcodes-4081 | HDF5 error with 'slow' acquisition of 2D array
## Steps to reproduce:
import qcodes as qc
from qcodes.data import hdf5_format
from qcodes.data.data_set import DataSet
from qcodes.tests.instrument_mocks import MockParabola
DataSet.default_formatter = hdf5_format.HDF5Format()
mockParabola = MockParabola(nam... | [
{
"content": "import json\nimport logging\nimport os\nfrom typing import TYPE_CHECKING\n\nimport h5py\nimport numpy as np\n\nimport qcodes as qc\n\nfrom .data_array import DataArray\nfrom .format import Formatter\n\nif TYPE_CHECKING:\n from .data_set import DataSet\n\nclass HDF5Format(Formatter):\n \"\"\"... | [
{
"content": "import json\nimport logging\nimport os\nfrom typing import TYPE_CHECKING\n\nimport h5py\nimport numpy as np\n\nimport qcodes as qc\n\nfrom .data_array import DataArray\nfrom .format import Formatter\n\nif TYPE_CHECKING:\n from .data_set import DataSet\n\nclass HDF5Format(Formatter):\n \"\"\"... | diff --git a/qcodes/data/hdf5_format.py b/qcodes/data/hdf5_format.py
index 1c39573626e..ca2d370b6b3 100644
--- a/qcodes/data/hdf5_format.py
+++ b/qcodes/data/hdf5_format.py
@@ -239,8 +239,7 @@ def write(self, data_set, io_manager=None, location=None,
datasetshape[1])
dset.r... |
opsdroid__opsdroid-1432 | Opsdroid logger returning errors
# Description
Hi, I have been using `opsdroid` for a few days now, and while it is a good framework, I have been having a lot of trouble. Most recently I have been getting a error `formatter refrenced before use`. I have linted my configuration.yaml and none of my python files have err... | [
{
"content": "\"\"\"Class for Filter logs and logging logic.\"\"\"\n\nimport os\nimport logging\nimport contextlib\n\nfrom logging.handlers import RotatingFileHandler\nfrom opsdroid.const import DEFAULT_LOG_FILENAME, __version__\n\n_LOGGER = logging.getLogger(__name__)\n\n\nclass ParsingFilter(logging.Filter):\... | [
{
"content": "\"\"\"Class for Filter logs and logging logic.\"\"\"\n\nimport os\nimport logging\nimport contextlib\n\nfrom logging.handlers import RotatingFileHandler\nfrom opsdroid.const import DEFAULT_LOG_FILENAME, __version__\n\n_LOGGER = logging.getLogger(__name__)\n\n\nclass ParsingFilter(logging.Filter):\... | diff --git a/opsdroid/logging.py b/opsdroid/logging.py
index d26d90007..eb9aaf240 100644
--- a/opsdroid/logging.py
+++ b/opsdroid/logging.py
@@ -83,13 +83,13 @@ def configure_logging(config):
rootlogger.setLevel(log_level)
- try:
+ formatter = logging.Formatter("%(levelname)s %(name)s: %(message)s")
+
+ ... |
chainer__chainer-722 | `/usr/local/cuda/lib` in Linux for Tegra
In CUDA for L4T (Linux for Tegra), shared objects are located in `/usr/local/cuda/lib`, not in `lib64`. I failed to install Chainer.
| [
{
"content": "from __future__ import print_function\nimport copy\nimport distutils\nimport os\nfrom os import path\nimport pkg_resources\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\n\nimport setuptools\nfrom setuptools.command import build_ext\n\n\ndummy_extension = setuptools.Extension('chai... | [
{
"content": "from __future__ import print_function\nimport copy\nimport distutils\nimport os\nfrom os import path\nimport pkg_resources\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\n\nimport setuptools\nfrom setuptools.command import build_ext\n\n\ndummy_extension = setuptools.Extension('chai... | diff --git a/chainer_setup_build.py b/chainer_setup_build.py
index a92d14ce89f5..ddf5b0efb2bb 100644
--- a/chainer_setup_build.py
+++ b/chainer_setup_build.py
@@ -93,10 +93,9 @@ def get_compiler_setting():
if sys.platform == 'win32':
library_dirs.append(path.join(cuda_path, 'bin'))
li... |
locustio__locust-546 | Test file can not be named locust.py (or any other name that is the same as an existing python package)
Thanks for writing the locust test tool. It's very interesting!
I follow the instruction on http://locust.io/, first I installed
```
pip install locustio
pip install pyzmq
```
Then I copied and pasted the sample... | [
{
"content": "import locust\nfrom . import runners\n\nimport gevent\nimport sys\nimport os\nimport signal\nimport inspect\nimport logging\nimport socket\nfrom optparse import OptionParser\n\nfrom . import web\nfrom .log import setup_logging, console_logger\nfrom .stats import stats_printer, print_percentile_sta... | [
{
"content": "import locust\nfrom . import runners\n\nimport gevent\nimport sys\nimport os\nimport signal\nimport inspect\nimport logging\nimport socket\nfrom optparse import OptionParser\n\nfrom . import web\nfrom .log import setup_logging, console_logger\nfrom .stats import stats_printer, print_percentile_sta... | diff --git a/locust/main.py b/locust/main.py
index 3b356f2faa..da2addea5c 100644
--- a/locust/main.py
+++ b/locust/main.py
@@ -350,10 +350,15 @@ def main():
sys.exit(0)
locustfile = find_locustfile(options.locustfile)
+
if not locustfile:
logger.error("Could not find any locustfile! Ensure... |
kedro-org__kedro-2988 | Kedro release 0.18.13 - official support for Python 3.11
We want to do a release by end of this Sprint (21 Aug)/early next sprint.
### Done (feel free to add the related PR/issues)
- Kedro Python 3.11 support - (need to wait for kedro-datasets https://github.com/kedro-org/kedro-plugins/issues/154)
- The series of fix... | [
{
"content": "from glob import glob\nfrom itertools import chain\n\nfrom setuptools import setup\n\n# at least 1.3 to be able to use XMLDataSet and pandas integration with fsspec\nPANDAS = \"pandas~=1.3\"\nSPARK = \"pyspark>=2.2, <3.4\"\nHDFS = \"hdfs>=2.5.8, <3.0\"\nS3FS = \"s3fs>=0.3.0, <0.5\"\n\ntemplate_fil... | [
{
"content": "from glob import glob\nfrom itertools import chain\n\nfrom setuptools import setup\n\n# at least 1.3 to be able to use XMLDataSet and pandas integration with fsspec\nPANDAS = \"pandas~=1.3\"\nSPARK = \"pyspark>=2.2, <3.4\"\nHDFS = \"hdfs>=2.5.8, <3.0\"\nS3FS = \"s3fs>=0.3.0, <0.5\"\n\ntemplate_fil... | diff --git a/RELEASE.md b/RELEASE.md
index 8e91fada51..8d5cb62415 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -7,28 +7,37 @@
## Breaking changes to the API
## Migration guide from Kedro 0.18.* to 0.19.*
+# Upcoming Release 0.18.14
-# Upcoming Release 0.18.13
+## Major features and improvements
+## Bug fixes and o... |
sktime__sktime-1475 | [BUG] Automatic downloader for sktime.datasets.load_UCR_UEA_dataset does not work for custom extract_path
Even given a custom extract_path, UCR_UEA datasets are downloaded to the default sktime package directory. The bug is easily fixed by adding the custom extract_path to the _download_and_extract function call.
Li... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Utilities for loading datasets.\"\"\"\nimport os\nimport shutil\nimport tempfile\nimport zipfile\nfrom urllib.request import urlretrieve\n\nimport numpy as np\nimport pandas as pd\n\nfrom sktime.utils.data_io import load_from_tsfile_to_dataframe\n\n__all__ = [\n \... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Utilities for loading datasets.\"\"\"\nimport os\nimport shutil\nimport tempfile\nimport zipfile\nfrom urllib.request import urlretrieve\n\nimport numpy as np\nimport pandas as pd\n\nfrom sktime.utils.data_io import load_from_tsfile_to_dataframe\n\n__all__ = [\n \... | diff --git a/.all-contributorsrc b/.all-contributorsrc
index 708459bdb83..07775e4394f 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -1252,6 +1252,15 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "yairbeer",
+ "name": "Yair Beer",
+ "avatar_url": "https://... |
Netflix__lemur-111 | Duplicate Plugins Listed
Plugins are duplicated in the authority dropdown.
| [
{
"content": "\"\"\"\n.. module: lemur.plugins.views\n :platform: Unix\n :synopsis: This module contains all of the accounts view code.\n :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more\n :license: Apache, see LICENSE for more details.\n.. moduleauthor:: Kevin Glisson <kglisson@netflix.co... | [
{
"content": "\"\"\"\n.. module: lemur.plugins.views\n :platform: Unix\n :synopsis: This module contains all of the accounts view code.\n :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more\n :license: Apache, see LICENSE for more details.\n.. moduleauthor:: Kevin Glisson <kglisson@netflix.co... | diff --git a/lemur/common/managers.py b/lemur/common/managers.py
index 4e693677ae..79f4cb1db1 100644
--- a/lemur/common/managers.py
+++ b/lemur/common/managers.py
@@ -22,7 +22,8 @@ def get_class_list(self):
def add(self, class_path):
self.cache = None
- self.class_list.append(class_path)
+ ... |
jupyterhub__jupyterhub-3147 | 500 error does not output error description
### Bug description
Launching a single user notebook leads to a 500 error (as expected) if the user's server fails to authenticate with the JupyterHub. However, the error's description is not displayed due to an invalid key.
#### Expected behavior
Display the user er... | [
{
"content": "\"\"\"Authenticating services with JupyterHub.\n\nCookies are sent to the Hub for verification. The Hub replies with a JSON\nmodel describing the authenticated user.\n\n``HubAuth`` can be used in any application, even outside tornado.\n\n``HubAuthenticated`` is a mixin class for tornado handlers t... | [
{
"content": "\"\"\"Authenticating services with JupyterHub.\n\nCookies are sent to the Hub for verification. The Hub replies with a JSON\nmodel describing the authenticated user.\n\n``HubAuth`` can be used in any application, even outside tornado.\n\n``HubAuthenticated`` is a mixin class for tornado handlers t... | diff --git a/jupyterhub/services/auth.py b/jupyterhub/services/auth.py
index 5ad6d163a8..c9e6974faf 100644
--- a/jupyterhub/services/auth.py
+++ b/jupyterhub/services/auth.py
@@ -371,9 +371,13 @@ def _api_request(self, method, url, **kwargs):
)
app_log.warning(r.text)
msg = "Faile... |
conan-io__conan-11971 | [bug] EndeavourOS not among list of distros listed for pacman support
### Environment Details (include every applicable attribute)
* Operating System+version: EndeavourOS 2022.06.23
* Compiler+version: Clang 14.0.6
* Conan version: 1.51.3
* Python version: 3.10.6
### Steps to reproduce (Include if Applic... | [
{
"content": "import platform\n\nfrom conans.client.graph.graph import CONTEXT_BUILD\nfrom conans.errors import ConanException\n\n\nclass _SystemPackageManagerTool(object):\n mode_check = \"check\"\n mode_install = \"install\"\n tool_name = None\n install_command = \"\"\n update_command = \"\"\n ... | [
{
"content": "import platform\n\nfrom conans.client.graph.graph import CONTEXT_BUILD\nfrom conans.errors import ConanException\n\n\nclass _SystemPackageManagerTool(object):\n mode_check = \"check\"\n mode_install = \"install\"\n tool_name = None\n install_command = \"\"\n update_command = \"\"\n ... | diff --git a/conan/tools/system/package_manager.py b/conan/tools/system/package_manager.py
index a416d2db5ff..ef281980fea 100644
--- a/conan/tools/system/package_manager.py
+++ b/conan/tools/system/package_manager.py
@@ -38,7 +38,7 @@ def get_default_tool(self):
"almalinux", "rocky"]... |
ansible-collections__community.aws-93 | Ansible kinesis stream paginated shards gets stuck in infinite loop
##### SUMMARY
For Kinesis streams with > 100 shards, `client.describe_stream(**params)['StreamDescription']` returns a paginated view, thus https://github.com/ansible-collections/community.aws/blob/master/plugins/modules/kinesis_stream.py#L363 will al... | [
{
"content": "#!/usr/bin/python\n# Copyright: Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: kinesis_stream\nversion_add... | [
{
"content": "#!/usr/bin/python\n# Copyright: Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\nmodule: kinesis_stream\nversion_add... | diff --git a/changelogs/fragments/93-kinesis_stream-get-more-shards-resolve.yml b/changelogs/fragments/93-kinesis_stream-get-more-shards-resolve.yml
new file mode 100644
index 00000000000..84365d6ff15
--- /dev/null
+++ b/changelogs/fragments/93-kinesis_stream-get-more-shards-resolve.yml
@@ -0,0 +1,2 @@
+bugfixes:
+- ki... |
litestar-org__litestar-1355 | StaticFilesConfig and virtual directories
I'm trying to write a ``FileSystemProtocol`` to load files from the package data using [importlib_resources](https://importlib-resources.readthedocs.io/en/latest/using.html#). But because ``directories`` is defined as ``DirectoryPath``, pydantic checks if the given directories ... | [
{
"content": "from datetime import date, datetime, time, timedelta\nfrom decimal import Decimal\nfrom inspect import isclass\nfrom ipaddress import IPv4Network, IPv6Network\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Dict,\n List,\n Optional,\n Tuple,\n Type,\n Union,\... | [
{
"content": "from datetime import date, datetime, time, timedelta\nfrom decimal import Decimal\nfrom inspect import isclass\nfrom ipaddress import IPv4Network, IPv6Network\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Dict,\n List,\n Optional,\n Tuple,\n Type,\n Union,\... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index f4c144c50a..ecbaa15220 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -55,6 +55,7 @@ repos:
[
aiosqlite,
asyncpg,
+ async_timeout,
beanie,
beautifulsoup4,... |
google__timesketch-1544 | Check for proper permission on timeline
In api/v1/resources/timeline.py, remove_timeline_label() checks that the user has permission "delete" on the sketch this timeline is added to:
https://github.com/google/timesketch/blob/b5776d5da1586ea6824e89fd514418a35f4d1908/timesketch/api/v1/resources/timeline.py#L270
This... | [
{
"content": "# Copyright 2020 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 2020 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/timesketch/api/v1/resources/timeline.py b/timesketch/api/v1/resources/timeline.py
index 1c91531d0a..8369aa3b0d 100644
--- a/timesketch/api/v1/resources/timeline.py
+++ b/timesketch/api/v1/resources/timeline.py
@@ -267,12 +267,6 @@ def post(self, sketch_id, timeline_id):
self._add_l... |
iterative__dvc-8505 | `exp run`: data gets re-imported on every call
# Bug Report
## Description
When a pipeline uses an imported data file (with `dvc import`), the data gets cloned(?) and hashed every time `dvc exp run` is called.
### Reproduce
1. dvc import git@github.com:iterative/dataset-registry.git use-cases/cats-dogs
2. ... | [
{
"content": "from dvc import prompt\n\nfrom . import locked\n\n\ndef _prepare_message(stage, changes):\n changed_deps, changed_outs, changed_stage = changes\n if changed_deps and changed_outs:\n msg = \"dependencies {deps} and outputs {outs} of {stage} changed.\"\n elif changed_deps:\n m... | [
{
"content": "from dvc import prompt\n\nfrom . import locked\n\n\ndef _prepare_message(stage, changes):\n changed_deps, changed_outs, changed_stage = changes\n if changed_deps and changed_outs:\n msg = \"dependencies {deps} and outputs {outs} of {stage} changed.\"\n elif changed_deps:\n m... | diff --git a/dvc/repo/commit.py b/dvc/repo/commit.py
index d58b4775a2..c6840a9afd 100644
--- a/dvc/repo/commit.py
+++ b/dvc/repo/commit.py
@@ -56,10 +56,13 @@ def commit(
]
for stage_info in stages_info:
stage = stage_info.stage
- changes = stage.changed_entries()
- if any(changes):
- ... |
agconti__cookiecutter-django-rest-194 | Set django storages default acl to public read
| [
{
"content": "import os\nfrom configurations import values\nfrom boto.s3.connection import OrdinaryCallingFormat\nfrom .common import Common\n\ntry:\n # Python 2.x\n import urlparse\nexcept ImportError:\n # Python 3.x\n from urllib import parse as urlparse\n\n\nclass Production(Common):\n\n # Hon... | [
{
"content": "import os\nfrom configurations import values\nfrom boto.s3.connection import OrdinaryCallingFormat\nfrom .common import Common\n\ntry:\n # Python 2.x\n import urlparse\nexcept ImportError:\n # Python 3.x\n from urllib import parse as urlparse\n\n\nclass Production(Common):\n\n # Hon... | diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/production.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/production.py
index bada3a14b..48f79de0d 100755
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/production.py
+++ ... |
celery__celery-450 | os.kill is not available in windows before python 2.7
As per the topic, the current celery implementation (>=2.3.0) crashes on windows using python 2.5 and 2.6, because it uses os.kill which is not available in windows before python 2.7
| [
{
"content": "\"\"\"\n\nProcess Pools.\n\n\"\"\"\nimport platform\nimport signal as _signal\n\nfrom os import kill as _kill\n\nfrom celery.concurrency.base import BasePool\nfrom celery.concurrency.processes.pool import Pool, RUN\n\nif platform.system() == \"Windows\": # pragma: no cover\n # On Windows os.ki... | [
{
"content": "\"\"\"\n\nProcess Pools.\n\n\"\"\"\nimport platform\nimport signal as _signal\n\nfrom celery.concurrency.base import BasePool\nfrom celery.concurrency.processes.pool import Pool, RUN\n\nif platform.system() == \"Windows\": # pragma: no cover\n # On Windows os.kill calls TerminateProcess which ... | diff --git a/celery/concurrency/processes/__init__.py b/celery/concurrency/processes/__init__.py
index 21d025b5bb4..bbdbb337865 100644
--- a/celery/concurrency/processes/__init__.py
+++ b/celery/concurrency/processes/__init__.py
@@ -6,8 +6,6 @@
import platform
import signal as _signal
-from os import kill as _kill
... |
spyder-ide__spyder-8378 | Title field of error dialog is too small in macOS
This can be clearly seen in the following image:

----
@juanis2112, this field is defined here:
https://github.com/spyder-ide/spyder/blob/master/spyd... | [
{
"content": "# -*- coding: utf-8 -*-\n# -----------------------------------------------------------------------------\n# Copyright © Spyder Project Contributors\n#\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n# ---------------------------------------------------------... | [
{
"content": "# -*- coding: utf-8 -*-\n# -----------------------------------------------------------------------------\n# Copyright © Spyder Project Contributors\n#\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n# ---------------------------------------------------------... | diff --git a/spyder/widgets/reporterror.py b/spyder/widgets/reporterror.py
index d430c3533fa..a75ea46d3d7 100644
--- a/spyder/widgets/reporterror.py
+++ b/spyder/widgets/reporterror.py
@@ -160,6 +160,7 @@ def __init__(self, parent=None, is_report=False):
self.title_chars_label = QLabel(_("{} more characters "
... |
gwastro__pycbc-2107 | PyCBC can't import its own version
It seems that a broken relative import means pycbc can't actually import its own version, from `ldas-pcdev1.ligo.caltech.edu`:
```bash
$ . /cvmfs/oasis.opensciencegrid.org/ligo/sw/pycbc/x86_64_rhel_7/virtualenv/pycbc-v1.9.2/bin/activate
(pycbc-v1.9.2) $ python -c "import pycbc; p... | [
{
"content": "# Copyright (C) 2012 Alex Nitz, Josh Willis\n#\n# This program is free software; you can redistribute it and/or modify it\n# under the terms of the GNU General Public License as published by the\n# Free Software Foundation; either version 3 of the License, or (at your\n# option) any later version... | [
{
"content": "# Copyright (C) 2012 Alex Nitz, Josh Willis\n#\n# This program is free software; you can redistribute it and/or modify it\n# under the terms of the GNU General Public License as published by the\n# Free Software Foundation; either version 3 of the License, or (at your\n# option) any later version... | diff --git a/pycbc/__init__.py b/pycbc/__init__.py
index 6e53dc16e97..43aedabd493 100644
--- a/pycbc/__init__.py
+++ b/pycbc/__init__.py
@@ -32,12 +32,15 @@
try:
# This will fail when pycbc is imported during the build process,
# before version.py has been generated.
- from version import git_hash
- fr... |
plotly__dash-2867 | [BUG] No output callbacks with clientside_callback
If a clientside callback has no output, it generate `ID not found in layout` error:
```
clientside_callback(
"""
function(_) {
window.location.reload();
}
""",
Input("reset-button", "n_clicks"),
prevent_initial_call=True,
)
``... | [
{
"content": "import collections\nimport hashlib\nfrom functools import wraps\n\nimport flask\n\nfrom .dependencies import (\n handle_callback_args,\n handle_grouped_callback_args,\n Output,\n)\nfrom .exceptions import (\n InvalidCallbackReturnValue,\n PreventUpdate,\n WildcardInLongCallback,\... | [
{
"content": "import collections\nimport hashlib\nfrom functools import wraps\n\nimport flask\n\nfrom .dependencies import (\n handle_callback_args,\n handle_grouped_callback_args,\n Output,\n)\nfrom .exceptions import (\n InvalidCallbackReturnValue,\n PreventUpdate,\n WildcardInLongCallback,\... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index cce75d54fc..f18607dc73 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- [#2854](https://github.com/plotly/dash/pull/2854) Fix dcc.Dropdown resetting empty values to null and triggering cal... |
networkx__networkx-2101 | compose() erases some MultiGraph edges
If a user wants to compose two multigraphs, it is very likely that they want to use all of the edges present in both. In MultiGraphs, edges which share the same (source, target) pair are not the same. Currently, edges which share the same (source, target, key) tuple are treated th... | [
{
"content": "\"\"\"\nOperations on graphs including union, intersection, difference.\n\"\"\"\n# Copyright (C) 2004-2016 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\nimport networkx as nx\nfr... | [
{
"content": "\"\"\"\nOperations on graphs including union, intersection, difference.\n\"\"\"\n# Copyright (C) 2004-2016 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\nimport networkx as nx\nfr... | diff --git a/networkx/algorithms/operators/binary.py b/networkx/algorithms/operators/binary.py
index 635eab99efc..fc26c98037c 100644
--- a/networkx/algorithms/operators/binary.py
+++ b/networkx/algorithms/operators/binary.py
@@ -316,6 +316,10 @@ def compose(G, H, name=None):
-----
It is recommended that G and... |
boto__botocore-1249 | Documentation that contains hyperlinks with different URLs but the same description text all render as the same URL
Despite the fact that the service definitions (for example the [SES service definition](https://github.com/boto/botocore/blob/develop/botocore/data/ses/2010-12-01/service-2.json)) contain documentation st... | [
{
"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/botocore/docs/bcdoc/style.py b/botocore/docs/bcdoc/style.py
index df4833327d..622974b26e 100644
--- a/botocore/docs/bcdoc/style.py
+++ b/botocore/docs/bcdoc/style.py
@@ -220,8 +220,7 @@ def end_a(self):
if ':' in last_write:
last_write = last_write.replace(':', r'\:')
... |
nipy__nipype-2054 | nipypecli should have --version
### Summary
```shell
$> nipypecli --version
Error: no such option: --version
```
### Actual behavior
```shell
$> nipypecli --version
Error: no such option: --version
```
### Expected behavior
```shell
$> nipypecli --version
0.13.1
```
### How to replicate the behavi... | [
{
"content": "#!python\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\nfrom io import open\n\nimport click\n\nfrom .instance import list_interfaces\nfrom .utils import (CONTEXT_SETTINGS,\n UNKNOWN_OPTIONS,\n ... | [
{
"content": "#!python\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\nfrom io import open\n\nimport click\n\nfrom .instance import list_interfaces\nfrom .utils import (CONTEXT_SETTINGS,\n UNKNOWN_OPTIONS,\n ... | diff --git a/nipype/scripts/cli.py b/nipype/scripts/cli.py
index 48d9294a99..520030741e 100644
--- a/nipype/scripts/cli.py
+++ b/nipype/scripts/cli.py
@@ -15,6 +15,7 @@
PythonModule,
check_not_none,)
+from .. import __version__
# declare the CLI group
@click.group(context... |
TileDB-Inc__TileDB-Py-521 | Sparse writing in Dense Arrays is not working as documented.
The feature described in https://docs.tiledb.com/main/solutions/tiledb-embedded/api-usage/writing-arrays/writing-sparse-cells does not work for Dense Arrays, only for SparseArrays. It raises the following error:
```python
...
A[m.row, m.col] = m.data... | [
{
"content": "import json\nimport os\nimport copy\nimport warnings\nfrom dataclasses import dataclass\n\nfrom typing import Optional\n\nimport numpy as np\nimport tiledb\nfrom tiledb import TileDBError\n\n\ndef check_dataframe_deps():\n pd_error = \"\"\"Pandas version >= 1.0 required for dataframe functional... | [
{
"content": "import json\nimport os\nimport copy\nimport warnings\nfrom dataclasses import dataclass\n\nfrom typing import Optional\n\nimport numpy as np\nimport tiledb\nfrom tiledb import libtiledb\nfrom tiledb import TileDBError\n\n\ndef check_dataframe_deps():\n pd_error = \"\"\"Pandas version >= 1.0 req... | diff --git a/tiledb/dataframe_.py b/tiledb/dataframe_.py
index 9f2bc87d0f..13cc9798b2 100644
--- a/tiledb/dataframe_.py
+++ b/tiledb/dataframe_.py
@@ -8,6 +8,7 @@
import numpy as np
import tiledb
+from tiledb import libtiledb
from tiledb import TileDBError
@@ -645,7 +646,7 @@ def from_pandas(uri, dataframe, **... |
wagtail__wagtail-9176 | Snippet with only `RevisionMixin` applied should not show "current draft" status in history
<!--
Found a bug? Please fill out the sections below. 👍
-->
### Issue Summary
When viewing the history for a snippet with `RevisionMixin` applied **and not `DraftStateMixin`**, the latest log entry always shows a "Curre... | [
{
"content": "import warnings\nfrom functools import partial\nfrom urllib.parse import urlencode\n\nimport django_filters\nfrom django.apps import apps\nfrom django.contrib.admin.utils import quote, unquote\nfrom django.core.exceptions import PermissionDenied\nfrom django.db import transaction\nfrom django.http... | [
{
"content": "import warnings\nfrom functools import partial\nfrom urllib.parse import urlencode\n\nimport django_filters\nfrom django.apps import apps\nfrom django.contrib.admin.utils import quote, unquote\nfrom django.core.exceptions import PermissionDenied\nfrom django.db import transaction\nfrom django.http... | diff --git a/wagtail/snippets/templates/wagtailsnippets/snippets/revisions/_actions.html b/wagtail/snippets/templates/wagtailsnippets/snippets/revisions/_actions.html
index ebc187e0301c..e03931a83a37 100644
--- a/wagtail/snippets/templates/wagtailsnippets/snippets/revisions/_actions.html
+++ b/wagtail/snippets/template... |
Showndarya__Hacktoberfest-435 | Travis test ignore first letter of filename for some reason
I'll try and figure out why, thought about simply renaming every file in the travis script but that requires alot of work and overhead for little gain, it is certainly doable, you have to configure the git on the travis instance and make a new commit etc.
Mig... | [
{
"content": "import json\nimport os\nimport re\nimport subprocess\n\n# Get a diff between master and current.\ntry:\n commit_range = os.environ[\"TRAVIS_COMMIT_RANGE\"]\n changed_files = subprocess.check_output([\"git\", \"diff\", \"--name-only\", commit_range])\nexcept KeyError:\n print(\"🔥 This sho... | [
{
"content": "import json\nimport os\nimport re\nimport subprocess\n\n# Get a diff between master and current.\ntry:\n commit_range = os.environ[\"TRAVIS_COMMIT_RANGE\"]\n changed_files = subprocess.check_output([\"git\", \"diff\", \"--name-only\", commit_range])\nexcept KeyError:\n print(\"🔥 This sho... | diff --git a/.travis.py b/.travis.py
index 7f0ae091c..5150dbcd3 100644
--- a/.travis.py
+++ b/.travis.py
@@ -19,13 +19,13 @@
if re.search(r"\.json$", changed_file):
changed_files_json.append(changed_file)
-
+
# Iterate over list of changed JSON files.
for changed_file_json in changed_files_js... |
opendatacube__datacube-core-284 | Data Cube Geometry creation fails with 3D Geometries
The [polygon drill](http://datacube-core.readthedocs.io/en/stable/user/guide.html#polygon-drill) code recipe shows how to create a Data Cube geometry from a Shapefile. Unfortunately it fails when the Shapefile contains 3D coordinates. This has occurred with a Shapefi... | [
{
"content": "from __future__ import absolute_import, division\n\nimport functools\nimport math\nfrom collections import namedtuple, OrderedDict\n\nimport cachetools\nimport numpy\nfrom affine import Affine\nfrom osgeo import ogr, osr\nfrom rasterio.coords import BoundingBox as _BoundingBox\n\nfrom datacube imp... | [
{
"content": "from __future__ import absolute_import, division\n\nimport functools\nimport math\nfrom collections import namedtuple, OrderedDict\n\nimport cachetools\nimport numpy\nfrom affine import Affine\nfrom osgeo import ogr, osr\nfrom rasterio.coords import BoundingBox as _BoundingBox\n\nfrom datacube imp... | diff --git a/datacube/utils/geometry.py b/datacube/utils/geometry.py
index 0a45a490be..1b06a342a0 100644
--- a/datacube/utils/geometry.py
+++ b/datacube/utils/geometry.py
@@ -250,7 +250,8 @@ def _make_multi(type_, maker, coords):
def _make_linear(type_, coordinates):
geom = ogr.Geometry(type_)
for pt in coor... |
huggingface__trl-1045 | Deprecated option `optimize_cuda_cache` warning on import of trl
When you just import trl, we get the following warning:
```
$ python3
Python 3.10.8 (main, Nov 24 2022, 14:13:03) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import trl
/opt/conda/lib/python3.10/s... | [
{
"content": "# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | [
{
"content": "# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | diff --git a/trl/trainer/ppo_config.py b/trl/trainer/ppo_config.py
index 9dcef6f987..0f6a907b64 100644
--- a/trl/trainer/ppo_config.py
+++ b/trl/trainer/ppo_config.py
@@ -104,7 +104,7 @@ class PPOConfig:
"""Number of optimisation epochs per batch of samples"""
max_grad_norm: Optional[float] = None
"""Max... |
keras-team__autokeras-1003 | Finish the TODO list of classes/functions to type.
We have a [big todo list of classes/functions to type](https://github.com/keras-team/autokeras/blob/dda2d9de0c602a1f47b45bb26783eacfd9572815/tests/autokeras/typed_api_test.py#L11) (add type hints, see [PEP484](https://www.python.org/dev/peps/pep-0484/) for more infos a... | [
{
"content": "from typing import Optional\n\nfrom kerastuner.applications import resnet\nfrom kerastuner.applications import xception\nfrom tensorflow.keras import layers\nfrom tensorflow.python.util import nest\n\nfrom autokeras import utils\nfrom autokeras.engine import block as block_module\nfrom autokeras.h... | [
{
"content": "from typing import Optional\n\nfrom kerastuner.applications import resnet\nfrom kerastuner.applications import xception\nfrom tensorflow.keras import layers\nfrom tensorflow.python.util import nest\n\nfrom autokeras import utils\nfrom autokeras.engine import block as block_module\nfrom autokeras.h... | diff --git a/autokeras/hypermodels/basic.py b/autokeras/hypermodels/basic.py
index 2b0ddc981..dcf5a9799 100644
--- a/autokeras/hypermodels/basic.py
+++ b/autokeras/hypermodels/basic.py
@@ -173,12 +173,12 @@ class ConvBlock(block_module.Block):
"""
def __init__(self,
- kernel_size=None,
- ... |
paperless-ngx__paperless-ngx-5431 | [BUG] 'NoneType' object has no attribute 'archive_serial_number'
### Description
when I want to click +1 as adding document archive numbering, nothing happens - while on the log side, an attribute error pops up.
In all other documents, document numbering was not applied.
### Steps to reproduce
1. Go to document
2... | [
{
"content": "import itertools\nimport json\nimport logging\nimport os\nimport re\nimport tempfile\nimport urllib\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 djan... | [
{
"content": "import itertools\nimport json\nimport logging\nimport os\nimport re\nimport tempfile\nimport urllib\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 djan... | diff --git a/src/documents/tests/test_api_documents.py b/src/documents/tests/test_api_documents.py
index 7b81c8df02d..510e2b1b3b4 100644
--- a/src/documents/tests/test_api_documents.py
+++ b/src/documents/tests/test_api_documents.py
@@ -2051,6 +2051,35 @@ def test_next_asn(self):
self.assertEqual(resp.status_c... |
pytorch__vision-8256 | `to_image` does not handle numpy 2D arrays
### 🐛 Describe the bug
[`to_image`](https://github.com/pytorch/vision/blob/806dba678d5b01f6e8a46f7c48fdf8c09369a267/torchvision/transforms/v2/functional/_type_conversion.py#L11) should be able to handle [numpy arrays](https://numpy.org/doc/stable/reference/generated/numpy.... | [
{
"content": "from typing import Union\n\nimport numpy as np\nimport PIL.Image\nimport torch\nfrom torchvision import tv_tensors\nfrom torchvision.transforms import functional as _F\n\n\n@torch.jit.unused\ndef to_image(inpt: Union[torch.Tensor, PIL.Image.Image, np.ndarray]) -> tv_tensors.Image:\n \"\"\"See :... | [
{
"content": "from typing import Union\n\nimport numpy as np\nimport PIL.Image\nimport torch\nfrom torchvision import tv_tensors\nfrom torchvision.transforms import functional as _F\n\n\n@torch.jit.unused\ndef to_image(inpt: Union[torch.Tensor, PIL.Image.Image, np.ndarray]) -> tv_tensors.Image:\n \"\"\"See :... | diff --git a/test/test_transforms_v2.py b/test/test_transforms_v2.py
index b40d04fffdd..458f83f01c3 100644
--- a/test/test_transforms_v2.py
+++ b/test/test_transforms_v2.py
@@ -5182,6 +5182,11 @@ def test_functional_and_transform(self, make_input, fn):
if isinstance(input, torch.Tensor):
assert ou... |
pyca__cryptography-2766 | x509.CertifcateBuilder().sign() fails with "Unknown OpenSSL error' when subject has bad country code
The x509.CertifcateBuilder().sign() function fails with an unknown OpenSSL error when the builder is provided with an invalid country code:
```
Traceback (most recent call last):
File "./demo.py", line 30, in <module... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport six\n\nfrom cryptography import utils\... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport six\n\nfrom cryptography import utils\... | diff --git a/src/cryptography/x509/name.py b/src/cryptography/x509/name.py
index 9d93ece14fd6..d62341d7ceb4 100644
--- a/src/cryptography/x509/name.py
+++ b/src/cryptography/x509/name.py
@@ -7,7 +7,7 @@
import six
from cryptography import utils
-from cryptography.x509.oid import ObjectIdentifier
+from cryptography.... |
oppia__oppia-4172 | KeyError when running GenerateV1StatisticsJob with production data
Stack trace:
```
Traceback (most recent call last): (third_party/gae-mapreduce-1.9.17.0/mapreduce/handlers.py:508)
File "third_party/gae-mapreduce-1.9.17.0/mapreduce/handlers.py", line 494, in handle
tstate.input_reader, shard_state, tstate,... | [
{
"content": "# coding: utf-8\n#\n# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licen... | [
{
"content": "# coding: utf-8\n#\n# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licen... | diff --git a/core/domain/stats_jobs_one_off.py b/core/domain/stats_jobs_one_off.py
index a9f0a8346fdaa..79ff4869affd1 100644
--- a/core/domain/stats_jobs_one_off.py
+++ b/core/domain/stats_jobs_one_off.py
@@ -230,7 +230,9 @@ def reduce(exp_id, stringified_values):
# Some state names in events have sp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.