in_source_id stringlengths 13 58 | issue stringlengths 3 241k | before_files listlengths 0 3 | after_files listlengths 0 3 | pr_diff stringlengths 109 107M ⌀ |
|---|---|---|---|---|
pydantic__pydantic-2523 | `inherit_config` overwrites `json_encoders` from class creation arguments
### 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 t... | [
{
"content": "import json\nimport sys\nimport warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n Dic... | [
{
"content": "import json\nimport sys\nimport warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n Dic... | diff --git a/changes/2521-layday.md b/changes/2521-layday.md
new file mode 100644
index 00000000000..3c02f4dfd60
--- /dev/null
+++ b/changes/2521-layday.md
@@ -0,0 +1 @@
+Allow passing `json_encoders` in class kwargs
diff --git a/pydantic/main.py b/pydantic/main.py
index f6aca41048f..37f005af87d 100644
--- a/pydantic/m... |
pypa__pipenv-2975 | pipenv graph fails: No module named 'pipenv'
### Issue description
With the newest version of pipenv (2018.10.9), `pipenv graph` fails with the error message `ModuleNotFoundError: No module named 'pipenv'`
### Expected result
I expected `pipenv graph` to output the dependency graph of the venv.
### Actual r... | [
{
"content": "from __future__ import print_function\nimport os\nimport sys\nfrom itertools import chain\nfrom collections import defaultdict\nimport argparse\nfrom operator import attrgetter\nimport json\nfrom importlib import import_module\n\ntry:\n from collections import OrderedDict\nexcept ImportError:\n... | [
{
"content": "from __future__ import print_function\nimport os\nimport sys\nfrom itertools import chain\nfrom collections import defaultdict\nimport argparse\nfrom operator import attrgetter\nimport json\nfrom importlib import import_module\n\ntry:\n from collections import OrderedDict\nexcept ImportError:\n... | diff --git a/news/2952.bugfix b/news/2952.bugfix
new file mode 100644
index 0000000000..df640991bc
--- /dev/null
+++ b/news/2952.bugfix
@@ -0,0 +1 @@
+Fixed a bug with importing local vendored dependencies when running ``pipenv graph``.
diff --git a/pipenv/vendor/pipdeptree.py b/pipenv/vendor/pipdeptree.py
index 9cce03... |
DataBiosphere__toil-1406 | Scaler thread shutdown error
File "/home/rnaenv/bin/toil-rnaseq", line 11, in <module>
sys.exit(main())
File "/home/rnaenv/local/lib/python2.7/site-packages/toil_rnaseq/rnaseq_cgl_pipeline.py", line 573, in main
Job.Runner.startToil(Job.wrapJobFn(map_job, download_sample, samples, config), args)
File "/usr/... | [
{
"content": "# Copyright (C) 2015-2016 Regents of the University of California\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-... | [
{
"content": "# Copyright (C) 2015-2016 Regents of the University of California\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-... | diff --git a/src/toil/provisioners/clusterScaler.py b/src/toil/provisioners/clusterScaler.py
index 009989f56b..4facdbb5fd 100644
--- a/src/toil/provisioners/clusterScaler.py
+++ b/src/toil/provisioners/clusterScaler.py
@@ -259,7 +259,7 @@ def shutdown(self):
self.stop = True
for scaler in self.preempt... |
django-cms__django-filer-1116 | Uncaught ReferenceError: django is not defined
When I try to create a new model with the content creation wizard that has a FilerImageField, I get an `Uncaught ReferenceError: django is not defined` at:
VM1967 dropzone.init.js:11
VM1969 popup_handling.js:46
VM1970 widget.js:4
(index):155
Why do... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport logging\nimport warnings\n\nfrom django import forms\nfrom django.contrib.admin.sites import site\nfrom django.contrib.admin.widgets import ForeignKeyRawIdWidget\nfrom django.db import models\nfrom django.template.loader imp... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\n\nimport logging\nimport warnings\n\nfrom django import forms\nfrom django.contrib.admin.sites import site\nfrom django.contrib.admin.widgets import ForeignKeyRawIdWidget\nfrom django.db import models\nfrom django.template.loader imp... | diff --git a/filer/fields/file.py b/filer/fields/file.py
index dd336e27f..156184182 100644
--- a/filer/fields/file.py
+++ b/filer/fields/file.py
@@ -87,6 +87,8 @@ class Media(object):
]
}
js = (
+ 'admin/js/vendor/jquery/jquery.js',
+ 'admin/js/jquery.init.js',
... |
Kinto__kinto-1786 | Remove colander deprecations
```
/home/mathieu/Code/Mozilla/kinto/.venv/lib/python3.6/site-packages/cornice/validators/_colander.py:110: DeprecationWarning: Setting schema to a class is deprecated. Set schema to an instance instead.
schema = _ensure_instantiated(schema)
```
| [
{
"content": "import logging\n\nimport colander\nfrom cornice.validators import colander_validator\nfrom pyramid import httpexceptions\nfrom pyramid.security import NO_PERMISSION_REQUIRED\n\nfrom kinto.core import errors\nfrom kinto.core import Service\nfrom kinto.core.errors import ErrorSchema\nfrom kinto.core... | [
{
"content": "import logging\n\nimport colander\nfrom cornice.validators import colander_validator\nfrom pyramid import httpexceptions\nfrom pyramid.security import NO_PERMISSION_REQUIRED\n\nfrom kinto.core import errors\nfrom kinto.core import Service\nfrom kinto.core.errors import ErrorSchema\nfrom kinto.core... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 6c398da4a..bffca1486 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -3,6 +3,14 @@ Changelog
This document describes changes between each past release.
+10.1.2 (2018-10-02)
+-------------------
+
+**Bug fixes**
+
+- Set schema to an instance instead of class (fixe... |
mlflow__mlflow-1788 | [BUG] Kubernetes Projects cannot push to private Docker repositories
Thank you for submitting an issue. Please refer to our [issue policy](https://www.github.com/mlflow/mlflow/blob/master/ISSUE_POLICY.md)
for information on what types of issues we address.
For help with debugging your code, please refer to [Stack O... | [
{
"content": "import imp\nimport os\nimport sys\nfrom setuptools import setup, find_packages\n\nversion = imp.load_source(\n 'mlflow.version', os.path.join('mlflow', 'version.py')).VERSION\n\n\n# Get a list of all files in the JS directory to include in our module\ndef package_files(directory):\n paths = ... | [
{
"content": "import imp\nimport os\nimport sys\nfrom setuptools import setup, find_packages\n\nversion = imp.load_source(\n 'mlflow.version', os.path.join('mlflow', 'version.py')).VERSION\n\n\n# Get a list of all files in the JS directory to include in our module\ndef package_files(directory):\n paths = ... | diff --git a/setup.py b/setup.py
index 6fb6f5b9f2264..9804e875bde51 100644
--- a/setup.py
+++ b/setup.py
@@ -45,11 +45,10 @@ def package_files(directory):
'pyyaml',
'querystring_parser',
'simplejson',
- 'docker>=3.6.0',
+ 'docker>=4.0.0',
'entrypoints',
'sqlpar... |
rootpy__rootpy-511 | 'TCanvas' object has no attribute 'name'
Hi,
I am seeing weird issues with the interactive module. It looks like the TCanvas is not 'decorated' when loading rootpy.interactive.
```
>>> from ROOT import *
>>> t = TCanvas()
>>> from rootpy.interactive import wait
/usr/local/lib/python2.7/site-packages/IPython/frontend.... | [
{
"content": "# Copyright 2012 the rootpy developers\n# distributed under the terms of the GNU General Public License\n\"\"\"\nThe functions in this module provide a way of pausing code execution until\ncanvases are closed. This can be useful when testing code and you don't want to\nkeep the objects alive outsi... | [
{
"content": "# Copyright 2012 the rootpy developers\n# distributed under the terms of the GNU General Public License\n\"\"\"\nThe functions in this module provide a way of pausing code execution until\ncanvases are closed. This can be useful when testing code and you don't want to\nkeep the objects alive outsi... | diff --git a/rootpy/interactive/rootwait.py b/rootpy/interactive/rootwait.py
index c0a87afe..754687fa 100644
--- a/rootpy/interactive/rootwait.py
+++ b/rootpy/interactive/rootwait.py
@@ -203,7 +203,7 @@ def exit_application_loop():
visible_canvases = get_visible_canvases()
for canvas in visible_canvases:
- ... |
pydantic__pydantic-1253 | Broken loading list of tuples.
# Bug
Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
```
pydantic version: 1.4
pydantic compiled: True
install path: /home/**removed**/venv/lib/python3.7/site-packages/pydantic
python version: 3.7.3 (default, Apr 3 2019, 19:16:38) [GCC 8.0.1... | [
{
"content": "import json\nimport sys\nimport warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n Dic... | [
{
"content": "import json\nimport sys\nimport warnings\nfrom abc import ABCMeta\nfrom copy import deepcopy\nfrom enum import Enum\nfrom functools import partial\nfrom pathlib import Path\nfrom types import FunctionType\nfrom typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple, Type, TypeVar,... | diff --git a/changes/1190-Shados.md b/changes/1190-Shados.md
new file mode 100644
index 00000000000..7cc66b1259b
--- /dev/null
+++ b/changes/1190-Shados.md
@@ -0,0 +1 @@
+Fixed parsing of nested 'custom root type' models.
diff --git a/pydantic/main.py b/pydantic/main.py
index 993f55c22f9..e007f98368a 100644
--- a/pydan... |
pantsbuild__pants-15341 | Use of relative PATH for docker-tool shims prevents use of credential helpers
**Describe the bug**
I'm trying to set up [tools](https://www.pantsbuild.org/docs/reference-docker#section-tools) in my repo's `docker` subsystem, to plug in the [ECR credential helper](https://github.com/awslabs/amazon-ecr-credential-helper... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport os\nfrom dataclasses import dataclass\nfrom typing import Mapping\n\nfrom pants.backend.docker.subsystems.docker_optio... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport os\nfrom dataclasses import dataclass\nfrom typing import Mapping\n\nfrom pants.backend.docker.subsystems.docker_optio... | diff --git a/src/python/pants/backend/docker/util_rules/docker_binary.py b/src/python/pants/backend/docker/util_rules/docker_binary.py
index 2cc8fa0adbf..aa53df01192 100644
--- a/src/python/pants/backend/docker/util_rules/docker_binary.py
+++ b/src/python/pants/backend/docker/util_rules/docker_binary.py
@@ -150,7 +150,... |
tobymao__sqlglot-2165 | Spark raw String Support, comonly used with regexes
This fails with sqlglot:
```python
import sqlglot
sql = """select regexp_replace('100-200', r'([^0-9])', '')"""
sqlglot.parse_one(sql, read="databricks")
```
**Official Documentation**
https://spark.apache.org/docs/latest/sql-ref-literals.html
| [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.dialect import rename_func\nfrom sqlglot.dialects.spark2 import Spark2\nfrom sqlglot.helper import seq_get\n\n\ndef _parse_datediff(args: t.List) -> exp.Expression:\n \"\"\"\n Although ... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.dialect import rename_func\nfrom sqlglot.dialects.spark2 import Spark2\nfrom sqlglot.helper import seq_get\n\n\ndef _parse_datediff(args: t.List) -> exp.Expression:\n \"\"\"\n Although ... | diff --git a/sqlglot/dialects/spark.py b/sqlglot/dialects/spark.py
index a4435f6692..9d4a1abeb2 100644
--- a/sqlglot/dialects/spark.py
+++ b/sqlglot/dialects/spark.py
@@ -35,6 +35,13 @@ def _parse_datediff(args: t.List) -> exp.Expression:
class Spark(Spark2):
+ class Tokenizer(Spark2.Tokenizer):
+ RAW_ST... |
Gallopsled__pwntools-2051 | Double decoding in util.packing._need_text
I noticed that if you send a bytestring to e.g. log.info(), you get an AttributeError:
`AttributeError: 'str' object has no attribute 'decode'`
This is because of the following line:
https://github.com/Gallopsled/pwntools/blob/ef698d4562024802be5cc3e2fa49333c70a96662/pwnl... | [
{
"content": " # -*- coding: utf-8 -*-\nr\"\"\"\nModule for packing and unpacking integers.\n\nSimplifies access to the standard ``struct.pack`` and ``struct.unpack``\nfunctions, and also adds support for packing/unpacking arbitrary-width\nintegers.\n\nThe packers are all context-aware for ``endian`` and ``sign... | [
{
"content": " # -*- coding: utf-8 -*-\nr\"\"\"\nModule for packing and unpacking integers.\n\nSimplifies access to the standard ``struct.pack`` and ``struct.unpack``\nfunctions, and also adds support for packing/unpacking arbitrary-width\nintegers.\n\nThe packers are all context-aware for ``endian`` and ``sign... | diff --git a/pwnlib/util/packing.py b/pwnlib/util/packing.py
index 7638865a9..9af06bfc8 100644
--- a/pwnlib/util/packing.py
+++ b/pwnlib/util/packing.py
@@ -1040,7 +1040,7 @@ def _need_text(s, level=1):
if encoding == 'auto':
for encoding in 'ASCII', 'UTF-8', 'ISO-8859-1':
try:
- ... |
cookiecutter__cookiecutter-753 | Bug for replay feature from pwd
Running the following command inside of a template repo:
`$ cookiecutter -o tmp .`
Will cause `replay.dump` to files like this:
`~/.cookiecutter_replay/..json`
Identified by @eliasdorneles
| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ncookiecutter.main\n-----------------\n\nMain entry point for the `cookiecutter` command.\n\nThe code in this module is also a good example of how to use Cookiecutter as a\nlibrary rather than a script.\n\"\"\"\n\nfrom __future__ import unic... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ncookiecutter.main\n-----------------\n\nMain entry point for the `cookiecutter` command.\n\nThe code in this module is also a good example of how to use Cookiecutter as a\nlibrary rather than a script.\n\"\"\"\n\nfrom __future__ import unic... | diff --git a/cookiecutter/main.py b/cookiecutter/main.py
index d8ff7b6c7..0900142cd 100644
--- a/cookiecutter/main.py
+++ b/cookiecutter/main.py
@@ -116,7 +116,7 @@ def cookiecutter(
'The repository {0} could not be located.'.format(template)
)
- template_name = os.path.basename(template)
+ ... |
aws-cloudformation__cfn-lint-2386 | E0002 parsing I3013 on AWS::RDS::DBInstance if Engine is a Ref
### CloudFormation Lint Version
0.65.0
### What operating system are you using?
Ubuntu 22.04
### Describe the bug
A cfn-lint exception is raised when parsing I3013 rule.
The trigger seems to be the presence of a reference as a value of the "Engine" ... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport re\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\n\n\nclass RetentionPeriodOnResourceTypesWithAutoExpiringContent(CloudFormationLintRu... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport re\nfrom cfnlint.rules import CloudFormationLintRule\nfrom cfnlint.rules import RuleMatch\n\n\nclass RetentionPeriodOnResourceTypesWithAutoExpiringContent(CloudFormationLintRu... | diff --git a/src/cfnlint/rules/resources/RetentionPeriodOnResourceTypesWithAutoExpiringContent.py b/src/cfnlint/rules/resources/RetentionPeriodOnResourceTypesWithAutoExpiringContent.py
index 338966f2b8..3cb3017f0b 100644
--- a/src/cfnlint/rules/resources/RetentionPeriodOnResourceTypesWithAutoExpiringContent.py
+++ b/sr... |
electricitymaps__electricitymaps-contrib-1599 | GB-NIR invalid data in database
The latest observation seems to be problematic:

therefore it is not shown on the map. However it is inserted in the database.
We should add proper validations to make sure... | [
{
"content": "#!/usr/bin/env python3\n\nfrom collections import defaultdict\nfrom datetime import datetime\nfrom io import StringIO\nfrom operator import itemgetter\n\nimport logging\nimport pandas as pd\nimport requests\nfrom bs4 import BeautifulSoup\nfrom dateutil import parser, tz\n\nfrom .lib.validation imp... | [
{
"content": "#!/usr/bin/env python3\n\nfrom collections import defaultdict\nfrom datetime import datetime\nfrom io import StringIO\nfrom operator import itemgetter\n\nimport logging\nimport pandas as pd\nimport requests\nfrom bs4 import BeautifulSoup\nfrom dateutil import parser, tz\n\nfrom .lib.validation imp... | diff --git a/parsers/GB_NIR.py b/parsers/GB_NIR.py
index 5379e28bbd..3db1b819c4 100644
--- a/parsers/GB_NIR.py
+++ b/parsers/GB_NIR.py
@@ -277,7 +277,7 @@ def fetch_production(zone_key='GB-NIR', session=None, target_datetime=None,
'source': 'soni.ltd.uk'
}
production_mix_by_quarter_hour.a... |
docker__docker-py-753 | Slightly incorrect documentation for user parameter in create_container?
The documentation for `user` parameter in `create_container` says:
`user (str or int): Username or UID`
However, supplying it as python's int(`client.create_container(user=1000, ...)`) gives
`docker.errors.APIError: 500 Server Error: Internal ... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index 8dc726b34..c49b3e585 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -715,7 +715,7 @@ def create_container_config(
'Hostname': hostname,
'Domainname': domainname,
'ExposedPorts': ports,
- 'User': user,
+... |
mkdocs__mkdocs-2071 | How to add a watched directory
The docs says:
> The serve event is only called when the serve command is used during development. It is passed the Server instance which can be modified before it is activated. For example, additional files or directories could be added to the list of "watched" files for auto-reloadin... | [
{
"content": "import logging\nimport shutil\nimport tempfile\nimport sys\n\nfrom os.path import isfile, join\nfrom mkdocs.commands.build import build\nfrom mkdocs.config import load_config\n\nlog = logging.getLogger(__name__)\n\n\ndef _init_asyncio_patch():\n \"\"\"\n Select compatible event loop for Torn... | [
{
"content": "import logging\nimport shutil\nimport tempfile\nimport sys\n\nfrom os.path import isfile, join\nfrom mkdocs.commands.build import build\nfrom mkdocs.config import load_config\n\nlog = logging.getLogger(__name__)\n\n\ndef _init_asyncio_patch():\n \"\"\"\n Select compatible event loop for Torn... | diff --git a/docs/about/release-notes.md b/docs/about/release-notes.md
index 2b81e42552..392f533942 100644
--- a/docs/about/release-notes.md
+++ b/docs/about/release-notes.md
@@ -23,6 +23,8 @@ The current and past members of the MkDocs team.
## Version 1.1.1 (in development)
+* Bugfix: Pass `builder` to the `on_se... |
TheAlgorithms__Python-7556 | [PYTEST WARNING] QasmSimulator will be deprecated
### Feature description
The use of `q.Aer.get_backend("qasm_simulator")` raises the warning
```
/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/qiskit_aer/backends/qasm_simulator.py:360: PendingDeprecationWarning: The `QasmSimulator` backend will ... | [
{
"content": "\"\"\"\nBuild the superdense coding protocol. This quantum\ncircuit can send two classical bits using one quantum\nbit. This circuit is designed using the Qiskit\nframework. This experiment run in IBM Q simulator\nwith 1000 shots.\n.\nReferences:\nhttps://qiskit.org/textbook/ch-algorithms/superden... | [
{
"content": "\"\"\"\nBuild the superdense coding protocol. This quantum\ncircuit can send two classical bits using one quantum\nbit. This circuit is designed using the Qiskit\nframework. This experiment run in IBM Q simulator\nwith 1000 shots.\n.\nReferences:\nhttps://qiskit.org/textbook/ch-algorithms/superden... | diff --git a/quantum/superdense_coding.py b/quantum/superdense_coding.py
index c8eda381158b..10ebc2d3593c 100644
--- a/quantum/superdense_coding.py
+++ b/quantum/superdense_coding.py
@@ -92,7 +92,7 @@ def superdense_coding(bit_1: int = 1, bit_2: int = 1) -> qiskit.result.counts.Co
# measure the circuit
quantu... |
pwr-Solaar__Solaar-1810 | eliminate visual glitching when updating a setting
**Information**
- Solaar version (`solaar --version` and `git describe --tags`): 1.1.6
**Is your feature request related to a problem? Please describe.**
Some setting displays glitch when updated, maybe only range settings. For a very short time, a spinne... | [
{
"content": "# -*- python-mode -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your... | [
{
"content": "# -*- python-mode -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your... | diff --git a/lib/solaar/ui/config_panel.py b/lib/solaar/ui/config_panel.py
index 9c019af749..b54736712c 100644
--- a/lib/solaar/ui/config_panel.py
+++ b/lib/solaar/ui/config_panel.py
@@ -593,7 +593,7 @@ def _create_sbox(s, device):
def _update_setting_item(sbox, value, is_online=True, sensitive=True):
- sbox._s... |
huggingface__trl-528 | DPO evaluation error---tensors on two devices
Hi!
Thanks for the awesome codebase. I ran the DPO example `trl/examples/dpo.py` but encountered an error at the evaluation step: `Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!`
Here is a [colab notebook](https://colab.... | [
{
"content": "# DPO Authors: Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D. Manning, and Chelsea Finn 2023\n# Copyright 2023 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 com... | [
{
"content": "# DPO Authors: Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher D. Manning, and Chelsea Finn 2023\n# Copyright 2023 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 com... | diff --git a/trl/trainer/dpo_trainer.py b/trl/trainer/dpo_trainer.py
index 483c9f3cd5..6218fc7512 100644
--- a/trl/trainer/dpo_trainer.py
+++ b/trl/trainer/dpo_trainer.py
@@ -204,7 +204,7 @@ def concatenated_inputs(self, batch: Dict[str, Union[List, torch.LongTensor]]) -
pad_to_length(batch[k],... |
python-poetry__poetry-794 | Support customizable POETRY_HOME
It would be nice to define where poetry gets installed (via get-poetry.py).
By reading the docstring I had assumed it would work in $POETRY_HOME, but that was quickly disproven.
Ideally this could be defined via an environment variable (POETRY_HOME) or via a flag to get-poetry.py.... | [
{
"content": "\"\"\"\nThis script will install poetry and its dependencies\nin isolation from the rest of the system.\n\nIt does, in order:\n\n - Downloads the latest stable (or pre-release) version of poetry.\n - Downloads all its dependencies in the poetry/_vendor directory.\n - Copies it and all extra fil... | [
{
"content": "\"\"\"\nThis script will install poetry and its dependencies\nin isolation from the rest of the system.\n\nIt does, in order:\n\n - Downloads the latest stable (or pre-release) version of poetry.\n - Downloads all its dependencies in the poetry/_vendor directory.\n - Copies it and all extra fil... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9e4f35cf2ee..fc28d7e1a93 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@
- Added a `env use` command to control the Python version used by the project.
- Added a `env list` command to list the virtualenvs associated with the current project.
- Added a `env ... |
nautobot__nautobot-1199 | JobResult page may fail to list JobLogEntries in chronological order
### Environment
* Python version: 3.6
* Nautobot version: 1.2.1
### Steps to Reproduce
Unsure at this time
<!-- What did you expect to happen? -->
### Expected Behavior
JobLogEntries to be listed in chronological order.
<!-- What happe... | [
{
"content": "import inspect\n\nimport django_tables2 as tables\n\nfrom django.conf import settings\nfrom django.urls import reverse\nfrom django.utils.html import format_html\nfrom django.utils.safestring import mark_safe\nfrom django_tables2.utils import Accessor\nfrom jsonschema.exceptions import ValidationE... | [
{
"content": "import inspect\n\nimport django_tables2 as tables\n\nfrom django.conf import settings\nfrom django.urls import reverse\nfrom django.utils.html import format_html\nfrom django.utils.safestring import mark_safe\nfrom django_tables2.utils import Accessor\nfrom jsonschema.exceptions import ValidationE... | diff --git a/nautobot/extras/tables.py b/nautobot/extras/tables.py
index ad0278e2cca..bfddba8717d 100644
--- a/nautobot/extras/tables.py
+++ b/nautobot/extras/tables.py
@@ -389,7 +389,7 @@ def log_entry_color_css(record):
class JobLogEntryTable(BaseTable):
- created = tables.DateTimeColumn(verbose_name="Time", ... |
chainer__chainer-5613 | F.negative_sampling outputs float32 loss for any input dtypes, only in CPU mode
Version: current master b9e9267237d60b76211f42d13f80938d1b926e74
### Code to reproduce
```py
import chainer
import chainer.functions as F
import numpy
import cupy
batch_size = 2
in_size = 5
n_classes = 3
sample_size = 4
def... | [
{
"content": "import numpy\nimport six\n\nimport chainer\nfrom chainer import backend\nfrom chainer.backends import cuda\nfrom chainer import function_node\nfrom chainer.utils import argument\nfrom chainer.utils import type_check\n\n\ndef _sigmoid_grad(x, y, gy):\n return chainer.functions.activation.sigmoid... | [
{
"content": "import numpy\nimport six\n\nimport chainer\nfrom chainer import backend\nfrom chainer.backends import cuda\nfrom chainer import function_node\nfrom chainer.utils import argument\nfrom chainer.utils import type_check\n\n\ndef _sigmoid_grad(x, y, gy):\n return chainer.functions.activation.sigmoid... | diff --git a/chainer/functions/loss/negative_sampling.py b/chainer/functions/loss/negative_sampling.py
index f6d0c2bd9b90..9ec9a935127d 100644
--- a/chainer/functions/loss/negative_sampling.py
+++ b/chainer/functions/loss/negative_sampling.py
@@ -67,7 +67,7 @@ def forward_cpu(self, inputs):
loss[self.ignore_ma... |
arviz-devs__arviz-1334 | Fix negative values in std
edit. There is an error in the numeric_utils.
This is a wrong order of operations
std_devs = np.diag(cov ** 0.5)
Correct order is
std_devs = np.diag(cov) ** 0.5
| [
{
"content": "\"\"\"Numerical utility functions for ArviZ.\"\"\"\nimport warnings\nimport numpy as np\nfrom scipy.signal import convolve, convolve2d\nfrom scipy.signal.windows import gaussian\nfrom scipy.sparse import coo_matrix\n\nfrom .stats.stats_utils import histogram\nfrom .utils import _stack, _dot, _cov\... | [
{
"content": "\"\"\"Numerical utility functions for ArviZ.\"\"\"\nimport warnings\nimport numpy as np\nfrom scipy.signal import convolve, convolve2d\nfrom scipy.signal.windows import gaussian\nfrom scipy.sparse import coo_matrix\n\nfrom .stats.stats_utils import histogram\nfrom .utils import _stack, _dot, _cov\... | diff --git a/arviz/numeric_utils.py b/arviz/numeric_utils.py
index 6731265a86..c849b251d0 100644
--- a/arviz/numeric_utils.py
+++ b/arviz/numeric_utils.py
@@ -124,7 +124,7 @@ def _fast_kde_2d(x, y, gridsize=(128, 128), circular=False):
scotts_factor = len_x ** (-1 / 6)
cov = _cov(xyi)
- std_devs = np.dia... |
encode__uvicorn-1534 | Latest version breaks something in the h11 implementation
I'm using uvicorn to run a FastAPI application. I just download the latest uvicorn version 0.18.0 and got the following error when trying to run my app:
```
Fatal error: protocol.data_received() call failed.
protocol: <uvicorn.protocols.http.h11_impl.H11Proto... | [
{
"content": "import logging\nimport os\nimport platform\nimport ssl\nimport sys\nimport typing\n\nimport click\nfrom h11._connection import DEFAULT_MAX_INCOMPLETE_EVENT_SIZE\n\nimport uvicorn\nfrom uvicorn.config import (\n HTTP_PROTOCOLS,\n INTERFACES,\n LIFESPAN,\n LOG_LEVELS,\n LOGGING_CONFIG... | [
{
"content": "import logging\nimport os\nimport platform\nimport ssl\nimport sys\nimport typing\n\nimport click\nfrom h11._connection import DEFAULT_MAX_INCOMPLETE_EVENT_SIZE\n\nimport uvicorn\nfrom uvicorn.config import (\n HTTP_PROTOCOLS,\n INTERFACES,\n LIFESPAN,\n LOG_LEVELS,\n LOGGING_CONFIG... | diff --git a/uvicorn/main.py b/uvicorn/main.py
index ac6096722..58e01305a 100644
--- a/uvicorn/main.py
+++ b/uvicorn/main.py
@@ -346,7 +346,7 @@ def print_version(ctx: click.Context, param: click.Parameter, value: bool) -> No
"--h11-max-incomplete-event-size",
"h11_max_incomplete_event_size",
type=int,
-... |
encode__django-rest-framework-5849 | RelatedField (and their subclasses) do not support traversing relationships that can be null
This was introduced by #5518, and while the solutions there work on normal fields, RelatedField behaves differently:
https://github.com/encode/django-rest-framework/blob/da535d31dd93dbb1d650e2e92bd0910ca8eb4ea4/rest_framewor... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nfrom collections import OrderedDict\n\nfrom django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist\nfrom django.db.models import Manager\nfrom django.db.models.query import QuerySet\nfrom django.urls import NoReverseMatch,... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nfrom collections import OrderedDict\n\nfrom django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist\nfrom django.db.models import Manager\nfrom django.db.models.query import QuerySet\nfrom django.urls import NoReverseMatch,... | diff --git a/rest_framework/relations.py b/rest_framework/relations.py
index c87b9299ab..c4e364cf25 100644
--- a/rest_framework/relations.py
+++ b/rest_framework/relations.py
@@ -174,7 +174,7 @@ def get_attribute(self, instance):
pass
# Standard case, return the object instance.
- ret... |
zestedesavoir__zds-site-672 | Avoir un rappel des bases du Mardkown à côté des zones de rédaction
L'idée est d'avoir un rappel des bases du Mardkown à côté des zones de rédaction (les grandes lignes + un lien vers le tuto).
Je sais qu'on a les boutons, mais c'est toujours utile pour ceux qui préfèrent éviter de jouer avec la souris, et je pense am... | [
{
"content": "# coding: utf-8\n\nimport locale\nimport os\nimport platform\n\n\n# Python is platform-independent...or is it?\nif platform.system() == \"Windows\":\n locale.setlocale(locale.LC_TIME, 'fra')\nelse:\n locale.setlocale(locale.LC_TIME, 'fr_FR.UTF-8')\n\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n# I... | [
{
"content": "# coding: utf-8\n\nimport locale\nimport os\nimport platform\n\n\n# Python is platform-independent...or is it?\nif platform.system() == \"Windows\":\n locale.setlocale(locale.LC_TIME, 'fra')\nelse:\n locale.setlocale(locale.LC_TIME, 'fr_FR.UTF-8')\n\nDEBUG = True\nTEMPLATE_DEBUG = DEBUG\n# I... | diff --git a/assets/css/main.css b/assets/css/main.css
index f55d6ebd09..05d1e05c26 100644
--- a/assets/css/main.css
+++ b/assets/css/main.css
@@ -1 +1 @@
-/*! normalize.css v1.1.2 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audi... |
geopandas__geopandas-2172 | Empty overlay intersection causes error
The new implementation of ``overlay`` generates an error if the intersection is empty. Here is a reproducible code:
```python
import geopandas as gpd
from geopandas.tools import overlay
from shapely.geometry import Polygon
polys1 = gpd.GeoSeries([Polygon([(0,0), (2,0), (2,... | [
{
"content": "import warnings\nfrom functools import reduce\n\nimport numpy as np\nimport pandas as pd\n\nfrom geopandas import GeoDataFrame, GeoSeries\nfrom geopandas.array import _check_crs, _crs_mismatch_warn\n\n\ndef _ensure_geometry_column(df):\n \"\"\"\n Helper function to ensure the geometry column... | [
{
"content": "import warnings\nfrom functools import reduce\n\nimport numpy as np\nimport pandas as pd\n\nfrom geopandas import GeoDataFrame, GeoSeries\nfrom geopandas.array import _check_crs, _crs_mismatch_warn\n\n\ndef _ensure_geometry_column(df):\n \"\"\"\n Helper function to ensure the geometry column... | diff --git a/geopandas/tests/test_overlay.py b/geopandas/tests/test_overlay.py
index 1efee5dd2c..058da69b10 100644
--- a/geopandas/tests/test_overlay.py
+++ b/geopandas/tests/test_overlay.py
@@ -723,3 +723,14 @@ def test_non_overlapping(how):
)
assert_geodataframe_equal(result, expected)
+
+
+def test_n... |
paperless-ngx__paperless-ngx-1666 | [BUG] Wrong version number string within docker 1.9.1
### Description
After a successful pull and deploy via docker with https://ghcr.io/paperless-ngx/paperless-ngx:1.9.1 the version string on the paperless-ngx Web-UI is still 1.9.0.
\n# Version string like X.Y.Z\n__full_version_str__: Final[str] = \".\".join(map(str, __version__))\n# Version string like X.Y\n__major_minor_version_str__: Final[str] = \".\".join(map(str, __... | [
{
"content": "from typing import Final\nfrom typing import Tuple\n\n__version__: Final[Tuple[int, int, int]] = (1, 9, 2)\n# Version string like X.Y.Z\n__full_version_str__: Final[str] = \".\".join(map(str, __version__))\n# Version string like X.Y\n__major_minor_version_str__: Final[str] = \".\".join(map(str, __... | diff --git a/src-ui/src/environments/environment.prod.ts b/src-ui/src/environments/environment.prod.ts
index 92f388ec872..48ea3f98822 100644
--- a/src-ui/src/environments/environment.prod.ts
+++ b/src-ui/src/environments/environment.prod.ts
@@ -5,7 +5,7 @@ export const environment = {
apiBaseUrl: document.baseURI + ... |
conda__conda-build-389 | MD5 checking argument not passed to update_index
I was happy to see that there was a `-c` argument to `conda index` which forces it to use md5 hashes instead of file modification times. However, looks like `main_index.py` never passes that argument on to the `update_index()` function, i.e.,
``` python
...
update_inde... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport argparse\nimport os\nfrom locale import getpreferredencoding\nfrom os.path import abspath\n\nfrom conda.compat import PY3\n\nfrom conda_build.index import update_index\n\n\ndef main():\n p = argparse.ArgumentParser(\n ... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport argparse\nimport os\nfrom locale import getpreferredencoding\nfrom os.path import abspath\n\nfrom conda.compat import PY3\n\nfrom conda_build.index import update_index\n\n\ndef main():\n p = argparse.ArgumentParser(\n ... | diff --git a/conda_build/main_index.py b/conda_build/main_index.py
index e3a9b10c16..47310e8dd6 100644
--- a/conda_build/main_index.py
+++ b/conda_build/main_index.py
@@ -40,7 +40,7 @@ def main():
dir_paths = [path.decode(getpreferredencoding()) for path in dir_paths]
for path in dir_paths:
- upd... |
adamchainz__django-perf-rec-266 | perf.yml files created with executable bit set
I've just spotted that my test.perf.yml are marked executable in git, which is surprising as they're YAML files (which aren't executable).
As far as I know, none of the the developers are using Windows (only a mixture of macOS and Linux), so I'm not expecting this to be... | [
{
"content": "import errno\nimport os\n\nimport yaml\nfrom django.core.files import locks\n\n\nclass KVFile:\n def __init__(self, file_name):\n self.file_name = file_name\n self.data = self.load(file_name)\n\n def __len__(self):\n return len(self.data)\n\n LOAD_CACHE = {}\n\n @c... | [
{
"content": "import errno\nimport os\n\nimport yaml\nfrom django.core.files import locks\n\n\nclass KVFile:\n def __init__(self, file_name):\n self.file_name = file_name\n self.data = self.load(file_name)\n\n def __len__(self):\n return len(self.data)\n\n LOAD_CACHE = {}\n\n @c... | diff --git a/HISTORY.rst b/HISTORY.rst
index d82a49d6..3b783c05 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,6 +1,12 @@
History
=======
+* Create YAML files as non-executable. This will not be applied to existing
+ files, modify their permissions if necessary, or delete and recreate.
+
+ Thanks to Peter Law f... |
encode__httpx-139 | API design question - `Response.url`
Currently our `Response.url` attribute exposes a `URL` instance.
This is a breaking change from the requests API where it just exposes a plain string.
It's feasible that we should instead only be exposing plain string URLs, in order to aim for drop-in replacement API compatibi... | [
{
"content": "import cgi\nimport email.message\nimport json as jsonlib\nimport typing\nimport urllib.request\nfrom collections.abc import MutableMapping\nfrom http.cookiejar import Cookie, CookieJar\nfrom urllib.parse import parse_qsl, urlencode\n\nimport chardet\nimport rfc3986\n\nfrom .config import USER_AGEN... | [
{
"content": "import cgi\nimport email.message\nimport json as jsonlib\nimport typing\nimport urllib.request\nfrom collections.abc import MutableMapping\nfrom http.cookiejar import Cookie, CookieJar\nfrom urllib.parse import parse_qsl, urlencode\n\nimport chardet\nimport rfc3986\n\nfrom .config import USER_AGEN... | diff --git a/httpx/models.py b/httpx/models.py
index 710c0303df..9cbdc250e2 100644
--- a/httpx/models.py
+++ b/httpx/models.py
@@ -204,7 +204,7 @@ def __hash__(self) -> int:
return hash(str(self))
def __eq__(self, other: typing.Any) -> bool:
- return isinstance(other, URL) and str(self) == str(ot... |
LMFDB__lmfdb-2975 | Could not download the elliptic curves of norm conductor 1
From the feedback page:
I could not download the elliptic curves of norm conductor 1 into a magma file.
Please respond to brumer@fordham.edu
| [
{
"content": "# -*- coding: utf-8 -*-\n# This Blueprint is about Elliptic Curves over Number Fields\n# Authors: Harald Schilly and John Cremona\n\nimport ast, re, StringIO, time\nfrom operator import mul\nfrom urllib import quote, unquote\n\nfrom flask import render_template, request, url_for, redirect, flash, ... | [
{
"content": "# -*- coding: utf-8 -*-\n# This Blueprint is about Elliptic Curves over Number Fields\n# Authors: Harald Schilly and John Cremona\n\nimport ast, re, StringIO, time\nfrom operator import mul\nfrom urllib import quote, unquote\n\nfrom flask import render_template, request, url_for, redirect, flash, ... | diff --git a/lmfdb/ecnf/main.py b/lmfdb/ecnf/main.py
index 9b365cbc9b..5dc161bd3f 100644
--- a/lmfdb/ecnf/main.py
+++ b/lmfdb/ecnf/main.py
@@ -378,7 +378,7 @@ def show_ecnf(nf, conductor_label, class_label, number):
learnmore=learnmore_list())
def download_search(info):
- dltype = info... |
liqd__a4-meinberlin-488 | Login with username
It is currently not possible to login with username, only with email. This *was* possible with the old meinberlin that was based on a3. So the login flow of established users breaks even though we migrated all accounts.
| [
{
"content": "\"\"\"\nDjango settings for meinberlin project.\n\nGenerated by 'django-admin startproject' using Django 1.8.17.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/... | [
{
"content": "\"\"\"\nDjango settings for meinberlin project.\n\nGenerated by 'django-admin startproject' using Django 1.8.17.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.8/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/... | diff --git a/meinberlin/settings/base.py b/meinberlin/settings/base.py
index e5c634d93e..8be4c29c06 100644
--- a/meinberlin/settings/base.py
+++ b/meinberlin/settings/base.py
@@ -218,7 +218,7 @@
)
ACCOUNT_ADAPTER = 'apps.users.adapters.AccountAdapter'
-ACCOUNT_AUTHENTICATION_METHOD = 'email'
+ACCOUNT_AUTHENTICATION... |
pyg-team__pytorch_geometric-8179 | Dataset is not undirected
### 🐛 Describe the bug
Dataset is not undirected, despite passing ``to_undirected=True`` flag.
```python
# !pip install pyg-nightly
from torch_geometric.datasets import CitationFull
from torch_geometric.utils import is_undirected
edge_index = CitationFull(root=".", name="Cora_ML",... | [
{
"content": "import os.path as osp\nfrom typing import Callable, Optional\n\nimport torch\n\nfrom torch_geometric.data import InMemoryDataset, download_url\nfrom torch_geometric.io import read_npz\n\n\nclass CitationFull(InMemoryDataset):\n r\"\"\"The full citation network datasets from the\n `\"Deep Gau... | [
{
"content": "import os.path as osp\nfrom typing import Callable, Optional\n\nimport torch\n\nfrom torch_geometric.data import InMemoryDataset, download_url\nfrom torch_geometric.io import read_npz\n\n\nclass CitationFull(InMemoryDataset):\n r\"\"\"The full citation network datasets from the\n `\"Deep Gau... | diff --git a/torch_geometric/datasets/citation_full.py b/torch_geometric/datasets/citation_full.py
index 70c2d6f51b76..a1a305ce064b 100644
--- a/torch_geometric/datasets/citation_full.py
+++ b/torch_geometric/datasets/citation_full.py
@@ -98,7 +98,8 @@ def raw_file_names(self) -> str:
@property
def processe... |
getsentry__sentry-5094 | Webhook data does not have event id
Webhook data contains issue id only. It would be nice to have event id as well.
Discussed with @mattrobenolt on IRC. Documenting it here with this issue.
| [
{
"content": "from __future__ import absolute_import\n\nimport logging\nimport six\nimport sentry\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom sentry.exceptions import PluginError\nfrom sentry.plugins.bases import notify\nfrom sen... | [
{
"content": "from __future__ import absolute_import\n\nimport logging\nimport six\nimport sentry\n\nfrom django import forms\nfrom django.conf import settings\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom sentry.exceptions import PluginError\nfrom sentry.plugins.bases import notify\nfrom sen... | diff --git a/src/sentry/plugins/sentry_webhooks/plugin.py b/src/sentry/plugins/sentry_webhooks/plugin.py
index 3bfac698fc4bf4..f25c7546a3a559 100644
--- a/src/sentry/plugins/sentry_webhooks/plugin.py
+++ b/src/sentry/plugins/sentry_webhooks/plugin.py
@@ -87,6 +87,8 @@ def get_group_data(self, group, event):
}
... |
joke2k__faker-435 | Published packages include docs/ as a module
The published wheel and sdist on PyPI for at least version 0.7.5 include `docs/__init__.py` as a top-level module in addition to `faker`. This conflicts with some other packages we use (PyICU) and seems like bad package hygiene, especially since the `docs` dir in this reposi... | [
{
"content": "#!/usr/bin/env python\n# coding=utf-8\n\nimport os\nimport io\n\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = io.open(os.path.join(here, 'README.rst'), encoding=\"utf8\").read()\n\n\nversion = '0.7.5'\n\n# this module can be zip-safe if... | [
{
"content": "#!/usr/bin/env python\n# coding=utf-8\n\nimport os\nimport io\n\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\nREADME = io.open(os.path.join(here, 'README.rst'), encoding=\"utf8\").read()\n\n\nversion = '0.7.5'\n\n# this module can be zip-safe if... | diff --git a/setup.py b/setup.py
index a4582f7970..7584c0187b 100644
--- a/setup.py
+++ b/setup.py
@@ -51,7 +51,7 @@
author_email='joke2k@gmail.com',
url='https://github.com/joke2k/faker',
license='MIT License',
- packages=find_packages(),
+ packages=find_packages(exclude=("docs",)),
platforms... |
aio-libs__aiohttp-1854 | Sub app middlewares are called before main app,
## Long story short
According to http://aiohttp.readthedocs.io/en/stable/web.html#nested-applications,
`[I]f URL is '/admin/something' middlewares from [main application] are applied first and [sub application] middlewares are the next in the call chain.`
It turn... | [
{
"content": "import asyncio\nimport os\nimport socket\nimport stat\nimport sys\nimport warnings\nfrom argparse import ArgumentParser\nfrom collections import Iterable, MutableMapping\nfrom importlib import import_module\n\nfrom yarl import URL\n\nfrom . import (hdrs, web_exceptions, web_fileresponse, web_middl... | [
{
"content": "import asyncio\nimport os\nimport socket\nimport stat\nimport sys\nimport warnings\nfrom argparse import ArgumentParser\nfrom collections import Iterable, MutableMapping\nfrom importlib import import_module\n\nfrom yarl import URL\n\nfrom . import (hdrs, web_exceptions, web_fileresponse, web_middl... | diff --git a/CHANGES.rst b/CHANGES.rst
index 7283d2b4cd8..432137c526c 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -31,6 +31,8 @@ Changes
- Do not unquote `+` in match_info values #1816
+- Fix sub-application middlewares resolution order #1853
+
2.0.7 (2017-04-12)
------------------
diff --git a/CONTRIBUTORS.... |
pymodbus-dev__pymodbus-1604 | pymodbus.server does not listen on modbus port
<!--
Before opening a new issue, make sure you do the following:
- Check that your issue isn't already filed: https://github.com/pymodbus-dev/pymodbus/issues
- Check the discussions forum https://github.com/pymodbus-dev/pymodbus/discussions
- Prepare a short, runnabl... | [
{
"content": "\"\"\"Repl server main.\"\"\"\nimport asyncio\nimport json\nimport logging\nimport sys\nfrom enum import Enum\nfrom pathlib import Path\nfrom typing import List\n\nimport typer\n\nfrom pymodbus import pymodbus_apply_logging_config\nfrom pymodbus.framer.socket_framer import ModbusSocketFramer\nfrom... | [
{
"content": "\"\"\"Repl server main.\"\"\"\nimport asyncio\nimport json\nimport logging\nimport sys\nfrom enum import Enum\nfrom pathlib import Path\nfrom typing import List\n\nimport typer\n\nfrom pymodbus import pymodbus_apply_logging_config\nfrom pymodbus.framer.socket_framer import ModbusSocketFramer\nfrom... | diff --git a/pymodbus/repl/server/main.py b/pymodbus/repl/server/main.py
index 1c72e9b0a..bb01e64d7 100644
--- a/pymodbus/repl/server/main.py
+++ b/pymodbus/repl/server/main.py
@@ -198,10 +198,10 @@ def run(
**web_app_config,
**modbus_config,
)
+ loop.run_until_complete(app.run_async(repl))
... |
quantumlib__Cirq-5072 | [cirqflow] `KeyValueExecutableSpec` should provide a `to_dict` method / override `__getitem__`
**Is your feature request related to a use case or problem? Please describe.**
`cg.KeyValueExecutableSpec` provides a nice `from_dict()` method to convert a dict into a `Tuple[Tuple[str, Any], ...]` which is hashable. This i... | [
{
"content": "# Copyright 2021 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright 2021 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/cirq-google/cirq_google/workflow/quantum_executable.py b/cirq-google/cirq_google/workflow/quantum_executable.py
index a84fbf13b47..6287f2ea291 100644
--- a/cirq-google/cirq_google/workflow/quantum_executable.py
+++ b/cirq-google/cirq_google/workflow/quantum_executable.py
@@ -53,6 +53,9 @@ class KeyValueExe... |
secdev__scapy-924 | scapy import fail: NameError: name 'get_working_if' is not defined
Hello,
On an Ubuntu 16.04.3 LTS, when launching `scapy` CLI or importing `scapy.route` without any interface in use, I got the following error:
```Python
Traceback (most recent call last):
File "/usr/local/bin/scapy", line 25, in <module>
i... | [
{
"content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## This program is published under a GPLv2 license\n\n\"\"\"\nRouting and handling of network interfaces.\n\"\"\"\n\nfrom __future__ import absolute... | [
{
"content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## This program is published under a GPLv2 license\n\n\"\"\"\nRouting and handling of network interfaces.\n\"\"\"\n\nfrom __future__ import absolute... | diff --git a/scapy/route.py b/scapy/route.py
index 580fe01216a..986b00d4d18 100644
--- a/scapy/route.py
+++ b/scapy/route.py
@@ -11,7 +11,7 @@
from scapy.utils import atol, ltoa, itom, pretty_routes
from scapy.config import conf
from scapy.error import Scapy_Exception, warning
-from scapy.arch import WINDOWS
+from s... |
dbt-labs__dbt-core-8922 | [CT-3210] [Bug] Error using `dbt list --select` when there is a cross-project model that is `version=0` in the parent project
### Is this a new bug in dbt-core?
- [X] I believe this is a new bug in dbt-core
- [X] I have searched the existing issues, and I could not find an existing issue for this bug
### Current... | [
{
"content": "from dataclasses import dataclass, field\nfrom datetime import datetime\nfrom typing import Optional, List\n\nfrom dbt.contracts.graph.unparsed import NodeVersion\nfrom dbt.node_types import NodeType, AccessType\n\n\n@dataclass\nclass ModelNodeArgs:\n name: str\n package_name: str\n ident... | [
{
"content": "from dataclasses import dataclass, field\nfrom datetime import datetime\nfrom typing import Optional, List\n\nfrom dbt.contracts.graph.unparsed import NodeVersion\nfrom dbt.node_types import NodeType, AccessType\n\n\n@dataclass\nclass ModelNodeArgs:\n name: str\n package_name: str\n ident... | diff --git a/.changes/unreleased/Fixes-20231026-002536.yaml b/.changes/unreleased/Fixes-20231026-002536.yaml
new file mode 100644
index 00000000000..f14c9ec0e0b
--- /dev/null
+++ b/.changes/unreleased/Fixes-20231026-002536.yaml
@@ -0,0 +1,6 @@
+kind: Fixes
+body: Add version to fqn when version==0
+time: 2023-10-26T00:... |
holoviz__panel-1349 | GridBox ncols not honored when rendering from a callable
#297 ## ALL software version info
```
In [3]: param.__version__ ... | [
{
"content": "\"\"\"\nDefines Layout classes which may be used to arrange panes and widgets\nin flexible ways to build complex dashboards.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nfrom collections import defaultdict, namedtuple\n\nimport param\n\nfrom bokeh.models import Co... | [
{
"content": "\"\"\"\nDefines Layout classes which may be used to arrange panes and widgets\nin flexible ways to build complex dashboards.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nfrom collections import defaultdict, namedtuple\n\nimport param\n\nfrom bokeh.models import Co... | diff --git a/panel/layout/base.py b/panel/layout/base.py
index 6d79b53b96..0558896638 100644
--- a/panel/layout/base.py
+++ b/panel/layout/base.py
@@ -247,7 +247,7 @@ def clone(self, *objects, **params):
% type(self).__name__)
p = dict(self.param.get_param_values(), **params)
... |
hydroshare__hydroshare-4798 | Change Mezzanine Form to Disallow Username Changes
**Describe the feature you'd like and what it will do**
The internal mezzanine form for the admin account should be altered to no longer allow username changes if possible, since doing so breaks the resource.
**Why is this feature important?**
This will be poli... | [
{
"content": "from django import forms\nfrom django.contrib.auth.admin import UserAdmin\nfrom django.contrib.auth.forms import UserCreationForm\nfrom django.contrib.gis import admin\nfrom django.contrib.contenttypes.admin import GenericTabularInline\nfrom django.utils.translation import ugettext_lazy as _\n\nfr... | [
{
"content": "from django import forms\nfrom django.contrib.auth.admin import UserAdmin\nfrom django.contrib.auth.forms import UserCreationForm\nfrom django.contrib.gis import admin\nfrom django.contrib.contenttypes.admin import GenericTabularInline\nfrom django.utils.translation import ugettext_lazy as _\n\nfr... | diff --git a/hs_core/admin.py b/hs_core/admin.py
index c46ed5c40a..ad38afaaae 100755
--- a/hs_core/admin.py
+++ b/hs_core/admin.py
@@ -14,6 +14,7 @@ def __init__(self, *args, **kwargs):
self.fields['email'] = forms.EmailField(label=_("E-mail"), max_length=75)
UserAdmin.add_form = UserCreationFormExtended
+U... |
Chia-Network__chia-blockchain-15508 | [Bug] Module `chia.wallet.puzzles.clawback` not found
### What happened?
When installing `1.8.2-rc3` or `master` via `pip`, the module `chia.wallet.puzzles.clawback` is missing. The files are not included because the packages are not listed in `setup.py`. This is also true of the `prefarm` sibling package.
### Ve... | [
{
"content": "from __future__ import annotations\n\nimport os\nimport sys\n\nfrom setuptools import setup\n\ndependencies = [\n \"aiofiles==23.1.0\", # Async IO for files\n \"anyio==3.6.2\",\n \"boto3==1.26.148\", # AWS S3 for DL s3 plugin\n \"blspy==1.0.16\", # Signature library\n \"chiavdf==... | [
{
"content": "from __future__ import annotations\n\nimport os\nimport sys\n\nfrom setuptools import setup\n\ndependencies = [\n \"aiofiles==23.1.0\", # Async IO for files\n \"anyio==3.6.2\",\n \"boto3==1.26.148\", # AWS S3 for DL s3 plugin\n \"blspy==1.0.16\", # Signature library\n \"chiavdf==... | diff --git a/setup.py b/setup.py
index f46b99d318ad..98339d93856f 100644
--- a/setup.py
+++ b/setup.py
@@ -118,6 +118,8 @@
"chia.wallet",
"chia.wallet.db_wallet",
"chia.wallet.puzzles",
+ "chia.wallet.puzzles.clawback",
+ "chia.wallet.puzzles.prefarm",
"chia.wallet.cat_... |
pulp__pulpcore-2245 | PulpImporter assumes tempfiles can always go to /tmp
This issue is a copy of https://pulp.plan.io/issues/8610 , to allow us to backport the fix from core/3.17 into 14/15/16 correctly.
**Version**
core/3.14+
**Describe the bug**
importer.pulp_import uses tempfile.TemporaryDirectory() in places like this:
http... | [
{
"content": "import hashlib\nimport json\nimport os\nimport re\nimport subprocess\nimport tempfile\nimport tarfile\nfrom gettext import gettext as _\nfrom logging import getLogger\n\nfrom django.core.files.storage import default_storage\nfrom django.db.models import F\n\nfrom pkg_resources import DistributionN... | [
{
"content": "import hashlib\nimport json\nimport os\nimport re\nimport subprocess\nimport tempfile\nimport tarfile\nfrom gettext import gettext as _\nfrom logging import getLogger\n\nfrom django.core.files.storage import default_storage\nfrom django.db.models import F\n\nfrom pkg_resources import DistributionN... | diff --git a/CHANGES/2247.bugfix b/CHANGES/2247.bugfix
new file mode 100644
index 0000000000..851f66d2af
--- /dev/null
+++ b/CHANGES/2247.bugfix
@@ -0,0 +1,4 @@
+PulpImporter now unpacks into the task-worker's working directory rather than /tmp. Unpacking
+large files into /tmp could cause the operation to fail, or eve... |
pennersr__django-allauth-2978 | 0.46.0 Apple provider test broken
Hi! When trying to package 0.46.0 for Arch Linux I ran into failing tests which appear to be pyjwt related:
```
Creating test database for alias 'default'...
System check identified some issues:
WARNINGS:
openid.OpenIDNonce: (models.W042) Auto-created primary key used when not... | [
{
"content": "import json\nimport requests\nfrom datetime import timedelta\n\nfrom django.http import HttpResponseNotAllowed, HttpResponseRedirect\nfrom django.urls import reverse\nfrom django.utils import timezone\nfrom django.utils.http import urlencode\nfrom django.views.decorators.csrf import csrf_exempt\n\... | [
{
"content": "import json\nimport requests\nfrom datetime import timedelta\n\nfrom django.http import HttpResponseNotAllowed, HttpResponseRedirect\nfrom django.urls import reverse\nfrom django.utils import timezone\nfrom django.utils.http import urlencode\nfrom django.views.decorators.csrf import csrf_exempt\n\... | diff --git a/allauth/socialaccount/providers/apple/views.py b/allauth/socialaccount/providers/apple/views.py
index 873ba110fc..82a62348ee 100644
--- a/allauth/socialaccount/providers/apple/views.py
+++ b/allauth/socialaccount/providers/apple/views.py
@@ -68,7 +68,6 @@ def get_verified_identity_data(self, id_token):
... |
Textualize__rich-2225 | Missing whitespace in traceback
In tracebacks sometimes there is a missing blank line between traceback frames. Not sure what causes it.
| [
{
"content": "from __future__ import absolute_import\n\nimport os\nimport platform\nimport sys\nfrom dataclasses import dataclass, field\nfrom traceback import walk_tb\nfrom types import ModuleType, TracebackType\nfrom typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, Type, Union\n\nfrom py... | [
{
"content": "from __future__ import absolute_import\n\nimport os\nimport platform\nimport sys\nfrom dataclasses import dataclass, field\nfrom traceback import walk_tb\nfrom types import ModuleType, TracebackType\nfrom typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, Type, Union\n\nfrom py... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 638ede8d3..5001a075c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed recursion error in Jupyter progress bars https://github.com/Textualize/rich/issues/2047
- Complex ... |
netbox-community__netbox-1517 | No field to edit Cluster comments
### Issue type
[ ] Feature request <!-- Requesting the implementation of a new feature -->
[X] Bug report <!-- Reporting unexpected or erroneous behavior -->
[ ] Documentation <!-- Proposing a modification to the documentation -->
### Environment
* Python version: 3.5.... | [
{
"content": "from __future__ import unicode_literals\n\nfrom mptt.forms import TreeNodeChoiceField\n\nfrom django import forms\nfrom django.db.models import Count\n\nfrom dcim.constants import IFACE_FF_VIRTUAL, VIFACE_FF_CHOICES\nfrom dcim.formfields import MACAddressFormField\nfrom dcim.models import Device, ... | [
{
"content": "from __future__ import unicode_literals\n\nfrom mptt.forms import TreeNodeChoiceField\n\nfrom django import forms\nfrom django.db.models import Count\n\nfrom dcim.constants import VIFACE_FF_CHOICES\nfrom dcim.formfields import MACAddressFormField\nfrom dcim.models import Device, Interface, Platfor... | diff --git a/netbox/virtualization/forms.py b/netbox/virtualization/forms.py
index 73d6e7445a9..0d247c303ed 100644
--- a/netbox/virtualization/forms.py
+++ b/netbox/virtualization/forms.py
@@ -49,10 +49,11 @@ class Meta:
#
class ClusterForm(BootstrapMixin, CustomFieldForm):
+ comments = CommentField(widget=Small... |
qtile__qtile-4228 | Configured keyboards limited to 3
### The issue:
In my config I've defined 4 keyboard layouts, however in the widget on the bar, it never reaches the fourth layout when left-clicking. When the third layout is removed (moving the fourth into the third position) it is suddenly accessible so it's not a problem with the l... | [
{
"content": "# Copyright (c) 2013 Jacob Mourelos\n# Copyright (c) 2014 Shepilov Vladislav\n# Copyright (c) 2014-2015 Sean Vig\n# Copyright (c) 2014 Tycho Andersen\n# Copyright (c) 2019 zordsdavini\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associa... | [
{
"content": "# Copyright (c) 2013 Jacob Mourelos\n# Copyright (c) 2014 Shepilov Vladislav\n# Copyright (c) 2014-2015 Sean Vig\n# Copyright (c) 2014 Tycho Andersen\n# Copyright (c) 2019 zordsdavini\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associa... | diff --git a/libqtile/widget/keyboardlayout.py b/libqtile/widget/keyboardlayout.py
index 102db17dd9..057875b864 100644
--- a/libqtile/widget/keyboardlayout.py
+++ b/libqtile/widget/keyboardlayout.py
@@ -60,7 +60,7 @@ def set_keyboard(self, layout: str, options: str | None) -> None:
class _X11LayoutBackend(_BaseLay... |
mabel-dev__opteryx-1689 | 🪲 VIEWs load error should be in debug mode only
### Thank you for taking the time to report a problem with Opteryx.
_To help us to respond to your request we ask that you try to provide the below detail about the bug._
**Describe the bug** _A clear and specific description of what the bug is. What the error, incor... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, s... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, s... | diff --git a/opteryx/planner/views/__init__.py b/opteryx/planner/views/__init__.py
index a5187a557..54c77f303 100644
--- a/opteryx/planner/views/__init__.py
+++ b/opteryx/planner/views/__init__.py
@@ -20,7 +20,7 @@ def _load_views():
with open("views.json", "rb") as defs:
return orjson.loads(defs.... |
AlexsLemonade__refinebio-471 | Expose transformation option to API
### Context
https://github.com/AlexsLemonade/refinebio-frontend/issues/208
### Problem or idea
We want a dropdown to change the transformation option, but the API currently doesn't support changing that value.
### Solution or next step
I think transformation just needs... | [
{
"content": "from rest_framework import serializers\nfrom rest_framework_hstore.fields import HStoreField\nfrom data_refinery_common.models import ProcessorJob, DownloaderJob, SurveyJob\nfrom data_refinery_common.models import (\n Experiment,\n ExperimentAnnotation,\n Sample,\n SampleAnnotation,\n ... | [
{
"content": "from rest_framework import serializers\nfrom rest_framework_hstore.fields import HStoreField\nfrom data_refinery_common.models import ProcessorJob, DownloaderJob, SurveyJob\nfrom data_refinery_common.models import (\n Experiment,\n ExperimentAnnotation,\n Sample,\n SampleAnnotation,\n ... | diff --git a/api/data_refinery_api/serializers.py b/api/data_refinery_api/serializers.py
index be703bfcc..88e9a34ce 100644
--- a/api/data_refinery_api/serializers.py
+++ b/api/data_refinery_api/serializers.py
@@ -416,6 +416,7 @@ class Meta:
'id',
'data',
'a... |
internetarchive__openlibrary-6157 | Include full url in "Report a problem" emails
### Describe the problem that you'd like solved
Currently the "Report a problem" form sends the user's URL, but doesn't include any parameters. So staff only sees e.g. `/search` instead of `/search?q=harry+potter`. This makes it harder to debug issues.
### Proposal & Co... | [
{
"content": "from typing import List, Union, Tuple, Any\n\nimport web\nimport json\nimport babel\nimport babel.core\nimport babel.dates\nfrom collections import defaultdict\nimport re\nimport random\nimport xml.etree.ElementTree as etree\nimport datetime\nimport logging\nfrom html.parser import HTMLParser\nfro... | [
{
"content": "from typing import List, Union, Tuple, Any\n\nimport web\nimport json\nimport babel\nimport babel.core\nimport babel.dates\nfrom collections import defaultdict\nimport re\nimport random\nimport xml.etree.ElementTree as etree\nimport datetime\nimport logging\nfrom html.parser import HTMLParser\nfro... | diff --git a/openlibrary/plugins/upstream/utils.py b/openlibrary/plugins/upstream/utils.py
index 881804c6631..9ec1e654dc5 100644
--- a/openlibrary/plugins/upstream/utils.py
+++ b/openlibrary/plugins/upstream/utils.py
@@ -937,6 +937,7 @@ class Request:
path = property(lambda self: web.ctx.path)
home = property... |
ivy-llc__ivy-13216 | iscomplexobj
Was mentioned here #11223, but it's open for almost a month now 😅
| [
{
"content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import (\n to_ivy_arrays_and_back,\n)\nfrom ivy.functional.frontends.jax.numpy import (\n promote_types_of_jax_inputs as promote_jax_arrays,\n)\n\n\n@to_ivy_arrays_and_back\ndef allclose(a, b, rtol=1e-05, atol=1e-08, equal_n... | [
{
"content": "# local\nimport ivy\nfrom ivy.functional.frontends.jax.func_wrapper import (\n to_ivy_arrays_and_back,\n)\nfrom ivy.functional.frontends.jax.numpy import (\n promote_types_of_jax_inputs as promote_jax_arrays,\n)\n\n\n@to_ivy_arrays_and_back\ndef allclose(a, b, rtol=1e-05, atol=1e-08, equal_n... | diff --git a/ivy/functional/frontends/jax/numpy/logic.py b/ivy/functional/frontends/jax/numpy/logic.py
index ff1b7db94a9f7..400f8c5b669fe 100644
--- a/ivy/functional/frontends/jax/numpy/logic.py
+++ b/ivy/functional/frontends/jax/numpy/logic.py
@@ -209,3 +209,14 @@ def isrealobj(x: any):
@to_ivy_arrays_and_back
def i... |
mirumee__ariadne-799 | Support Starlette 0.18.0
Was just released: https://github.com/encode/starlette/releases/tag/0.18.0
and currently the dependency is pinned at `<0.18.0`.
| [
{
"content": "#! /usr/bin/env python\nimport os\nfrom setuptools import setup\n\nCLASSIFIERS = [\n \"Development Status :: 4 - Beta\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\... | [
{
"content": "#! /usr/bin/env python\nimport os\nfrom setuptools import setup\n\nCLASSIFIERS = [\n \"Development Status :: 4 - Beta\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6e031eacd..d7a27d961 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
## 0.15.0 (unreleased)
- Updated `graphql-core` requirement to 3.2.0.
+- Bumped `starlette` support to 0.18.
- Drop Python 3.6 support.
- Added basic support for `OPTIONS` HTTP request.... |
jupyterhub__jupyterhub-2510 | Deleting and recreating a named server results in lost name in GUI
<!--
Welcome to Zero to JupyterHub!
Before filing an issue, please search through the issues to see
if your question has been discussed before. If you
need more information after searching, feel
free to message us on the gitter channel. Many
Jup... | [
{
"content": "\"\"\"User handlers\"\"\"\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport asyncio\nimport json\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom datetime import timezone\n\nfrom async_generator import aclosing\nfrom ... | [
{
"content": "\"\"\"User handlers\"\"\"\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport asyncio\nimport json\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom datetime import timezone\n\nfrom async_generator import aclosing\nfrom ... | diff --git a/jupyterhub/apihandlers/users.py b/jupyterhub/apihandlers/users.py
index 8250e2ce46..1c633723a6 100644
--- a/jupyterhub/apihandlers/users.py
+++ b/jupyterhub/apihandlers/users.py
@@ -427,6 +427,7 @@ def _remove_spawner(f=None):
return
self.log.info("Deleting spawner %s", spawne... |
iterative__dvc-5067 | dvc version: does not follow symlinks
# Bug Report
## Description
This is the `dvc version` output, where it says the cache directory is `nfs4 on storage:/home` and cache type is `symlink`.
```
DVC version: 1.10.2 (pip)
---------------------------------
Platform: Python 3.8.3 on Linux-5.4.0-54-generic-x86_6... | [
{
"content": "import itertools\nimport os\nimport pathlib\nimport platform\nimport uuid\n\nfrom dvc.exceptions import DvcException, NotDvcRepoError\nfrom dvc.repo import Repo\nfrom dvc.scm.base import SCMError\nfrom dvc.system import System\nfrom dvc.tree import TREES, get_tree_cls, get_tree_config\nfrom dvc.ut... | [
{
"content": "import itertools\nimport os\nimport pathlib\nimport platform\nimport uuid\n\nfrom dvc.exceptions import DvcException, NotDvcRepoError\nfrom dvc.repo import Repo\nfrom dvc.scm.base import SCMError\nfrom dvc.system import System\nfrom dvc.tree import TREES, get_tree_cls, get_tree_config\nfrom dvc.ut... | diff --git a/dvc/info.py b/dvc/info.py
index 4d8cbf8119..e7c05f05e8 100644
--- a/dvc/info.py
+++ b/dvc/info.py
@@ -142,7 +142,8 @@ def get_fs_type(path):
for part in psutil.disk_partitions(all=True)
}
- path = pathlib.Path(path)
+ # need to follow the symlink: https://github.com/iterative/dvc/issu... |
napari__napari-3498 | Napari bundle app crashes
## 🐛 Bug
Napari just shows a message stating "App has crashed" and starts open applications like crazy until killing all of them and it stops by killing Naparis
## To Reproduce
Steps to reproduce the behavior:
1. Open napari
2. Click on Plugins -> Install/Uninstall Package(s)..
... | [
{
"content": "\"\"\"\nnapari command line viewer.\n\"\"\"\nimport argparse\nimport logging\nimport os\nimport runpy\nimport sys\nimport warnings\nfrom ast import literal_eval\nfrom pathlib import Path\nfrom textwrap import wrap\nfrom typing import Any, Dict, List\n\n\nclass InfoAction(argparse.Action):\n def... | [
{
"content": "\"\"\"\nnapari command line viewer.\n\"\"\"\nimport argparse\nimport logging\nimport os\nimport runpy\nimport sys\nimport warnings\nfrom ast import literal_eval\nfrom pathlib import Path\nfrom textwrap import wrap\nfrom typing import Any, Dict, List\n\n\nclass InfoAction(argparse.Action):\n def... | diff --git a/napari/__main__.py b/napari/__main__.py
index ffa09c27a1e..802e0f2d79e 100644
--- a/napari/__main__.py
+++ b/napari/__main__.py
@@ -421,6 +421,13 @@ def main():
'conda install -c conda-forge python.app'
)
warnings.warn(msg)
+
+ # Prevent https://github.com/napa... |
Pylons__pyramid-3677 | threading.Thread.setDaemon has been deprecated in favor of setting daemon attribute directly in Python 3.10
https://github.com/Pylons/pyramid/blob/8061fce297cc7117d3e6e2b39e47512c7db2904f/src/pyramid/scripts/pserve.py#L234
Ref : python/cpython#25174
| [
{
"content": "# (c) 2005 Ian Bicking and contributors; written for Paste\n# (http://pythonpaste.org) Licensed under the MIT license:\n# http://www.opensource.org/licenses/mit-license.php\n#\n# For discussion of daemonizing:\n# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731\n#\n# Code taken also ... | [
{
"content": "# (c) 2005 Ian Bicking and contributors; written for Paste\n# (http://pythonpaste.org) Licensed under the MIT license:\n# http://www.opensource.org/licenses/mit-license.php\n#\n# For discussion of daemonizing:\n# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731\n#\n# Code taken also ... | diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index d527b1a042..96fb6fd76f 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -353,4 +353,6 @@ Contributors
- Sergey Maranchuk, 2020/04/18
-- Thibault Ravera, 2020/06/03
\ No newline at end of file
+- Thibault Ravera, 2020/06/03
+
+- Karthikeyan Singaravelan,... |
gratipay__gratipay.com-2792 | broken facebook link when no user_name
If all we have is a user_id, we construct the URL improperly. In that case we need:
`http://facebook.com/profile.php?id=$ID`
But we have:
`http://facebook.com/None`
broken facebook link when no user_name
If all we have is a user_id, we construct the URL improperly. In that cas... | [
{
"content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom gratipay.elsewhere import PlatformOAuth2\nfrom gratipay.elsewhere._extractors import key\n\n\nclass Facebook(PlatformOAuth2):\n\n # Platform attributes\n name = 'facebook'\n display_name = 'Facebook... | [
{
"content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom gratipay.elsewhere import PlatformOAuth2\nfrom gratipay.elsewhere._extractors import key\n\n\nclass Facebook(PlatformOAuth2):\n\n # Platform attributes\n name = 'facebook'\n display_name = 'Facebook... | diff --git a/gratipay/elsewhere/facebook.py b/gratipay/elsewhere/facebook.py
index f69328bffd..fe6fba15c8 100644
--- a/gratipay/elsewhere/facebook.py
+++ b/gratipay/elsewhere/facebook.py
@@ -9,7 +9,7 @@ class Facebook(PlatformOAuth2):
# Platform attributes
name = 'facebook'
display_name = 'Facebook'
- ... |
pydantic__pydantic-6364 | pydantic.v1.parse_obj_as internally uses pydantic.main.create_model instead of pydantic.v1.main.create_model
### Initial Checks
- [X] I confirm that I'm using Pydantic V2 installed directly from the `main` branch, or equivalent
### Description
I was trying to migrate my codebase from V1 to V2 (mostly by replac... | [
{
"content": "import json\nfrom functools import lru_cache\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Callable, Optional, Type, TypeVar, Union\n\nfrom .parse import Protocol, load_file, load_str_bytes\nfrom .types import StrBytes\nfrom .typing import display_as_type\n\n__all__ = ('parse_f... | [
{
"content": "import json\nfrom functools import lru_cache\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Callable, Optional, Type, TypeVar, Union\n\nfrom .parse import Protocol, load_file, load_str_bytes\nfrom .types import StrBytes\nfrom .typing import display_as_type\n\n__all__ = ('parse_f... | diff --git a/changes/6361-SharathHuddar.md b/changes/6361-SharathHuddar.md
new file mode 100644
index 00000000000..2897d88ff21
--- /dev/null
+++ b/changes/6361-SharathHuddar.md
@@ -0,0 +1 @@
+Importing create_model in tools.py through relative path instead of absolute path - so that it doesn't import V2 code when copie... |
getsentry__sentry-python-1554 | Redis integration tests have side effects
### How do you use Sentry?
Self-hosted/on-premise
### Version
1.9.2
### Steps to Reproduce
While working on https://github.com/getsentry/sentry-python/pull/1543, I noticed the following:
1. Checked out `sentry-sdk` for development.
2. Installed redis:
```
fak... | [
{
"content": "from __future__ import absolute_import\n\nfrom sentry_sdk import Hub\nfrom sentry_sdk.utils import capture_internal_exceptions, logger\nfrom sentry_sdk.integrations import Integration, DidNotEnable\n\nfrom sentry_sdk._types import MYPY\n\nif MYPY:\n from typing import Any, Sequence\n\n_SINGLE_K... | [
{
"content": "from __future__ import absolute_import\n\nfrom sentry_sdk import Hub\nfrom sentry_sdk.utils import capture_internal_exceptions, logger\nfrom sentry_sdk.integrations import Integration, DidNotEnable\n\nfrom sentry_sdk._types import MYPY\n\nif MYPY:\n from typing import Any, Sequence\n\n_SINGLE_K... | diff --git a/sentry_sdk/integrations/redis.py b/sentry_sdk/integrations/redis.py
index a4434a3f01..fc4e9cc7c2 100644
--- a/sentry_sdk/integrations/redis.py
+++ b/sentry_sdk/integrations/redis.py
@@ -131,7 +131,6 @@ def patch_redis_client(cls, is_cluster):
This function can be used to instrument custom redis client... |
spyder-ide__spyder-20541 | Error when trying to add directories in PythonPath Manager
## Description
### What steps will reproduce the problem?
<!--- You can use Markdown here --->
Installed selenium with pip. Try adding /sitepackages in the tools in spyder, but doesn't work.
### Traceback
```python-traceback
Traceback (most recent call last... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"Spyder path manager.\"\"\"\n\n# Standard library imports\nfrom collections import OrderedDict\nimport os\nimport os.path as osp\nimp... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"Spyder path manager.\"\"\"\n\n# Standard library imports\nfrom collections import OrderedDict\nimport os\nimport os.path as osp\nimp... | diff --git a/spyder/plugins/pythonpath/widgets/pathmanager.py b/spyder/plugins/pythonpath/widgets/pathmanager.py
index 3422d2963b4..2a2d7b1e7f8 100644
--- a/spyder/plugins/pythonpath/widgets/pathmanager.py
+++ b/spyder/plugins/pythonpath/widgets/pathmanager.py
@@ -244,6 +244,10 @@ def editable_top_row(self):
def s... |
kivy__kivy-5983 | Rotating Scatter does not dispatch on_transform_with_touch
### Versions
* Python 3.6.1 + Kivy 1.10 on Windows
* Python 3.6.4 + recent master on Linux
### Description
1. Rotating Scatter does not dispatch the on_transform_with_touch event
2. Translating Scatter with `do_translation=False` still dispatches t... | [
{
"content": "'''\nScatter\n=======\n\n.. image:: images/scatter.gif\n :align: right\n\n:class:`Scatter` is used to build interactive widgets that can be translated,\nrotated and scaled with two or more fingers on a multitouch system.\n\nScatter has its own matrix transformation: the modelview matrix is chan... | [
{
"content": "'''\nScatter\n=======\n\n.. image:: images/scatter.gif\n :align: right\n\n:class:`Scatter` is used to build interactive widgets that can be translated,\nrotated and scaled with two or more fingers on a multitouch system.\n\nScatter has its own matrix transformation: the modelview matrix is chan... | diff --git a/kivy/uix/scatter.py b/kivy/uix/scatter.py
index b8a4b65982..85b9eee8ab 100644
--- a/kivy/uix/scatter.py
+++ b/kivy/uix/scatter.py
@@ -476,6 +476,8 @@ def transform_with_touch(self, touch):
return changed
angle = radians(new_line.angle(old_line)) * self.do_rotation
+ if angle:... |
mesonbuild__meson-1538 | VS 2017 backend emits bad WindowsTargetPlatformVersion value
When I tried generating a VS 2017 solution, the generated app.vcxproj contained this:
```
<WindowsTargetPlatformVersion>10.0.14393.0\</WindowsTargetPlatformVersion>
```
Which then causes errors in other `.targets` files attempting to do a numeric comp... | [
{
"content": "# Copyright 2014-2016 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless req... | [
{
"content": "# Copyright 2014-2016 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless req... | diff --git a/authors.txt b/authors.txt
index 64792a20cc0c..0c575e723f0d 100644
--- a/authors.txt
+++ b/authors.txt
@@ -72,3 +72,4 @@ Aaron Small
Joe Baldino
Peter Harris
Roger Boerdijk
+melak47
diff --git a/mesonbuild/backend/vs2017backend.py b/mesonbuild/backend/vs2017backend.py
index 8301790de2a2..35d56f3c3b32 100... |
encode__starlette-195 | Check directory exists when instantiating `StaticFiles`
The `StaticFiles` application should ensure that the directory exists at the point it is instantiated.
(With an optional switch to turn this behavior off)
| [
{
"content": "import os\nimport stat\n\nfrom aiofiles.os import stat as aio_stat\n\nfrom starlette.responses import FileResponse, PlainTextResponse, Response\nfrom starlette.types import ASGIInstance, Receive, Scope, Send\n\n\nclass StaticFiles:\n def __init__(self, *, directory: str) -> None:\n self.... | [
{
"content": "import os\nimport stat\n\nfrom aiofiles.os import stat as aio_stat\n\nfrom starlette.responses import FileResponse, PlainTextResponse, Response\nfrom starlette.types import ASGIInstance, Receive, Scope, Send\n\n\nclass StaticFiles:\n def __init__(self, *, directory: str, check_dir: bool = True)... | diff --git a/docs/staticfiles.md b/docs/staticfiles.md
index 448cc3b92..cc8db5e79 100644
--- a/docs/staticfiles.md
+++ b/docs/staticfiles.md
@@ -1,7 +1,12 @@
-Starlette also includes a `StaticFiles` class for serving a specific directory:
+Starlette also includes a `StaticFiles` class for serving files in a given dir... |
netbox-community__netbox-15136 | API call to add VPN tunnel fails: group field is required
### Deployment Type
Self-hosted
### NetBox Version
v3.7.2
### Python Version
3.11
### Steps to Reproduce
```
$ curl -s -i http://netbox-test.lein.io/api/vpn/tunnels/ \
-H "Authorization: Token 176d4c04ccc8f2a549ea6fd393567d9da5a796ff" \
-... | [
{
"content": "from django.contrib.contenttypes.models import ContentType\nfrom drf_spectacular.utils import extend_schema_field\nfrom rest_framework import serializers\n\nfrom ipam.api.nested_serializers import NestedIPAddressSerializer, NestedRouteTargetSerializer\nfrom ipam.models import RouteTarget\nfrom net... | [
{
"content": "from django.contrib.contenttypes.models import ContentType\nfrom drf_spectacular.utils import extend_schema_field\nfrom rest_framework import serializers\n\nfrom ipam.api.nested_serializers import NestedIPAddressSerializer, NestedRouteTargetSerializer\nfrom ipam.models import RouteTarget\nfrom net... | diff --git a/netbox/vpn/api/serializers.py b/netbox/vpn/api/serializers.py
index dedcbfbf5f7..5f6fcd5f771 100644
--- a/netbox/vpn/api/serializers.py
+++ b/netbox/vpn/api/serializers.py
@@ -46,7 +46,10 @@ class TunnelSerializer(NetBoxModelSerializer):
status = ChoiceField(
choices=TunnelStatusChoices
... |
OpenCTI-Platform__connectors-214 | [cybercrime-tracker] connector fails due to unchecked None
## Description
Cybercrime tracker connector fails while determining if the last run interval has been exceeded.
## Environment
1. OS (where OpenCTI server runs): Debian Buster 10.7
2. OpenCTI version: 4.0.x
3. OpenCTI client: pycti
4. Other environm... | [
{
"content": "import os\nimport yaml\nimport time\nimport feedparser\nimport stix2\nimport datetime\n\nfrom pycti import OpenCTIConnectorHelper, get_config_variable\nfrom pycti.utils.opencti_stix2_utils import OpenCTIStix2Utils, SimpleObservable\nfrom pygrok import Grok\nfrom urllib.parse import urlparse, quote... | [
{
"content": "import os\nimport yaml\nimport time\nimport feedparser\nimport stix2\nimport datetime\n\nfrom pycti import OpenCTIConnectorHelper, get_config_variable\nfrom pycti.utils.opencti_stix2_utils import OpenCTIStix2Utils, SimpleObservable\nfrom pygrok import Grok\nfrom urllib.parse import urlparse, quote... | diff --git a/cybercrime-tracker/src/cybercrime-tracker.py b/cybercrime-tracker/src/cybercrime-tracker.py
index f19ad605ae..d72f552802 100644
--- a/cybercrime-tracker/src/cybercrime-tracker.py
+++ b/cybercrime-tracker/src/cybercrime-tracker.py
@@ -56,7 +56,7 @@ def __init__(self):
config,
)
... |
PaddlePaddle__PaddleNLP-2877 | Support more model outputs for BERT/ERNIE/RoBERTa
<!-- Demo: https://github.com/PaddlePaddle/PaddleNLP/pull/26 -->
### PR types
<!-- One of [ New features | Bug fixes | Function optimization | Performance optimization | Breaking changes | Others ] -->
New features
### PR changes
<!-- One of [ Models | APIs | Docs ... | [
{
"content": "# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.\n# Copyright 2020 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 L... | [
{
"content": "# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.\n# Copyright 2020 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 L... | diff --git a/paddlenlp/transformers/model_outputs.py b/paddlenlp/transformers/model_outputs.py
index c74f431e8e1a..8882d647ec57 100644
--- a/paddlenlp/transformers/model_outputs.py
+++ b/paddlenlp/transformers/model_outputs.py
@@ -91,7 +91,7 @@ def _transformer_encoder_fwd(self,
if output_attentions:
... |
django-cms__django-cms-2886 | cms.utils.i18n.get_fallback_languages may fail if LANGUAGES has more languages than CMS_LANGUAGES
Reported via IRC.
Use case: Show the admin interface in English (for users that configured their browser to English), but CMS pages should only be in German or French.
In the use case above, settings might be something ... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom contextlib import contextmanager\n\nfrom django.core.urlresolvers import get_resolver, LocaleRegexURLResolver\nfrom django.conf import settings\nfrom django.utils import translation\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom cms.exceptions import... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom contextlib import contextmanager\n\nfrom django.core.urlresolvers import get_resolver, LocaleRegexURLResolver\nfrom django.conf import settings\nfrom django.utils import translation\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom cms.exceptions import... | diff --git a/cms/tests/i18n.py b/cms/tests/i18n.py
index de84f8f698d..3e7231cb34c 100644
--- a/cms/tests/i18n.py
+++ b/cms/tests/i18n.py
@@ -3,6 +3,7 @@
from cms.test_utils.util.context_managers import SettingsOverride
from cms.utils import i18n
from django.utils.importlib import import_module
+from cms.utils.i18n i... |
searx__searx-2167 | Results links open in the same tab
How to set searx to open links in a new tab?
| [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n\"\"\"Searx preferences implementation.\n\"\"\"\n\n# pylint: disable=useless-object-inheritance\n\nfrom base64 import urlsafe_b64encode, urlsafe_b64decode\nfrom zlib import compress, decompress\nfrom sys import version\n\nfrom searx import settings, au... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n\"\"\"Searx preferences implementation.\n\"\"\"\n\n# pylint: disable=useless-object-inheritance\n\nfrom base64 import urlsafe_b64encode, urlsafe_b64decode\nfrom zlib import compress, decompress\nfrom sys import version\n\nfrom searx import settings, au... | diff --git a/searx/preferences.py b/searx/preferences.py
index cb33bc5aa6..82b8f5224d 100644
--- a/searx/preferences.py
+++ b/searx/preferences.py
@@ -364,7 +364,7 @@ def __init__(self, themes, categories, engines, plugins):
choices=themes
),
'results_on_new_tab': MapSetting(
... |
encode__django-rest-framework-722 | PrimaryKeyRelatedField with OneToOneField serializes wrong object's id
```
class A(Model):
pass
class B(Model):
a = OneToOneField('A')
class ASerializer(Serializer):
b_id = PrimaryKeyRelatedField(source='b', null=True)
```
Now when an `A` is serialized, it will not have `B`'s `id`, but its own. I believe ... | [
{
"content": "from __future__ import unicode_literals\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.core.urlresolvers import resolve, get_script_prefix, NoReverseMatch\nfrom django import forms\nfrom django.forms import widgets\nfrom django.forms.models import ModelChoiceI... | [
{
"content": "from __future__ import unicode_literals\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.core.urlresolvers import resolve, get_script_prefix, NoReverseMatch\nfrom django import forms\nfrom django.forms import widgets\nfrom django.forms.models import ModelChoiceI... | diff --git a/rest_framework/relations.py b/rest_framework/relations.py
index 0c108717fc..2a10e9af53 100644
--- a/rest_framework/relations.py
+++ b/rest_framework/relations.py
@@ -235,7 +235,6 @@ def field_to_native(self, obj, field_name):
pk = getattr(obj, self.source or field_name).pk
exc... |
django-cms__django-cms-1768 | cms.utils.i18n.get_fallback_languages may fail if LANGUAGES has more languages than CMS_LANGUAGES
Reported via IRC.
Use case: Show the admin interface in English (for users that configured their browser to English), but CMS pages should only be in German or French.
In the use case above, settings might be something ... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom contextlib import contextmanager\n\nfrom django.core.urlresolvers import get_resolver, LocaleRegexURLResolver\nfrom django.conf import settings\nfrom django.utils import translation\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom cms.exceptions import... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom contextlib import contextmanager\n\nfrom django.core.urlresolvers import get_resolver, LocaleRegexURLResolver\nfrom django.conf import settings\nfrom django.utils import translation\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom cms.exceptions import... | diff --git a/cms/tests/i18n.py b/cms/tests/i18n.py
index 579224462a1..8f10c1815fa 100644
--- a/cms/tests/i18n.py
+++ b/cms/tests/i18n.py
@@ -1,5 +1,7 @@
from cms.test_utils.testcases import SettingsOverrideTestCase
from cms.utils import i18n
+from cms.utils.i18n import get_fallback_languages
+
class TestLanguages(... |
spack__spack-20572 | improve installation of Zoltran: imposing +int64 constrains on parmetis
<!--*Please add a concise summary of your suggestion here.*-->
### Rationale
zoltan spec has a variant called `int64` which imposes the corresponding constrain on metis.
https://github.com/spack/spack/blob/6947951aaf9954b1dfd12ca7a9266d7335f... | [
{
"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\n\nfrom spack import *\nimport re\n\n\nclass Zoltan(AutotoolsPackage):\n \"\"\"The Zoltan lib... | [
{
"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\n\nfrom spack import *\nimport re\n\n\nclass Zoltan(AutotoolsPackage):\n \"\"\"The Zoltan lib... | diff --git a/var/spack/repos/builtin/packages/zoltan/package.py b/var/spack/repos/builtin/packages/zoltan/package.py
index 769ca81be67e4d..e96579d6c3b3cc 100644
--- a/var/spack/repos/builtin/packages/zoltan/package.py
+++ b/var/spack/repos/builtin/packages/zoltan/package.py
@@ -39,6 +39,7 @@ class Zoltan(AutotoolsPacka... |
Mailu__Mailu-2116 | Error 404 not found when opening admin after upgrade 1.8 to master
## Before you open your issue
- [X] Check if no issue or pull-request for this already exists.
- [X] Check [documentation](https://mailu.io/master/) and [FAQ](https://mailu.io/master/faq.html). (Tip, use the search function on the documentation page)
... | [
{
"content": "from mailu import models, utils\nfrom mailu.ui import ui, forms, access\n\nfrom flask import current_app as app\nimport flask\nimport flask_login\n\n\n@ui.route('/', methods=[\"GET\"])\n@access.authenticated\ndef index():\n return flask.redirect(flask.url_for('.user_settings'))\n\n@ui.route('/a... | [
{
"content": "from mailu import models, utils\nfrom mailu.ui import ui, forms, access\n\nfrom flask import current_app as app\nimport flask\nimport flask_login\n\n\n@ui.route('/', methods=[\"GET\"])\n@access.authenticated\ndef index():\n return flask.redirect(flask.url_for('.user_settings'))\n\n@ui.route('/u... | diff --git a/core/admin/mailu/ui/views/base.py b/core/admin/mailu/ui/views/base.py
index 01e168a1e..9b7614e1d 100644
--- a/core/admin/mailu/ui/views/base.py
+++ b/core/admin/mailu/ui/views/base.py
@@ -11,6 +11,10 @@
def index():
return flask.redirect(flask.url_for('.user_settings'))
+@ui.route('/ui/')
+def redi... |
numba__numba-4034 | Make type.Optional string representation more friendly
<!--
Thanks for opening an issue! To help the Numba team handle your information
efficiently, please first ensure that there is no other issue present that
already describes the issue you have
(search at https://github.com/numba/numba/issues?&q=is%3Aissue).
... | [
{
"content": "from __future__ import print_function, division, absolute_import\n\nfrom .abstract import *\nfrom .common import *\nfrom ..typeconv import Conversion\nfrom ..errors import TypingError, LiteralTypingError\n\n\n\nclass PyObject(Dummy):\n \"\"\"\n A generic CPython object.\n \"\"\"\n\n de... | [
{
"content": "from __future__ import print_function, division, absolute_import\n\nfrom .abstract import *\nfrom .common import *\nfrom ..typeconv import Conversion\nfrom ..errors import TypingError, LiteralTypingError\n\n\n\nclass PyObject(Dummy):\n \"\"\"\n A generic CPython object.\n \"\"\"\n\n de... | diff --git a/docs/source/glossary.rst b/docs/source/glossary.rst
index 9fe07808e4c..e9df79622b6 100644
--- a/docs/source/glossary.rst
+++ b/docs/source/glossary.rst
@@ -67,6 +67,15 @@ Glossary
no faster than Python interpreted code, unless the Numba compiler can
take advantage of :term:`loop-jitting`.
+... |
ray-project__ray-3621 | [modin] Importing Modin before Ray can sometimes cause ImportError
### Describe the problem
<!-- Describe the problem clearly here. -->
When running Modin with Ray installed from source, I am sometimes running into `ImportError` and `ModuleNotFoundError` which is occurring when I am running a modified version of Mo... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport sys\n\nif \"pyarrow\" in sys.modules:\n raise ImportError(\"Ray must be imported before pyarrow because Ray \"\n \"requires a specific version... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport sys\n\nif \"pyarrow\" in sys.modules:\n raise ImportError(\"Ray must be imported before pyarrow because Ray \"\n \"requires a specific version... | diff --git a/python/ray/__init__.py b/python/ray/__init__.py
index ed024a107aa50..776c6d0367294 100644
--- a/python/ray/__init__.py
+++ b/python/ray/__init__.py
@@ -47,7 +47,7 @@
raise
modin_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "modin")
-sys.path.insert(0, modin_path)
+sys.path.append... |
great-expectations__great_expectations-1713 | Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`
| [
{
"content": "import logging\nimport uuid\nfrom copy import deepcopy\n\nfrom marshmallow import (\n INCLUDE,\n Schema,\n ValidationError,\n fields,\n post_dump,\n post_load,\n validates_schema,\n)\nfrom ruamel.yaml import YAML\nfrom ruamel.yaml.comments import CommentedMap\n\nimport great_e... | [
{
"content": "import logging\nimport uuid\nfrom copy import deepcopy\n\nfrom marshmallow import (\n INCLUDE,\n Schema,\n ValidationError,\n fields,\n post_dump,\n post_load,\n validates_schema,\n)\nfrom ruamel.yaml import YAML\nfrom ruamel.yaml.comments import CommentedMap\n\nimport great_e... | diff --git a/great_expectations/data_context/types/base.py b/great_expectations/data_context/types/base.py
index 2d1e379ad28e..585f55b7ec86 100644
--- a/great_expectations/data_context/types/base.py
+++ b/great_expectations/data_context/types/base.py
@@ -227,6 +227,7 @@ class Meta:
keys=fields.Str(), values=fi... |
cython__cython-3429 | cdiv and cmod incorrect?
I was looking at the definitions of `cdiv` and `cmod` in Shadow.py. These seem to give incorrect results for some operands. For example, in C99:
```
4 / -4 == -1 4 % -4 == 0
4 / -2 == -2 4 % -2 == 0
4 / -1 == -4 4 % -1 == 0
```
But these functions would return:
```
cdiv(4... | [
{
"content": "# cython.* namespace for pure mode.\nfrom __future__ import absolute_import\n\n__version__ = \"3.0a0\"\n\ntry:\n from __builtin__ import basestring\nexcept ImportError:\n basestring = str\n\n\n# BEGIN shameless copy from Cython/minivect/minitypes.py\n\nclass _ArrayType(object):\n\n is_arr... | [
{
"content": "# cython.* namespace for pure mode.\nfrom __future__ import absolute_import\n\n__version__ = \"3.0a0\"\n\ntry:\n from __builtin__ import basestring\nexcept ImportError:\n basestring = str\n\n\n# BEGIN shameless copy from Cython/minivect/minitypes.py\n\nclass _ArrayType(object):\n\n is_arr... | diff --git a/Cython/Shadow.py b/Cython/Shadow.py
index b4c20c5b3dc..a0e014a1692 100644
--- a/Cython/Shadow.py
+++ b/Cython/Shadow.py
@@ -146,14 +146,16 @@ def compile(f):
# Special functions
def cdiv(a, b):
- q = a / b
- if q < 0:
- q += 1
- return q
+ if a < 0:
+ a = -a
+ b = -b
+ ... |
ansible-collections__community.general-4809 | redhat_subscription module broken with RHEL 9
### Summary
When I try to ensure that a system does not have a subscription active, I get a failed task for a RHEL 9 system.
Example:
```yaml
- name: Ensure system subscription is absent
redhat_subscription:
state: absent
activationkey: "{{ sat_activati... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# James Laska (jlaska@redhat.com)\n#\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\n... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# James Laska (jlaska@redhat.com)\n#\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOCUMENTATION = '''\n---\n... | diff --git a/changelogs/fragments/4809-redhat_subscription-unsubscribe.yaml b/changelogs/fragments/4809-redhat_subscription-unsubscribe.yaml
new file mode 100644
index 00000000000..39a364d0072
--- /dev/null
+++ b/changelogs/fragments/4809-redhat_subscription-unsubscribe.yaml
@@ -0,0 +1,2 @@
+bugfixes:
+ - redhat_subsc... |
mne-tools__mne-python-10487 | Argument `theme` of `raw.plot()` or config key does not work on macOS
As spotted following the discussion here https://github.com/mne-tools/mne-qt-browser/issues/83 the argument `theme` does not change the theme on either my macOS or Windows computer.
Sample code:
```
import mne
folder = mne.datasets.sample... | [
{
"content": "\"\"\"Functions to plot raw M/EEG data.\"\"\"\n\n# Authors: Eric Larson <larson.eric.d@gmail.com>\n# Jaakko Leppakangas <jaeilepp@student.jyu.fi>\n# Daniel McCloy <dan.mccloy@gmail.com>\n#\n# License: Simplified BSD\n\nfrom functools import partial\nfrom collections import Ordere... | [
{
"content": "\"\"\"Functions to plot raw M/EEG data.\"\"\"\n\n# Authors: Eric Larson <larson.eric.d@gmail.com>\n# Jaakko Leppakangas <jaeilepp@student.jyu.fi>\n# Daniel McCloy <dan.mccloy@gmail.com>\n#\n# License: Simplified BSD\n\nfrom functools import partial\nfrom collections import Ordere... | diff --git a/mne/viz/raw.py b/mne/viz/raw.py
index 5f238139a68..07fe8aeac74 100644
--- a/mne/viz/raw.py
+++ b/mne/viz/raw.py
@@ -351,7 +351,8 @@ def plot_raw(raw, events=None, duration=10.0, start=0.0, n_channels=20,
bgcolor=bgcolor,
# Qt-specific
precompute=prec... |
conda__conda-5009 | When lacking permissions to write, clone message should quote prefix.
When trying to install a new package into a location that the user lacks write permissions (read-only root), conda helpfully suggests cloning the environment into a new location:
```
CondaIOError: IO error: Missing write permissions in: C:\Progra... | [
{
"content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom os.path import join\n\nfrom .common import name_prefix\nfrom ..base.context import context\nfrom ..exceptions import CondaIOError\n\n\ndef read_message(fn):\n res = []\n for envs_dir in context.envs_di... | [
{
"content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom os.path import join\n\nfrom .common import name_prefix\nfrom ..base.context import context\nfrom ..exceptions import CondaIOError\n\n\ndef read_message(fn):\n res = []\n for envs_dir in context.envs_di... | diff --git a/conda/cli/help.py b/conda/cli/help.py
index 855c2d3ea7d..278681a4670 100644
--- a/conda/cli/help.py
+++ b/conda/cli/help.py
@@ -35,7 +35,7 @@ def root_read_only(command, prefix, json=False):
# then make changes to it.
# This may be done using the command:
#
-# $ conda create -n my_${name} --clone=${pref... |
microsoft__torchgeo-1433 | USAVars Augmentation maps to 0
### Description
In the USAVars Datamodule, the default augmentation from NonGeoDatamodule is used. However, the dataset returns uint8 data, and it comes out of the augmentation still as uint8. This means you get an error when trying to train but also that your input images are just all... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"USAVars dataset.\"\"\"\n\nimport glob\nimport os\nfrom collections.abc import Sequence\nfrom typing import Callable, Optional\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport raste... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"USAVars dataset.\"\"\"\n\nimport glob\nimport os\nfrom collections.abc import Sequence\nfrom typing import Callable, Optional\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport raste... | diff --git a/torchgeo/datasets/usavars.py b/torchgeo/datasets/usavars.py
index b27bffaaf4b..43369dfdcab 100644
--- a/torchgeo/datasets/usavars.py
+++ b/torchgeo/datasets/usavars.py
@@ -200,7 +200,7 @@ def _load_image(self, path: str) -> Tensor:
"""
with rasterio.open(path) as f:
array: "n... |
gammapy__gammapy-5254 | FluxPoints.write() is ignoring overwrite when file extension is not FITS
**Gammapy version**
1.2
**Bug description**
When writing a `FluxPoints` table (_.ecsv_) to file it is not possible to overwrite it.
**Expected behavior**
The `overwrite` argument should be taken into account.
**To Reproduce**
... | [
{
"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport logging\nfrom copy import deepcopy\nimport numpy as np\nfrom scipy import stats\nfrom scipy.interpolate import interp1d\nfrom scipy.optimize import minimize\nfrom astropy.io import fits\nfrom astropy.io.registry import IORegis... | [
{
"content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport logging\nfrom copy import deepcopy\nimport numpy as np\nfrom scipy import stats\nfrom scipy.interpolate import interp1d\nfrom scipy.optimize import minimize\nfrom astropy.io import fits\nfrom astropy.io.registry import IORegis... | diff --git a/gammapy/estimators/points/core.py b/gammapy/estimators/points/core.py
index 87dd6856c4..fb3aa0e7f5 100644
--- a/gammapy/estimators/points/core.py
+++ b/gammapy/estimators/points/core.py
@@ -267,7 +267,7 @@ def write(
table = self.to_table(sed_type=sed_type, format=format)
if ".fits" not... |
bookwyrm-social__bookwyrm-2387 | Internal Server Errors (e.g. on delete of user)
**Describe the bug**
Internal server error for some actions. I have set up a dockerless installation and am able to access the application and the admin pages. However, some actions create errors. For example:
**To Reproduce**
Steps to reproduce the behavior:
1. ... | [
{
"content": "\"\"\" moderation via flagged posts and users \"\"\"\nfrom django.contrib.auth.decorators import login_required, permission_required\nfrom django.core.paginator import Paginator\nfrom django.core.exceptions import PermissionDenied\nfrom django.shortcuts import get_object_or_404, redirect\nfrom dja... | [
{
"content": "\"\"\" moderation via flagged posts and users \"\"\"\nfrom django.contrib.auth.decorators import login_required, permission_required\nfrom django.core.paginator import Paginator\nfrom django.core.exceptions import PermissionDenied\nfrom django.shortcuts import get_object_or_404, redirect\nfrom dja... | diff --git a/bookwyrm/tests/views/admin/test_reports.py b/bookwyrm/tests/views/admin/test_reports.py
index e93b343413..6b31175d8e 100644
--- a/bookwyrm/tests/views/admin/test_reports.py
+++ b/bookwyrm/tests/views/admin/test_reports.py
@@ -15,6 +15,7 @@
class ReportViews(TestCase):
"""every response to a get reque... |
openai__gym-1708 | Bug in PixelObservationWrapper
Error log
```
env = PixelObservationWrapper(env, pixels_only=True)
File "/home/tsan/Desktop/gym/gym/wrappers/pixel_observation.py", line 89, in __init__
pixels = self.env.render(**render_kwargs)
File "/home/tsan/Desktop/gym/gym/core.py", line 233, in render
return s... | [
{
"content": "\"\"\"An observation wrapper that augments observations by pixel values.\"\"\"\n\nimport collections\nimport copy\n\nimport numpy as np\n\nfrom gym import spaces\nfrom gym import ObservationWrapper\n\nSTATE_KEY = 'state'\n\n\nclass PixelObservationWrapper(ObservationWrapper):\n \"\"\"Augment ob... | [
{
"content": "\"\"\"An observation wrapper that augments observations by pixel values.\"\"\"\n\nimport collections\nimport copy\n\nimport numpy as np\n\nfrom gym import spaces\nfrom gym import ObservationWrapper\n\nSTATE_KEY = 'state'\n\n\nclass PixelObservationWrapper(ObservationWrapper):\n \"\"\"Augment ob... | diff --git a/gym/wrappers/pixel_observation.py b/gym/wrappers/pixel_observation.py
index 1c282771dbb..7641cbf84f9 100644
--- a/gym/wrappers/pixel_observation.py
+++ b/gym/wrappers/pixel_observation.py
@@ -86,7 +86,7 @@ def __init__(self,
pixels_spaces = {}
for pixel_key in pixel_keys:
- p... |
Parsl__parsl-613 | TorqueProvider fails on NSCC
The following patch is required in order to run the `TorqueProvider` on NSCC:
```
[nscc04] ~/libsubmit >git diff
diff --git a/libsubmit/providers/torque/template.py b/libsubmit/providers/torque/template.py
index a00ce7c..056c648 100644
--- a/libsubmit/providers/torque/template.py
+++... | [
{
"content": "template_string = '''#!/bin/bash\n\n#PBS -S /bin/bash\n#PBS -N ${jobname}\n#PBS -m n\n#PBS -k eo\n#PBS -l walltime=$walltime\n#PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node}\n#PBS -o ${submit_script_dir}/${jobname}.submit.stdout\n#PBS -e ${submit_script_dir}/${jobname}.submit.stderr\n#PBS -... | [
{
"content": "template_string = '''#!/bin/bash\n\n#PBS -S /bin/bash\n#PBS -N ${jobname}\n#PBS -m n\n#PBS -k eo\n#PBS -l walltime=$walltime\n#PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node}\n#PBS -o ${submit_script_dir}/${jobname}.submit.stdout\n#PBS -e ${submit_script_dir}/${jobname}.submit.stderr\n${over... | diff --git a/parsl/providers/torque/template.py b/parsl/providers/torque/template.py
index a00ce7c096..056c6485d2 100644
--- a/parsl/providers/torque/template.py
+++ b/parsl/providers/torque/template.py
@@ -8,7 +8,6 @@
#PBS -l nodes=${nodes_per_block}:ppn=${tasks_per_node}
#PBS -o ${submit_script_dir}/${jobname}.subm... |
googleapis__python-bigquery-66 | Bigquery: Model reference repr seems wrong for model_id
For `ModelReference`'s repr use project_id against model_id
https://github.com/googleapis/python-bigquery/blob/be5c8b1ede9a2d762fd5574c32587d125eca4713/google/cloud/bigquery/model.py#L432-L435
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n#... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n#... | diff --git a/google/cloud/bigquery/model.py b/google/cloud/bigquery/model.py
index d39ec5f2f..a2510e86c 100644
--- a/google/cloud/bigquery/model.py
+++ b/google/cloud/bigquery/model.py
@@ -430,6 +430,6 @@ def __hash__(self):
return hash(self._key())
def __repr__(self):
- return "ModelReference(pr... |
paperless-ngx__paperless-ngx-3161 | [BUG] mail consumption fails if action is delete and no criteria are given
### Description
A mail consumption rule containing no criteria and has the action "delete" fails with this messages:
```
today at 22:30:00[2023-04-24 22:30:00,569] [ERROR] [paperless_mail] Rule XXX.YYY: Error while processing rule: AND expect... | [
{
"content": "import datetime\nimport itertools\nimport logging\nimport os\nimport re\nimport tempfile\nimport traceback\nfrom datetime import date\nfrom datetime import timedelta\nfrom fnmatch import fnmatch\nfrom typing import Dict\nfrom typing import List\nfrom typing import Union\n\nimport magic\nimport pat... | [
{
"content": "import datetime\nimport itertools\nimport logging\nimport os\nimport re\nimport tempfile\nimport traceback\nfrom datetime import date\nfrom datetime import timedelta\nfrom fnmatch import fnmatch\nfrom typing import Dict\nfrom typing import List\nfrom typing import Union\n\nimport magic\nimport pat... | diff --git a/src/paperless_mail/mail.py b/src/paperless_mail/mail.py
index d792b5a9776..1014e4035fa 100644
--- a/src/paperless_mail/mail.py
+++ b/src/paperless_mail/mail.py
@@ -381,7 +381,8 @@ def make_criterias(rule):
rule_query = get_rule_action(rule).get_criteria()
if isinstance(rule_query, dict):
- ... |
learningequality__kolibri-10078 | Kolibri 0.16 - Resources of type HTML5 and exercises are not displayed
## Observed behavior
This is a follow up to https://github.com/learningequality/kolibri/pull/9724#issuecomment-1408889097
In the latest develop build both exercises and html resources are not being displayed when a user is navigating through the... | [
{
"content": "\"\"\"\nWSGI config for the alternate origin server used for serving\nsandboxed content\n\"\"\"\nimport os\n\nimport kolibri.core.content\nfrom kolibri.core.content.utils import paths\nfrom kolibri.core.content.zip_wsgi import get_application\nfrom kolibri.utils.kolibri_whitenoise import DynamicWh... | [
{
"content": "\"\"\"\nWSGI config for the alternate origin server used for serving\nsandboxed content\n\"\"\"\nimport os\n\nimport kolibri.core.content\nfrom kolibri.core.content.utils import paths\nfrom kolibri.core.content.zip_wsgi import get_application\nfrom kolibri.utils.kolibri_whitenoise import DynamicWh... | diff --git a/kolibri/deployment/default/alt_wsgi.py b/kolibri/deployment/default/alt_wsgi.py
index b26d3f582ea..3b36a1469b5 100644
--- a/kolibri/deployment/default/alt_wsgi.py
+++ b/kolibri/deployment/default/alt_wsgi.py
@@ -32,7 +32,7 @@ def generate_alt_wsgi_application():
(alt_content_path, content_dir)... |
docker__docker-py-3004 | installing latest 5.0.3 on windows machines is still using pywin32==227 but not pywin32==301
[Bump pywin32 from 227 to 301 ]( https://github.com/docker/docker-py/commit/e0d186d754693feb7d27c2352e455c5febb4a5cd) was already merged in to bump pywin32 from 227 to 301. But, when installing latest 5.0.3 on windows machines ... | [
{
"content": "#!/usr/bin/env python\n\nimport codecs\nimport os\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\nROOT_DIR = os.path.dirname(__file__)\nSOURCE_DIR = os.path.join(ROOT_DIR)\n\nrequirements = [\n 'websocket-client >= 0.32.0',\n 'requests >= 2.14.2, != 2.18.0',\n]\n\nex... | [
{
"content": "#!/usr/bin/env python\n\nimport codecs\nimport os\n\nfrom setuptools import find_packages\nfrom setuptools import setup\n\nROOT_DIR = os.path.dirname(__file__)\nSOURCE_DIR = os.path.join(ROOT_DIR)\n\nrequirements = [\n 'websocket-client >= 0.32.0',\n 'requests >= 2.14.2, != 2.18.0',\n]\n\nex... | diff --git a/requirements.txt b/requirements.txt
index a0eb53198..c74d8cea2 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -11,7 +11,7 @@ paramiko==2.10.1
pycparser==2.17
pyOpenSSL==18.0.0
pyparsing==2.2.0
-pywin32==301; sys_platform == 'win32'
+pywin32==304; sys_platform == 'win32'
requests==2.26.0
urlli... |
apluslms__a-plus-1299 | Binaryornot library sometimes incorrectly classifies PDF files as non-binary
When large PDF files are detected as non-binary data, the inspect submission page tries to render them and causes the page to load slowly.
| [
{
"content": "import itertools\nimport json\nimport logging\nfrom mimetypes import guess_type\nimport os\nfrom typing import IO, Dict, Iterable, List, Tuple, TYPE_CHECKING, Callable\nfrom urllib.parse import urlparse\n\nfrom binaryornot.check import is_binary\nfrom django.conf import settings\nfrom django.db im... | [
{
"content": "import itertools\nimport json\nimport logging\nfrom mimetypes import guess_type\nimport os\nfrom typing import IO, Dict, Iterable, List, Tuple, TYPE_CHECKING, Callable\nfrom urllib.parse import urlparse\n\nfrom binaryornot.check import is_binary\nfrom django.conf import settings\nfrom django.db im... | diff --git a/exercise/submission_models.py b/exercise/submission_models.py
index 2755d0554..ba6402a8c 100644
--- a/exercise/submission_models.py
+++ b/exercise/submission_models.py
@@ -832,6 +832,9 @@ def get_mime(self):
return guess_type(self.file_object.path)[0]
def is_passed(self):
+ if self.f... |
ivy-llc__ivy-14663 | Fix generating_index_arrays.test_numpy_diag_indices
| | |
|---|---|
|paddle|<a href="https://github.com/unifyai/ivy/actions/runs/6413197943/job/17411744582"><img src=https://img.shields.io/badge/-failure-red></a>
|tensorflow|<a href="https://github.com/unifyai/ivy/actions/runs/6413197943/job/17411744582"><img sr... | [
{
"content": "import ivy\nfrom ivy.functional.frontends.numpy.func_wrapper import (\n to_ivy_arrays_and_back,\n outputs_to_numpy_arrays,\n)\n\n\n@to_ivy_arrays_and_back\ndef indices(dimensions, dtype=int, sparse=False):\n dimensions = tuple(dimensions)\n N = len(dimensions)\n shape = (1,) * N\n ... | [
{
"content": "import ivy\nfrom ivy.functional.frontends.numpy.func_wrapper import (\n to_ivy_arrays_and_back,\n outputs_to_numpy_arrays,\n)\n\n\n@to_ivy_arrays_and_back\ndef indices(dimensions, dtype=int, sparse=False):\n dimensions = tuple(dimensions)\n N = len(dimensions)\n shape = (1,) * N\n ... | diff --git a/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py b/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py
index c0052ea95f611..5faf97413fe2f 100644
--- a/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py
+++ b/ivy/functional/frontend... |
conda__conda-build-1088 | problems with GIT_DESCRIBE_NUMBER
Hello, my recipe is like:
```
package:
name: pkg
version: {{ GIT_DESCRIBE_TAG }}
source:
git_url: .
git_rev: conda_pkg
build:
number: {{ GIT_DESCRIBE_NUMBER }}
...
```
and is located in a git repo.
```
user@machine:pkg_git $ git status
On branch conda_pkg
Your branch is ... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport re\nimport sys\nfrom os.path import isdir, isfile, join\n\nfrom conda.compat import iteritems, PY3, text_type\nfrom conda.utils import memoized, md5_file\nimport conda.config as cc\nfrom conda.resolve import Matc... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport os\nimport re\nimport sys\nfrom os.path import isdir, isfile, join\n\nfrom conda.compat import iteritems, PY3, text_type\nfrom conda.utils import memoized, md5_file\nimport conda.config as cc\nfrom conda.resolve import Matc... | diff --git a/conda_build/metadata.py b/conda_build/metadata.py
index 56eb7f011a..a96c073f1c 100644
--- a/conda_build/metadata.py
+++ b/conda_build/metadata.py
@@ -451,7 +451,9 @@ def version(self):
return res
def build_number(self):
- return int(self.get_value('build/number', 0))
+ number ... |
beetbox__beets-3703 | Minor documentation correction: correct id3.org url
https://github.com/beetbox/beets/blob/master/docs/faq.rst#L303
refers to:
http://www.id3.org/id3v2.4.0-structure
as a reference url for a copy of the ID3v2.4 standard documentation, but this returns a "Not found" error. I've found 2 possibilities for the replaceme... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import division, absolute_import, print_function\n\nAUTHOR = u'Adrian Sampson'\n\n# General configuration\n\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.extlinks']\n\nexclude_patterns = ['_build']\nsource_suffix = '.rst'\nmaster_doc = 'index'\n\nproje... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import division, absolute_import, print_function\n\nAUTHOR = u'Adrian Sampson'\n\n# General configuration\n\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.extlinks']\n\nexclude_patterns = ['_build']\nsource_suffix = '.rst'\nmaster_doc = 'index'\n\nproje... | diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml
index 386571e5a4..633947fd3b 100644
--- a/.github/workflows/integration_test.yaml
+++ b/.github/workflows/integration_test.yaml
@@ -27,6 +27,10 @@ jobs:
run: |
tox -e int
+ - name: Check external li... |
bookwyrm-social__bookwyrm-878 | Can't create Invites
**Describe the bug**
When creating a new invite, the following appears:

Rest of the page is blank.
It appeared since the las... | [
{
"content": "\"\"\" using django model forms \"\"\"\nimport datetime\nfrom collections import defaultdict\n\nfrom django import forms\nfrom django.forms import ModelForm, PasswordInput, widgets\nfrom django.forms.widgets import Textarea\nfrom django.utils import timezone\nfrom django.utils.translation import g... | [
{
"content": "\"\"\" using django model forms \"\"\"\nimport datetime\nfrom collections import defaultdict\n\nfrom django import forms\nfrom django.forms import ModelForm, PasswordInput, widgets\nfrom django.forms.widgets import Textarea\nfrom django.utils import timezone\nfrom django.utils.translation import g... | diff --git a/bookwyrm/forms.py b/bookwyrm/forms.py
index 1a114e05f5..b159a89ef5 100644
--- a/bookwyrm/forms.py
+++ b/bookwyrm/forms.py
@@ -233,7 +233,7 @@ class Meta:
class CreateInviteForm(CustomForm):
class Meta:
model = models.SiteInvite
- exclude = ["code", "user", "times_used"]
+ exclu... |
espnet__espnet-3022 | Error with using compute-fbank-feats.py
Hello! I tried to use script compute-fbank-feats.py to compute fbank features from wav, and tried to use it according to its documentation https://espnet.github.io/espnet/apis/utils_py.html#compute-fbank-feats-py
as folllows:
```
python3.7 utils/compute-fbank-feats.py scp:wa... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright 2018 Nagoya University (Tomoki Hayashi)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\nimport argparse\nfrom distutils.util import strtobool\nimport logging\n\nimport kaldiio\nimport numpy\nimport resampy\n\nfrom espnet.transform.spectrogram i... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright 2018 Nagoya University (Tomoki Hayashi)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\nimport argparse\nfrom distutils.util import strtobool\nimport logging\n\nimport kaldiio\nimport numpy\nimport resampy\n\nfrom espnet.transform.spectrogram i... | diff --git a/utils/compute-fbank-feats.py b/utils/compute-fbank-feats.py
index 72feb1800c6..d5defc7d899 100755
--- a/utils/compute-fbank-feats.py
+++ b/utils/compute-fbank-feats.py
@@ -118,7 +118,7 @@ def main():
lmspc = logmelspectrogram(
x=array,
- fs=args.fs,
+ ... |
Textualize__rich-2216 | Missing `f` prefix on f-strings
Some strings looks like they're meant to be f-strings but are missing the `f` prefix meaning variable interpolation won't happen.
https://github.com/Textualize/rich/blob/c979a1b16f27285b03fdb14f5e364ea36d7eba01/rich/pretty.py#L369
I found this issue automatically. I'm a bot. Beep Boop ... | [
{
"content": "import builtins\nimport collections\nimport dataclasses\nimport inspect\nimport os\nimport sys\nfrom array import array\nfrom collections import Counter, UserDict, UserList, defaultdict, deque\nfrom dataclasses import dataclass, fields, is_dataclass\nfrom inspect import isclass\nfrom itertools imp... | [
{
"content": "import builtins\nimport collections\nimport dataclasses\nimport inspect\nimport os\nimport sys\nfrom array import array\nfrom collections import Counter, UserDict, UserList, defaultdict, deque\nfrom dataclasses import dataclass, fields, is_dataclass\nfrom inspect import isclass\nfrom itertools imp... | diff --git a/rich/pretty.py b/rich/pretty.py
index d3bac94e8..1c6b16716 100644
--- a/rich/pretty.py
+++ b/rich/pretty.py
@@ -366,7 +366,7 @@ def _get_braces_for_defaultdict(_object: DefaultDict[Any, Any]) -> Tuple[str, st
def _get_braces_for_array(_object: "array[Any]") -> Tuple[str, str, str]:
- return (f"arra... |
qtile__qtile-2082 | qtile top breaks when the terminal is too small
I just launched `qtile top` several times but it only worked once, and broke on the next runs:
```
$ qtile top --force-start
$ qtile top
Traceback (most recent call last):
File "libqtile/scripts/main.py", line 46, in main
options.func(options)
File "qtile... | [
{
"content": "# Copyright (c) 2015, Roger Duran\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, m... | [
{
"content": "# Copyright (c) 2015, Roger Duran\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, m... | diff --git a/libqtile/scripts/top.py b/libqtile/scripts/top.py
index 0777d21142..eb8da5b6a4 100644
--- a/libqtile/scripts/top.py
+++ b/libqtile/scripts/top.py
@@ -167,6 +167,9 @@ def top(opts):
print("Can't start tracemalloc on qtile, check the logs")
except KeyboardInterrupt:
exit(-1)
+ excep... |
e2nIEE__pandapower-1738 | plotting.geo convert_gis_to_geodata leads to issue if run after convert_geodata_to_gis
```python
import pandapower.plotting.geo as geo
import pandapower.networks as pn
net = pn.mv_oberrhein()
geo.convert_geodata_to_gis(net)
geo.convert_gis_to_geodata(net)
```
results in `AttributeError: 'Series' object has... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2022 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\nimport sys\nfrom numpy import array, setdiff1d\n\nfrom pandapower.auxiliary import soft_dependency_error... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2022 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\nimport sys\nfrom numpy import array, setdiff1d\n\nfrom pandapower.auxiliary import soft_dependency_error... | diff --git a/pandapower/plotting/geo.py b/pandapower/plotting/geo.py
index 729307093..1fbc1a490 100644
--- a/pandapower/plotting/geo.py
+++ b/pandapower/plotting/geo.py
@@ -77,7 +77,7 @@ def _transform_branch_geometry_to_coords(branch_geo):
:type branch_geo: geopandas.GeoDataFrame
:return: branch_geo - The gi... |
pwndbg__pwndbg-877 | Exceptions when running from folder with space and number in name
### Description
When debugging an application in a folder with a name that includes a space followed by `0<digit>`, a Python traceback is triggered on seemingly every command.
What I think is happening is that pwndbg runs the "info auxv" command in... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport re\nimport sys\n\nimport gdb\n\nimport pwndbg.abi\nimport pwndbg.arch\nimport pwndbg.events\nimport pwndbg.info\nimport pwndbg.memory\nimport pwndbg.qemu\nimport pwndbg.regs\nimport pwndbg.stack\nimport pwndbg.typeinfo\n\nexample_... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport re\nimport sys\n\nimport gdb\n\nimport pwndbg.abi\nimport pwndbg.arch\nimport pwndbg.events\nimport pwndbg.info\nimport pwndbg.memory\nimport pwndbg.qemu\nimport pwndbg.regs\nimport pwndbg.stack\nimport pwndbg.typeinfo\n\nexample_... | diff --git a/pwndbg/auxv.py b/pwndbg/auxv.py
index 17e28b18f23..517c77ddd8b 100644
--- a/pwndbg/auxv.py
+++ b/pwndbg/auxv.py
@@ -113,7 +113,7 @@ def use_info_auxv():
auxv = AUXV()
for line in lines:
- match = re.match('([0-9]+) .* (0x[0-9a-f]+|[0-9]+)', line)
+ match = re.match('([0-9]+) .*? (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.