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
carpentries__amy-646
API: don't return todos with unknown start This breaks the timeline.
[ { "content": "import datetime\n\nfrom django.db.models import Q\nfrom rest_framework.generics import ListAPIView\nfrom rest_framework.metadata import SimpleMetadata\nfrom rest_framework.permissions import (\n IsAuthenticatedOrReadOnly, IsAuthenticated\n)\nfrom rest_framework.response import Response\nfrom re...
[ { "content": "import datetime\n\nfrom django.db.models import Q\nfrom rest_framework.generics import ListAPIView\nfrom rest_framework.metadata import SimpleMetadata\nfrom rest_framework.permissions import (\n IsAuthenticatedOrReadOnly, IsAuthenticated\n)\nfrom rest_framework.response import Response\nfrom re...
diff --git a/api/views.py b/api/views.py index e6af64729..354956bcc 100644 --- a/api/views.py +++ b/api/views.py @@ -162,4 +162,5 @@ def get_queryset(self): """Return current TODOs for currently logged in user.""" return TodoItem.objects.user(self.request.user) \ .incom...
jazzband__django-simple-history-862
test_sameinstant is not idempotent **Describe the bug** Two records with the same history_date cannot be retrieved idempotently with `latest()`. The `get_latest_by` meta property uses `history_date` which means if multiple records have the same timestamp, the resulting record returned by the database is not predict...
[ { "content": "import copy\nimport importlib\nimport uuid\nimport warnings\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.contrib.auth import get_user_model\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db import models\nfrom...
[ { "content": "import copy\nimport importlib\nimport uuid\nimport warnings\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.contrib import admin\nfrom django.contrib.auth import get_user_model\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.db import models\nfrom...
diff --git a/CHANGES.rst b/CHANGES.rst index c552896b1..3335e2df6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,7 @@ Unreleased - Fixed bug where serializer of djangorestframework crashed if used with ``OrderingFilter`` (gh-821) - Fixed `make format` so it works by using tox (gh-859) +- Fixed bug where late...
canonical__microk8s-3480
Error: open servers store: open /var/snap/microk8s/3699/var/kubernetes/backend/cluster.yaml: permission denied #### Summary Periodically, on checking a newly configured and restarted Microk8s, an permission denied error is printed. Microk8s appears to be fully functional, so I do not know the impact of this error. ...
[ { "content": "import getpass\nimport json\nimport os\nimport platform\nimport subprocess\nimport sys\nimport time\nfrom pathlib import Path\n\nimport click\nimport yaml\n\nKUBECTL = os.path.expandvars(\"$SNAP/microk8s-kubectl.wrapper\")\n\n\ndef get_current_arch():\n # architecture mapping\n arch_mapping ...
[ { "content": "import getpass\nimport json\nimport os\nimport platform\nimport subprocess\nimport sys\nimport time\nfrom pathlib import Path\n\nimport click\nimport yaml\n\nKUBECTL = os.path.expandvars(\"$SNAP/microk8s-kubectl.wrapper\")\n\n\ndef get_current_arch():\n # architecture mapping\n arch_mapping ...
diff --git a/scripts/wrappers/common/utils.py b/scripts/wrappers/common/utils.py index 2e3d0bd7ab..e3daf16d79 100644 --- a/scripts/wrappers/common/utils.py +++ b/scripts/wrappers/common/utils.py @@ -87,6 +87,7 @@ def get_dqlite_info(): snappath=snap_path, dbdir=cluster_dir ...
archlinux__archinstall-1674
archinstall won't start due to TypeError # Error When I execute `archinstall` I get the following error: ``` ... File "/usr/lib/python3.10/site-packages/archinstall/lib/packages/packages.py", line 115, in installed_package return LocalPackage(**package_info) TypeError: LocalPackage.__init__() got an unexpecte...
[ { "content": "import json\nimport ssl\nfrom typing import Dict, Any, Tuple, List\nfrom urllib.error import HTTPError\nfrom urllib.parse import urlencode\nfrom urllib.request import urlopen\n\nfrom ..exceptions import PackageError, SysCallError\nfrom ..models.dataclasses import PackageSearch, PackageSearchResult...
[ { "content": "import dataclasses\nimport json\nimport ssl\nfrom typing import Dict, Any, Tuple, List\nfrom urllib.error import HTTPError\nfrom urllib.parse import urlencode\nfrom urllib.request import urlopen\n\nfrom ..exceptions import PackageError, SysCallError\nfrom ..models.dataclasses import PackageSearch,...
diff --git a/archinstall/lib/packages/packages.py b/archinstall/lib/packages/packages.py index d5834f43ad..0743e83b97 100644 --- a/archinstall/lib/packages/packages.py +++ b/archinstall/lib/packages/packages.py @@ -1,3 +1,4 @@ +import dataclasses import json import ssl from typing import Dict, Any, Tuple, List @@ -1...
buildbot__buildbot-5041
Custom templates still not working Hi, this is the original issue with broken custom templates #4980 But it doesn't work even after the fix (2.4.1). The web part of Buildbot is far to complicated for me. But I was able to find lines like this in scripts.js?_1568233606304 ``` , function(e, t) { e.expo...
[ { "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/test/unit/test_www_config.py b/master/buildbot/test/unit/test_www_config.py index d198a5a1e9f7..e4f2d22a248c 100644 --- a/master/buildbot/test/unit/test_www_config.py +++ b/master/buildbot/test/unit/test_www_config.py @@ -78,14 +78,14 @@ def test_render(self): self.assertEqual(res,...
microsoft__hi-ml-65
Add all items required for making the repository public Ensure that all files have copyright notices, and that editors are set up to automatically insert them (PyCharm does it correctly on InnerEye) You must run the following source code analysis tools: CredScan CodeQL (Semmle) Component Governance Detection The...
[ { "content": "import logging\nfrom pathlib import Path\nfrom typing import List, Optional, Union\n\nfrom azureml.core import Dataset, Datastore, Workspace\nfrom azureml.data import FileDataset, OutputFileDatasetConfig\nfrom azureml.data.dataset_consumption_config import DatasetConsumptionConfig\n\n\ndef get_dat...
[ { "content": "# ------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.\n# ------------------------------------------...
diff --git a/.gitignore b/.gitignore index 532f7cd9b..4bb8969cf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ outputs/ config.json* most_recent_run.txt +latest_version.txt # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/.vscode/settings.json b/.vscode/settings.json index 70ee312da..f...
sunpy__sunpy-2911
Test failure due to 360 degrees not being recognized as having the same meaning as zero degrees. <!-- 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 sur...
[ { "content": "import csv\nimport copy\nimport urllib\nimport os.path\nimport sqlite3\nimport datetime\nfrom warnings import warn\n\nimport numpy as np\nimport pandas\n\nfrom astropy.io import fits\nfrom astropy.time import Time\n\nfrom sunpy.time import parse_time\nfrom sunpy.util.net import check_download_file...
[ { "content": "import csv\nimport copy\nimport urllib\nimport os.path\nimport sqlite3\nimport datetime\nfrom warnings import warn\n\nimport numpy as np\nimport pandas\n\nfrom astropy.io import fits\nfrom astropy.time import Time\n\nfrom sunpy.time import parse_time\nfrom sunpy.util.net import check_download_file...
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 06f0f68580f..307e9c6a857 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,4 +27,4 @@ jobs: parameters: name: Linux_37_online os: linux - tox: py37-online -- -n=8 + tox: py37-online -- -n=6 diff --git a/sunpy/coordinates/tes...
AUTOMATIC1111__stable-diffusion-webui-10041
[Feature Request]: img2img batch should ignore non-image files ### Is there an existing issue for this? - [X] I have searched the existing issues and checked the recent builds/commits ### What would your feature do ? I may place some parameter files along the image files in the same folder. Currently an exception i...
[ { "content": "import math\r\nimport os\r\nimport sys\r\nimport traceback\r\n\r\nimport numpy as np\r\nfrom PIL import Image, ImageOps, ImageFilter, ImageEnhance, ImageChops, UnidentifiedImageError\r\n\r\nfrom modules import devices, sd_samplers\r\nfrom modules.generation_parameters_copypaste import create_overr...
[ { "content": "import math\r\nimport os\r\nimport sys\r\nimport traceback\r\n\r\nimport numpy as np\r\nfrom PIL import Image, ImageOps, ImageFilter, ImageEnhance, ImageChops, UnidentifiedImageError\r\n\r\nfrom modules import devices, sd_samplers\r\nfrom modules.generation_parameters_copypaste import create_overr...
diff --git a/modules/img2img.py b/modules/img2img.py index 56c846d62ec..9fc3a698e88 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -48,7 +48,8 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): try: img = Image.open(image) - except UnidentifiedImageErr...
pallets__werkzeug-2207
Debugger cookie must not use SameSite=None The debugger sets a cookie to store the pin. #1913 added `SameSite=None`. However, browsers are now warning that that is invalid without the `Secure` flag, which is only valid for HTTPS. 1. Trigger the debugger. 2. Open the browser dev tools. 3. Click the console icon in ...
[ { "content": "import getpass\nimport hashlib\nimport json\nimport mimetypes\nimport os\nimport pkgutil\nimport re\nimport sys\nimport time\nimport typing as t\nimport uuid\nfrom itertools import chain\nfrom os.path import basename\nfrom os.path import join\n\nfrom .._internal import _log\nfrom ..http import par...
[ { "content": "import getpass\nimport hashlib\nimport json\nimport mimetypes\nimport os\nimport pkgutil\nimport re\nimport sys\nimport time\nimport typing as t\nimport uuid\nfrom itertools import chain\nfrom os.path import basename\nfrom os.path import join\n\nfrom .._internal import _log\nfrom ..http import par...
diff --git a/CHANGES.rst b/CHANGES.rst index ac3c856c3..b3d5639dd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -25,6 +25,9 @@ Unreleased ``rules`` parameter. :issue:`2183` - Add missing type annotation for ``FileStorage.__getattr__`` :issue:`2155` +- The debugger pin cookie is set with ``SameSite`` set ...
sunpy__sunpy-3593
Database search() method missing returns documentation See https://docs.sunpy.org/en/latest/api/sunpy.database.Database.html#sunpy.database.Database.search - the return type of `search()` is currently not documented.
[ { "content": "# Author: Simon Liedtke <liedtke.simon@googlemail.com>\n#\n# This module was developed with funding provided by\n# the Google Summer of Code (2013).\n\nimport itertools\nimport operator\nfrom datetime import datetime\nfrom contextlib import contextmanager\nimport os.path\n\nfrom sqlalchemy import ...
[ { "content": "# Author: Simon Liedtke <liedtke.simon@googlemail.com>\n#\n# This module was developed with funding provided by\n# the Google Summer of Code (2013).\n\nimport itertools\nimport operator\nfrom datetime import datetime\nfrom contextlib import contextmanager\nimport os.path\n\nfrom sqlalchemy import ...
diff --git a/changelog/3593.doc.rst b/changelog/3593.doc.rst new file mode 100644 index 00000000000..096f457435d --- /dev/null +++ b/changelog/3593.doc.rst @@ -0,0 +1 @@ +Fixed documentation of `sunpy.database.Database.search` by adding ``Returns`` docstring. \ No newline at end of file diff --git a/sunpy/database/data...
DataDog__dd-trace-py-4935
Instrumenting ambiguity: Integrate with SQLAlchemy or not when underlying psycopg2 used <!-- Thanks for taking the time for reporting an issue! Before reporting an issue on dd-trace-py, please be sure to provide all necessary information. If you're hitting a bug, make sure that you're using the latest version o...
[ { "content": "\"\"\"\nTo trace sqlalchemy queries, add instrumentation to the engine class\nusing the patch method that **must be called before** importing sqlalchemy::\n\n # patch before importing `create_engine`\n from ddtrace import Pin, patch\n patch(sqlalchemy=True)\n\n # use SQLAlchemy as usua...
[ { "content": "\"\"\"\nEnabling the SQLAlchemy integration is only necessary if there is no\ninstrumentation available or enabled for the underlying database engine (e.g.\npymysql, psycopg, mysql-connector, etc.).\n\nTo trace sqlalchemy queries, add instrumentation to the engine class\nusing the patch method tha...
diff --git a/ddtrace/contrib/sqlalchemy/__init__.py b/ddtrace/contrib/sqlalchemy/__init__.py index 5a0a63f84a9..1083959c1d2 100644 --- a/ddtrace/contrib/sqlalchemy/__init__.py +++ b/ddtrace/contrib/sqlalchemy/__init__.py @@ -1,4 +1,8 @@ """ +Enabling the SQLAlchemy integration is only necessary if there is no +instrum...
esphome__esphome-docs-919
Fix documentation typo on Sensirion SPS30 ## Description: Fix documentation typo on Sensirion SPS30
[ { "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 1ba35f94e6..ae4d371398 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.16.0-dev +PROJECT_NUMBER = 1...
saulpw__visidata-1338
Fix documentation on website Not sure if this belongs here, but I believe to have found a small issue on the website. Paragraph # 7 in [10 Ways to Use VisiData](https://www.visidata.org/blog/2020/ten/) says you should use `visidata.view_pandas(df)` to view a dataframe in pandas. I believe that should be `visidata...
[ { "content": "from functools import wraps\nfrom unittest import mock\nimport curses\n\nimport visidata\n\n__all__ = ['ENTER', 'ALT', 'ESC', 'asyncthread', 'VisiData']\n\n\nENTER='Enter'\nALT=ESC='^['\n\n\n# define @asyncthread for potentially long-running functions\n# when function is called, instead launches...
[ { "content": "from functools import wraps\nfrom unittest import mock\nimport curses\n\nimport visidata\n\n__all__ = ['ENTER', 'ALT', 'ESC', 'asyncthread', 'VisiData']\n\n\nENTER='Enter'\nALT=ESC='^['\n\n\n# define @asyncthread for potentially long-running functions\n# when function is called, instead launches...
diff --git a/visidata/vdobj.py b/visidata/vdobj.py index 1d131d5a7..c8eddb869 100644 --- a/visidata/vdobj.py +++ b/visidata/vdobj.py @@ -32,6 +32,7 @@ def global_api(cls, func): 'Make global func() and identical vd.func()' def _vdfunc(*args, **kwargs): return func(visidata.vd, *args, **kw...
canonical__microk8s-2918
microk8s.status shows "...var/kubernetes/backend/cluster.yaml: permission denied" error Hello, I installed microk8s and saw a temporary error in `microk8s.status`. These are the logs: ```shell $ sudo snap install microk8s --classic [sudo] password for davigar15: microk8s (1.23/stable) v1.23.3 from Canonica...
[ { "content": "import getpass\nimport json\nimport os\nimport platform\nimport subprocess\nimport sys\nimport time\nfrom pathlib import Path\n\nimport click\nimport yaml\n\nkubeconfig = \"--kubeconfig=\" + os.path.expandvars(\"${SNAP_DATA}/credentials/client.config\")\n\n\ndef get_current_arch():\n # architec...
[ { "content": "import getpass\nimport json\nimport os\nimport platform\nimport subprocess\nimport sys\nimport time\nfrom pathlib import Path\n\nimport click\nimport yaml\n\nkubeconfig = \"--kubeconfig=\" + os.path.expandvars(\"${SNAP_DATA}/credentials/client.config\")\n\n\ndef get_current_arch():\n # architec...
diff --git a/scripts/wrappers/common/utils.py b/scripts/wrappers/common/utils.py index 2cb0f3ff59..3432f43ffa 100644 --- a/scripts/wrappers/common/utils.py +++ b/scripts/wrappers/common/utils.py @@ -94,6 +94,7 @@ def get_dqlite_info(): snappath=snap_path, dbdir=cluster_dir ...
weecology__retriever-1116
Unable to install nla into mysql retriever throw an error when installing nla dataset into mysql ``` $ retriever install mysql nla => Installing nla Creating database nla... Inserting data from nla2007_basin_landuse_metrics_20061022.csv... Installing nla.basin_landuse_metrics_2007: 100%|████████████████████████...
[ { "content": "from future import standard_library\n\nstandard_library.install_aliases()\n\nimport csv\nimport io\nimport sys\nfrom functools import reduce\n\nfrom retriever.lib.cleanup import *\n\n\nclass Dataset(object):\n \"\"\"Dataset generic properties\"\"\"\n\n def __init__(self, name=None, url=None)...
[ { "content": "from future import standard_library\n\nstandard_library.install_aliases()\n\nimport csv\nimport io\nimport sys\nfrom functools import reduce\n\nfrom retriever.lib.cleanup import *\n\n\nclass Dataset(object):\n \"\"\"Dataset generic properties\"\"\"\n\n def __init__(self, name=None, url=None)...
diff --git a/retriever/lib/table.py b/retriever/lib/table.py index 2eabdc5c3..3ca1bfecc 100644 --- a/retriever/lib/table.py +++ b/retriever/lib/table.py @@ -165,7 +165,8 @@ def clean_column_name(self, column_name): "table": "tables", "update": "updates", "date": "record_date", - ...
fossasia__open-event-server-890
Show return model of sponsor types list in Swagger spec Currently no return model (or schema) is shown for the GET API to get sponsor types used in a Event ![sponsor_type_old](https://cloud.githubusercontent.com/assets/4047597/16110108/be118070-33c9-11e6-8532-ce104c5a57d3.png)
[ { "content": "from flask.ext.restplus import Resource, Namespace\n\nfrom open_event.models.sponsor import Sponsor as SponsorModel\n\nfrom .helpers.helpers import get_paginated_list, requires_auth, get_object_in_event\nfrom .helpers.utils import PAGINATED_MODEL, PaginatedResourceBase, ServiceDAO, \\\n PAGE_PA...
[ { "content": "from flask.ext.restplus import Resource, Namespace\n\nfrom open_event.models.sponsor import Sponsor as SponsorModel\n\nfrom .helpers.helpers import get_paginated_list, requires_auth, get_object_in_event\nfrom .helpers.utils import PAGINATED_MODEL, PaginatedResourceBase, ServiceDAO, \\\n PAGE_PA...
diff --git a/open_event/api/sponsors.py b/open_event/api/sponsors.py index 0aabe8b53c..2b65ed3d32 100644 --- a/open_event/api/sponsors.py +++ b/open_event/api/sponsors.py @@ -88,7 +88,7 @@ def post(self, event_id): @api.route('/events/<int:event_id>/sponsors/types') class SponsorTypesList(Resource): - @api.doc('...
python-telegram-bot__python-telegram-bot-379
Execfile does not exist in py3k <!-- Thanks for reporting issues of python-telegram-bot! To make it easier for us to help you please enter detailed information below. Please note, we only support the latest version of python-telegram-bot and master branch. Please make sure to upgrade & recreate the issue on the latest...
[ { "content": "#!/usr/bin/env python\n\"\"\"The setup and build script for the python-telegram-bot library.\"\"\"\n\nimport codecs\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef requirements():\n \"\"\"Build the requirements list for this project\"\"\"\n requirements_list = []\n\n with...
[ { "content": "#!/usr/bin/env python\n\"\"\"The setup and build script for the python-telegram-bot library.\"\"\"\n\nimport codecs\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef requirements():\n \"\"\"Build the requirements list for this project\"\"\"\n requirements_list = []\n\n with...
diff --git a/setup.py b/setup.py index 3b114c51d88..39a19f992c0 100644 --- a/setup.py +++ b/setup.py @@ -16,8 +16,12 @@ def requirements(): return requirements_list + with codecs.open('README.rst', 'r', 'utf-8') as fd: - execfile(os.path.join('telegram', 'version.py')) + fn = os.path.join('telegram', 'v...
geopandas__geopandas-605
Very slow when writing to GPKG Here's my test suite for a proof: https://github.com/culebron/geodata Run `python3.6 few.py` and `python3.6 multiple.py` to compare. `few.py` opens a file with a lot of data, but only 2.7K records as GeoDataFrame. It writes them into GeoJSON and GPKG. In this case, GPKG driver outpe...
[ { "content": "import os\n\nimport fiona\nimport numpy as np\nimport six\n\nfrom geopandas import GeoDataFrame\n\n# Adapted from pandas.io.common\nif six.PY3:\n from urllib.request import urlopen as _urlopen\n from urllib.parse import urlparse as parse_url\n from urllib.parse import uses_relative, uses_...
[ { "content": "import os\n\nimport fiona\nimport numpy as np\nimport six\n\nfrom geopandas import GeoDataFrame\n\n# Adapted from pandas.io.common\nif six.PY3:\n from urllib.request import urlopen as _urlopen\n from urllib.parse import urlparse as parse_url\n from urllib.parse import uses_relative, uses_...
diff --git a/geopandas/io/file.py b/geopandas/io/file.py index 495d396319..3981de6833 100644 --- a/geopandas/io/file.py +++ b/geopandas/io/file.py @@ -104,8 +104,7 @@ def to_file(df, filename, driver="ESRI Shapefile", schema=None, with fiona.drivers(): with fiona.open(filename, 'w', driver=driver, crs=df....
aio-libs__aiohttp-3125
Every request object is equal It seems the `==` operator evals to `True` for every request object. ```python from aiohttp.test_utils import make_mocked_request def test_path_equals(): req = make_mocked_request('GET', '/a/') req2 = make_mocked_request('GET', '/b/') assert req.path != req2.path ...
[ { "content": "import asyncio\nimport collections\nimport datetime\nimport io\nimport re\nimport socket\nimport string\nimport tempfile\nimport types\nimport warnings\nfrom email.utils import parsedate\nfrom http.cookies import SimpleCookie\nfrom types import MappingProxyType\nfrom typing import Any, Dict, Mappi...
[ { "content": "import asyncio\nimport collections\nimport datetime\nimport io\nimport re\nimport socket\nimport string\nimport tempfile\nimport types\nimport warnings\nfrom email.utils import parsedate\nfrom http.cookies import SimpleCookie\nfrom types import MappingProxyType\nfrom typing import Any, Dict, Mappi...
diff --git a/CHANGES/3116.bugfix b/CHANGES/3116.bugfix new file mode 100644 index 00000000000..16b94e9f759 --- /dev/null +++ b/CHANGES/3116.bugfix @@ -0,0 +1 @@ +Fix server request objects comparison \ No newline at end of file diff --git a/aiohttp/web_request.py b/aiohttp/web_request.py index a2ef46cfa73..6c1b7c43895 ...
gammapy__gammapy-3381
FoVBackgroundMaker parameter error not accessible After the running the `FoVBackgroundMaker`, the error on the fitted parameters is not accessible. **To reproduce** Try `print(dataset.background_model.spectral_model.norm.error)` inside the `Data Reduction Loop` in `analysis_2` notebook. It is always `0` **Reason...
[ { "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"FoV background estimation.\"\"\"\nimport logging\nimport numpy as np\nfrom gammapy.maps import Map\nfrom gammapy.modeling import Fit\nfrom gammapy.modeling.models import FoVBackgroundModel, Model\nfrom ..core import Maker\n\n\n...
[ { "content": "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"FoV background estimation.\"\"\"\nimport logging\nimport numpy as np\nfrom gammapy.maps import Map\nfrom gammapy.modeling import Fit\nfrom gammapy.modeling.models import FoVBackgroundModel, Model\nfrom ..core import Maker\n\n\n...
diff --git a/gammapy/makers/background/fov.py b/gammapy/makers/background/fov.py index bb5dc089ff..49a06628de 100644 --- a/gammapy/makers/background/fov.py +++ b/gammapy/makers/background/fov.py @@ -170,7 +170,7 @@ def make_background_fit(dataset): """ # freeze all model components not related to back...
getsentry__sentry-9661
CSP-Report causes Cross-Origin Read Blocking (CORB) Hi folks, we are using a Sentry v9.0.0. on premise. As with the newly released Chrome 68 we are facing some minor issue that the response of the CSP-Reports includes the HTTP-Header `Content-Type: text/html`. ``` HTTP/1.1 201 CREATED Content-Length: 0 X-XSS-P...
[ { "content": "from __future__ import absolute_import, print_function\n\nimport base64\nimport math\n\nimport jsonschema\nimport logging\nimport os\nimport six\nimport traceback\nimport uuid\n\nfrom time import time\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import AnonymousUser\nfrom d...
[ { "content": "from __future__ import absolute_import, print_function\n\nimport base64\nimport math\n\nimport jsonschema\nimport logging\nimport os\nimport six\nimport traceback\nimport uuid\n\nfrom time import time\n\nfrom django.conf import settings\nfrom django.contrib.auth.models import AnonymousUser\nfrom d...
diff --git a/src/sentry/web/api.py b/src/sentry/web/api.py index 280f1187b4c06e..b740c1f393a977 100644 --- a/src/sentry/web/api.py +++ b/src/sentry/web/api.py @@ -746,7 +746,7 @@ def post(self, request, project, helper, **kwargs): ) if isinstance(response_or_event_id, HttpResponse): retur...
bokeh__bokeh-5427
embed/animated fails with "did not find model" `Error rendering Bokeh items Error: Did not find model ID_HERE in session`.
[ { "content": "\"\"\" To view this example, first start a Bokeh server:\n\n bokeh serve --allow-websocket-origin=localhost:8000\n\nAnd then load the example into the Bokeh server by\nrunning the script:\n\n python animated.py\n\nin this directory. Finally, start a simple web server\nby running:\n\n pyth...
[ { "content": "\"\"\" To view this example, first start a Bokeh server:\n\n bokeh serve --allow-websocket-origin=localhost:8000\n\nAnd then load the example into the Bokeh server by\nrunning the script:\n\n python animated.py\n\nin this directory. Finally, start a simple web server\nby running:\n\n pyth...
diff --git a/examples/embed/animated.py b/examples/embed/animated.py index 6946c44dabb..b17cdf7882d 100644 --- a/examples/embed/animated.py +++ b/examples/embed/animated.py @@ -45,6 +45,9 @@ r = p.annular_wedge(0, 0, rmin, rmax, theta[:-1], theta[1:], fill_color=colors, line_color="white") +# ad...
sql-machine-learning__elasticdl-773
Hide TensorBoard service REST call logs Currently these logs appear on master pod's log which is not necessary at user level: ``` I0624 15:50:54.834580 140272641951488 _internal.py:122] ::ffff:10.138.0.35 - - [24/Jun/2019 15:50:54] "GET /data/plugin/scalars/tags HTTP/1.1" 200 - W0624 15:50:55.150964 140556554397440 ...
[ { "content": "import datetime\nimport subprocess\nimport time\n\nimport tensorflow as tf\n\nimport numpy as np\n\n\nclass TensorboardService(object):\n \"\"\"Tensorboard Service implementation\"\"\"\n\n def __init__(self, tensorboard_log_dir):\n \"\"\"\n Arguments:\n tensorboard_l...
[ { "content": "import datetime\nimport subprocess\nimport time\n\nimport tensorflow as tf\n\nimport numpy as np\n\n\nclass TensorboardService(object):\n \"\"\"Tensorboard Service implementation\"\"\"\n\n def __init__(self, tensorboard_log_dir):\n \"\"\"\n Arguments:\n tensorboard_l...
diff --git a/elasticdl/python/elasticdl/master/tensorboard_service.py b/elasticdl/python/elasticdl/master/tensorboard_service.py index 560d94619..d4c3e2f99 100644 --- a/elasticdl/python/elasticdl/master/tensorboard_service.py +++ b/elasticdl/python/elasticdl/master/tensorboard_service.py @@ -34,7 +34,10 @@ def write_di...
deepset-ai__haystack-6173
Create a script for 2.0 API Reference docs
[ { "content": "import os\nimport sys\nimport io\nimport dataclasses\nimport typing as t\nimport base64\nimport warnings\nfrom pathlib import Path\n\nimport requests\nimport docspec\nfrom pydoc_markdown.interfaces import Context, Renderer\nfrom pydoc_markdown.contrib.renderers.markdown import MarkdownRenderer\n\n...
[ { "content": "import os\nimport sys\nimport io\nimport dataclasses\nimport typing as t\nimport base64\nimport warnings\nfrom pathlib import Path\n\nimport requests\nimport docspec\nfrom pydoc_markdown.interfaces import Context, Renderer\nfrom pydoc_markdown.contrib.renderers.markdown import MarkdownRenderer\n\n...
diff --git a/.github/utils/pydoc-markdown.sh b/.github/utils/pydoc-markdown.sh index 4322da034e..39bc6dd78e 100755 --- a/.github/utils/pydoc-markdown.sh +++ b/.github/utils/pydoc-markdown.sh @@ -9,3 +9,11 @@ for file in ../config/* ; do echo "Converting $file..." pydoc-markdown "$file" done +# render preview...
crytic__slither-2280
[False Negative]: divide-before-multiply not found when in modifier ### What bug did Slither miss and which detector did you anticipate would catch it? If a divide-before-multiply statement is added inside a modifier, the detector `divide-before-multiply` does not seem to be triggered. ### Frequency Very Frequently ...
[ { "content": "\"\"\"\nModule detecting possible loss of precision due to divide before multiple\n\"\"\"\nfrom collections import defaultdict\nfrom typing import DefaultDict, List, Tuple\n\nfrom slither.core.cfg.node import Node\nfrom slither.core.declarations.contract import Contract\nfrom slither.core.declarat...
[ { "content": "\"\"\"\nModule detecting possible loss of precision due to divide before multiple\n\"\"\"\nfrom collections import defaultdict\nfrom typing import DefaultDict, List, Tuple\n\nfrom slither.core.cfg.node import Node\nfrom slither.core.declarations.contract import Contract\nfrom slither.core.declarat...
diff --git a/slither/detectors/statements/divide_before_multiply.py b/slither/detectors/statements/divide_before_multiply.py index 334da592c0..1f6ccd87e1 100644 --- a/slither/detectors/statements/divide_before_multiply.py +++ b/slither/detectors/statements/divide_before_multiply.py @@ -133,7 +133,7 @@ def detect_divide...
onnx__onnx-3988
Is this concat operation supported by ONNX? # Source PaddlePaddle->onnx->onnx-sim onnx version:11.0 # Describe The input feature graph and the two learned feature graphs are spliced in dimension. # New Operator ![concat](https://user-images.githubusercontent.com/37217594/149057480-b93da9a4-b261-46d9-8ee5-f8b3f03...
[ { "content": "# SPDX-License-Identifier: Apache-2.0\n\nfrom distutils.spawn import find_executable\nfrom distutils import sysconfig, log\nimport setuptools\nimport setuptools.command.build_py\nimport setuptools.command.develop\nimport setuptools.command.build_ext\n\nfrom collections import namedtuple\nfrom cont...
[ { "content": "# SPDX-License-Identifier: Apache-2.0\n\nfrom distutils.spawn import find_executable\nfrom distutils import sysconfig, log\nimport setuptools\nimport setuptools.command.build_py\nimport setuptools.command.develop\nimport setuptools.command.build_ext\n\nfrom collections import namedtuple\nfrom cont...
diff --git a/.azure-pipelines/Linux-CI.yml b/.azure-pipelines/Linux-CI.yml index 17f2e53c3e5..dd200ba3358 100644 --- a/.azure-pipelines/Linux-CI.yml +++ b/.azure-pipelines/Linux-CI.yml @@ -70,11 +70,11 @@ jobs: - script: | source py$(python.version)/bin/activate - # lint python code - python -m pi...
scoutapp__scout_apm_python-41
Problem with flask_jwt I'm trying to use the ScoutApp in an flask application using the flask_jwt module, but i recive the below error message when my loggin route are called: ```jsx [2018-05-30 13:06:20,984] ERROR in __init__: Traceback (most recent call last): File "/home/andreramos/.virtualenvs/back/lib/pyt...
[ { "content": "from flask import current_app\nfrom flask.globals import _request_ctx_stack\n\nimport scout_apm.core\nfrom scout_apm.core.config.config import ScoutConfig\nfrom scout_apm.core.tracked_request import TrackedRequest\nfrom scout_apm.core.monkey import CallableProxy\n\n\nclass ScoutApm(object):\n d...
[ { "content": "from flask import current_app\nfrom flask.globals import _request_ctx_stack\n\nimport scout_apm.core\nfrom scout_apm.core.config.config import ScoutConfig\nfrom scout_apm.core.tracked_request import TrackedRequest\nfrom scout_apm.core.monkey import CallableProxy\n\n\nclass ScoutApm(object):\n d...
diff --git a/src/scout_apm/flask/__init__.py b/src/scout_apm/flask/__init__.py index 6e55a550..f967b01b 100644 --- a/src/scout_apm/flask/__init__.py +++ b/src/scout_apm/flask/__init__.py @@ -50,6 +50,10 @@ def dispatch_request(self): req = _request_ctx_stack.top.request app = current_app + # ...
napari__napari-1714
magic_name should work for all layer types ## 🐛 Bug <!-- A clear and concise description of what the bug is. --> The `magic_name` function should work for all layer types, imo. https://github.com/napari/napari/blob/5e8be0987b3ab691da5755380ce1dd798978b1c6/napari/utils/naming.py#L49 ## To Reproduce Steps...
[ { "content": "\"\"\"Automatically generate names.\n\"\"\"\nimport inspect\nimport re\nfrom collections import ChainMap\n\nfrom .misc import formatdoc\n\nsep = ' '\nstart = 1\n\n# Match integer between square brackets at end of string if after space\n# or at beginning of string or just match end of string\nnumbe...
[ { "content": "\"\"\"Automatically generate names.\n\"\"\"\nimport inspect\nimport re\nfrom collections import ChainMap\n\nfrom .misc import formatdoc\n\nsep = ' '\nstart = 1\n\n# Match integer between square brackets at end of string if after space\n# or at beginning of string or just match end of string\nnumbe...
diff --git a/napari/utils/naming.py b/napari/utils/naming.py index 093de9b5cf7..4471fd9e073 100644 --- a/napari/utils/naming.py +++ b/napari/utils/naming.py @@ -64,7 +64,11 @@ def magic_name(value, *, path_prefix): frame = inspect.currentframe().f_back code = frame.f_code - while code.co_filename.startsw...
streamlit__streamlit-4244
streamlit `--log-level` appears to have no affect to resultant logging level ### Summary The CLI argument settings `--log-level` appear to have no affect. `log.debug` is never rendered or changing the logging level does not appear to suppress logs not required. ### Steps to reproduce Code snippet: ``` imp...
[ { "content": "# Copyright 2018-2021 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
[ { "content": "# Copyright 2018-2021 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
diff --git a/lib/streamlit/cli.py b/lib/streamlit/cli.py index f6a476ddb660..eb434fac501c 100644 --- a/lib/streamlit/cli.py +++ b/lib/streamlit/cli.py @@ -95,9 +95,13 @@ def main(ctx, log_level="info"): """ if log_level: - import streamlit.logger + from streamlit.logger import get_logger - ...
pyload__pyload-1340
DepositfilesCom Parse error Hi, debuglog http://pastebin.com/v0SGFL9R handleFree_line44.dump.html http://pastebin.com/2V3Rjn7M handleFree_line60.dump.html http://pastebin.com/mxPsFQgk preload_line455.dump.html http://pastebin.com/F9vBdCct TIA
[ { "content": "# -*- coding: utf-8 -*-\n\nimport re\n\nfrom urllib import unquote\n\nfrom module.plugins.internal.CaptchaService import ReCaptcha\nfrom module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo\n\n\nclass DepositfilesCom(SimpleHoster):\n __name__ = \"DepositfilesCom\"\n __...
[ { "content": "# -*- coding: utf-8 -*-\n\nimport re\n\nfrom urllib import unquote\n\nfrom module.plugins.internal.CaptchaService import ReCaptcha\nfrom module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo\n\n\nclass DepositfilesCom(SimpleHoster):\n __name__ = \"DepositfilesCom\"\n __...
diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py index 95fd7c1b1f..48b325b482 100644 --- a/module/plugins/hoster/DepositfilesCom.py +++ b/module/plugins/hoster/DepositfilesCom.py @@ -52,7 +52,9 @@ def handleFree(self, pyfile): params = {'fid': m.group(1)} ...
Cloud-CV__EvalAI-1162
Add approved_by_admin check in submission worker script. **Need:** Since we need to only publish those challenges that are approved by admin, so it is also necessary that `submission_worker` should load only admin approved challenges. **Solution:** Make the query parameters [here](https://github.com/Cloud-CV/EvalAI/...
[ { "content": "from __future__ import absolute_import\nimport contextlib\nimport django\nimport importlib\nimport logging\nimport os\nimport pika\nimport requests\nimport shutil\nimport socket\nimport sys\nimport tempfile\nimport traceback\nimport yaml\nimport zipfile\n\nfrom os.path import dirname, join\n\nfrom...
[ { "content": "from __future__ import absolute_import\nimport contextlib\nimport django\nimport importlib\nimport logging\nimport os\nimport pika\nimport requests\nimport shutil\nimport socket\nimport sys\nimport tempfile\nimport traceback\nimport yaml\nimport zipfile\n\nfrom os.path import dirname, join\n\nfrom...
diff --git a/scripts/workers/submission_worker.py b/scripts/workers/submission_worker.py index 50ff664a49..1be29ad2de 100644 --- a/scripts/workers/submission_worker.py +++ b/scripts/workers/submission_worker.py @@ -212,7 +212,7 @@ def load_active_challenges(): ''' * Fetches active challenges and correspo...
google__clusterfuzz-995
Initialize issue_body_footer when reading issue tracker config It seems like we forgot to add initialization of `issue_body_footer` in https://github.com/google/clusterfuzz/blob/dfe686cde7429ed0ba482b0b0b4f27106b0a0d5f/src/appengine/libs/issue_management/issue_tracker_policy.py#L114, that's why the issues filed recentl...
[ { "content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable ...
[ { "content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable ...
diff --git a/src/appengine/libs/issue_management/issue_tracker_policy.py b/src/appengine/libs/issue_management/issue_tracker_policy.py index f643de2223..537774a25b 100644 --- a/src/appengine/libs/issue_management/issue_tracker_policy.py +++ b/src/appengine/libs/issue_management/issue_tracker_policy.py @@ -126,6 +126,10...
scikit-hep__pyhf-2459
In Python 3.12 xml.etree.ElementTree will raise DeprecationWarning: Testing an element's truth value will raise an exception in future versions While testing Python 3.12 in CI https://github.com/scikit-hep/pyhf/blob/adddb0797c564a0158a8e2e69a58ee1f98604bf7/tests/test_export.py#L438-L450 raised ```pytb > ...
[ { "content": "import logging\n\nfrom pathlib import Path\nimport shutil\nimport xml.etree.ElementTree as ET\nimport numpy as np\n\nimport uproot\n\nfrom pyhf.mixins import _ChannelSummaryMixin\nfrom pyhf.schema import path as schema_path\n\n_ROOT_DATA_FILE = None\n\nlog = logging.getLogger(__name__)\n\n__all__ ...
[ { "content": "import logging\n\nfrom pathlib import Path\nimport shutil\nimport xml.etree.ElementTree as ET\nimport numpy as np\n\nimport uproot\n\nfrom pyhf.mixins import _ChannelSummaryMixin\nfrom pyhf.schema import path as schema_path\n\n_ROOT_DATA_FILE = None\n\nlog = logging.getLogger(__name__)\n\n__all__ ...
diff --git a/src/pyhf/writexml.py b/src/pyhf/writexml.py index 8d3ecd3ca3..ff7aac800b 100644 --- a/src/pyhf/writexml.py +++ b/src/pyhf/writexml.py @@ -56,7 +56,7 @@ def _export_root_histogram(hist_name, data): # https://stackoverflow.com/a/4590052 def indent(elem, level=0): i = "\n" + level * " " - if elem: ...
microsoft__ptvsd-1559
attach_socket_import tests hang waiting for "process" event (https://github.com/microsoft/ptvsd/tree/dbg_adapter_refactor) When running multiple tests with `start_method` set to `attach_socket_cmdline` or `attach_socket_import`, subsequent tests fail because they cannot reuse the port number. It looks like ptvsd is ...
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See LICENSE in the project root\n# for license information.\n\nfrom __future__ import absolute_import, print_function, unicode_literals\n\n\"\"\"An implementation of the Debug Adapter Protocol (DAP) for ...
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See LICENSE in the project root\n# for license information.\n\nfrom __future__ import absolute_import, print_function, unicode_literals\n\n\"\"\"An implementation of the Debug Adapter Protocol (DAP) for ...
diff --git a/src/ptvsd/__init__.py b/src/ptvsd/__init__.py index 140f2f34a..1edf4f6bf 100644 --- a/src/ptvsd/__init__.py +++ b/src/ptvsd/__init__.py @@ -24,6 +24,14 @@ __file__ = path.abspath(__file__) del path +# Preload encodings that we're going to use to avoid import deadlocks on Python 2. +import codecs +codec...
DDMAL__CantusDB-771
should editors get automatic proofreader access to their own sources? It seems weird to me that on sources you (an editor) create, you can always access the Volpiano editor (assuming the source is non-empty!) but you have to be added as an editor to access the proofreading form. <img width="969" alt="image" src="http...
[ { "content": "from django.views.generic import DetailView, ListView, CreateView, UpdateView\nfrom django.db.models import Q, Prefetch\nfrom main_app.models import Source, Provenance, Century\nfrom main_app.forms import SourceCreateForm, SourceEditForm\nfrom django.contrib import messages\nfrom django.urls impor...
[ { "content": "from django.views.generic import DetailView, ListView, CreateView, UpdateView\nfrom django.db.models import Q, Prefetch\nfrom main_app.models import Source, Provenance, Century\nfrom main_app.forms import SourceCreateForm, SourceEditForm\nfrom django.contrib import messages\nfrom django.urls impor...
diff --git a/django/cantusdb_project/main_app/templates/user_source_list.html b/django/cantusdb_project/main_app/templates/user_source_list.html index 7be0d9263..53487b1c2 100644 --- a/django/cantusdb_project/main_app/templates/user_source_list.html +++ b/django/cantusdb_project/main_app/templates/user_source_list.html...
keras-team__keras-1769
Bug in callbacks.py ModelCheckpoint class There is a bug in the constructor of the ModelCheckpoint class (lines 247-259) See code below (from master branch). If the mode parameter is not recognized, the warning message refers to a self.mode variable that is never initialized, and an exception is thrown: `AttributeErr...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import print_function\n\nimport numpy as np\nimport time\nimport json\nimport warnings\n\nfrom collections import deque\nfrom .utils.generic_utils import Progbar\nfrom keras import backend as K\n\n\nclass CallbackList(object):\n def __init...
[ { "content": "from __future__ import absolute_import\nfrom __future__ import print_function\n\nimport numpy as np\nimport time\nimport json\nimport warnings\n\nfrom collections import deque\nfrom .utils.generic_utils import Progbar\nfrom keras import backend as K\n\n\nclass CallbackList(object):\n def __init...
diff --git a/keras/callbacks.py b/keras/callbacks.py index 28d39c6fe3ab..8b7260d9d48a 100644 --- a/keras/callbacks.py +++ b/keras/callbacks.py @@ -255,7 +255,7 @@ def __init__(self, filepath, monitor='val_loss', verbose=0, if mode not in ['auto', 'min', 'max']: warnings.warn('ModelCheckpoint mod...
pypa__pip-11091
--proxy should override environment variables ### Description Hey, When specifying proxies in both the environment variables (http_proxy, ...) and the --proxy parameter, the environment variables seem to take precedence. Since --proxy is more explicit, it should be used whenever specified (even over pip config). ...
[ { "content": "\"\"\"Contains the Command base classes that depend on PipSession.\n\nThe classes in this module are in a separate module so the commands not\nneeding download / PackageFinder capability don't unnecessarily import the\nPackageFinder machinery and all its vendored dependencies, etc.\n\"\"\"\n\nimpo...
[ { "content": "\"\"\"Contains the Command base classes that depend on PipSession.\n\nThe classes in this module are in a separate module so the commands not\nneeding download / PackageFinder capability don't unnecessarily import the\nPackageFinder machinery and all its vendored dependencies, etc.\n\"\"\"\n\nimpo...
diff --git a/news/10685.bugfix.rst b/news/10685.bugfix.rst new file mode 100644 index 00000000000..a0bc7ed5285 --- /dev/null +++ b/news/10685.bugfix.rst @@ -0,0 +1 @@ +Make the ``--proxy`` parameter take precedence over environment variables. diff --git a/src/pip/_internal/cli/req_command.py b/src/pip/_internal/cli/req...
chainer__chainer-528
with chainer.cuda.get_device(x) fails when x is 0-size cupy.ndarray ``` In [48]: x Out[48]: array([], shape=(0, 10), dtype=float32) In [49]: with chainer.cuda.get_device(b) as i: ....: i ....: --------------------------------------------------------------------------- AttributeError ...
[ { "content": "\"\"\"Device, context and memory management on CuPy.\n\nChainer uses CuPy (with very thin wrapper) to exploit the speed of GPU\ncomputation. Following modules and classes are imported to :mod:`cuda`\nmodule for convenience (refer to this table when reading chainer's source\ncodes).\n\n============...
[ { "content": "\"\"\"Device, context and memory management on CuPy.\n\nChainer uses CuPy (with very thin wrapper) to exploit the speed of GPU\ncomputation. Following modules and classes are imported to :mod:`cuda`\nmodule for convenience (refer to this table when reading chainer's source\ncodes).\n\n============...
diff --git a/chainer/cuda.py b/chainer/cuda.py index 665647f55cfd..ba5e21c3202b 100644 --- a/chainer/cuda.py +++ b/chainer/cuda.py @@ -153,6 +153,8 @@ def get_device(*args): if not isinstance(arg, numpy.ndarray): check_cuda_available() if isinstance(arg, cupy.ndarray): + ...
aio-libs__aiohttp-1161
StaticRoute should unquote filename ## Long story short If I don't have web safe filenames (say I have a directory index), my browser turns "Darby uses the computer.jpg" into "Darby%20uses%20the%20computer.jpg", which StaticRoute will never find on the filesystem. ## Expected behaviour I expect to see ![](https://c4....
[ { "content": "import abc\nimport asyncio\nimport collections\nimport inspect\nimport keyword\nimport os\nimport re\nimport sys\nimport warnings\nfrom collections.abc import Container, Iterable, Sized\nfrom pathlib import Path\nfrom types import MappingProxyType\nfrom urllib.parse import unquote, urlencode\n\nfr...
[ { "content": "import abc\nimport asyncio\nimport collections\nimport inspect\nimport keyword\nimport os\nimport re\nimport sys\nimport warnings\nfrom collections.abc import Container, Iterable, Sized\nfrom pathlib import Path\nfrom types import MappingProxyType\nfrom urllib.parse import unquote, urlencode\n\nfr...
diff --git a/CHANGES.rst b/CHANGES.rst index c9c91c5297d..bd926ca04fd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -118,6 +118,8 @@ CHANGES - Publish ClientSession.loop property #1149 +- Fix static file with spaces #1140 + - Fix piling up asyncio loop by cookie expiration callbacks #1061 - diff --git a/CONTRI...
napari__napari-4387
Conda workflow on windows is failing ## 🐛 Bug Error: ``` PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\tmpccpy1cvs' ``` https://github.com/napari/napari/runs/6002914512?check_suite_focus=true ## To ...
[ { "content": "\"\"\"\nCreate napari installers using `constructor`.\n\nIt creates a `construct.yaml` file with the needed settings\nand then runs `constructor`.\n\nFor more information, see Documentation> Developers> Packaging.\n\nSome environment variables we use:\n\nCONSTRUCTOR_APP_NAME:\n in case you want...
[ { "content": "\"\"\"\nCreate napari installers using `constructor`.\n\nIt creates a `construct.yaml` file with the needed settings\nand then runs `constructor`.\n\nFor more information, see Documentation> Developers> Packaging.\n\nSome environment variables we use:\n\nCONSTRUCTOR_APP_NAME:\n in case you want...
diff --git a/bundle_conda.py b/bundle_conda.py index 869e6439ea4..3ea1075a708 100644 --- a/bundle_conda.py +++ b/bundle_conda.py @@ -328,7 +328,10 @@ def main(extra_specs=None): _constructor(extra_specs=extra_specs) finally: for path in clean_these_files: - os.unlink(path) + ...
Textualize__textual-4032
It is possible to give a widget an ID that can't be queried back It is possible to give a widget an ID that can't then be queried back; for example: ```python from textual.app import App, ComposeResult from textual.widgets import Label class BadIDApp(App[None]): def compose(self) -> ComposeResult: ...
[ { "content": "\"\"\"\nA DOMNode is a base class for any object within the Textual Document Object Model,\nwhich includes all Widgets, Screens, and Apps.\n\"\"\"\n\n\nfrom __future__ import annotations\n\nimport re\nimport threading\nfrom functools import lru_cache, partial\nfrom inspect import getfile\nfrom typ...
[ { "content": "\"\"\"\nA DOMNode is a base class for any object within the Textual Document Object Model,\nwhich includes all Widgets, Screens, and Apps.\n\"\"\"\n\n\nfrom __future__ import annotations\n\nimport re\nimport threading\nfrom functools import lru_cache, partial\nfrom inspect import getfile\nfrom typ...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 44a95d744f..bc2657ad15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - `SelectionList` option IDs are usable as soon as the widget is instantiated https://github.com/Textualize/textual...
microsoft__botbuilder-python-1431
[PORT] Create test for waterfall cancellation telemetry > Port this change from botbuilder-dotnet/master branch: https://github.com/microsoft/botbuilder-dotnet/pull/3314 For https://github.com/microsoft/botbuilder-js/issues/1619 # Changed projects * Microsoft.Bot.Builder.Dialogs.Tests
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\r\n# Licensed under the MIT License.\r\n\r\n\r\nimport uuid\r\nfrom typing import Coroutine\r\nfrom botbuilder.core import TurnContext\r\nfrom botbuilder.schema import ActivityTypes\r\nfrom .dialog_reason import DialogReason\r\nfrom .dial...
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\r\n# Licensed under the MIT License.\r\n\r\n\r\nimport uuid\r\nfrom typing import Coroutine\r\nfrom botbuilder.core import TurnContext\r\nfrom botbuilder.schema import ActivityTypes\r\nfrom .dialog_reason import DialogReason\r\nfrom .dial...
diff --git a/libraries/botbuilder-applicationinsights/tests/test_telemetry_waterfall.py b/libraries/botbuilder-applicationinsights/tests/test_telemetry_waterfall.py index c1ab6e261..31f10527c 100644 --- a/libraries/botbuilder-applicationinsights/tests/test_telemetry_waterfall.py +++ b/libraries/botbuilder-applicationin...
pre-commit__pre-commit-2979
CPU count logic does not distinguish "usable" CPUs inside cgroup'd containers (e.g. inside k8s) ### search you tried in the issue tracker multiprocessing, k8s, usable, cpu ### describe your issue When invoking pre-commit from within a container environment with cgroup cpu enforcement, pre-commit fans out more ...
[ { "content": "from __future__ import annotations\n\nimport concurrent.futures\nimport contextlib\nimport math\nimport multiprocessing\nimport os\nimport subprocess\nimport sys\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Generator\nfrom typing import Iterable\nfrom typing import Muta...
[ { "content": "from __future__ import annotations\n\nimport concurrent.futures\nimport contextlib\nimport math\nimport multiprocessing\nimport os\nimport subprocess\nimport sys\nfrom typing import Any\nfrom typing import Callable\nfrom typing import Generator\nfrom typing import Iterable\nfrom typing import Muta...
diff --git a/pre_commit/xargs.py b/pre_commit/xargs.py index eff57ce7c..a7493c01d 100644 --- a/pre_commit/xargs.py +++ b/pre_commit/xargs.py @@ -24,6 +24,14 @@ def cpu_count() -> int: + try: + # On systems that support it, this will return a more accurate count of + # usable CPUs for the current p...
cython__cython-3713
Compiler crash: `AttributeError: 'set' object has no attribute 'cf_is_null'` I am getting a compiler crash trying to install a python project: ``` Compiler crash traceback from this point on: File "Cython/Compiler/Visitor.py", line 180, in Cython.Compiler.Visitor.TreeVisitor._visit File "/home/ellie/.local/lib/...
[ { "content": "# cython: language_level=3str\n# cython: auto_pickle=True\n\nfrom __future__ import absolute_import\n\nimport cython\ncython.declare(PyrexTypes=object, ExprNodes=object, Nodes=object,\n Builtin=object, InternalError=object, error=object, warning=object,\n fake_rhs_expr=...
[ { "content": "# cython: language_level=3str\n# cython: auto_pickle=True\n\nfrom __future__ import absolute_import\n\nimport cython\ncython.declare(PyrexTypes=object, ExprNodes=object, Nodes=object,\n Builtin=object, InternalError=object, error=object, warning=object,\n fake_rhs_expr=...
diff --git a/Cython/Compiler/FlowControl.py b/Cython/Compiler/FlowControl.py index ec38ed1642a..97fd8314fa8 100644 --- a/Cython/Compiler/FlowControl.py +++ b/Cython/Compiler/FlowControl.py @@ -1220,6 +1220,7 @@ def visit_TryFinallyStatNode(self, node): if self.flow.loops: self.flow.loops[-1].excep...
blaze__blaze-931
boolean evaluation with non-comparable types has an odd return type This seems buggy to me ``` In [1]: df = DataFrame([['Alice', 100, 1], ...: ['Bob', 200, 2], ...: ['Alice', 50, 3]], columns=['name', 'amount', 'id']) In [2]: from blaze import * In [3]: t = Data(df) In [4]: t O...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nimport numbers\nimport toolz\nimport inspect\n\nfrom toolz import unique, concat, compose, partial\nimport toolz\nfrom pprint import pprint\n\nfrom ..compatibility import StringIO, _strtypes, builtins\nfrom ..dispatch import dispa...
[ { "content": "from __future__ import absolute_import, division, print_function\n\nimport numbers\nimport toolz\nimport inspect\n\nfrom toolz import unique, concat, compose, partial\nimport toolz\nfrom pprint import pprint\n\nfrom ..compatibility import StringIO, _strtypes, builtins\nfrom ..dispatch import dispa...
diff --git a/blaze/expr/core.py b/blaze/expr/core.py index 687736090..4a2b7cde1 100644 --- a/blaze/expr/core.py +++ b/blaze/expr/core.py @@ -136,9 +136,11 @@ def __eq__(self, other): ident = self.isidentical(other) if ident is True: return ident + try: return self._e...
bentoml__BentoML-1455
BentoML adds wrong requirement for PytorchLightning **Describe the bug** BentoML adds package ```pytorch``` to ```requirements.txt``` file which cannot be installed. **To Reproduce** deploy.py ```python requirements = [ 'bentoml==0.11.0', 'dask[bag]==2021.1.0', 'imageio==2.9.0', 'toolz==0.1...
[ { "content": "import logging\nimport os\nimport zipfile\nimport pathlib\nimport shutil\n\nfrom bentoml.exceptions import (\n InvalidArgument,\n MissingDependencyException,\n)\nfrom bentoml.service.artifacts import BentoServiceArtifact\nfrom bentoml.service.env import BentoServiceEnv\nfrom bentoml.utils im...
[ { "content": "import logging\nimport os\nimport zipfile\nimport pathlib\nimport shutil\n\nfrom bentoml.exceptions import (\n InvalidArgument,\n MissingDependencyException,\n)\nfrom bentoml.service.artifacts import BentoServiceArtifact\nfrom bentoml.service.env import BentoServiceEnv\nfrom bentoml.utils im...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b168a4cd746..3c85b4d397c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -420,6 +420,10 @@ jobs: python-version: 3.7 - name: Install test dependencies run: ./ci/install_test_deps.sh + - name: S...
ytdl-org__youtube-dl-16038
[vtm] encrypted video ## Please follow the guide below - You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`) - Use the *Preview* tab to see what your issue will...
[ { "content": "from __future__ import unicode_literals\n\nimport re\n\nfrom .gigya import GigyaBaseIE\n\nfrom ..compat import compat_str\nfrom ..utils import (\n int_or_none,\n parse_duration,\n try_get,\n unified_timestamp,\n)\n\n\nclass MedialaanIE(GigyaBaseIE):\n _VALID_URL = r'''(?x)\n ...
[ { "content": "from __future__ import unicode_literals\n\nimport re\n\nfrom .gigya import GigyaBaseIE\n\nfrom ..compat import compat_str\nfrom ..utils import (\n int_or_none,\n parse_duration,\n try_get,\n unified_timestamp,\n)\n\n\nclass MedialaanIE(GigyaBaseIE):\n _VALID_URL = r'''(?x)\n ...
diff --git a/youtube_dl/extractor/medialaan.py b/youtube_dl/extractor/medialaan.py index f8c30052f32..50d5db80276 100644 --- a/youtube_dl/extractor/medialaan.py +++ b/youtube_dl/extractor/medialaan.py @@ -141,6 +141,7 @@ def _real_extract(self, url): vod_id = config.get('vodId') or self._search_regex( ...
openai__gym-558
Box2d won't find some RAND_LIMIT_swigconstant Hello! It's probably some silly mistake on my side, but i wasn't able to fix by random lever pulling, as usual. Installing Box2d as in instuctions (using `pip install -e .[all]`) will throw error when trying to use some of Box2D examples. Code that reproduces the issue: ...
[ { "content": "from setuptools import setup, find_packages\nimport sys, os.path\n\n# Don't import gym module here, since deps may not be installed\nsys.path.insert(0, os.path.join(os.path.dirname(__file__), 'gym'))\nfrom version import VERSION\n\n# Environment-specific dependencies.\nextras = {\n 'atari': ['ata...
[ { "content": "from setuptools import setup, find_packages\nimport sys, os.path\n\n# Don't import gym module here, since deps may not be installed\nsys.path.insert(0, os.path.join(os.path.dirname(__file__), 'gym'))\nfrom version import VERSION\n\n# Environment-specific dependencies.\nextras = {\n 'atari': ['ata...
diff --git a/setup.py b/setup.py index 38a965dc9cd..64172e5394f 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ extras = { 'atari': ['atari_py>=0.0.21', 'Pillow', 'PyOpenGL'], 'board_game' : ['pachi-py>=0.0.19'], - 'box2d': ['box2d-py'], + 'box2d': ['Box2D-kengz'], 'classic_control': ['PyOpenGL'], '...
conan-io__conan-center-index-1822
[package] thrift/0.13.0: build fails using --profile but works using --profile:host and --profile:build ### Package and Environment Details (include every applicable attribute) * Package Name/Version: **thrift/0.13.0** * Operating System+version: **Linux Ubuntu 18.04** * Compiler+version: **GCC 7** * Conan ...
[ { "content": "import os\nfrom conans import tools, CMake, ConanFile\n\n\nclass ConanFileDefault(ConanFile):\n name = \"thrift\"\n description = \"Thrift is an associated code generation mechanism for RPC\"\n topics = (\"conan\", \"thrift\", \"serialization\", \"rpc\")\n url = \"https://github.com/co...
[ { "content": "import os\nfrom conans import tools, CMake, ConanFile\n\n\nclass ConanFileDefault(ConanFile):\n name = \"thrift\"\n description = \"Thrift is an associated code generation mechanism for RPC\"\n topics = (\"conan\", \"thrift\", \"serialization\", \"rpc\")\n url = \"https://github.com/co...
diff --git a/recipes/thrift/all/conanfile.py b/recipes/thrift/all/conanfile.py index e24a457671775..caf1f91eb41a2 100644 --- a/recipes/thrift/all/conanfile.py +++ b/recipes/thrift/all/conanfile.py @@ -139,3 +139,7 @@ def package_info(self): self.cpp_info.defines.append("NOMINMAX") elif self.settin...
ManageIQ__integration_tests-3999
String interpolation with no params in utils.db https://github.com/RedHatQE/cfme_tests/blob/master/utils/db.py#L297
[ { "content": "from collections import Mapping\nfrom contextlib import contextmanager\nfrom itertools import izip\n\nfrom cached_property import cached_property\nfrom sqlalchemy import MetaData, create_engine, event, inspect\nfrom sqlalchemy.exc import ArgumentError, DisconnectionError, InvalidRequestError\nfrom...
[ { "content": "from collections import Mapping\nfrom contextlib import contextmanager\nfrom itertools import izip\n\nfrom cached_property import cached_property\nfrom sqlalchemy import MetaData, create_engine, event, inspect\nfrom sqlalchemy.exc import ArgumentError, DisconnectionError, InvalidRequestError\nfrom...
diff --git a/utils/db.py b/utils/db.py index 0875fa454f..2f0313019b 100644 --- a/utils/db.py +++ b/utils/db.py @@ -281,7 +281,7 @@ def _table(self, table_name): return table_cls except ArgumentError: # This usually happens on join tables with no PKs - logger...
deis__deis-2622
LICENSE needs updating for 2014 It still says 2013
[ { "content": "# -*- coding: utf-8 -*-\n#\n# deis documentation build configuration file, created by\n# sphinx-quickstart on Fri Jul 26 12:12:00 2013.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n# ...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# deis documentation build configuration file, created by\n# sphinx-quickstart on Fri Jul 26 12:12:00 2013.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in this\n# ...
diff --git a/LICENSE b/LICENSE index 2073e2a862..e9584d53b5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2013 OpDemand LLC +Copyright 2013, 2014 OpDemand LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a...
ARM-DOE__ACT-837
AmeriFlux Documentation is not showing up in the API The new act.io.ameriflux code is not showing up in the documentation.
[ { "content": "\"\"\"\nThis module contains procedures for reading and writing various ARM datasets.\n\n\"\"\"\n\nimport lazy_loader as lazy\n\n__getattr__, __dir__, __all__ = lazy.attach(\n __name__,\n submodules=[\n 'arm',\n 'ameriflux',\n 'text',\n 'icartt',\n 'mpl',\n...
[ { "content": "\"\"\"\nThis module contains procedures for reading and writing various ARM datasets.\n\n\"\"\"\n\nimport lazy_loader as lazy\n\n__getattr__, __dir__, __all__ = lazy.attach(\n __name__,\n submodules=[\n 'arm',\n 'ameriflux',\n 'text',\n 'icartt',\n 'mpl',\n...
diff --git a/act/io/__init__.py b/act/io/__init__.py index 4616848d58..9e391d20f2 100644 --- a/act/io/__init__.py +++ b/act/io/__init__.py @@ -28,7 +28,7 @@ 'check_if_tar_gz_file', 'read_arm_mmcr', ], - 'ameriflux': ['format_as_ameriflux'], + 'ameriflux': ['convert_to_am...
WeblateOrg__weblate-10868
Backup restore locks projects and shows no existing components ### Describe the issue I was testing the borg backup feature in weblate and upon restoring the backup I noticed that the projects had the label that indicated that the project is locked (See Image). I see that the information is all there in the back...
[ { "content": "# Copyright © Michal Čihař <michal@weblate.org>\n#\n# SPDX-License-Identifier: GPL-3.0-or-later\n\nimport gzip\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport time\nfrom importlib import import_module\nfrom shutil import copyfile\n\nfrom celery.schedules import crontab\nfrom djang...
[ { "content": "# Copyright © Michal Čihař <michal@weblate.org>\n#\n# SPDX-License-Identifier: GPL-3.0-or-later\n\nimport gzip\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport time\nfrom importlib import import_module\nfrom shutil import copyfile\n\nfrom celery.schedules import crontab\nfrom djang...
diff --git a/weblate/utils/tasks.py b/weblate/utils/tasks.py index c9e613a195c2..8863f0f4e0fa 100644 --- a/weblate/utils/tasks.py +++ b/weblate/utils/tasks.py @@ -102,6 +102,8 @@ def database_backup(): "pg_dump", # Superuser only, crashes on Alibaba Cloud Database PolarDB ...
chainer__chainer-7178
Emit warning if compiled in Debug mode In debug mode ChainerX runs significantly slower. However sometimes it's difficult notice that.
[ { "content": "import os\nimport sys\n\n\nif sys.version_info[0] < 3:\n _available = False\nelse:\n try:\n from chainerx import _core\n _available = True\n except Exception:\n _available = False\n\n\nif _available:\n from numpy import dtype # NOQA\n from numpy import (\n ...
[ { "content": "import os\nimport sys\nimport warnings\n\n\nif sys.version_info[0] < 3:\n _available = False\nelse:\n try:\n from chainerx import _core\n _available = True\n except Exception:\n _available = False\n\n\nif _available:\n from numpy import dtype # NOQA\n from nump...
diff --git a/chainerx/__init__.py b/chainerx/__init__.py index 96c2a6b9c043..88d9a3a737c2 100644 --- a/chainerx/__init__.py +++ b/chainerx/__init__.py @@ -1,5 +1,6 @@ import os import sys +import warnings if sys.version_info[0] < 3: @@ -70,3 +71,9 @@ def __init__(self, *args, **kwargs): def is_available(): ...
ansible__molecule-1498
Docker provisioner enforces all uppercase env vars # Issue Type - Bug report # Molecule and Ansible details ansible --version ``` ansible 2.5.8 (stable-2.5 6321e70232) last updated 2018/09/04 11:40:53 (GMT +200) config file = None configured module search path = [u'...'] ansible python module lo...
[ { "content": "# Copyright (c) 2015-2018 Cisco Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# right...
[ { "content": "# Copyright (c) 2015-2018 Cisco Systems, Inc.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# right...
diff --git a/molecule/model/schema_v2.py b/molecule/model/schema_v2.py index fae3a93f96..db7498e6aa 100644 --- a/molecule/model/schema_v2.py +++ b/molecule/model/schema_v2.py @@ -694,7 +694,7 @@ def pre_validate_base_schema(env, keep_string): 'type': 'dict', 'keyschema': { ...
facebookresearch__CompilerGym-656
Cache path inconsistency in cc and python? I noticed that theses two files are using different conventions for creating cache paths. The cc file says the python file should align with the cc file, but they are still different. Is this intended? https://github.com/facebookresearch/CompilerGym/blob/61f460fadee2454ff8f...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"Module for resolving a runfiles path.\"\"\"\nimport os\nfrom datetime import datetime\nfrom getpass import getu...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"Module for resolving a runfiles path.\"\"\"\nimport os\nfrom datetime import datetime\nfrom getpass import getu...
diff --git a/compiler_gym/util/runfiles_path.py b/compiler_gym/util/runfiles_path.py index ce74bf3b2..2755b784f 100644 --- a/compiler_gym/util/runfiles_path.py +++ b/compiler_gym/util/runfiles_path.py @@ -100,7 +100,7 @@ def cache_path(relpath: str) -> Path: if forced: return Path(forced) / relpath e...
facebookresearch__CompilerGym-736
Bug in llvm_rl benchmark when setting a max_benchmarks https://github.com/facebookresearch/CompilerGym/blob/b803856257aa663b20a26e49125d5d603f84a9b9/examples/llvm_rl/model/benchmarks.py#L96-L98 should be `n = min(self.max_benchmarks, n)` Bug in llvm_rl benchmark when setting a max_benchmarks https://github.com/fa...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\nfrom itertools import islice\nfrom typing import Iterable, List, Union\n\nfrom pydantic import BaseModel, Field, root...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\nfrom itertools import islice\nfrom typing import Iterable, List, Union\n\nfrom pydantic import BaseModel, Field, root...
diff --git a/examples/llvm_rl/model/benchmarks.py b/examples/llvm_rl/model/benchmarks.py index b707564e7..48f500c8e 100644 --- a/examples/llvm_rl/model/benchmarks.py +++ b/examples/llvm_rl/model/benchmarks.py @@ -95,7 +95,7 @@ def _uris_iterator( start = self.benchmarks_start_at n = len(self.uris) ...
internetarchive__openlibrary-6513
Open Library Stats Cron hitting Document update conflict <!-- What problem are we solving? What does the experience look like today? What are the symptoms? --> ``` Traceback (most recent call last): File "/openlibrary/scripts/store_counts.py", line 18, in <module> sys.exit(stats.main(*sys.argv[1:])) File...
[ { "content": "\"\"\"\nScript to read out data from thingdb and put it in couch so that it\ncan be queried by the /admin pages on openlibrary\n\"\"\"\n\n\nimport os\nimport logging\nimport datetime\n\nimport web\nimport yaml\n\nfrom openlibrary.admin import numbers\n\nlogger = logging.getLogger(__name__)\n\n\nwe...
[ { "content": "\"\"\"\nScript to read out data from thingdb and put it in couch so that it\ncan be queried by the /admin pages on openlibrary\n\"\"\"\n\n\nimport os\nimport logging\nimport datetime\n\nimport web\nimport yaml\n\nfrom openlibrary.admin import numbers\n\nlogger = logging.getLogger(__name__)\n\n\nwe...
diff --git a/openlibrary/admin/stats.py b/openlibrary/admin/stats.py index 854efd3d09e..37dbe224f33 100644 --- a/openlibrary/admin/stats.py +++ b/openlibrary/admin/stats.py @@ -65,6 +65,9 @@ def store_data(data, date): doc = web.ctx.site.store.get(uid) or {} doc.update(data) doc['type'] = 'admin-stats' +...
pre-commit__pre-commit-472
Can't use ruby hooks with "BUNDLE_DISABLE_SHARED_GEMS: true" in .bundle/config I have a repo with a `.bundle/config` file with these contents: ```yaml BUNDLE_DISABLE_SHARED_GEMS: true BUNDLE_PATH: vendor/gem ``` And a `Gemfile` with these contents: ```ruby gem 'lol_hai' ``` I can't use any Ruby hooks in th...
[ { "content": "from __future__ import unicode_literals\n\nimport contextlib\nimport io\nimport os.path\nimport shutil\nimport tarfile\n\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import Var\nfrom pre_commit.languages import helpers\nfrom pre_commit.util import CalledProcessError\nf...
[ { "content": "from __future__ import unicode_literals\n\nimport contextlib\nimport io\nimport os.path\nimport shutil\nimport tarfile\n\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import Var\nfrom pre_commit.languages import helpers\nfrom pre_commit.util import CalledProcessError\nf...
diff --git a/pre_commit/languages/ruby.py b/pre_commit/languages/ruby.py index 32682f523..d3896d904 100644 --- a/pre_commit/languages/ruby.py +++ b/pre_commit/languages/ruby.py @@ -22,6 +22,7 @@ def get_env_patch(venv, language_version): # pragma: windows no cover patches = ( ('GEM_HOME', os.path.join(ve...
great-expectations__great_expectations-5468
Use cleaner solution for non-truncating division in python 2 Prefer `from __future__ import division` to `1.*x/y`
[ { "content": "# Make sure to include any Expectations your want exported below!\n\nfrom .expect_column_values_confidence_for_data_label_to_be_greater_than_or_equal_to_threshold import (\n ExpectColumnValuesConfidenceForDataLabelToBeGreaterThanOrEqualToThreshold,\n)\nfrom .expect_column_values_confidence_for_...
[ { "content": "# Make sure to include any Expectations your want exported below!\n\nfrom .expect_column_values_confidence_for_data_label_to_be_greater_than_or_equal_to_threshold import (\n ExpectColumnValuesConfidenceForDataLabelToBeGreaterThanOrEqualToThreshold,\n)\nfrom .expect_column_values_confidence_for_...
diff --git a/contrib/capitalone_dataprofiler_expectations/capitalone_dataprofiler_expectations/expectations/__init__.py b/contrib/capitalone_dataprofiler_expectations/capitalone_dataprofiler_expectations/expectations/__init__.py index cee8d6addbb0..1682068fee2d 100644 --- a/contrib/capitalone_dataprofiler_expectations/...
joke2k__faker-1789
Remove image provider about to be shutdown I randomly discovered that https://placeimg.com was about to be shut down (on june, 30th 2023). I believe it should therefore be removed https://github.com/joke2k/faker/blob/7ca5eac81157c2792237dc1a3136a955d4464143/faker/providers/internet/__init__.py#L160
[ { "content": "from ipaddress import IPV4LENGTH, IPV6LENGTH, IPv4Network, IPv6Address, IPv6Network\nfrom typing import Dict, List, Optional, Tuple\n\nfrom ...decode import unidecode\nfrom ...utils.decorators import lowercase, slugify, slugify_unicode\nfrom ...utils.distribution import choices_distribution\nfrom ...
[ { "content": "from ipaddress import IPV4LENGTH, IPV6LENGTH, IPv4Network, IPv6Address, IPv6Network\nfrom typing import Dict, List, Optional, Tuple\n\nfrom ...decode import unidecode\nfrom ...utils.decorators import lowercase, slugify, slugify_unicode\nfrom ...utils.distribution import choices_distribution\nfrom ...
diff --git a/faker/providers/internet/__init__.py b/faker/providers/internet/__init__.py index 71860d69c6..ce1d258842 100644 --- a/faker/providers/internet/__init__.py +++ b/faker/providers/internet/__init__.py @@ -157,7 +157,6 @@ class Provider(BaseProvider): "https://picsum.photos/{width}/{height}", ...
quantumlib__Cirq-1319
Empty Moments are rendered incorrectly in transposed circuit diagrams Empty Moments arise when optimizations leave existing Moments empty. For example: Input: ``` import cirq a, b = cirq.LineQubit.range(2) circuit = cirq.Circuit.from_ops( cirq.Z.on_each([a, b]), cirq.Z.on_each([a, b]), cirq.CZ(a...
[ { "content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ { "content": "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
diff --git a/cirq/circuits/circuit_test.py b/cirq/circuits/circuit_test.py index 9f4c8e789d7..31dba1e2c22 100644 --- a/cirq/circuits/circuit_test.py +++ b/cirq/circuits/circuit_test.py @@ -219,10 +219,40 @@ def test_empty_moments(): cirq.testing.assert_has_diagram(circuit, "a: ...
mampfes__hacs_waste_collection_schedule-1874
[Bug]: fetch failed for source Stavanger Kommune ### I Have A Problem With: A specific source ### What's Your Problem Unable to fetch data for Stavanger Norway. Have worked flawless a while, but no there is no data. ### Source (if relevant) stavanger_no ### Logs ```Shell This error originated from a custom integ...
[ { "content": "from datetime import datetime\n\nimport requests\nfrom bs4 import BeautifulSoup\nfrom waste_collection_schedule import Collection # type: ignore[attr-defined]\n\nTITLE = \"Stavanger Kommune\"\nDESCRIPTION = \"Source for Stavanger Kommune, Norway\"\nURL = \"https://www.stavanger.kommune.no/\"\nTES...
[ { "content": "from datetime import datetime\n\nimport requests\nfrom bs4 import BeautifulSoup\nfrom waste_collection_schedule import Collection # type: ignore[attr-defined]\n\nTITLE = \"Stavanger Kommune\"\nDESCRIPTION = \"Source for Stavanger Kommune, Norway\"\nURL = \"https://www.stavanger.kommune.no/\"\nTES...
diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/stavanger_no.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/stavanger_no.py index 5546cb7a5..291b45436 100644 --- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/st...
vyperlang__vyper-3242
`AttributeError` when using invalid expression as loop's iterator ### Version Information * vyper Version (output of `vyper --version`): 0.3.8+commit.4ae2527f * OS: OSX * Python Version (output of `python --version`): 3.8.0 ### What's your issue about? Trying to use something else than a `Name` as the iterat...
[ { "content": "from typing import Optional\n\nfrom vyper import ast as vy_ast\nfrom vyper.ast.validation import validate_call_args\nfrom vyper.exceptions import (\n ExceptionList,\n FunctionDeclarationException,\n ImmutableViolation,\n InvalidLiteral,\n InvalidOperation,\n InvalidType,\n Ite...
[ { "content": "from typing import Optional\n\nfrom vyper import ast as vy_ast\nfrom vyper.ast.validation import validate_call_args\nfrom vyper.exceptions import (\n ExceptionList,\n FunctionDeclarationException,\n ImmutableViolation,\n InvalidLiteral,\n InvalidOperation,\n InvalidType,\n Ite...
diff --git a/tests/parser/syntax/test_for_range.py b/tests/parser/syntax/test_for_range.py index d775f6aae0..b2a9491058 100644 --- a/tests/parser/syntax/test_for_range.py +++ b/tests/parser/syntax/test_for_range.py @@ -1,6 +1,26 @@ import pytest from vyper import compiler +from vyper.exceptions import StructureExce...
learningequality__kolibri-11933
CSV Report generation API tests fail when the current date in the active timezone is different to the UTC date ## Observed behavior When running the tests in `kolibri/plugins/facility/test/test_api.py` 2 tests can sometimes fail - the ones to do with generating a CSV Summary Log or Session Log report. This occurs w...
[ { "content": "from django.utils import timezone\n\n\ndef local_now():\n return timezone.localtime(timezone.now())\n\n\ndef naive_utc_datetime(dt):\n return timezone.make_naive(dt, timezone=timezone.utc)\n", "path": "kolibri/utils/time_utils.py" } ]
[ { "content": "from django.utils import timezone\n\n\ndef local_now():\n \"\"\"\n Returns the current time in the local timezone.\n \"\"\"\n return timezone.localtime(timezone.now())\n\n\ndef utc_now():\n \"\"\"\n Returns the current time in the UTC timezone.\n \"\"\"\n return timezone.no...
diff --git a/kolibri/plugins/facility/test/test_api.py b/kolibri/plugins/facility/test/test_api.py index 4d42ba0cd43..007183be222 100644 --- a/kolibri/plugins/facility/test/test_api.py +++ b/kolibri/plugins/facility/test/test_api.py @@ -22,7 +22,7 @@ from kolibri.core.logger.test.factory_logger import FacilityUserFact...
aio-libs__aiohttp-3094
multipart BodyPartReaderPayload filename wrong https://github.com/aio-libs/aiohttp/blob/d8831f36d0ba1c7e2ffa7f5442e14d020de98bb8/aiohttp/multipart.py#L446-L448 Maybe I'm missing something, but this looks wrong, shouldn't it be `value.filename`?
[ { "content": "import base64\nimport binascii\nimport json\nimport re\nimport uuid\nimport warnings\nimport zlib\nfrom collections import Mapping, Sequence, deque\nfrom urllib.parse import parse_qsl, unquote, urlencode\n\nfrom multidict import CIMultiDict\n\nfrom .hdrs import (CONTENT_DISPOSITION, CONTENT_ENCODI...
[ { "content": "import base64\nimport binascii\nimport json\nimport re\nimport uuid\nimport warnings\nimport zlib\nfrom collections import Mapping, Sequence, deque\nfrom urllib.parse import parse_qsl, unquote, urlencode\n\nfrom multidict import CIMultiDict\n\nfrom .hdrs import (CONTENT_DISPOSITION, CONTENT_ENCODI...
diff --git a/CHANGES/3064.bugfix b/CHANGES/3064.bugfix new file mode 100644 index 00000000000..80c6595ea1b --- /dev/null +++ b/CHANGES/3064.bugfix @@ -0,0 +1 @@ +correct filename in content-disposition with multipart body diff --git a/aiohttp/multipart.py b/aiohttp/multipart.py index a90a9dfd1ce..1428d64a7ee 100644 ---...
mitmproxy__mitmproxy-1215
Headers aren't always case insensitive Headers like `Content-Length` should preserve case after going trough mitmproxy, because some versions of PHP don't like lowercase headers (this is a server-side misimplementation of [RFC 2616](https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2), but it would be nice if...
[ { "content": "from __future__ import absolute_import, print_function, division\n\nfrom abc import ABCMeta, abstractmethod\n\n\ntry:\n from collections.abc import MutableMapping\nexcept ImportError: # pragma: no cover\n from collections import MutableMapping # Workaround for Python < 3.3\n\nimport six\nf...
[ { "content": "from __future__ import absolute_import, print_function, division\n\nfrom abc import ABCMeta, abstractmethod\n\n\ntry:\n from collections.abc import MutableMapping\nexcept ImportError: # pragma: no cover\n from collections import MutableMapping # Workaround for Python < 3.3\n\nimport six\nf...
diff --git a/netlib/multidict.py b/netlib/multidict.py index dc0f346652..982a117800 100644 --- a/netlib/multidict.py +++ b/netlib/multidict.py @@ -105,7 +105,7 @@ def set_all(self, key, values): if self._kconv(field[0]) == key_kconv: if values: new_fields.append( - ...
tiangolo__fastapi-1524
Pydantic __root__ model - incorrect handling ### Describe the bug https://pydantic-docs.helpmanual.io/usage/models/#custom-root-types Pydantic allows to create models with only `__root__` field. In such scenario the model behaves as transparent wrapper for this single type. When such model is used in response (r...
[ { "content": "from enum import Enum\nfrom pathlib import PurePath\nfrom types import GeneratorType\nfrom typing import Any, Callable, Dict, List, Set, Tuple, Union\n\nfrom fastapi.logger import logger\nfrom fastapi.utils import PYDANTIC_1\nfrom pydantic import BaseModel\nfrom pydantic.json import ENCODERS_BY_TY...
[ { "content": "from enum import Enum\nfrom pathlib import PurePath\nfrom types import GeneratorType\nfrom typing import Any, Callable, Dict, List, Set, Tuple, Union\n\nfrom fastapi.logger import logger\nfrom fastapi.utils import PYDANTIC_1\nfrom pydantic import BaseModel\nfrom pydantic.json import ENCODERS_BY_TY...
diff --git a/fastapi/encoders.py b/fastapi/encoders.py index 26ceb21445f15..3f5b79d9ebbce 100644 --- a/fastapi/encoders.py +++ b/fastapi/encoders.py @@ -71,6 +71,8 @@ def jsonable_encoder( by_alias=by_alias, skip_defaults=bool(exclude_unset or skip_defaults), ) + if...
zestedesavoir__zds-site-4369
[v16] On a perdu la date de réservation d'un contenu Environnement : prod Depuis la v16, dans la [zone de validation](https://zestedesavoir.com/validations/) (comme le montre la capture ci-dessous) on ne sait plus à quelle date à été réservée un contenu. ![validationnes](https://cloud.githubusercontent.com/assets/606...
[ { "content": "# coding: utf-8\nfrom __future__ import unicode_literals\nimport json\nimport logging\nfrom datetime import datetime\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.models import User\nfrom django.core.exceptions import PermissionDenied\nfrom djan...
[ { "content": "# coding: utf-8\nfrom __future__ import unicode_literals\nimport json\nimport logging\nfrom datetime import datetime\n\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth.models import User\nfrom django.core.exceptions import PermissionDenied\nfrom djan...
diff --git a/templates/misc/validation.part.html b/templates/misc/validation.part.html index 49e7c099dc..b34012b393 100644 --- a/templates/misc/validation.part.html +++ b/templates/misc/validation.part.html @@ -20,6 +20,9 @@ {% if validation.date_reserve %} {{ validation.date_reserve|format_date...
pallets__click-1910
argument with nargs=-1 and envvar ignores values from command line Since click 8.0, the value(s) provided on the command line for a nargs=-1 argument are ignored if the argument has `envvar` set. Example: ```python #!/usr/bin/env python import click @click.command() @click.argument("foo", nargs=-1, envvar="...
[ { "content": "\"\"\"\nThis module started out as largely a copy paste from the stdlib's\noptparse module with the features removed that we do not need from\noptparse because we implement them in Click on a higher level (for\ninstance type handling, help formatting and a lot more).\n\nThe plan is to remove more ...
[ { "content": "\"\"\"\nThis module started out as largely a copy paste from the stdlib's\noptparse module with the features removed that we do not need from\noptparse because we implement them in Click on a higher level (for\ninstance type handling, help formatting and a lot more).\n\nThe plan is to remove more ...
diff --git a/CHANGES.rst b/CHANGES.rst index 1058fab67..0b24de0ef 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,6 +14,8 @@ Unreleased :issue:`1892` - The ``importlib_metadata`` backport package is installed on Python < 3.8. :issue:`1889` +- Arguments with ``nargs=-1`` only use env var value if no com...
Lightning-AI__pytorch-lightning-1018
Precision=16 with TPUs bug ## 🐛 Bug Setting precision=16 when training with a TPU throws an error ### To Reproduce see colab: https://colab.research.google.com/drive/1s-ZDIqzgKQ1Byf-Lw58RZ8LGgmdB6qjB Relavent stack trace: ``` Exception in device=TPU:0: str expected, not int Traceback (most recent call...
[ { "content": "\"\"\"\nLightning makes multi-gpu training and 16 bit training trivial.\n\n.. note:: None of the flags below require changing anything about your lightningModel definition.\n\nChoosing a backend\n==================\n\nLightning supports two backends. DataParallel and DistributedDataParallel.\n Bot...
[ { "content": "\"\"\"\nLightning makes multi-gpu training and 16 bit training trivial.\n\n.. note:: None of the flags below require changing anything about your lightningModel definition.\n\nChoosing a backend\n==================\n\nLightning supports two backends. DataParallel and DistributedDataParallel.\n Bot...
diff --git a/pytorch_lightning/trainer/distrib_parts.py b/pytorch_lightning/trainer/distrib_parts.py index 6c3a3e06b7246..44d9cc30b5b10 100644 --- a/pytorch_lightning/trainer/distrib_parts.py +++ b/pytorch_lightning/trainer/distrib_parts.py @@ -489,7 +489,7 @@ def tpu_train(self, tpu_core_idx, model): # init...
ibis-project__ibis-8117
feat: support using `.sql()` in the Polars backend ### What happened? see https://github.com/ibis-project/ibis/issues/8029 for setup then trying to run that SQL on the Polars backend like so: ```python ibis.set_backend("polars") # <1> kwargs = polars_kwargs t = ibis.read_csv("1brc/data/measurements.txt", **...
[ { "content": "from __future__ import annotations\n\nfrom functools import lru_cache\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any\n\nimport polars as pl\n\nimport ibis\nimport ibis.common.exceptions as com\nimport ibis.expr.operations as ops\nimport ibis.expr.schema as sch\nimport ibis.expr.t...
[ { "content": "from __future__ import annotations\n\nfrom functools import lru_cache\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any\n\nimport polars as pl\n\nimport ibis\nimport ibis.common.exceptions as com\nimport ibis.expr.operations as ops\nimport ibis.expr.schema as sch\nimport ibis.expr.t...
diff --git a/ibis/backends/polars/__init__.py b/ibis/backends/polars/__init__.py index 15b2fcca6120..1619ac927371 100644 --- a/ibis/backends/polars/__init__.py +++ b/ibis/backends/polars/__init__.py @@ -395,9 +395,7 @@ def compile( return translate(node, ctx=ctx) def _get_schema_using_query(self, query:...
pytorch__audio-635
multiple definitions of `SoxEffect`. `SoxEffect` is defined both in https://github.com/pytorch/audio/blob/00d38203e401b8d9472a8f8394a10e2c309be02c/torchaudio/torch_sox.h#L50-L54 and https://github.com/pytorch/audio/blob/00d38203e401b8d9472a8f8394a10e2c309be02c/torchaudio/torch_sox.cpp#L73-L77 ----- ---...
[ { "content": "#!/usr/bin/env python\nimport os\nimport platform\nimport sys\nimport subprocess\n\nfrom setuptools import setup, find_packages\nfrom torch.utils.cpp_extension import BuildExtension, CppExtension\n\n\ndef check_env_flag(name, default=''):\n return os.getenv(name, default).upper() in set(['ON', ...
[ { "content": "#!/usr/bin/env python\nimport os\nimport platform\nimport sys\nimport subprocess\n\nfrom setuptools import setup, find_packages\nfrom torch.utils.cpp_extension import BuildExtension, CppExtension\n\n\ndef check_env_flag(name, default=''):\n return os.getenv(name, default).upper() in set(['ON', ...
diff --git a/setup.py b/setup.py index 0128a2fe61..3176473189 100644 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def check_env_flag(name, default=''): '_torch_sox', ['torchaudio/torch_sox.cpp'], libraries=libraries, - include_dirs=include_dirs, + include_...
encode__uvicorn-513
--reload not working on Windows but --loop asyncio is Duplicate of https://github.com/encode/uvicorn/issues/477 but per request a new topic to track the issue. Especially useful since `--loop asyncio` does seem to work just fine. @tomchristie suggests to default to asyncio on all platforms. I can make a PR for that....
[ { "content": "import sys\n\n\ndef auto_loop_setup():\n try:\n import uvloop\n except ImportError as exc: # pragma: no cover\n if sys.platform == \"win32\":\n from uvicorn.loops.iocp import iocp_setup as loop_setup\n else:\n from uvicorn.loops.asyncio import asyn...
[ { "content": "import sys\n\n\ndef auto_loop_setup():\n try:\n import uvloop\n except ImportError as exc: # pragma: no cover\n from uvicorn.loops.asyncio import asyncio_setup as loop_setup\n\n loop_setup()\n else:\n from uvicorn.loops.uvloop import uvloop_setup\n\n uv...
diff --git a/uvicorn/loops/auto.py b/uvicorn/loops/auto.py index 968d0e598..9489817b6 100644 --- a/uvicorn/loops/auto.py +++ b/uvicorn/loops/auto.py @@ -5,10 +5,7 @@ def auto_loop_setup(): try: import uvloop except ImportError as exc: # pragma: no cover - if sys.platform == "win32": - ...
MongoEngine__mongoengine-2682
is it possible to search null objects ? I'm trying to search `null object` with python `NoneType` but got the below error : `raise ValidationError(message, errors=errors, field_name=field_name) mongoengine.errors.ValidationError: 'null' is not a valid ObjectId, it must be a 12-byte input or a 24-character hex stri...
[ { "content": "import operator\nimport weakref\n\nimport pymongo\nfrom bson import SON, DBRef, ObjectId\n\nfrom mongoengine.base.common import UPDATE_OPERATORS\nfrom mongoengine.base.datastructures import (\n BaseDict,\n BaseList,\n EmbeddedDocumentList,\n)\nfrom mongoengine.common import _import_class\...
[ { "content": "import operator\nimport weakref\n\nimport pymongo\nfrom bson import SON, DBRef, ObjectId\n\nfrom mongoengine.base.common import UPDATE_OPERATORS\nfrom mongoengine.base.datastructures import (\n BaseDict,\n BaseList,\n EmbeddedDocumentList,\n)\nfrom mongoengine.common import _import_class\...
diff --git a/mongoengine/base/fields.py b/mongoengine/base/fields.py index a68035274..8f1595900 100644 --- a/mongoengine/base/fields.py +++ b/mongoengine/base/fields.py @@ -511,7 +511,8 @@ def to_python(self, value): def to_mongo(self, value): if not isinstance(value, ObjectId): try: - ...
cobbler__cobbler-2990
Bug: exception on server: '_DnsmasqManager' object has no attribute 'write_dns_files' All things are done strictly followed RTD. Running on Debian 11. Context linked with Issue #2968 , It is really exhausted to experience such a large number of bugs in few days... ``` root@debian11:~# cobbler system remove --nam...
[ { "content": "\"\"\"\nBuilds out filesystem trees/data based on the object tree.\nThis is the code behind 'cobbler sync'.\n\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 G...
[ { "content": "\"\"\"\nBuilds out filesystem trees/data based on the object tree.\nThis is the code behind 'cobbler sync'.\n\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 G...
diff --git a/cobbler/actions/sync.py b/cobbler/actions/sync.py index 29880fe84e..9fe8c3d73a 100644 --- a/cobbler/actions/sync.py +++ b/cobbler/actions/sync.py @@ -104,7 +104,7 @@ def run_sync_systems(self, systems: List[str]): if self.settings.manage_dns: self.logger.info("rendering DNS files") ...
networkx__networkx-4768
Unable to get the same network from `soft_random_geometric_graph` on different machines I'm unable, with version 2.5 of networkx, to get the same graph from `soft_random_geometric_graph` (with same parameters of course, and same seed of random number generator) A cause of the problem is the fact that `scipy.spatial....
[ { "content": "\"\"\"Generators for geometric graphs.\n\"\"\"\n\nfrom bisect import bisect_left\nfrom itertools import accumulate, combinations, product\nfrom math import sqrt\nimport math\n\nimport networkx as nx\nfrom networkx.utils import nodes_or_number, py_random_state\n\n__all__ = [\n \"geographical_thr...
[ { "content": "\"\"\"Generators for geometric graphs.\n\"\"\"\n\nfrom bisect import bisect_left\nfrom itertools import accumulate, combinations, product\nfrom math import sqrt\nimport math\n\nimport networkx as nx\nfrom networkx.utils import nodes_or_number, py_random_state\n\n__all__ = [\n \"geographical_thr...
diff --git a/networkx/generators/geometric.py b/networkx/generators/geometric.py index 4b7679513b9..045b53e95cf 100644 --- a/networkx/generators/geometric.py +++ b/networkx/generators/geometric.py @@ -52,7 +52,7 @@ def geometric_edges(G, radius, p): nodes, coords = list(zip(*nodes_pos)) kdtree = sp.spatial.cK...
activeloopai__deeplake-1513
[BUG] Pytorch dataloader because of transforms and shuffle=false ## 🐛🐛 Bug Report ### ⚗️ Current Behavior A clear and concise description of the behavior. ```python import hub ds = hub.load("hub://activeloop/mnist-test") dataloader = ds.pytorch(batch_size=2, num_workers=2, shuffle=False, transform={"ima...
[ { "content": "from typing import Callable, Dict, List, Optional\nfrom hub.util.iterable_ordered_dict import IterableOrderedDict\nimport numpy as np\n\n\ndef collate_fn(batch):\n import torch\n\n elem = batch[0]\n\n if isinstance(elem, IterableOrderedDict):\n return IterableOrderedDict(\n ...
[ { "content": "from typing import Callable, Dict, List, Optional\nfrom hub.util.iterable_ordered_dict import IterableOrderedDict\nimport numpy as np\n\n\ndef collate_fn(batch):\n import torch\n\n elem = batch[0]\n\n if isinstance(elem, IterableOrderedDict):\n return IterableOrderedDict(\n ...
diff --git a/hub/integrations/pytorch/common.py b/hub/integrations/pytorch/common.py index 9650dd3b27..e44278dede 100644 --- a/hub/integrations/pytorch/common.py +++ b/hub/integrations/pytorch/common.py @@ -53,5 +53,6 @@ def __call__(self, data_in: Dict) -> Dict: for tensor, fn in self.transform_dict.items...
dynaconf__dynaconf-920
[bug] AttributeError is thrown if one of the configuration keys is an integer **Describe the bug** Dynaconf fails to validate settings if any of the configuration keys are integer. Wrapping the key in quotes fixes the issue, but I would prefer dynaconf to keep its behavior from `3.1.11` where it did handle the integer...
[ { "content": "from __future__ import annotations\n\nimport json\nimport os\nimport re\nimport warnings\nfrom functools import wraps\n\nfrom dynaconf.utils import extract_json_objects\nfrom dynaconf.utils import isnamedtupleinstance\nfrom dynaconf.utils import multi_replace\nfrom dynaconf.utils import recursivel...
[ { "content": "from __future__ import annotations\n\nimport json\nimport os\nimport re\nimport warnings\nfrom functools import wraps\n\nfrom dynaconf.utils import extract_json_objects\nfrom dynaconf.utils import isnamedtupleinstance\nfrom dynaconf.utils import multi_replace\nfrom dynaconf.utils import recursivel...
diff --git a/docs/index.md b/docs/index.md index 144266070..4f46316ed 100644 --- a/docs/index.md +++ b/docs/index.md @@ -666,12 +666,6 @@ pip install dynaconf[redis] Read more on [external loaders](/advanced/#creating-new-loaders) -## Extensions - -Community extensions will be linked here (open for recommendations...
pyca__cryptography-1246
Need binding to void GENERAL_NAMES_free(GENERAL_NAMES *) the function call to d2i methods on the altSubjectName extension returned a dynamicly allocated memory object that must be garbage collected so binding for GENERAL_NAMES_free should be exposed from hazmat so that higher level code can avoid memory leaks. Not sur...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, so...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, so...
diff --git a/cryptography/hazmat/bindings/openssl/x509v3.py b/cryptography/hazmat/bindings/openssl/x509v3.py index 02ec250a4056..b668951a7c06 100644 --- a/cryptography/hazmat/bindings/openssl/x509v3.py +++ b/cryptography/hazmat/bindings/openssl/x509v3.py @@ -82,6 +82,7 @@ void X509V3_set_ctx(X509V3_CTX *, X509 *, X509...
data-for-change__anyway-291
Improve cluster accuracy Cluster aggregates markers in `in_cluster` is using box instead of a circle parameter calculation which I think may cause duplications and inaccuracy
[ { "content": "##\nimport globalmaptiles as globaltiles\nfrom math import cos, sin, atan2, sqrt\nimport time\n##\n \ndef center_geolocation(geolocations):\n \"\"\"\n Provide a relatively accurate center lat, lon returned as a list pair, given\n a list of list pairs.\n ex: in: geolocations = ((lat1,lo...
[ { "content": "##\nimport globalmaptiles as globaltiles\nfrom math import cos, sin, atan2, sqrt\nimport time\n##\n \ndef center_geolocation(geolocations):\n \"\"\"\n Provide a relatively accurate center lat, lon returned as a list pair, given\n a list of list pairs.\n ex: in: geolocations = ((lat1,lo...
diff --git a/static/pymapcluster.py b/static/pymapcluster.py index 373d6ba6f..05a6eeee9 100644 --- a/static/pymapcluster.py +++ b/static/pymapcluster.py @@ -34,8 +34,7 @@ def latlng_to_zoompixels(mercator, lat, lng, zoom): return pix def in_cluster(center, radius, point): - return (point[0] >= center[0] - ra...
urllib3__urllib3-1657
urllib3 should not log an error on certificate mismatch Logging an error and then reraising the exception does not achieve much as the application code will have to handle the exception anyway. It's better to let the application decide if it's a noteworthy event or not. I personally don't think that a certificate mi...
[ { "content": "from __future__ import absolute_import\nimport datetime\nimport logging\nimport os\nimport socket\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport warnings\nfrom .packages import six\nfrom .packages.six.moves.http_client import HTTPConnection as _HTTPConnection\nfrom .pac...
[ { "content": "from __future__ import absolute_import\nimport datetime\nimport logging\nimport os\nimport socket\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport warnings\nfrom .packages import six\nfrom .packages.six.moves.http_client import HTTPConnection as _HTTPConnection\nfrom .pac...
diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py index a138bb2a9e..86b9198a25 100644 --- a/src/urllib3/connection.py +++ b/src/urllib3/connection.py @@ -429,7 +429,7 @@ def _match_hostname(cert, asserted_hostname): try: match_hostname(cert, asserted_hostname) except CertificateError...
getsentry__sentry-48536
Fix logic bug where Group.Status is archived_until_escalating but the GroupInbox.Status is escalating ![Image](https://user-images.githubusercontent.com/10491193/236284761-303ee7f8-c596-4034-b21f-0f44e779e129.png) ## Objective: We are not transitioning the GroupStatus to escalating but transitioned GroupInboxStatus....
[ { "content": "\"\"\"This module has the logic for querying Snuba for the hourly event count for a list of groups.\nThis is later used for generating group forecasts for determining when a group may be escalating.\n\"\"\"\n\nimport logging\nfrom collections import defaultdict\nfrom datetime import datetime, time...
[ { "content": "\"\"\"This module has the logic for querying Snuba for the hourly event count for a list of groups.\nThis is later used for generating group forecasts for determining when a group may be escalating.\n\"\"\"\n\nimport logging\nfrom collections import defaultdict\nfrom datetime import datetime, time...
diff --git a/src/sentry/issues/escalating.py b/src/sentry/issues/escalating.py index 6a2fe07a81e0fc..84e5977b4f98d2 100644 --- a/src/sentry/issues/escalating.py +++ b/src/sentry/issues/escalating.py @@ -258,6 +258,7 @@ def is_escalating(group: Group) -> bool: if group_hourly_count > forecast_today: group....
pwndbg__pwndbg-642
nextcall with symbol bug ### Description after nextcall with unknown symbol/address (like nextcall lol) gdb won't run again ### Steps to reproduce ``` gdb whatever > start > nextcall lol > start > continue Warning: Cannot insert breakpoint -46. Cannot access memory at address 0x7ffff7a6f916 Command ab...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nCommands for setting temporary breakpoints on the next\ninstruction of some type (call, branch, etc.)\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ imp...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nCommands for setting temporary breakpoints on the next\ninstruction of some type (call, branch, etc.)\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ imp...
diff --git a/pwndbg/next.py b/pwndbg/next.py index 42856ce115e..9e86f75a07a 100644 --- a/pwndbg/next.py +++ b/pwndbg/next.py @@ -27,6 +27,14 @@ interrupts = set((capstone.CS_GRP_INT,)) +@pwndbg.events.exit +def clear_temp_breaks(): + if not pwndbg.proc.alive: + breakpoints = gdb.breakpoints() + if...
open-mmlab__mmdetection-4258
typo in WrapFieldsToLists docstring https://github.com/open-mmlab/mmdetection/blob/fb287b144eee70134cd6369f70deb43fdb8d499a/mmdet/datasets/pipelines/formating.py#L327-L345 I think you mean `WrapFieldsToLists` instead of `WrapIntoLists` in line 343.
[ { "content": "from collections.abc import Sequence\n\nimport mmcv\nimport numpy as np\nimport torch\nfrom mmcv.parallel import DataContainer as DC\n\nfrom ..builder import PIPELINES\n\n\ndef to_tensor(data):\n \"\"\"Convert objects of various python types to :obj:`torch.Tensor`.\n\n Supported types are: :...
[ { "content": "from collections.abc import Sequence\n\nimport mmcv\nimport numpy as np\nimport torch\nfrom mmcv.parallel import DataContainer as DC\n\nfrom ..builder import PIPELINES\n\n\ndef to_tensor(data):\n \"\"\"Convert objects of various python types to :obj:`torch.Tensor`.\n\n Supported types are: :...
diff --git a/mmdet/datasets/pipelines/formating.py b/mmdet/datasets/pipelines/formating.py index b47074121d4..5781341bd48 100644 --- a/mmdet/datasets/pipelines/formating.py +++ b/mmdet/datasets/pipelines/formating.py @@ -340,7 +340,7 @@ class WrapFieldsToLists(object): >>> dict(type='Pad', size_divisor=32),...
facebookresearch__hydra-2694
[Bug] Failing lint: Need type annotation for "matches" See `lint` CI job failure on PR #2689. ``` hydra/plugins/completion_plugin.py:110: error: Need type annotation for "matches" (hint: "matches: List[<type>] = ...") [var-annotated] ```
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\n# TODO: Test with /miniconda3/envs/hydra36/bin/python , seems to be running python for some reason.\n# TODO: Add tests for completion with +prefix (should suggest config groups that are not listed)\n# TODO: Test completion w...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\n# TODO: Test with /miniconda3/envs/hydra36/bin/python , seems to be running python for some reason.\n# TODO: Add tests for completion with +prefix (should suggest config groups that are not listed)\n# TODO: Test completion w...
diff --git a/hydra/plugins/completion_plugin.py b/hydra/plugins/completion_plugin.py index 328f03623ba..ac5024bb5d6 100644 --- a/hydra/plugins/completion_plugin.py +++ b/hydra/plugins/completion_plugin.py @@ -107,7 +107,7 @@ def str_rep(in_key: Any, in_value: Any) -> str: if config is None: return...
unionai-oss__pandera-1266
Fix to_script description #### Location of the documentation [DataFrameSchema.to_script](https://github.com/unionai-oss/pandera/blob/62bc4840508ff1ac0df595b57b2152737a1228a2/pandera/api/pandas/container.py#L1251) #### Documentation problem This method has the description for `from_yaml`. #### Suggested fix ...
[ { "content": "\"\"\"Core pandas dataframe container specification.\"\"\"\n\nfrom __future__ import annotations\n\nimport copy\nimport os\nimport warnings\nfrom pathlib import Path\nfrom typing import Any, Dict, List, Optional, Union, cast, overload\n\nimport pandas as pd\n\nfrom pandera import errors\nfrom pand...
[ { "content": "\"\"\"Core pandas dataframe container specification.\"\"\"\n\nfrom __future__ import annotations\n\nimport copy\nimport os\nimport warnings\nfrom pathlib import Path\nfrom typing import Any, Dict, List, Optional, Union, cast, overload\n\nimport pandas as pd\n\nfrom pandera import errors\nfrom pand...
diff --git a/pandera/api/pandas/container.py b/pandera/api/pandas/container.py index 37551557c..5c53cf111 100644 --- a/pandera/api/pandas/container.py +++ b/pandera/api/pandas/container.py @@ -1249,7 +1249,7 @@ def reset_index( ##################### def to_script(self, fp: Union[str, Path] = None) -> "DataF...
interlegis__sapl-2240
Edição de norma: não recupera Esfera Federação Ao editar dados de uma norma, o campo Esfera Federação não é recuperado. A segunda figura mostra a tela de edição. O sistema acaba reclamando tal dado depois de salvar. ![captura de tela de 2018-09-19 11-14-15](https://user-images.githubusercontent.com/19169882/45759143-...
[ { "content": "\nimport re\n\nfrom django.contrib.auth.mixins import PermissionRequiredMixin\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.core.urlresolvers import reverse\nfrom django.http import HttpResponse, JsonResponse\nfrom django.template import RequestContext, loader\nfrom django.ut...
[ { "content": "\nimport re\n\nfrom django.contrib.auth.mixins import PermissionRequiredMixin\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.core.urlresolvers import reverse\nfrom django.http import HttpResponse, JsonResponse\nfrom django.template import RequestContext, loader\nfrom django.ut...
diff --git a/sapl/norma/views.py b/sapl/norma/views.py index 2cb4455c9..beae10d4d 100644 --- a/sapl/norma/views.py +++ b/sapl/norma/views.py @@ -236,6 +236,7 @@ def get_initial(self): initial['tipo_materia'] = norma.materia.tipo initial['ano_materia'] = norma.materia.ano ...
voicepaw__so-vits-svc-fork-291
Learning rate (display) issue **Describe the bug** I have set a different learning rate (compared to the default 1e-4) as well as a different value of lr_decay for my training in config.json. However during training the lr displayed in Tensorboard shows a constant value of 1e-4 at any steps. **To Reproduce** S...
[ { "content": "from __future__ import annotations\n\nimport warnings\nfrom logging import getLogger\nfrom pathlib import Path\nfrom typing import Any\n\nimport lightning.pytorch as pl\nimport torch\nfrom lightning.pytorch.accelerators import TPUAccelerator\nfrom lightning.pytorch.loggers import TensorBoardLogger...
[ { "content": "from __future__ import annotations\n\nimport warnings\nfrom logging import getLogger\nfrom pathlib import Path\nfrom typing import Any\n\nimport lightning.pytorch as pl\nimport torch\nfrom lightning.pytorch.accelerators import TPUAccelerator\nfrom lightning.pytorch.loggers import TensorBoardLogger...
diff --git a/src/so_vits_svc_fork/train.py b/src/so_vits_svc_fork/train.py index 357cd39d..98cae807 100644 --- a/src/so_vits_svc_fork/train.py +++ b/src/so_vits_svc_fork/train.py @@ -418,6 +418,11 @@ def training_step(self, batch: dict[str, torch.Tensor], batch_idx: int) -> None: optim_d.step() self.u...
matrix-org__synapse-8583
mypy==0.782 will cause mypy-zope dependency regression in future pip releases ## Description Pip is planning to use a [new resolver by default from `20.3`](https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-2-2020), which is more strict in it's dependency handling. Currently, `...
[ { "content": "#!/usr/bin/env python\n\n# Copyright 2014-2017 OpenMarket Ltd\n# Copyright 2017 Vector Creations Ltd\n# Copyright 2017-2018 New Vector 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...
[ { "content": "#!/usr/bin/env python\n\n# Copyright 2014-2017 OpenMarket Ltd\n# Copyright 2017 Vector Creations Ltd\n# Copyright 2017-2018 New Vector 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...
diff --git a/changelog.d/8583.misc b/changelog.d/8583.misc new file mode 100644 index 000000000000..d24973f09af1 --- /dev/null +++ b/changelog.d/8583.misc @@ -0,0 +1 @@ +Update `mypy` static type checker to 0.790. \ No newline at end of file diff --git a/setup.py b/setup.py index 08843fe2a3e4..494f50239f30 100755 --- a...
spyder-ide__spyder-7251
Adding, removing, or moving a breakpoint while debugging changes the focus ## Description **What steps will reproduce the problem?** 1. Debug 2. Press return in the text editor 3. Watch as the focus goes back to ipython ## Version and main components * Spyder Version: 3.2.4.dev0 474e59379 * Python Vers...
[ { "content": "#\r\n# Copyright (c) Spyder Project Contributors)\r\n# Licensed under the terms of the MIT License)\r\n# (see spyder/__init__.py for details)\r\n#\r\n# IMPORTANT NOTE: Don't add a coding line here! It's not necessary for\r\n# site files\r\n#\r\n# Spyder consoles sitecustomize\r\n#\r\n\r\nimport bd...
[ { "content": "#\r\n# Copyright (c) Spyder Project Contributors)\r\n# Licensed under the terms of the MIT License)\r\n# (see spyder/__init__.py for details)\r\n#\r\n# IMPORTANT NOTE: Don't add a coding line here! It's not necessary for\r\n# site files\r\n#\r\n# Spyder consoles sitecustomize\r\n#\r\n\r\nimport bd...
diff --git a/spyder/utils/site/sitecustomize.py b/spyder/utils/site/sitecustomize.py index 99d95f1835f..5bb7adf0103 100644 --- a/spyder/utils/site/sitecustomize.py +++ b/spyder/utils/site/sitecustomize.py @@ -490,7 +490,8 @@ def reset(self): # specific behaviour desired?) @monkeypatch_method(pdb.Pdb, 'Pdb') de...
sublimelsp__LSP-450
Don't move cursor at the end when populating the diagnostics panel When the diagnostics are populated the cursor in the panel is moved to the end. See [here](https://github.com/tomv564/LSP/blob/2869978d8b46d717da27eb0ac7a7e234840b218d/plugin/core/panels.py#L53-L56). Is there a reason for this? Because I can't us...
[ { "content": "import sublime\nimport sublime_plugin\n\n\nOUTPUT_PANEL_SETTINGS = {\n \"auto_indent\": False,\n \"draw_indent_guides\": False,\n \"draw_white_space\": \"None\",\n \"gutter\": False,\n 'is_widget': True,\n \"line_numbers\": False,\n \"margin\": 3,\n \"match_brackets\": Fals...
[ { "content": "import sublime\nimport sublime_plugin\n\n\nOUTPUT_PANEL_SETTINGS = {\n \"auto_indent\": False,\n \"draw_indent_guides\": False,\n \"draw_white_space\": \"None\",\n \"gutter\": False,\n 'is_widget': True,\n \"line_numbers\": False,\n \"margin\": 3,\n \"match_brackets\": Fals...
diff --git a/plugin/core/panels.py b/plugin/core/panels.py index 7d0f4cb6b..e6927b3e7 100644 --- a/plugin/core/panels.py +++ b/plugin/core/panels.py @@ -50,7 +50,6 @@ class LspUpdatePanelCommand(sublime_plugin.TextCommand): def run(self, edit, characters): self.view.replace(edit, sublime.Region(0, self.vi...
learningequality__kolibri-2957
spurious sphinx warnings due to duplicate labels in included files ### Observed behavior <!-- Description of the behavior that was observed, including screenshots or other references when applicable --> ``` /Users/d/Projects/learning_equality/repos/k2/docs/install/advanced.rst:13: WARNING: duplicate label advanc...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Kolibri 'user docs' documentation build configuration file\n#\n# This file is execfile()d with the current directory set to its containing dir.\n\n\nfrom datetime import datetime\nimport os\nimport sys\n\n\n# If extensions (or modules to document with autodoc) are in ...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Kolibri 'user docs' documentation build configuration file\n#\n# This file is execfile()d with the current directory set to its containing dir.\n\n\nfrom datetime import datetime\nimport os\nimport sys\n\n\n# If extensions (or modules to document with autodoc) are in ...
diff --git a/docs/coach.rst b/docs/coach.rst index 9d484239a5c..7604319f0bb 100644 --- a/docs/coach.rst +++ b/docs/coach.rst @@ -33,10 +33,10 @@ Use this view to access the full report of activity progress for the selected cl :alt: activity by topic view -.. include:: manage_groups.rst +.. include:: manage/_gro...
openstates__openstates-scrapers-382
NY: Committees don't have members Taken from bug #195 http://openstates.org/browse/ny/committees/ http://www.nysenate.gov/committee/state-native-american-relations http://assembly.state.ny.us/comm/?sec=mem&id=60
[ { "content": "import re\n\nfrom billy.scrape import NoDataForPeriod\nfrom billy.scrape.committees import CommitteeScraper, Committee\n\nimport lxml.html\n\n\ndef parse_name(name):\n \"\"\"\n Split a committee membership string into name and role.\n\n >>> parse_name('Felix Ortiz')\n ('Felix Ortiz', '...
[ { "content": "import re\n\nfrom billy.scrape import NoDataForPeriod\nfrom billy.scrape.committees import CommitteeScraper, Committee\n\nimport lxml.html\n\n\ndef parse_name(name):\n \"\"\"\n Split a committee membership string into name and role.\n\n >>> parse_name('Felix Ortiz')\n ('Felix Ortiz', '...
diff --git a/openstates/ny/committees.py b/openstates/ny/committees.py index a3cbce6357..d28a63ed05 100644 --- a/openstates/ny/committees.py +++ b/openstates/ny/committees.py @@ -68,7 +68,7 @@ def scrape_lower_committee(self, name, url): comm = Committee('lower', name) comm.add_source(url) - ...
cloudtools__troposphere-1289
Tags of mixed type cannot be used on python 3 ``` troyready $ python3 Python 3.6.6 (default, Sep 12 2018, 18:26:19) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from troposphere import Sub, Tags >>> Tags({Sub('myst...
[ { "content": "# Copyright (c) 2012-2017, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\n\nimport cfn_flip\nimport collections\nimport json\nimport re\nimport sys\nimport types\n\nfrom . import validators\n\n__version__ = \"2.4.1\"\n\n# constants for DeletionPolicy\...
[ { "content": "# Copyright (c) 2012-2017, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\n\nimport cfn_flip\nimport collections\nimport json\nimport re\nimport sys\nimport types\n\nfrom . import validators\n\n__version__ = \"2.4.1\"\n\n# constants for DeletionPolicy\...
diff --git a/tests/test_tags.py b/tests/test_tags.py index 5e2b496df..5b9122254 100644 --- a/tests/test_tags.py +++ b/tests/test_tags.py @@ -1,5 +1,5 @@ import unittest -from troposphere import Tags +from troposphere import Sub, Tags from troposphere.autoscaling import Tags as ASTags @@ -26,6 +26,11 @@ def test_A...
django-wiki__django-wiki-981
Tests are failing in Travis ``` Traceback (most recent call last): File "/home/travis/build/django-wiki/django-wiki/.tox/py36-django22/bin/pytest", line 7, in <module> from pytest import main File "/home/travis/build/django-wiki/django-wiki/.tox/py36-django22/lib/python3.6/site-packages/pytest.py", li...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nfrom glob import glob\n\nfrom setuptools import find_packages, setup\n\nsys.path.append(\n os.path.join(os.path.dirname(__file__), 'src')\n)\n\n# noqa\nfrom wiki import __version__ # isort:skip # noqa\n\n\n# Utility func...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nfrom glob import glob\n\nfrom setuptools import find_packages, setup\n\nsys.path.append(\n os.path.join(os.path.dirname(__file__), 'src')\n)\n\n# noqa\nfrom wiki import __version__ # isort:skip # noqa\n\n\n# Utility func...
diff --git a/setup.py b/setup.py index f8c243754..bee46b5bd 100755 --- a/setup.py +++ b/setup.py @@ -36,14 +36,14 @@ def get_path(fname): test_requirements = [ 'django-functest>=1.0.3,<1.1', - 'pytest>=3.4,<3.5', - 'pytest-django>=3.1,<3.2', - 'pytest-cov>=2.4,<2.5', - 'pytest-pythonpath>=0.7,<0.8',...
bokeh__bokeh-5433
Extend TextInput with `placeholder` `placeholder` and `pattern` are nice features in HTML to give the user info about the field and to validate the user-input. Add `placeholder` and `pattern` to `TextInput` in python, extend `text_input.coffee` and the `text_input_template.eco`
[ { "content": "\"\"\" Various kinds of input widgets and form controls.\n\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom ...core.properties import abstract\nfrom ...core.properties import Bool, Int, Float, String, Date, RelativeDelta, Enum, List, Tuple, Either, Instance\nfrom ..callbacks import Callback...
[ { "content": "\"\"\" Various kinds of input widgets and form controls.\n\n\"\"\"\nfrom __future__ import absolute_import\n\nfrom ...core.properties import abstract\nfrom ...core.properties import Bool, Int, Float, String, Date, RelativeDelta, Enum, List, Tuple, Either, Instance\nfrom ..callbacks import Callback...
diff --git a/bokeh/models/widgets/inputs.py b/bokeh/models/widgets/inputs.py index 4e0bd389e36..992027b0bc0 100644 --- a/bokeh/models/widgets/inputs.py +++ b/bokeh/models/widgets/inputs.py @@ -43,6 +43,10 @@ class TextInput(InputWidget): A callback to run in the browser whenever the user unfocuses the TextInput ...
napari__napari-2524
Shuffle in labels layer broken in current master ## 🐛 Bug In the current master, clicking shuffle in the labels layer has no effect. ## To Reproduce Steps to reproduce the behavior: 1. Open the viewer with a label layer. E.g. run `examples/labels-2d.py` 2. Select the labels layer 3. Click the suffle bu...
[ { "content": "import warnings\nfrom collections import deque\nfrom typing import Dict, Union\n\nimport numpy as np\nfrom scipy import ndimage as ndi\n\nfrom ...utils.colormaps import (\n color_dict_to_colormap,\n label_colormap,\n low_discrepancy_image,\n)\nfrom ...utils.events import Event\nfrom ...ut...
[ { "content": "import warnings\nfrom collections import deque\nfrom typing import Dict, Union\n\nimport numpy as np\nfrom scipy import ndimage as ndi\n\nfrom ...utils.colormaps import (\n color_dict_to_colormap,\n label_colormap,\n low_discrepancy_image,\n)\nfrom ...utils.events import Event\nfrom ...ut...
diff --git a/napari/layers/labels/_tests/test_labels.py b/napari/layers/labels/_tests/test_labels.py index a48d82bb0bc..63928a8fcc6 100644 --- a/napari/layers/labels/_tests/test_labels.py +++ b/napari/layers/labels/_tests/test_labels.py @@ -4,6 +4,7 @@ import pytest import xarray as xr from numpy.core.numerictypes i...
litestar-org__litestar-1288
Fix typo in from_config class method Quick searches against the codebase show this also has that `startlite` typo https://github.com/starlite-api/starlite/blob/abc0ff41ac917afd8d8af718949de2ea935ca44c/starlite/app.py#L466 _Originally posted by @JacobCoffee in https://github.com/starlite-api/starlite/issues/1284#iss...
[ { "content": "from __future__ import annotations\n\nfrom datetime import date, datetime, time, timedelta\nfrom functools import partial\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Mapping, Sequence, cast\n\nfrom pydantic_openapi_schema import construct_open_api_with_schema_class\nfrom typi...
[ { "content": "from __future__ import annotations\n\nfrom datetime import date, datetime, time, timedelta\nfrom functools import partial\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, Any, Mapping, Sequence, cast\n\nfrom pydantic_openapi_schema import construct_open_api_with_schema_class\nfrom typi...
diff --git a/starlite/app.py b/starlite/app.py index 602cb13fce..f4b6a3fdb9 100644 --- a/starlite/app.py +++ b/starlite/app.py @@ -463,7 +463,7 @@ def from_config(cls, config: AppConfig) -> Self: """Initialize a ``Starlite`` application from a configuration instance. Args: - config: An in...
pymodbus-dev__pymodbus-1925
Single byte error response handling ### Versions - Python: 3.11 - OS: Ubuntu 22.04 - Pymodbus: 3.6.2 - Modbus Hardware (if used): Sungrow Inverter ### Pymodbus Specific - Client: tcp async ### Description #### Current State When I query my sungrow inverter with a register I'm not supposed to be query...
[ { "content": "\"\"\"Socket framer.\"\"\"\n# pylint: disable=missing-type-doc\nimport struct\n\nfrom pymodbus.exceptions import (\n InvalidMessageReceivedException,\n ModbusIOException,\n)\nfrom pymodbus.framer.base import SOCKET_FRAME_HEADER, ModbusFramer\nfrom pymodbus.logging import Log\n\n\n# ---------...
[ { "content": "\"\"\"Socket framer.\"\"\"\n# pylint: disable=missing-type-doc\nimport struct\n\nfrom pymodbus.exceptions import (\n InvalidMessageReceivedException,\n ModbusIOException,\n)\nfrom pymodbus.framer.base import SOCKET_FRAME_HEADER, ModbusFramer\nfrom pymodbus.logging import Log\n\n\n# ---------...
diff --git a/pymodbus/framer/socket_framer.py b/pymodbus/framer/socket_framer.py index 162c8ddfd..f0630888c 100644 --- a/pymodbus/framer/socket_framer.py +++ b/pymodbus/framer/socket_framer.py @@ -96,7 +96,7 @@ def getFrame(self): :returns: The next full frame buffer """ - length = self._hsiz...