in_source_id string | before_files list | after_files list | pr_diff string | issue string |
|---|---|---|---|---|
DjangoGirls__djangogirls-153 | [
{
"content": "import csv\nfrom django.shortcuts import render, redirect, get_object_or_404\nfrom django.http import Http404, JsonResponse, HttpResponse\nfrom django.views.decorators.csrf import csrf_exempt\nfrom django.contrib import messages\nfrom django.template.defaultfilters import striptags\n\nfrom core.ut... | [
{
"content": "import csv\nfrom django.shortcuts import render, redirect, get_object_or_404\nfrom django.http import Http404, JsonResponse, HttpResponse\nfrom django.views.decorators.csrf import csrf_exempt\nfrom django.contrib import messages\nfrom django.template.defaultfilters import striptags\n\nfrom core.ut... | diff --git a/applications/views.py b/applications/views.py
index 7b7e4348e..9244cd3cf 100644
--- a/applications/views.py
+++ b/applications/views.py
@@ -24,7 +24,7 @@ def apply(request, city):
)
try:
- form_obj = Form.objects.get(page=page)
+ form_obj = Form.objects.filter(page=page).first... | Error when there is more than one form for a page

|
django-json-api__django-rest-framework-json-api-937 | [
{
"content": "# -*- coding: utf-8 -*-\n\n__title__ = \"djangorestframework-jsonapi\"\n__version__ = \"4.1.0\"\n__author__ = \"\"\n__license__ = \"BSD\"\n__copyright__ = \"\"\n\n# Version synonym\nVERSION = __version__\n",
"path": "rest_framework_json_api/__init__.py"
}
] | [
{
"content": "# -*- coding: utf-8 -*-\n\n__title__ = \"djangorestframework-jsonapi\"\n__version__ = \"4.2.0\"\n__author__ = \"\"\n__license__ = \"BSD\"\n__copyright__ = \"\"\n\n# Version synonym\nVERSION = __version__\n",
"path": "rest_framework_json_api/__init__.py"
}
] | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c62b5383..e7f43647 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Note that in line with [Django REST Framework policy](http://www.django-rest-framework.org/topics/release-notes... | Release needed for Django 3.2 Update
Hello,
I see that there was a change to allow Django 3.2, but no new release has happened. This is preventing us from upgrading, could we get a new version released?
Thank you!
|
django-json-api__django-rest-framework-json-api-383 | [
{
"content": "# -*- coding: utf-8 -*-\n\n__title__ = 'djangorestframework-jsonapi'\n__version__ = '2.2.0'\n__author__ = ''\n__license__ = 'MIT'\n__copyright__ = ''\n\n# Version synonym\nVERSION = __version__\n",
"path": "rest_framework_json_api/__init__.py"
}
] | [
{
"content": "# -*- coding: utf-8 -*-\n\n__title__ = 'djangorestframework-jsonapi'\n__version__ = '2.3.0'\n__author__ = ''\n__license__ = 'MIT'\n__copyright__ = ''\n\n# Version synonym\nVERSION = __version__\n",
"path": "rest_framework_json_api/__init__.py"
}
] | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b1dc4c5e..618ad51f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-v2.3.0
+v2.3.0 - Released November 28, 2017
* Added support for polymorphic models
* When `JSON_API_FORMAT_KEYS` is False (the default) do not translate request
diff --git a/rest_framework... | release 2.3.0?
It's in the changelog but it hasn't been released. Would you mind cutting a release for pypi? In particular the `Added nested included serializer support for remapped relations` is something we need.
|
netket__netket-817 | [
{
"content": "# Copyright 2021 The NetKet 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 2021 The NetKet 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/netket/driver/abstract_variational_driver.py b/netket/driver/abstract_variational_driver.py
index d9b5b2fbc8..9b4b2d0b03 100644
--- a/netket/driver/abstract_variational_driver.py
+++ b/netket/driver/abstract_variational_driver.py
@@ -112,7 +112,7 @@ def reset(self):
count is set to 0.
"""... | AbstractVariationalDriver.py bug in updating step_count

I think this error can be fixed either by writing a setter function for the `@property step_count` in the same way that `@optimizer.setter` exists in... |
spotify__luigi-1372 | [
{
"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/s3.py b/luigi/s3.py
index 61c3ca3ea0..1741724aed 100644
--- a/luigi/s3.py
+++ b/luigi/s3.py
@@ -501,6 +501,7 @@ def __init__(self, path, format=None, client=None):
if format is None:
format = get_default_format()
+ self.path = path
self.format = format
... | Add method to S3Target to get back path
With an `S3Target(path)`, we can load data into S3 at the specified path. It would be useful if we could also get back the path at which the target is pointing to so it can be used in subsequent tasks.
Correct me if I'm wrong, but I couldn't find any way to do this. I can work o... |
vllm-project__vllm-3129 | [
{
"content": "\"\"\"vLLM: a high-throughput and memory-efficient inference engine for LLMs\"\"\"\n\nfrom vllm.engine.arg_utils import AsyncEngineArgs, EngineArgs\nfrom vllm.engine.async_llm_engine import AsyncLLMEngine\nfrom vllm.engine.llm_engine import LLMEngine\nfrom vllm.engine.ray_utils import initialize_c... | [
{
"content": "\"\"\"vLLM: a high-throughput and memory-efficient inference engine for LLMs\"\"\"\n\nfrom vllm.engine.arg_utils import AsyncEngineArgs, EngineArgs\nfrom vllm.engine.async_llm_engine import AsyncLLMEngine\nfrom vllm.engine.llm_engine import LLMEngine\nfrom vllm.engine.ray_utils import initialize_c... | diff --git a/vllm/__init__.py b/vllm/__init__.py
index 7ff92d8cc68..f1e30f5eb6e 100644
--- a/vllm/__init__.py
+++ b/vllm/__init__.py
@@ -8,7 +8,7 @@
from vllm.outputs import CompletionOutput, RequestOutput
from vllm.sampling_params import SamplingParams
-__version__ = "0.3.2"
+__version__ = "0.3.3"
__all__ = [
... | [v0.3.3] Release Tracker
**ETA**: Feb 29th - Mar 1st
## Major changes
* StarCoder2 support
* Performance optimization and LoRA support for Gemma
* Performance optimization for MoE kernel
* 2/3/8-bit GPTQ support
* [Experimental] AWS Inferentia2 support
## PRs to be merged before the release
- [x] #2330 ... |
vllm-project__vllm-2887 | [
{
"content": "\"\"\"vLLM: a high-throughput and memory-efficient inference engine for LLMs\"\"\"\n\nfrom vllm.engine.arg_utils import AsyncEngineArgs, EngineArgs\nfrom vllm.engine.async_llm_engine import AsyncLLMEngine\nfrom vllm.engine.llm_engine import LLMEngine\nfrom vllm.engine.ray_utils import initialize_c... | [
{
"content": "\"\"\"vLLM: a high-throughput and memory-efficient inference engine for LLMs\"\"\"\n\nfrom vllm.engine.arg_utils import AsyncEngineArgs, EngineArgs\nfrom vllm.engine.async_llm_engine import AsyncLLMEngine\nfrom vllm.engine.llm_engine import LLMEngine\nfrom vllm.engine.ray_utils import initialize_c... | diff --git a/vllm/__init__.py b/vllm/__init__.py
index 36d177f5942..e3234c009c1 100644
--- a/vllm/__init__.py
+++ b/vllm/__init__.py
@@ -8,7 +8,7 @@
from vllm.outputs import CompletionOutput, RequestOutput
from vllm.sampling_params import SamplingParams
-__version__ = "0.3.0"
+__version__ = "0.3.1"
__all__ = [
... | [v0.3.1] Release Tracker
**ETA**: Feb 14-16 th
## Major changes
TBD
## PRs to be merged before the release
- [x] #2855
- [x] #2845
- [x] ~~#2514~~
- [x] Ensure memory release when `LLM` class is deleted. #2882
- [x] #2875 #2880
|
Gallopsled__pwntools-1252 | [
{
"content": "\n#!/usr/bin/env python2\n\"\"\"\nPwntools exposes several magic command-line arguments and environment\nvariables when operating in `from pwn import *` mode.\n\nThe arguments extracted from the command-line and removed from ``sys.argv``.\n\nArguments can be set by appending them to the command-li... | [
{
"content": "\n#!/usr/bin/env python2\n\"\"\"\nPwntools exposes several magic command-line arguments and environment\nvariables when operating in `from pwn import *` mode.\n\nThe arguments extracted from the command-line and removed from ``sys.argv``.\n\nArguments can be set by appending them to the command-li... | diff --git a/pwnlib/args.py b/pwnlib/args.py
index 046f97361..37ee01edc 100644
--- a/pwnlib/args.py
+++ b/pwnlib/args.py
@@ -194,7 +194,7 @@ def initialize():
value = 'True'
if '=' in arg:
- arg, value = arg.split('=')
+ arg, value = arg.split('=', 1)
if arg in hooks... | 'from pwn import *' fails when one of the command line args is a Base64 string (or has more than one equal sign)
The argument parsing functionality invoked by `from pwn import *` causes an error when one of the command line arguments has more than one equal sign:
`echo "from pwn import *\nprint('hello world')" > test.... |
arviz-devs__arviz-1192 | [
{
"content": "# pylint: disable=no-member,invalid-name,redefined-outer-name\n\"\"\"ArviZ plotting backends.\"\"\"\nimport re\nimport numpy as np\nfrom pandas import DataFrame\n\nfrom ...rcparams import rcParams\n\n\ndef to_cds(\n data,\n var_names=None,\n groups=None,\n dimensions=None,\n group_i... | [
{
"content": "# pylint: disable=no-member,invalid-name,redefined-outer-name\n\"\"\"ArviZ plotting backends.\"\"\"\nimport re\nimport numpy as np\nfrom pandas import DataFrame\n\nfrom ...rcparams import rcParams\n\n\ndef to_cds(\n data,\n var_names=None,\n groups=None,\n dimensions=None,\n group_i... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 33809b738d..269fa95967 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -36,6 +36,7 @@
* Fixed bug in `plot_posterior` with rcParam "plot.matplotlib.show" = True (#1151)
* Set `fill_last` argument of `plot_kde` to False by default (#1158)
* plot_ppc animation: improve do... | Import fails when run using a Bokeh server
**Description of bug**
The import of `arviz` errors when running with a [Bokeh server](https://docs.bokeh.org/en/latest/docs/user_guide/server.html).
The resulting error is:
```
output_notebook.__doc__ += "\n\n" + _copy_docstring("bokeh.plotting", "output_notebook") Trac... |
AUTOMATIC1111__stable-diffusion-webui-10635 | [
{
"content": "import base64\nimport io\nimport time\nimport datetime\nimport uvicorn\nimport gradio as gr\nfrom threading import Lock\nfrom io import BytesIO\nfrom fastapi import APIRouter, Depends, FastAPI, Request, Response\nfrom fastapi.security import HTTPBasic, HTTPBasicCredentials\nfrom fastapi.exceptions... | [
{
"content": "import base64\nimport io\nimport time\nimport datetime\nimport uvicorn\nimport gradio as gr\nfrom threading import Lock\nfrom io import BytesIO\nfrom fastapi import APIRouter, Depends, FastAPI, Request, Response\nfrom fastapi.security import HTTPBasic, HTTPBasicCredentials\nfrom fastapi.exceptions... | diff --git a/modules/api/api.py b/modules/api/api.py
index 9bb95dfd1a4..bfeec3856ba 100644
--- a/modules/api/api.py
+++ b/modules/api/api.py
@@ -682,4 +682,4 @@ def get_memory(self):
def launch(self, server_name, port):
self.app.include_router(self.router)
- uvicorn.run(self.app, host=server_name... | [Bug]: h11._util.LocalProtocolError: Can't send data when our state is ERROR
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
It very strong that when use webui , it could not see the problem, but when use API, it usuall... |
sunpy__sunpy-2906 | [
{
"content": "#!/usr/bin/env python\n# This file is based havily on the astropy version here:\n# https://github.com/astropy/package-template/blob/master/setup.py\n# Which is licensed under the astropy license, see licenses/ASTROPY.rst.\n\n#########################################################################... | [
{
"content": "#!/usr/bin/env python\n# This file is based havily on the astropy version here:\n# https://github.com/astropy/package-template/blob/master/setup.py\n# Which is licensed under the astropy license, see licenses/ASTROPY.rst.\n\n#########################################################################... | diff --git a/setup.py b/setup.py
index 300e476f017..eb9f8d579f9 100755
--- a/setup.py
+++ b/setup.py
@@ -15,6 +15,9 @@
import builtins # noqa
import itertools
+# Fix for https://github.com/pypa/pip/issues/6163
+sys.path.insert(0, os.path.dirname(__file__))
+
try:
from configparser import ConfigParser
except... | Pip installing sunpy dev fails
With `ci-helpers` I run into this issue for both travis/linux and appveyor:
Please have a look and open a PR in `ci-helpers` with the suggested fix for the case of `SUNPY_VERSION='dev'`
```
+++++python -m pip install git+https://github.com/sunpy/sunpy.git#egg=sunpy --upgrade --no-d... |
django-wiki__django-wiki-762 | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function\n\nimport os\nimport sys\nfrom glob import glob\n\nfrom setuptools import find_packages, setup\n\nsys.path.append(\n os.path.join(os.path.dirname(__file__), 'src')\n)\n\n# noqa\nfrom wiki import __version__ #... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function\n\nimport os\nimport sys\nfrom glob import glob\n\nfrom setuptools import find_packages, setup\n\nsys.path.append(\n os.path.join(os.path.dirname(__file__), 'src')\n)\n\n# noqa\nfrom wiki import __version__ #... | diff --git a/MANIFEST.in b/MANIFEST.in
index 035c89588..e85d373cd 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -5,6 +5,6 @@ include runtests.py
recursive-include src *.html *.txt *.png *.js *.css *.gif *.less *.mo *.po *.otf *.svg *.woff *.woff2 *.eot *.ttf
prune src/wiki/attachments
prune src/wiki/images
-# Exclud... | Installation of 0.2.3 using pip seems to be missing a file
specifically the glyphicons font from bootstrap, located at: `/wiki/static/wiki/bootstrap/fonts/glyphicons-halflings-regular.woff2` within the repository
causes a bug when calling `collectstatic`.. I've verified it by manually downloading the `.whl` archive ... |
facebookresearch__hydra-279 | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nfrom . import utils\nfrom .errors import MissingConfigException\nfrom .main import main\n\n# Source of truth for Hydra's version\n__version__ = \"0.10.0\"\n\n__all__ = [\"__version__\", \"MissingConfigException\", \"main\", \"... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nfrom . import utils\nfrom .errors import MissingConfigException\nfrom .main import main\n\n# Source of truth for Hydra's version\n__version__ = \"0.11.0-pre1\"\n\n__all__ = [\"__version__\", \"MissingConfigException\", \"main\... | diff --git a/hydra/__init__.py b/hydra/__init__.py
index 364596a9cf7..7ab4dde7090 100644
--- a/hydra/__init__.py
+++ b/hydra/__init__.py
@@ -4,6 +4,6 @@
from .main import main
# Source of truth for Hydra's version
-__version__ = "0.10.0"
+__version__ = "0.11.0-pre1"
__all__ = ["__version__", "MissingConfigExcept... | [Bug] Documentation inconsistency for `utils.get_original_cwd`
# 🐛 Bug
The tutorial for working directories has a few commands for setting the working directory [see here](https://cli.dev/docs/tutorial/working_directory), but the version of hydra on pip does not have these functions. Additionally, the install inst... |
Gallopsled__pwntools-1129 | [
{
"content": "from __future__ import absolute_import\n\nimport re\n\nfrom pwnlib.context import context\nfrom pwnlib.util.misc import register_sizes\n\nmips = {\n '$0' : 0, '$zero': 0,\n '$1' : 1, '$at': 1,\n '$2' : 2, '$v0': 2,\n '$3' : 3, '$v1': 3,\n '$4' : 4, '$a0': 4,\n '$5' : 5,... | [
{
"content": "from __future__ import absolute_import\n\nimport re\n\nfrom pwnlib.context import context\nfrom pwnlib.util.misc import register_sizes\n\nmips = {\n '$0' : 0, '$zero': 0,\n '$1' : 1, '$at': 1,\n '$2' : 2, '$v0': 2,\n '$3' : 3, '$v1': 3,\n '$4' : 4, '$a0': 4,\n '$5' : 5,... | diff --git a/pwnlib/shellcraft/registers.py b/pwnlib/shellcraft/registers.py
index c1c7c363e..b184e0518 100644
--- a/pwnlib/shellcraft/registers.py
+++ b/pwnlib/shellcraft/registers.py
@@ -211,7 +211,7 @@ def current():
'arm': arm,
'thumb': arm,
'aarch64': aarch64,
- 'mips': mips,
+ ... | Unable to create a shell shellcraft for MIPS
The problem is as follows:
```py
>>> from pwnlib.shellcraft import mips
>>> mips.sh()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 8, in sh
File "/usr/lib64/python2.7/site-packages/mako/template.py", line 462, in r... |
elastic__apm-agent-python-1149 | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2012, the Sentry Team, see AUTHORS for more details\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c... | diff --git a/elasticapm/conf/__init__.py b/elasticapm/conf/__init__.py
index c670e4050..bbb665206 100644
--- a/elasticapm/conf/__init__.py
+++ b/elasticapm/conf/__init__.py
@@ -647,6 +647,7 @@ class VersionedConfig(ThreadManager):
"transport",
"_update_thread",
"pid",
+ "start_stop_ord... | AttributeError: 'Config' object has no attribute 'start_stop_order'
# Error
We started seeing this traceback via Sentry coming from the elasticapm agent with the Django integration after upgrading from 6.1.3 to 6.2.0:
```
AttributeError: 'Config' object has no attribute 'start_stop_order'
File "elasticapm/instr... |
facebookresearch__xformers-151 | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\n\nimport logging\nfrom enum import Enum\nfrom typing import Optional\n\nimport torch\nimport t... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\n\nimport logging\nfrom enum import Enum\nfrom typing import Optional\n\nimport torch\nimport t... | diff --git a/tests/test_triton_softmax.py b/tests/test_triton_softmax.py
index 34abcc8488..83cea8943d 100644
--- a/tests/test_triton_softmax.py
+++ b/tests/test_triton_softmax.py
@@ -103,3 +103,61 @@ def test_softmax_fp16(dtype):
a = torch.rand(b, s, d, device="cuda", dtype=dtype)
triton_softmax(a)
+
+
+@py... | Follow up on #141 with a proper unit test
# 🐛 Bug
Make sure that #141 cannot happen anymore, add a small unit test to guard parity
Follow up on #141 with a proper unit test
# 🐛 Bug
Make sure that #141 cannot happen anymore, add a small unit test to guard parity
|
pypi__warehouse-7741 | [
{
"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/Makefile b/Makefile
index 773eecb2f7c4..59825039be3f 100644
--- a/Makefile
+++ b/Makefile
@@ -194,6 +194,7 @@ init-po: .state/env/pyvenv.cfg
update-po: .state/env/pyvenv.cfg
$(BINDIR)/pybabel update \
+ --omit-header \
--input-file="warehouse/locale/messages.pot" \
--output-file="warehouse/loca... | Add Russian translation
The Russian Translation is at [100% on Weblate](https://hosted.weblate.org/languages/ru/pypa/) so I think it should be added to the localization footer.
|
getpelican__pelican-905 | [
{
"content": "#!/usr/bin/env python\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport six\n\nimport os\nimport string\nimport argparse\nimport sys\nimport codecs\n\nfrom pelican import __version__\n\n_TEMPLATES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__... | [
{
"content": "#!/usr/bin/env python\n\n# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport six\n\nimport os\nimport string\nimport argparse\nimport sys\nimport codecs\n\nfrom pelican import __version__\n\n_TEMPLATES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__... | diff --git a/pelican/tools/pelican_quickstart.py b/pelican/tools/pelican_quickstart.py
index a60452563..e62bc5cad 100755
--- a/pelican/tools/pelican_quickstart.py
+++ b/pelican/tools/pelican_quickstart.py
@@ -37,8 +37,7 @@ def _input_compat(prompt):
if six.PY3:
r = input(prompt)
else:
- # FIXM... | pelican-quickstart: error with accented characters
Hello,
I've got a problem with pelican-quickstart, when I put accented characters in answers.
Here is the output I got :
> Who will be the author of this web site? Guillaume LAMÉ
> Traceback (most recent call last):
> File "/home/lomig/StaticGen/Pelican/bin/pelic... |
searxng__searxng-299 | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n# lint: pylint\n\"\"\"OpenStreetMap (Map)\n\n\"\"\"\n# pylint: disable=missing-function-docstring\n\nimport re\nfrom json import loads\nfrom urllib.parse import urlencode\nfrom functools import partial\n\nfrom flask_babel import gettext\n\nfrom searx.d... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n# lint: pylint\n\"\"\"OpenStreetMap (Map)\n\n\"\"\"\n# pylint: disable=missing-function-docstring\n\nimport re\nfrom json import loads\nfrom urllib.parse import urlencode\nfrom functools import partial\n\nfrom flask_babel import gettext\n\nfrom searx.d... | diff --git a/searx/engines/openstreetmap.py b/searx/engines/openstreetmap.py
index 6920356c3a8..721769a25e8 100644
--- a/searx/engines/openstreetmap.py
+++ b/searx/engines/openstreetmap.py
@@ -439,3 +439,8 @@ def get_key_label(key_name, lang):
if labels is None:
return None
return get_label(l... | Bug: openstreetmap engine
**Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG**
Repository: https://github.com/searxng/searxng
Branch: master
Version: 1.0.0-728-b57d776e
**How did you install SearXNG?**
`git clone`
**What happened?**
osm engine crash
*... |
googleapis__google-api-python-client-1030 | [
{
"content": "# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unles... | [
{
"content": "# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unles... | diff --git a/setup.py b/setup.py
index 231e9d2ba45..eb069151ee1 100644
--- a/setup.py
+++ b/setup.py
@@ -42,7 +42,7 @@
"google-auth>=1.16.0",
"google-auth-httplib2>=0.0.3",
"google-api-core>=1.21.0,<2dev",
- "six>=1.6.1,<2dev",
+ "six>=1.13.0,<2dev",
"uritemplate>=3.0.0,<4dev",
]
| googleapiclient.discovery.build fails with module 'six.moves' has no attribute 'collections_abc' since version 1.12.0
#### Environment details
- OS type and version: 18.04.1-Ubuntu
- Python version: Python 3.6.9
- pip version: `pip --version` pip 9.0.1
- `google-api-python-client` version: `pip show googl... |
pypi__warehouse-3600 | [
{
"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 a76118b5f594..18025daa798d 100644
--- a/requirements/main.txt
+++ b/requirements/main.txt
@@ -457,9 +457,9 @@ vine==1.1.4 \
webencodings==0.5.1 \
--hash=sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78 \
--hash=sha256:b36... | Set samesite=lax on session cookies
This is a strong defense-in-depth mechanism for protecting against CSRF. It's currently only respected by Chrome, but Firefox will add it as well.
Update webob to 1.8.0
This PR updates [WebOb](https://pypi.org/project/WebOb) from **1.7.4** to **1.8.0**.
<details>
<summary>Chang... |
conda__conda-2472 | [
{
"content": "# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\nfrom __future__ import print_function, division, absolute_import\... | [
{
"content": "# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\nfrom __future__ import print_function, division, absolute_import\... | diff --git a/conda/config.py b/conda/config.py
index 8870864317e..75dbfed7dff 100644
--- a/conda/config.py
+++ b/conda/config.py
@@ -113,7 +113,6 @@ def get_rc_path():
def load_condarc(path):
if not path or not isfile(path):
- print("no path!")
return {}
with open(path) as f:
retur... | When no condarc is found "no path!" is printed
Why was https://github.com/conda/conda/blob/master/conda/config.py#L115 added?
Is this a debug statement which never got removed?
|
urllib3__urllib3-1028 | [
{
"content": "from __future__ import absolute_import\nimport datetime\nimport logging\nimport os\nimport sys\nimport socket\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport warnings\nfrom .packages import six\nfrom .packages.six.moves.http_client import HTTPConnection as _HTTPConnectio... | [
{
"content": "from __future__ import absolute_import\nimport datetime\nimport logging\nimport os\nimport sys\nimport socket\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport warnings\nfrom .packages import six\nfrom .packages.six.moves.http_client import HTTPConnection as _HTTPConnectio... | diff --git a/test/test_connection.py b/test/test_connection.py
index 376c315561..343695bec0 100644
--- a/test/test_connection.py
+++ b/test/test_connection.py
@@ -1,4 +1,9 @@
-import unittest
+import datetime
+import sys
+if sys.version_info >= (2, 7):
+ import unittest
+else:
+ import unittest2 as unittest
im... | Add unit test for RECENT_DATE
I've got a feeling this value could be easily forgotten to be updated over time. Could we perhaps add a unit test that will fail if it gets to be too far away from the current date. It seems like it was last modified in mid 2014 but wasn't updated since then, should this value be updated ... |
conda__conda-build-4062 | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport io\nimport locale\nimport os\nfrom os.path import join, isdir, isfile, abspath, basename, exists, normpath, expanduser\nimport re\nimport shutil\nfrom subprocess import CalledProcessError\nimport sys\nimport time\n\nfrom .c... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport io\nimport locale\nimport os\nfrom os.path import join, isdir, isfile, abspath, basename, exists, normpath, expanduser\nimport re\nimport shutil\nfrom subprocess import CalledProcessError\nimport sys\nimport time\n\nfrom .c... | diff --git a/conda_build/source.py b/conda_build/source.py
index fdd361c779..724b00fa91 100644
--- a/conda_build/source.py
+++ b/conda_build/source.py
@@ -612,7 +612,7 @@ def patch_or_reverse(patch, patch_args, cwd, stdout, stderr):
exception = None
if not isfile(path):
- sys.exit('Error: no such pat... | conda build calls `sys.exit` when downloading the source
<!--
Thanks for opening an issue! A few things to keep in mind:
- This issue tracker is for issues with or enhancements for conda-build.
Anaconda Community Code of Conduct: https://www.anaconda.com/community-code-of-conduct/
For conda issues, you should... |
python-discord__site-758 | [
{
"content": "\"\"\"Converters from Django models to data interchange formats and back.\"\"\"\nfrom django.db.models.query import QuerySet\nfrom django.db.utils import IntegrityError\nfrom rest_framework.exceptions import NotFound\nfrom rest_framework.serializers import (\n IntegerField,\n ListSerializer,... | [
{
"content": "\"\"\"Converters from Django models to data interchange formats and back.\"\"\"\nfrom django.db.models.query import QuerySet\nfrom django.db.utils import IntegrityError\nfrom rest_framework.exceptions import NotFound\nfrom rest_framework.serializers import (\n IntegerField,\n ListSerializer,... | diff --git a/pydis_site/apps/api/serializers.py b/pydis_site/apps/api/serializers.py
index e53ccffae..9228c1f44 100644
--- a/pydis_site/apps/api/serializers.py
+++ b/pydis_site/apps/api/serializers.py
@@ -176,6 +176,7 @@ class Meta:
fields = (
'id',
'inserted_at',
+ 'last_a... | Missing API response for `last_applied` field
The added `last_applied` attribute in #751 currently is not in the API response.
|
OBOFoundry__OBOFoundry.github.io-1378 | [
{
"content": "#!/usr/bin/env python3\n\nimport json\nimport jsonschema\nimport os\nimport re\nimport sys\nimport yaml\n\nfrom argparse import ArgumentParser\n\n\n# Path to JSON schema file:\nSCHEMA_FILE = 'util/schema/registry_schema.json'\n\n# The metadata grid to be generated:\nmetadata_grid = {}\n\n\ndef mai... | [
{
"content": "#!/usr/bin/env python3\n\nimport json\nimport jsonschema\nimport os\nimport re\nimport sys\nimport yaml\n\nfrom argparse import ArgumentParser\n\n\n# Path to JSON schema file:\nSCHEMA_FILE = 'util/schema/registry_schema.json'\n\n# The metadata grid to be generated:\nmetadata_grid = {}\n\n\ndef mai... | diff --git a/_layouts/ontology_detail.html b/_layouts/ontology_detail.html
index 8b62ddcb6..cf74772e6 100644
--- a/_layouts/ontology_detail.html
+++ b/_layouts/ontology_detail.html
@@ -2,10 +2,10 @@
layout: default
---
{% include navbar.html %}
-<div class="content">
+<div class="content">
- <div>
+ <div>... | Implement schema for usages
Issue #1179 asks to add usage information to the ontology detail pages. Before we can do that, we need to standardize that information. #1008 points out that there are different formats in the registry right now. The current schema just allows the `usages` key without any constraint:
http... |
mars-project__mars-126 | [
{
"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/mars/tensor/core.py b/mars/tensor/core.py
index ecbb7d6ff5..234d28f7a6 100644
--- a/mars/tensor/core.py
+++ b/mars/tensor/core.py
@@ -546,6 +546,9 @@ def imag(self, new_imag):
self._data = set_imag(self._data, new_imag).data
+ def __array__(self, dtype=None):
+ return np.asarray(self... | Implement __array__ protocol for Tensor
**Is your feature request related to a problem? Please describe.**
By now, Mars tensor does not implement `__array__` protocol, so if `numpy.asarray` is called, will not get the right result.
**Describe the solution you'd like**
Call `execute` inside `__array__` function... |
ivy-llc__ivy-16291 | [
{
"content": "# local\nimport ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\nfrom ivy.functional.frontends.paddle.tensor.math import tanh as paddle_tanh\n\n\n@with_supported_dtypes({\"2.4.2 and below\": (\"float32\", \"fl... | [
{
"content": "# local\nimport ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\nfrom ivy.functional.frontends.paddle.tensor.math import tanh as paddle_tanh\n\n\n@with_supported_dtypes({\"2.4.2 and below\": (\"float32\", \"fl... | diff --git a/ivy/functional/frontends/paddle/nn/functional/activation.py b/ivy/functional/frontends/paddle/nn/functional/activation.py
index ab27534a50dc5..080f784936d7e 100644
--- a/ivy/functional/frontends/paddle/nn/functional/activation.py
+++ b/ivy/functional/frontends/paddle/nn/functional/activation.py
@@ -191,3 +... | mish
|
paperless-ngx__paperless-ngx-2371 | [
{
"content": "from django.conf import settings\nfrom django.conf.urls import include\nfrom django.contrib import admin\nfrom django.contrib.auth.decorators import login_required\nfrom django.urls import path\nfrom django.urls import re_path\nfrom django.utils.translation import gettext_lazy as _\nfrom django.vi... | [
{
"content": "from django.conf import settings\nfrom django.conf.urls import include\nfrom django.contrib import admin\nfrom django.contrib.auth.decorators import login_required\nfrom django.urls import path\nfrom django.urls import re_path\nfrom django.utils.translation import gettext_lazy as _\nfrom django.vi... | diff --git a/src/paperless/urls.py b/src/paperless/urls.py
index 8e8f4b40490..490be525a99 100644
--- a/src/paperless/urls.py
+++ b/src/paperless/urls.py
@@ -154,7 +154,7 @@
websocket_urlpatterns = [
- re_path(r"ws/status/$", StatusConsumer.as_asgi()),
+ path(settings.BASE_URL.lstrip("/") + "ws/status/", Stat... | [Bug] Websockets do not respect subpath
### Discussed in https://github.com/paperless-ngx/paperless-ngx/discussions/2236
<div type='discussions-op-text'>
<sup>Originally posted by **davidgiga1993** December 21, 2022</sup>
I migrated from paprless-ng to paperless-ngx and the websocket connection isn't working any... |
marshmallow-code__webargs-385 | [
{
"content": "# -*- coding: utf-8 -*-\nimport sys\nimport re\nfrom setuptools import setup, find_packages\n\nINSTALL_REQUIRES = [\"marshmallow>=2.15.2\"]\nif sys.version_info[0] < 3:\n INSTALL_REQUIRES.append(\"simplejson>=2.1.0\")\n\nFRAMEWORKS = [\n \"Flask>=0.12.2\",\n \"Django>=1.11.16\",\n \"bo... | [
{
"content": "# -*- coding: utf-8 -*-\nimport sys\nimport re\nfrom setuptools import setup, find_packages\n\nINSTALL_REQUIRES = [\"marshmallow>=2.15.2\"]\nif sys.version_info[0] < 3:\n INSTALL_REQUIRES.append(\"simplejson>=2.1.0\")\n\nFRAMEWORKS = [\n \"Flask>=0.12.2\",\n \"Django>=1.11.16\",\n \"bo... | diff --git a/setup.py b/setup.py
index 9d144912..f8657281 100644
--- a/setup.py
+++ b/setup.py
@@ -14,7 +14,7 @@
"tornado>=4.5.2",
"pyramid>=1.9.1",
"webapp2>=3.0.0b1",
- "falcon>=1.4.0",
+ "falcon>=1.4.0,<2.0",
'aiohttp>=3.0.0; python_version >= "3.5"',
]
EXTRAS_REQUIRE = {
| Fix compatibility with Falcon 2.0
Tests are currently failing when Falcon 2.0.0 is installed.
|
AnalogJ__lexicon-164 | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import print_function\n\nimport logging\n\nimport namecheap\n\nfrom .base import Provider as BaseProvider\n\nlogger = logging.getLogger(__name__)\n\n\ndef ProviderParser(subparser):\n subparser.add_argument(\n '--auth-token',\n ... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import print_function\n\nimport logging\n\n\nfrom .base import Provider as BaseProvider\n\ntry:\n import namecheap #optional dep\nexcept ImportError:\n pass\n\nlogger = logging.getLogger(__name__)\n\n\ndef ProviderParser(subparser):\n ... | diff --git a/lexicon/providers/namecheap.py b/lexicon/providers/namecheap.py
index 2a9f36ae0..39a7053db 100644
--- a/lexicon/providers/namecheap.py
+++ b/lexicon/providers/namecheap.py
@@ -3,10 +3,14 @@
import logging
-import namecheap
from .base import Provider as BaseProvider
+try:
+ import namecheap #op... | Namecheap support not optional
Unlike route53 or softlayer and unlike what setup.py suggests, the namecheap provider is not optional in 2.1.17.
|
ivy-llc__ivy-19479 | [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.numpy as np_frontend\nfrom ivy.functional.frontends.numpy.func_wrapper import _to_ivy_array\n\n\nclass ndarray:\n def __init__(self, shape, dtype=\"float32\", order=None, _init_overload=False):\n if isinstance(dtype, np_fro... | [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.numpy as np_frontend\nfrom ivy.functional.frontends.numpy.func_wrapper import _to_ivy_array\n\n\nclass ndarray:\n def __init__(self, shape, dtype=\"float32\", order=None, _init_overload=False):\n if isinstance(dtype, np_fro... | diff --git a/ivy/functional/frontends/numpy/ndarray/ndarray.py b/ivy/functional/frontends/numpy/ndarray/ndarray.py
index dae5f288c02ac..9ddceeb8fb3ac 100644
--- a/ivy/functional/frontends/numpy/ndarray/ndarray.py
+++ b/ivy/functional/frontends/numpy/ndarray/ndarray.py
@@ -557,3 +557,6 @@ def ptp(self, *, axis=None, out... | __lshift__
|
facebookresearch__CompilerGym-364 | [
{
"content": "\"\"\"A CompilerGym API and web frontend.\n\nThis exposes an API with five operations:\n\n 1. describe() -> dict (/api/v3/describe)\n\n Describe the CompilerGym interface. This generates a list of action\n names and their numeric values, a list of benchmark datasets and the\n ... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"A CompilerGym API and web frontend.\n\nThis exposes an API with five operations:\n\n 1. describe() -> dict (... | diff --git a/www/frontends/compiler_gym/src/App.test.js b/www/frontends/compiler_gym/src/App.test.js
index 1f03afeec..d4bb58ae1 100644
--- a/www/frontends/compiler_gym/src/App.test.js
+++ b/www/frontends/compiler_gym/src/App.test.js
@@ -1,3 +1,7 @@
+// Copyright (c) Facebook, Inc. and its affiliates.
+//
+// This sourc... | Required license headers missing
## 🐛 Bug
```
https://github.com/facebookresearch/CompilerGym/blob/development/www/demo_api.py:
The first 16 lines of 'www/demo_api.py' do not contain the patterns:
(Facebook, Inc(\.|,)? and its affiliates)|([0-9]{4}-present(\.|,)? Facebook)|([0-9]{4}(\.|,)? Facebook)
Copyright... |
ibis-project__ibis-8929 | [
{
"content": "\"\"\"Risingwave backend.\"\"\"\n\nfrom __future__ import annotations\n\nfrom functools import partial\nfrom itertools import repeat\nfrom operator import itemgetter\nfrom typing import TYPE_CHECKING\n\nimport psycopg2\nimport sqlglot as sg\nimport sqlglot.expressions as sge\nfrom psycopg2 import ... | [
{
"content": "\"\"\"Risingwave backend.\"\"\"\n\nfrom __future__ import annotations\n\nfrom functools import partial\nfrom itertools import repeat\nfrom operator import itemgetter\nfrom typing import TYPE_CHECKING\n\nimport psycopg2\nimport sqlglot as sg\nimport sqlglot.expressions as sge\nfrom psycopg2 import ... | diff --git a/ibis/backends/risingwave/__init__.py b/ibis/backends/risingwave/__init__.py
index badce2233664..6f7d7af8e11b 100644
--- a/ibis/backends/risingwave/__init__.py
+++ b/ibis/backends/risingwave/__init__.py
@@ -119,6 +119,7 @@ def do_connect(
with self.begin() as cur:
cur.execute("SET TI... | bug: RisingWave race condition (?) where table returns before data is loaded
### What happened?
wanted to show off using RisingWave, and first needed to load in some data. separate issue that `to_pyarrow()` doesn't work in place of `to_pandas()` here, but that's also an issue in Postgres
surprisingly though, when t... |
pymodbus-dev__pymodbus-411 | [
{
"content": "#!/usr/bin/env python\n\"\"\"\nInstalls pymodbus using distutils\n\nRun:\n python setup.py install\nto install the package from the source archive.\n\nFor information about setuptools\nhttp://peak.telecommunity.com/DevCenter/setuptools#new-and-changed-setup-keywords\n\"\"\"\n\n# ---------------... | [
{
"content": "#!/usr/bin/env python\n\"\"\"\nInstalls pymodbus using distutils\n\nRun:\n python setup.py install\nto install the package from the source archive.\n\nFor information about setuptools\nhttp://peak.telecommunity.com/DevCenter/setuptools#new-and-changed-setup-keywords\n\"\"\"\n\n# ---------------... | diff --git a/requirements-tests.txt b/requirements-tests.txt
index 510306703..515eba29e 100644
--- a/requirements-tests.txt
+++ b/requirements-tests.txt
@@ -6,7 +6,6 @@ mock >= 1.0.1
pyserial-asyncio==0.4.0;python_version>="3.4"
pep8>=1.7.0
pyasn1>=0.2.3
-pycrypto>=2.6.1
pyserial>=3.4
pytest-cov>=2.5.1
pytest>=3.... | Use pycryptodome instead of pycrypto.
<!--
Please use the Pymodbus gitter channel at https://gitter.im/pymodbus_dev/Lobby or Stack Overflow(tag [pymodbus](https://stackoverflow.com/questions/tagged/pymodbus) for
support questions.
Before opening a new issue, make sure you do the following:
* check that your i... |
psychopy__psychopy-3812 | [
{
"content": "import ast\nimport re\n\nfrom numpy import array\nfrom esprima import parseScript\n\nfrom psychopy.tools import monitorunittools\nfrom psychopy.alerts._alerts import alert\nfrom psychopy.visual.textbox2.fontmanager import FontManager\n\nfontMGR = FontManager()\n\nclass TestWin(object):\n \"\"\"... | [
{
"content": "import ast\nimport re\n\nfrom numpy import array\nfrom esprima import parseScript\n\nfrom psychopy.tools import monitorunittools\nfrom psychopy.alerts._alerts import alert\nfrom psychopy.visual.textbox2.fontmanager import FontManager\n\nfontMGR = FontManager()\n\nclass TestWin(object):\n \"\"\"... | diff --git a/psychopy/alerts/alertsCatalogue/4305.yaml b/psychopy/alerts/alertsCatalogue/4305.yaml
index 0e0398dbab..35413c4a17 100644
--- a/psychopy/alerts/alertsCatalogue/4305.yaml
+++ b/psychopy/alerts/alertsCatalogue/4305.yaml
@@ -1,7 +1,7 @@
code: 4305
cat: Components
-msg: Your component is currently disabled... | Feature request: Report the component name and routine of disabled components in Alert 4305
PsychoPy reports [an alert](https://psychopy.org/alerts/4305.html) when a component in the experiment is disabled. However, this alert doesn't tell you what component is disabled. It can be quite difficult to find the disabled c... |
cython__cython-4942 | [
{
"content": "from cython.cimports import cqueue\n\n@cython.cclass\nclass Queue:\n _c_queue = cython.declare(cython.pointer(cqueue.Queue))\n\n def __cinit__(self):\n self._c_queue = cqueue.queue_new()\n",
"path": "docs/examples/tutorial/clibraries/queue.py"
}
] | [
{
"content": "from cython.cimports import cqueue\n\n@cython.cclass\nclass Queue:\n _c_queue: cython.pointer(cqueue.Queue)\n\n def __cinit__(self):\n self._c_queue = cqueue.queue_new()\n",
"path": "docs/examples/tutorial/clibraries/queue.py"
}
] | diff --git a/docs/examples/tutorial/clibraries/queue.py b/docs/examples/tutorial/clibraries/queue.py
index 45529fa9480..e99b9b32c32 100644
--- a/docs/examples/tutorial/clibraries/queue.py
+++ b/docs/examples/tutorial/clibraries/queue.py
@@ -2,7 +2,7 @@
@cython.cclass
class Queue:
- _c_queue = cython.declare(cyth... | [BUG] Annotated attributes of cclass are not supporting pointers
<!--
**PLEASE READ THIS FIRST:**
- Do not use the bug and feature tracker for support requests. Use the `cython-users` mailing list instead.
- Did you search for similar issues already? Please do, it helps to save us precious time that we otherwise cou... |
kornia__kornia-1861 | [
{
"content": "import torch\n\nfrom kornia.testing import KORNIA_CHECK_IS_COLOR, KORNIA_CHECK_IS_TENSOR\n\n\ndef shift_rgb(image: torch.Tensor, r_shift: torch.Tensor, g_shift: torch.Tensor, b_shift: torch.Tensor) -> torch.Tensor:\n \"\"\"Shift rgb channels.\n\n Shift each image's channel by either r_shift ... | [
{
"content": "import torch\n\nfrom kornia.testing import KORNIA_CHECK_IS_COLOR, KORNIA_CHECK_IS_TENSOR\n\n\ndef shift_rgb(image: torch.Tensor, r_shift: torch.Tensor, g_shift: torch.Tensor, b_shift: torch.Tensor) -> torch.Tensor:\n \"\"\"Shift rgb channels.\n\n Shift each image's channel by either r_shift ... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 12cf1c0ba5..faa9fe9e84 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -63,7 +63,7 @@ repos:
- "B101,B311"
- repo: https://github.com/myint/docformatter
- rev: v1.5.0-rc1
+ rev: v1.5.0
hooks:
- i... | Bugs when using RandomRGBShift
### Describe the bug
When running RandomRGBShift augmentation on gpus I came across this error
```
File "/usr/local/lib/python3.8/dist-packages/kornia/augmentation/_2d/intensity/random_rgb_shift.py", line 100, in apply_transform
return shift_rgb(inp, params['r_shift'], para... |
mkdocs__mkdocs-1329 | [
{
"content": "# coding: utf-8\n\n\"\"\"\nDeals with generating the per-page table of contents.\n\nFor the sake of simplicity we use an existing markdown extension to generate\nan HTML table of contents, and then parse that into the underlying data.\n\nThe steps we take to generate a table of contents are:\n\n* ... | [
{
"content": "# coding: utf-8\n\n\"\"\"\nDeals with generating the per-page table of contents.\n\nFor the sake of simplicity we use an existing markdown extension to generate\nan HTML table of contents, and then parse that into the underlying data.\n\nThe steps we take to generate a table of contents are:\n\n* ... | diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md
index 504f0d1327..22e2d90054 100644
--- a/docs/about/release-notes.md
+++ b/docs/about/release-notes.md
@@ -23,6 +23,7 @@ The current and past members of the MkDocs team.
## Development Version
+* Bugfix: Add length support to `mkdocs.toc.Table... | Provide length of TableOfContents
Currently, you can only iter over `TableOfContents`. I would like to know the length of it.
|
ManimCommunity__manim-1296 | [
{
"content": "\"\"\"Utilities for processing LaTeX templates.\"\"\"\n\n__all__ = [\n \"TexTemplate\",\n \"TexTemplateFromFile\",\n]\n\nimport copy\nimport re\n\n\nclass TexTemplate:\n \"\"\"TeX templates are used for creating Tex() and MathTex() objects.\n\n Parameters\n ----------\n tex_compi... | [
{
"content": "\"\"\"Utilities for processing LaTeX templates.\"\"\"\n\n__all__ = [\n \"TexTemplate\",\n \"TexTemplateFromFile\",\n]\n\nimport copy\nimport re\n\n\nclass TexTemplate:\n \"\"\"TeX templates are used for creating Tex() and MathTex() objects.\n\n Parameters\n ----------\n tex_compi... | diff --git a/manim/utils/tex.py b/manim/utils/tex.py
index 8ab08a56a0..532d6af3b3 100644
--- a/manim/utils/tex.py
+++ b/manim/utils/tex.py
@@ -48,6 +48,7 @@ class TexTemplate:
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
+\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{ams... | Nondeterministic build failures in `Tex('The horse does not eat cucumber salad.')`
## Description of bug / unexpected behavior
<!-- Add a clear and concise description of the problem you encountered. -->
As I've been figuring out the test coverage toolset for Manim, I've done quite a lot of automated builds on a co... |
holoviz__panel-4047 | [
{
"content": "#!/usr/bin/env python\nimport json\nimport os\nimport shutil\nimport sys\n\nimport pyct.build\n\nfrom setuptools import find_packages, setup\nfrom setuptools.command.develop import develop\nfrom setuptools.command.install import install\nfrom setuptools.command.sdist import sdist\n\nPANEL_LITE_BUI... | [
{
"content": "#!/usr/bin/env python\nimport json\nimport os\nimport shutil\nimport sys\n\nimport pyct.build\n\nfrom setuptools import find_packages, setup\nfrom setuptools.command.develop import develop\nfrom setuptools.command.install import install\nfrom setuptools.command.sdist import sdist\n\nPANEL_LITE_BUI... | diff --git a/.gitignore b/.gitignore
index 37794ba72f..d176cfd4f9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -126,3 +126,8 @@ discover/
node_modules/*
/tmp
.devcontainer/*
+pyodide/
+script.*
+doc/_build/*
+doc/gallery/*
+doc/reference/*
diff --git a/examples/assets/VideoStreamInterface.jpg b/examples/assets/VideoS... | Make it easy and useful to use the VideoStream
I've never seen any showcases of the `VideoStream` in Panel. As Panel can update relatively quickly via Tornado and websockets it should be the best data app framework for Video. And with `panel convert` even better.
But there are lot of issues
- There are no inspira... |
pydantic__pydantic-2170 | [
{
"content": "import re\nimport warnings\nfrom datetime import date, datetime, time, timedelta\nfrom decimal import Decimal\nfrom enum import Enum\nfrom ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network\nfrom pathlib import Path\nfrom typing import (\n TYPE_CHE... | [
{
"content": "import re\nimport warnings\nfrom datetime import date, datetime, time, timedelta\nfrom decimal import Decimal\nfrom enum import Enum\nfrom ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network\nfrom pathlib import Path\nfrom typing import (\n TYPE_CHE... | diff --git a/changes/1912-JSextonn.md b/changes/1912-JSextonn.md
new file mode 100644
index 00000000000..5225db4ba25
--- /dev/null
+++ b/changes/1912-JSextonn.md
@@ -0,0 +1 @@
+Fixed issue causing KeyError to be raised when building schema from multiple `BaseModel` with the same names declared in separate classes.
\ No... | KeyError when having same Inner Class name in different Outer Class
### Checks
* [x] I added a descriptive title to this issue
* [x] I have searched (google, github) for similar issues and couldn't find anything
* [x] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think this is... |
talonhub__community-978 | [
{
"content": "from talon import Context, Module, actions, app\n\ndefault_alphabet = \"air bat cap drum each fine gust harp sit jury crunch look made near odd pit quench red sun trap urge vest whale plex yank zip\".split(\n \" \"\n)\nletters_string = \"abcdefghijklmnopqrstuvwxyz\"\n\ndefault_digits = \"zero o... | [
{
"content": "from talon import Context, Module, actions, app\n\ndefault_alphabet = \"air bat cap drum each fine gust harp sit jury crunch look made near odd pit quench red sun trap urge vest whale plex yank zip\".split(\n \" \"\n)\nletters_string = \"abcdefghijklmnopqrstuvwxyz\"\n\ndefault_digits = \"zero o... | diff --git a/code/keys.py b/code/keys.py
index 5be25dd4e3..00654a2f2c 100644
--- a/code/keys.py
+++ b/code/keys.py
@@ -132,6 +132,8 @@ def letters(m) -> str:
"back tick": "`",
"grave": "`",
"comma": ",",
+ # Workaround for issue with conformer b-series; see #946
+ "coma": ",",
"period": ".",
... | please map both comma and coma to , for now in keys.py
coma being recognized instead of comma comes up a lot for conformer b-series
I think for now we should bind both comma and coma as , in keys.py
and revisit if a future model sorts out the difference better
|
PaddlePaddle__models-2832 | [
{
"content": "\"\"\"Trainer for ICNet model.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom icnet import icnet\nimport cityscape\nimport argparse\nimport functools\nimport sys\nimport os\nimport time\nimport paddle.fluid as fluid\nimpo... | [
{
"content": "\"\"\"Trainer for ICNet model.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom icnet import icnet\nimport cityscape\nimport argparse\nimport functools\nimport sys\nimport os\nimport time\nimport paddle.fluid as fluid\nimpo... | diff --git a/PaddleCV/icnet/README.md b/PaddleCV/icnet/README.md
index 4698a41c89..4858cae779 100644
--- a/PaddleCV/icnet/README.md
+++ b/PaddleCV/icnet/README.md
@@ -66,7 +66,7 @@ Iter[0]; train loss: 2.338; sub4_loss: 3.367; sub24_loss: 4.120; sub124_loss: 0.
### 测试
执行以下命令在`Cityscape`测试数据集上进行测试:
```
-python eval.p... | icnet 存在的几个问题
[icnet](https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/icnet)里存在诸多问题:
1.文档有误,--model_path="./cnkpnt/100"应该是--model_path="./chkpnt/100"
2.训练时没有输出中间过程信息,仅在最后输出几个loss信息
3.文档中给的预训练模型无法用于infer,能提供下训好的cnkpnt/100模型吗?
|
googleapis__google-cloud-python-3745 | [
{
"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/core/setup.py b/core/setup.py
index 5cc4a9c8141b..f697e385494b 100644
--- a/core/setup.py
+++ b/core/setup.py
@@ -55,6 +55,7 @@
'protobuf >= 3.0.0',
'google-auth >= 0.4.0, < 2.0.0dev',
'requests >= 2.4.0, < 3.0.0dev',
+ 'setuptools >= 34.0.0',
'six',
'tenacity >= 4.0.0, <5.0.0de... | Explicitly depend on setuptools
Context: #3295
We should explicitly depend on a minimum version of setuptools to get around problems installing our packages if setuptools is too old.
|
dotkom__onlineweb4-1699 | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom collections import OrderedDict\nfrom datetime import datetime, timedelta\nfrom functools import reduce\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import Group\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core imp... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom collections import OrderedDict\nfrom datetime import datetime, timedelta\nfrom functools import reduce\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import Group\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core imp... | diff --git a/apps/events/models.py b/apps/events/models.py
index 70df70339..45e0b1c47 100644
--- a/apps/events/models.py
+++ b/apps/events/models.py
@@ -449,7 +449,7 @@ def reservees_qs(self):
@property
def attendees_not_paid(self):
- return [a for a in self.attendees_qs if a.paid]
+ return li... | attendees_not_paid property is plain wrong
It returns all attendees who have paid instead. It is only used for sending out emails afaik.
https://github.com/dotKom/onlineweb4/blob/2347446f5bb66d202b7adecc9433a8e26fe3b0b4/apps/events/models.py#L450
IMO it should be something like `return list(self.attendees.filter(paid... |
sonic-net__sonic-utilities-1117 | [
{
"content": "#!/usr/bin/env python\n#\n# lib.py\n#\n# Helper code for CLI for interacting with switches via console device\n#\n\ntry:\n import click\n import re\n import subprocess\n import sys\nexcept ImportError as e:\n raise ImportError(\"%s - required module not found\" % str(e))\n\nDEVICE_P... | [
{
"content": "#!/usr/bin/env python\n#\n# lib.py\n#\n# Helper code for CLI for interacting with switches via console device\n#\n\ntry:\n import click\n import re\n import subprocess\n import sys\n from swsssdk import ConfigDBConnector\nexcept ImportError as e:\n raise ImportError(\"%s - requir... | diff --git a/consutil/lib.py b/consutil/lib.py
index 0ffa88691d..6dbef913b8 100644
--- a/consutil/lib.py
+++ b/consutil/lib.py
@@ -10,6 +10,7 @@
import re
import subprocess
import sys
+ from swsssdk import ConfigDBConnector
except ImportError as e:
raise ImportError("%s - required module not fou... | [consutil] show/connect command failed due to global name 'ConfigDBConnector' is not defined
<!--
If you are reporting a new issue, make sure that we do not have any duplicates
already open. You can ensure this by searching the issue list for this
repository. If there is a duplicate, please close your issue and add ... |
pypa__cibuildwheel-1065 | [
{
"content": "from setuptools import setup\n\nextras = {\n \"docs\": [\n \"mkdocs-include-markdown-plugin==2.8.0\",\n \"mkdocs==1.0.4\",\n \"pymdown-extensions\",\n \"mkdocs-macros-plugin\",\n ],\n \"test\": [\n \"jinja2\",\n \"pytest>=6\",\n \"pytest-ti... | [
{
"content": "from setuptools import setup\n\nextras = {\n \"docs\": [\n \"mkdocs-include-markdown-plugin==2.8.0\",\n \"mkdocs==1.0.4\",\n \"jinja2==3.0.3\",\n \"pymdown-extensions\",\n \"mkdocs-macros-plugin\",\n ],\n \"test\": [\n \"jinja2\",\n \"pytes... | diff --git a/docs/options.md b/docs/options.md
index 45f67873a..c9d7b7425 100644
--- a/docs/options.md
+++ b/docs/options.md
@@ -402,7 +402,7 @@ This option can also be set using the [command-line option](#command-line)
> Manually set the Python compatibility of your project
By default, cibuildwheel reads your pack... | [Docs] Example may accidentally be encouraging users to write invalid `pyproject.toml` files
### Description
Hi guys, first of all thank you for the amazing project (always good to remember).
While I was working on adding support for PEP 621 to setuptools, I noticed a series of users having problems with invalid ... |
cupy__cupy-6208 | [
{
"content": "import numpy\n\nimport cupy\nfrom cupy._core.internal import _get_strides_for_order_K, _update_order_char\n\n\ndef empty(shape, dtype=float, order='C'):\n \"\"\"Returns an array without initializing the elements.\n\n Args:\n shape (int or tuple of ints): Dimensionalities of the array.... | [
{
"content": "import numpy\n\nimport cupy\nfrom cupy._core.internal import _get_strides_for_order_K, _update_order_char\n\n\ndef empty(shape, dtype=float, order='C'):\n \"\"\"Returns an array without initializing the elements.\n\n Args:\n shape (int or tuple of ints): Dimensionalities of the array.... | diff --git a/cupy/_creation/basic.py b/cupy/_creation/basic.py
index e8095b2fa15..a5ad91cff22 100644
--- a/cupy/_creation/basic.py
+++ b/cupy/_creation/basic.py
@@ -110,7 +110,9 @@ def eye(N, M=None, k=0, dtype=float, order='C'):
"""
if M is None:
M = N
- ret = zeros((N, M), dtype, order=order)
+ ... | Edge cases of compatibility in `numpy.eye()`
These are discovered when running hypothesis-based Array API tests. For now I am just documenting these discoveries. I do not know if they are something we'd like to fix -- I'd need more time to look into them.
Case 1:
```python
>>> np.eye(0, k=9223372036854775808, dty... |
inventree__InvenTree-1544 | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom shutil import copyfile\nimport os\nimport json\nimport sys\n\ntry:\n from invoke import ctask as task\nexcept:\n from invoke import task\n\n\ndef apps():\n \"\"\"\n Returns a list of installed apps\n \"\"\"\n\n return [\n 'barcode',\n ... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom shutil import copyfile\nimport os\nimport json\nimport sys\n\ntry:\n from invoke import ctask as task\nexcept:\n from invoke import task\n\n\ndef apps():\n \"\"\"\n Returns a list of installed apps\n \"\"\"\n\n return [\n 'barcode',\n ... | diff --git a/tasks.py b/tasks.py
index 3065d9724375..6eed4c488ed6 100644
--- a/tasks.py
+++ b/tasks.py
@@ -65,7 +65,7 @@ def manage(c, cmd, pty=False):
cmd - django command to run
"""
- c.run('cd {path} && python3 manage.py {cmd}'.format(
+ c.run('cd "{path}" && python3 manage.py {cmd}'.format(
... | [BUG] invoke: too many arguments
When running any invoke-command in an WSL-Enviroment I get the following error:
`/bin/bash: line 0: cd: too many arguments`
|
Pycord-Development__pycord-1381 | [
{
"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without li... | [
{
"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without li... | diff --git a/discord/scheduled_events.py b/discord/scheduled_events.py
index 52e168741d..95d2d75cc8 100644
--- a/discord/scheduled_events.py
+++ b/discord/scheduled_events.py
@@ -255,7 +255,7 @@ def cover(self) -> Optional[Asset]:
return Asset._from_scheduled_event_cover(
self._state,
... | `ScheduledEvent` object has not attribute `_image`
### Summary
Title explains it
### Reproduction Steps
i used jishaku `jsk py _ctx.guild.scheduled_events[0].cover`
### Minimal Reproducible Code
_No response_
### Expected Results
I was expecting it to return assets
### Actual Results
it returned an error say... |
flask-admin__flask-admin-1408 | [
{
"content": "# Create dummy secrey key so we can use sessions\nSECRET_KEY = '123456790'\n\n# database connection\nSQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://flask_admin_geo:flask_admin_geo@localhost/flask_admin_geo'\nSQLALCHEMY_ECHO = True\n\n# credentials for loading map tiles from mapbox\nMAPBOX_MAP_ID... | [
{
"content": "# Create dummy secrey key so we can use sessions\nSECRET_KEY = '123456790'\n\n# database connection\nSQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://flask_admin_geo:flask_admin_geo@localhost/flask_admin_geo'\nSQLALCHEMY_ECHO = True\n\n# credentials for loading map tiles from mapbox\nMAPBOX_MAP_ID... | diff --git a/README.rst b/README.rst
index 447efe502..41bfc33aa 100644
--- a/README.rst
+++ b/README.rst
@@ -91,7 +91,11 @@ You should see output similar to::
For all the tests to pass successfully, you'll need Postgres & MongoDB to be running locally. For Postgres::
+ > psql postgres
CREATE DATABASE flask... | Leaflet JS Errors on examples.flask-admin.org
To reproduce, go here: http://examples.flask-admin.org/geo/admin/multipoint/edit/?url=%2Fgeo%2Fadmin%2Fmultipoint%2F&id=1
and click the "edit layers" icon (above the delete trashcan).
```
Uncaught TypeError: Cannot set property 'previousOptions' of undefined
```
Is this ... |
feast-dev__feast-3280 | [
{
"content": "# Copyright 2019 The Feast 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | [
{
"content": "# Copyright 2019 The Feast 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | diff --git a/setup.py b/setup.py
index 2b09bcbe946..fbd3cf5368f 100644
--- a/setup.py
+++ b/setup.py
@@ -43,7 +43,7 @@
DESCRIPTION = "Python SDK for Feast"
URL = "https://github.com/feast-dev/feast"
AUTHOR = "Feast"
-REQUIRES_PYTHON = ">=3.7.0"
+REQUIRES_PYTHON = ">=3.8.0"
REQUIRED = [
"click>=7.0.0,<9.0.0",... | Minimal Python version on PyPI seems to be too low
## Expected Behavior
From what I can understand, the minimal version of Python to run Feast is 3.8; that's what I would expect on the PyPI page.
## Current Behavior
`Requires: Python >=3.7.0`
## Steps to reproduce
https://pypi.org/project/feast/
|
pytorch__TensorRT-376 | [
{
"content": "from typing import List, Dict, Any\nimport torch\nfrom torch import nn\n\nimport trtorch._C\nfrom trtorch._compile_spec import _parse_compile_spec\nfrom trtorch._version import __version__\nfrom types import FunctionType\n\n\ndef compile(module: torch.jit.ScriptModule, compile_spec: Any) -> torch.... | [
{
"content": "from typing import List, Dict, Any\nimport torch\nfrom torch import nn\n\nimport trtorch._C\nfrom trtorch._compile_spec import _parse_compile_spec\nfrom trtorch._version import __version__\nfrom types import FunctionType\n\n\ndef compile(module: torch.jit.ScriptModule, compile_spec: Any) -> torch.... | diff --git a/core/conversion/conversionctx/ConversionCtx.cpp b/core/conversion/conversionctx/ConversionCtx.cpp
index 9d47026c60..04f6aafe5c 100644
--- a/core/conversion/conversionctx/ConversionCtx.cpp
+++ b/core/conversion/conversionctx/ConversionCtx.cpp
@@ -148,7 +148,9 @@ std::string ConversionCtx::SerializeEngine() ... | 🐛 [Bug] Memory leak in ConversionCtx::SerializeEngine()
## Bug Description
Using `trtorch::CompileGraph` many times will increase memory usage.
## To Reproduce
[Source code](https://github.com/SakodaShintaro/trtorch-test/blob/7e9f7a457b3570b40e5aa938ac400aaf5e0028ba/main.cpp)
```cpp
#include <torch/script.h>... |
cookiecutter__cookiecutter-1562 | [
{
"content": "#!/usr/bin/env python\n\"\"\"cookiecutter distutils configuration.\"\"\"\nfrom setuptools import setup\n\nversion = \"2.0.0\"\n\nwith open('README.md', encoding='utf-8') as readme_file:\n readme = readme_file.read()\n\nrequirements = [\n 'binaryornot>=0.4.4',\n 'Jinja2>=2.7,<4.0.0',\n ... | [
{
"content": "#!/usr/bin/env python\n\"\"\"cookiecutter distutils configuration.\"\"\"\nfrom setuptools import setup\n\nversion = \"2.0.0\"\n\nwith open('README.md', encoding='utf-8') as readme_file:\n readme = readme_file.read()\n\nrequirements = [\n 'binaryornot>=0.4.4',\n 'Jinja2>=2.7,<4.0.0',\n ... | diff --git a/setup.py b/setup.py
index 124dc40c9..654010fa0 100644
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@
requirements = [
'binaryornot>=0.4.4',
'Jinja2>=2.7,<4.0.0',
- 'click>=7.0',
+ 'click>=7.0,<8.0.0',
'pyyaml>=5.3.1',
'jinja2-time>=0.2.0',
'python-slugify>=4.0.0',
diff --gi... | prompt.read_user_dict() is broken due to click upgrade from 7.1.2 to 8.0.0
* Cookiecutter version: 1.7.3
* Template project url: -
* Python version: 3.9.5
* Operating System: macOS Catalina 10.15.7
### Description:
Apparently, there is a breaking change in `click==8.0.0` affecting dictionary values in cookiecu... |
OpenEnergyPlatform__oeplatform-605 | [
{
"content": "from django.conf.urls import url\nfrom django.conf.urls.static import static\nfrom django.views.generic import TemplateView\n\nfrom modelview import views\nfrom oeplatform import settings\n\nurlpatterns = [\n url(r\"^$\", TemplateView.as_view(template_name=\"ontology/about.html\")),\n]\n",
... | [
{
"content": "from django.conf.urls import url\nfrom django.conf.urls.static import static\nfrom django.views.generic import TemplateView\n\nfrom modelview import views\nfrom oeplatform import settings\n\nurlpatterns = [\n url(r\"^$\", TemplateView.as_view(template_name=\"ontology/about.html\")),\n url(r\... | diff --git a/ontology/templates/ontology/about.html b/ontology/templates/ontology/about.html
index 8b4d99b67..b621807f0 100644
--- a/ontology/templates/ontology/about.html
+++ b/ontology/templates/ontology/about.html
@@ -53,6 +53,6 @@ <h3 id="where-and-how-can-i-contribute">Where and how can I contribute?</h3>
<p>The ... | Add OEO Steering Committee Subpage
The OEO Steering Committee needs its own web page, which should be a sub page of the OEP. Please create such a sub page @jh-RLI . I think it makes sense to link it somewhere under ontology.
https://openenergy-platform.org/ontology/
The URL would then be
https://openenergy-pl... |
cocotb__cocotb-797 | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# cocotb documentation build configuration file, created by\n# sphinx-quickstart on Wed Jun 19 14:44:09 2013.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# cocotb documentation build configuration file, created by\n# sphinx-quickstart on Wed Jun 19 14:44:09 2013.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n... | diff --git a/documentation/requirements.txt b/documentation/requirements.txt
index 8208293ef9..26374d457e 100644
--- a/documentation/requirements.txt
+++ b/documentation/requirements.txt
@@ -2,3 +2,4 @@
Sphinx>=1.6
sphinx-rtd-theme
cairosvg
+sphinxcontrib-trio
diff --git a/documentation/source/conf.py b/documentatio... | Use sphinxcontrib-trio to document coroutines
It looks like https://sphinxcontrib-trio.readthedocs.io/ could help autodoc'ing our coroutines nicer.
|
google__jax-1807 | [
{
"content": "#!/usr/bin/python\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unles... | [
{
"content": "#!/usr/bin/python\n#\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unles... | diff --git a/build/build.py b/build/build.py
index 414135a6a825..64965ee21b47 100755
--- a/build/build.py
+++ b/build/build.py
@@ -176,6 +176,7 @@ def check_bazel_version(bazel_path, min_version, max_version):
# Sets the default Apple platform to macOS.
build --apple_platform_type=macos
+build --macos_minimum_os=10... | ImportError: ..... ____chkstk_darwin
Hi folks,
Wondering if someone can please help with this import error on a fresh install.
Background: Recently started a new conda environment with a couple of basics like jupyter, numpy, scipy. I'm using MacOS High Sierra 10.13.4, and python3.7
The specific error is:
```
... |
cltk__cltk-575 | [
{
"content": "\"\"\"Config for PyPI.\"\"\"\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n\nsetup(\n author='Kyle P. Johnson',\n author_email='kyle@kyle-p-johnson.com',\n classifiers=[\n 'Intended Audience :: Education',\n 'Intended Audience :: Science/Research',... | [
{
"content": "\"\"\"Config for PyPI.\"\"\"\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n\nsetup(\n author='Kyle P. Johnson',\n author_email='kyle@kyle-p-johnson.com',\n classifiers=[\n 'Intended Audience :: Education',\n 'Intended Audience :: Science/Research',... | diff --git a/docs/french.rst b/docs/french.rst
index 00d02f29f..27d84b0dc 100644
--- a/docs/french.rst
+++ b/docs/french.rst
@@ -11,9 +11,9 @@ The lemmatizer takes as its input a list of tokens, previously tokenized and mad
.. It first seeks a match between each token and a list of potential lemmas taken from Godefroy... | Double-check code and data for new French PR
This issue is for @nat1881 to follow up on her large PR #571 for Old and Middle French.
Natasha, I would like you to do the following steps, to be certain that the code works as you intended:
* Start a brand new clone of (this) cltk repo.
* Make a new virtual env
* M... |
sopel-irc__sopel-949 | [
{
"content": "# coding=utf-8\n\"\"\"\nwikipedia.py - Sopel Wikipedia Module\nCopyright 2013 Edward Powell - embolalia.net\nLicensed under the Eiffel Forum License 2.\n\nhttp://sopel.chat\n\"\"\"\nfrom __future__ import unicode_literals, absolute_import, print_function, division\nfrom sopel import web, tools\nfr... | [
{
"content": "# coding=utf-8\n\"\"\"\nwikipedia.py - Sopel Wikipedia Module\nCopyright 2013 Edward Powell - embolalia.net\nLicensed under the Eiffel Forum License 2.\n\nhttp://sopel.chat\n\"\"\"\nfrom __future__ import unicode_literals, absolute_import, print_function, division\nfrom sopel import web, tools\nfr... | diff --git a/sopel/modules/wikipedia.py b/sopel/modules/wikipedia.py
index 064fca79e0..d19e8ac79b 100644
--- a/sopel/modules/wikipedia.py
+++ b/sopel/modules/wikipedia.py
@@ -15,7 +15,8 @@
import sys
if sys.version_info.major < 3:
- from urlparse import unquote
+ from urlparse import unquote as _unquote
+ ... | Problem in (at least) Wikipedia module: possibly Unicode related
Hi,
observe the following use case:
https://en.wikipedia.org/wiki/Hir%C5%8D_Onoda
@willie_5.4.1 KeyError: u'extract' (file "/usr/local/lib/python2.7/dist-packages/willie-5.4.1-py2.7.egg/willie/modules/wikipedia.py", line 89, in mw_snippet)
|
scrapy__scrapy-5754 | [
{
"content": "import logging\nimport sys\nimport warnings\nfrom logging.config import dictConfig\n\nfrom twisted.python import log as twisted_log\nfrom twisted.python.failure import Failure\n\nimport scrapy\nfrom scrapy.exceptions import ScrapyDeprecationWarning\nfrom scrapy.settings import Settings\nfrom scrap... | [
{
"content": "import logging\nimport sys\nimport warnings\nfrom logging.config import dictConfig\n\nfrom twisted.python import log as twisted_log\nfrom twisted.python.failure import Failure\n\nimport scrapy\nfrom scrapy.exceptions import ScrapyDeprecationWarning\nfrom scrapy.settings import Settings\nfrom scrap... | diff --git a/scrapy/utils/log.py b/scrapy/utils/log.py
index 78e302d1956..c8b4936ac20 100644
--- a/scrapy/utils/log.py
+++ b/scrapy/utils/log.py
@@ -46,6 +46,9 @@ def filter(self, record):
'version': 1,
'disable_existing_loggers': False,
'loggers': {
+ 'filelock': {
+ 'level': 'ERROR',
... | Silence the `filelock` logger
After we started using `tldextract` we sometimes get log messages from `filelock` with the DEBUG level, it makes sense to silence them like we do for some other libraries in https://github.com/scrapy/scrapy/blob/fe60c1224e39aa3d85b20afd54566f135d9de085/scrapy/utils/log.py#L45-L59
|
sopel-irc__sopel-493 | [
{
"content": "#coding: utf8\n\"\"\"\nChannel logger\n\"\"\"\nfrom __future__ import unicode_literals\nimport os\nimport os.path\nimport threading\nfrom datetime import datetime\nimport willie.module\nimport willie.tools\nfrom willie.config import ConfigurationError\n\nMESSAGE_TPL = \"{datetime} <{origin.nick}>... | [
{
"content": "# coding=utf-8\n\"\"\"\nchanlogs.py - Willie Channel Logger module\nCopyright 2014, David Baumgold <david@davidbaumgold.com>\n\nLicensed under the Eiffel Forum License 2\n\nhttp://willie.dftba.net\n\"\"\"\nfrom __future__ import unicode_literals\nimport os\nimport os.path\nimport threading\nfrom d... | diff --git a/willie/modules/chanlogs.py b/willie/modules/chanlogs.py
index e4455ac725..44cabddc91 100644
--- a/willie/modules/chanlogs.py
+++ b/willie/modules/chanlogs.py
@@ -1,6 +1,11 @@
-#coding: utf8
+# coding=utf-8
"""
-Channel logger
+chanlogs.py - Willie Channel Logger module
+Copyright 2014, David Baumgold <dav... | [chanlogs] Missing copyright header
@singingwolfboy could you add the copyright header to comply with the [EFL](https://github.com/embolalia/willie/blob/master/COPYING)? Below is the required lay-out:
```
# coding=utf-8
"""
chanlogs.py - Willie Channel Logger Module
Copyright 2014, FIRSTNAME LASTNAME <EMAIL>
Licensed... |
pypi__warehouse-1454 | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/tests/unit/packaging/test_models.py b/tests/unit/packaging/test_models.py
index 2daf8ca636f2..c102db48389f 100644
--- a/tests/unit/packaging/test_models.py
+++ b/tests/unit/packaging/test_models.py
@@ -107,6 +107,20 @@ def test_has_meta_true_with_keywords(self, db_session):
release = DBReleaseFact... | [WIP] Show Author and Maintainer in Project detail view
Refs #1060
@dstufft I need some input regarding the implementation of email validation. How do you want to have this implemented? Should I use a self written primitive regex? Or a package like https://pypi.python.org/pypi/validate_email ? Something else?
|
ivy-llc__ivy-17901 | [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\... | [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\... | diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py
index fed5e7fea40c7..8d55d66a1efda 100644
--- a/ivy/functional/frontends/paddle/tensor/math.py
+++ b/ivy/functional/frontends/paddle/tensor/math.py
@@ -232,3 +232,9 @@ def cumprod(x, dim=None, dtype=None, name=N... | fmin
|
celery__celery-6866 | [
{
"content": "\"\"\"The ``celery control``, ``. inspect`` and ``. status`` programs.\"\"\"\nfrom functools import partial\n\nimport click\nfrom kombu.utils.json import dumps\n\nfrom celery.bin.base import (COMMA_SEPARATED_LIST, CeleryCommand,\n CeleryOption, handle_preload_options)\n... | [
{
"content": "\"\"\"The ``celery control``, ``. inspect`` and ``. status`` programs.\"\"\"\nfrom functools import partial\n\nimport click\nfrom kombu.utils.json import dumps\n\nfrom celery.bin.base import (COMMA_SEPARATED_LIST, CeleryCommand,\n CeleryOption, handle_preload_options)\n... | diff --git a/celery/bin/control.py b/celery/bin/control.py
index a13963a54b3..fbd3730c490 100644
--- a/celery/bin/control.py
+++ b/celery/bin/control.py
@@ -144,6 +144,8 @@ def inspect(ctx, action, timeout, destination, json, **kwargs):
if json:
ctx.obj.echo(dumps(replies))
+ return
+
nodeco... | Celery inspect output JSON serialization is broken
# Checklist
- [ ] I have verified that the issue exists against the `master` branch of Celery.
- [ ] This has already been asked to the [discussion group](https://groups.google.com/forum/#!forum/celery-users) first.
- [x] I have read the relevant section in the
[... |
secdev__scapy-1402 | [
{
"content": "#! /usr/bin/env python\n\n\"\"\"\nDistutils setup file for Scapy.\n\"\"\"\n\n\nfrom distutils import archive_util\nfrom distutils import sysconfig\nfrom distutils.core import setup\nfrom distutils.command.sdist import sdist\nimport os\n\n\nEZIP_HEADER = \"\"\"#! /bin/sh\nPYTHONPATH=$0/%s exec pyth... | [
{
"content": "#! /usr/bin/env python\n\n\"\"\"\nDistutils setup file for Scapy.\n\"\"\"\n\n\nfrom distutils import archive_util\nfrom distutils import sysconfig\nfrom distutils.core import setup\nfrom distutils.command.sdist import sdist\nimport os\n\n\nEZIP_HEADER = \"\"\"#! /bin/sh\nPYTHONPATH=$0/%s exec pyth... | diff --git a/doc/scapy.1 b/doc/scapy.1
new file mode 100644
index 00000000000..6189a283542
--- /dev/null
+++ b/doc/scapy.1
@@ -0,0 +1,199 @@
+.TH SCAPY 1 "May 8, 2018"
+.SH NAME
+scapy \- Interactive packet manipulation tool
+.SH SYNOPSIS
+.B scapy
+.RI [ options ]
+.SH DESCRIPTION
+This manual page documents briefly t... | man page spelling error
intances should be instances.
It would be nice if this wasn't gz compressed in the source, otherwise I'd have done a pull request.
|
evennia__evennia-2900 | [
{
"content": "\"\"\"\nLogging facilities\n\nThese are thin wrappers on top of Twisted's logging facilities; logs\nare all directed either to stdout (if Evennia is running in\ninteractive mode) or to $GAME_DIR/server/logs.\n\nThe log_file() function uses its own threading system to log to\narbitrary files in $GA... | [
{
"content": "\"\"\"\nLogging facilities\n\nThese are thin wrappers on top of Twisted's logging facilities; logs\nare all directed either to stdout (if Evennia is running in\ninteractive mode) or to $GAME_DIR/server/logs.\n\nThe log_file() function uses its own threading system to log to\narbitrary files in $GA... | diff --git a/evennia/utils/logger.py b/evennia/utils/logger.py
index c08edd1fb88..9e81b2b5b0d 100644
--- a/evennia/utils/logger.py
+++ b/evennia/utils/logger.py
@@ -351,7 +351,7 @@ def suffix(self, tupledate):
def rotate(self):
try:
- self.rotate()
+ super().rotate()
excep... | [BUG - Develop] Log rotation infinite-loops
#### Describe the bug
My log file reached the maximum size and when trying to rotate, it hits an infinite loop.
https://github.com/evennia/evennia/blob/3992f37dada8ae9d495b7bdc087ff107e21e29aa/evennia/utils/logger.py#L352-L354
I think maybe it's supposed to be `super()... |
opsdroid__opsdroid-169 | [
{
"content": "#!/usr/bin/env python3\nimport os\nfrom setuptools import setup, find_packages\nfrom opsdroid.const import __version__\n\nPACKAGE_NAME = 'opsdroid'\nHERE = os.path.abspath(os.path.dirname(__file__))\n\nPACKAGES = find_packages(exclude=['tests', 'tests.*', 'modules',\n ... | [
{
"content": "#!/usr/bin/env python3\nimport os\nfrom setuptools import setup, find_packages\nfrom opsdroid.const import __version__\n\nPACKAGE_NAME = 'opsdroid'\nHERE = os.path.abspath(os.path.dirname(__file__))\n\nPACKAGES = find_packages(exclude=['tests', 'tests.*', 'modules',\n ... | diff --git a/setup.py b/setup.py
index 93c131f01..fc1cae030 100644
--- a/setup.py
+++ b/setup.py
@@ -10,9 +10,10 @@
'modules.*', 'docs', 'docs.*'])
REQUIRES = [
- 'pyyaml>=3.11,<4',
- 'aiohttp>=1.2.0,<2',
- 'pycron>=0.40',
+ 'arrow==0.10.0',
+ 'aiohttp==2.1.0',
+ ... | arrow dep missing
Fresh install of ubuntu 16.04
```
$ sudo apt update && sudo apt install python3-pip
...
$ pip3 install opsdroid
...
$ opsdroid
Traceback (most recent call last):
File "/home/ubuntu/.local/bin/opsdroid", line 7, in <module>
from opsdroid.__main__ import main
File "/home/ubuntu/.loca... |
nltk__nltk-1219 | [
{
"content": "# -*- coding: utf-8 -*-\n# Natural Language Toolkit: RIBES Score\n#\n# Copyright (C) 2001-2015 NLTK Project\n# Contributors: Katsuhito Sudoh, Liling Tan, Kasramvd, J.F.Sebastian, Mark Byers, ekhumoro, P. Ortiz\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\"\"\" RIBES sco... | [
{
"content": "# -*- coding: utf-8 -*-\n# Natural Language Toolkit: RIBES Score\n#\n# Copyright (C) 2001-2015 NLTK Project\n# Contributors: Katsuhito Sudoh, Liling Tan, Kasramvd, J.F.Sebastian, Mark Byers, ekhumoro, P. Ortiz\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\"\"\" RIBES sco... | diff --git a/nltk/translate/ribes_score.py b/nltk/translate/ribes_score.py
index 055c58be85..17e9e48336 100644
--- a/nltk/translate/ribes_score.py
+++ b/nltk/translate/ribes_score.py
@@ -6,7 +6,7 @@
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
""" RIBES score implementation """
-
+from __futu... | Translation metrics in Python 2.7
The [CI Server](https://nltk.ci.cloudbees.com/job/nltk/TOXENV=py27-jenkins,jdk=jdk8latestOnlineInstall/lastCompletedBuild/testReport/) reports test failures for `nltk.translate.ribes_score.kendall_tau` and `nltk.translate.ribes_score.spearman_rho`.
|
jupyterhub__zero-to-jupyterhub-k8s-373 | [
{
"content": "#!/usr/bin/env python3\nimport argparse\nimport os\nimport subprocess\nimport shutil\nfrom tempfile import TemporaryDirectory\n\nfrom ruamel.yaml import YAML\n\n# use safe roundtrip yaml loader\nyaml = YAML(typ='rt')\nyaml.indent(offset=2)\n\ndef last_modified_commit(*paths, **kwargs):\n return... | [
{
"content": "#!/usr/bin/env python3\nimport argparse\nimport os\nimport subprocess\nimport shutil\nfrom tempfile import TemporaryDirectory\n\nfrom ruamel.yaml import YAML\n\n# use safe roundtrip yaml loader\nyaml = YAML(typ='rt')\nyaml.indent(mapping=2, offset=2, sequence=4)\n\ndef last_modified_commit(*paths,... | diff --git a/build.py b/build.py
index 859cb2b0f5..66f0c43437 100755
--- a/build.py
+++ b/build.py
@@ -9,7 +9,7 @@
# use safe roundtrip yaml loader
yaml = YAML(typ='rt')
-yaml.indent(offset=2)
+yaml.indent(mapping=2, offset=2, sequence=4)
def last_modified_commit(*paths, **kwargs):
return subprocess.check_o... | build.py corrupts yaml
## Description
I ran into an issue with entries in values.yaml file after using the build.py script. My `extraVolume` entries were corrupted.
## Reproduction
```yaml
# create this file and name it values.yaml
root-1:
# offset=2 will indent the dash 2 spaces (default: 2)
# sequence=... |
arviz-devs__arviz-1403 | [
{
"content": "\"\"\"Bokeh Densityplot.\"\"\"\nfrom collections import defaultdict\nfrom itertools import cycle\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom bokeh.models.annotations import Legend, Title\n\nfrom ....stats import hdi\nfrom ....stats.density_utils import get_bins, histogram, kde\nfr... | [
{
"content": "\"\"\"Bokeh Densityplot.\"\"\"\nfrom collections import defaultdict\nfrom itertools import cycle\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom bokeh.models.annotations import Legend, Title\n\nfrom ....stats import hdi\nfrom ....stats.density_utils import get_bins, histogram, kde\nfr... | diff --git a/arviz/plots/backends/bokeh/densityplot.py b/arviz/plots/backends/bokeh/densityplot.py
index 7ede6ce479..eb8dcec100 100644
--- a/arviz/plots/backends/bokeh/densityplot.py
+++ b/arviz/plots/backends/bokeh/densityplot.py
@@ -63,7 +63,7 @@ def plot_density(
rows,
cols,
fi... | Error plotting a single variable with plot_density and bokeh backend
**Describe the bug**
Over in ArviZ.jl, we use the Julia equivalent to the below snippet to test Bokeh integration for `plot_density`. It worked fine until recently, where we now get an error with bokeh only but not matplotlib, though I'm not certain ... |
pytorch__ignite-773 | [
{
"content": "# -*- coding: utf-8 -*-\nimport warnings\n\nimport torch\n\nfrom ignite.engine import Events\nfrom ignite.engine.engine import EventWithFilter\nfrom ignite.contrib.handlers.base_logger import BaseLogger, BaseOutputHandler\n\n\nclass ProgressBar(BaseLogger):\n \"\"\"\n TQDM progress bar handl... | [
{
"content": "# -*- coding: utf-8 -*-\nimport warnings\n\nimport torch\n\nfrom ignite.engine import Events\nfrom ignite.engine.engine import EventWithFilter\nfrom ignite.contrib.handlers.base_logger import BaseLogger, BaseOutputHandler\n\n\nclass ProgressBar(BaseLogger):\n \"\"\"\n TQDM progress bar handl... | diff --git a/ignite/contrib/handlers/tqdm_logger.py b/ignite/contrib/handlers/tqdm_logger.py
index 7600372e6d33..bc921eb7131b 100644
--- a/ignite/contrib/handlers/tqdm_logger.py
+++ b/ignite/contrib/handlers/tqdm_logger.py
@@ -119,6 +119,7 @@ def _reset(self, pbar_total):
total=pbar_total,
lea... | progress bar output seems to be off
Soi I am using the Progressbar from the contrib module for indicating progress in the training loop. Currently the batch size is 1 for an exemplary dataset of 16 samples.
But for some reason the progressbar seems to skip the first step and I am not sure if this is due to an issue... |
scikit-hep__pyhf-1283 | [
{
"content": "#\n# pyhf documentation build configuration file, created by\n# sphinx-quickstart on Fri Feb 9 11:58:49 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#... | [
{
"content": "#\n# pyhf documentation build configuration file, created by\n# sphinx-quickstart on Fri Feb 9 11:58:49 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#... | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5d448e2be3..0ceced45f7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -6,7 +6,7 @@ To get started fork the repo.
## Issues
Making Issues is very helpful to the project — they help the dev team form the development roadmap and are where most important... | Change question asking queue to focus on GitHub Discussions over Stack Overflow
# Description
We currently direct users with application questions to the `pyhf` Stack Overflow tag, but should start directing them to GitHub Discussions instead.
This should be done before `v0.6.0` so that this gets propagated out t... |
huggingface__trl-154 | [
{
"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/tests/trainer/test_ppo_trainer.py b/tests/trainer/test_ppo_trainer.py
index 02dab2628e..61bb668057 100644
--- a/tests/trainer/test_ppo_trainer.py
+++ b/tests/trainer/test_ppo_trainer.py
@@ -147,6 +147,22 @@ def _init_dummy_dataset(self):
return dummy_dataset
+ def test_drop_last_dataloader(... | Error with official examples
Hi, I am running the official example script on t5 using sentiment as reward function, and after 97 iterations the following error is raised:
```
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /home/alejandro.vaca/trl/examples/sentiment/scripts/t5-se... |
google__flax-270 | [
{
"content": "# Copyright 2020 The Flax 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 ap... | [
{
"content": "# Copyright 2020 The Flax 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 ap... | diff --git a/setup.py b/setup.py
index 442ef0f76..25a9b112a 100644
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,7 @@
"numpy>=1.12",
"jax>=0.1.59",
"matplotlib", # only needed for tensorboard export
- "dataclasses", # will only install on py3.6
+ "dataclasses;python_version<'3.7'", # will only insta... | `typing._ClassVar` cannot be accessed in the iPython shell – dataclasses package seems to mess up on Python 3.7
### Problem you have encountered:
I just installed flax and tried to import it from the iPython shell. But it raises an `AttributeError`.
```
In [1]: import flax
*snip*
~/.virtualenvs/flax2/lib/p... |
fossasia__open-event-server-2599 | [
{
"content": "import os\nfrom base64 import b64encode\nfrom shutil import copyfile, rmtree\n\nfrom boto.gs.connection import GSConnection\nfrom flask.ext.scrypt import generate_password_hash\nfrom boto.s3.connection import S3Connection\nfrom boto.s3.key import Key\nfrom werkzeug.utils import secure_filename\nim... | [
{
"content": "import os\nfrom base64 import b64encode\nfrom shutil import copyfile, rmtree\n\nfrom boto.gs.connection import GSConnection\nfrom flask.ext.scrypt import generate_password_hash\nfrom boto.s3.connection import S3Connection\nfrom boto.s3.key import Key\nfrom werkzeug.utils import secure_filename\nim... | diff --git a/.travis.yml b/.travis.yml
index 16619c635c..4e42d8e01a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -29,7 +29,7 @@ after_success:
- bash <(curl -s https://codecov.io/bash)
- coveralls
- codeclimate-test-reporter
- - bash kubernetes/deployment/deploy.sh
+ - bash kubernetes/travis/deploy.sh
- ... | Import not working on Kubernetes deployment
The file upload for import is not working on Kubernetes deployment. (but works locally and on heroku)
|
kivy__python-for-android-615 | [
{
"content": "from functools import partial\n\nfrom pythonforandroid.toolchain import Recipe, shprint, current_directory\nimport sh\n\n\nclass OpenSSLRecipe(Recipe):\n version = '1.0.2e'\n url = 'https://www.openssl.org/source/openssl-{version}.tar.gz'\n\n def should_build(self, arch):\n return ... | [
{
"content": "from functools import partial\n\nfrom pythonforandroid.toolchain import Recipe, shprint, current_directory\nimport sh\n\n\nclass OpenSSLRecipe(Recipe):\n version = '1.0.2f'\n url = 'https://www.openssl.org/source/openssl-{version}.tar.gz'\n\n def should_build(self, arch):\n return ... | diff --git a/pythonforandroid/recipes/openssl/__init__.py b/pythonforandroid/recipes/openssl/__init__.py
index f3df432a2a..8348f8d552 100644
--- a/pythonforandroid/recipes/openssl/__init__.py
+++ b/pythonforandroid/recipes/openssl/__init__.py
@@ -5,7 +5,7 @@
class OpenSSLRecipe(Recipe):
- version = '1.0.2e'
+ ... | OpenSSL 1.0.2e outdated (replaced by 1.0.2f)
A new version has been published today. The recipe no longer can download version 1.0.2e.
Does `disable-solver.patch` still apply?
|
chainer__chainer-5463 | [
{
"content": "import warnings\n\nimport numpy\nimport six\n\nfrom chainer import configuration\nfrom chainer import functions\nfrom chainer import initializer\nfrom chainer import link\nfrom chainer.links.caffe.protobuf3 import caffe_pb2 as caffe_pb\nfrom chainer.links.connection import convolution_2d\nfrom cha... | [
{
"content": "import warnings\n\nimport numpy\nimport six\n\nfrom chainer import configuration\nfrom chainer import functions\nfrom chainer import initializer\nfrom chainer import link\nfrom chainer.links.caffe.protobuf3 import caffe_pb2 as caffe_pb\nfrom chainer.links.connection import convolution_2d\nfrom cha... | diff --git a/chainer/links/caffe/caffe_function.py b/chainer/links/caffe/caffe_function.py
index 2004e9d27c14..64385a20823c 100644
--- a/chainer/links/caffe/caffe_function.py
+++ b/chainer/links/caffe/caffe_function.py
@@ -547,7 +547,7 @@ def _get_stride(param):
def _get_pad(param):
- if param.pad_h > 0:
+ i... | CaffeFunction ignores pad_w from Convolution
# Problem description
Trying to import inception from [Caffe model](https://github.com/soeaver/caffe-model/tree/master/cls) fails.
1. download and unzip files from https://drive.google.com/open?id=0B9mkjlmP0d7zTEJmNEh6c0RfYzg
2. Run following python script (should fai... |
kivy__kivy-5627 | [
{
"content": "#\n# Kivy - Cross-platform UI framework\n# https://kivy.org/\n#\nfrom __future__ import print_function\n\nimport sys\nbuild_examples = False\nif \"--build_examples\" in sys.argv:\n build_examples = True\n sys.argv.remove(\"--build_examples\")\n\nfrom copy import deepcopy\nimport os\nfrom os.... | [
{
"content": "#\n# Kivy - Cross-platform UI framework\n# https://kivy.org/\n#\nfrom __future__ import print_function\n\nimport sys\nbuild_examples = False\nif \"--build_examples\" in sys.argv:\n build_examples = True\n sys.argv.remove(\"--build_examples\")\n\nfrom copy import deepcopy\nimport os\nfrom os.... | diff --git a/setup.py b/setup.py
index de71c5f198..3c8f34de28 100644
--- a/setup.py
+++ b/setup.py
@@ -1019,6 +1019,7 @@ def get_extensions_from_sources(sources):
],
package_dir={'kivy': 'kivy'},
package_data={'kivy': [
+ 'setupconfig.py'
'*.pxd',
'*.pxi',... | No module named kivy.setupconfig
Hi,
When installing Kivy 1.9.1 as a dependency of one of my packages I get the error
`ImportError: No module named 'kivy.setupconfig`.
My setup.py file looks like this and installs without errors:
```
from setuptools import setup
CYTHON_REQ = "cython==0.23.4"
setup(
name = 'MyApp... |
DDMAL__CantusDB-1043 | [
{
"content": "from django.contrib import admin\nfrom main_app.models import *\nfrom main_app.forms import (\n AdminCenturyForm,\n AdminChantForm,\n AdminFeastForm,\n AdminGenreForm,\n AdminNotationForm,\n AdminOfficeForm,\n AdminProvenanceForm,\n AdminRismSiglumForm,\n AdminSegmentFor... | [
{
"content": "from django.contrib import admin\nfrom main_app.models import *\nfrom main_app.forms import (\n AdminCenturyForm,\n AdminChantForm,\n AdminFeastForm,\n AdminGenreForm,\n AdminNotationForm,\n AdminOfficeForm,\n AdminProvenanceForm,\n AdminRismSiglumForm,\n AdminSegmentFor... | diff --git a/django/cantusdb_project/main_app/admin.py b/django/cantusdb_project/main_app/admin.py
index 9dd61e38f..1885bbffd 100644
--- a/django/cantusdb_project/main_app/admin.py
+++ b/django/cantusdb_project/main_app/admin.py
@@ -76,6 +76,8 @@ def get_source_siglum(self, obj):
"is_last_chant_in_feast",
... | Admin Area: Hide "Volpiano notes" and "Volpiano interval" fields
We currently display these fields in the admin area, but they are only for internal use. Instead, we should hide these fields (i.e., exclude, instead of readonly_fields).
|
streamlit__streamlit-7257 | [
{
"content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2... | [
{
"content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2... | diff --git a/e2e/scripts/st_video.py b/e2e/scripts/st_video.py
index 376155d892b9..0d93fe4ff58c 100644
--- a/e2e/scripts/st_video.py
+++ b/e2e/scripts/st_video.py
@@ -19,3 +19,7 @@
url = "https://www.w3schools.com/html/mov_bbb.mp4"
file = requests.get(url).content
st.video(file)
+
+# Test start time with widget
+tim... | Changing start_time of st.video() doesn't work for the same video
### Checklist
- [X] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues.
- [X] I added a very descriptive title to this issue.
- [X] I have provided sufficient information below to help reproduce t... |
aio-libs__aiohttp-7245 | [
{
"content": "\"\"\"HTTP Client for asyncio.\"\"\"\n\nimport asyncio\nimport base64\nimport hashlib\nimport json\nimport os\nimport sys\nimport traceback\nimport warnings\nfrom contextlib import suppress\nfrom types import SimpleNamespace, TracebackType\nfrom typing import (\n Any,\n Awaitable,\n Calla... | [
{
"content": "\"\"\"HTTP Client for asyncio.\"\"\"\n\nimport asyncio\nimport base64\nimport hashlib\nimport json\nimport os\nimport sys\nimport traceback\nimport warnings\nfrom contextlib import suppress\nfrom types import SimpleNamespace, TracebackType\nfrom typing import (\n Any,\n Awaitable,\n Calla... | diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index bdb579ac5d2..237cd505b77 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -196,6 +196,7 @@ Krzysztof Blazewicz
Kyrylo Perevozchikov
Kyungmin Lee
Lars P. Søndergaard
+Lee LieWhite
Liu Hua
Louis-Philippe Huberdeau
Loïc Lajeanne
diff --git a/aiohttp/clien... | Websocket client send wrong Connection header
### Describe the bug
In websocket standard , the `Connection` header shoule be `Upgrade`, but we send a `upgrade` .
It's a lowercase word.
### To Reproduce
connect to server with strict case sensitive checking will failed
### Expected behavior
Send a
`Connection: U... |
python__mypy-11823 | [
{
"content": "\"\"\"Semantic analysis of call-based Enum definitions.\n\nThis is conceptually part of mypy.semanal (semantic analyzer pass 2).\n\"\"\"\n\nfrom typing import List, Tuple, Optional, Union, cast\nfrom typing_extensions import Final\n\nfrom mypy.nodes import (\n Expression, Context, TypeInfo, Ass... | [
{
"content": "\"\"\"Semantic analysis of call-based Enum definitions.\n\nThis is conceptually part of mypy.semanal (semantic analyzer pass 2).\n\"\"\"\n\nfrom typing import List, Tuple, Optional, Union, cast\nfrom typing_extensions import Final\n\nfrom mypy.nodes import (\n Expression, Context, TypeInfo, Ass... | diff --git a/mypy/semanal_enum.py b/mypy/semanal_enum.py
index 5682f66298f6..c900c5fa790f 100644
--- a/mypy/semanal_enum.py
+++ b/mypy/semanal_enum.py
@@ -21,6 +21,8 @@
))
ENUM_SPECIAL_PROPS: Final = frozenset((
'name', 'value', '_name_', '_value_', '_order_', '__order__',
+ # Also attributes from `object`:
+... | Regression in mypy 0.930: Cannot override writable attribute "__module__" with a final one
**Bug Report**
The following code is reported as error by mypy 0.930 (Python 3.8). It seems correct, and was considered correct so far:
```python
from enum import Enum
class PyFormat(str, Enum):
__module__ = "psyco... |
psf__black-3276 | [
{
"content": "import io\nimport os\nimport sys\nfrom functools import lru_cache\nfrom pathlib import Path\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Dict,\n Iterable,\n Iterator,\n List,\n Optional,\n Pattern,\n Sequence,\n Tuple,\n Union,\n)\n\nfrom mypy_extensions import ... | [
{
"content": "import io\nimport os\nimport sys\nfrom functools import lru_cache\nfrom pathlib import Path\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Dict,\n Iterable,\n Iterator,\n List,\n Optional,\n Pattern,\n Sequence,\n Tuple,\n Union,\n)\n\nfrom mypy_extensions import ... | diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml
index d52f41a4939..ae26a814c9e 100644
--- a/.github/workflows/pypi_upload.yml
+++ b/.github/workflows/pypi_upload.yml
@@ -58,7 +58,7 @@ jobs:
- uses: actions/checkout@v3
- name: Build wheels via cibuildwheel
- uses... | Bump pypa/cibuildwheel from 2.8.1 to 2.9.0
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.8.1 to 2.9.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/pypa/cibuildwheel/releases">pypa/cibuildwheel's releases</a>.</em></p>
<blockquote>
<h2>v2.9.0</h2>
<... |
gratipay__gratipay.com-1975 | [
{
"content": "from __future__ import division\n\nfrom importlib import import_module\nimport os\nimport sys\nimport threading\nimport time\nimport traceback\n\nimport gittip\nimport gittip.wireup\nfrom gittip import canonize, configure_payments\nfrom gittip.security import authentication, csrf, x_frame_options\... | [
{
"content": "from __future__ import division\n\nfrom importlib import import_module\nimport os\nimport sys\nimport threading\nimport time\nimport traceback\n\nimport gittip\nimport gittip.wireup\nfrom gittip import canonize, configure_payments\nfrom gittip.security import authentication, csrf, x_frame_options\... | diff --git a/configure-aspen.py b/configure-aspen.py
index 0d335a4d60..f9f8f7f299 100644
--- a/configure-aspen.py
+++ b/configure-aspen.py
@@ -26,7 +26,6 @@
website.renderer_default = "jinja2"
-website.default_renderers_by_media_type['application/json'] = 'stdlib_format'
website.renderer_factories['jinja2'].Ren... | /about/stats.json is broken
[stats.json](https://www.gittip.com/about/stats.json) is broken, I guess because of commit https://github.com/gittip/www.gittip.com/commit/892b1c28d127a18858032c88bd3d065cae973c34 by @clone1018.
|
kivy__kivy-5951 | [
{
"content": "'''\nEnchant Spelling: Implements spelling backend based on enchant.\n'''\n\n\nimport enchant\n\nfrom kivy.core.spelling import SpellingBase, NoSuchLangError\nfrom kivy.compat import PY2\n\n\nclass SpellingEnchant(SpellingBase):\n '''\n Spelling backend based on the enchant library.\n '''... | [
{
"content": "'''\nEnchant Spelling\n================\n\nImplementation spelling backend based on enchant.\n\n.. warning:: pyenchant doesn't have dedicated build anymore for Windows/x64.\n See https://github.com/kivy/kivy/issues/5816 for more informations\n'''\n\n\nimport enchant\n\nfrom kivy.core.s... | diff --git a/kivy/core/spelling/spelling_enchant.py b/kivy/core/spelling/spelling_enchant.py
index 6c408fbb59..7fe8f230f5 100644
--- a/kivy/core/spelling/spelling_enchant.py
+++ b/kivy/core/spelling/spelling_enchant.py
@@ -1,5 +1,11 @@
'''
-Enchant Spelling: Implements spelling backend based on enchant.
+Enchant Spell... | enchant - ImportError: No module named 'enchant'
<!--
The issue tracker is a tool to address bugs.
Please use the #kivy IRC channel on freenode or Stack Overflow for
support questions, more information at https://git.io/vM1yQ.
Before opening a new issue, make sure you do the following:
* check that your issu... |
Cloud-CV__EvalAI-697 | [
{
"content": "\"\"\"\nDjango settings for evalai project.\n\nGenerated by 'django-admin startproject' using Django 1.10.2.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.10/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/... | [
{
"content": "\"\"\"\nDjango settings for evalai project.\n\nGenerated by 'django-admin startproject' using Django 1.10.2.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.10/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/... | diff --git a/settings/common.py b/settings/common.py
index 4e93177541..dbb31ad48b 100755
--- a/settings/common.py
+++ b/settings/common.py
@@ -163,7 +163,10 @@
'DEFAULT_THROTTLE_RATES': {
'anon': '100/minute',
'user': '100/minute'
- }
+ },
+ 'DEFAULT_RENDERER_CLASSES': (
+ 'rest_f... | Set default renderer to JSONRenderer in DRF backend
For reference: http://www.django-rest-framework.org/api-guide/renderers/#setting-the-renderers
|
deis__deis-2001 | [
{
"content": "import cStringIO\nimport base64\nimport copy\nimport functools\nimport json\nimport httplib\nimport paramiko\nimport socket\nimport re\nimport time\n\n\nMATCH = re.compile(\n '(?P<app>[a-z0-9-]+)_?(?P<version>v[0-9]+)?\\.?(?P<c_type>[a-z]+)?.(?P<c_num>[0-9]+)')\n\n\nclass UHTTPConnection(httpli... | [
{
"content": "import cStringIO\nimport base64\nimport copy\nimport functools\nimport json\nimport httplib\nimport paramiko\nimport socket\nimport re\nimport time\n\n\nMATCH = re.compile(\n '(?P<app>[a-z0-9-]+)_?(?P<version>v[0-9]+)?\\.?(?P<c_type>[a-z-_]+)?.(?P<c_num>[0-9]+)')\n\n\nclass UHTTPConnection(http... | diff --git a/controller/scheduler/coreos.py b/controller/scheduler/coreos.py
index 06e224b313..afedb4246d 100644
--- a/controller/scheduler/coreos.py
+++ b/controller/scheduler/coreos.py
@@ -11,7 +11,7 @@
MATCH = re.compile(
- '(?P<app>[a-z0-9-]+)_?(?P<version>v[0-9]+)?\.?(?P<c_type>[a-z]+)?.(?P<c_num>[0-9]+)')... | underscores in app names cause logger to fail
I setup a new cluster from master. I tried stop and start but I still see the logger going into the "failed" state.
$ fleetctl journal deis-logger
-- Logs begin at Wed 2014-09-17 15:16:23 UTC, end at Wed 2014-09-17 21:29:41 UTC. --
Sep 17 19:58:35 ip-10-21-1-61.ec2.inter... |
getredash__redash-3877 | [
{
"content": "import hashlib\nimport hmac\nimport logging\nimport time\nfrom urlparse import urlsplit, urlunsplit\n\nfrom flask import jsonify, redirect, request, url_for\nfrom flask_login import LoginManager, login_user, logout_user, user_logged_in\nfrom redash import models, settings\nfrom redash.authenticati... | [
{
"content": "import hashlib\nimport hmac\nimport logging\nimport time\nfrom urlparse import urlsplit, urlunsplit\n\nfrom flask import jsonify, redirect, request, url_for\nfrom flask_login import LoginManager, login_user, logout_user, user_logged_in\nfrom redash import models, settings\nfrom redash.authenticati... | diff --git a/redash/authentication/__init__.py b/redash/authentication/__init__.py
index 04af7a29ac..989ed52b11 100644
--- a/redash/authentication/__init__.py
+++ b/redash/authentication/__init__.py
@@ -41,6 +41,10 @@ def sign(key, path, expires):
@login_manager.user_loader
def load_user(user_id_with_identity):
+ ... | API Key authentication should take precedence over cookies
Currently when you're logged in as a user, you can't use embeds or shared dashboards for which you do not have access -- even if you provide the API key. This is because the current user is being defined by the session cookie and the API key is being ignored.
... |
readthedocs__readthedocs.org-5470 | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"Views for builds app.\"\"\"\n\nimport logging\nimport textwrap\n\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.http import (\n HttpResponseForbidden,\n HttpResponsePermanentRedirect,\n HttpResp... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"Views for builds app.\"\"\"\n\nimport logging\nimport textwrap\n\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.http import (\n HttpResponseForbidden,\n HttpResponsePermanentRedirect,\n HttpResp... | diff --git a/readthedocs/builds/views.py b/readthedocs/builds/views.py
index dfdee2abf97..e8e3d458e2c 100644
--- a/readthedocs/builds/views.py
+++ b/readthedocs/builds/views.py
@@ -41,7 +41,7 @@ def get_queryset(self):
queryset = Build.objects.public(
user=self.request.user,
project=s... | Build List Screen Performance Issue
While working on #5464, I discovered a performance issue on the [build list screen](http://readthedocs.org/projects/requests/builds/).
There appears to be a couple duplicated queries in the build list screen. One is to get the project (probably from `Build.get_absolute_url`) for t... |
redis__redis-py-2254 | [
{
"content": "import threading\nimport time as mod_time\nimport uuid\nfrom types import SimpleNamespace, TracebackType\nfrom typing import Optional, Type\n\nfrom redis.exceptions import LockError, LockNotOwnedError\nfrom redis.typing import Number\n\n\nclass Lock:\n \"\"\"\n A shared, distributed Lock. Us... | [
{
"content": "import threading\nimport time as mod_time\nimport uuid\nfrom types import SimpleNamespace, TracebackType\nfrom typing import Optional, Type\n\nfrom redis.exceptions import LockError, LockNotOwnedError\nfrom redis.typing import Number\n\n\nclass Lock:\n \"\"\"\n A shared, distributed Lock. Us... | diff --git a/redis/lock.py b/redis/lock.py
index 650d0ae56c..912ff57819 100644
--- a/redis/lock.py
+++ b/redis/lock.py
@@ -169,7 +169,6 @@ def __exit__(
def acquire(
self,
- *,
sleep: Optional[Number] = None,
blocking: Optional[bool] = None,
blocking_timeout: Optional[N... | v4.3.3 continues to contain backwards incompatible change to ``redis.lock.Lock``
Hey this is a continuation of #2209.
The API change made in https://github.com/redis/redis-py/pull/2210/files does not restore backwards compatibility.
We are calling acquire like this:
```py
lock = redis.lock(
"_lock{0}".fo... |
buildbot__buildbot-1214 | [
{
"content": "#!/usr/bin/env python\n#\n# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it wil... | [
{
"content": "#!/usr/bin/env python\n#\n# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it wil... | diff --git a/pkg/setup.py b/pkg/setup.py
index 51b1ec8d6ac8..c7d089650654 100755
--- a/pkg/setup.py
+++ b/pkg/setup.py
@@ -19,7 +19,7 @@
import buildbot_pkg
setup(
- name='buildbot_pkg',
+ name='buildbot-pkg',
version=buildbot_pkg.getVersion("."),
description='Buildbot packaging tools',
author=... | New web plugin idea: a health indicator
This ticket is a migrated Trac ticket [2966](http://trac.buildbot.net/ticket/2966)
People contributed to the original ticket: `benoit.allard@...`, @tardyp, @rutsky, @unknown_contributor, @sa2ajj, @rutsky
Ticket created on: `Oct 24 2014`
Ticket last modified on: `Mar 19 2016`
--... |
DistrictDataLabs__yellowbrick-904 | [
{
"content": "# yellowbrick.features.rfecv\n# Visualize the number of features selected with recursive feature elimination\n#\n# Author: Benjamin Bengfort <benjamin@bengfort.com>\n# Created: Tue Apr 03 17:31:37 2018 -0400\n#\n# ID: rfecv.py [] benjamin@bengfort.com $\n\n\"\"\"\nVisualize the number of features... | [
{
"content": "# yellowbrick.features.rfecv\n# Visualize the number of features selected with recursive feature elimination\n#\n# Author: Benjamin Bengfort <benjamin@bengfort.com>\n# Created: Tue Apr 03 17:31:37 2018 -0400\n#\n# ID: rfecv.py [] benjamin@bengfort.com $\n\n\"\"\"\nVisualize the number of features... | diff --git a/docs/contributing/advanced_development_topics.rst b/docs/contributing/advanced_development_topics.rst
index 6ebaa8bf0..6f32446c2 100644
--- a/docs/contributing/advanced_development_topics.rst
+++ b/docs/contributing/advanced_development_topics.rst
@@ -72,9 +72,9 @@ Testing Conventions
Ensure there i... | Overhaul unittest and fixtures
Remove dependency on `unittest.TestCase` by replacing assertions with `assert` statements. This also involves using `pytest.raises` and `pytest.skip` decorators.
Use PyTest fixtures for datasets and other fixtures.
~Add PEP checking to pytest (alongside pyflakes)~
- [x] rename ... |
OpenNMT__OpenNMT-tf-577 | [
{
"content": "\"\"\"ARK data file to TFRecords converter.\n\nThe scripts takes the ARK data file and optionally the indexed target text\nto write aligned source and target data.\n\"\"\"\n\nimport argparse\nimport numpy as np\nimport tensorflow as tf\n\nfrom opennmt.inputters.record_inputter import write_sequenc... | [
{
"content": "\"\"\"ARK data file to TFRecords converter.\n\nThe scripts takes the ARK data file and optionally the indexed target text\nto write aligned source and target data.\n\"\"\"\n\nimport argparse\nimport numpy as np\nimport tensorflow as tf\n\nfrom opennmt.inputters.record_inputter import write_sequenc... | diff --git a/opennmt/bin/ark_to_records.py b/opennmt/bin/ark_to_records.py
index 2fcc7fab7..6eb79dd60 100644
--- a/opennmt/bin/ark_to_records.py
+++ b/opennmt/bin/ark_to_records.py
@@ -43,7 +43,7 @@ def consume_next_vector(ark_file):
if end:
break
- return idx, np.asarray(vector, dtype=tf.float32)
+ ret... | Bug in "onmt-ark-to-records" code
I have found a small bug in the code line referenced below. It causes the script to terminate with a `TypeError: data type not understood`. Just for the sake of completeness, this is caused by the fact that numpy doesn't understand the object `tf.float32`. I changed that to `float` and... |
getredash__redash-3421 | [
{
"content": "import sqlparse\nfrom flask import jsonify, request, url_for\nfrom flask_login import login_required\nfrom flask_restful import abort\nfrom sqlalchemy.orm.exc import StaleDataError\nfrom funcy import partial\n\nfrom redash import models, settings\nfrom redash.authentication.org_resolving import cu... | [
{
"content": "import sqlparse\nfrom flask import jsonify, request, url_for\nfrom flask_login import login_required\nfrom flask_restful import abort\nfrom sqlalchemy.orm.exc import StaleDataError\nfrom funcy import partial\n\nfrom redash import models, settings\nfrom redash.authentication.org_resolving import cu... | diff --git a/client/app/pages/queries/view.js b/client/app/pages/queries/view.js
index b230ab4dc0..276feab73b 100644
--- a/client/app/pages/queries/view.js
+++ b/client/app/pages/queries/view.js
@@ -400,7 +400,7 @@ function QueryViewCtrl(
}
if (status === 'done') {
- const ranSelectedQuery = $scope.que... | When creating a visualisation after running a query the query results are deleted
We are testing the latest stable version of redash (6.0.0+b10818 (7fa66654)
Found a regression when creating a new visualization, to reproduce:
0. Open a new browser tab and log into redash
1. Run a query
2. Create a new visualization... |
arviz-devs__arviz-1962 | [
{
"content": "# pylint: disable=too-many-instance-attributes,too-many-lines\r\n\"\"\"PyStan-specific conversion code.\"\"\"\r\nimport re\r\nimport warnings\r\nfrom collections import OrderedDict\r\nfrom copy import deepcopy\r\n\r\nimport numpy as np\r\nimport xarray as xr\r\n\r\nfrom .. import _log\r\nfrom ..r... | [
{
"content": "# pylint: disable=too-many-instance-attributes,too-many-lines\r\n\"\"\"PyStan-specific conversion code.\"\"\"\r\nimport re\r\nimport warnings\r\nfrom collections import OrderedDict\r\nfrom copy import deepcopy\r\n\r\nimport numpy as np\r\nimport xarray as xr\r\n\r\nfrom .. import _log\r\nfrom ..r... | diff --git a/arviz/data/io_pystan.py b/arviz/data/io_pystan.py
index 0de5db3b1d..2401c7084e 100644
--- a/arviz/data/io_pystan.py
+++ b/arviz/data/io_pystan.py
@@ -809,6 +809,8 @@ def get_draws_stan3(fit, model=None, variables=None, ignore=None, dtypes=None):
data = OrderedDict()
for var in variables:
+ ... | from_pystan puts log likelihood and posterior predictions in posterior data
## Short Description
I would like to convert a posterior sample from a PyStan `stan.fit.Fit` object to an `az.InferenceData` object, but the log likelihood and posterior prediction variables end up in the `posterior` section. (They also appe... |
TheAlgorithms__Python-11276 | [
{
"content": "import math\n\n\nclass SegmentTree:\n def __init__(self, a):\n self.A = a\n self.N = len(self.A)\n self.st = [0] * (\n 4 * self.N\n ) # approximate the overall size of segment tree with array N\n if self.N:\n self.build(1, 0, self.N - 1)... | [
{
"content": "import math\n\n\nclass SegmentTree:\n def __init__(self, a):\n self.A = a\n self.N = len(self.A)\n self.st = [0] * (\n 4 * self.N\n ) # approximate the overall size of segment tree with array N\n if self.N:\n self.build(1, 0, self.N - 1)... | diff --git a/data_structures/binary_tree/segment_tree.py b/data_structures/binary_tree/segment_tree.py
index 3b0b32946f6e..608e6326763a 100644
--- a/data_structures/binary_tree/segment_tree.py
+++ b/data_structures/binary_tree/segment_tree.py
@@ -98,7 +98,7 @@ def query_recursive(self, idx, l, r, a, b): # noqa: E741
... | Global variable should not using in class method
### Repository commit
9caf4784aada17dc75348f77cc8c356df503c0f3
### Python version (python --version)
python3.11
### Dependencies version (pip freeze)
#nop
### Expected behavior
Hi, guys. I come across one global variable that used in class method. I think using i... |
typeddjango__django-stubs-1326 | [
{
"content": "import os\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, _dirs, files in os.walk(name):\n for file in files:\n if file.endswith(\".pyi\"):\n if os.path.sep in... | [
{
"content": "import os\nfrom typing import List\n\nfrom setuptools import find_packages, setup\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, _dirs, files in os.walk(name):\n for file in files:\n if file.endswith(\".pyi\"):\n if os.path.sep in... | diff --git a/setup.py b/setup.py
index 442eeed98..6649dac60 100644
--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,7 @@ def find_stub_files(name: str) -> List[str]:
setup(
name="django-stubs",
- version="1.13.1",
+ version="1.13.2",
description="Mypy stubs for Django",
long_description=readme,
l... | Next release planning (1.13.2)
I'd like to make a new django-stubs release soonish.
I think this is a blocker:
* #1311
~~I don't know how to unlock mypy 0.991 support other than to disable testing with Django 3.2 and 2.2 (due to #1261). That's not ideal, but it is a step towards the new versioning policy we di... |
pytorch__vision-8164 | [
{
"content": "import csv\nimport os\nfrom typing import Any, Callable, List, Optional, Tuple\n\nfrom PIL import Image\n\nfrom .utils import download_and_extract_archive\nfrom .vision import VisionDataset\n\n\nclass Kitti(VisionDataset):\n \"\"\"`KITTI <http://www.cvlibs.net/datasets/kitti/eval_object.php?obj... | [
{
"content": "import csv\nimport os\nfrom typing import Any, Callable, List, Optional, Tuple\n\nfrom PIL import Image\n\nfrom .utils import download_and_extract_archive\nfrom .vision import VisionDataset\n\n\nclass Kitti(VisionDataset):\n \"\"\"`KITTI <http://www.cvlibs.net/datasets/kitti/eval_object.php?obj... | diff --git a/torchvision/datasets/kitti.py b/torchvision/datasets/kitti.py
index c166a25c7d8..37b99006c75 100644
--- a/torchvision/datasets/kitti.py
+++ b/torchvision/datasets/kitti.py
@@ -66,7 +66,6 @@ def __init__(
)
self.images = []
self.targets = []
- self.root = root
self... | Bug in `datasets.kitti.Kitti`: `expanduser` operation not performed for `root` parameter
### **🐛 Describe the bug**
When initializing the `torchvision.datasets.kitti.Kitti` class from the torchvision project, the `root` parameter is directly assigned to `self.root` without performing the `expanduser` operation. This ... |
pypi__warehouse-3130 | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/warehouse/packaging/views.py b/warehouse/packaging/views.py
index 5d534e1ae03d..4711e17cbfc7 100644
--- a/warehouse/packaging/views.py
+++ b/warehouse/packaging/views.py
@@ -132,7 +132,7 @@ def release_detail(release, request):
@view_config(
route_name="includes.edit-project-button",
- renderer=... | Change "Edit" to "Manage" in "Your Projects"
Change the button/link text "Edit" to "Manage" in "Your Projects".
From IRC conversation with @alanbato, @ewdurbin and @nlhkabu .
~~~
<EWDurbin> I think perhaps “Manage” might be a better name for the button that currently says “Edit"
<EWDurbin> Just right off the ba... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.