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 ⌀ |
|---|---|---|---|---|
netbox-community__netbox-14828 | Only one event rule triggers for a content type
### Deployment Type
Self-hosted
### NetBox Version
v3.7.0
### Python Version
3.11
### Steps to Reproduce
Setup:
1. Create a webhook: Name = Test, URL = http://127.0.0.1:9000
2. Create event rule 1:
- Name = Rule 1
- Content types = Prefi... | [
{
"content": "import logging\n\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.utils import timezone\nfrom django.utils.module_loading import import_s... | [
{
"content": "import logging\n\nfrom django.conf import settings\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.utils import timezone\nfrom django.utils.module_loading import import_s... | diff --git a/netbox/extras/events.py b/netbox/extras/events.py
index 6d0654929fc..90cca83cd07 100644
--- a/netbox/extras/events.py
+++ b/netbox/extras/events.py
@@ -81,7 +81,7 @@ def process_event_rules(event_rules, model_name, event, data, username, snapshot
# Evaluate event rule conditions (if any)
... |
deeppavlov__DeepPavlov-79 | What is "'Chainer' object has no attribute 'infer'
2018-03-04 14:09:23,638 (util.py:64 WorkerThread2) ERROR - TeleBot: "AttributeError occurred, args=("'Chainer' object has no attribute 'infer'",)
Traceback (most recent call last):
File "/Users/developer/DeepPavlov/lib/python3.6/site-packages/telebot/util.py", line... | [
{
"content": "\"\"\"\nCopyright 2017 Neural Networks and Deep Learning lab, MIPT\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUn... | [
{
"content": "\"\"\"\nCopyright 2017 Neural Networks and Deep Learning lab, MIPT\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUn... | diff --git a/README.md b/README.md
index 300f903e81..85db4b47c3 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,7 @@
# <center>DeepPavlov</center>
### *We are in a really early Alpha release. You have to be ready for hard adventures.*
+### *If you have updated to version 0.0.2 - please re-download all pretrained ... |
lutris__lutris-559 | Lutris shortcuts broken
See: https://forums.lutris.net/t/desktop-shortcut-not-work-for-any-game/456
| [
{
"content": "import os\nimport re\nimport concurrent.futures\nfrom urllib.parse import urlparse, parse_qsl\n\nfrom lutris import settings\nfrom lutris import api\nfrom lutris.util.log import logger\nfrom lutris.util.http import Request\n\nBANNER = \"banner\"\nICON = \"icon\"\n\n\ndef get_icon_path(game, icon_t... | [
{
"content": "import os\nimport re\nimport concurrent.futures\nfrom urllib.parse import urlparse, parse_qsl\n\nfrom lutris import settings\nfrom lutris import api\nfrom lutris.util.log import logger\nfrom lutris.util.http import Request\n\nBANNER = \"banner\"\nICON = \"icon\"\n\n\ndef get_icon_path(game, icon_t... | diff --git a/lutris/util/resources.py b/lutris/util/resources.py
index 52530544ce..65eb9e40e2 100644
--- a/lutris/util/resources.py
+++ b/lutris/util/resources.py
@@ -107,6 +107,8 @@ def parse_installer_url(url):
game_slug = parsed_url.path
if not game_slug:
return False
+ if game_slug.startswith(... |
xonsh__xonsh-1890 | No output from scp command
While running scp in xonsh, the progress does not showed up:
https://asciinema.org/a/322p80uvb0pjyaic2e51iqmhq
I'm using version 3f45378
| [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Module for caching command & alias names as well as for predicting whether\na command will be able to be run in the background.\n\nA background predictor is a function that accepect a single argument list\nand returns whethere or not the process can be run in the bac... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Module for caching command & alias names as well as for predicting whether\na command will be able to be run in the background.\n\nA background predictor is a function that accepect a single argument list\nand returns whethere or not the process can be run in the bac... | diff --git a/news/scp_predict_false.rst b/news/scp_predict_false.rst
new file mode 100644
index 0000000000..ac4523f110
--- /dev/null
+++ b/news/scp_predict_false.rst
@@ -0,0 +1,13 @@
+**Added:** None
+
+**Changed:** None
+
+**Deprecated:** None
+
+**Removed:** None
+
+**Fixed:**
+
+* Fix ``scp`` progress not being outp... |
geopandas__geopandas-785 | VIS/PERF: only flatten geometries when there are actually multi-geometries
Currently we always loop through all geometries in `_flatten_multi_geoms` when plotting geometries, even when there are no Multi-Point/LineString/Polygons.
A check in advance if there are multi-geometries, and thus to know whether the flatte... | [
{
"content": "from __future__ import print_function\nfrom distutils.version import LooseVersion\nimport warnings\n\nimport numpy as np\nimport pandas as pd\n\ndef _flatten_multi_geoms(geoms, colors=None):\n \"\"\"\n Returns Series like geoms and colors, except that any Multi geometries\n are split into... | [
{
"content": "from __future__ import print_function\nfrom distutils.version import LooseVersion\nimport warnings\n\nimport numpy as np\nimport pandas as pd\n\ndef _flatten_multi_geoms(geoms, colors=None):\n \"\"\"\n Returns Series like geoms and colors, except that any Multi geometries\n are split into... | diff --git a/geopandas/plotting.py b/geopandas/plotting.py
index becf65540f..02763e67f5 100644
--- a/geopandas/plotting.py
+++ b/geopandas/plotting.py
@@ -26,6 +26,9 @@ def _flatten_multi_geoms(geoms, colors=None):
colors = [None] * len(geoms)
components, component_colors = [], []
+
+ if not geom... |
buildbot__buildbot-3106 | Tarball on pypi lacks secrets/providers subdirectory
https://pypi.python.org/pypi/buildbot/0.9.5
The tarball provided there lacks buildbot/master /buildbot/secrets/providers (it does contain secrets itself though). Hence unit tests won't run completely.
```
]$ ls -al buildbot/secrets/
total 9
drwxr-xr-x 2 502 ... | [
{
"content": "#!/usr/bin/env python\n#\n# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it wil... | [
{
"content": "#!/usr/bin/env python\n#\n# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it wil... | diff --git a/master/setup.py b/master/setup.py
index 05b97e576a8a..eac3ea4c4c8a 100755
--- a/master/setup.py
+++ b/master/setup.py
@@ -180,6 +180,7 @@ def define_plugin_entries(groups):
"buildbot.schedulers",
"buildbot.scripts",
"buildbot.secrets",
+ "buildbot.secrets.providers",
... |
pypi__warehouse-8210 | Ordering at /stats is incorrect for TestPyPI
The list at https://test.pypi.org/stats/ is incorrect and lists projects with 0 bytes first:
<img width="736" alt="Screen Shot 2020-07-01 at 10 06 59 AM" src="https://user-images.githubusercontent.com/294415/86260240-a06f1b00-bb82-11ea-8940-4cc7aced95f6.png">
The 0-byt... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/warehouse/views.py b/warehouse/views.py
index bcd126a68a8f..9ea8e60252d3 100644
--- a/warehouse/views.py
+++ b/warehouse/views.py
@@ -399,7 +399,7 @@ def stats(request):
top_100_packages = (
request.db.query(Project)
.with_entities(Project.name, Project.total_size)
- .order_by... |
learningequality__kolibri-7702 | Subquery in `FaclityViewset` `last_synced` annotation can return multiple results
<!--
Instructions:
* Fill out the sections below, replace …'s with information about your issue
* Use the 'preview' function above this text box to verify formatting before submitting
-->
### Observed behavior
This subquery fr... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport time\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom itertools import groupby\nfrom uuid import uuid4\n\nfrom django.contrib.auth import authenticat... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport time\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom itertools import groupby\nfrom uuid import uuid4\n\nfrom django.contrib.auth import authenticat... | diff --git a/kolibri/core/auth/api.py b/kolibri/core/auth/api.py
index 695786901bb..5c36a4f269d 100644
--- a/kolibri/core/auth/api.py
+++ b/kolibri/core/auth/api.py
@@ -366,7 +366,7 @@ def annotate_queryset(self, queryset):
)
)
.order_by("-last_activity... |
nautobot__nautobot-4946 | Computed fields not return by GraphQL query
### Environment
* Nautobot version (Docker tag too if applicable): 2.0.3
* Python version: 3.10.12
* Database platform, version: postgres, 14.9
* Middleware(s):
<!--
Having issues accessing computed_fields in version 2.0.3. Computed fields are visible in the UI howeve... | [
{
"content": "\"\"\"Library of generators for GraphQL.\"\"\"\n\nimport logging\n\nimport graphene\nimport graphene_django_optimizer as gql_optimizer\nfrom graphql import GraphQLError\n\nfrom nautobot.core.graphql.types import OptimizedNautobotObjectType\nfrom nautobot.core.graphql.utils import str_to_var_name, ... | [
{
"content": "\"\"\"Library of generators for GraphQL.\"\"\"\n\nimport logging\n\nimport graphene\nimport graphene_django_optimizer as gql_optimizer\nfrom graphql import GraphQLError\n\nfrom nautobot.core.graphql.types import OptimizedNautobotObjectType\nfrom nautobot.core.graphql.utils import str_to_var_name, ... | diff --git a/changes/4851.fixed b/changes/4851.fixed
new file mode 100644
index 00000000000..c45c803acd0
--- /dev/null
+++ b/changes/4851.fixed
@@ -0,0 +1 @@
+Fixed an exception when trying to access computed fields via GraphQL.
diff --git a/nautobot/core/graphql/generators.py b/nautobot/core/graphql/generators.py
inde... |
liberapay__liberapay.com-2027 | Limit the input field for team names
The first step when creating a team at https://liberapay.com/about/teams is selecting a name. I tried to enter a name and it was rejected because it was too long. The input field name currently accepts 30 characters. I suggest to reduce it to the maximum allowed characters for team ... | [
{
"content": "from decimal import Decimal\nfrom ipaddress import ip_network\nimport json\nimport logging\nfrom operator import itemgetter\nimport os\nimport re\nimport socket\nfrom tempfile import mkstemp\nfrom time import time\nimport traceback\n\nimport babel.localedata\nfrom babel.messages.pofile import read... | [
{
"content": "from decimal import Decimal\nfrom ipaddress import ip_network\nimport json\nimport logging\nfrom operator import itemgetter\nimport os\nimport re\nimport socket\nfrom tempfile import mkstemp\nfrom time import time\nimport traceback\n\nimport babel.localedata\nfrom babel.messages.pofile import read... | diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index 43897bd92b..0000000000
--- a/Dockerfile
+++ /dev/null
@@ -1,16 +0,0 @@
-FROM debian:10
-
-RUN apt-get update && \
- apt-get install -y build-essential python3-pip \
- libpq-dev libffi-dev python3-dev postgresql-client && \
- rm -rf /var/lib/... |
rootpy__rootpy-791 | Unable to set errorlow for a graph
There is a bug in `rootpy.plotting.graph`, setting exl or eyl trough a GraphPoint throws an AttributeError:
```python
from rootpy.plotting import Graph
g = Graph(name="test",type='asymm')
g[0] = (1,1)
g[0].y.error_hi = 0.1
g[0].y.error_low = 0.1
```
| [
{
"content": "from __future__ import absolute_import\n\nimport math\nimport numbers\nfrom operator import add, sub\n\nimport ROOT\n\nfrom .. import log; log = log[__name__]\nfrom .. import QROOT\nfrom ..extern.six.moves import range\nfrom ..base import NamelessConstructorObject\nfrom ..decorators import snake_c... | [
{
"content": "from __future__ import absolute_import\n\nimport math\nimport numbers\nfrom operator import add, sub\n\nimport ROOT\n\nfrom .. import log; log = log[__name__]\nfrom .. import QROOT\nfrom ..extern.six.moves import range\nfrom ..base import NamelessConstructorObject\nfrom ..decorators import snake_c... | diff --git a/rootpy/plotting/graph.py b/rootpy/plotting/graph.py
index 7cd5f0b8..b62ba6eb 100644
--- a/rootpy/plotting/graph.py
+++ b/rootpy/plotting/graph.py
@@ -93,7 +93,7 @@ def error_low(self, val):
if self.isdefault: return
getattr(
self.graph_,
- ... |
helmholtz-analytics__heat-406 | Recent CI runs failing with NetCDF: HDF error
**Description**
Recent CI (and local) runs of our tests fail with messages like
```
E RuntimeError: NetCDF: HDF error
... | [
{
"content": "from setuptools import setup\nimport sys\n\nsys.path.append(\"./heat/core\")\nimport version\n\nprint(version, dir(version))\n\nwith open(\"README.md\", \"r\") as handle:\n long_description = handle.read()\n\n# with open('./heat/core/version.py') as handle:\n# exec(handle.read())\n# pri... | [
{
"content": "from setuptools import setup\nimport sys\n\nsys.path.append(\"./heat/core\")\nimport version\n\nprint(version, dir(version))\n\nwith open(\"README.md\", \"r\") as handle:\n long_description = handle.read()\n\n# with open('./heat/core/version.py') as handle:\n# exec(handle.read())\n# pri... | diff --git a/setup.py b/setup.py
index bedeb05b67..5ab6519be3 100644
--- a/setup.py
+++ b/setup.py
@@ -35,7 +35,7 @@
install_requires=["mpi4py>=3.0.0", "numpy>=1.13.0", "torch==1.3.0"],
extras_require={
"hdf5": ["h5py>=2.8.0"],
- "netcdf": ["netCDF4>=1.4.0"],
+ "netcdf": ["netCDF4>=1.4.... |
ansible__awx-13645 | Websocket not working at non-root path
### Please confirm the following
- [X] I agree to follow this project's [code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html).
- [X] I have checked the [current issues](https://github.com/ansible/awx/issues) for duplicates.
- [X] I understand t... | [
{
"content": "import redis\nimport logging\n\nfrom django.conf import settings\nfrom django.urls import re_path\n\nfrom channels.auth import AuthMiddlewareStack\nfrom channels.routing import ProtocolTypeRouter, URLRouter\n\nfrom . import consumers\n\n\nlogger = logging.getLogger('awx.main.routing')\n\n\nclass A... | [
{
"content": "import redis\nimport logging\n\nfrom django.conf import settings\nfrom django.urls import re_path\n\nfrom channels.auth import AuthMiddlewareStack\nfrom channels.routing import ProtocolTypeRouter, URLRouter\n\nfrom . import consumers\n\n\nlogger = logging.getLogger('awx.main.routing')\n\n\nclass A... | diff --git a/awx/main/routing.py b/awx/main/routing.py
index c96505b7e120..100347f64e55 100644
--- a/awx/main/routing.py
+++ b/awx/main/routing.py
@@ -27,8 +27,8 @@ def __init__(self, *args, **kwargs):
websocket_urlpatterns = [
- re_path(r'websocket/', consumers.EventConsumer.as_asgi()),
- re_path(r'websocke... |
encode__httpx-1255 | Docs incorrectly reference `HTTPError.message` attribute
### Checklist
<!-- Please make sure you check all these items before submitting your bug report. -->
- [x] The bug is reproducible against the latest release and/or `master`.
- [x] There are no similar issues or pull requests to fix it yet.
### Describe... | [
{
"content": "\"\"\"\nOur exception hierarchy:\n\n* HTTPError\n x RequestError\n + TransportError\n - TimeoutException\n · ConnectTimeout\n · ReadTimeout\n · WriteTimeout\n · PoolTimeout\n - NetworkError\n · ConnectError\n · ReadError\n · WriteError... | [
{
"content": "\"\"\"\nOur exception hierarchy:\n\n* HTTPError\n x RequestError\n + TransportError\n - TimeoutException\n · ConnectTimeout\n · ReadTimeout\n · WriteTimeout\n · PoolTimeout\n - NetworkError\n · ConnectError\n · ReadError\n · WriteError... | diff --git a/httpx/_exceptions.py b/httpx/_exceptions.py
index 4d6837778a..260d14ee5f 100644
--- a/httpx/_exceptions.py
+++ b/httpx/_exceptions.py
@@ -55,7 +55,7 @@ class HTTPError(Exception):
response = httpx.get("https://www.example.com")
response.raise_for_status()
except httpx.HTTPError as ex... |
ivy-llc__ivy-23027 | solve
### Bug Explanation
The `paddle.linalg.solve` tests are failing. The tests and the front-end function are not implemented properly.
The test should generate two matrices of shape [ *, M, M ] and [ *, M, K ] but the written test just generates two matrices of the same shape, and function arguments are mismatch... | [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle import promote_types_of_paddle_inputs\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@with_supported_dtypes({\"2... | [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle import promote_types_of_paddle_inputs\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@with_supported_dtypes({\"2... | diff --git a/ivy/functional/frontends/paddle/tensor/linalg.py b/ivy/functional/frontends/paddle/tensor/linalg.py
index 4ae10e9824324..34eff9474cb1b 100644
--- a/ivy/functional/frontends/paddle/tensor/linalg.py
+++ b/ivy/functional/frontends/paddle/tensor/linalg.py
@@ -183,10 +183,10 @@ def qr(x, mode="reduced", name=No... |
DataDog__dd-trace-py-5408 | Throws exception when reloading module in REPL (specifically with iPython), even when `DD_TRACE_ENABLED=false`
<!--
Thanks for taking the time for reporting an issue!
Before reporting an issue on dd-trace-py, please be sure to provide all
necessary information.
If you're hitting a bug, make sure that you're usi... | [
{
"content": "from collections import defaultdict\nfrom os.path import abspath\nfrom os.path import expanduser\nfrom os.path import isdir\nfrom os.path import isfile\nfrom os.path import join\nimport sys\nfrom types import ModuleType\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Defau... | [
{
"content": "from collections import defaultdict\nfrom os.path import abspath\nfrom os.path import expanduser\nfrom os.path import isdir\nfrom os.path import isfile\nfrom os.path import join\nimport sys\nfrom types import ModuleType\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Defau... | diff --git a/ddtrace/internal/module.py b/ddtrace/internal/module.py
index e608e648487..b0668518ffc 100644
--- a/ddtrace/internal/module.py
+++ b/ddtrace/internal/module.py
@@ -404,7 +404,12 @@ def find_spec(self, fullname, path=None, target=None):
self._finding.add(fullname)
try:
- spec ... |
pytorch__pytorch-4656 | Bug in CosineAnnealingLR in Python 2 (?)
The learning rate only takes two values `base_lr` or `eta_min` if the `T_max` parameter passed in the constructor is an integer. This is probably because `self.last_epoch / self.T_max` evaluates to an integer in Python 2.
| [
{
"content": "import math\nfrom bisect import bisect_right\nfrom .optimizer import Optimizer\n\n\nclass _LRScheduler(object):\n def __init__(self, optimizer, last_epoch=-1):\n if not isinstance(optimizer, Optimizer):\n raise TypeError('{} is not an Optimizer'.format(\n type(o... | [
{
"content": "import math\nfrom bisect import bisect_right\nfrom .optimizer import Optimizer\n\n\nclass _LRScheduler(object):\n def __init__(self, optimizer, last_epoch=-1):\n if not isinstance(optimizer, Optimizer):\n raise TypeError('{} is not an Optimizer'.format(\n type(o... | diff --git a/test/test_optim.py b/test/test_optim.py
index 66a78fd8119c42..f05b219a42fccb 100644
--- a/test/test_optim.py
+++ b/test/test_optim.py
@@ -503,7 +503,7 @@ def test_cos_anneal_lr(self):
epochs = 10
eta_min = 1e-10
single_targets = [eta_min + (0.05 - eta_min) *
- ... |
Qiskit__qiskit-2448 | No module named 'vcr': requirement is missing (vcrpy)
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Information
- **Qiskit Terra version**: 0.10.1
- **Python version**: 3.7.3
- **Operating system**: windows 10
###... | [
{
"content": "# -*- coding: utf-8 -*-\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/license... | [
{
"content": "# -*- coding: utf-8 -*-\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/license... | diff --git a/.pylintrc b/.pylintrc
index ae9061c82f2a..6040fbfed61f 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -21,7 +21,7 @@ persistent=yes
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=pylint.extensions.docparams, # enable chec... |
scrapy__scrapy-2929 | LinkExtractor is not ignoring .m4v extension (video) by default
By chance I found out that LinkExtractor is not ignoring the video extension m4v in the same way it is ignoring other video formats.
https://en.wikipedia.org/wiki/M4V
| [
{
"content": "\"\"\"\nscrapy.linkextractors\n\nThis package contains a collection of Link Extractors.\n\nFor more info see docs/topics/link-extractors.rst\n\"\"\"\nimport re\n\nfrom six.moves.urllib.parse import urlparse\nfrom parsel.csstranslator import HTMLTranslator\nfrom w3lib.url import canonicalize_url\n\... | [
{
"content": "\"\"\"\nscrapy.linkextractors\n\nThis package contains a collection of Link Extractors.\n\nFor more info see docs/topics/link-extractors.rst\n\"\"\"\nimport re\n\nfrom six.moves.urllib.parse import urlparse\nfrom parsel.csstranslator import HTMLTranslator\nfrom w3lib.url import canonicalize_url\n\... | diff --git a/scrapy/linkextractors/__init__.py b/scrapy/linkextractors/__init__.py
index 8676c3b926d..2d7115cc504 100644
--- a/scrapy/linkextractors/__init__.py
+++ b/scrapy/linkextractors/__init__.py
@@ -28,7 +28,7 @@
# video
'3gp', 'asf', 'asx', 'avi', 'mov', 'mp4', 'mpg', 'qt', 'rm', 'swf', 'wmv',
- '... |
open-mmlab__mmocr-663 | locals() should not be modified
```python
args = locals()
[args.pop(x, None) for x in ['kwargs', 'self']]
```
https://github.com/open-mmlab/mmocr/blob/b04775fd78ac89e32d38ef6fbd5493dedbfd76f4/mmocr/utils/ocr.py#L414
| [
{
"content": "#!/usr/bin/env python\n# Copyright (c) OpenMMLab. All rights reserved.\nimport copy\nimport os\nimport warnings\nfrom argparse import ArgumentParser, Namespace\nfrom pathlib import Path\n\nimport mmcv\nimport numpy as np\nimport torch\nfrom mmcv.image.misc import tensor2imgs\nfrom mmcv.runner impo... | [
{
"content": "#!/usr/bin/env python\n# Copyright (c) OpenMMLab. All rights reserved.\nimport copy\nimport os\nimport warnings\nfrom argparse import ArgumentParser, Namespace\nfrom pathlib import Path\n\nimport mmcv\nimport numpy as np\nimport torch\nfrom mmcv.image.misc import tensor2imgs\nfrom mmcv.runner impo... | diff --git a/mmocr/utils/ocr.py b/mmocr/utils/ocr.py
index 1c5f342e1..5631b1ada 100755
--- a/mmocr/utils/ocr.py
+++ b/mmocr/utils/ocr.py
@@ -411,7 +411,7 @@ def readtext(self,
merge=False,
merge_xdist=20,
**kwargs):
- args = locals()
+ args = locals().... |
ibis-project__ibis-4271 | bug(impala) A delimited table should be explicitly stored as textfile
https://github.com/ibis-project/ibis/blob/88ffe3367cb6a34936e578f6a9b68dc30d559507/ibis/backends/impala/ddl.py#L67
when the cluster's default format is set as parquet, this will cause an exception. It should be explicitly stored as textfile. such as... | [
{
"content": "# Copyright 2014 Cloudera Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable... | [
{
"content": "# Copyright 2014 Cloudera Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable... | diff --git a/ibis/backends/impala/ddl.py b/ibis/backends/impala/ddl.py
index 2df5daf4bf6a..8762c0c99d81 100644
--- a/ibis/backends/impala/ddl.py
+++ b/ibis/backends/impala/ddl.py
@@ -91,6 +91,7 @@ def to_ddl(self):
if self.lineterminator is not None:
yield f"LINES TERMINATED BY '{self.lineterminat... |
pyca__cryptography-1530 | Release Automation Fixes for Seventh Release
The release script is not properly waiting for the wheel job it starts to finish before downloading. This causes it to download previous releases and attempt to upload them.
| [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport getpass\nimport os\nimport time\n\nimp... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport getpass\nimport os\nimport time\n\nimp... | diff --git a/tasks.py b/tasks.py
index 2dd005ba2594..c109f14974b8 100644
--- a/tasks.py
+++ b/tasks.py
@@ -17,6 +17,9 @@
def wait_for_build_completed(session):
+ # Wait 3 seconds before actually checking if the build is complete, to
+ # ensure that it had time to really start.
+ time.sleep(3)
while T... |
ckan__ckan-6110 | Plugin order for translations is reversed
**CKAN version**
2.8, 2.9, master
**Describe the bug**
If the developer has multiple plugins implementing ITranslation interface and has the same translation keys in them, the last plugin wins.
**Steps to reproduce**
Create two plugins with ITranslation interface and t... | [
{
"content": "# encoding: utf-8\n\nimport os\nimport sys\nimport re\nimport time\nimport inspect\nimport itertools\nimport pkgutil\n\nfrom flask import Blueprint, send_from_directory\nfrom flask.ctx import _AppCtxGlobals\nfrom flask.sessions import SessionInterface\nfrom flask_multistatic import MultiStaticFlas... | [
{
"content": "# encoding: utf-8\n\nimport os\nimport sys\nimport re\nimport time\nimport inspect\nimport itertools\nimport pkgutil\n\nfrom flask import Blueprint, send_from_directory\nfrom flask.ctx import _AppCtxGlobals\nfrom flask.sessions import SessionInterface\nfrom flask_multistatic import MultiStaticFlas... | diff --git a/ckan/config/middleware/flask_app.py b/ckan/config/middleware/flask_app.py
index 2f15bcfe271..abc82b7cf9d 100644
--- a/ckan/config/middleware/flask_app.py
+++ b/ckan/config/middleware/flask_app.py
@@ -238,7 +238,7 @@ def ungettext_alias():
(_ckan_i18n_dir, u'ckan')
] + [
(p.i18n_direc... |
dask__dask-3076 | Slicing list/array issue
Someone reported this slicing issue
da.zeros(5,chunks=5)[:,None][:,[0]*2].compute()
leads to:
```
Traceback (most recent call last):
File "<ipython-input-154-e9a840dad4ae>", line 1, in <module>
da.zeros(5,chunks=5)[:,None][:,[0]*2].compute()
File "/dask/dask/base.py", ... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nfrom operator import getitem\n\nimport numpy as np\n\nfrom .core import getter, getter_nofancy, getter_inline\nfrom ..compatibility import zip_longest\nfrom ..core import flatten, reverse_dict\nfrom ..optimize import cull, fuse, i... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nfrom operator import getitem\n\nimport numpy as np\n\nfrom .core import getter, getter_nofancy, getter_inline\nfrom ..compatibility import zip_longest\nfrom ..core import flatten, reverse_dict\nfrom ..optimize import cull, fuse, i... | diff --git a/dask/array/optimization.py b/dask/array/optimization.py
index bf49a32c94b..06d11ed1fa8 100644
--- a/dask/array/optimization.py
+++ b/dask/array/optimization.py
@@ -220,7 +220,7 @@ def fuse_slice(a, b):
None
"""
# None only works if the second side is a full slice
- if a is None and b == s... |
airctic__icevision-733 | Better Record __repr__ to show ClassMap when it is stored internally
## 🚀 Feature
**Is your feature request related to a problem? Please describe.**
More informative to show `class_map` when a `Record` object is storing it
Take for example a record loaded from the main repo:
```python
from icevision.all import ... | [
{
"content": "__all__ = [\n \"RecordComponent\",\n \"ClassMapRecordComponent\",\n \"RecordIDRecordComponent\",\n \"ImageRecordComponent\",\n \"FilepathRecordComponent\",\n \"SizeRecordComponent\",\n \"BaseLabelsRecordComponent\",\n \"InstancesLabelsRecordComponent\",\n \"Classificatio... | [
{
"content": "__all__ = [\n \"RecordComponent\",\n \"ClassMapRecordComponent\",\n \"RecordIDRecordComponent\",\n \"ImageRecordComponent\",\n \"FilepathRecordComponent\",\n \"SizeRecordComponent\",\n \"BaseLabelsRecordComponent\",\n \"InstancesLabelsRecordComponent\",\n \"Classificatio... | diff --git a/icevision/core/record_components.py b/icevision/core/record_components.py
index 65238d214..db2c0e6a5 100644
--- a/icevision/core/record_components.py
+++ b/icevision/core/record_components.py
@@ -80,6 +80,9 @@ def __init__(self, task):
def set_class_map(self, class_map: ClassMap):
self.class_... |
microsoft__MLOS-477 | SMAC optimizer messes up mlos_bench logging
SMAC optimizer completely overrides our logging setup and installs its own formatter, output handler, and so on. As a result, as soon as SMAC optimizer is initialized, mlos_bench stops writing to its log file, and all logging goes to stdout, in different format, and at differ... | [
{
"content": "#\n# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT License.\n#\n\"\"\"\nContains the wrapper class for SMAC Bayesian optimizers.\nSee Also: <https://automl.github.io/SMAC3/main/index.html>\n\"\"\"\n\nfrom pathlib import Path\nfrom typing import Dict, List, Optional, TYPE_CHECKING\... | [
{
"content": "#\n# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT License.\n#\n\"\"\"\nContains the wrapper class for SMAC Bayesian optimizers.\nSee Also: <https://automl.github.io/SMAC3/main/index.html>\n\"\"\"\n\nfrom pathlib import Path\nfrom typing import Dict, List, Optional, TYPE_CHECKING\... | diff --git a/mlos_bench/mlos_bench/tests/config/cli/mock-bench.jsonc b/mlos_bench/mlos_bench/tests/config/cli/mock-bench.jsonc
index cff09de12ba..d4179baa8e2 100644
--- a/mlos_bench/mlos_bench/tests/config/cli/mock-bench.jsonc
+++ b/mlos_bench/mlos_bench/tests/config/cli/mock-bench.jsonc
@@ -13,7 +13,6 @@
],
... |
WeblateOrg__weblate-1655 | File download is outdated
### Steps to reproduce
1. Edit string.
2. Donwload original translation file (without conversion).
### Actual behaviour
The file does not have recent changes.
### Expected behaviour
All changes should be reflected.
### Server configuration
Current master
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © 2012 - 2017 Michal Čihař <michal@cihar.com>\n#\n# This file is part of Weblate <https://weblate.org/>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the ... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © 2012 - 2017 Michal Čihař <michal@cihar.com>\n#\n# This file is part of Weblate <https://weblate.org/>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the ... | diff --git a/weblate/trans/tests/test_files.py b/weblate/trans/tests/test_files.py
index 816cb79a628f..0a3cce423e3d 100644
--- a/weblate/trans/tests/test_files.py
+++ b/weblate/trans/tests/test_files.py
@@ -360,6 +360,7 @@ def test_export(self):
)
)
self.assertContains(response, 'Weblate ... |
dask__distributed-2975 | dask.distributed.progress no longer callable in 2.3.0?
We've used the progress() function from dask.distributed a bunch in the past to display a progress bar in JupyterLab, but it seems to have stopped working after upgrading to Dask 2.3.0:
```
from dask.distributed import Client, progress
import dask.dataframe as... | [
{
"content": "from . import config\nfrom dask.config import config\nfrom .actor import Actor, ActorFuture\nfrom .core import connect, rpc\nfrom .deploy import LocalCluster, Adaptive, SpecCluster\nfrom .diagnostics import progress\nfrom .client import (\n Client,\n Executor,\n CompatibleExecutor,\n w... | [
{
"content": "from . import config\nfrom dask.config import config\nfrom .actor import Actor, ActorFuture\nfrom .core import connect, rpc\nfrom .deploy import LocalCluster, Adaptive, SpecCluster\nfrom .diagnostics.progressbar import progress\nfrom .client import (\n Client,\n Executor,\n CompatibleExec... | diff --git a/distributed/__init__.py b/distributed/__init__.py
index ca36613c815..d79993dfef7 100644
--- a/distributed/__init__.py
+++ b/distributed/__init__.py
@@ -3,7 +3,7 @@
from .actor import Actor, ActorFuture
from .core import connect, rpc
from .deploy import LocalCluster, Adaptive, SpecCluster
-from .diagnost... |
numpy__numpy-15672 | FIXME in `numpy/__init__.py` related to `numpy.lib` imports
There is a FIXME comment in `numpy/__init__.py` that doesn't seem to have a corresponding issue on GitHub, at least not one that I noticed with a cursory search of the issues.
https://github.com/numpy/numpy/blob/eb167a3fe540780f397a14817f54a95333fbcc6c/nump... | [
{
"content": "\"\"\"\nNumPy\n=====\n\nProvides\n 1. An array object of arbitrary homogeneous items\n 2. Fast mathematical operations over arrays\n 3. Linear Algebra, Fourier Transforms, Random Number Generation\n\nHow to use the documentation\n----------------------------\nDocumentation is available in two f... | [
{
"content": "\"\"\"\nNumPy\n=====\n\nProvides\n 1. An array object of arbitrary homogeneous items\n 2. Fast mathematical operations over arrays\n 3. Linear Algebra, Fourier Transforms, Random Number Generation\n\nHow to use the documentation\n----------------------------\nDocumentation is available in two f... | diff --git a/numpy/__init__.py b/numpy/__init__.py
index c5c58b0200ca..ba35224e6ad5 100644
--- a/numpy/__init__.py
+++ b/numpy/__init__.py
@@ -141,7 +141,8 @@
from .core import *
from . import compat
from . import lib
- # FIXME: why have numpy.lib if everything is imported here??
+ # NOTE: to be re... |
PrefectHQ__prefect-10669 | Email notifications example form input needs adjusted
### First check
- [X] I added a descriptive title to this issue.
- [X] I used the GitHub search to find a similar issue and didn't find it.
- [X] I searched the Prefect documentation for this issue.
- [X] I checked that this issue is related to Prefect and not one ... | [
{
"content": "from abc import ABC\nfrom typing import Dict, List, Optional\n\nfrom pydantic import AnyHttpUrl, Field, SecretStr\nfrom typing_extensions import Literal\n\nfrom prefect.blocks.abstract import NotificationBlock\nfrom prefect.blocks.fields import SecretDict\nfrom prefect.events.instrument import ins... | [
{
"content": "from abc import ABC\nfrom typing import Dict, List, Optional\n\nfrom pydantic import AnyHttpUrl, Field, SecretStr\nfrom typing_extensions import Literal\n\nfrom prefect.blocks.abstract import NotificationBlock\nfrom prefect.blocks.fields import SecretDict\nfrom prefect.events.instrument import ins... | diff --git a/src/prefect/blocks/notifications.py b/src/prefect/blocks/notifications.py
index 52cfc6e3ad03..86d7c1d6ff53 100644
--- a/src/prefect/blocks/notifications.py
+++ b/src/prefect/blocks/notifications.py
@@ -749,7 +749,7 @@ class SendgridEmail(AbstractAppriseNotificationBlock):
default=...,
tit... |
tobymao__sqlglot-2598 | sqlglot corrupts date_format spec for MySQL
**Before you file an issue**
> - Make sure you specify the "read" dialect eg. parse_one(sql, read="spark")
Yes, `read='mysql'`
> - Check if the issue still exists on main
Yes
**Fully reproducible code snippet**
> Please include a fully reproducible code snipp... | [
{
"content": "import typing as t\n\n# The generic time format is based on python time.strftime.\n# https://docs.python.org/3/library/time.html#time.strftime\nfrom sqlglot.trie import TrieResult, in_trie, new_trie\n\n\ndef format_time(\n string: str, mapping: t.Dict[str, str], trie: t.Optional[t.Dict] = None\... | [
{
"content": "import typing as t\n\n# The generic time format is based on python time.strftime.\n# https://docs.python.org/3/library/time.html#time.strftime\nfrom sqlglot.trie import TrieResult, in_trie, new_trie\n\n\ndef format_time(\n string: str, mapping: t.Dict[str, str], trie: t.Optional[t.Dict] = None\... | diff --git a/sqlglot/time.py b/sqlglot/time.py
index c286ec1e8c..50ec2ec3f0 100644
--- a/sqlglot/time.py
+++ b/sqlglot/time.py
@@ -42,6 +42,10 @@ def format_time(
end -= 1
chars = sym
sym = None
+ else:
+ chars = chars[0]
+ end ... |
OpenEnergyPlatform__oeplatform-483 | Aliases are not resolved in column matching
Aliases in from-clauses will cause an error when parsing column elements. There must be a structure that keeps track of aliases while parsing to resolve them appropriately.
| [
{
"content": "###########\n# Parsers #\n###########\nimport decimal\nimport re\nfrom datetime import datetime, date\n\nimport geoalchemy2 # Although this import seems unused is has to be here\nimport sqlalchemy as sa\nfrom sqlalchemy import (\n Column,\n MetaData,\n Table,\n and_,\n not_,\n c... | [
{
"content": "###########\n# Parsers #\n###########\nimport decimal\nimport re\nfrom datetime import datetime, date\n\nimport geoalchemy2 # Although this import seems unused is has to be here\nimport sqlalchemy as sa\nfrom sqlalchemy import (\n Column,\n MetaData,\n Table,\n and_,\n not_,\n c... | diff --git a/api/parser.py b/api/parser.py
index 3c76c36ef..37cb06463 100644
--- a/api/parser.py
+++ b/api/parser.py
@@ -357,7 +357,10 @@ def parse_column(d, mapper):
if is_literal:
return literal_column(name)
else:
- return column(name)
+ if table_name is not None:
... |
googleapis__google-api-python-client-1221 | Published package is missing discovery files in discovery_cache
Many thanks to the @wyk9787 for noticing this and reaching out.
All calls to `discovery.build()` using `2.0.0` fail with "unknown api name or version".
```python
from googleapiclient import discovery
client = discovery.build("cloudprofiler", "v2"... | [
{
"content": "# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unles... | [
{
"content": "# Copyright 2014 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unles... | diff --git a/setup.py b/setup.py
index 894018a1b1e..d3ef571a9a3 100644
--- a/setup.py
+++ b/setup.py
@@ -60,7 +60,7 @@
install_requires=install_requires,
python_requires=">=3.6",
packages=packages,
- package_data={},
+ package_data={"googleapiclient": ["discovery_cache/documents/*.json"]},
lic... |
buildbot__buildbot-3490 | UnboundLocalError in mq/base.py on master shutdown
Hello,
We're using buildbot in multi-master mode and got this stacktrace on one of the master when shutting it down:
```
2017-07-17 12:33:29+0000 [-] Waiting for 1 build(s) to finish
2017-07-17 12:33:29+0000 [-] Builder <Builder 'u'sql-monitor-bitbucket_scality_r... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | diff --git a/master/buildbot/mq/base.py b/master/buildbot/mq/base.py
index 2379dead364c..b27f462492a4 100644
--- a/master/buildbot/mq/base.py
+++ b/master/buildbot/mq/base.py
@@ -36,7 +36,9 @@ def waitUntilEvent(self, filter, check_callback):
# we only wait if the check callback return true
if not che... |
liberapay__liberapay.com-195 | Twitter API chokes on at-sign
https://liberapay.com/on/twitter/@korben/ returns a 500. sentry#35, public link: https://sentry.changaco.oy.lc/share/issue/322e3335/.
| [
{
"content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom datetime import timedelta\nimport json\nimport uuid\nimport xml.etree.ElementTree as ET\n\nfrom six.moves.urllib.parse import urlsplit, urlunsplit\n\nfrom aspen import Response\nfrom aspen.utils import utcno... | [
{
"content": "from __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom datetime import timedelta\nimport json\nimport uuid\nimport xml.etree.ElementTree as ET\n\nfrom six.moves.urllib.parse import urlsplit, urlunsplit\n\nfrom aspen import Response\nfrom aspen.utils import utcno... | diff --git a/liberapay/models/account_elsewhere.py b/liberapay/models/account_elsewhere.py
index cc3f674596..81361dfb4c 100644
--- a/liberapay/models/account_elsewhere.py
+++ b/liberapay/models/account_elsewhere.py
@@ -242,6 +242,8 @@ def get_account_elsewhere(website, state, api_lookup=True):
uid = uid[1:]
... |
tornadoweb__tornado-3167 | Tornado 6.2 release readiness
I'm creating this issue to collect feedback on the 6.2 betas. For the folks who have tried them, do you think the release is ready to go or are there still more changes to be made?
Tagging @minrk and @graingert as authors of relevant PRs, although I'd welcome feedback from anyone intere... | [
{
"content": "#\n# Copyright 2009 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "#\n# Copyright 2009 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/docs/releases/v6.2.0.rst b/docs/releases/v6.2.0.rst
index a2277b9267..57b76ecb14 100644
--- a/docs/releases/v6.2.0.rst
+++ b/docs/releases/v6.2.0.rst
@@ -1,8 +1,8 @@
What's new in Tornado 6.2.0
===========================
-Jun XX, 2022
-------------
+Jul 3, 2022
+-----------
Deprecation notice
~~~~... |
mkdocs__mkdocs-708 | Remove unicode_literals import in the CLI code
Looks like this can cause some issues with Click, I've not seen any but we should probably remove it anyway or we will start to get warnings from Click 5.0.
https://github.com/mitsuhiko/click/commit/5f337705f68bdfa66d7c7a9fe7fc5d6bfd48db94
| [
{
"content": "#!/usr/bin/env python\n# coding: utf-8\n\nfrom __future__ import unicode_literals\nimport logging\nimport click\nimport socket\n\nfrom mkdocs import __version__\nfrom mkdocs import utils\nfrom mkdocs import exceptions\nfrom mkdocs.config import load_config\nfrom mkdocs.commands import build, gh_de... | [
{
"content": "#!/usr/bin/env python\n# coding: utf-8\n\nfrom __future__ import unicode_literals\nimport logging\nimport click\nimport socket\n\nfrom mkdocs import __version__\nfrom mkdocs import utils\nfrom mkdocs import exceptions\nfrom mkdocs.config import load_config\nfrom mkdocs.commands import build, gh_de... | diff --git a/mkdocs/__main__.py b/mkdocs/__main__.py
index 6d76f97235..7f788141d2 100644
--- a/mkdocs/__main__.py
+++ b/mkdocs/__main__.py
@@ -14,6 +14,11 @@
log = logging.getLogger(__name__)
+# Disable the warning that Click displays (as of Click version 5.0) when users
+# use unicode_literals in Python 2.
+# See... |
alltheplaces__alltheplaces-2638 | Spider costco is broken
During the global build at 2021-08-18-14-42-26, spider **costco** failed with **0 features** and **2 errors**.
Here's [the log](https://data.alltheplaces.xyz/runs/2021-08-18-14-42-26/logs/costco.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-08-18-14-42-26/output/costco.geojson) ... | [
{
"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\nimport re\nfrom urllib.parse import urlencode\n\nfrom locations.items import GeojsonPointItem\n\nDAYS_NAME = {\n 'm': 'Mo',\n 'mon': 'Mo',\n 't': 'Tu',\n 'w': 'We',\n 's': 'Th',\n 'f': 'Fr',\n 'f ': 'Fr',\n 'sun': 'Su',\n... | [
{
"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\nimport re\nfrom urllib.parse import urlencode\n\nfrom locations.items import GeojsonPointItem\n\nDAYS_NAME = {\n 'm': 'Mo',\n 'mon': 'Mo',\n 't': 'Tu',\n 'w': 'We',\n 's': 'Th',\n 'f': 'Fr',\n 'f ': 'Fr',\n 'sun': 'Su',\n... | diff --git a/locations/spiders/costco.py b/locations/spiders/costco.py
index 355fb6314e6..28162637fee 100644
--- a/locations/spiders/costco.py
+++ b/locations/spiders/costco.py
@@ -28,7 +28,7 @@ class CostcoSpider(scrapy.Spider):
'https://www.costco.com/warehouse-locations',
)
custom_settings = {
- ... |
cloud-custodian__cloud-custodian-5545 | core - source get_resources should early exit on empty set
some of the service apis will return back all resources if we issue an api call for an empty set of ids. when using get_resources we should explicitly check for an empty set and return in the base describe source / or query resource manager get_resources method... | [
{
"content": "# Copyright 2016-2017 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi... | [
{
"content": "# Copyright 2016-2017 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi... | diff --git a/c7n/query.py b/c7n/query.py
index b0e6faa0997..3eff822c2b1 100644
--- a/c7n/query.py
+++ b/c7n/query.py
@@ -491,6 +491,8 @@ def _get_cached_resources(self, ids):
return None
def get_resources(self, ids, cache=True, augment=True):
+ if not ids:
+ return []
if cache... |
quantumlib__Cirq-3689 | Add to heatmap visualization tests
In the `test_colorbar` test there is a comment about testing that the position size and pad arguments are respected.
| [
{
"content": "# Copyright 2019 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 2019 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/vis/heatmap.py b/cirq/vis/heatmap.py
index 392db174213..87033f27806 100644
--- a/cirq/vis/heatmap.py
+++ b/cirq/vis/heatmap.py
@@ -38,7 +38,7 @@ def _get_qubit_row_col(qubit: QubitCoordinate) -> Tuple[int, int]:
if isinstance(qubit, grid_qubit.GridQubit):
return qubit.row, qubit.col
... |
searx__searx-2130 | Allow server admins to choose default search method
Currently, the default search method used by Searx is `POST` which breaks compatibility with Firefox containers. Since FF's query to `/opensearch.xml` does not include the cookies, the user's preferred method is not reflected and they're forced create a custom search ... | [
{
"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 f70aee37aa..34da1b7c68 100644
--- a/searx/preferences.py
+++ b/searx/preferences.py
@@ -348,7 +348,7 @@ def __init__(self, themes, categories, engines, plugins):
}
),
'method': EnumStringSetting(
- '... |
optuna__optuna-5055 | Use `__future__.annotations` everywhere in the Optuna code base
### Motivation
Optuna drops Python 3.6 from v3.1, so we can use `__future__.annotations`, which simplifies the code base. See [PEP 563](https://peps.python.org/pep-0563/), [PEP584](https://peps.python.org/pep-0584/), [PEP 585](https://peps.python.org/pe... | [
{
"content": "import abc\nfrom typing import Optional\n\nfrom optuna._experimental import experimental_class\nfrom optuna.study.study import Study\nfrom optuna.terminator.erroreval import BaseErrorEvaluator\nfrom optuna.terminator.erroreval import CrossValidationErrorEvaluator\nfrom optuna.terminator.erroreval ... | [
{
"content": "from __future__ import annotations\n\nimport abc\nfrom typing import Optional\n\nfrom optuna._experimental import experimental_class\nfrom optuna.study.study import Study\nfrom optuna.terminator.erroreval import BaseErrorEvaluator\nfrom optuna.terminator.erroreval import CrossValidationErrorEvalua... | diff --git a/optuna/terminator/callback.py b/optuna/terminator/callback.py
index 74c484d0e8..dc75f23aa4 100644
--- a/optuna/terminator/callback.py
+++ b/optuna/terminator/callback.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
from typing import Optional
from optuna._experimental import experimental_class... |
piskvorky__gensim-2154 | ZeroDivisionError: float division by zero
Getting error : ZeroDivisionError: float division by zero
https://github.com/RaRe-Technologies/gensim/blob/9481915915bf61aa6e4e719a2f26d509677e6779/gensim/summarization/pagerank_weighted.py#L53
 until I resize the window or use a mouse key in the window. This also happens with the example https://... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\"\"\"vispy backend for glfw.\"\"\"\n\n# To install GLFW on Ubuntu, use sudo apt-get install libglfw3.\n# On OSX, consider using brew.\n... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\"\"\"vispy backend for glfw.\"\"\"\n\n# To install GLFW on Ubuntu, use sudo apt-get install libglfw3.\n# On OSX, consider using brew.\n... | diff --git a/vispy/app/backends/_glfw.py b/vispy/app/backends/_glfw.py
index f662fbabd1..6c59d96dc9 100644
--- a/vispy/app/backends/_glfw.py
+++ b/vispy/app/backends/_glfw.py
@@ -289,6 +289,7 @@ def __init__(self, *args, **kwargs):
self._next_key_text = {}
self._vispy_canvas.set_current()
sel... |
bookwyrm-social__bookwyrm-1864 | Invalid table limit error
**Describe the bug**
When running a fresh dev instance I get an `Invalid table limit` error, coming from `initdb.py`. Not sure if something is broken in the latest main branch, or I need to update my configuration.
**To Reproduce**
Steps to reproduce the behavior:
1. fetch latest `main` ... | [
{
"content": "\"\"\" What you need in the database to make it work \"\"\"\nfrom django.core.management.base import BaseCommand\nfrom django.contrib.auth.models import Group, Permission\nfrom django.contrib.contenttypes.models import ContentType\n\nfrom bookwyrm import models\n\n\ndef init_groups():\n \"\"\"p... | [
{
"content": "\"\"\" What you need in the database to make it work \"\"\"\nfrom django.core.management.base import BaseCommand\nfrom django.contrib.auth.models import Group, Permission\nfrom django.contrib.contenttypes.models import ContentType\n\nfrom bookwyrm import models\n\n\ndef init_groups():\n \"\"\"p... | diff --git a/bookwyrm/management/commands/initdb.py b/bookwyrm/management/commands/initdb.py
index 37dd66af4d..b54055744e 100644
--- a/bookwyrm/management/commands/initdb.py
+++ b/bookwyrm/management/commands/initdb.py
@@ -164,7 +164,7 @@ def handle(self, *args, **options):
"settings",
"linkdo... |
horovod__horovod-2651 | Wrong default for horovod.tensorflow.keras.allreduce(average...
In Horovod 0.21.1 the default for `average` in `allreduce` is still `True` leading to
> ValueError: The op parameter supersedes average. Please provide only one of them.
when using `op=...` (only).
This is only in in `horovod.tensorflow.keras`, n... | [
{
"content": "# Copyright 2018 Uber Technologies, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | [
{
"content": "# Copyright 2018 Uber Technologies, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 27d8ecad07..3033704106 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fixed `local_rank` support for Ray. ([#2596](https://github.com/horovod/horovod/pull/2596))
+- Fixe... |
e-valuation__EvaP-1321 | Evaluation preview button visibility
As a teaching assistant, I might be a contributor to a given course and therefore get my own feedback in the main evaluation. If that course also has an exam evaluation, I see that listed on my "own evaluations" page with the option to preview the questionnaire. However, as not bein... | [
{
"content": "from django.forms import TypedChoiceField\nfrom django.template import Library\n\nfrom evap.evaluation.models import BASE_UNIPOLAR_CHOICES\nfrom evap.evaluation.tools import STATES_ORDERED, STATE_DESCRIPTIONS\nfrom evap.rewards.tools import can_reward_points_be_used_by\nfrom evap.student.forms imp... | [
{
"content": "from django.forms import TypedChoiceField\nfrom django.template import Library\n\nfrom evap.evaluation.models import BASE_UNIPOLAR_CHOICES\nfrom evap.evaluation.tools import STATES_ORDERED, STATE_DESCRIPTIONS\nfrom evap.rewards.tools import can_reward_points_be_used_by\nfrom evap.student.forms imp... | diff --git a/evap/contributor/templates/contributor_index.html b/evap/contributor/templates/contributor_index.html
index 0769b1d562..04724bcecb 100644
--- a/evap/contributor/templates/contributor_index.html
+++ b/evap/contributor/templates/contributor_index.html
@@ -180,10 +180,12 @@
... |
mitmproxy__mitmproxy-1336 | Snapshots have weird filename due to py3
##### Steps to reproduce the problem:
1. Look at https://snapshots.mitmproxy.org/v0.18/
```
mitmproxy-0.18dev0636-0xg588dad1-py2-none-any.whl 26-Jun-2016 21:55 985K
mitmproxy-0.18dev0759-0xg22c0db3-win32.zip 09-Jul-2016 20:45 35M
mitmproxy-0.18dev0775-0xb'g6bb26... | [
{
"content": "#!/usr/bin/env python\nfrom __future__ import absolute_import, print_function, division\nfrom os.path import join\nimport contextlib\nimport os\nimport shutil\nimport subprocess\nimport re\nimport shlex\nimport runpy\nimport zipfile\nimport tarfile\nimport platform\nimport click\nimport pysftp\nim... | [
{
"content": "#!/usr/bin/env python\nfrom __future__ import absolute_import, print_function, division\nfrom os.path import join\nimport contextlib\nimport os\nimport shutil\nimport subprocess\nimport re\nimport shlex\nimport runpy\nimport zipfile\nimport tarfile\nimport platform\nimport click\nimport pysftp\nim... | diff --git a/release/rtool.py b/release/rtool.py
index 04e1249d07..4e43eaefd2 100755
--- a/release/rtool.py
+++ b/release/rtool.py
@@ -76,7 +76,7 @@ def get_snapshot_version():
return "{version}dev{tag_dist:04}-0x{commit}".format(
version=get_version(), # this should already be the next version
... |
cloud-custodian__cloud-custodian-3597 | cli metrics subcommand and azure - throws errors
@kapilt what should the expected behavior be here?
```
(cloud-custodian) $ custodian metrics policies/policy.yml
2019-02-20 11:19:18,346: custodian.azure.session:INFO Creating session with Azure CLI Authentication
2019-02-20 11:19:18,347: custodian.azure.session:I... | [
{
"content": "# Copyright 2015-2017 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi... | [
{
"content": "# Copyright 2015-2017 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi... | diff --git a/c7n/commands.py b/c7n/commands.py
index 58cd81041dc..5140d5f2ee8 100644
--- a/c7n/commands.py
+++ b/c7n/commands.py
@@ -487,6 +487,8 @@ def _metrics_get_endpoints(options):
@policy_command
def metrics_cmd(options, policies):
+ log.warning("metrics command is deprecated, and will be removed in future... |
google__mobly-518 | The kill signal param in `stop_standing_subprocess` is never used
https://github.com/google/mobly/blob/master/mobly/utils.py#L318
| [
{
"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/mobly/utils.py b/mobly/utils.py
index b4f85362..a9f065cd 100644
--- a/mobly/utils.py
+++ b/mobly/utils.py
@@ -316,7 +316,7 @@ def start_standing_subprocess(cmd, shell=False):
return proc
-def stop_standing_subprocess(proc, kill_signal=signal.SIGTERM):
+def stop_standing_subprocess(proc):
"""S... |
DDMAL__CantusDB-1182 | Source create/edit: Provenance autocompletes should be icontains
...rather than istartswith. "Berne" should find "Abdij ban Berne", etc.
| [
{
"content": "import csv\nfrom typing import Optional, Union\nfrom django.http.response import JsonResponse\nfrom django.http import HttpResponse, HttpResponseNotFound\nfrom django.shortcuts import render, redirect\nfrom django.urls.base import reverse\nfrom articles.models import Article\nfrom main_app.models ... | [
{
"content": "import csv\nfrom typing import Optional, Union\nfrom django.http.response import JsonResponse\nfrom django.http import HttpResponse, HttpResponseNotFound\nfrom django.shortcuts import render, redirect\nfrom django.urls.base import reverse\nfrom articles.models import Article\nfrom main_app.models ... | diff --git a/django/cantusdb_project/main_app/views/views.py b/django/cantusdb_project/main_app/views/views.py
index 61d06a15c..cbcba9c17 100644
--- a/django/cantusdb_project/main_app/views/views.py
+++ b/django/cantusdb_project/main_app/views/views.py
@@ -1063,7 +1063,7 @@ def get_queryset(self):
return P... |
microsoft__ptvsd-362 | PTVSD fails to run on windows
```
Traceback (most recent call last):
File "C:\Users\karth\.vscode\extensions\ms-python.python-2018.3.1\pythonFiles\experimental\ptvsd_launcher.py", line 96,
in <module>
vspd.debug(filename, port_num, debug_id, debug_options, run_as)
File "c:\git\ptvsd\ptvsd\debugger.py", lin... | [
{
"content": "import atexit\nimport os\nimport platform\nimport signal\nimport sys\n\nfrom ptvsd import wrapper\nfrom ptvsd.socket import close_socket\n\n\ndef _wait_on_exit():\n if sys.__stdout__ is not None:\n try:\n import msvcrt\n except ImportError:\n sys.__stdout__.w... | [
{
"content": "import atexit\nimport os\nimport platform\nimport signal\nimport sys\n\nfrom ptvsd import wrapper\nfrom ptvsd.socket import close_socket\n\n\ndef _wait_on_exit():\n if sys.__stdout__ is not None:\n try:\n import msvcrt\n except ImportError:\n sys.__stdout__.w... | diff --git a/ptvsd/daemon.py b/ptvsd/daemon.py
index 7ab4622d5..6dc4681fc 100644
--- a/ptvsd/daemon.py
+++ b/ptvsd/daemon.py
@@ -168,6 +168,9 @@ def handler():
self._atexit_handlers.append(handler)
def _add_signal_handlers(self):
+ if platform.system() == 'Windows':
+ return
+
... |
opendatacube__datacube-core-262 | Error reading rainfall grids
### Expected behaviour
Return an xarray Dataset like the following:
```python
<xarray.Dataset>
Dimensions: (latitude: 1, longitude: 1, time: 366)
Coordinates:
* time (time) datetime64[ns] 2000-01-01 2000-01-02 2000-01-03 ...
* latitude (latitude) float64 -27.52
* ... | [
{
"content": "# coding=utf-8\n\"\"\"\nCreate/store dataset data into storage units based on the provided storage mappings.\n\nImportant functions are:\n\n* :func:`reproject_and_fuse`\n* :func:`read_from_source`\n\n\"\"\"\nfrom __future__ import absolute_import, division, print_function\n\nimport logging\nimport... | [
{
"content": "# coding=utf-8\n\"\"\"\nCreate/store dataset data into storage units based on the provided storage mappings.\n\nImportant functions are:\n\n* :func:`reproject_and_fuse`\n* :func:`read_from_source`\n\n\"\"\"\nfrom __future__ import absolute_import, division, print_function\n\nimport logging\nimport... | diff --git a/datacube/storage/storage.py b/datacube/storage/storage.py
index 5c19d2d587..f525c9e612 100644
--- a/datacube/storage/storage.py
+++ b/datacube/storage/storage.py
@@ -61,7 +61,10 @@ def _rasterio_resampling_method(resampling):
if str(rasterio.__version__) >= '0.36.0':
def _rasterio_crs_wkt(src):
- ... |
kserve__kserve-864 | explanations no longer working with 0.3.0
Am following the steps in with 0.3.0 of kfserving: https://github.com/kubeflow/kfserving/tree/master/docs/samples/explanation/alibi/income
When I execute the curl for the explain I get a 500 error and the container logs show the below. I'm guessing the [update to master](htt... | [
{
"content": "# Copyright 2019 kubeflow.org.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica... | [
{
"content": "# Copyright 2019 kubeflow.org.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica... | diff --git a/python/alibiexplainer.Dockerfile b/python/alibiexplainer.Dockerfile
index 762a305ef20..5ef19232bae 100644
--- a/python/alibiexplainer.Dockerfile
+++ b/python/alibiexplainer.Dockerfile
@@ -5,8 +5,5 @@ COPY kfserving kfserving
COPY third_party third_party
RUN pip install --upgrade pip && pip install -e .... |
celery__celery-5898 | Python 3.9 compatibility issue regarding usage of threading.Thread.isAlive
<!--
Please fill this template entirely and do not erase parts of it.
We reserve the right to close without a response
bug reports which are incomplete.
-->
# Checklist
<!--
To check an item on the list replace [ ] with [x].
-->
- [x] I... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Scheduler for Python functions.\n\n.. note::\n This is used for the thread-based worker only,\n not for amqp/redis/sqs/qpid where :mod:`kombu.asynchronous.timer` is used.\n\"\"\"\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimpor... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Scheduler for Python functions.\n\n.. note::\n This is used for the thread-based worker only,\n not for amqp/redis/sqs/qpid where :mod:`kombu.asynchronous.timer` is used.\n\"\"\"\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimpor... | diff --git a/celery/utils/timer2.py b/celery/utils/timer2.py
index 58de4ac278b..87f29b36891 100644
--- a/celery/utils/timer2.py
+++ b/celery/utils/timer2.py
@@ -102,7 +102,7 @@ def stop(self):
self.running = False
def ensure_started(self):
- if not self.running and not self.isAlive():
+ ... |
aio-libs__aiohttp-3295 | request.content.iter_chunks() stalls when content is empty.
## Long story short
The title says it all.
Shouldn't [EmptyStreamReader.readchunk](https://github.com/aio-libs/aiohttp/blob/master/aiohttp/streams.py#L470) on its face `return (b'', True)` and not `return (b'', False)` ?
Without it, the special EOS chun... | [
{
"content": "import asyncio\nimport collections\nfrom typing import List # noqa\nfrom typing import Awaitable, Callable, Optional, Tuple\n\nfrom .base_protocol import BaseProtocol\nfrom .helpers import BaseTimerContext, set_exception, set_result\nfrom .log import internal_logger\n\n\ntry: # pragma: no cover\... | [
{
"content": "import asyncio\nimport collections\nfrom typing import List # noqa\nfrom typing import Awaitable, Callable, Optional, Tuple\n\nfrom .base_protocol import BaseProtocol\nfrom .helpers import BaseTimerContext, set_exception, set_result\nfrom .log import internal_logger\n\n\ntry: # pragma: no cover\... | diff --git a/CHANGES/3186.bugfix b/CHANGES/3186.bugfix
new file mode 100644
index 00000000000..e434938b3c1
--- /dev/null
+++ b/CHANGES/3186.bugfix
@@ -0,0 +1 @@
+Return empty bytes with end-of-chunk marker in empty stream reader.
diff --git a/aiohttp/streams.py b/aiohttp/streams.py
index 20f38f06039..7cdb97abc61 100644... |
canonical__snapcraft-4329 | SNAPCRAFT_BUILD_ENVIRONMENT apparently takes precedence over "--use-lxd"
### Bug Description
Despite what is printed here, https://snapcraft.io/docs/build-providers, if I set the env var SNAPCRAFT_BUILD_ENVIRONMENT=host, that appears to take priority over using "--use-lxd" on the command line.
### To Reproduce
... | [
{
"content": "# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-\n#\n# Copyright 2022-2023 Canonical Ltd.\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 3 as\n# published by the Free Software Foundation.\n#\n# This... | [
{
"content": "# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-\n#\n# Copyright 2022-2023 Canonical Ltd.\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 3 as\n# published by the Free Software Foundation.\n#\n# This... | diff --git a/snapcraft/parts/lifecycle.py b/snapcraft/parts/lifecycle.py
index 3b70b876e1..6fb3ceb3c6 100644
--- a/snapcraft/parts/lifecycle.py
+++ b/snapcraft/parts/lifecycle.py
@@ -251,7 +251,7 @@ def _run_command(
permanent=True,
)
- if (
+ if parsed_args.use_lxd or (
n... |
pypa__pip-1390 | pip doesn't detect a venv created virtual environment as a virtual environment
The venv integration in Python 3.4 fails if PIP_REQUIREVIRTUALENV is set (http://bugs.python.org/issue19734)
I'm currently working around this by forcibly clearing the setting in the test, but the PIP_REQUIREVIRTUALENV check should pass whe... | [
{
"content": "\"\"\"Locations where we look for configs, install stuff, etc\"\"\"\n\nimport sys\nimport site\nimport os\nimport tempfile\nfrom distutils.command.install import install, SCHEME_KEYS\nimport getpass\nfrom pip.backwardcompat import get_python_lib, get_path_uid, user_site\nimport pip.exceptions\n\n\... | [
{
"content": "\"\"\"Locations where we look for configs, install stuff, etc\"\"\"\n\nimport sys\nimport site\nimport os\nimport tempfile\nfrom distutils.command.install import install, SCHEME_KEYS\nimport getpass\nfrom pip.backwardcompat import get_python_lib, get_path_uid, user_site\nimport pip.exceptions\n\n\... | diff --git a/pip/locations.py b/pip/locations.py
index 61699434665..1d402651689 100644
--- a/pip/locations.py
+++ b/pip/locations.py
@@ -34,7 +34,12 @@ def running_under_virtualenv():
Return True if we're running inside a virtualenv, False otherwise.
"""
- return hasattr(sys, 'real_prefix')
+ if hasat... |
paperless-ngx__paperless-ngx-3554 | [BUG] Mail rule action "Move to specified folder" not working
### Description
If mail rule action is "Move to specified folder", the mail.log contains:
```
[2023-06-06 23:50:00,229] [DEBUG] [paperless_mail] Processing mail account T-Online (Thorsten)
[2023-06-06 23:50:00,342] [DEBUG] [paperless_mail] GMAIL Label ... | [
{
"content": "import datetime\nimport itertools\nimport logging\nimport os\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 pathvalidate\n... | [
{
"content": "import datetime\nimport itertools\nimport logging\nimport os\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 pathvalidate\n... | diff --git a/src/paperless_mail/mail.py b/src/paperless_mail/mail.py
index b525ef91d3f..bfb306e5abc 100644
--- a/src/paperless_mail/mail.py
+++ b/src/paperless_mail/mail.py
@@ -384,6 +384,8 @@ def make_criterias(rule: MailRule, supports_gmail_labels: bool):
if isinstance(rule_query, dict):
if len(rule_que... |
ansible__ansible-modules-core-2723 | pip module "requirements" parameter documentation is incomplete.
For the "requirements" parameter, the comment "The path to a pip requirements file" is incomplete. I am left with the following questions (I am a very new Ansible user):
- Is this a local or remote path?
- If local, is there a way to refer to the path rel... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Matt Wright <matt@nobien.net>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, ... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Matt Wright <matt@nobien.net>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, ... | diff --git a/packaging/language/pip.py b/packaging/language/pip.py
index 6d325282770..d896c5b9ed5 100755
--- a/packaging/language/pip.py
+++ b/packaging/language/pip.py
@@ -44,7 +44,8 @@
default: null
requirements:
description:
- - The path to a pip requirements file
+ - The path to a pip require... |
lutris__lutris-1723 | Saving game settings causes a traceback
```
Traceback (most recent call last):
File "/mnt/extrastorage/lutris/lutris/gui/lutriswindow.py", line 666, in on_game_updated
self.view.set_selected_game(game.id)
File "/mnt/extrastorage/lutris/lutris/gui/views/list.py", line 123, in set_selected_game
row = sel... | [
{
"content": "# pylint: disable=no-member\nfrom gi.repository import Gtk, Pango\nfrom lutris import settings\nfrom lutris.gui.views.base import GameView\nfrom lutris.gui.views import (\n COL_NAME,\n COL_ICON,\n COL_YEAR,\n COL_RUNNER_HUMAN_NAME,\n COL_PLATFORM,\n COL_LASTPLAYED,\n COL_LASTP... | [
{
"content": "# pylint: disable=no-member\nfrom gi.repository import Gtk, Pango\nfrom lutris import settings\nfrom lutris.gui.views.base import GameView\nfrom lutris.gui.views import (\n COL_NAME,\n COL_ICON,\n COL_YEAR,\n COL_RUNNER_HUMAN_NAME,\n COL_PLATFORM,\n COL_LASTPLAYED,\n COL_LASTP... | diff --git a/lutris/gui/views/list.py b/lutris/gui/views/list.py
index 5f7e9b7f81..14ff5bd340 100644
--- a/lutris/gui/views/list.py
+++ b/lutris/gui/views/list.py
@@ -120,7 +120,7 @@ def select(self):
self.set_cursor(self.current_path[0])
def set_selected_game(self, game_id):
- row = self.get_row... |
bridgecrewio__checkov-3226 | Parsing does not work with terraform files being encoded with UTF-8/BOM
**Example**
Create an empty file with Unix line endings and save it in UTF-8 encoding with a BOM. Running checkov will fail.
Removing BOM will resolve the issue
**Stacktrace**
```
Traceback (most recent call last):
File "/usr/local/lib/py... | [
{
"content": "from __future__ import annotations\n\nimport json\nimport logging\nimport os\nimport re\nfrom collections.abc import Sequence\nfrom copy import deepcopy\nfrom json import dumps, loads\nfrom pathlib import Path\nfrom typing import Optional, Dict, Mapping, Set, Tuple, Callable, Any, List, Type\n\nim... | [
{
"content": "from __future__ import annotations\n\nimport json\nimport logging\nimport os\nimport re\nfrom collections.abc import Sequence\nfrom copy import deepcopy\nfrom json import dumps, loads\nfrom pathlib import Path\nfrom typing import Optional, Dict, Mapping, Set, Tuple, Callable, Any, List, Type\n\nim... | diff --git a/checkov/terraform/parser.py b/checkov/terraform/parser.py
index c5bb19dd0d..bfd0d7d036 100644
--- a/checkov/terraform/parser.py
+++ b/checkov/terraform/parser.py
@@ -735,7 +735,7 @@ def _load_or_die_quietly(
try:
logging.debug(f"Parsing {file_path}")
- with open(file_path, "r") as f:... |
celery__celery-4203 | -u option does not exist
## Steps to reproduce
Start -> celery -A application worker -l info
## Actual behavior
RuntimeWarning: You're running the worker with superuser privileges: this is
absolutely not recommended!
Please specify a different user using the -u option.
User information: uid=0 euid=0 gid... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Platforms.\n\nUtilities dealing with platform specifics: signals, daemonization,\nusers, groups, and so on.\n\"\"\"\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport atexit\nimport errno\nimport math\nimport numbers\nimport os\nimpor... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Platforms.\n\nUtilities dealing with platform specifics: signals, daemonization,\nusers, groups, and so on.\n\"\"\"\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nimport atexit\nimport errno\nimport math\nimport numbers\nimport os\nimpor... | diff --git a/celery/platforms.py b/celery/platforms.py
index bd7ae58ea9f..7620e1d8210 100644
--- a/celery/platforms.py
+++ b/celery/platforms.py
@@ -86,7 +86,7 @@
You're running the worker with superuser privileges: this is
absolutely not recommended!
-Please specify a different user using the -u option.
+Please sp... |
facebookresearch__CompilerGym-592 | Is running CompilerGym intended to leave cache directories behind?
## ❓ Questions and Help
Not sure if this is a bug or not, so submitting as a question. Running a CompilerGym experiment leaves behind many cache directories. When running a large experiment, this can create problems through the sheer number of direct... | [
{
"content": "#! /usr/bin/env python3\n#\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"An example CompilerGym service in python.\"\"\"\nimport os\nimport sys\nfrom concu... | [
{
"content": "#! /usr/bin/env python3\n#\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"An example CompilerGym service in python.\"\"\"\nimport os\nimport sys\nfrom concu... | diff --git a/compiler_gym/envs/llvm/service/BUILD b/compiler_gym/envs/llvm/service/BUILD
index 6b1d21c6b..294f037e9 100644
--- a/compiler_gym/envs/llvm/service/BUILD
+++ b/compiler_gym/envs/llvm/service/BUILD
@@ -63,6 +63,7 @@ cc_binary(
name = "compiler_gym-llvm-service-prelinked",
srcs = ["RunService.cc"],
... |
urllib3__urllib3-2843 | flaky and pytest-memray incompatible
### Subject
```
______________________________________________________________________________________________________ TestHTTPProxyManager.test_forwarding_proxy_request_timeout[https-https-True] ___________________________________________________________________________________... | [
{
"content": "from __future__ import annotations\n\nimport os\nimport shutil\nimport subprocess\nimport sys\n\nimport nox\n\nSOURCE_FILES = [\n \"docs/\",\n \"dummyserver/\",\n \"src/\",\n \"test/\",\n \"noxfile.py\",\n \"setup.py\",\n]\n\n\ndef tests_impl(\n session: nox.Session,\n extr... | [
{
"content": "from __future__ import annotations\n\nimport os\nimport shutil\nimport subprocess\nimport sys\n\nimport nox\n\nSOURCE_FILES = [\n \"docs/\",\n \"dummyserver/\",\n \"src/\",\n \"test/\",\n \"noxfile.py\",\n \"setup.py\",\n]\n\n\ndef tests_impl(\n session: nox.Session,\n extr... | diff --git a/dev-requirements.txt b/dev-requirements.txt
index 2d1ef23faf..84840cd0f2 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -4,7 +4,6 @@ PySocks==1.7.1
pytest==7.2.0
pytest-timeout==2.1.0
pytest-freezegun==0.4.2
-flaky==3.7.0
trustme==0.9.0
cryptography==39.0.0
backports.zoneinfo==0.2.1;... |
mne-tools__mne-bids-pipeline-289 | `ValueError: n_jobs must be an integer` when calling freesurfer
Hi,
When I run `python run.py freesurfer --config=~/hMT+/config.py`, I get the following error traceback:
```
Traceback (most recent call last):
File "/home/merlin/PhD/mne-bids-pipeline/run.py", line 194, in <module>
fire.Fire(process)
Fi... | [
{
"content": "#!/usr/bin/env python\n\nimport os\nimport shutil\nimport sys\nfrom pathlib import Path\nimport logging\nfrom typing import Union\n\nimport fire\n\nfrom mne.utils import run_subprocess\nfrom mne.parallel import parallel_func\n\nimport config\n\nPathLike = Union[str, Path]\nlogger = logging.getLogg... | [
{
"content": "#!/usr/bin/env python\n\nimport os\nimport shutil\nimport sys\nfrom pathlib import Path\nimport logging\nfrom typing import Union\n\nimport fire\n\nfrom mne.utils import run_subprocess\nfrom mne.parallel import parallel_func\n\nimport config\n\nPathLike = Union[str, Path]\nlogger = logging.getLogg... | diff --git a/scripts/freesurfer/recon_all.py b/scripts/freesurfer/recon_all.py
index 311be181c..f9186c9ae 100755
--- a/scripts/freesurfer/recon_all.py
+++ b/scripts/freesurfer/recon_all.py
@@ -60,7 +60,7 @@ def run_recon(root_dir, subject, fs_bids_app) -> None:
run_subprocess(cmd, env=env, verbose=logger.level)
... |
ephios-dev__ephios-384 | Cannot delete section
As a planner, I cannot delete an existing section from a shift with the section_based signup method
| [
{
"content": "import uuid\nfrom functools import cached_property\nfrom itertools import groupby\nfrom operator import itemgetter\n\nfrom django import forms\nfrom django.contrib import messages\nfrom django.core.exceptions import ValidationError\nfrom django.shortcuts import redirect\nfrom django.template.loade... | [
{
"content": "import uuid\nfrom functools import cached_property\nfrom itertools import groupby\nfrom operator import itemgetter\n\nfrom django import forms\nfrom django.contrib import messages\nfrom django.core.exceptions import ValidationError\nfrom django.shortcuts import redirect\nfrom django.template.loade... | diff --git a/ephios/plugins/basesignup/signup/section_based.py b/ephios/plugins/basesignup/signup/section_based.py
index 82a006e49..a99000858 100644
--- a/ephios/plugins/basesignup/signup/section_based.py
+++ b/ephios/plugins/basesignup/signup/section_based.py
@@ -134,6 +134,7 @@ def clean_sections(self):
... |
nautobot__nautobot-2730 | Changelog Filter "Object Type" - The results could not be loaded.
<!--
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
This form is only for reporting reproducible bugs. If you need assistance
with Nautobot installation, or if you have a general question, please start a
discu... | [
{
"content": "import django_filters\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db.models import Q\nfrom django.forms import IntegerField\n\nfrom nautobot.dcim.models import DeviceRole, DeviceType, Location, Platform, Region, Site\nfro... | [
{
"content": "import django_filters\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db.models import Q\nfrom django.forms import IntegerField\n\nfrom nautobot.dcim.models import DeviceRole, DeviceType, Location, Platform, Region, Site\nfro... | diff --git a/changes/2684.fixed b/changes/2684.fixed
new file mode 100644
index 00000000000..d4a31df7285
--- /dev/null
+++ b/changes/2684.fixed
@@ -0,0 +1 @@
+Fixed "The results could not be loaded" when filtering `ContentTypes` in the UI.
diff --git a/nautobot/extras/filters.py b/nautobot/extras/filters.py
index e5002... |
wagtail__wagtail-11430 | Issue: Usage of an instead of a.
Usage of an instead of a in
client/src/includes/tabs.js: * Set url to have tab an tab hash at the end.
and in many more location

I have already cha... | [
{
"content": "import uuid\nfrom typing import Dict\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.core import checks\nfrom django.db import migrations, models, transaction\nfrom django.db.models.signals import pre_save\nfrom django.dispatch import receiver\nfrom django.utils impo... | [
{
"content": "import uuid\nfrom typing import Dict\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.core import checks\nfrom django.db import migrations, models, transaction\nfrom django.db.models.signals import pre_save\nfrom django.dispatch import receiver\nfrom django.utils impo... | diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 811caf992cf0..ccb59504ba97 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -780,6 +780,7 @@
* Nikhil S Kalburgi
* Salvo Polizzi
* Badr Fourane
+* Vaishnav Dasari
## Translators
diff --git a/client/src/includes/tabs.js b/client/src/includes/tabs.js
index... |
ivy-llc__ivy-13655 | Add torch.Tensor.mul
| [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.torch as torch_frontend\nimport ivy.functional.frontends.torch.nn.functional as torch_frontend_nn\nfrom ivy.functional.frontends.numpy.creation_routines.from_existing_data import (\n array as np_frontend_array,\n)\nfrom ivy.func_w... | [
{
"content": "# global\n\n# local\nimport ivy\nimport ivy.functional.frontends.torch as torch_frontend\nimport ivy.functional.frontends.torch.nn.functional as torch_frontend_nn\nfrom ivy.functional.frontends.numpy.creation_routines.from_existing_data import (\n array as np_frontend_array,\n)\nfrom ivy.func_w... | diff --git a/ivy/functional/frontends/torch/tensor.py b/ivy/functional/frontends/torch/tensor.py
index e652125384f9b..ce9f3630d2753 100644
--- a/ivy/functional/frontends/torch/tensor.py
+++ b/ivy/functional/frontends/torch/tensor.py
@@ -890,3 +890,6 @@ def cumprod(self, dim, dtype):
@with_unsupported_dtypes({"1.11... |
napari__napari-680 | Napari viewer closes unexpectetly when pressing the 3D button
## 🐛 Bug
Hi guys,
I use the following code to automatically display a 3D stack with 2 Channels and 10 Timepoints in Napari. This works fine and the viewer opens up just fine.
When I then press the 3D button the viewer is gone and I get a long error s... | [
{
"content": "from vispy.visuals.transforms import STTransform\nfrom abc import ABC, abstractmethod\n\n\nclass VispyBaseLayer(ABC):\n \"\"\"Base object for individual layer views\n\n Meant to be subclassed.\n\n Parameters\n ----------\n layer : napari.layers.Layer\n Layer model.\n node ... | [
{
"content": "from vispy.visuals.transforms import STTransform\nfrom abc import ABC, abstractmethod\n\n\nclass VispyBaseLayer(ABC):\n \"\"\"Base object for individual layer views\n\n Meant to be subclassed.\n\n Parameters\n ----------\n layer : napari.layers.Layer\n Layer model.\n node ... | diff --git a/napari/_vispy/vispy_base_layer.py b/napari/_vispy/vispy_base_layer.py
index b315736b206..1ab86e1b452 100644
--- a/napari/_vispy/vispy_base_layer.py
+++ b/napari/_vispy/vispy_base_layer.py
@@ -39,7 +39,7 @@ def __init__(self, layer, node):
self.layer = layer
self.node = node
- sel... |
sktime__sktime-4010 | [BUG] Tensorflow failing on macOS
When following development environment setup guide in sktime documentation, conda installation was not able to run properly on macOS doe to missing tensorflow-macos dependency.
To reproduce the issue run on macOS:
```shell
$ conda create -n sktime-dev python=3.8
$ conda activate ... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\"\"\"Configuration file for the Sphinx documentation builder.\"\"\"\n\nimport os\nimport sys\nfrom importlib import import_module\n\nimport sktime\n\n# -- Path setup --------------------------------------------------------------\n\n# If extension... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\"\"\"Configuration file for the Sphinx documentation builder.\"\"\"\n\nimport os\nimport sys\nfrom importlib import import_module\n\nimport sktime\n\n# -- Path setup --------------------------------------------------------------\n\n# If extension... | diff --git a/.all-contributorsrc b/.all-contributorsrc
index 87bcf4d0fd1..016c6a1081f 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -1937,6 +1937,16 @@
"contributions": [
"doc"
]
+ },
+ {
+ "login": "dainelli98",
+ "name": "Daniel Martín Martínez",
+ "avatar_u... |
OpenMined__PySyft-4035 | Return invalid dtype when MPC is applied to Other Dtype Tensor
## Description
When MPC is applied to the int tensor, it must be int but float return.
## How to Reproduce
```python
x = torch.tensor([1, 2, 3])
print(x.dtype) # torch.int64
x = share(bob, alice, crypto_provider=theo)
print(x.dtype) # torch.f... | [
{
"content": "from typing import Union, List\nimport weakref\nimport warnings\n\nimport torch\n\nimport syft\nfrom syft.generic.frameworks.hook import hook_args\nfrom syft.generic.frameworks.overload import overloaded\nfrom syft.frameworks.torch.tensors.interpreters.paillier import PaillierTensor\nfrom syft.mes... | [
{
"content": "from typing import Union, List\nimport weakref\nimport warnings\n\nimport torch\n\nimport syft\nfrom syft.generic.frameworks.hook import hook_args\nfrom syft.generic.frameworks.overload import overloaded\nfrom syft.frameworks.torch.tensors.interpreters.paillier import PaillierTensor\nfrom syft.mes... | diff --git a/syft/frameworks/torch/tensors/interpreters/native.py b/syft/frameworks/torch/tensors/interpreters/native.py
index f847e3d9b13..11ebeac534f 100644
--- a/syft/frameworks/torch/tensors/interpreters/native.py
+++ b/syft/frameworks/torch/tensors/interpreters/native.py
@@ -945,7 +945,7 @@ def share(
... |
quantumlib__Cirq-4780 | Fix deprecation warning for newly added `ClassicallyControlledOperation`
**Description of the issue**
The following deprecation warning is emitted on running the json serialization test and should be fixed.
```python
~/quantum/Cirq/cirq-core/cirq/protocols/json_serialization.py:283: DeprecationWarning: Found 'cirq_t... | [
{
"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-core/cirq/ops/classically_controlled_operation.py b/cirq-core/cirq/ops/classically_controlled_operation.py
index 74a4c3dbb53..3ac6f18bb93 100644
--- a/cirq-core/cirq/ops/classically_controlled_operation.py
+++ b/cirq-core/cirq/ops/classically_controlled_operation.py
@@ -171,7 +171,6 @@ def _circuit_di... |
django__channels-1951 | HttpCommunicator does not raise exception from consumer
If `WebsocketCommunicator` encounters an error, it shows the exception raised by the underlying consumer. In contrast, `HttpCommunicator` just shows a `TimeoutError`, which is not useful for debugging.
Example tests:
```py
from channels.generic.http import ... | [
{
"content": "from channels.consumer import AsyncConsumer\n\nfrom ..exceptions import StopConsumer\n\n\nclass AsyncHttpConsumer(AsyncConsumer):\n \"\"\"\n Async HTTP consumer. Provides basic primitives for building asynchronous\n HTTP endpoints.\n \"\"\"\n\n def __init__(self, *args, **kwargs):\n... | [
{
"content": "from channels.consumer import AsyncConsumer\n\nfrom ..exceptions import StopConsumer\n\n\nclass AsyncHttpConsumer(AsyncConsumer):\n \"\"\"\n Async HTTP consumer. Provides basic primitives for building asynchronous\n HTTP endpoints.\n \"\"\"\n\n def __init__(self, *args, **kwargs):\n... | diff --git a/channels/generic/http.py b/channels/generic/http.py
index 8bbf35236..909e85704 100644
--- a/channels/generic/http.py
+++ b/channels/generic/http.py
@@ -81,7 +81,7 @@ async def http_request(self, message):
await self.handle(b"".join(self.body))
finally:
await s... |
sql-machine-learning__elasticdl-1666 | Parse arguments(flag) in ps/server.go
| [
{
"content": "import argparse\nfrom itertools import chain\n\nfrom elasticdl.python.common.constants import DistributionStrategy\nfrom elasticdl.python.common.log_utils import default_logger as logger\n\nMODEL_SPEC_GROUP = [\n \"dataset_fn\",\n \"eval_metrics_fn\",\n \"model_def\",\n \"model_params\... | [
{
"content": "import argparse\nfrom itertools import chain\n\nfrom elasticdl.python.common.constants import DistributionStrategy\nfrom elasticdl.python.common.log_utils import default_logger as logger\n\nMODEL_SPEC_GROUP = [\n \"dataset_fn\",\n \"eval_metrics_fn\",\n \"model_def\",\n \"model_params\... | diff --git a/elasticdl/pkg/main/main.go b/elasticdl/pkg/main/main.go
index 0f59d5f88..18e1598c5 100644
--- a/elasticdl/pkg/main/main.go
+++ b/elasticdl/pkg/main/main.go
@@ -9,8 +9,22 @@ import (
)
var (
- // TODO: parse more args
- port = flag.Int("port", 2222, "The server port")
+ jobName = flag.Stri... |
docker__docker-py-3200 | Can't create config object
Much like https://github.com/docker/docker-py/issues/2025 the config model is failing to create a new object due to 'name' KeyError
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "docker\models\configs.py", line 10, in __repr__
return f"<{self._... | [
{
"content": "from ..api import APIClient\nfrom .resource import Model, Collection\n\n\nclass Config(Model):\n \"\"\"A config.\"\"\"\n id_attribute = 'ID'\n\n def __repr__(self):\n return f\"<{self.__class__.__name__}: '{self.name}'>\"\n\n @property\n def name(self):\n return self.a... | [
{
"content": "from ..api import APIClient\nfrom .resource import Model, Collection\n\n\nclass Config(Model):\n \"\"\"A config.\"\"\"\n id_attribute = 'ID'\n\n def __repr__(self):\n return f\"<{self.__class__.__name__}: '{self.name}'>\"\n\n @property\n def name(self):\n return self.a... | diff --git a/docker/models/configs.py b/docker/models/configs.py
index 3588c8b5d..5ef137784 100644
--- a/docker/models/configs.py
+++ b/docker/models/configs.py
@@ -30,6 +30,7 @@ class ConfigCollection(Collection):
def create(self, **kwargs):
obj = self.client.api.create_config(**kwargs)
+ obj.se... |
googleapis__google-cloud-python-10168 | PubSub: declaratively drop Python 3.4 support
The README and the language classifiers in `setup.py` both only claim support for Python 3.5+ (and 2.7), but not Python 3.4. However, the `python_requires` in `setup.py` does not reflect that, and does not prevent installing the library in Python 3.4.
| [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | diff --git a/pubsub/setup.py b/pubsub/setup.py
index e26fb4b75778..69f19b3db72e 100644
--- a/pubsub/setup.py
+++ b/pubsub/setup.py
@@ -84,7 +84,7 @@
namespace_packages=namespaces,
install_requires=dependencies,
extras_require=extras,
- python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*",
+ pyth... |
agconti__cookiecutter-django-rest-150 | Set APPEND_SLASH to False
Since Django cannot send POST data in a `301` redirect, `POST`s to an api at `api/v1/resource` will fail with a `400` bad request, assuming the configured route is `api/v1/resource/`. With `APPEND_SLASH` set to false, `POST`s to an api at `api/v1/resource` will fail with a `404`, letting the ... | [
{
"content": "import os\nfrom os.path import join\n\nfrom configurations import Configuration, values\n\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n\nclass Common(Configuration):\n\n INSTALLED_APPS = (\n 'django.contrib.admin',\n 'django.contrib.auth',\n 'd... | [
{
"content": "import os\nfrom os.path import join\n\nfrom configurations import Configuration, values\n\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n\nclass Common(Configuration):\n\n INSTALLED_APPS = (\n 'django.contrib.admin',\n 'django.contrib.auth',\n 'd... | diff --git a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py b/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
index 9c95c1466..afda9ce22 100755
--- a/{{cookiecutter.github_repository_name}}/{{cookiecutter.app_name}}/config/common.py
+++ b/{{cookiecu... |
MAKENTNU__web-204 | Fix delete permissions for course registration
| [
{
"content": "import io\n\nimport xlsxwriter\nfrom django.contrib.auth.mixins import PermissionRequiredMixin\nfrom django.db.models import Q\nfrom django.http import HttpResponse\nfrom django.shortcuts import redirect\nfrom django.urls import reverse\nfrom django.views.generic import TemplateView, View, CreateV... | [
{
"content": "import io\n\nimport xlsxwriter\nfrom django.contrib.auth.mixins import PermissionRequiredMixin\nfrom django.db.models import Q\nfrom django.http import HttpResponse\nfrom django.shortcuts import redirect\nfrom django.urls import reverse\nfrom django.views.generic import TemplateView, View, CreateV... | diff --git a/make_queue/templates/make_queue/course/course_panel.html b/make_queue/templates/make_queue/course/course_panel.html
index d9fe53cee..c83f0bca7 100644
--- a/make_queue/templates/make_queue/course/course_panel.html
+++ b/make_queue/templates/make_queue/course/course_panel.html
@@ -105,7 +105,7 @@ <h4>
... |
ivy-llc__ivy-17429 | empty_like
| [
{
"content": "# global\r\nimport ivy\r\nfrom ivy.func_wrapper import with_unsupported_dtypes\r\nfrom .tensor import Tensor\r\nfrom ivy.functional.frontends.paddle.func_wrapper import (\r\n to_ivy_arrays_and_back,\r\n)\r\n\r\n\r\n@to_ivy_arrays_and_back\r\ndef to_tensor(data, /, *, dtype=None, place=None, sto... | [
{
"content": "# global\r\nimport ivy\r\nfrom ivy.func_wrapper import with_unsupported_dtypes\r\nfrom .tensor import Tensor\r\nfrom ivy.functional.frontends.paddle.func_wrapper import (\r\n to_ivy_arrays_and_back,\r\n)\r\n\r\n\r\n@to_ivy_arrays_and_back\r\ndef to_tensor(data, /, *, dtype=None, place=None, sto... | diff --git a/ivy/functional/frontends/paddle/tensor/creation.py b/ivy/functional/frontends/paddle/tensor/creation.py
index 43939f0aab490..da5b22abd7a9a 100644
--- a/ivy/functional/frontends/paddle/tensor/creation.py
+++ b/ivy/functional/frontends/paddle/tensor/creation.py
@@ -71,3 +71,8 @@ def empty(shape, dtype=None):... |
pyinstaller__pyinstaller-2225 | missing hidden import for skimage
When packaging an application that imports skimage.feature (and nothing else), the app would not run due to an ImportError on the "transform" module. This can be fixed by adding one item to the hiddenimports in hook-skimage.transform.py file (bolded below):
> hiddenimports = ['skimag... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2014-2016, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING.... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2014-2016, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING.... | diff --git a/PyInstaller/hooks/hook-skimage.transform.py b/PyInstaller/hooks/hook-skimage.transform.py
index 8768c0c1f0..8c2b452094 100644
--- a/PyInstaller/hooks/hook-skimage.transform.py
+++ b/PyInstaller/hooks/hook-skimage.transform.py
@@ -12,6 +12,7 @@
# 64-bit
hiddenimports = ['skimage.draw.draw',
... |
cupy__cupy-3468 | Remove mock from test requirements?
I'm learning how to write mock tests, and I noticed things like `import mock` are workarounds to support PY27 and older PY3. Since CuPy now support PY35+ only and `mock` becomes part of the standard Python library, I suppose this line is no longer needed:
https://github.com/cupy/cup... | [
{
"content": "#!/usr/bin/env python\n\nimport os\nfrom setuptools import setup, find_packages\nimport sys\n\nimport cupy_setup_build\n\n\nif sys.version_info[:3] == (3, 5, 0):\n if not int(os.getenv('CUPY_PYTHON_350_FORCE', '0')):\n msg = \"\"\"\nCuPy does not work with Python 3.5.0.\n\nWe strongly re... | [
{
"content": "#!/usr/bin/env python\n\nimport os\nfrom setuptools import setup, find_packages\nimport sys\n\nimport cupy_setup_build\n\n\nif sys.version_info[:3] == (3, 5, 0):\n if not int(os.getenv('CUPY_PYTHON_350_FORCE', '0')):\n msg = \"\"\"\nCuPy does not work with Python 3.5.0.\n\nWe strongly re... | diff --git a/setup.py b/setup.py
index 2dba2314e41..dfa680ee986 100644
--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,6 @@
'test': [
'pytest<4.2.0', # 4.2.0 is slow collecting tests and times out on CI.
'attrs<19.2.0', # pytest 4.1.1 does not run with attrs==19.2.0
- 'mock',
],
'do... |
mkdocs__mkdocs-904 | Error while executing gh-deploy
I've successfully deployed a MkDocs site using the gh-deploy command. When I try to deploy some additional changes to my master branch, I get the following error:
```
c:\docs>mkdocs gh-deploy --clean
INFO - Cleaning site directory
INFO - Building documentation to directory: c:\d... | [
{
"content": "#! /usr/bin/env python\n#\n# This file is part of the ghp-import package released under\n# the Tumbolia Public License.\n\n# Tumbolia Public License\n\n# Copyright 2013, Paul Davis <paul.joseph.davis@gmail.com>\n\n# Copying and distribution of this file, with or without ... | [
{
"content": "#! /usr/bin/env python\n#\n# This file is part of the ghp-import package released under\n# the Tumbolia Public License.\n\n# Tumbolia Public License\n\n# Copyright 2013, Paul Davis <paul.joseph.davis@gmail.com>\n\n# Copying and distribution of this file, with or without ... | diff --git a/mkdocs/utils/ghp_import.py b/mkdocs/utils/ghp_import.py
index c7cc85c091..d6f543563f 100644
--- a/mkdocs/utils/ghp_import.py
+++ b/mkdocs/utils/ghp_import.py
@@ -74,7 +74,7 @@ def try_rebase(remote, branch):
(rev, _) = p.communicate()
if p.wait() != 0:
return True
- cmd = ['git', 'upd... |
ansible-collections__community.aws-1207 | ec2_customer_gateway: bgp_asn is not required
### Summary
The ec2_customer_gateway module has incorrect documentation for the bgp_asn parameter.
It says the ASN must be passed when state=present, but the code defaults to 25000 if the parameter is absent. See the ensure_cgw_present() method:
```
def ensure_... | [
{
"content": "#!/usr/bin/python\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---\nmodule: ec2_customer_gateway\nversion_added: 1.0.0\nshort_desc... | [
{
"content": "#!/usr/bin/python\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---\nmodule: ec2_customer_gateway\nversion_added: 1.0.0\nshort_desc... | diff --git a/plugins/modules/ec2_customer_gateway.py b/plugins/modules/ec2_customer_gateway.py
index 9c00783a58a..f07e92f4f7c 100644
--- a/plugins/modules/ec2_customer_gateway.py
+++ b/plugins/modules/ec2_customer_gateway.py
@@ -23,7 +23,8 @@
options:
bgp_asn:
description:
- - Border Gateway Protocol (BGP... |
biolab__orange3-text-358 | Guardian: Fix failing tests on Travis
<!--
This is an issue template. Please fill in the relevant details in the
sections below.
-->
##### Text version
<!-- From menu _Options→Add-ons→Orange3-Text_ or code `orangecontrib.text.version.full_version` -->
0.3.0
##### Orange version
<!-- From menu _Help→About→Ve... | [
{
"content": "\"\"\" This module fetches data from The Guardian API.\n\nTo use first create :class:`TheGuardianCredentials`:\n\n >>> from orangecontrib.text.guardian import TheGuardianCredentials\n >>> credentials = TheGuardianCredentials('<your-api-key>')\n\nThen create :class:`TheGuardianAPI` object and... | [
{
"content": "\"\"\" This module fetches data from The Guardian API.\n\nTo use first create :class:`TheGuardianCredentials`:\n\n >>> from orangecontrib.text.guardian import TheGuardianCredentials\n >>> credentials = TheGuardianCredentials('<your-api-key>')\n\nThen create :class:`TheGuardianAPI` object and... | diff --git a/orangecontrib/text/guardian.py b/orangecontrib/text/guardian.py
index 56177f642..d7222d41e 100644
--- a/orangecontrib/text/guardian.py
+++ b/orangecontrib/text/guardian.py
@@ -155,7 +155,7 @@ def search(self, query, from_date=None, to_date=None, max_documents=None,
if __name__ == '__main__':
- cred... |
ipython__ipython-8798 | `pip install ipython[all]` ignores platform dependent dependencies
If I try to run `pip install ipython[all]` on my python install on windows (Win 7 64-bit, WinPython 2.7.10), it fails with the following:
```
C:\Python\WinPython-64bit-2.7.10.1\python-2.7.10.amd64>pip install --upgrade ipy
thon[all]
Requirement already... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Setup script for IPython.\n\nUnder Posix environments it works like a typical setup.py script.\nUnder Windows, the command sdist is not supported, since IPython\nrequires utilities which are not available under Windows.\"\"\"\n\n#--------------... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Setup script for IPython.\n\nUnder Posix environments it works like a typical setup.py script.\nUnder Windows, the command sdist is not supported, since IPython\nrequires utilities which are not available under Windows.\"\"\"\n\n#--------------... | diff --git a/setup.py b/setup.py
index dd0e3727a9c..e871b6fe2d1 100755
--- a/setup.py
+++ b/setup.py
@@ -221,8 +221,9 @@ def run(self):
install_requires.append('pexpect')
everything = set()
-for deps in extras_require.values():
- everything.update(deps)
+for key, deps in extras_require.items():
+ if '... |
Parsl__parsl-186 | Allow `DataFuture` to be initialized with a `str` file object
[Here](https://github.com/Parsl/parsl/blob/master/parsl/app/futures.py#L77) we check if `file_obj` is `str`. Now that `File` is subclassed from `str`, this will always evaluate as `True`.
| [
{
"content": "\"\"\"This module implements DataFutures.\n\nWe have two basic types of futures:\n 1. DataFutures which represent data objects\n 2. AppFutures which represent the futures on App/Leaf tasks.\n\"\"\"\nimport os\nimport logging\nfrom concurrent.futures import Future\n\nfrom parsl.dataflow.futur... | [
{
"content": "\"\"\"This module implements DataFutures.\n\nWe have two basic types of futures:\n 1. DataFutures which represent data objects\n 2. AppFutures which represent the futures on App/Leaf tasks.\n\"\"\"\nimport os\nimport logging\nfrom concurrent.futures import Future\n\nfrom parsl.dataflow.futur... | diff --git a/parsl/app/futures.py b/parsl/app/futures.py
index 41b0c7946b..9b13e13aec 100644
--- a/parsl/app/futures.py
+++ b/parsl/app/futures.py
@@ -74,7 +74,7 @@ def __init__(self, fut, file_obj, parent=None, tid=None):
"""
super().__init__()
self._tid = tid
- if isinstance(file_obj... |
microsoft__botbuilder-python-1190 | No module named 'botbuilder.ai.qna.dialogs' - Python QnA Sample 49
## Version
botbuilder-ai - 4.9.1
## Describe the bug
I was trying out the QnA Maker Sample - 49.qnamaker-all-features . I've configured my QnA KB and also the config.py with the necessary info. However the module botbuilder.ai.qna.dialogs does not ... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport os\nfrom setuptools import setup\n\nREQUIRES = [\n \"azure-cognitiveservices-language-luis==0.2.0\",\n \"botbuilder-schema>=4.7.1\",\n \"botbuilder-core>=4.7.1\",\n \"aiohttp==3.6.2... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport os\nfrom setuptools import setup\n\nREQUIRES = [\n \"azure-cognitiveservices-language-luis==0.2.0\",\n \"botbuilder-schema>=4.7.1\",\n \"botbuilder-core>=4.7.1\",\n \"aiohttp==3.6.2... | diff --git a/libraries/botbuilder-ai/setup.py b/libraries/botbuilder-ai/setup.py
index 72f112a5a..65b7a8d85 100644
--- a/libraries/botbuilder-ai/setup.py
+++ b/libraries/botbuilder-ai/setup.py
@@ -39,6 +39,7 @@
"botbuilder.ai.luis",
"botbuilder.ai.qna.models",
"botbuilder.ai.qna.utils",
+ ... |
OpenNMT__OpenNMT-tf-953 | An issue with SequenceRecordInputter ?
I tried to create SequenceClassifier model which used SequenceRecordInputter as a part of ParallelInputter - it produced an error before ending first learning step. After isolating the problem, it seems that SequenceRecordInputter dataset generation is the source of it:
Reprodu... | [
{
"content": "\"\"\"Define inputters reading from TFRecord files.\"\"\"\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom opennmt.data import dataset as dataset_util\nfrom opennmt.inputters.inputter import Inputter\n\n\nclass SequenceRecordInputter(Inputter):\n \"\"\"Inputter that reads ``tf.train.Seque... | [
{
"content": "\"\"\"Define inputters reading from TFRecord files.\"\"\"\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom opennmt.data import dataset as dataset_util\nfrom opennmt.inputters.inputter import Inputter\n\n\nclass SequenceRecordInputter(Inputter):\n \"\"\"Inputter that reads ``tf.train.Seque... | diff --git a/opennmt/inputters/record_inputter.py b/opennmt/inputters/record_inputter.py
index dc5d68909..26fbd5cdb 100644
--- a/opennmt/inputters/record_inputter.py
+++ b/opennmt/inputters/record_inputter.py
@@ -48,7 +48,7 @@ def make_features(self, element=None, features=None, training=None):
},
... |
mitmproxy__mitmproxy-1801 | Make Travis Great Again (Master Edition)
Working on improving the speed and accuracy of Travis's testing.
| [
{
"content": "import os\nimport select\nimport socket\nimport sys\nimport threading\nimport time\nimport traceback\n\nimport binascii\n\nfrom typing import Optional # noqa\n\nfrom mitmproxy.utils import strutils\n\nimport certifi\nfrom backports import ssl_match_hostname\nimport OpenSSL\nfrom OpenSSL import SS... | [
{
"content": "import os\nimport select\nimport socket\nimport sys\nimport threading\nimport time\nimport traceback\n\nimport binascii\n\nfrom typing import Optional # noqa\n\nfrom mitmproxy.utils import strutils\n\nimport certifi\nfrom backports import ssl_match_hostname\nimport OpenSSL\nfrom OpenSSL import SS... | diff --git a/.travis.yml b/.travis.yml
index 0df3289967..c078e30ac0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,15 +1,6 @@
sudo: false
language: python
-addons:
- apt:
- sources:
- # Debian sid currently holds OpenSSL 1.0.2
- # change this with future releases!
- - debian-sid
- packages:
... |
ansible-collections__community.aws-1206 | ec2_customer_gateway: bgp_asn is not required
### Summary
The ec2_customer_gateway module has incorrect documentation for the bgp_asn parameter.
It says the ASN must be passed when state=present, but the code defaults to 25000 if the parameter is absent. See the ensure_cgw_present() method:
```
def ensure_... | [
{
"content": "#!/usr/bin/python\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---\nmodule: ec2_customer_gateway\nversion_added: 1.0.0\nshort_desc... | [
{
"content": "#!/usr/bin/python\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---\nmodule: ec2_customer_gateway\nversion_added: 1.0.0\nshort_desc... | diff --git a/plugins/modules/ec2_customer_gateway.py b/plugins/modules/ec2_customer_gateway.py
index 9c00783a58a..f07e92f4f7c 100644
--- a/plugins/modules/ec2_customer_gateway.py
+++ b/plugins/modules/ec2_customer_gateway.py
@@ -23,7 +23,8 @@
options:
bgp_asn:
description:
- - Border Gateway Protocol (BGP... |
kedro-org__kedro-1977 | pickle.PickleDataSet docstring examples are incorrect
## Description
Kind of a small issue but the "advanced" example in the [pickle.PickleDataSet API docs](https://kedro.readthedocs.io/en/stable/kedro.extras.datasets.pickle.PickleDataSet.html) is wrong.
`compression` is not a valid [`joblib.dump`](https://joblib.rea... | [
{
"content": "\"\"\"``PickleDataSet`` loads/saves data from/to a Pickle file using an underlying\nfilesystem (e.g.: local, S3, GCS). The underlying functionality is supported by\nthe specified backend library passed in (defaults to the ``pickle`` library), so it\nsupports all allowed options for loading and sav... | [
{
"content": "\"\"\"``PickleDataSet`` loads/saves data from/to a Pickle file using an underlying\nfilesystem (e.g.: local, S3, GCS). The underlying functionality is supported by\nthe specified backend library passed in (defaults to the ``pickle`` library), so it\nsupports all allowed options for loading and sav... | diff --git a/docs/source/deployment/aws_sagemaker.md b/docs/source/deployment/aws_sagemaker.md
index bf4904d5a0..c062252580 100644
--- a/docs/source/deployment/aws_sagemaker.md
+++ b/docs/source/deployment/aws_sagemaker.md
@@ -111,9 +111,9 @@ s3:
### Update the project settings
-Now you need to tell Kedro to use t... |
googleapis__python-bigquery-426 | _from_api_repr_scalar fails, if parameter value is None
Tested on latest (2.6.0) version, using python 3.8 on linux.
If `ArrayQueryParameter` contaning at least one `None` value is added to `query_parameters`, when using `job.query_parameters` (result after submitting the job) `'NoneType' object has no attribute 'm... | [
{
"content": "# Copyright 2015 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
{
"content": "# Copyright 2015 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | diff --git a/google/cloud/bigquery/_helpers.py b/google/cloud/bigquery/_helpers.py
index 716c8a394..100136108 100644
--- a/google/cloud/bigquery/_helpers.py
+++ b/google/cloud/bigquery/_helpers.py
@@ -40,7 +40,7 @@
def _not_null(value, field):
"""Check whether 'value' should be coerced to 'field' type."""
- ... |
Gallopsled__pwntools-2083 | Remote SSH debugging is broken due to missing qemu_port
When GDB is invoked on a remote host (via `gdb.debug(..., ssh=shell)`) the following error is thrown. It's not particularly helpful -- perhaps we should double-check that `gdbserver` is available first?
This error only occurs when debugging a cross-arch binary... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nDuring exploit development, it is frequently useful to debug the\ntarget binary under GDB.\n\nPwntools makes this easy-to-do with a handful of helper routines, designed\nto make your exploit-debug-update cycles much faster.\n\nUseful Functions\n----------------\n\n... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nDuring exploit development, it is frequently useful to debug the\ntarget binary under GDB.\n\nPwntools makes this easy-to-do with a handful of helper routines, designed\nto make your exploit-debug-update cycles much faster.\n\nUseful Functions\n----------------\n\n... | diff --git a/pwnlib/gdb.py b/pwnlib/gdb.py
index 45019dc5d..7e14cc9f1 100644
--- a/pwnlib/gdb.py
+++ b/pwnlib/gdb.py
@@ -568,7 +568,7 @@ def debug(args, gdbscript=None, exe=None, ssh=None, env=None, sysroot=None, api=
gdbserver.executable = exe
# Find what port we need to connect to
- if context.native o... |
google__flax-3785 | [struct.dataclass] Consider adding optional `kw_only` arguments
I often run into the following issue:
```python
from flax import struct
class Foo(struct.PyTreeNode):
bar: int = struct.field(pytree_node=False, default=1)
class Baz(Foo):
qux: str
```
Since `qux` does not have a default value, I get:
... | [
{
"content": "# Copyright 2024 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | [
{
"content": "# Copyright 2024 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | diff --git a/flax/struct.py b/flax/struct.py
index 7a8283a9d..29dbb9c2f 100644
--- a/flax/struct.py
+++ b/flax/struct.py
@@ -227,8 +227,8 @@ class PyTreeNode:
>>> model_grad = jax.grad(loss_fn)(model)
"""
- def __init_subclass__(cls):
- dataclass(cls) # pytype: disable=wrong-arg-types
+ def __init_subcl... |
secdev__scapy-1417 | No /dev/bpf handle is available !
I'm running on mac high sierra 10.13.4
after downloading from https://github.com/secdev/scapy/archive/v2.4.0.zip I unzipping and ran each of the following as root:
run_scapy, run_scapy2 and run_scapy_py3
within each repl I ran:
```send(IP(dst="2.2.2.2", src="1.1.1.1"))```
and the... | [
{
"content": "# Guillaume Valadon <guillaume@valadon.net>\n\n\"\"\"\nScapy *BSD native support - core\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom scapy.config import conf\nfrom scapy.error import Scapy_Exception, warning\nfrom scapy.data import ARPHDR_LOOPBACK, ARPHDR_ETHER\nfrom scapy.arch.common i... | [
{
"content": "# Guillaume Valadon <guillaume@valadon.net>\n\n\"\"\"\nScapy *BSD native support - core\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom scapy.config import conf\nfrom scapy.error import Scapy_Exception, warning\nfrom scapy.data import ARPHDR_LOOPBACK, ARPHDR_ETHER\nfrom scapy.arch.common i... | diff --git a/scapy/arch/bpf/core.py b/scapy/arch/bpf/core.py
index 79f1e17ab69..7e32e4d5a03 100644
--- a/scapy/arch/bpf/core.py
+++ b/scapy/arch/bpf/core.py
@@ -88,7 +88,7 @@ def get_dev_bpf():
"""Returns an opened BPF file object"""
# Get the first available BPF handle
- for bpf in range(0, 8):
+ for... |
learningequality__kolibri-4935 | users should not be able to get 1000% on an exam, unfortunately
### Observed behavior
reported by @jtamiace re: @radinamatic's apparent good luck:

### Expected behavior
exams are scored between 0 ... | [
{
"content": "from django.db.models import Max\nfrom django.db.models import Sum\nfrom django.shortcuts import get_object_or_404\nfrom rest_framework import serializers\nfrom rest_framework import viewsets\nfrom rest_framework.response import Response\n\nfrom kolibri.core.auth import models as auth_models\nfrom... | [
{
"content": "from django.db.models import Max\nfrom django.db.models import Sum\nfrom django.shortcuts import get_object_or_404\nfrom rest_framework import serializers\nfrom rest_framework import viewsets\nfrom rest_framework.response import Response\n\nfrom kolibri.core.auth import models as auth_models\nfrom... | diff --git a/kolibri/plugins/coach/assets/src/modules/classSummary/__test__/sampleServerResponse.js b/kolibri/plugins/coach/assets/src/modules/classSummary/__test__/sampleServerResponse.js
index 7758f81365c..d8487072b51 100644
--- a/kolibri/plugins/coach/assets/src/modules/classSummary/__test__/sampleServerResponse.js
... |
ansible-collections__community.aws-1197 | ec2_customer_gateway: bgp_asn is not required
### Summary
The ec2_customer_gateway module has incorrect documentation for the bgp_asn parameter.
It says the ASN must be passed when state=present, but the code defaults to 25000 if the parameter is absent. See the ensure_cgw_present() method:
```
def ensure_... | [
{
"content": "#!/usr/bin/python\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---\nmodule: ec2_customer_gateway\nversion_added: 1.0.0\nshort_desc... | [
{
"content": "#!/usr/bin/python\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---\nmodule: ec2_customer_gateway\nversion_added: 1.0.0\nshort_desc... | diff --git a/plugins/modules/ec2_customer_gateway.py b/plugins/modules/ec2_customer_gateway.py
index 9c00783a58a..f07e92f4f7c 100644
--- a/plugins/modules/ec2_customer_gateway.py
+++ b/plugins/modules/ec2_customer_gateway.py
@@ -23,7 +23,8 @@
options:
bgp_asn:
description:
- - Border Gateway Protocol (BGP... |
TabbycatDebate__tabbycat-1883 | Should we set DEFAULT_AUTO_FIELD?
Related to the Django 3.2 upgrade. Just thought this should be a conscious documented discussion rather than an informal one, since there seem to be (minor but nontrivial) consequences.
https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys... | [
{
"content": "import os\n\nfrom django.contrib.messages import constants as messages\nfrom django.utils.translation import gettext_lazy as _\n\n\nBASE_DIR = os.path.dirname(os.path.abspath(os.path.join(__file__, os.pardir)))\nMEDIA_ROOT = os.path.join(BASE_DIR, 'media')\n\n# ====================================... | [
{
"content": "import os\n\nfrom django.contrib.messages import constants as messages\nfrom django.utils.translation import gettext_lazy as _\n\n\nBASE_DIR = os.path.dirname(os.path.abspath(os.path.join(__file__, os.pardir)))\nMEDIA_ROOT = os.path.join(BASE_DIR, 'media')\n\n# ====================================... | diff --git a/tabbycat/settings/core.py b/tabbycat/settings/core.py
index fcee78da7da..34bbc91b105 100644
--- a/tabbycat/settings/core.py
+++ b/tabbycat/settings/core.py
@@ -301,6 +301,8 @@
},
}
+DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
+
# ==============================================================... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.