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
django-wiki__django-wiki-1299
Bug: Edit section fails when fenced code block contains comments ### Discussed in https://github.com/django-wiki/django-wiki/discussions/1245 <div type='discussions-op-text'> <sup>Originally posted by **chrisv2** January 8, 2023</sup> The following markup will break section editing (due to the `#` in the fenced...
[ { "content": "from django.urls import re_path as url\nfrom wiki.core.plugins import registry\nfrom wiki.core.plugins.base import BasePlugin\nfrom wiki.plugins.editsection.markdown_extensions import EditSectionExtension\n\nfrom . import settings\nfrom . import views\n\n\nclass EditSectionPlugin(BasePlugin):\n\n ...
[ { "content": "from django.urls import re_path as url\nfrom wiki.core.plugins import registry\nfrom wiki.core.plugins.base import BasePlugin\nfrom wiki.plugins.editsection.markdown_extensions import EditSectionExtension\n\nfrom . import settings\nfrom . import views\n\n\nclass EditSectionPlugin(BasePlugin):\n\n ...
diff --git a/src/wiki/plugins/editsection/wiki_plugin.py b/src/wiki/plugins/editsection/wiki_plugin.py index 2987d0c06..506fcf632 100644 --- a/src/wiki/plugins/editsection/wiki_plugin.py +++ b/src/wiki/plugins/editsection/wiki_plugin.py @@ -13,7 +13,7 @@ class EditSectionPlugin(BasePlugin): urlpatterns = { ...
sktime__sktime-5490
[BUG] Clasp Segmentation sometimes raises a ValueError **Describe the bug** <!-- A clear and concise description of what the bug is. --> The `predict_scores` method for the `ClaSPSegmentation` algorithm sometimes raises a value error. **To Reproduce** <!-- Add a Minimal, Complete, and Verifiable example (for...
[ { "content": "\"\"\"Isolated numba imports for clasp.\"\"\"\n\n\n__author__ = [\"ermshaua\", \"patrickzib\"]\n\nimport numpy as np\nimport pandas as pd\n\nfrom sktime.transformations.panel.matrix_profile import _sliding_dot_products\nfrom sktime.utils.numba.njit import njit\n\n\ndef _sliding_window(X, m):\n ...
[ { "content": "\"\"\"Isolated numba imports for clasp.\"\"\"\n\n\n__author__ = [\"ermshaua\", \"patrickzib\"]\n\nimport numpy as np\nimport pandas as pd\n\nfrom sktime.transformations.panel.matrix_profile import _sliding_dot_products\nfrom sktime.utils.numba.njit import njit\n\n\ndef _sliding_window(X, m):\n ...
diff --git a/sktime/transformations/series/_clasp_numba.py b/sktime/transformations/series/_clasp_numba.py index 5ca335ccc99..da2d023b351 100644 --- a/sktime/transformations/series/_clasp_numba.py +++ b/sktime/transformations/series/_clasp_numba.py @@ -111,7 +111,8 @@ def _compute_distances_iterative(X, m, k): ...
ephios-dev__ephios-1244
API: `/api/users/by_email` returns 404 error for email addresses with dots before the @ **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to `[ephios-url]/api/users/by_email/vorname.nachname@url.de/` **Expected behaviour** Assuming...
[ { "content": "from django.db.models import Q\nfrom django.utils import timezone\nfrom django_filters.rest_framework import DjangoFilterBackend\nfrom oauth2_provider.contrib.rest_framework import IsAuthenticatedOrTokenHasScope\nfrom rest_framework import viewsets\nfrom rest_framework.exceptions import Permission...
[ { "content": "from django.db.models import Q\nfrom django.utils import timezone\nfrom django_filters.rest_framework import DjangoFilterBackend\nfrom oauth2_provider.contrib.rest_framework import IsAuthenticatedOrTokenHasScope\nfrom rest_framework import viewsets\nfrom rest_framework.exceptions import Permission...
diff --git a/ephios/api/views/users.py b/ephios/api/views/users.py index 110b914a7..9d861b0c5 100644 --- a/ephios/api/views/users.py +++ b/ephios/api/views/users.py @@ -96,6 +96,7 @@ class UserByMailView(RetrieveModelMixin, GenericViewSet): filter_backends = [ObjectPermissionsFilter] lookup_url_kwarg = "email...
pex-tool__pex-1194
Cannot build PEX with relative path for --sources-directory. Discovered this trying to upgrade Pants to 2.1.26. Looks like: ``` $ mkdir src/ $ echo 'print("Hello World!")' > src/main.py $ python -m pex -D src -otest.pex -e main Traceback (most recent call last): File "/usr/lib/python3.9/runpy.py", line 197, in ...
[ { "content": "# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import absolute_import, print_function\n\nimport atexit\nimport contextlib\nimport errno\nimport fcntl\nimport os\nimport re\nimport shutil\nimport...
[ { "content": "# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import absolute_import, print_function\n\nimport atexit\nimport contextlib\nimport errno\nimport fcntl\nimport os\nimport re\nimport shutil\nimport...
diff --git a/pex/common.py b/pex/common.py index e52fd54e3..8181b5323 100644 --- a/pex/common.py +++ b/pex/common.py @@ -604,7 +604,7 @@ def symlink( dst = self._normalize(dst) self._tag(dst, label) self._ensure_parent(dst) - abs_src = src + abs_src = os.path.abspath(src) ...
cupy__cupy-2318
TypeError for OutOfMemoryError Seen while using chainer while multiprocessing and using the GPU: ``` Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **...
[ { "content": "import hashlib\nimport math\nimport os\nimport re\nimport shutil\nimport sys\nimport tempfile\n\nimport six\n\nfrom cupy.cuda import device\nfrom cupy.cuda import function\nfrom cupy.cuda import nvrtc\n\n_nvrtc_version = None\n_nvrtc_max_compute_capability = None\n\n\ndef _get_nvrtc_version():\n ...
[ { "content": "import hashlib\nimport math\nimport os\nimport re\nimport shutil\nimport sys\nimport tempfile\n\nimport six\n\nfrom cupy.cuda import device\nfrom cupy.cuda import function\nfrom cupy.cuda import nvrtc\n\n_nvrtc_version = None\n_nvrtc_max_compute_capability = None\n\n\ndef _get_nvrtc_version():\n ...
diff --git a/cupy/cuda/compiler.py b/cupy/cuda/compiler.py index 9cd1b4ca71a..1c77c13de6f 100644 --- a/cupy/cuda/compiler.py +++ b/cupy/cuda/compiler.py @@ -193,6 +193,10 @@ def __init__(self, msg, source, name, options): self.source = source self.name = name self.options = options + s...
facebookresearch__hydra-893
[Bug] Cannot add a value to hydra.job.set_env from the command line. # 🐛 Bug ## Description I cannot add a append a config value for the hydra configuration (hydra installed from source) ## To reproduce **Minimal Code/Config snippet to reproduce** ``` python main.py +hydra.job.env_set.WANDB_NOTES="X" ...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\"\"\"\nConfiguration loader\n\"\"\"\nimport copy\nimport os\nimport re\nimport warnings\nfrom collections import defaultdict\nfrom dataclasses import dataclass\nfrom typing import Any, Dict, List, Optional, Tuple\n\nfrom omeg...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\"\"\"\nConfiguration loader\n\"\"\"\nimport copy\nimport os\nimport re\nimport warnings\nfrom collections import defaultdict\nfrom dataclasses import dataclass\nfrom typing import Any, Dict, List, Optional, Tuple\n\nfrom omeg...
diff --git a/hydra/_internal/config_loader_impl.py b/hydra/_internal/config_loader_impl.py index 4a110009b52..b98306a58e5 100644 --- a/hydra/_internal/config_loader_impl.py +++ b/hydra/_internal/config_loader_impl.py @@ -265,7 +265,6 @@ def _load_configuration( ) raise ConfigCompositionExcepti...
open-mmlab__mmdetection3d-600
votenet pre-trained scannet model doesn't work! KeyError: 'ann_info' raceback (most recent call last): File "demo/pcd_demo.py", line 41, in <module> main() File "demo/pcd_demo.py", line 28, in main result, data = inference_detector(model, args.pcd) File "/home/user/deeplearning/mmdetection3d/mmdet3d...
[ { "content": "import mmcv\nimport numpy as np\nimport re\nimport torch\nfrom copy import deepcopy\nfrom mmcv.parallel import collate, scatter\nfrom mmcv.runner import load_checkpoint\nfrom os import path as osp\n\nfrom mmdet3d.core import (Box3DMode, DepthInstance3DBoxes,\n LiDARInstanc...
[ { "content": "import mmcv\nimport numpy as np\nimport re\nimport torch\nfrom copy import deepcopy\nfrom mmcv.parallel import collate, scatter\nfrom mmcv.runner import load_checkpoint\nfrom os import path as osp\n\nfrom mmdet3d.core import (Box3DMode, DepthInstance3DBoxes,\n LiDARInstanc...
diff --git a/mmdet3d/apis/inference.py b/mmdet3d/apis/inference.py index 031a242a02..ca0595a65a 100644 --- a/mmdet3d/apis/inference.py +++ b/mmdet3d/apis/inference.py @@ -89,6 +89,8 @@ def inference_detector(model, pcd): pts_filename=pcd, box_type_3d=box_type_3d, box_mode_3d=box_mode_3d, + ...
qutip__qutip-1918
Bug with Bloch and Ipython. ### Bug Description `Bloch` raises an error when used in jupyter notebook. This seems to be due to the output of `print_figure` in `_repr_svg_` not being bytecode (maybe it was in the past?) it then defaults to `_repr_png_` and renders correctly the bloch sphere. ### Code to Reproduce the ...
[ { "content": "__all__ = ['Bloch']\n\nimport os\n\nimport numpy as np\nfrom numpy import (outer, cos, sin, ones)\n\nfrom packaging.version import parse as parse_version\n\nfrom . import Qobj, expect, sigmax, sigmay, sigmaz\n\ntry:\n import matplotlib\n import matplotlib.pyplot as plt\n from mpl_toolkits...
[ { "content": "__all__ = ['Bloch']\n\nimport os\n\nimport numpy as np\nfrom numpy import (outer, cos, sin, ones)\n\nfrom packaging.version import parse as parse_version\n\nfrom . import Qobj, expect, sigmax, sigmay, sigmaz\n\ntry:\n import matplotlib\n import matplotlib.pyplot as plt\n from mpl_toolkits...
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 45ea35ea53..8111466dbc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -100,7 +100,7 @@ jobs: # rather than in the GitHub Actions file directly, because bash gives us # a proper programming langu...
coala__coala-3608
Remove call_without_output from Shell.py L7 This line was used by the requirement classes, it isnt used anymore as they use sarge, so it should be removed. difficulty/newcomer
[ { "content": "from contextlib import contextmanager\nimport functools\nimport shlex\nfrom subprocess import PIPE, Popen, call, DEVNULL\n\n\ncall_without_output = functools.partial(call, stdout=DEVNULL, stderr=DEVNULL)\n\"\"\"\nUses subprocess.call to execute a command, but suppresses the output and\nthe errors....
[ { "content": "from contextlib import contextmanager\nimport shlex\nfrom subprocess import PIPE, Popen\n\n\n@contextmanager\ndef run_interactive_shell_command(command, **kwargs):\n \"\"\"\n Runs a single command in shell and provides stdout, stderr and stdin\n streams.\n\n This function creates a con...
diff --git a/coalib/misc/Shell.py b/coalib/misc/Shell.py index ec44e45f0b..0bd22886dd 100644 --- a/coalib/misc/Shell.py +++ b/coalib/misc/Shell.py @@ -1,14 +1,6 @@ from contextlib import contextmanager -import functools import shlex -from subprocess import PIPE, Popen, call, DEVNULL - - -call_without_output = functoo...
litestar-org__litestar-1641
Bug: StorageObject doesn't return < 0 when using expiry ### Description When the stored value is expired, the returned interval is set to 86400 and will therefore not expire. ### URL to code causing the issue https://github.com/litestar-org/litestar/blob/main/litestar/stores/base.py#L122 ### MCVE ```python from p...
[ { "content": "from __future__ import annotations\n\nfrom abc import ABC, abstractmethod\nfrom datetime import datetime, timedelta, timezone\nfrom typing import TYPE_CHECKING, Optional\n\nfrom msgspec import Struct\nfrom msgspec.msgpack import decode as msgpack_decode\nfrom msgspec.msgpack import encode as msgpa...
[ { "content": "from __future__ import annotations\n\nfrom abc import ABC, abstractmethod\nfrom datetime import datetime, timedelta, timezone\nfrom typing import TYPE_CHECKING, Optional\n\nfrom msgspec import Struct\nfrom msgspec.msgpack import decode as msgpack_decode\nfrom msgspec.msgpack import encode as msgpa...
diff --git a/litestar/stores/base.py b/litestar/stores/base.py index 0cb90b8ccd..b748cf1764 100644 --- a/litestar/stores/base.py +++ b/litestar/stores/base.py @@ -119,7 +119,7 @@ def expires_in(self) -> int: was set, return ``-1``. """ if self.expires_at: - return (self.expires_at ...
gratipay__gratipay.com-3087
Charges higher than total gifts For the past three weeks our charges have been about a thousand dollars higher than total gifts. ![screen shot 2015-01-07 at 11 37 20 am](https://cloud.githubusercontent.com/assets/688886/5649147/b16bd278-9661-11e4-8f29-09976884bf8a.png) Charges higher than total gifts For the past thr...
[ { "content": "\"\"\"This is Gratipay's payday algorithm.\n\nExchanges (moving money between Gratipay and the outside world) and transfers\n(moving money amongst Gratipay users) happen within an isolated event called\npayday. This event has duration (it's not punctiliar).\n\nPayday is designed to be crash-resist...
[ { "content": "\"\"\"This is Gratipay's payday algorithm.\n\nExchanges (moving money between Gratipay and the outside world) and transfers\n(moving money amongst Gratipay users) happen within an isolated event called\npayday. This event has duration (it's not punctiliar).\n\nPayday is designed to be crash-resist...
diff --git a/branch.sql b/branch.sql new file mode 100644 index 0000000000..4faca93a2d --- /dev/null +++ b/branch.sql @@ -0,0 +1,34 @@ +BEGIN; + +DO $$ +DECLARE + payday record; + new_ncharges int; + new_charge_volume decimal(35,2); + new_charge_fees_volume decimal(35,2); +BEGIN + FOR payday IN SELECT * ...
ray-project__ray-8782
[tune] Tune dashboard : use scientific notation When displaying parameters in the tune dashboard, they are displayer using standard float format with only 2 significant digits. For example, if your learning rate is lower than 1e-2, it appears as zero. Similarly, if your experiments return a metric whose value a...
[ { "content": "try:\n import aiohttp.web\nexcept ImportError:\n print(\"The dashboard requires aiohttp to run.\")\n import sys\n sys.exit(1)\n\nimport argparse\nimport copy\nimport datetime\nimport errno\nimport json\nimport logging\nimport os\nimport socket\nimport threading\nimport time\nimport tra...
[ { "content": "try:\n import aiohttp.web\nexcept ImportError:\n print(\"The dashboard requires aiohttp to run.\")\n import sys\n sys.exit(1)\n\nimport argparse\nimport copy\nimport datetime\nimport errno\nimport json\nimport logging\nimport os\nimport socket\nimport threading\nimport time\nimport tra...
diff --git a/python/ray/dashboard/client/src/common/formatUtils.ts b/python/ray/dashboard/client/src/common/formatUtils.ts index 582655dce5b90..9518637b5f04c 100644 --- a/python/ray/dashboard/client/src/common/formatUtils.ts +++ b/python/ray/dashboard/client/src/common/formatUtils.ts @@ -30,3 +30,18 @@ export const for...
cobbler__cobbler-2878
Cannot set property 'file' of image ### Describe the bug Set image's property 'file' is not working ### Steps to reproduce 1. `touch /tmp/test.iso` 2. Run below Python code on Cobbler installed machine ``` #!/usr/bin/python3 from xmlrpc.client import Server rpc_server = Server("http://127.0.0.1/cobbler...
[ { "content": "\"\"\"\nCopyright 2006-2009, Red Hat, Inc and Others\nMichael DeHaan <michael.dehaan AT gmail>\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the Licens...
[ { "content": "\"\"\"\nCopyright 2006-2009, Red Hat, Inc and Others\nMichael DeHaan <michael.dehaan AT gmail>\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the Licens...
diff --git a/cobbler/items/image.py b/cobbler/items/image.py index 6f5bcea96f..be97b52218 100644 --- a/cobbler/items/image.py +++ b/cobbler/items/image.py @@ -206,6 +206,8 @@ def file(self, filename: str): if len(auth) > 0 and len(hostname) == 0: raise SyntaxError("a hostname must be specified wit...
pypa__setuptools-4127
[BUG] Setuptools 69.0.0 breaks Astropy's setup ### setuptools version setuptools==69.0.0 ### Python version 3.12 ### OS Ubuntu ### Additional environment information _No response_ ### Description About 15h ago, Astropy's CI started failing to build with ``` ImportError: cannot import name 'newer_group' from ...
[ { "content": "import warnings\n\nfrom ._distutils import _modified\n\n\ndef __getattr__(name):\n if name not in ['newer_pairwise_group']:\n raise AttributeError(name)\n warnings.warn(\n \"dep_util is Deprecated. Use functions from setuptools.modified instead.\",\n DeprecationWarning,\...
[ { "content": "import warnings\n\nfrom ._distutils import _modified\n\n\ndef __getattr__(name):\n if name not in ['newer_group', 'newer_pairwise_group']:\n raise AttributeError(name)\n warnings.warn(\n \"dep_util is Deprecated. Use functions from setuptools.modified instead.\",\n Depre...
diff --git a/newsfragments/4126.bugfix.rst b/newsfragments/4126.bugfix.rst new file mode 100644 index 0000000000..467a94887a --- /dev/null +++ b/newsfragments/4126.bugfix.rst @@ -0,0 +1,2 @@ +Fixed imports of ``setuptools.dep_util.newer_group``. +A deprecation warning is issued instead of a hard failure. diff --git a/s...
WordPress__openverse-api-788
Update the auth token expiry to be 12 or 24 hours ## Problem Currently the token returned from the auth_tokens/token route returns a token that expires in 10 hours. To make this a little more consistent with typical CRON scheduling it would be more ideal for this expiry to be 12 or 24 hours. ## Description Updatin...
[ { "content": "\"\"\"\nDjango settings for catalog project.\n\nGenerated by 'django-admin startproject' using Django 2.0.5.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/2...
[ { "content": "\"\"\"\nDjango settings for catalog project.\n\nGenerated by 'django-admin startproject' using Django 2.0.5.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/2...
diff --git a/api/catalog/settings.py b/api/catalog/settings.py index 4c915d5fa..fc293d5d0 100644 --- a/api/catalog/settings.py +++ b/api/catalog/settings.py @@ -113,7 +113,10 @@ "SCOPES": { "read": "Read scope", "write": "Write scope", - } + }, + "ACCESS_TOKEN_EXPIRE_SECONDS": config( + ...
azavea__raster-vision-1586
Same explanation for SlidingWindowGeoDataset and RandomWindowGeoDataset ## 📚 Documentation <!-- A clear and concise description of what content in https://docs.rastervision.io/ is an issue.--> > The SlidingWindowGeoDataset allows reading the scene by sampling random window sizes and locations. This descriptio...
[ { "content": "from typing import List, Optional, Tuple, Union\n\nfrom rastervision.pipeline.config import (Config, register_config, ConfigError,\n Field, validator)\nfrom rastervision.core.data.utils import color_to_triple, normalize_color\n\nDEFAULT_NULL_CLASS_NAME = 'n...
[ { "content": "from typing import List, Optional, Tuple, Union\n\nfrom rastervision.pipeline.config import (Config, register_config, ConfigError,\n Field, validator)\nfrom rastervision.core.data.utils import color_to_triple, normalize_color\n\nDEFAULT_NULL_CLASS_NAME = 'n...
diff --git a/docs/README.md b/docs/README.md index 1045bcba4..2093525f9 100644 --- a/docs/README.md +++ b/docs/README.md @@ -46,6 +46,7 @@ To run a live local server that updates with changes, run: - You can specify a thumbnail for a notebook (which is shown in the gallery) in the following ways: - To use the output...
searxng__searxng-2081
DuckDuckGo returning "access denied" errors <!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SearXNG --> **Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG** 2023.01.06-b241015e **How did you install SearXNG?** searxng-docker **What happ...
[ { "content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n# lint: pylint\n\"\"\"DuckDuckGo Lite\n\"\"\"\n\nfrom json import loads\n\nfrom lxml.html import fromstring\n\nfrom searx.utils import (\n dict_subset,\n eval_xpath,\n eval_xpath_getindex,\n extract_text,\n match_language,\n)\nfrom searx...
[ { "content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n# lint: pylint\n\"\"\"DuckDuckGo Lite\n\"\"\"\n\nfrom json import loads\n\nfrom lxml.html import fromstring\n\nfrom searx.utils import (\n dict_subset,\n eval_xpath,\n eval_xpath_getindex,\n extract_text,\n match_language,\n)\nfrom searx...
diff --git a/searx/engines/duckduckgo.py b/searx/engines/duckduckgo.py index 0d82002bff6..84198afc56a 100644 --- a/searx/engines/duckduckgo.py +++ b/searx/engines/duckduckgo.py @@ -73,6 +73,7 @@ def request(query, params): # link again and again .. params['headers']['Content-Type'] = 'application/x-www-form...
kivy__python-for-android-2180
Issues introduced by PR #2113 (SDL2) As said on Discord #dev channel yesterday, PR #2113 introduces a lot of blocking issues. These are the results of the tests done by me, @AndreMiras and @opacam : - `sdl2==2.0.10` have issues that have been solved by the SDL2 team, so it needs to be bumped to `2.0.12`. - `s...
[ { "content": "from pythonforandroid.recipe import BootstrapNDKRecipe\nfrom pythonforandroid.toolchain import current_directory, shprint\nimport sh\n\n\nclass LibSDL2Recipe(BootstrapNDKRecipe):\n version = \"2.0.10\"\n url = \"https://www.libsdl.org/release/SDL2-{version}.zip\"\n md5sum = \"6b2e9a4a2fab...
[ { "content": "from pythonforandroid.recipe import BootstrapNDKRecipe\nfrom pythonforandroid.toolchain import current_directory, shprint\nimport sh\n\n\nclass LibSDL2Recipe(BootstrapNDKRecipe):\n version = \"2.0.9\"\n url = \"https://www.libsdl.org/release/SDL2-{version}.tar.gz\"\n md5sum = 'f2ecfba915c...
diff --git a/pythonforandroid/bootstraps/sdl2/build/src/main/java/org/kivy/android/PythonActivity.java b/pythonforandroid/bootstraps/sdl2/build/src/main/java/org/kivy/android/PythonActivity.java index 956c5f5b59..33d0855ef3 100644 --- a/pythonforandroid/bootstraps/sdl2/build/src/main/java/org/kivy/android/PythonActivit...
keras-team__keras-677
Python 3 compatibility problem with Image loading Loading an Image using the `load_img` results in an error. ``` Traceback (most recent call last): File "keras/autoencoder.py", line 45, in <module> X_train, Y_train, X_test, Y_test, nb_classes = io.load_images(join(DATA_DIR, 'dataset0')) File "/home/jnphilipp/D...
[ { "content": "from __future__ import absolute_import\n\nimport numpy as np\nimport re\nfrom scipy import ndimage\nfrom scipy import linalg\n\nfrom os import listdir\nfrom os.path import isfile, join\nimport random, math\nfrom six.moves import range\n\n'''\n Fairly basic set of tools for realtime data augment...
[ { "content": "from __future__ import absolute_import\n\nimport numpy as np\nimport re\nfrom scipy import ndimage\nfrom scipy import linalg\n\nfrom os import listdir\nfrom os.path import isfile, join\nimport random, math\nfrom six.moves import range\n\n'''\n Fairly basic set of tools for realtime data augment...
diff --git a/keras/preprocessing/image.py b/keras/preprocessing/image.py index 5b64a588ad9e..ad9794a496cc 100644 --- a/keras/preprocessing/image.py +++ b/keras/preprocessing/image.py @@ -104,7 +104,7 @@ def img_to_array(img): def load_img(path, grayscale=False): from PIL import Image - img = Image.open(open(...
pyro-ppl__numpyro-737
Possible error in the validation of a Categorical distribution I am getting an error when I try to run the following code. The code just sample from a categorical distribution using the defined probabilities. ```python import numpyro import numpyro.distributions as dist import jax.numpy as jnp numpyro.enable_v...
[ { "content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\n# The implementation follows the design in PyTorch: torch.distributions.constraints.py\n#\n# Copyright (c) 2016- Facebook, Inc (Adam Paszke)\n# Copyright (c) 2014- Facebook, Inc (S...
[ { "content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\n# The implementation follows the design in PyTorch: torch.distributions.constraints.py\n#\n# Copyright (c) 2016- Facebook, Inc (Adam Paszke)\n# Copyright (c) 2014- Facebook, Inc (S...
diff --git a/numpyro/distributions/constraints.py b/numpyro/distributions/constraints.py index 91b8cf008..625f982fd 100644 --- a/numpyro/distributions/constraints.py +++ b/numpyro/distributions/constraints.py @@ -192,7 +192,7 @@ def __call__(self, x): class _Simplex(Constraint): def __call__(self, x): x_...
pytorch__ignite-2081
DeterministicEngine rng state on cuda if loaded checkpoint on cuda ## 🐛 Bug description Using `engine` as `DeterministicEngine`, loading on cuda can lead to the following issue: ``` File "/home/machine/.clearml/venvs-builds/3.6/lib/python3.6/site-packages/ignite/engine/engine.py", line 702, in run return s...
[ { "content": "import random\nimport warnings\nfrom collections import OrderedDict\nfrom functools import wraps\nfrom typing import Any, Callable, Generator, Iterator, List, Optional\n\nimport torch\nfrom torch.utils.data import DataLoader\nfrom torch.utils.data.sampler import BatchSampler\n\nfrom ignite.engine....
[ { "content": "import random\nimport warnings\nfrom collections import OrderedDict\nfrom functools import wraps\nfrom typing import Any, Callable, Generator, Iterator, List, Optional\n\nimport torch\nfrom torch.utils.data import DataLoader\nfrom torch.utils.data.sampler import BatchSampler\n\nfrom ignite.engine....
diff --git a/ignite/engine/deterministic.py b/ignite/engine/deterministic.py index bca969cb3f02..79cd39ab73e3 100644 --- a/ignite/engine/deterministic.py +++ b/ignite/engine/deterministic.py @@ -98,6 +98,10 @@ def _get_rng_states() -> List[Any]: def _set_rng_states(rng_states: List[Any]) -> None: random.setstat...
kivy__kivy-7038
Documentation issue with on_ref_press In [kivy/uix/label.py L1008](https://github.com/kivy/kivy/blob/master/kivy/uix/label.py#L1008), there is a documentation issue with on_ref_press. `widget.on_ref_press(print_it)` should be `widget.bind(on_ref_press=print_it)`.
[ { "content": "'''Label\n=====\n\n.. image:: images/label.png\n :align: right\n\nThe :class:`Label` widget is for rendering text. It supports ascii and unicode\nstrings::\n\n # hello world text\n l = Label(text='Hello world')\n\n # unicode text; can only display glyphs that are available in the font\...
[ { "content": "'''Label\n=====\n\n.. image:: images/label.png\n :align: right\n\nThe :class:`Label` widget is for rendering text. It supports ascii and unicode\nstrings::\n\n # hello world text\n l = Label(text='Hello world')\n\n # unicode text; can only display glyphs that are available in the font\...
diff --git a/kivy/uix/label.py b/kivy/uix/label.py index ea9181a3c8..45f764ac05 100644 --- a/kivy/uix/label.py +++ b/kivy/uix/label.py @@ -1005,7 +1005,7 @@ def on_ref_press(self, ref): def print_it(instance, value): print('User click on', value) widget = Label(text='Hello [ref=world]Worl...
ansible__awx-10108
tower_workflow_job_template not changing ask_limit_on_launch <!-- Issues are for **concrete, actionable bugs and feature requests** only - if you're just asking for debugging help or technical support, please use: - http://webchat.freenode.net/?channels=ansible-awx - https://groups.google.com/forum/#!forum/awx-proj...
[ { "content": "#!/usr/bin/python\n# coding: utf-8 -*-\n\n\n# (c) 2020, John Westcott IV <john.westcott.iv@redhat.com>\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\n__metaclass__ = type\n\n\nANSI...
[ { "content": "#!/usr/bin/python\n# coding: utf-8 -*-\n\n\n# (c) 2020, John Westcott IV <john.westcott.iv@redhat.com>\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\n__metaclass__ = type\n\n\nANSI...
diff --git a/awx_collection/plugins/modules/workflow_job_template.py b/awx_collection/plugins/modules/workflow_job_template.py index 7fc6b66ccad1..d5686a66aa42 100644 --- a/awx_collection/plugins/modules/workflow_job_template.py +++ b/awx_collection/plugins/modules/workflow_job_template.py @@ -751,7 +751,7 @@ def main(...
cloud-custodian__cloud-custodian-8120
Wafv2 logging error when using cloudtrail mode ### Describe the bug When my wafv2 logging policy runs after disabling logging I receive an error on a cloudtrail policy when using the DeleteLoggingConfiguration event. ### What did you expect to happen? I expected the policy to match my resource. ### Cloud Provider ...
[ { "content": "# Copyright The Cloud Custodian Authors.\n# SPDX-License-Identifier: Apache-2.0\nfrom c7n.manager import resources\nfrom c7n.query import ConfigSource, QueryResourceManager, TypeInfo, DescribeSource\nfrom c7n.tags import universal_augment\nfrom c7n.filters import ValueFilter\nfrom c7n.utils import...
[ { "content": "# Copyright The Cloud Custodian Authors.\n# SPDX-License-Identifier: Apache-2.0\nfrom c7n.manager import resources\nfrom c7n.query import ConfigSource, QueryResourceManager, TypeInfo, DescribeSource\nfrom c7n.tags import universal_augment\nfrom c7n.filters import ValueFilter\nfrom c7n.utils import...
diff --git a/c7n/resources/waf.py b/c7n/resources/waf.py index 6970c900e55..4e16cf0c59e 100644 --- a/c7n/resources/waf.py +++ b/c7n/resources/waf.py @@ -27,6 +27,10 @@ def get_query_params(self, query): q = {'Scope': 'REGIONAL'} return q + def get_resources(self, ids): + resources = se...
cloud-custodian__cloud-custodian-6375
The s3 action "remove-statements" errors out when it encounters a bucket policy statement without a sid **Describe the bug** s3.remove-statements fails when a sid-less bucket policy statement is encountered You can see the key error in the traceback. Bucket policy statements do not require Sids and S3 omits the key...
[ { "content": "# Copyright The Cloud Custodian Authors.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom .core import BaseAction\nfrom c7n import utils\n\n\nclass RemovePolicyBase(BaseAction):\n\n schema = utils.type_schema(\n 'remove-statements',\n required=['statement_ids'],\n statement_i...
[ { "content": "# Copyright The Cloud Custodian Authors.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom .core import BaseAction\nfrom c7n import utils\n\n\nclass RemovePolicyBase(BaseAction):\n\n schema = utils.type_schema(\n 'remove-statements',\n required=['statement_ids'],\n statement_i...
diff --git a/c7n/actions/policy.py b/c7n/actions/policy.py index c7e2a9e0295..833e1309efe 100644 --- a/c7n/actions/policy.py +++ b/c7n/actions/policy.py @@ -31,7 +31,7 @@ def remove_statements(match_ids, statements, matched=()): elif match_ids == 'matched': if s in matched: s_foun...
ManimCommunity__manim-732
Running manim without any flags or render commands throws an error [BUG-General] It seems as if currently running just `manim` without any flag or scene to render it throws the following error: ```Traceback (most recent call last): File "c:\users\administrator\appdata\local\programs\python\python38\lib\runpy.py",...
[ { "content": "\"\"\"Utilities called from ``__main__.py`` to interact with the config.\"\"\"\n\nimport os\nimport sys\nimport argparse\nimport logging\n\nimport colour\n\nfrom manim import constants, logger, config\nfrom .utils import make_config_parser\nfrom .logger_utils import JSONFormatter\nfrom ..utils.tex...
[ { "content": "\"\"\"Utilities called from ``__main__.py`` to interact with the config.\"\"\"\n\nimport os\nimport sys\nimport argparse\nimport logging\n\nimport colour\n\nfrom manim import constants, logger, config\nfrom .utils import make_config_parser\nfrom .logger_utils import JSONFormatter\nfrom ..utils.tex...
diff --git a/manim/_config/main_utils.py b/manim/_config/main_utils.py index 1e3075c8f7..c833b37355 100644 --- a/manim/_config/main_utils.py +++ b/manim/_config/main_utils.py @@ -107,6 +107,9 @@ def parse_args(args): if args[0] == "python" and args[1] == "-m": args = args[2:] + if len(args) == 1: + ...
secdev__scapy-3167
Outdated Automotive Documentation Reminder for myself. Outdated: https://github.com/secdev/scapy/blob/1aa0d8a849f7b102d18a3f65986e272aec5f518a/doc/scapy/layers/automotive.rst#L75-L85 SOME/IP: https://github.com/secdev/scapy/blob/1aa0d8a849f7b102d18a3f65986e272aec5f518a/doc/scapy/layers/automotive.rst#L1011-L103...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Scapy documentation build configuration file, created by\n# sphinx-quickstart on Wed Mar 07 19:02:35 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Scapy documentation build configuration file, created by\n# sphinx-quickstart on Wed Mar 07 19:02:35 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this...
diff --git a/doc/scapy/backmatter.rst b/doc/scapy/backmatter.rst index f316bb2a879..326083045e4 100644 --- a/doc/scapy/backmatter.rst +++ b/doc/scapy/backmatter.rst @@ -8,3 +8,4 @@ Credits - Fred Raynal wrote the chapter on building and dissecting packets. - Peter Kacherginsky contributed several tutorial sections, o...
Pyomo__pyomo-56
XPRESS Solver Error : AttributeError: 'NoneType' object has no attribute 'problem' I've pasted the traceback below : ``` Traceback (most recent call last): File "model.py", line 15, in <module> solver.solve(model) File "/Users/$USER/anaconda/lib/python2.7/site-packages/pyomo/opt/base/solvers.py", line 587, in ...
[ { "content": "# _________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2014 Sandia Corporation.\n# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,\n# the U.S. Government retains certain rights in th...
[ { "content": "# _________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright (c) 2014 Sandia Corporation.\n# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,\n# the U.S. Government retains certain rights in th...
diff --git a/pyomo/solvers/plugins/solvers/XPRESS.py b/pyomo/solvers/plugins/solvers/XPRESS.py index 143c6ffc2dc..929272d6efc 100644 --- a/pyomo/solvers/plugins/solvers/XPRESS.py +++ b/pyomo/solvers/plugins/solvers/XPRESS.py @@ -198,8 +198,6 @@ def process_logfile(self): log_file_contents = "".join(log_file.re...
Qiskit__qiskit-6171
num_qubits() for DictStateFn is inefficient To get the number of qubits, a list of all keys in the dictionary is constructed. But, only the length of the first key is used. Constructing the entire list is wasteful. https://github.com/Qiskit/qiskit-terra/blob/c3b2d7acb80fa89043e6f38efb501275ec296616/qiskit/opflow/sta...
[ { "content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2020, 2021.\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/licenses/LICENSE-2.0.\n#\n...
[ { "content": "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2020, 2021.\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/licenses/LICENSE-2.0.\n#\n...
diff --git a/qiskit/opflow/state_fns/dict_state_fn.py b/qiskit/opflow/state_fns/dict_state_fn.py index a6a313f02815..73507140f0cc 100644 --- a/qiskit/opflow/state_fns/dict_state_fn.py +++ b/qiskit/opflow/state_fns/dict_state_fn.py @@ -81,7 +81,7 @@ def primitive_strings(self) -> Set[str]: @property def num_...
kornia__kornia-2610
bug in ycbcr_to_rgb function ### Describe the bug https://github.com/kornia/kornia/blob/2c084f8dc108b3f0f3c8983ac3f25bf88638d01a/kornia/color/ycbcr.py#L70 #### now: return torch.stack([r, g, b], -3) #### need to be: return torch.stack([r, g, b], -3).clamp(0,1) #### because: ![image](https://user-images.githu...
[ { "content": "import torch\nfrom torch import Tensor, nn\n\n\ndef _rgb_to_y(r: Tensor, g: Tensor, b: Tensor) -> Tensor:\n y: Tensor = 0.299 * r + 0.587 * g + 0.114 * b\n return y\n\n\ndef rgb_to_ycbcr(image: Tensor) -> Tensor:\n r\"\"\"Convert an RGB image to YCbCr.\n\n .. image:: _static/img/rgb_to...
[ { "content": "import torch\nfrom torch import Tensor, nn\n\n\ndef _rgb_to_y(r: Tensor, g: Tensor, b: Tensor) -> Tensor:\n y: Tensor = 0.299 * r + 0.587 * g + 0.114 * b\n return y\n\n\ndef rgb_to_ycbcr(image: Tensor) -> Tensor:\n r\"\"\"Convert an RGB image to YCbCr.\n\n .. image:: _static/img/rgb_to...
diff --git a/kornia/color/ycbcr.py b/kornia/color/ycbcr.py index 4e9fe5d856..c0cb597de7 100644 --- a/kornia/color/ycbcr.py +++ b/kornia/color/ycbcr.py @@ -98,7 +98,7 @@ def ycbcr_to_rgb(image: Tensor) -> Tensor: r: Tensor = y + 1.403 * cr_shifted g: Tensor = y - 0.714 * cr_shifted - 0.344 * cb_shifted b:...
cookiecutter__cookiecutter-539
Increase development status to 'beta' or 'stable'. I think we can say the project is waaaay beyond alpha. :wink:
[ { "content": "#!/usr/bin/env python\n\nimport os\nimport sys\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nversion = \"1.1.0\"\n\nif sys.argv[-1] == 'publish':\n os.system('python setup.py sdist upload')\n os.system('python setup.py bdist_wheel upl...
[ { "content": "#!/usr/bin/env python\n\nimport os\nimport sys\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\nversion = \"1.1.0\"\n\nif sys.argv[-1] == 'publish':\n os.system('python setup.py sdist upload')\n os.system('python setup.py bdist_wheel upl...
diff --git a/setup.py b/setup.py index 2d504822b..db893b12e 100755 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ license='BSD', zip_safe=False, classifiers=[ - 'Development Status :: 3 - Alpha', + 'Development Status :: 5 - Production/Stable', 'Environment :: Console', '...
ivy-llc__ivy-13425
normal
[ { "content": "import ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back\n\ntry:\n from torch import Generator\nexcept ImportError:\n from types import SimpleNamespace\n\n Generator = SimpleNamespace\n\n\ndef seed() -> ...
[ { "content": "import ivy\nfrom ivy.func_wrapper import with_supported_dtypes\nfrom ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back\n\ntry:\n from torch import Generator\nexcept ImportError:\n from types import SimpleNamespace\n\n Generator = SimpleNamespace\n\n\ndef seed() -> ...
diff --git a/ivy/functional/frontends/torch/random_sampling.py b/ivy/functional/frontends/torch/random_sampling.py index a8373e819e42a..c830a6863baaa 100644 --- a/ivy/functional/frontends/torch/random_sampling.py +++ b/ivy/functional/frontends/torch/random_sampling.py @@ -76,6 +76,20 @@ def rand( ) +@with_supp...
hpcaitech__ColossalAI-3323
[tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests
[ { "content": "from typing import List, Union, Any\nfrom ..proxy import ColoProxy, ColoAttribute\nimport torch\nfrom .meta_patch import meta_patched_function, meta_patched_module\n\n__all__ = ['is_element_in_list', 'extract_meta']\n\n\ndef is_element_in_list(elements: Union[List[Any], Any], list_: List[Any]):\n ...
[ { "content": "from typing import Any, List, Union\n\nimport torch\n\nfrom ..proxy import ColoAttribute, ColoProxy\nfrom .meta_patch import meta_patched_function, meta_patched_module\n\n__all__ = ['is_element_in_list', 'extract_meta']\n\n\ndef is_element_in_list(elements: Union[List[Any], Any], list_: List[Any])...
diff --git a/colossalai/fx/tracer/_tracer_utils.py b/colossalai/fx/tracer/_tracer_utils.py index 0ec49a90a133..e160497a7444 100644 --- a/colossalai/fx/tracer/_tracer_utils.py +++ b/colossalai/fx/tracer/_tracer_utils.py @@ -1,6 +1,8 @@ -from typing import List, Union, Any -from ..proxy import ColoProxy, ColoAttribute +f...
dmlc__dgl-2505
jtnn example error NOCUDA=1 python3 vaetrain_dgl.py it shows NameError: name 'tensor' is not defined in dgl/examples/pytorch/jtnn/jtnn/nnutils.py", line 11, in cuda return tensor env: dgl 0.5.3 torch 1.7.1 mac os
[ { "content": "import torch\nimport torch.nn as nn\nimport os\nimport dgl\n\n\ndef cuda(x):\n if torch.cuda.is_available() and not os.getenv('NOCUDA', None):\n return x.to(torch.device('cuda')) # works for both DGLGraph and tensor\n else:\n return tensor\n\n\nclass GRUUpdate(nn.Module):\n ...
[ { "content": "import torch\nimport torch.nn as nn\nimport os\nimport dgl\n\n\ndef cuda(x):\n if torch.cuda.is_available() and not os.getenv('NOCUDA', None):\n return x.to(torch.device('cuda')) # works for both DGLGraph and tensor\n else:\n return x\n\n\nclass GRUUpdate(nn.Module):\n def...
diff --git a/examples/pytorch/jtnn/jtnn/nnutils.py b/examples/pytorch/jtnn/jtnn/nnutils.py index 647edecb7fc8..8ef01ee25c4e 100644 --- a/examples/pytorch/jtnn/jtnn/nnutils.py +++ b/examples/pytorch/jtnn/jtnn/nnutils.py @@ -8,7 +8,7 @@ def cuda(x): if torch.cuda.is_available() and not os.getenv('NOCUDA', None): ...
carpentries__amy-2126
Community Roles: Date range validation Currently, an end date earlier than start date is allowed.
[ { "content": "from collections import defaultdict\nfrom typing import Any, Optional\n\nfrom django import forms\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\n\nfrom workshops.fields import HeavySelect2Widget, ModelSelect2Widget\nfrom workshops.forms import SELECT2_SIDEBAR, BootstrapHe...
[ { "content": "from collections import defaultdict\nfrom typing import Any, Optional\n\nfrom django import forms\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\n\nfrom workshops.fields import HeavySelect2Widget, ModelSelect2Widget\nfrom workshops.forms import SELECT2_SIDEBAR, BootstrapHe...
diff --git a/amy/communityroles/forms.py b/amy/communityroles/forms.py index e210b3013..b4ac65552 100644 --- a/amy/communityroles/forms.py +++ b/amy/communityroles/forms.py @@ -127,3 +127,11 @@ def clean(self) -> dict[str, Any]: raise ValidationError(errors) return cleaned_data + + def clean_...
paperless-ngx__paperless-ngx-2939
[BUG] WebSocket connection failed when enable password auth in Redis ### Description The browser gives an error saying "WebSocket connection to 'wss://domain.com/ws/status/' failed" when I enable the password authentication in `/etc/redis/redis.conf` as follows ``` user paperless on >password ...
[ { "content": "import datetime\nimport json\nimport math\nimport multiprocessing\nimport os\nimport re\nimport tempfile\nfrom os import PathLike\nfrom pathlib import Path\nfrom typing import Dict\nfrom typing import Final\nfrom typing import List\nfrom typing import Optional\nfrom typing import Set\nfrom typing ...
[ { "content": "import datetime\nimport json\nimport math\nimport multiprocessing\nimport os\nimport re\nimport tempfile\nfrom os import PathLike\nfrom pathlib import Path\nfrom typing import Dict\nfrom typing import Final\nfrom typing import List\nfrom typing import Optional\nfrom typing import Set\nfrom typing ...
diff --git a/Pipfile b/Pipfile index 8cf90a5dc5e..7058b8ff177 100644 --- a/Pipfile +++ b/Pipfile @@ -46,6 +46,7 @@ tika = "*" # TODO: This will sadly also install daphne+dependencies, # which an ASGI server we don't need. Adds about 15MB image size. channels = "~=3.0" +channels-redis = "*" uvicorn = {extras = ["st...
python-pillow__Pillow-3042
JPEG 2K, PyImaging_Jpeg2KDecoderNew function takes at most 6 arguments (7 given) ### What did you do? Try to upload a JPEG 2000 ### What did you expect to happen? Validate width and height ### What actually happened? Exception ### What versions of Pillow and Python are you using? Pillow 5.0.0 Python 2.7.1...
[ { "content": "#\n# The Python Imaging Library\n# $Id$\n#\n# JPEG2000 file handling\n#\n# History:\n# 2014-03-12 ajh Created\n#\n# Copyright (c) 2014 Coriolis Systems Limited\n# Copyright (c) 2014 Alastair Houghton\n#\n# See the README file for information on usage and redistribution.\n#\nfrom . import Image, I...
[ { "content": "#\n# The Python Imaging Library\n# $Id$\n#\n# JPEG2000 file handling\n#\n# History:\n# 2014-03-12 ajh Created\n#\n# Copyright (c) 2014 Coriolis Systems Limited\n# Copyright (c) 2014 Alastair Houghton\n#\n# See the README file for information on usage and redistribution.\n#\nfrom . import Image, I...
diff --git a/Tests/test_file_jpeg2k.py b/Tests/test_file_jpeg2k.py index 0766f5b07c9..810e21a9d74 100644 --- a/Tests/test_file_jpeg2k.py +++ b/Tests/test_file_jpeg2k.py @@ -176,6 +176,19 @@ def test_unbound_local(self): with self.assertRaises(IOError): Image.open('Tests/images/unbound_variable.jp2...
pypa__pipenv-2699
Pipenv breaks with pre-existing usage of .venv files #### Issue description tl;dr `.venv` files already exist in some dev setups but when present, `pipenv` attempts to use that file as a directory and install a virtualenv into it. Virtualenvwrapper has suggested for awhile to use `.venv` files in your project direc...
[ { "content": "# -*- coding: utf-8 -*-\nimport io\nimport json\nimport os\nimport re\nimport sys\nimport base64\nimport fnmatch\nimport hashlib\nimport contoml\nfrom first import first\nimport pipfile\nimport pipfile.api\nimport six\nimport toml\n\nfrom ._compat import Path\n\nfrom .cmdparse import Script\nfrom ...
[ { "content": "# -*- coding: utf-8 -*-\nimport io\nimport json\nimport os\nimport re\nimport sys\nimport base64\nimport fnmatch\nimport hashlib\nimport contoml\nfrom first import first\nimport pipfile\nimport pipfile.api\nimport six\nimport toml\n\nfrom ._compat import Path\n\nfrom .cmdparse import Script\nfrom ...
diff --git a/news/2680.bugfix b/news/2680.bugfix new file mode 100644 index 0000000000..405fb1dd80 --- /dev/null +++ b/news/2680.bugfix @@ -0,0 +1 @@ +Fixed virtualenv creation failure when a .venv file is present in the project root. diff --git a/pipenv/project.py b/pipenv/project.py index c5f451e495..e32296e521 10064...
mathesar-foundation__mathesar-940
DB Types in column.valid_target_types are not in sync with the types returned in database types endpoint ## Description * `valid_target_types` property of column returns "DOUBLE PRECISION" - Endpoint: /api/v0/tables/14/columns/ * Types endpoint returns mathesar types where Number has the db type "DOUBLE_PRECISION...
[ { "content": "from enum import Enum\n\nfrom sqlalchemy import create_engine\n\nfrom db import constants\n\n\nCHAR = 'char'\nSTRING = 'string'\nVARCHAR = 'varchar'\n\n\nclass PostgresType(Enum):\n \"\"\"\n This only includes built-in Postgres types that SQLAlchemy supports.\n SQLAlchemy doesn't support ...
[ { "content": "from enum import Enum\n\nfrom sqlalchemy import create_engine\n\nfrom db import constants\n\n\nCHAR = 'char'\nSTRING = 'string'\nVARCHAR = 'varchar'\n\n\nclass PostgresType(Enum):\n \"\"\"\n This only includes built-in Postgres types that SQLAlchemy supports.\n SQLAlchemy doesn't support ...
diff --git a/db/tests/columns/operations/test_alter.py b/db/tests/columns/operations/test_alter.py index 3699586897..c047a9cdd8 100644 --- a/db/tests/columns/operations/test_alter.py +++ b/db/tests/columns/operations/test_alter.py @@ -425,7 +425,7 @@ def test_batch_update_columns_no_changes(engine_email_type): a...
bokeh__bokeh-6022
sdists prompting for BokehJS build will block pip installs I am currently trying to run a python file on a remote server. In my local machine I can just ran the command: bokeh serve --show myApp.py However, on my remote host, when I ran bokeh serve, the error message "bokeh: command not found" was shown. I tried p...
[ { "content": "'''\n\n'''\nfrom __future__ import print_function\n\nimport shutil\nfrom os.path import dirname, exists, join, realpath, relpath\nimport os, re, subprocess, sys, time\n\nimport versioneer\n\n# provide fallbacks for highlights in case colorama is not installed\ntry:\n import colorama\n from c...
[ { "content": "'''\n\n'''\nfrom __future__ import print_function\n\nimport shutil\nfrom os.path import dirname, exists, join, realpath, relpath\nimport os, re, subprocess, sys, time\n\nimport versioneer\n\n# provide fallbacks for highlights in case colorama is not installed\ntry:\n import colorama\n from c...
diff --git a/_setup_support.py b/_setup_support.py index d039f848b8a..dbd0d908d41 100644 --- a/_setup_support.py +++ b/_setup_support.py @@ -182,7 +182,7 @@ def fixup_for_packaged(): None ''' - if exists(join(ROOT, 'PKG-INFOvi ')): + if exists(join(ROOT, 'PKG-INFO')): if "--build-js" in s...
vispy__vispy-1113
Buggy display with iso volume example Using `examples/basics/scene/volume.py` and switching to iso rendering method produces a [pretty strange view](http://youtu.be/3becSPxKIq8). ![screenshot from 2015-06-02 20-33-11](https://cloud.githubusercontent.com/assets/302469/7952618/7438357a-0986-11e5-8771-cafdb56cde95.png) S...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Vispy Development Team.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\"\nAbout this technique\n--------------------\n\nIn Python, we define the six faces of a cuboid to draw, as well as\ntexture cooridnates corresp...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2015, Vispy Development Team.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\"\nAbout this technique\n--------------------\n\nIn Python, we define the six faces of a cuboid to draw, as well as\ntexture cooridnates corresp...
diff --git a/vispy/visuals/volume.py b/vispy/visuals/volume.py index d840e83c9b..c2ffab2ad8 100644 --- a/vispy/visuals/volume.py +++ b/vispy/visuals/volume.py @@ -335,6 +335,7 @@ before_loop=""" vec4 color3 = vec4(0.0); // final color vec3 dstep = 1.5 / u_shape; // step to sample derivative + ...
ultralytics__yolov5-296
TypeError: can't pickle torch.distributed.ProcessGroupNCCL objects Hi, I meet a problem: Traceback (most recent call last): File "train.py", line 394, in <module> train(hyp) File "train.py", line 331, in train torch.save(ckpt, last) File "/home/yy/anaconda3/lib/python3.6/site-packages/torch/seria...
[ { "content": "import math\nimport os\nimport time\nfrom copy import deepcopy\n\nimport torch\nimport torch.backends.cudnn as cudnn\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision.models as models\n\n\ndef init_seeds(seed=0):\n torch.manual_seed(seed)\n\n # Speed-reproducibility...
[ { "content": "import math\nimport os\nimport time\nfrom copy import deepcopy\n\nimport torch\nimport torch.backends.cudnn as cudnn\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision.models as models\n\n\ndef init_seeds(seed=0):\n torch.manual_seed(seed)\n\n # Speed-reproducibility...
diff --git a/utils/torch_utils.py b/utils/torch_utils.py index dd2e6e75ff97..fd00b8bde080 100644 --- a/utils/torch_utils.py +++ b/utils/torch_utils.py @@ -201,5 +201,5 @@ def update(self, model): def update_attr(self, model): # Update EMA attributes for k, v in model.__dict__.items(): - ...
pypa__cibuildwheel-1282
--only doesn't work for `-win32` identifiers > - cp311 https://github.com/ddelange/asyncpg/actions/runs/3092263953/jobs/5003341864#step:4:43 > - same for all other win32 builds: `Invalid --only='cp310-win32', must be a build selector with a known platform` > > in https://github.com/ddelange/asyncpg/pull/2 > > an...
[ { "content": "from __future__ import annotations\n\nimport argparse\nimport os\nimport shutil\nimport sys\nimport tarfile\nimport textwrap\nimport typing\nfrom pathlib import Path\nfrom tempfile import mkdtemp\n\nimport cibuildwheel\nimport cibuildwheel.linux\nimport cibuildwheel.macos\nimport cibuildwheel.util...
[ { "content": "from __future__ import annotations\n\nimport argparse\nimport os\nimport shutil\nimport sys\nimport tarfile\nimport textwrap\nimport typing\nfrom pathlib import Path\nfrom tempfile import mkdtemp\n\nimport cibuildwheel\nimport cibuildwheel.linux\nimport cibuildwheel.macos\nimport cibuildwheel.util...
diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 4d1402d8c..dcfc81d46 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -173,7 +173,7 @@ def build_in_directory(args: CommandLineArguments) -> None: platform = "linux" elif "macosx_" in args.only: ...
openai__openai-python-1007
Missing default value to logprobs in openai.types.chat.chat_completion.Choice ### Confirm this is an issue with the Python library and not an underlying OpenAI API - [X] This is an issue with the Python library ### Describe the bug #980 added token `logprobs` to chat completions of type `Optional[ChoiceLogprob...
[ { "content": "# File generated from our OpenAPI spec by Stainless.\n\nfrom typing import List, Optional\nfrom typing_extensions import Literal\n\nfrom ..._models import BaseModel\nfrom ..completion_usage import CompletionUsage\nfrom .chat_completion_message import ChatCompletionMessage\nfrom .chat_completion_to...
[ { "content": "# File generated from our OpenAPI spec by Stainless.\n\nfrom typing import List, Optional\nfrom typing_extensions import Literal\n\nfrom ..._models import BaseModel\nfrom ..completion_usage import CompletionUsage\nfrom .chat_completion_message import ChatCompletionMessage\nfrom .chat_completion_to...
diff --git a/src/openai/types/chat/chat_completion.py b/src/openai/types/chat/chat_completion.py index 055280c347..b2e98a3144 100644 --- a/src/openai/types/chat/chat_completion.py +++ b/src/openai/types/chat/chat_completion.py @@ -30,7 +30,7 @@ class Choice(BaseModel): index: int """The index of the choice in...
freedomofpress__securedrop-703
Don't armor encrypted submissions SecureDrop currently armors encrypted submissions. This bloats the size of stored submissions significantly due to the encoding. For example, a 93 MB upload results in a 125.7 MB submission for the journalist to download. Downloading anything over Tor is very slow (the aforementioned ...
[ { "content": "# -*- coding: utf-8 -*-\nimport os\nimport subprocess\nfrom base64 import b32encode\n\nfrom Crypto.Random import random\nimport gnupg\nimport scrypt\n\nimport config\nimport store\n\n# to fix gpg error #78 on production\nos.environ['USERNAME'] = 'www-data'\n\nGPG_KEY_TYPE = \"RSA\"\nif os.environ....
[ { "content": "# -*- coding: utf-8 -*-\nimport os\nimport subprocess\nfrom base64 import b32encode\n\nfrom Crypto.Random import random\nimport gnupg\nimport scrypt\n\nimport config\nimport store\n\n# to fix gpg error #78 on production\nos.environ['USERNAME'] = 'www-data'\n\nGPG_KEY_TYPE = \"RSA\"\nif os.environ....
diff --git a/securedrop/crypto_util.py b/securedrop/crypto_util.py index c965484675..786828c168 100644 --- a/securedrop/crypto_util.py +++ b/securedrop/crypto_util.py @@ -158,7 +158,8 @@ def encrypt(plaintext, fingerprints, output=None): out = encrypt_fn(plaintext, *fingerprints, ...
scikit-hep__pyhf-307
Add --version flag to pyhf CLI # Description As [suggested by Lukas](https://github.com/diana-hep/pyhf/pull/304#issuecomment-428856809), adding a `--version` flag to the pyhf CLI could be useful.
[ { "content": "import logging\nlogging.basicConfig()\nlog = logging.getLogger(__name__)\n\nimport click\nimport json\nimport os\nimport jsonpatch\nimport sys\n\nfrom . import readxml\nfrom . import writexml\nfrom .utils import runOnePoint\nfrom .pdf import Model\n\n\n@click.group(context_settings=dict(help_optio...
[ { "content": "import logging\nlogging.basicConfig()\nlog = logging.getLogger(__name__)\n\nimport click\nimport json\nimport os\nimport jsonpatch\nimport sys\n\nfrom . import readxml\nfrom . import writexml\nfrom .utils import runOnePoint\nfrom .pdf import Model\nfrom .version import __version__\n\n\n@click.grou...
diff --git a/pyhf/commandline.py b/pyhf/commandline.py index beeaff70fc..2b8bad4d91 100644 --- a/pyhf/commandline.py +++ b/pyhf/commandline.py @@ -12,9 +12,11 @@ from . import writexml from .utils import runOnePoint from .pdf import Model +from .version import __version__ @click.group(context_settings=dict(help...
mars-project__mars-274
[BUG] Tensor does not return data when eager mode is on <!-- Thank you for your contribution! Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue. --> **Describe the bug** First, I execute a tensor with eager mode off, it succeeded, then I turn on eager mod...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://...
diff --git a/mars/tests/test_eager_mode.py b/mars/tests/test_eager_mode.py index e58110e375..86d0bed93a 100644 --- a/mars/tests/test_eager_mode.py +++ b/mars/tests/test_eager_mode.py @@ -172,3 +172,23 @@ def testRepr(self): self.assertNotIn(repr(np.ones((10, 10))), repr(a)) self.assertNotIn(str(np.o...
qutebrowser__qutebrowser-3318
edit-command --run should clear the status bar Thanks to @rcorre for implementing `:edit-command` from #2453. Quick issue: when using the `--run` flag, not only should the command be executed, but the status bar should also be cleared (or whatever `<esc>` tends to do). Here's what happens currently (v1.0.3, abb5c9f63):...
[ { "content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License...
[ { "content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License...
diff --git a/qutebrowser/mainwindow/statusbar/command.py b/qutebrowser/mainwindow/statusbar/command.py index a61f3c93d6b..bba2559ed92 100644 --- a/qutebrowser/mainwindow/statusbar/command.py +++ b/qutebrowser/mainwindow/statusbar/command.py @@ -178,7 +178,7 @@ def edit_command(self, run=False): def callback(te...
obspy__obspy-516
Dead link in obspy.signal.cross_correlation.xcorr docstring obspy.signal.cross_correlation.xcorr refers to ticket #249 in its docstring (see here: http://docs.obspy.org/packages/autogen/obspy.signal.cross_correlation.xcorr.html) This is an old trac link. Either it should be updated to https://github.com/obspy/obspy/is...
[ { "content": "#!/usr/bin/env python\n#--------------------------------------------------------------------\n# Filename: cross_correlation.py\n# Author: Moritz Beyreuther, Tobias Megies\n# Email: megies@geophysik.uni-muenchen.de\n#\n# Copyright (C) 2008-2012 Moritz Beyreuther, Tobias Megies\n#--------------...
[ { "content": "#!/usr/bin/env python\n#--------------------------------------------------------------------\n# Filename: cross_correlation.py\n# Author: Moritz Beyreuther, Tobias Megies\n# Email: megies@geophysik.uni-muenchen.de\n#\n# Copyright (C) 2008-2012 Moritz Beyreuther, Tobias Megies\n#--------------...
diff --git a/obspy/signal/cross_correlation.py b/obspy/signal/cross_correlation.py index 35d81927abb..18c947bf813 100644 --- a/obspy/signal/cross_correlation.py +++ b/obspy/signal/cross_correlation.py @@ -65,7 +65,7 @@ def xcorr(tr1, tr2, shift_len, full_xcorr=False): `ObsPy-users mailing list <http://...
PlasmaPy__PlasmaPy-2304
Unpin version of Sphinx after next release of sphinx-notfound-page ```py3tb Exception occurred: File "/home/runner/work/PlasmaPy/PlasmaPy/.tox/build_docs_pins/lib/python3.11/site-packages/notfound/extension.py", line 337, in setup from sphinx.builders.html import setup_js_tag_helper ImportError: cannot import...
[ { "content": "\"\"\"The configuration file for building PlasmaPy's documentation.\"\"\"\n\n#!/usr/bin/env python3\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.a...
[ { "content": "\"\"\"The configuration file for building PlasmaPy's documentation.\"\"\"\n\n#!/usr/bin/env python3\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.a...
diff --git a/docs/conf.py b/docs/conf.py index 2493075f93..f4c21a7c41 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -416,6 +416,8 @@ (python_role, "automod.*"), (python_role, "Builder"), (python_role, "docutils.*"), + (python_role, "Documenter"), + (python_role, "Node"), (python_role, "level...
Bitmessage__PyBitmessage-1697
Fix backward compatibility in pickle_deserialize_old_knownnodes() Hello! #1662 is caused by changed package structure. Here I've set up a minimal upgrade from v0.6.3 to reproduce the bug. Using v0.6.2 would be difficult, because it has no command line args.
[ { "content": "\"\"\"\nManipulations with knownNodes dictionary.\n\"\"\"\n\nimport json\nimport logging\nimport os\nimport pickle\nimport threading\nimport time\ntry:\n from collections.abc import Iterable\nexcept ImportError:\n from collections import Iterable\n\nimport state\nfrom bmconfigparser import B...
[ { "content": "\"\"\"\nManipulations with knownNodes dictionary.\n\"\"\"\n\nimport json\nimport logging\nimport os\nimport pickle\nimport threading\nimport time\ntry:\n from collections.abc import Iterable\nexcept ImportError:\n from collections import Iterable\n\nimport state\nfrom bmconfigparser import B...
diff --git a/src/network/knownnodes.py b/src/network/knownnodes.py index 07871c7c7a..c92f8e9a3f 100644 --- a/src/network/knownnodes.py +++ b/src/network/knownnodes.py @@ -17,6 +17,8 @@ from bmconfigparser import BMConfigParser from network.node import Peer +state.Peer = Peer + knownNodesLock = threading.RLock() "...
pyca__cryptography-4064
Add a python_requires to our setup.py cc: @dstufft
[ { "content": "#!/usr/bin/env python\n\n# 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 os\nimport pl...
[ { "content": "#!/usr/bin/env python\n\n# 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 os\nimport pl...
diff --git a/setup.py b/setup.py index b9186a8445be..9250e2da2ac7 100644 --- a/setup.py +++ b/setup.py @@ -283,6 +283,8 @@ def run_tests(self): packages=find_packages(where="src", exclude=["_cffi_src", "_cffi_src.*"]), include_package_data=True, + python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*', ...
networkx__networkx-4132
edgelist in draw_network does not support arrays Using numpy 1.18.2 and networkx 2.4, it is not possible to use a numpy array for the `edgelist` argument of [``draw_networkx``](https://networkx.github.io/documentation/stable/reference/generated/networkx.drawing.nx_pylab.draw_networkx.html). It raises: ``` ValueError...
[ { "content": "\"\"\"\n**********\nMatplotlib\n**********\n\nDraw networks with matplotlib.\n\nSee Also\n--------\n\nmatplotlib: http://matplotlib.org/\n\npygraphviz: http://pygraphviz.github.io/\n\n\"\"\"\nfrom numbers import Number\nimport networkx as nx\nfrom networkx.drawing.layout import (\n shel...
[ { "content": "\"\"\"\n**********\nMatplotlib\n**********\n\nDraw networks with matplotlib.\n\nSee Also\n--------\n\nmatplotlib: http://matplotlib.org/\n\npygraphviz: http://pygraphviz.github.io/\n\n\"\"\"\nfrom numbers import Number\nimport networkx as nx\nfrom networkx.drawing.layout import (\n shel...
diff --git a/networkx/drawing/nx_pylab.py b/networkx/drawing/nx_pylab.py index eb7be33be8d..c705ed547b1 100644 --- a/networkx/drawing/nx_pylab.py +++ b/networkx/drawing/nx_pylab.py @@ -640,7 +640,7 @@ def draw_networkx_edges( if edgelist is None: edgelist = list(G.edges()) - if not edgelist or len(ed...
Textualize__textual-4189
SyntaxWarning for loading indicator widget I receive this warning after upgrading to `0.52.0`: ``` /Users/cthompson/Library/Caches/pypoetry/virtualenvs/dolphie-z84eXs3q-py3.11/lib/python3.11/site-packages/textual/widgets/_loading_indicator.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="? if self.app...
[ { "content": "from __future__ import annotations\n\nfrom time import time\n\nfrom rich.console import RenderableType\nfrom rich.style import Style\nfrom rich.text import Text\n\nfrom ..color import Gradient\nfrom ..events import Mount\nfrom ..widget import Widget\n\n\nclass LoadingIndicator(Widget):\n \"\"\"...
[ { "content": "from __future__ import annotations\n\nfrom time import time\n\nfrom rich.console import RenderableType\nfrom rich.style import Style\nfrom rich.text import Text\n\nfrom ..color import Gradient\nfrom ..events import Mount\nfrom ..widget import Widget\n\n\nclass LoadingIndicator(Widget):\n \"\"\"...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 62ff923eb5..e591e95d44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versionin...
celery__celery-6741
celery amqp repl broken in celery 5.0.3+ <!-- 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 have verified that the issue exis...
[ { "content": "\"\"\"AMQP 0.9.1 REPL.\"\"\"\n\nimport pprint\n\nimport click\nfrom amqp import Connection, Message\nfrom click_repl import register_repl\n\n__all__ = ('amqp',)\n\nfrom celery.bin.base import handle_preload_options\n\n\ndef dump_message(message):\n if message is None:\n return 'No messag...
[ { "content": "\"\"\"AMQP 0.9.1 REPL.\"\"\"\n\nimport pprint\n\nimport click\nfrom amqp import Connection, Message\nfrom click_repl import register_repl\n\n__all__ = ('amqp',)\n\nfrom celery.bin.base import handle_preload_options\n\n\ndef dump_message(message):\n if message is None:\n return 'No messag...
diff --git a/celery/bin/amqp.py b/celery/bin/amqp.py index ab8ab5f0100..29c625281ed 100644 --- a/celery/bin/amqp.py +++ b/celery/bin/amqp.py @@ -25,6 +25,10 @@ def __init__(self, cli_context): self.connection = self.cli_context.app.connection() self.channel = None self.reconnect() + + ...
iterative__dvc-3428
add: empty files add broken when cache mode is hardlinks ## DVC Version ``` DVC version: 0.86.5+f67314.mod Python version: 3.7.6 Platform: Darwin-18.2.0-x86_64-i386-64bit Binary: False Package: None Cache: reflink - supported, hardlink - supported, symlink - supported Filesystem type (cache directory): ('ap...
[ { "content": "import errno\nimport logging\nimport os\nimport stat\nfrom concurrent.futures import ThreadPoolExecutor\nfrom functools import partial\n\nfrom shortuuid import uuid\n\nfrom dvc.compat import fspath_py35\nfrom dvc.exceptions import DvcException, DownloadError, UploadError\nfrom dvc.path_info import...
[ { "content": "import errno\nimport logging\nimport os\nimport stat\nfrom concurrent.futures import ThreadPoolExecutor\nfrom functools import partial\n\nfrom shortuuid import uuid\n\nfrom dvc.compat import fspath_py35\nfrom dvc.exceptions import DvcException, DownloadError, UploadError\nfrom dvc.path_info import...
diff --git a/dvc/remote/local.py b/dvc/remote/local.py index 24725c526d..3e62e0628e 100644 --- a/dvc/remote/local.py +++ b/dvc/remote/local.py @@ -92,6 +92,12 @@ def already_cached(self, path_info): return not self.changed_cache(current_md5) + def _verify_link(self, path_info, link_type): + if li...
OpenNMT__OpenNMT-py-471
tools/embeddings_to_torch.py fails when some word features are included in the preprocessing step When there are some word features appended to each token in the source text, it seems that the `tools/embeddings_to_torch.py` script cannot extract correct vocabulary from the dataset. ``` $ python tools/embeddings_to_to...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nfrom __future__ import division\nimport six\nimport sys\nimport numpy as np\nimport argparse\nimport torch\n\nparser = argparse.ArgumentParser(description='embeddings_to_torch.py')\nparser.add_argument('-emb_fil...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nfrom __future__ import division\nimport six\nimport sys\nimport numpy as np\nimport argparse\nimport torch\n\nparser = argparse.ArgumentParser(description='embeddings_to_torch.py')\nparser.add_argument('-emb_fil...
diff --git a/tools/embeddings_to_torch.py b/tools/embeddings_to_torch.py index 7ec470ef51..4b4294930e 100755 --- a/tools/embeddings_to_torch.py +++ b/tools/embeddings_to_torch.py @@ -21,7 +21,7 @@ def get_vocabs(dict_file): vocabs = torch.load(dict_file) - enc_vocab, dec_vocab = [vocab[1] for vocab in vocabs...
zestedesavoir__zds-site-6488
Possible erreur 500 à la résolution d'une alerte sur un contenu qui n'est plus public Rapporté par Sentry. J'ai eu du mal à comprendre comment le bug a pu se produire, mais j'ai réussi à le reproduire (d'une façon peut-être un peu tirée par les cheveux...). **Comment reproduire ?** 1. Se connecter en tant que `us...
[ { "content": "from datetime import datetime\n\nfrom django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.contrib.auth.mixins import LoginRequiredMixin\nfrom django.db import transaction\nfrom django.http import Http404\nfrom django.shortcuts import get_object_or_404, ...
[ { "content": "from datetime import datetime\n\nfrom django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.contrib.auth.mixins import LoginRequiredMixin\nfrom django.db import transaction\nfrom django.http import Http404\nfrom django.shortcuts import get_object_or_404, ...
diff --git a/zds/tutorialv2/tests/tests_utils.py b/zds/tutorialv2/tests/tests_utils.py index 4e52de2902..c3bcc62e2d 100644 --- a/zds/tutorialv2/tests/tests_utils.py +++ b/zds/tutorialv2/tests/tests_utils.py @@ -556,7 +556,7 @@ def test_no_alert_on_unpublish(self): reaction = ContentReactionFactory( ...
zestedesavoir__zds-site-2270
Erreur 500 lors de la recherche d'un sujet Url incriminée : `http://beta.zestedesavoir.com/forums/sujets/recherche/` On ne devrait jamais avoir d'erreur 500
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\nfrom datetime import datetime\nimport json\n\nfrom django.conf import settings\nfrom django.db.models import Q\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.auth.models import User\nf...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\nfrom datetime import datetime\nimport json\n\nfrom django.conf import settings\nfrom django.db.models import Q\nfrom django.contrib import messages\nfrom django.contrib.auth.decorators import login_required\nfrom django.contrib.auth.models import User\nf...
diff --git a/zds/forum/views.py b/zds/forum/views.py index e45bcc10ba..df8bf870db 100644 --- a/zds/forum/views.py +++ b/zds/forum/views.py @@ -1061,6 +1061,9 @@ def followed_topics(request): def complete_topic(request): + if not request.GET.get('q', None): + return HttpResponse("{}", content_type='applic...
dbt-labs__dbt-core-7221
[CT-1943] Loosen pin on `jsonschema` (via `hologram`) For more context on our latest thinking around dependencies (how & why we pin today, and how we want it to change): - https://github.com/dbt-labs/dbt-core/discussions/6495 ### Summary `dbt-core` depends on `hologram`, and as such it also includes `hologram`'s...
[ { "content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif sys.version_info < (3, 7, 2):\n print(\"Error: dbt does not support this version of Python.\")\n print(\"Please upgrade to Python 3.7.2 or higher.\")\n sys.exit(1)\n\n\nfrom setuptools import setup\n\ntry:\n from setuptools import find...
[ { "content": "#!/usr/bin/env python\nimport os\nimport sys\n\nif sys.version_info < (3, 7, 2):\n print(\"Error: dbt does not support this version of Python.\")\n print(\"Please upgrade to Python 3.7.2 or higher.\")\n sys.exit(1)\n\n\nfrom setuptools import setup\n\ntry:\n from setuptools import find...
diff --git a/.changes/unreleased/Under the Hood-20230324-144050.yaml b/.changes/unreleased/Under the Hood-20230324-144050.yaml new file mode 100644 index 00000000000..9094cf7524b --- /dev/null +++ b/.changes/unreleased/Under the Hood-20230324-144050.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: Remove upper pin fo...
streamlink__streamlink-2171
INE Plugin ## Plugin Issue <!-- Replace [ ] with [x] in order to check the box --> - [X] This is a plugin issue and I have read the contribution guidelines. ### Description The INE plugin doesn't appear to work on any videos I try. ### Reproduction steps / Explicit stream URLs to test Try do downloa...
[ { "content": "from __future__ import print_function\n\nimport json\nimport re\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream import HLSStream, HTTPStream\nfrom streamlink.utils import update_scheme\n\n\nclass INE(Plugin):\n url_re = re.compile(r\"\...
[ { "content": "from __future__ import print_function\n\nimport json\nimport re\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream import HLSStream, HTTPStream\nfrom streamlink.utils import update_scheme\n\n\nclass INE(Plugin):\n url_re = re.compile(r\"\...
diff --git a/src/streamlink/plugins/ine.py b/src/streamlink/plugins/ine.py index 8ebc91095f5..e0389b7e937 100644 --- a/src/streamlink/plugins/ine.py +++ b/src/streamlink/plugins/ine.py @@ -23,7 +23,7 @@ class INE(Plugin): validate.all( validate.get(1), validate.transform(j...
praw-dev__praw-1441
PRAW 6.5.1 and 7.0.0 require Python versions above 3.5.2 **Describe the bug** At https://praw.readthedocs.io/en/latest/getting_started/installation.html, it says: > PRAW supports Python 3.5+ 3.5.2 seems to be insufficient for PRAW versions after 6.4.0. I *think* 3.5.3 is probably sufficient based on what I hav...
[ { "content": "\"\"\"praw setup.py\"\"\"\n\nimport re\nfrom codecs import open\nfrom os import path\n\nfrom setuptools import find_packages, setup\n\nPACKAGE_NAME = \"praw\"\nHERE = path.abspath(path.dirname(__file__))\nwith open(path.join(HERE, \"README.rst\"), encoding=\"utf-8\") as fp:\n README = fp.read()...
[ { "content": "\"\"\"praw setup.py\"\"\"\n\nimport re\nfrom codecs import open\nfrom os import path\n\nfrom setuptools import find_packages, setup\n\nPACKAGE_NAME = \"praw\"\nHERE = path.abspath(path.dirname(__file__))\nwith open(path.join(HERE, \"README.rst\"), encoding=\"utf-8\") as fp:\n README = fp.read()...
diff --git a/setup.py b/setup.py index 794394d50..2ea8a6914 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ name=PACKAGE_NAME, author="Bryce Boe", author_email="bbzbryce@gmail.com", - python_requires=">=3.5", + python_requires=">3.5.3", classifiers=[ "Development Status :: 5 - ...
svthalia__concrexit-1880
ImproperlyConfigured: Field name `language` is not valid for model `Profile`. Sentry Issue: [CONCREXIT-8J](https://sentry.io/organizations/thalia/issues/2580014551/?referrer=github_integration) ``` ImproperlyConfigured: Field name `language` is not valid for model `Profile`. (14 additional frame(s) were not displayed)...
[ { "content": "\"\"\"DRF serializers defined by the members package.\"\"\"\nfrom django.templatetags.static import static\nfrom rest_framework import serializers\n\nfrom members.models import Member, Profile\nfrom members.services import member_achievements, member_societies\nfrom thaliawebsite.api.services impo...
[ { "content": "\"\"\"DRF serializers defined by the members package.\"\"\"\nfrom django.templatetags.static import static\nfrom rest_framework import serializers\n\nfrom members.models import Member, Profile\nfrom members.services import member_achievements, member_societies\nfrom thaliawebsite.api.services impo...
diff --git a/website/members/api/v1/serializers.py b/website/members/api/v1/serializers.py index 008f4e6de..42d142327 100644 --- a/website/members/api/v1/serializers.py +++ b/website/members/api/v1/serializers.py @@ -125,7 +125,6 @@ class Meta: "profile_description", "nickname", "...
joke2k__faker-826
pt_BR email not returning valid email addresses When creating a fake Factory with the pt_BR it is not returning valid email addresses. Example: ``` melocauã@bol.com.br joão-gabrielferreira@ig.com.br lavíniarodrigues@sales.org vitória78@example.br ```
[ { "content": "# coding=utf-8\nfrom __future__ import unicode_literals\nfrom .. import Provider as InternetProvider\n\n\nclass Provider(InternetProvider):\n safe_email_tlds = ('com', 'net', 'br', 'br')\n free_email_domains = (\n 'gmail.com',\n 'hotmail.com',\n 'yahoo.com.br',\n ...
[ { "content": "# coding=utf-8\nfrom __future__ import unicode_literals\nfrom .. import Provider as InternetProvider\n\n\nclass Provider(InternetProvider):\n safe_email_tlds = ('com', 'net', 'br', 'br')\n free_email_domains = (\n 'gmail.com',\n 'hotmail.com',\n 'yahoo.com.br',\n ...
diff --git a/faker/providers/internet/pt_BR/__init__.py b/faker/providers/internet/pt_BR/__init__.py index bf2b95f422..36d0e42400 100644 --- a/faker/providers/internet/pt_BR/__init__.py +++ b/faker/providers/internet/pt_BR/__init__.py @@ -13,3 +13,11 @@ class Provider(InternetProvider): 'bol.com.br', ...
fidals__shopelectro-693
tests_selenium.py:976: Resurrect test `test_cart_page_open` The puzzle `473-5159ab9c` from #473 has to be resolved: https://github.com/fidals/shopelectro/blob/f7dc2793dc5c7eddb2e68a68368337d77ba3139e/shopelectro/tests/tests_selenium.py#L976-L976 The puzzle was created by duker33 on 08-Aug-18. Estimate: 15 minutes, ...
[ { "content": "import random\nimport string\nimport typing\nfrom uuid import uuid4\n\nfrom django.conf import settings\nfrom django.db import models\nfrom django.urls import reverse\nfrom django.utils.translation import ugettext_lazy as _\nimport mptt\n\nfrom catalog import models as catalog_models\nfrom ecommer...
[ { "content": "import random\nimport string\nimport typing\nfrom uuid import uuid4\n\nfrom django.conf import settings\nfrom django.db import models\nfrom django.urls import reverse\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom catalog import models as catalog_models\nfrom ecommerce import mod...
diff --git a/shopelectro/models.py b/shopelectro/models.py index 6f5320ce..ec837263 100644 --- a/shopelectro/models.py +++ b/shopelectro/models.py @@ -7,7 +7,6 @@ from django.db import models from django.urls import reverse from django.utils.translation import ugettext_lazy as _ -import mptt from catalog import m...
hpcaitech__ColossalAI-5433
[tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests
[ { "content": "from ..cuda_extension import _CudaExtension\nfrom ..utils import get_cuda_cc_flag\n\n\nclass InferenceOpsCudaExtension(_CudaExtension):\n def __init__(self):\n super().__init__(name=\"inference_ops_cuda\")\n\n def sources_files(self):\n ret = [\n self.csrc_abs_path(f...
[ { "content": "from ..cuda_extension import _CudaExtension\nfrom ..utils import get_cuda_cc_flag\n\n\nclass InferenceOpsCudaExtension(_CudaExtension):\n def __init__(self):\n super().__init__(name=\"inference_ops_cuda\")\n\n def sources_files(self):\n ret = [\n self.csrc_abs_path(f...
diff --git a/extensions/csrc/cuda/activation_kernel.cu b/extensions/csrc/cuda/activation_kernel.cu new file mode 100644 index 000000000000..4121b67fc523 --- /dev/null +++ b/extensions/csrc/cuda/activation_kernel.cu @@ -0,0 +1,65 @@ +#include <ATen/cuda/CUDAContext.h> +#include <torch/extension.h> +#include <stdio.h> + ...
saulpw__visidata-2398
`history` parameter of input() is appears ignored **Small description** I think the `history` parameter of the `input` function is unused and overwritten here: https://github.com/saulpw/visidata/blob/3ad7a3d0c1475ff53bf31481506b9a748b48ac7c/visidata/_input.py#L501 **Expected result** That `history` would be h...
[ { "content": "from contextlib import suppress\nimport curses\n\nimport visidata\n\nfrom visidata import EscapeException, ExpectedException, clipdraw, Sheet, VisiData, BaseSheet\nfrom visidata import vd, options, colors, dispwidth, ColorAttr\nfrom visidata import AttrDict\n\n\nvd.theme_option('color_edit_unfocus...
[ { "content": "from contextlib import suppress\nimport curses\n\nimport visidata\n\nfrom visidata import EscapeException, ExpectedException, clipdraw, Sheet, VisiData, BaseSheet\nfrom visidata import vd, options, colors, dispwidth, ColorAttr\nfrom visidata import AttrDict\n\n\nvd.theme_option('color_edit_unfocus...
diff --git a/visidata/_input.py b/visidata/_input.py index 77f922dcb..5f998f36d 100644 --- a/visidata/_input.py +++ b/visidata/_input.py @@ -528,7 +528,8 @@ def input(vd, prompt, type=None, defaultLast=False, history=[], dy=0, attr=None, import getpass return getpass.getpass(prompt) - his...
awslabs__gluonts-1537
Theta model does not preserve item IDs ## Description When using the `RForecastPredictor` with `method_name = "thetaf"`, the item IDs returned by the predictor's forecasts do not align with the actual item IDs. Instead, it returns `None` for the item IDs. ## To Reproduce ```python from gluonts.dataset.reposit...
[ { "content": "# Copyright 2018 Amazon.com, Inc. or its affiliates. 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# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICE...
[ { "content": "# Copyright 2018 Amazon.com, Inc. or its affiliates. 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# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICE...
diff --git a/src/gluonts/model/r_forecast/_predictor.py b/src/gluonts/model/r_forecast/_predictor.py index 928d150173..6b3010f076 100644 --- a/src/gluonts/model/r_forecast/_predictor.py +++ b/src/gluonts/model/r_forecast/_predictor.py @@ -207,5 +207,9 @@ def predict( else None ) ...
fossasia__open-event-server-6254
Verify any user automatically if clicks on a reset password link If a user is using reset password link to reset his password, he is by default verifying his account
[ { "content": "import base64\nimport base64\nimport logging\nimport random\nimport string\nfrom functools import wraps\n\nimport requests\nfrom flask import request, jsonify, make_response, Blueprint, send_file\nfrom flask_jwt_extended import jwt_required, current_user, create_access_token\nfrom flask_limiter.ut...
[ { "content": "import base64\nimport base64\nimport logging\nimport random\nimport string\nfrom functools import wraps\n\nimport requests\nfrom flask import request, jsonify, make_response, Blueprint, send_file\nfrom flask_jwt_extended import jwt_required, current_user, create_access_token\nfrom flask_limiter.ut...
diff --git a/app/api/auth.py b/app/api/auth.py index a4cf7fa4ce..35b9eb6d2d 100644 --- a/app/api/auth.py +++ b/app/api/auth.py @@ -278,7 +278,7 @@ def reset_password_patch(): return NotFoundError({'source': ''}, 'User Not Found').respond() else: user.password = password - if user.was_regis...
ycm-core__ycmd-542
Why is clang_completer requesting `unloaded_buffer` key in OnBufferUnload Would it be possible to just reuse `filepath` in `OnBufferUnload` in `clang_completer` instead of having to specify `unloaded_buffer`. The typescript completer is already using `filepath`. It would be nice to align both.
[ { "content": "# Copyright (C) 2011, 2012 Google Inc.\n#\n# This file is part of ycmd.\n#\n# ycmd is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option...
[ { "content": "# Copyright (C) 2011, 2012 Google Inc.\n#\n# This file is part of ycmd.\n#\n# ycmd is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option...
diff --git a/ycmd/completers/cpp/clang_completer.py b/ycmd/completers/cpp/clang_completer.py index 35bb660c22..37e44a4090 100755 --- a/ycmd/completers/cpp/clang_completer.py +++ b/ycmd/completers/cpp/clang_completer.py @@ -338,7 +338,7 @@ def OnFileReadyToParse( self, request_data ): def OnBufferUnload( self, requ...
getmoto__moto-1671
IoT service list_things should include thing ARNs ### Actual `list_things` method of the AWS IoT service returns _thingName_, _attributes_, _thingTypeName_ and _version_ ### Expected The `list_things` method of the AWS IoT service should include the thing ARN (_thingArn_) as described [here](https://boto3.readthed...
[ { "content": "from __future__ import unicode_literals\nimport time\nimport boto3\nimport string\nimport random\nimport hashlib\nimport uuid\nimport re\nfrom datetime import datetime\nfrom moto.core import BaseBackend, BaseModel\nfrom collections import OrderedDict\nfrom .exceptions import (\n ResourceNotFoun...
[ { "content": "from __future__ import unicode_literals\nimport time\nimport boto3\nimport string\nimport random\nimport hashlib\nimport uuid\nimport re\nfrom datetime import datetime\nfrom moto.core import BaseBackend, BaseModel\nfrom collections import OrderedDict\nfrom .exceptions import (\n ResourceNotFoun...
diff --git a/moto/iot/models.py b/moto/iot/models.py index 1b10c09fc5c0..ce7a4cf57eb1 100644 --- a/moto/iot/models.py +++ b/moto/iot/models.py @@ -32,6 +32,7 @@ def __init__(self, thing_name, thing_type, attributes, region_name): def to_dict(self, include_default_client_id=False): obj = { 'th...
chainer__chainer-1850
Build failed on Mac I cannot build Chainer on mac after #1775 is merged. ``` % python setup.py develop Options: {'profile': False, 'annotate': False, 'linetrace': False, 'no_cuda': False} Traceback (most recent call last): File "setup.py", line 17, in <module> ext_modules = chainer_setup_build.get_ext_mod...
[ { "content": "from __future__ import print_function\nfrom distutils import ccompiler\nfrom distutils import sysconfig\nimport os\nfrom os import path\nimport sys\n\nimport pkg_resources\nimport setuptools\n\nfrom install import build\nfrom install import utils\n\n\nrequire_cython_version = pkg_resources.parse_v...
[ { "content": "from __future__ import print_function\nfrom distutils import ccompiler\nfrom distutils import sysconfig\nimport os\nfrom os import path\nimport sys\n\nimport pkg_resources\nimport setuptools\n\nfrom install import build\nfrom install import utils\n\n\nrequire_cython_version = pkg_resources.parse_v...
diff --git a/chainer_setup_build.py b/chainer_setup_build.py index cd763ce95d9d..82425a96e465 100644 --- a/chainer_setup_build.py +++ b/chainer_setup_build.py @@ -214,6 +214,9 @@ def get_ext_modules(): arg_options = parse_args() print('Options:', arg_options) + # We need to call get_config_vars to initia...
pypa__pip-10009
Update quickstart guide to reflect user research Updates quickstart guide to reflect most common tasks as discovered in our "buy a feature" user research. Preview: https://pip--9137.org.readthedocs.build/en/9137/quickstart/
[ { "content": "\"\"\"Sphinx configuration file for pip's documentation.\"\"\"\n\nimport glob\nimport os\nimport pathlib\nimport re\nimport sys\nfrom typing import List, Tuple\n\n# Add the docs/ directory to sys.path, because pip_sphinxext.py is there.\ndocs_dir = os.path.dirname(os.path.dirname(__file__))\nsys.p...
[ { "content": "\"\"\"Sphinx configuration file for pip's documentation.\"\"\"\n\nimport glob\nimport os\nimport pathlib\nimport re\nimport sys\nfrom typing import List, Tuple\n\n# Add the docs/ directory to sys.path, because pip_sphinxext.py is there.\ndocs_dir = os.path.dirname(os.path.dirname(__file__))\nsys.p...
diff --git a/docs/html/conf.py b/docs/html/conf.py index 2a4387a352a..9e210539e89 100644 --- a/docs/html/conf.py +++ b/docs/html/conf.py @@ -30,7 +30,7 @@ # General information about the project. project = "pip" -copyright = "2008-2020, PyPA" +copyright = "The pip developers" # Find the version and release infor...
aws__aws-cli-579
Docs: s3api restore-object Regarding the documentation here: http://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html I am having a hard time figuring out what the different arguments are for and what their values should be. These docs just look a little sparse. I'll see if I can find some time to hel...
[ { "content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#...
[ { "content": "# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#...
diff --git a/awscli/argprocess.py b/awscli/argprocess.py index 26bef03c1509..da3b623fb6a1 100644 --- a/awscli/argprocess.py +++ b/awscli/argprocess.py @@ -303,7 +303,7 @@ def _docs_special_key_value_parse(self, param): # should be skipped for this arg. return None else: - s...
buildbot__buildbot-3531
REST API: way to query lists for "tag1" or "tag2" (as opposed to and) The query `/api/v2/builders?tags__contains=tag1&tags__contains=tag2` returns only builders that have *both* tags `tag1` and `tag2`. I don't see a way to query for builders that have either `tag1` or `tag2`.
[ { "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/data/resultspec.py b/master/buildbot/data/resultspec.py index 37b0192c8fb6..b275199a966f 100644 --- a/master/buildbot/data/resultspec.py +++ b/master/buildbot/data/resultspec.py @@ -46,7 +46,7 @@ class FieldBase(object): plural_operators = { 'eq': lambda d, v: d in v, ...
sunpy__sunpy-3676
Removing astropy_helpers section in CONTRIBUTING.rst <!-- This comments are hidden when you submit the issue so you do not need to remove them! Please be sure to check out our contributing guidelines: https://github.com/sunpy/sunpy/blob/master/CONTRIBUTING.rst Please be sure to check out our code of conduct: https:/...
[ { "content": "# This file is for compatibility with astropy_helpers\nversion = 'unknown.dev'\ntry:\n from importlib_metadata import version as _version, PackageNotFoundError\n version = _version('sunpy')\nexcept ImportError:\n from pkg_resources import get_distribution, DistributionNotFound\n try:\n...
[ { "content": null, "path": "sunpy/version.py" } ]
diff --git a/.pep8speaks.yml b/.pep8speaks.yml index bd956a34c15..df9f5b68358 100644 --- a/.pep8speaks.yml +++ b/.pep8speaks.yml @@ -2,9 +2,6 @@ pycodestyle: max-line-length: 100 exclude: - setup.py - - ez_setup.py - - ah_bootstrap.py - - astropy_helpers/ - docs/conf.py - sunpy/cm/color_ta...
Project-MONAI__MONAI-5709
tests.test_warp HTTP Error 503 ``` ====================================================================== ERROR: test_grad (tests.test_warp.TestWarp) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\a\MONAI\MONAI\tests\test_warp.py", line 102, in ...
[ { "content": "# Copyright (c) MONAI Consortium\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable la...
[ { "content": "# Copyright (c) MONAI Consortium\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable la...
diff --git a/monai/handlers/checkpoint_saver.py b/monai/handlers/checkpoint_saver.py index 014f418e2b..76f6458f3d 100644 --- a/monai/handlers/checkpoint_saver.py +++ b/monai/handlers/checkpoint_saver.py @@ -18,7 +18,6 @@ Events, _ = optional_import("ignite.engine", IgniteInfo.OPT_IMPORT_VERSION, min_version, "Events...
Lightning-Universe__lightning-flash-720
NameError: name 'K' is not defined ## 🐛 Bug <!-- A clear and concise description of what the bug is. --> ````sh Uncaught exception Traceback (most recent call last): File "main.py", line 11, in <module> datamodule = VideoClassificationData.from_folders( File "/home/nitin/github/video_classification/ve...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
diff --git a/flash/core/utilities/imports.py b/flash/core/utilities/imports.py index 621ea5bb2b..fb866a5f84 100644 --- a/flash/core/utilities/imports.py +++ b/flash/core/utilities/imports.py @@ -133,7 +133,7 @@ class Image(metaclass=MetaImage): ] ) _TABULAR_AVAILABLE = _TABNET_AVAILABLE and _PANDAS_AVAILABLE -_V...
huggingface__transformers-11945
wandb integration gags during hyperparameter search ## Environment info - transformers version: 4.6.1 - Platform: Linux-4.19.0-16-cloud-amd64-x86_64-with-glibc2.10 - Python version: 3.8.10 - PyTorch version (GPU?): 1.8.1+cu111 (True) - Tensorflow version (GPU?): not installed (NA) - Using GPU in script?: yes -...
[ { "content": "# Copyright 2020 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#...
[ { "content": "# Copyright 2020 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#...
diff --git a/src/transformers/integrations.py b/src/transformers/integrations.py index 4ab15b9d50f7..19bffe1f7a6e 100644 --- a/src/transformers/integrations.py +++ b/src/transformers/integrations.py @@ -713,6 +713,7 @@ def on_train_begin(self, args, state, control, model=None, **kwargs): hp_search = state.is_h...
jupyter__docker-stacks-1964
[BUG] - Healthcheck fails when using proxy ### What docker image(s) are you using? base-notebook ### Host OS system and architecture running docker image Windows 11 as host and linux/amd64 for docker ### What Docker command are you running? docker compose up with the following dockerfile: ```Dockerfil...
[ { "content": "#!/usr/bin/env python3\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport json\nimport os\nfrom pathlib import Path\n\nimport requests\n\n# A number of operations below deliberately don't check for possible errors\n# As this is a healthch...
[ { "content": "#!/usr/bin/env python3\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\nimport json\nimport os\nfrom pathlib import Path\n\nimport requests\n\n# A number of operations below deliberately don't check for possible errors\n# As this is a healthch...
diff --git a/base-notebook/docker_healthcheck.py b/base-notebook/docker_healthcheck.py index 7c35a6b115..41bbc78568 100755 --- a/base-notebook/docker_healthcheck.py +++ b/base-notebook/docker_healthcheck.py @@ -16,6 +16,11 @@ url = json.loads(json_file.read_bytes())["url"] url = url + "api" -r = requests.get(url, v...
dj-stripe__dj-stripe-1312
Issue when attempting to sync tiered Price Model in 2.4.2 **Describe the bug** It looks like 9bd896ffd944e809b95abae884a2149dc8a79f27 introduced a regression when trying to sync a tiered Price model. Probably Price is not the only model affected. Check out this trace: ``` $ ./manage.py djstripe_sync_models Pr...
[ { "content": "from typing import List\n\nfrom django.apps import apps\nfrom django.core.management.base import BaseCommand, CommandError\n\nfrom ... import models, settings\n\n\nclass Command(BaseCommand):\n \"\"\"Sync models from stripe.\"\"\"\n\n help = \"Sync models from stripe.\"\n\n def add_argume...
[ { "content": "from typing import List\n\nfrom django.apps import apps\nfrom django.core.management.base import BaseCommand, CommandError\n\nfrom ... import models, settings\n\n\nclass Command(BaseCommand):\n \"\"\"Sync models from stripe.\"\"\"\n\n help = \"Sync models from stripe.\"\n\n def add_argume...
diff --git a/djstripe/management/commands/djstripe_sync_models.py b/djstripe/management/commands/djstripe_sync_models.py index ddea11aa16..a974055826 100644 --- a/djstripe/management/commands/djstripe_sync_models.py +++ b/djstripe/management/commands/djstripe_sync_models.py @@ -140,7 +140,7 @@ def get_list_kwargs(self,...
DDMAL__CantusDB-913
Admin Chant Edit page: we should make "title" field longer In an email from Debra: > https://cantusdatabase.org/admin/main_app/source/123611/change/ For a page like this one, could I please have a longer box for the source title? The width of the "provenance note" field would be about right, I think, so that I can ...
[ { "content": "from django import forms\nfrom .models import (\n Chant,\n Office,\n Genre,\n Notation,\n Feast,\n Source,\n RismSiglum,\n Segment,\n Provenance,\n Century,\n Sequence,\n)\nfrom .widgets import (\n TextInputWidget,\n VolpianoInputWidget,\n TextAreaWidget,\...
[ { "content": "from django import forms\nfrom .models import (\n Chant,\n Office,\n Genre,\n Notation,\n Feast,\n Source,\n RismSiglum,\n Segment,\n Provenance,\n Century,\n Sequence,\n)\nfrom .widgets import (\n TextInputWidget,\n VolpianoInputWidget,\n TextAreaWidget,\...
diff --git a/django/cantusdb_project/main_app/forms.py b/django/cantusdb_project/main_app/forms.py index d595973c3..d106d4284 100644 --- a/django/cantusdb_project/main_app/forms.py +++ b/django/cantusdb_project/main_app/forms.py @@ -826,6 +826,7 @@ class Meta: widget=AdminTextInputWidget, help_text="F...
webkom__lego-3128
Broken link on weekly mails The link used to unsubscribe from the mail is broken, because `frontend_url` is undefined. Probably due to the weekly mails being handled differently than all other notifications.
[ { "content": "from datetime import timedelta\n\nfrom django.conf import settings\nfrom django.template.loader import render_to_string\nfrom django.utils import timezone\n\nfrom premailer import transform\nfrom structlog import get_logger\n\nfrom lego import celery_app\nfrom lego.apps.events.constants import EVE...
[ { "content": "from datetime import timedelta\n\nfrom django.conf import settings\nfrom django.template.loader import render_to_string\nfrom django.utils import timezone\n\nfrom premailer import transform\nfrom structlog import get_logger\n\nfrom lego import celery_app\nfrom lego.apps.events.constants import EVE...
diff --git a/lego/apps/email/tasks.py b/lego/apps/email/tasks.py index a9b946bc7..3270a3e2b 100644 --- a/lego/apps/email/tasks.py +++ b/lego/apps/email/tasks.py @@ -93,6 +93,7 @@ def create_weekly_mail(user): if todays_weekly is None else todays_weekly.get_absolute_url(), "joblist...
OpenMined__PySyft-4923
Small correction in Sample Code Block of sy.core.pointer.pointer ## Where? Where are you looking to add documentation? Which file? Which feature? In directory PySyft/src/syft/core/pointer directory, there is a python file, pointer.py. The example code in the python file can be viewed by the user by executing the ...
[ { "content": "\"\"\"A Pointer is the main handler when interacting with remote data.\nA Pointer object represents an API for interacting with data (of any type)\nat a specific location. The pointer should never be instantiated, only subclassed.\n\nThe relation between pointers and data is many to one,\nthere ca...
[ { "content": "\"\"\"A Pointer is the main handler when interacting with remote data.\nA Pointer object represents an API for interacting with data (of any type)\nat a specific location. The pointer should never be instantiated, only subclassed.\n\nThe relation between pointers and data is many to one,\nthere ca...
diff --git a/src/syft/core/pointer/pointer.py b/src/syft/core/pointer/pointer.py index da8206d191d..6e94230b000 100644 --- a/src/syft/core/pointer/pointer.py +++ b/src/syft/core/pointer/pointer.py @@ -68,7 +68,7 @@ requested_object = data_ptr_domain_1.id_at_location # getting the request id - message_req...
cloud-custodian__cloud-custodian-2513
S3Output should grant bucket owner full control Currently `S3Output` misses the `ACL` option. In a cross account setup it is desirable to give the bucket owner full control. Would you change the code like this?: ``` diff --git a/c7n/output.py b/c7n/output.py index c3839c2f..5fb06f59 100644 --- a/c7n/output.py +...
[ { "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/output.py b/c7n/output.py index 47109950cd7..406f40c2287 100644 --- a/c7n/output.py +++ b/c7n/output.py @@ -284,4 +284,5 @@ def upload(self): self.transfer.upload_file( os.path.join(root, f), self.bucket, key, extra_args={ + ...
bokeh__bokeh-6954
length_units has no effect for rays # READ AND FOLLOW THESE INSTRUCTIONS CAREFULLY *ISSUES THAT DO NOT CONTAIN NECESSARY INFORMATION MAY BE CLOSED, IMMEDIATELY* The issue tracker is NOT the place for general support. For questions and technical assistance, come ask the [Bokeh mailing list](https://groups.google....
[ { "content": "# -*- coding: utf-8 -*-\n''' Display a variety of visual shapes whose attributes can be associated\nwith data columns from ``ColumnDataSources``.\n\nThe full list of glyphs built into Bokeh is given below:\n\n* :class:`~bokeh.models.glyphs.AnnularWedge`\n* :class:`~bokeh.models.glyphs.Annulus`\n* ...
[ { "content": "# -*- coding: utf-8 -*-\n''' Display a variety of visual shapes whose attributes can be associated\nwith data columns from ``ColumnDataSources``.\n\nThe full list of glyphs built into Bokeh is given below:\n\n* :class:`~bokeh.models.glyphs.AnnularWedge`\n* :class:`~bokeh.models.glyphs.Annulus`\n* ...
diff --git a/bokeh/models/glyphs.py b/bokeh/models/glyphs.py index b0842d0d381..fc54d1a6e86 100644 --- a/bokeh/models/glyphs.py +++ b/bokeh/models/glyphs.py @@ -784,7 +784,7 @@ class Ray(XYGlyph): length = DistanceSpec(help=""" The length to extend the ray. Note that this ``length`` defaults - to screen ...
esphome__esphome-docs-1148
Update docs for new fan speed ## Description: **Related issue (if applicable):** fixes https://github.com/esphome/issues/issues/1278 **Pull request in [esphome](https://github.com/esphome/esphome) with YAML changes (if applicable):** esphome/esphome#https://github.com/esphome/esphome/pull/1391 ## Checklist: ...
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# esphome documentation build configuration file, created by\n# sphinx-quickstart on Mon Jan 22 21:44:07 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration ...
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# esphome documentation build configuration file, created by\n# sphinx-quickstart on Mon Jan 22 21:44:07 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration ...
diff --git a/Doxygen b/Doxygen index 5d6b6d9846..31fa5d55d9 100644 --- a/Doxygen +++ b/Doxygen @@ -38,7 +38,7 @@ PROJECT_NAME = "ESPHome" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.17.1 +PROJECT_NUMBER = 1.17....
microsoft__nni-5155
Unclear what extras to install: `import nni.retiarii.execution.api` fails due to missing `pytorch_lightning` **Describe the issue**: I want to use `nni.retiarii.execution.api` module. I've installed it as below: ``` Collecting nni>=2.3 Downloading nni-2.9-py3-none-manylinux1_x86_64.whl (56.0 MB) ``` **Environ...
[ { "content": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nfrom .lightning import *\n", "path": "nni/nas/evaluator/pytorch/__init__.py" } ]
[ { "content": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport warnings\n\ntry:\n from .lightning import *\nexcept ImportError:\n warnings.warn(\"PyTorch-Lightning must be installed to use PyTorch in NAS. \"\n \"If you are not using PyTorch, please `nni....
diff --git a/nni/nas/evaluator/pytorch/__init__.py b/nni/nas/evaluator/pytorch/__init__.py index 1b2a52c886..2a7b5d2a1b 100644 --- a/nni/nas/evaluator/pytorch/__init__.py +++ b/nni/nas/evaluator/pytorch/__init__.py @@ -1,4 +1,11 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT license. -from .ligh...
dotkom__onlineweb4-1524
Hide irrelevant information if not applicable to the event The event dashboard should provide useful information to the administrators of the events, and I think it should refrain from displaying information that's not relevant. For example, all events include a column about "Extras" for the event, even though the eve...
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom collections import OrderedDict\nfrom datetime import datetime, timedelta\nfrom functools import reduce\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import Group\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db impor...
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom collections import OrderedDict\nfrom datetime import datetime, timedelta\nfrom functools import reduce\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import Group\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.db impor...
diff --git a/apps/events/models.py b/apps/events/models.py index feead4710..93f2fed4f 100644 --- a/apps/events/models.py +++ b/apps/events/models.py @@ -375,6 +375,10 @@ def has_reservation(self): except Reservation.DoesNotExist: return False + @property + def has_extras(self): + re...
nipy__nipype-3455
matplotlib "normed" argument deprecated ### Summary When trying to use the nipype.algorithms.metrics.Distance with method='eucl_mean', get the following error `AttributeError: 'Rectangle' object has no property 'normed'` My two input volumes are z-stat map outputs from fitlins of the same individual (both are in s...
[ { "content": "# -*- coding: utf-8 -*-\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"\nImage assessment algorithms. Typical overlap and error computation\nmeasures to evaluate results from other processing units.\n\"\"\"\nimport os\nimp...
[ { "content": "# -*- coding: utf-8 -*-\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"\nImage assessment algorithms. Typical overlap and error computation\nmeasures to evaluate results from other processing units.\n\"\"\"\nimport os\nimp...
diff --git a/nipype/algorithms/metrics.py b/nipype/algorithms/metrics.py index fc209a9d27..b58e7fc59b 100644 --- a/nipype/algorithms/metrics.py +++ b/nipype/algorithms/metrics.py @@ -150,7 +150,7 @@ def _eucl_mean(self, nii1, nii2, weighted=False): import matplotlib.pyplot as plt plt.figure() - ...
privacyidea__privacyidea-3786
%' is not properly decoded by the Privacyidea server Using credential provider 3.4.0 Using Privacyidea 3.8 or 3.9 Ticket 3554 When there is a % in the password of the user, Authentication failed. If the % is at the beginning or the end of the password, the authentication is successful. The issue on the side of...
[ { "content": "# -*- coding: utf-8 -*-\n# privacyIDEA is a fork of LinOTP\n# May 08, 2014 Cornelius Kölbel\n# License: AGPLv3\n# contact: http://www.privacyidea.org\n#\n# Copyright (C) 2010 - 2014 LSE Leading Security Experts GmbH\n# License: AGPLv3\n# contact: http://www.linotp.org\n# http...
[ { "content": "# -*- coding: utf-8 -*-\n# privacyIDEA is a fork of LinOTP\n# May 08, 2014 Cornelius Kölbel\n# License: AGPLv3\n# contact: http://www.privacyidea.org\n#\n# Copyright (C) 2010 - 2014 LSE Leading Security Experts GmbH\n# License: AGPLv3\n# contact: http://www.linotp.org\n# http...
diff --git a/privacyidea/api/lib/utils.py b/privacyidea/api/lib/utils.py index e11d45ad02..4043c81909 100644 --- a/privacyidea/api/lib/utils.py +++ b/privacyidea/api/lib/utils.py @@ -51,7 +51,8 @@ # TODO: we should probably switch this when we do not do the extra unquote anymore NO_UNQUOTE_USER_AGENTS = { 'priva...
dynaconf__dynaconf-953
[bug] reload() function does not clear old hooks **Describe the bug** the `reload()` function of the `LazySettings` class does not clear the `_loaded_hooks` attribute. Because of that, when trying to reload and rerun the loaders, the hook won't run again. **To Reproduce** Steps to reproduce the behavior: Config...
[ { "content": "from __future__ import annotations\n\nimport copy\nimport glob\nimport importlib\nimport inspect\nimport os\nimport warnings\nfrom collections import defaultdict\nfrom contextlib import contextmanager\nfrom contextlib import suppress\nfrom pathlib import Path\nfrom typing import Any\nfrom typing i...
[ { "content": "from __future__ import annotations\n\nimport copy\nimport glob\nimport importlib\nimport inspect\nimport os\nimport warnings\nfrom collections import defaultdict\nfrom contextlib import contextmanager\nfrom contextlib import suppress\nfrom pathlib import Path\nfrom typing import Any\nfrom typing i...
diff --git a/dynaconf/base.py b/dynaconf/base.py index 355760a9d..39cffe9ad 100644 --- a/dynaconf/base.py +++ b/dynaconf/base.py @@ -1124,6 +1124,7 @@ def loaders(self): # pragma: no cover def reload(self, env=None, silent=None): # pragma: no cover """Clean end Execute all loaders""" self.clean...
pytorch__rl-1910
[BUG] I had to patch these 2 methods in order to run my script ## Describe the bug (1) `DoubleToFloat` transform cannot transform to `float` if env to be transformed is already a `float` (e.g. it is a `float` and the input dtype was declared as `double`). I mean, all it has to do is call `.to(torch.float)` or s...
[ { "content": "# Copyright (c) Meta Platforms, Inc. and 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\nimport functools\nimport re\nimport warnings\nfrom enum import Enum\nfrom typing import Iterable, Optional, Union...
[ { "content": "# Copyright (c) Meta Platforms, Inc. and 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\nimport functools\nimport re\nimport warnings\nfrom enum import Enum\nfrom typing import Iterable, Optional, Union...
diff --git a/torchrl/objectives/utils.py b/torchrl/objectives/utils.py index b234af6a804..9afbf8095f0 100644 --- a/torchrl/objectives/utils.py +++ b/torchrl/objectives/utils.py @@ -459,7 +459,7 @@ def _cache_values(fun): def new_fun(self, netname=None): __dict__ = self.__dict__ - _cache = __dict_...
techmatters__terraso-backend-81
Add photo field to the User model ## Description The user profile photo might be automatically fetched from the third-party account system (Google or Apple), or it can also be uploaded from by the user. Since the file itself might be stored on an external storage service, this field will be used to store the location ...
[ { "content": "import graphene\nfrom graphene import relay\nfrom graphene_django import DjangoObjectType\n\nfrom apps.core.models import User\n\nfrom .commons import BaseDeleteMutation\n\n\nclass UserNode(DjangoObjectType):\n id = graphene.ID(source=\"pk\", required=True)\n\n class Meta:\n model = U...
[ { "content": "import graphene\nfrom graphene import relay\nfrom graphene_django import DjangoObjectType\n\nfrom apps.core.models import User\n\nfrom .commons import BaseDeleteMutation\n\n\nclass UserNode(DjangoObjectType):\n id = graphene.ID(source=\"pk\", required=True)\n\n class Meta:\n model = U...
diff --git a/terraso_backend/apps/graphql/schema/users.py b/terraso_backend/apps/graphql/schema/users.py index f8c8c8b88..9018ff1bf 100644 --- a/terraso_backend/apps/graphql/schema/users.py +++ b/terraso_backend/apps/graphql/schema/users.py @@ -17,7 +17,7 @@ class Meta: "first_name": ["icontains"], ...
cowrie__cowrie-920
output_localsyslog exceptions.KeyError: 'isError' After pulling the most recent version of cowrie to some of my honeypots, I get this error when a new connection I enabled [output_localsyslog] with configuration below: ``` [output_localsyslog] enabled = true facility = LOCAL5 format = text ``` The log error show...
[ { "content": "# Copyright (c) 2015 Michel Oosterhof <michel@oosterhof.net>\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the ab...
[ { "content": "# Copyright (c) 2015 Michel Oosterhof <michel@oosterhof.net>\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the ab...
diff --git a/src/cowrie/output/localsyslog.py b/src/cowrie/output/localsyslog.py index 751e8d835c..1156a82d30 100644 --- a/src/cowrie/output/localsyslog.py +++ b/src/cowrie/output/localsyslog.py @@ -53,6 +53,9 @@ def stop(self): pass def write(self, logentry): + if 'isError' not in logentry: + ...
scikit-image__scikit-image-6343
imageIO warnings due to v2 -> v3 migration ## Description As of imageIO 2.16.0 (Feb22) there are now a v2 and v3 namespaces in addition to the top-level namespace. As of 2.16.2 (released Apr22) directly using the top-level namespace results in warnings to either explicitly opt-into the v3 API or opt-out and import ...
[ { "content": "__all__ = ['imread', 'imsave']\n\nfrom functools import wraps\nimport numpy as np\nfrom imageio import imread as imageio_imread, imsave\n\n\n@wraps(imageio_imread)\ndef imread(*args, **kwargs):\n return np.asarray(imageio_imread(*args, **kwargs))\n", "path": "skimage/io/_plugins/imageio_plu...
[ { "content": "__all__ = ['imread', 'imsave']\n\nfrom functools import wraps\nimport numpy as np\n\ntry:\n # Try using the v2 API directly to avoid a warning from imageio >= 2.16.2\n from imageio.v2 import imread as imageio_imread, imsave\nexcept ImportError:\n from imageio import imread as imageio_imre...
diff --git a/skimage/io/_plugins/imageio_plugin.py b/skimage/io/_plugins/imageio_plugin.py index c8831e785eb..567d45dd78c 100644 --- a/skimage/io/_plugins/imageio_plugin.py +++ b/skimage/io/_plugins/imageio_plugin.py @@ -2,7 +2,12 @@ from functools import wraps import numpy as np -from imageio import imread as imag...
litestar-org__litestar-2681
Docs: Build errors ### Summary ``` /home/peter/PycharmProjects/litestar/litestar/plugins/base.py:docstring of litestar.plugins.base.InitPluginProtocol.on_app_init:5: ERROR: Error in "code-block" directive: maximum 1 argument(s) allowed, 14 supplied. .. code-block:: python from litestar import Litestar, get ...
[ { "content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any, Iterator, Protocol, TypeVar, Union, cast, runtime_checkable\n\nif TYPE_CHECKING:\n from click import Group\n\n from litestar._openapi.schema_generation import SchemaCreator\n from litestar.config.app import AppCo...
[ { "content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any, Iterator, Protocol, TypeVar, Union, cast, runtime_checkable\n\nif TYPE_CHECKING:\n from click import Group\n\n from litestar._openapi.schema_generation import SchemaCreator\n from litestar.config.app import AppCo...
diff --git a/docs/topics/deployment/manually-with-asgi-server.rst b/docs/topics/deployment/manually-with-asgi-server.rst index 11f6b89b24..11f00e21a2 100644 --- a/docs/topics/deployment/manually-with-asgi-server.rst +++ b/docs/topics/deployment/manually-with-asgi-server.rst @@ -1,5 +1,5 @@ Manually with ASGI server -=...
opsdroid__opsdroid-1408
Duplicated shell prompt # Description When I run the hello skill from the shell, I found duplicated shell prompt output. I think there's some issue with the shell connector. ## Steps to Reproduce ``` qidong@ubuntu:~/Documents/opsdroid$ opsdroid start mybot> hello Hello qidong mybot> mybot> ``` ## Exp...
[ { "content": "\"\"\"A connector to send messages using the command line.\"\"\"\nimport logging\nimport os\nimport sys\nimport platform\nimport asyncio\n\nfrom opsdroid.connector import Connector, register_event\nfrom opsdroid.events import Message\n\n_LOGGER = logging.getLogger(__name__)\nCONFIG_SCHEMA = {\"bot...
[ { "content": "\"\"\"A connector to send messages using the command line.\"\"\"\nimport logging\nimport os\nimport sys\nimport platform\nimport asyncio\n\nfrom opsdroid.connector import Connector, register_event\nfrom opsdroid.events import Message\n\n_LOGGER = logging.getLogger(__name__)\nCONFIG_SCHEMA = {\"bot...
diff --git a/opsdroid/connector/shell/__init__.py b/opsdroid/connector/shell/__init__.py index be6ea62e9..4adfea5a2 100644 --- a/opsdroid/connector/shell/__init__.py +++ b/opsdroid/connector/shell/__init__.py @@ -125,7 +125,6 @@ async def respond(self, message): _LOGGER.debug(_("Responding with: %s."), message...
opsdroid__opsdroid-946
PyPI deployments are failing Looks like PyPI deployments are failing. `v0.15.1` and `v0.15.2` haven't gone out. ``` HTTPError: 400 Client Error: The description failed to render in the default format of reStructuredText. See https://pypi.org/help/#description-content-type for more information. for url: https://uplo...
[ { "content": "#!/usr/bin/env python3\nimport os\nfrom setuptools import setup, find_packages\nfrom setuptools.command.build_py import build_py\nfrom setuptools.command.sdist import sdist\nfrom setuptools.command.develop import develop\nimport versioneer\n\nPACKAGE_NAME = 'opsdroid'\nHERE = os.path.abspath(os.pa...
[ { "content": "#!/usr/bin/env python3\nimport os\nfrom setuptools import setup, find_packages\nfrom setuptools.command.build_py import build_py\nfrom setuptools.command.sdist import sdist\nfrom setuptools.command.develop import develop\nimport versioneer\n\nPACKAGE_NAME = 'opsdroid'\nHERE = os.path.abspath(os.pa...
diff --git a/setup.py b/setup.py index 588670838..f9ed22303 100644 --- a/setup.py +++ b/setup.py @@ -55,6 +55,7 @@ def run(self): author_email='jacob@tom.linson.uk', description='An open source ChatOps bot framework.', long_description=README, + long_description_content_type='text/markdown', pack...
netbox-community__netbox-14935
Typo in DataSourceBulkEditForm ### Deployment Type Self-hosted ### NetBox Version v3.7.1 ### Python Version 3.8 ### Steps to Reproduce "lavel" is defined as "Enforce unique space", but I think the correct definition is "Enabled". https://github.com/netbox-community/netbox/blob/487f1ccfde26ef3c1f8a28089826acc0...
[ { "content": "from django import forms\nfrom django.utils.translation import gettext_lazy as _\n\nfrom core.models import *\nfrom netbox.forms import NetBoxModelBulkEditForm\nfrom netbox.utils import get_data_backend_choices\nfrom utilities.forms.fields import CommentField\nfrom utilities.forms.widgets import B...
[ { "content": "from django import forms\nfrom django.utils.translation import gettext_lazy as _\n\nfrom core.models import *\nfrom netbox.forms import NetBoxModelBulkEditForm\nfrom netbox.utils import get_data_backend_choices\nfrom utilities.forms.fields import CommentField\nfrom utilities.forms.widgets import B...
diff --git a/netbox/core/forms/bulk_edit.py b/netbox/core/forms/bulk_edit.py index dcc92c6f07c..bc2ef8fc92e 100644 --- a/netbox/core/forms/bulk_edit.py +++ b/netbox/core/forms/bulk_edit.py @@ -21,7 +21,7 @@ class DataSourceBulkEditForm(NetBoxModelBulkEditForm): enabled = forms.NullBooleanField( required=F...