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 ⌀ |
|---|---|---|---|---|
getsentry__sentry-python-773 | DjangoIntegration conflict with MiddlewareMixin & TemplateView
django version: 3.0
sentry-sdk version: 0.14.3
My project has a middleware using Django's `django.utils.deprecation.MiddlewareMixin`. Visiting a view which subclasses `django.views.generic.TemplateView` while Sentry is active results in the following ex... | [
{
"content": "\"\"\"\nCreate spans from Django middleware invocations\n\"\"\"\n\nfrom django import VERSION as DJANGO_VERSION\n\nfrom sentry_sdk import Hub\nfrom sentry_sdk._functools import wraps\nfrom sentry_sdk._types import MYPY\nfrom sentry_sdk.utils import (\n ContextVar,\n transaction_from_function... | [
{
"content": "\"\"\"\nCreate spans from Django middleware invocations\n\"\"\"\n\nfrom django import VERSION as DJANGO_VERSION\n\nfrom sentry_sdk import Hub\nfrom sentry_sdk._functools import wraps\nfrom sentry_sdk._types import MYPY\nfrom sentry_sdk.utils import (\n ContextVar,\n transaction_from_function... | diff --git a/sentry_sdk/integrations/django/middleware.py b/sentry_sdk/integrations/django/middleware.py
index ab582d1ce0..88d89592d8 100644
--- a/sentry_sdk/integrations/django/middleware.py
+++ b/sentry_sdk/integrations/django/middleware.py
@@ -91,9 +91,14 @@ def sentry_wrapped_method(*args, **kwargs):
... |
encode__starlette-1218 | Consider making `starlette.templating.Jinja2Templates.get_env` "protected"
Hi,
Thank you very much for your project! We are using it intensively through FastAPI.
While I was exploring the code base and looking how to use `Jinja2Templates`, I noticed the method `get_env`. At first I thought it was a getter for the e... | [
{
"content": "import typing\n\nfrom starlette.background import BackgroundTask\nfrom starlette.responses import Response\nfrom starlette.types import Receive, Scope, Send\n\ntry:\n import jinja2\n\n # @contextfunction renamed to @pass_context in Jinja 3.0, to be removed in 3.1\n if hasattr(jinja2, \"pa... | [
{
"content": "import typing\n\nfrom starlette.background import BackgroundTask\nfrom starlette.responses import Response\nfrom starlette.types import Receive, Scope, Send\n\ntry:\n import jinja2\n\n # @contextfunction renamed to @pass_context in Jinja 3.0, to be removed in 3.1\n if hasattr(jinja2, \"pa... | diff --git a/starlette/templating.py b/starlette/templating.py
index 64fdbd14f..36f613fdf 100644
--- a/starlette/templating.py
+++ b/starlette/templating.py
@@ -56,9 +56,9 @@ class Jinja2Templates:
def __init__(self, directory: str) -> None:
assert jinja2 is not None, "jinja2 must be installed to use Ji... |
geopandas__geopandas-2619 | ENH: Improve error message for attempting to write multiple geometry columns using `to_file`
xref #2565
```python
In [16]: gdf = gpd.GeoDataFrame({"a":[1,2]}, geometry=[Point(1,1), Point(1,2)])
In [17]: gdf['geom2'] = gdf.geometry
In [18]: gdf.to_file("tmp.gpkg")
-----------------------------------
File ...... | [
{
"content": "import os\nfrom packaging.version import Version\nfrom pathlib import Path\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import is_integer_dtype\n\nimport pyproj\nfrom shapely.geometry import mapping\nfrom shapely.geometry.base import BaseGeometry\n\nfrom geopa... | [
{
"content": "import os\nfrom packaging.version import Version\nfrom pathlib import Path\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import is_integer_dtype\n\nimport pyproj\nfrom shapely.geometry import mapping\nfrom shapely.geometry.base import BaseGeometry\n\nfrom geopa... | diff --git a/geopandas/io/file.py b/geopandas/io/file.py
index bcf311c19d..8832e402a2 100644
--- a/geopandas/io/file.py
+++ b/geopandas/io/file.py
@@ -565,6 +565,15 @@ def _to_file(
stacklevel=3,
)
+ if (df.dtypes == "geometry").sum() > 1:
+ raise ValueError(
+ "GeoDataFrame... |
chainer__chainer-7202 | `eps` is doubly added to variance in inference of `L.BatchRenormalization`
- `runninng_var` learns variances with `eps`
- `train=False` mode uses `running_var + eps`
### Conditions
I tested with Chainer versions: `3.0.0`, `4.5.0`, `5.4.0`, `7.0.0a1`
### Code to reproduce
```python
import chainer
import numpy... | [
{
"content": "import warnings\n\nimport numpy\n\nfrom chainer import backend\nfrom chainer.backends import cuda\nfrom chainer import configuration\nfrom chainer import function\nfrom chainer.functions.normalization import batch_normalization\nfrom chainer.utils import type_check\n\n\ndef _xhat(x, mean, std, exp... | [
{
"content": "import warnings\n\nimport numpy\n\nfrom chainer import backend\nfrom chainer.backends import cuda\nfrom chainer import configuration\nfrom chainer import function\nfrom chainer.functions.normalization import batch_normalization\nfrom chainer.utils import type_check\n\n\ndef _xhat(x, mean, std, exp... | diff --git a/chainer/functions/normalization/batch_renormalization.py b/chainer/functions/normalization/batch_renormalization.py
index 47a5aa304bc8..2256bbbd20c1 100644
--- a/chainer/functions/normalization/batch_renormalization.py
+++ b/chainer/functions/normalization/batch_renormalization.py
@@ -76,8 +76,8 @@ def for... |
benoitc__gunicorn-1115 | Close File Handles on HUP Signal
This is related to https://github.com/benoitc/gunicorn/pull/624#issuecomment-25983432. Please let me know if any additional details are required, or if I can assist in some way.
I first proposed closing explicitly, but probably not the best way to do it. Another option is to hold on to... | [
{
"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\nfrom __future__ import print_function\n\nimport errno\nimport os\nimport random\nimport select\nimport signal\nimport sys\nimport time\nimport traceback\n\nfrom gunico... | [
{
"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\nfrom __future__ import print_function\n\nimport errno\nimport os\nimport random\nimport select\nimport signal\nimport sys\nimport time\nimport traceback\n\nfrom gunico... | diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py
index 9985d9445..92e6daea3 100644
--- a/gunicorn/arbiter.py
+++ b/gunicorn/arbiter.py
@@ -56,6 +56,7 @@ def __init__(self, app):
self._num_workers = None
self._last_logged_active_worker_count = None
+ self.log = None
self.setup... |
voicepaw__so-vits-svc-fork-58 | AlsaOpen error
**Describe the bug**
Audio does not play using svcg
**To Reproduce**
Steps to reproduce the behaviour:
1. svcg
2. select a .wav file under "input audio path"
3. press the "play" button
**Additional context**
Add any other context about the problem here.
The following error appears when tryin... | [
{
"content": "from __future__ import annotations\n\nimport json\nfrom logging import getLogger\nfrom pathlib import Path\n\nimport PySimpleGUI as sg\nimport sounddevice as sd\nimport soundfile as sf\nimport torch\nfrom pebble import ProcessPool\n\nfrom .__main__ import init_logger\n\nGUI_DEFAULT_PRESETS_PATH = ... | [
{
"content": "from __future__ import annotations\n\nimport json\nfrom logging import getLogger\nfrom pathlib import Path\n\nimport librosa\nimport PySimpleGUI as sg\nimport sounddevice as sd\nimport torch\nfrom pebble import ProcessPool\n\nfrom .__main__ import init_logger\n\nGUI_DEFAULT_PRESETS_PATH = Path(__f... | diff --git a/src/so_vits_svc_fork/gui.py b/src/so_vits_svc_fork/gui.py
index b0c37154..5b5b25e7 100644
--- a/src/so_vits_svc_fork/gui.py
+++ b/src/so_vits_svc_fork/gui.py
@@ -4,9 +4,9 @@
from logging import getLogger
from pathlib import Path
+import librosa
import PySimpleGUI as sg
import sounddevice as sd
-impor... |
facebookresearch__dynabench-766 | Creating a task with the "Task Code" as a number doesn't work as expected.
After creating a task with the task code as a number, and accepting the task, when users want to navigate to the task, it should ideally take us to a page which says "The task owner still needs to activate this task.", but in this case, we are s... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport re\n\nimport bottle\n\nimport common.auth as _auth\nimport common.helpers as util\nfrom common.logging import l... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport re\n\nimport bottle\n\nimport common.auth as _auth\nimport common.helpers as util\nfrom common.logging import l... | diff --git a/api/controllers/task_proposals.py b/api/controllers/task_proposals.py
index 8ceba3e0..ddb3ac7b 100644
--- a/api/controllers/task_proposals.py
+++ b/api/controllers/task_proposals.py
@@ -66,11 +66,13 @@ def create_task_proposal(credentials):
if tm.getByName(data["name"]):
bottle.abort(400, "In... |
scikit-hep__pyhf-369 | papermill seems to break? pin version?
# Description
In the CI for @nikoladze's PR https://github.com/diana-hep/pyhf/pull/365 it seems like papermill is breaking for unrelated reasons. Did something change upstream? Maybe we need to pin the version? Maybe @matthewfeickert knows?
https://travis-ci.org/diana-hep/... | [
{
"content": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nfrom os import path\nimport sys\n\nthis_directory = path.abspath(path.dirname(__file__))\nif sys.version_info.major < 3:\n from io import open\nwith open(path.join(this_directory, 'README.md'), encoding='utf-8') as readme_md:... | [
{
"content": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nfrom os import path\nimport sys\n\nthis_directory = path.abspath(path.dirname(__file__))\nif sys.version_info.major < 3:\n from io import open\nwith open(path.join(this_directory, 'README.md'), encoding='utf-8') as readme_md:... | diff --git a/setup.py b/setup.py
index 3f3479c6d0..e9099cc543 100644
--- a/setup.py
+++ b/setup.py
@@ -31,7 +31,7 @@
'minuit': ['iminuit'],
'develop': [
'pyflakes',
- 'pytest>=3.5.1',
+ 'pytest<4.0.0,>=3.5.1',
'pytest-cov>=2.5.1',
'pytest-benchmark[histogram]',
... |
azavea__raster-vision-1958 | Multi-temporal raster source visualizer fails when batch size is 1
https://github.com/azavea/raster-vision/blob/e4e10ad04313bbe5355693ef96f3854f7963f2b1/rastervision_pytorch_learner/rastervision/pytorch_learner/dataset/visualizer/visualizer.py#L122-L127
This code fails when the batch size is 1 because the created `s... | [
{
"content": "from typing import (TYPE_CHECKING, Sequence, Optional, List, Dict, Union,\n Tuple, Any)\nfrom abc import ABC, abstractmethod\n\nimport numpy as np\nimport torch\nfrom torch import Tensor\nimport albumentations as A\nfrom torch.utils.data import DataLoader\nimport matplotlib.pypl... | [
{
"content": "from typing import (TYPE_CHECKING, Sequence, Optional, List, Dict, Union,\n Tuple, Any)\nfrom abc import ABC, abstractmethod\n\nimport numpy as np\nimport torch\nfrom torch import Tensor\nimport albumentations as A\nfrom torch.utils.data import DataLoader\nimport matplotlib.pypl... | diff --git a/rastervision_pytorch_learner/rastervision/pytorch_learner/dataset/visualizer/visualizer.py b/rastervision_pytorch_learner/rastervision/pytorch_learner/dataset/visualizer/visualizer.py
index 82491106a..0866da8b2 100644
--- a/rastervision_pytorch_learner/rastervision/pytorch_learner/dataset/visualizer/visual... |
django-helpdesk__django-helpdesk-729 | Email BODY html attachements weirdly formatted
Here's an example with sensitive information removed:
```
Please s= ee the confirmation email (about my Dec survey) as below.=C2=A0
---------------------
Hello,
This is a courtesy e-mail to let you know that t= icket [bugs-133] ("Missing survey: NHpokemon8") f... | [
{
"content": "\"\"\"\nDjango Helpdesk - A Django powered ticket tracker for small enterprise.\n\n(c) Copyright 2008 Jutda. Copyright 2018 Timothy Hobbs. All Rights Reserved.\nSee LICENSE for details.\n\"\"\"\nfrom django.core.exceptions import ValidationError\nfrom django.core.files.base import ContentFile\nfro... | [
{
"content": "\"\"\"\nDjango Helpdesk - A Django powered ticket tracker for small enterprise.\n\n(c) Copyright 2008 Jutda. Copyright 2018 Timothy Hobbs. All Rights Reserved.\nSee LICENSE for details.\n\"\"\"\nfrom django.core.exceptions import ValidationError\nfrom django.core.files.base import ContentFile\nfro... | diff --git a/helpdesk/email.py b/helpdesk/email.py
index ff80f47ac..2e0765857 100644
--- a/helpdesk/email.py
+++ b/helpdesk/email.py
@@ -481,8 +481,9 @@ def object_from_message(message, queue, logger):
body.encode('utf-8')
logger.debug("Discovered plain text MIME part")
... |
HypothesisWorks__hypothesis-1945 | `test_explore_an_arbitrary_language` is flaky, due to generation bug?
[`test_explore_an_arbitrary_language`, in nocover, is very rarely flaky:](https://dev.azure.com/HypothesisWorks/Hypothesis/_build/results?buildId=1962&view=logs&jobId=e771faf7-decc-5078-b020-68d81ccdda55&taskId=f294e442-b720-52ee-9932-30c03a7f96ef&li... | [
{
"content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Most of this work is copyright (C) 2013-2019 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full li... | [
{
"content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis/\n#\n# Most of this work is copyright (C) 2013-2019 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a full li... | diff --git a/guides/testing-hypothesis.rst b/guides/testing-hypothesis.rst
index d112e50557..97219f4c0a 100644
--- a/guides/testing-hypothesis.rst
+++ b/guides/testing-hypothesis.rst
@@ -169,5 +169,5 @@ Some useful arguments to pytest include:
of the test names. For example ``-kfoo`` will only run tests that have "f... |
Qiskit__qiskit-2416 | rep_times should be integer and not float in provider models
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->
### Information
- **Qiskit Terra version**:
- **Python version**:
- **Operating system**:
### What is the curre... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2018.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2018.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org... | diff --git a/qiskit/providers/models/backendconfiguration.py b/qiskit/providers/models/backendconfiguration.py
index 75b9e1119389..080426430277 100644
--- a/qiskit/providers/models/backendconfiguration.py
+++ b/qiskit/providers/models/backendconfiguration.py
@@ -120,7 +120,7 @@ class PulseBackendConfigurationSchema(Qas... |
pypa__pip-8062 | Unable to install package on different logical disk
* Pip version: 20.0.1/19.3.1
* Python version: Python 3.6.8
* Operating system: Win10 64-bit, build 18362.535.
While executing (note two different logical disks)
`F:\temp\.venv\Scripts\pip install --prefix "C:\temp" "greenlet>=0.4.14"`
pip exits with an unhandl... | [
{
"content": "\"\"\"Support for installing and building the \"wheel\" binary package format.\n\"\"\"\n\nfrom __future__ import absolute_import\n\nimport collections\nimport compileall\nimport contextlib\nimport csv\nimport logging\nimport os.path\nimport re\nimport shutil\nimport stat\nimport sys\nimport warnin... | [
{
"content": "\"\"\"Support for installing and building the \"wheel\" binary package format.\n\"\"\"\n\nfrom __future__ import absolute_import\n\nimport collections\nimport compileall\nimport contextlib\nimport csv\nimport logging\nimport os.path\nimport re\nimport shutil\nimport stat\nimport sys\nimport warnin... | diff --git a/news/7625.bugfix b/news/7625.bugfix
new file mode 100644
index 00000000000..3a675f8d2b0
--- /dev/null
+++ b/news/7625.bugfix
@@ -0,0 +1 @@
+Fix normalizing path on Windows when installing package on another logical disk.
diff --git a/src/pip/_internal/operations/install/wheel.py b/src/pip/_internal/operati... |
PyGithub__PyGithub-2078 | Add an option to delete workflow runs
This worked for me:
```python
# get repo
repo = g.get_repo("repo name")
# list workflows
for workflow in repo.get_workflows():
print("ID: '{}', Name: '{}', State: '{}'".format(workflow.id, workflow.name, workflow.state))
# get runs and delete workflow run: if workf... | [
{
"content": "############################ Copyrights and license ############################\n# #\n# Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #\n# ... | [
{
"content": "############################ Copyrights and license ############################\n# #\n# Copyright 2020 Steve Kowalik <steven@wedontsleep.org> #\n# ... | diff --git a/github/WorkflowRun.py b/github/WorkflowRun.py
index b9748940b8..4c1cfad1b0 100644
--- a/github/WorkflowRun.py
+++ b/github/WorkflowRun.py
@@ -243,6 +243,14 @@ def timing(self):
timingdata = namedtuple("TimingData", data.keys())
return timingdata._make(data.values())
+ def delete(self... |
mkdocs__mkdocs-379 | Missing pages build the previous page rather than being skipped
The output shows a warning and that the page is missing, but we incorrectly re-render the previous page in it's place.
| [
{
"content": "# coding: utf-8\nfrom __future__ import print_function\n\nfrom jinja2.exceptions import TemplateNotFound\nfrom mkdocs import nav, toc, utils\nfrom mkdocs.compat import urljoin, PY2\nfrom mkdocs.relative_path_ext import RelativePathExtension\nimport jinja2\nimport json\nimport markdown\nimport os\n... | [
{
"content": "# coding: utf-8\nfrom __future__ import print_function\n\nfrom jinja2.exceptions import TemplateNotFound\nfrom mkdocs import nav, toc, utils\nfrom mkdocs.compat import urljoin, PY2\nfrom mkdocs.relative_path_ext import RelativePathExtension\nimport jinja2\nimport json\nimport markdown\nimport os\n... | diff --git a/mkdocs/build.py b/mkdocs/build.py
index 11246feb23..5efc0c359b 100644
--- a/mkdocs/build.py
+++ b/mkdocs/build.py
@@ -157,10 +157,13 @@ def build_pages(config, dump_json=False):
for page in site_navigation.walk_pages():
# Read the input file
input_path = os.path.join(config['docs_dir... |
ultralytics__yolov5-10359 | clearml logs defaults args when use run function
### Search before asking
- [X] I have searched the YOLOv5 [issues](https://github.com/ultralytics/yolov5/issues) and found no similar bug report.
### YOLOv5 Component
_No response_
### Bug
when you want to run training with the `run` function as described here htt... | [
{
"content": "\"\"\"Main Logger class for ClearML experiment tracking.\"\"\"\nimport glob\nimport re\nfrom pathlib import Path\n\nimport numpy as np\nimport yaml\n\nfrom utils.plots import Annotator, colors\n\ntry:\n import clearml\n from clearml import Dataset, Task\n\n assert hasattr(clearml, '__vers... | [
{
"content": "\"\"\"Main Logger class for ClearML experiment tracking.\"\"\"\nimport glob\nimport re\nfrom pathlib import Path\n\nimport numpy as np\nimport yaml\n\nfrom utils.plots import Annotator, colors\n\ntry:\n import clearml\n from clearml import Dataset, Task\n\n assert hasattr(clearml, '__vers... | diff --git a/utils/loggers/clearml/clearml_utils.py b/utils/loggers/clearml/clearml_utils.py
index 08aa9fd3327f..7ad40ea5f987 100644
--- a/utils/loggers/clearml/clearml_utils.py
+++ b/utils/loggers/clearml/clearml_utils.py
@@ -96,6 +96,7 @@ def __init__(self, opt, hyp):
# Only the hyperparameters coming fr... |
kornia__kornia-917 | RandomAffine raises error
## 🐛 Bug
`kornia.augmentation.RandomAffine()` raises an error if `translate=(a, b)` with a < b. According to documentation, a and b should not be related, since they refer to maximum absolute fraction for horizontal and vertical translations, respectively.
It seems that kornia/augmenta... | [
{
"content": "from typing import Tuple, List, Union, Dict, Optional, cast\nimport random\n\nimport torch\nfrom torch.distributions import Bernoulli\n\nfrom kornia.constants import Resample, BorderType, SamplePadding\nfrom kornia.geometry import bbox_generator\nfrom ..utils import (\n _adapted_sampling,\n ... | [
{
"content": "from typing import Tuple, List, Union, Dict, Optional, cast\nimport random\n\nimport torch\nfrom torch.distributions import Bernoulli\n\nfrom kornia.constants import Resample, BorderType, SamplePadding\nfrom kornia.geometry import bbox_generator\nfrom ..utils import (\n _adapted_sampling,\n ... | diff --git a/kornia/augmentation/random_generator/random_generator.py b/kornia/augmentation/random_generator/random_generator.py
index 49a8848f5b..466abcd48d 100644
--- a/kornia/augmentation/random_generator/random_generator.py
+++ b/kornia/augmentation/random_generator/random_generator.py
@@ -244,7 +244,8 @@ def rando... |
graphql-python__graphene-django-966 | NormalCursorWrapper has invalid sigatures for callproc and execute
File: /debug/sql/tracking.py
The callproc and execute methods have an incorrect signature. This is causing a substitution attempt in the standard code, which breaks if there are '%'s in the SQL function.
def callproc(self, procname, ... | [
{
"content": "# Code obtained from django-debug-toolbar sql panel tracking\nfrom __future__ import absolute_import, unicode_literals\n\nimport json\nfrom threading import local\nfrom time import time\n\nimport six\nfrom django.utils.encoding import force_str\n\nfrom .types import DjangoDebugSQL\n\n\nclass SQLQu... | [
{
"content": "# Code obtained from django-debug-toolbar sql panel tracking\nfrom __future__ import absolute_import, unicode_literals\n\nimport json\nfrom threading import local\nfrom time import time\n\nimport six\nfrom django.utils.encoding import force_str\n\nfrom .types import DjangoDebugSQL\n\n\nclass SQLQu... | diff --git a/graphene_django/debug/sql/tracking.py b/graphene_django/debug/sql/tracking.py
index a7c9d8db0..dc0f2dfc9 100644
--- a/graphene_django/debug/sql/tracking.py
+++ b/graphene_django/debug/sql/tracking.py
@@ -148,10 +148,10 @@ def _record(self, method, sql, params):
# We keep `sql` to maintain back... |
googleapis__google-auth-library-python-1322 | Invalid `dev` version identifiers in `setup.py`
There is a bunch of ~invalid~ version matchers (edit: valid, but not parsed correctly by distlib) in `setup.py`. [PEP 440](https://peps.python.org/pep-0440/) states:
> The canonical public version identifiers MUST comply with the following scheme:
> `[N!]N(.N)*[{a|b|... | [
{
"content": "# Copyright 2014 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica... | [
{
"content": "# Copyright 2014 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica... | diff --git a/setup.py b/setup.py
index 7e96b5757..01cf80806 100644
--- a/setup.py
+++ b/setup.py
@@ -31,9 +31,9 @@
)
extras = {
- "aiohttp": ["aiohttp >= 3.6.2, < 4.0.0dev", "requests >= 2.20.0, < 3.0.0dev"],
+ "aiohttp": ["aiohttp >= 3.6.2, < 4.0.0.dev0", "requests >= 2.20.0, < 3.0.0.dev0"],
"pyopenssl"... |
pwndbg__pwndbg-130 | Error in the `search` command
The `search` command appears to have some issues while searching signed integer data
For example while debugging a x86 program:
```
pwndbg> search -4 0xf7eebf83
Traceback (most recent call last):
File "/home/bruce30262/pwndbg/pwndbg/commands/__init__.py", line 57, in __call__
retu... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport argparse\nimport codecs\nimport os\nimport struct\n\nimport gdb\n\nimport pwndbg.color.m... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport argparse\nimport codecs\nimport os\nimport struct\n\nimport gdb\n\nimport pwndbg.arch\ni... | diff --git a/pwndbg/commands/search.py b/pwndbg/commands/search.py
index ed5167dc9c6..85471673078 100644
--- a/pwndbg/commands/search.py
+++ b/pwndbg/commands/search.py
@@ -12,6 +12,7 @@
import gdb
+import pwndbg.arch
import pwndbg.color.memory as M
import pwndbg.commands
import pwndbg.config
@@ -99,6 +100,7 @@... |
ipython__ipython-11711 | IPython crashes with UnicodeEncodeError on ascii terminal
Displaying a unicode character on an ascii terminal gives a UnicodeEncodeError, while it would be handy if it just shows a question mark or something.
Entering a unicode character which would be displayed directly makes it crash.
Case 1: displaying a unico... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Displayhook for IPython.\n\nThis defines a callable class that IPython uses for `sys.displayhook`.\n\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport builtins as builtin_mod\nimport sys\nimport i... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Displayhook for IPython.\n\nThis defines a callable class that IPython uses for `sys.displayhook`.\n\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport builtins as builtin_mod\nimport sys\nimport i... | diff --git a/IPython/core/displayhook.py b/IPython/core/displayhook.py
index d6d3be20cdf..6839b6a95ff 100644
--- a/IPython/core/displayhook.py
+++ b/IPython/core/displayhook.py
@@ -187,7 +187,12 @@ def write_format_data(self, format_dict, md_dict=None):
# But avoid extraneous empty lines.
... |
conan-io__conan-5357 | Add support for XCode 11 (apple_clang: 11.0)
Would be nice to have `apple_clang: version: "11.0"` in default `settings.yml`
| [
{
"content": "import os\n\nfrom six.moves import urllib\nfrom six.moves.configparser import ConfigParser, NoSectionError\n\nfrom conans.errors import ConanException\nfrom conans.model.env_info import unquote\nfrom conans.paths import DEFAULT_PROFILE_NAME, conan_expand_user, CACERT_FILE\nfrom conans.util.env_rea... | [
{
"content": "import os\n\nfrom six.moves import urllib\nfrom six.moves.configparser import ConfigParser, NoSectionError\n\nfrom conans.errors import ConanException\nfrom conans.model.env_info import unquote\nfrom conans.paths import DEFAULT_PROFILE_NAME, conan_expand_user, CACERT_FILE\nfrom conans.util.env_rea... | diff --git a/conans/client/conf/__init__.py b/conans/client/conf/__init__.py
index 6c5643b47e3..0c75040ed00 100644
--- a/conans/client/conf/__init__.py
+++ b/conans/client/conf/__init__.py
@@ -83,7 +83,7 @@
libcxx: [libstdc++, libstdc++11, libc++, c++_shared, c++_static]
cppstd: [None, 98, gnu98, 11, ... |
ultrabug__py3status-2091 | After i3wm reload on first click error happens: JSONDecodeError: Expecting value: line 1 column 2 (char 1) [happens with custom module]
**Describe the bug**
Error after reloading i3wm first click fails with error:
```
2022-01-17 21:03:22 WARNING Event failed.
2022-01-17 21:03:22 INFO Traceback
JSONDecodeError: ... | [
{
"content": "import select\nimport sys\n\nfrom threading import Thread\nfrom subprocess import Popen, PIPE\nfrom json import loads\nfrom shlex import quote as shell_quote\n\nfrom py3status.profiling import profile\n\n\nclass IOPoller:\n \"\"\"\n This class implements a predictive and timing-out I/O reade... | [
{
"content": "import select\nimport sys\n\nfrom threading import Thread\nfrom subprocess import Popen, PIPE\nfrom json import loads\nfrom shlex import quote as shell_quote\n\nfrom py3status.profiling import profile\n\n\nclass IOPoller:\n \"\"\"\n This class implements a predictive and timing-out I/O reade... | diff --git a/py3status/events.py b/py3status/events.py
index 89c79c5121..c5e938ac84 100644
--- a/py3status/events.py
+++ b/py3status/events.py
@@ -31,7 +31,11 @@ def readline(self, timeout=500):
poll_result = self.poller.poll(timeout)
if poll_result:
line = self.io.readline().strip()
- ... |
buildbot__buildbot-7553 | HgPoller._stopOnFailure() missing 1 required positional argument: 'f'
Looking at updating a BuildBot instance from 2.10.1 (on Debian 11) to
3.7.0 and encountered this error in the logs:
```
2024-03-28 16:12:32+0000 [-] <buildbot.changes.hgpoller.HgPoller object at 0x7f7e3c580750>: while polling for changes
Trace... | [
{
"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/changes/hgpoller.py b/master/buildbot/changes/hgpoller.py
index 477881d2cb1d..ed309421aeb1 100644
--- a/master/buildbot/changes/hgpoller.py
+++ b/master/buildbot/changes/hgpoller.py
@@ -431,9 +431,8 @@ def _processBranchChanges(self, new_rev, branch):
# but at once to avoid imp... |
apluslms__a-plus-1301 | The Cancel button in Add Deadline Deviations behaves surprisingly
Just a detail:
If I go to a student’s page, there are now links ther to add deadline deviations for that particular student. (This is super-useful.)
Now say I click one of those buttons but then wish to cancel. There’s the cancel button there on t... | [
{
"content": "from itertools import groupby\nfrom typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Type\n\nfrom django.db import models\nfrom django.http import HttpRequest, HttpResponse\nfrom django.contrib import messages\nfrom django import forms\nfrom django.utils.text import format_lazy\... | [
{
"content": "from itertools import groupby\nfrom typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Type\n\nfrom django.db import models\nfrom django.http import HttpRequest, HttpResponse\nfrom django.contrib import messages\nfrom django import forms\nfrom django.utils.text import format_lazy\... | diff --git a/deviations/templates/deviations/add_dl.html b/deviations/templates/deviations/add_dl.html
index af57392cc..9d0957075 100644
--- a/deviations/templates/deviations/add_dl.html
+++ b/deviations/templates/deviations/add_dl.html
@@ -21,7 +21,7 @@
<div class="form-group">
<div class="col-sm-10 col-sm-offs... |
zestedesavoir__zds-site-3515 | [beta v18] C'est possible de créer un tag vide
En bossant sur le design de la page des tags, j'ai malencontreusement laissé une virgule à la fin de la liste des tags, ce qui a eu pour effet de créer un tag vide.
ping @gustavi
| [
{
"content": "# coding: utf-8\n\nfrom datetime import datetime\ntry:\n import ujson as json_reader\nexcept ImportError:\n try:\n import simplejson as json_reader\n except:\n import json as json_reader\n\nfrom math import ceil\nimport shutil\n\nfrom django.conf import settings\nfrom django... | [
{
"content": "# coding: utf-8\n\nfrom datetime import datetime\ntry:\n import ujson as json_reader\nexcept ImportError:\n try:\n import simplejson as json_reader\n except:\n import json as json_reader\n\nfrom math import ceil\nimport shutil\n\nfrom django.conf import settings\nfrom django... | diff --git a/zds/tutorialv2/models/models_database.py b/zds/tutorialv2/models/models_database.py
index e9e66e8088..abaad75ea7 100644
--- a/zds/tutorialv2/models/models_database.py
+++ b/zds/tutorialv2/models/models_database.py
@@ -528,11 +528,12 @@ def add_tags(self, tag_collection):
for tag in tag_collection:... |
sanic-org__sanic-790 | [Errno 13] Permission denied: '/access.log' with disabled debug & logging?
With:
```text
app.run(host=API_HOST, port=PORT, sock=None, debug=False, workers=API_WORKERS, log_config=None)
```
```text
app = Sanic(__name__)
File "/usr/local/anaconda/envs/proj/lib/python3.6/site-packages/sanic/app.py", line 33, i... | [
{
"content": "import logging\nimport logging.config\nimport re\nimport warnings\nfrom asyncio import get_event_loop, ensure_future, CancelledError\nfrom collections import deque, defaultdict\nfrom functools import partial\nfrom inspect import isawaitable, stack, getmodulename\nfrom traceback import format_exc\n... | [
{
"content": "import logging\nimport logging.config\nimport re\nimport warnings\nfrom asyncio import get_event_loop, ensure_future, CancelledError\nfrom collections import deque, defaultdict\nfrom functools import partial\nfrom inspect import isawaitable, stack, getmodulename\nfrom traceback import format_exc\n... | diff --git a/sanic/app.py b/sanic/app.py
index f6b1e84e8b..01af352646 100644
--- a/sanic/app.py
+++ b/sanic/app.py
@@ -33,7 +33,9 @@ def __init__(self, name=None, router=None, error_handler=None,
logging.config.dictConfig(log_config)
# Only set up a default log handler if the
# end-user a... |
pantsbuild__pants-12282 | The `poetry_requirements` macro does not handle the special `python` dependency.
Currently it just maps this to a requirement and that makes things go boom:
On the `experiment/pants` branch in https://github.com/Incognito/python-architecture-linter for example:
```console
$ PANTS_SHA=0182de9814c7694eed2b9407e35776... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport itertools\nimport logging\nimport os\nfrom pathlib import Path\nfrom typing import Any, Iterable, Mapping, Optional\n\... | [
{
"content": "# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\nfrom __future__ import annotations\n\nimport itertools\nimport logging\nimport os\nfrom pathlib import Path\nfrom typing import Any, Iterable, Mapping, Optional\n\... | diff --git a/src/python/pants/backend/python/macros/poetry_requirements.py b/src/python/pants/backend/python/macros/poetry_requirements.py
index ab2f74a36e7..25c432c6bbf 100644
--- a/src/python/pants/backend/python/macros/poetry_requirements.py
+++ b/src/python/pants/backend/python/macros/poetry_requirements.py
@@ -185... |
freedomofpress__securedrop-1890 | Tails 3.0 does not restore the original filename when uncompressing a file
# Bug
Tails 3.0 does not preserve the filename when extracting an archive.
## Description
When extracting an archive, Tails 3.0 will rename the file inside the archive to _data_.
## Steps to Reproduce
Download a SecureDrop submiss... | [
{
"content": "#!/usr/bin/python\n\nimport os\nimport sys\nimport subprocess\n\n\n# check for root\nif os.geteuid() != 0:\n sys.exit('You need to run this as root')\n\n# paths\npath_torrc_additions = '/home/amnesia/Persistent/.securedrop/torrc_additions'\npath_torrc_backup = '/etc/tor/torrc.bak'\npath_torrc =... | [
{
"content": "#!/usr/bin/python\n\nimport os\nimport sys\nimport subprocess\n\n\n# check for root\nif os.geteuid() != 0:\n sys.exit('You need to run this as root')\n\n# paths\npath_torrc_additions = '/home/amnesia/Persistent/.securedrop/torrc_additions'\npath_torrc_backup = '/etc/tor/torrc.bak'\npath_torrc =... | diff --git a/docs/set_up_admin_tails.rst b/docs/set_up_admin_tails.rst
index 5f49d12736..4c2d999dfa 100644
--- a/docs/set_up_admin_tails.rst
+++ b/docs/set_up_admin_tails.rst
@@ -98,12 +98,14 @@ argument passed.
the installation. If this happens, please email us at
securedrop@freedom.press.
... |
optuna__optuna-2686 | Waiting for Heartbeat
<!-- Please write a clear and concise description of what the bug is. -->
## Expected behavior
After `study.optimize` with a high heartbeat interval (e.g. 60s) finishes running trials, it should exit almost immediately.
## Environment
- Optuna version: 2.7.0
- Python version: 3.9
- ... | [
{
"content": "from concurrent.futures import FIRST_COMPLETED\nfrom concurrent.futures import Future\nfrom concurrent.futures import ThreadPoolExecutor\nfrom concurrent.futures import wait\nimport copy\nimport datetime\nimport gc\nimport itertools\nimport math\nimport os\nimport sys\nfrom threading import Event\... | [
{
"content": "from concurrent.futures import FIRST_COMPLETED\nfrom concurrent.futures import Future\nfrom concurrent.futures import ThreadPoolExecutor\nfrom concurrent.futures import wait\nimport copy\nimport datetime\nimport gc\nimport itertools\nimport math\nimport os\nimport sys\nfrom threading import Event\... | diff --git a/optuna/_optimize.py b/optuna/_optimize.py
index 51e391e5af..07ecc0c0aa 100644
--- a/optuna/_optimize.py
+++ b/optuna/_optimize.py
@@ -11,7 +11,6 @@
import sys
from threading import Event
from threading import Thread
-import time
from typing import Any
from typing import Callable
from typing import ca... |
scikit-hep__pyhf-2031 | Add `https://pyhf.readthedocs.io/en/v` to linkcheck_ignore
During release will get
```
( faq: line 13) broken https://pyhf.readthedocs.io/ - 404 Client Error: Not Found for url: https://pyhf.readthedocs.io/en/v0.7.0/
```
As that doesn't exist yet. So should add it to
https://github.com/sciki... | [
{
"content": "#\n# pyhf documentation build configuration file, created by\n# sphinx-quickstart on Fri Feb 9 11:58:49 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#... | [
{
"content": "#\n# pyhf documentation build configuration file, created by\n# sphinx-quickstart on Fri Feb 9 11:58:49 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#... | diff --git a/.readthedocs.yaml b/.readthedocs.yaml
index a812340c9c..59d96f9489 100644
--- a/.readthedocs.yaml
+++ b/.readthedocs.yaml
@@ -13,10 +13,6 @@ build:
apt_packages:
- curl
- jq
- # https://docs.readthedocs.io/en/latest/build-customization.html
- jobs:
- pre_build:
- - python -m sphinx -... |
horovod__horovod-1367 | Multi machine example crashes when using GLOO controller.
**Environment:**
1. Framework: (TensorFlow, Keras, PyTorch, MXNet) TF
2. Framework version: 1.14.0
3. Horovod version: Latest: `83eaa163b395ae8866a404f94facf82cc8127642`
4. MPI version: N/A
5. CUDA version: 10
6. NCCL version: 2.4.7
7. Python version: 3... | [
{
"content": "# Copyright 2019 Uber Technologies, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | [
{
"content": "# Copyright 2019 Uber Technologies, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | diff --git a/horovod/common/controller.cc b/horovod/common/controller.cc
index fb10c80806..95bcbd53b2 100644
--- a/horovod/common/controller.cc
+++ b/horovod/common/controller.cc
@@ -114,7 +114,7 @@ ResponseList Controller::ComputeResponseList(std::atomic_bool& shut_down) {
// a shutdown. This function removes any... |
mlflow__mlflow-1199 | SqlAlchemyStore is created on every request
### System information
- **Have I written custom code (as opposed to using a stock example script provided in MLflow)**: No
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Ubuntu 16.04
- **MLflow installed from (source or binary)**: binary
- **MLflow versi... | [
{
"content": "# Define all the service endpoint handlers here.\nimport json\nimport os\nimport re\nimport six\n\nfrom functools import wraps\nfrom flask import Response, request, send_file\nfrom querystring_parser import parser\n\nfrom mlflow.entities import Metric, Param, RunTag, ViewType\nfrom mlflow.exceptio... | [
{
"content": "# Define all the service endpoint handlers here.\nimport json\nimport os\nimport re\nimport six\n\nfrom functools import wraps\nfrom flask import Response, request, send_file\nfrom querystring_parser import parser\n\nfrom mlflow.entities import Metric, Param, RunTag, ViewType\nfrom mlflow.exceptio... | diff --git a/mlflow/server/handlers.py b/mlflow/server/handlers.py
index b73093ba0b453..35ce2fb9ccde4 100644
--- a/mlflow/server/handlers.py
+++ b/mlflow/server/handlers.py
@@ -32,7 +32,7 @@ def _get_store():
artifact_root = os.environ.get(ARTIFACT_ROOT_ENV_VAR, None)
if _is_database_uri(store_dir):
... |
microsoft__ptvsd-1853 | Deferred server events are not always propagated
Handlers for "launch" and "attach" requests in the adapter don't lock the session correctly. As a result, there's a race condition between the code that replays server events after responding to those requests, and the code that queues up server events for replaying - an... | [
{
"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\nimport platform\n\nimport ptvsd\nfrom ptvsd.common import json, ... | [
{
"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\nimport platform\n\nimport ptvsd\nfrom ptvsd.common import json, ... | diff --git a/src/ptvsd/adapter/ide.py b/src/ptvsd/adapter/ide.py
index 05e95f357..cae91296f 100644
--- a/src/ptvsd/adapter/ide.py
+++ b/src/ptvsd/adapter/ide.py
@@ -130,8 +130,7 @@ def initialize_request(self, request):
# See https://github.com/microsoft/vscode/issues/4902#issuecomment-368583522
# for the seq... |
tobymao__sqlglot-3369 | Mysql syntax not fully supported/accurate
@VaggelisD @georgesittas
```
import sqlglot
print(sqlglot.transpile("SELECT COUNT(DISTINCT(pl.identifier)) AS total_players, array_agg(pl.player_title) AS player_titles FROM playlogs pl WHERE pl.start >= (CURRENT_DATE - interval '1 week') GROUP BY pl.identifier, pl.player... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, parser, tokens, transforms\nfrom sqlglot.dialects.dialect import (\n Dialect,\n NormalizationStrategy,\n arrow_json_extract_sql,\n date_add_interval_sql,\n datestrtodate_sql,\n build_f... | [
{
"content": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, parser, tokens, transforms\nfrom sqlglot.dialects.dialect import (\n Dialect,\n NormalizationStrategy,\n arrow_json_extract_sql,\n date_add_interval_sql,\n datestrtodate_sql,\n build_f... | diff --git a/sqlglot/dialects/mysql.py b/sqlglot/dialects/mysql.py
index 03576d29e5..44d2c8e10f 100644
--- a/sqlglot/dialects/mysql.py
+++ b/sqlglot/dialects/mysql.py
@@ -782,6 +782,13 @@ class Generator(generator.Generator):
exp.DataType.Type.TIMESTAMPLTZ,
}
+ def extract_sql(self, expre... |
aws-cloudformation__cfn-lint-1853 | Using !Ref in ContentUri of LayerVersion throw error E0001
*cfn-lint version: 0.43.0*
*Description of issue.*
The `ContentUri` property of a resource type [AWS::Serverless::LayerVersion][1] can be a string or a `LayerContent` object. But, if we use `!Ref` the template is marked as an error with the message:
>[cf... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport os\nimport logging\nimport six\nimport samtranslator\nfrom samtranslator.parser import parser\nfrom samtranslator.translator.translator import Translator\nfrom samtranslator.p... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport os\nimport logging\nimport six\nimport samtranslator\nfrom samtranslator.parser import parser\nfrom samtranslator.translator.translator import Translator\nfrom samtranslator.p... | diff --git a/src/cfnlint/transform.py b/src/cfnlint/transform.py
index e91d00c695..2d0b546eb6 100644
--- a/src/cfnlint/transform.py
+++ b/src/cfnlint/transform.py
@@ -181,7 +181,13 @@ def _update_to_s3_uri(
uri_property = resource_property_dict.get(property_key, '.')
# ignore if dict or already an S... |
angr__angr-1853 | CFGFast crashes on handling binary that compiled by gcc 5.4.0 when cross_references=True
**Describe the bug.**
I noticed that while working with some binaries using angr, most of the x86 binaries compiled with gcc 5.4.0 get errors.
```python
import angr
import logging
logging.getLogger('angr.analyses.cfg.cfg... | [
{
"content": "\n# pylint:disable=no-self-use\n\nimport logging\n\nimport ailment\nimport pyvex\n\nfrom ..engine import SimEngine\nfrom ..vex.irop import operations as vex_operations\nfrom ...analyses.code_location import CodeLocation\n\n\nclass SimEngineLight(SimEngine):\n def __init__(self):\n super(... | [
{
"content": "\n# pylint:disable=no-self-use\n\nimport logging\n\nimport ailment\nimport pyvex\n\nfrom ..engine import SimEngine\nfrom ..vex.irop import operations as vex_operations\nfrom ...analyses.code_location import CodeLocation\n\n\nclass SimEngineLight(SimEngine):\n def __init__(self):\n super(... | diff --git a/angr/engines/light/engine.py b/angr/engines/light/engine.py
index 6015e848a0f..b8610ace554 100644
--- a/angr/engines/light/engine.py
+++ b/angr/engines/light/engine.py
@@ -93,7 +93,11 @@ def _process_Stmt(self, whitelist=None):
if self.block.vex.jumpkind == 'Ijk_Call':
handler = '_han... |
kivy__python-for-android-662 | .jam files not installed
The user-config.jam in https://github.com/kivy/python-for-android/tree/master/pythonforandroid/recipes/boost does not show up in the installed p4a recipes folder /home/paul/.local/lib/python2.7/site-packages/pythonforandroid/recipes/boost/
Perhaps .jam files have to be added to this array as w... | [
{
"content": "\nfrom setuptools import setup, find_packages\nfrom os import walk\nfrom os.path import join, dirname, sep\nimport os\nimport glob\n\n# NOTE: All package data should also be set in MANIFEST.in\n\npackages = find_packages()\n\npackage_data = {'': ['*.tmpl',\n '*.patch', ], }\n\n... | [
{
"content": "\nfrom setuptools import setup, find_packages\nfrom os import walk\nfrom os.path import join, dirname, sep\nimport os\nimport glob\n\n# NOTE: All package data should also be set in MANIFEST.in\n\npackages = find_packages()\n\npackage_data = {'': ['*.tmpl',\n '*.patch', ], }\n\n... | diff --git a/setup.py b/setup.py
index 1947854c03..e4707d817b 100644
--- a/setup.py
+++ b/setup.py
@@ -31,7 +31,7 @@ def recursively_include(results, directory, patterns):
recursively_include(package_data, 'pythonforandroid/recipes',
['*.patch', 'Setup*', '*.pyx', '*.py', '*.c', '*.h',
- ... |
mozilla__bugbug-247 | Add 'has bug ever had enhancement severity' as a feature
Especially useful for the bug and regression models.
| [
{
"content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport re\nfrom collections import defaultdict\nfrom datetime import ... | [
{
"content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport re\nfrom collections import defaultdict\nfrom datetime import ... | diff --git a/bugbug/bug_features.py b/bugbug/bug_features.py
index 16430ba9ff..53513e151e 100644
--- a/bugbug/bug_features.py
+++ b/bugbug/bug_features.py
@@ -287,6 +287,16 @@ def __call__(self, bug, author_ids, **kwargs):
return bug_reporter()(bug).strip() in author_ids
+class had_severity_enhancement(obj... |
Kinto__kinto-2108 | memcached cache backend does not really test memcached
@autrilla reported that when he moved Kinto to GCP, the heartbeat reported success for all backends, including cache, even though there is no `memcached`. I think the problem is here:
https://github.com/Kinto/kinto/blob/61494caae2bb8fe342f32f6a5d89f40ed2b62dff/k... | [
{
"content": "import logging\nimport random\n\n\nlogger = logging.getLogger(__name__)\n\n\n_HEARTBEAT_DELETE_RATE = 0.5\n_HEARTBEAT_KEY = \"__heartbeat__\"\n_HEARTBEAT_TTL_SECONDS = 3600\n\n\nclass CacheBase:\n def __init__(self, *args, **kwargs):\n self.prefix = kwargs[\"cache_prefix\"]\n self... | [
{
"content": "import logging\nimport random\n\n\nlogger = logging.getLogger(__name__)\n\n\n_HEARTBEAT_DELETE_RATE = 0.5\n_HEARTBEAT_KEY = \"__heartbeat__\"\n_HEARTBEAT_TTL_SECONDS = 3600\n\n\nclass CacheBase:\n def __init__(self, *args, **kwargs):\n self.prefix = kwargs[\"cache_prefix\"]\n self... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 276e87918..08da916ed 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -6,8 +6,9 @@ This document describes changes between each past release.
13.2.0 (unreleased)
-------------------
-- Nothing changed yet.
+**Bug fixes**
+- Fix cache heartbeat test (fixes #2107)
... |
buildbot__buildbot-7561 | HgPoller._stopOnFailure() missing 1 required positional argument: 'f'
Looking at updating a BuildBot instance from 2.10.1 (on Debian 11) to
3.7.0 and encountered this error in the logs:
```
2024-03-28 16:12:32+0000 [-] <buildbot.changes.hgpoller.HgPoller object at 0x7f7e3c580750>: while polling for changes
Trace... | [
{
"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/changes/hgpoller.py b/master/buildbot/changes/hgpoller.py
index 601596604747..cc71a91df58a 100644
--- a/master/buildbot/changes/hgpoller.py
+++ b/master/buildbot/changes/hgpoller.py
@@ -357,9 +357,8 @@ def _processBranchChanges(self, new_rev, branch):
# but at once to avoid imp... |
OpenNMT__OpenNMT-tf-702 | Bug with multiple source files and data_dir configuration
Sample When you add the export_vocabulary_assets with multiple files
```
model_dir: model
data:
# (optional) During export save the vocabularies as model assets, otherwise embed
# them in the graph itself (default: True).
export_vocabulary_assets: ... | [
{
"content": "\"\"\"Main script.\"\"\"\n\nimport argparse\nimport logging\nimport os\nimport sys\n\nimport tensorflow as tf\n\nfrom opennmt import __version__\nfrom opennmt.models import catalog\nfrom opennmt.runner import Runner\nfrom opennmt.config import load_model, load_config\nfrom opennmt.utils import exp... | [
{
"content": "\"\"\"Main script.\"\"\"\n\nimport argparse\nimport logging\nimport os\nimport sys\n\nimport tensorflow as tf\n\nfrom opennmt import __version__\nfrom opennmt.models import catalog\nfrom opennmt.runner import Runner\nfrom opennmt.config import load_model, load_config\nfrom opennmt.utils import exp... | diff --git a/opennmt/bin/main.py b/opennmt/bin/main.py
index c5efefc99..0e047651d 100644
--- a/opennmt/bin/main.py
+++ b/opennmt/bin/main.py
@@ -45,13 +45,15 @@ def _prefix_paths(prefix, paths):
for i, path in enumerate(paths):
paths[i] = _prefix_paths(prefix, path)
return paths
- else:
+ elif isinst... |
matrix-org__synapse-11416 | Stop Synapse master process from starting if `worker_app` is set
It's easy to mess up and try and start Synapse via `synapse.app.homeserver` with config that contains `worker_app` (e.g. the Docker image by default uses `synapse.app.homeserver`)
| [
{
"content": "# Copyright 2014-2016 OpenMarket Ltd\n# Copyright 2019 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 copy of the License at\n#\n# http://www.apache.org/licenses/LICE... | [
{
"content": "# Copyright 2014-2016 OpenMarket Ltd\n# Copyright 2019 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 copy of the License at\n#\n# http://www.apache.org/licenses/LICE... | diff --git a/changelog.d/11416.misc b/changelog.d/11416.misc
new file mode 100644
index 000000000000..a5c3aeda83a9
--- /dev/null
+++ b/changelog.d/11416.misc
@@ -0,0 +1 @@
+Add a check to ensure that users cannot start the Synapse master process when `worker_app` is set.
\ No newline at end of file
diff --git a/synapse... |
pallets__click-2333 | Invalid info_name with shiv and pex
## Summary
When Click is used inside zipapps produced by Shiv or PEX, it displays an invalid "Usage" string. Instead of "Usage: program" it says "Usage: python -m program".
I did some digging and found that this is due to *info_name* being guessed incorrectly in the code introd... | [
{
"content": "import os\nimport re\nimport sys\nimport typing as t\nfrom functools import update_wrapper\nfrom types import ModuleType\nfrom types import TracebackType\n\nfrom ._compat import _default_text_stderr\nfrom ._compat import _default_text_stdout\nfrom ._compat import _find_binary_writer\nfrom ._compat... | [
{
"content": "import os\nimport re\nimport sys\nimport typing as t\nfrom functools import update_wrapper\nfrom types import ModuleType\nfrom types import TracebackType\n\nfrom ._compat import _default_text_stderr\nfrom ._compat import _default_text_stdout\nfrom ._compat import _find_binary_writer\nfrom ._compat... | diff --git a/CHANGES.rst b/CHANGES.rst
index 9cf54ad2d..66808a83c 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -15,6 +15,7 @@ Unreleased
- Completion works if there is a dot (``.``) in the program name. :issue:`2166`
- Improve type annotations for pyright type checker. :issue:`2268`
- Improve responsiveness o... |
elastic__apm-agent-python-1423 | Breaking change in sync httpx refactor from #1403
elastic/apm-agent-python#1403 refactored a lot of the httpx code. However it seems that the sync version of the instrumentation still calls `self._set_disttracing_headers` which was removed in the same PR, causing any form of sync httpx instrumentation to crash.
**En... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2021, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2021, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b18017f00..1714dfe82 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -18,7 +18,7 @@ endif::[]
===== Bug fixes
////
-//=== Unreleased
+=== Unreleased
// Unreleased changes go here
// When the next release happens, nest these changes under the... |
sunpy__sunpy-3917 | Edit on GitHub link issues
<!-- This comments are hidden when you submit the issue so you do not need to remove them!
Please be sure to check out our contributing guidelines: https://github.com/sunpy/sunpy/blob/master/CONTRIBUTING.rst
Please be sure to check out our code of conduct:
https://github.com/sunpy/sunpy/bl... | [
{
"content": "\"\"\"\nFacilities to interface with the Heliophysics Events Knowledgebase.\n\"\"\"\n\nimport json\n\nimport urllib\nfrom itertools import chain\n\nfrom astropy.table import Table, Row, Column\nfrom astropy.time import Time\n\nfrom sunpy.net import attr\nfrom sunpy.util import dict_keys_same, uniq... | [
{
"content": "\"\"\"\nFacilities to interface with the Heliophysics Events Knowledgebase.\n\"\"\"\n\nimport json\n\nimport urllib\nfrom itertools import chain\n\nfrom astropy.table import Table, Row, Column\nfrom astropy.time import Time\n\nfrom sunpy.net import attr\nfrom sunpy.util import dict_keys_same, uniq... | diff --git a/.circleci/config.yml b/.circleci/config.yml
index 7b03cfbb2e6..f1b3f274521 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -1,7 +1,7 @@
no-backports: &no-backports
- name: Skip any branches called backport*
+ name: Skip any branches called cherry-pick
command: |
- if [[ "${CIRCLE_B... |
googleapis__python-spanner-django-428 | django-test-suite: iendswith lookup isn't case-insensitive
Test failure:
```
======================================================================
FAIL: test_ticket8597 (queries.tests.ComparisonTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file or at\n# https://developers.google.com/open-source/licenses/bsd\n\nfrom django.db.models import DecimalField\nfrom django.db.models.lookups import (\n Contains, ... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file or at\n# https://developers.google.com/open-source/licenses/bsd\n\nfrom django.db.models import DecimalField\nfrom django.db.models.lookups import (\n Contains, ... | diff --git a/django_spanner/lookups.py b/django_spanner/lookups.py
index f0e1c8684f..d033feb3cf 100644
--- a/django_spanner/lookups.py
+++ b/django_spanner/lookups.py
@@ -84,9 +84,9 @@ def startswith_endswith(self, compiler, connection):
params[0] = str(params[0][1:]) + '$'
else:
para... |
matrix-org__synapse-13362 | CI run against latest deps is failing
See https://github.com/matrix-org/synapse/actions/runs/2730494056
| [
{
"content": "# Copyright 2019 The Matrix.org Foundation C.I.C.\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... | [
{
"content": "# Copyright 2019 The Matrix.org Foundation C.I.C.\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... | diff --git a/changelog.d/13362.misc b/changelog.d/13362.misc
new file mode 100644
index 000000000000..c80578ce95b2
--- /dev/null
+++ b/changelog.d/13362.misc
@@ -0,0 +1 @@
+Add missing type hints to open tracing module.
diff --git a/synapse/logging/opentracing.py b/synapse/logging/opentracing.py
index ad5cbf46a4d2..c1a... |
open-telemetry__opentelemetry-python-contrib-2552 | `remove_url_credentials` drops brackets from IPv6 hostnames
**Describe your environment**
Python 3.11.9, `opentelemetry-instrumentation` is auto-injected via the OpenTelemetry operator, `opentelemetry_util_http` is `0.44b0`
**Steps to reproduce**
```python
from opentelemetry.util.http import remove_url_crede... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 038706f35c..3232e6fef8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -56,6 +56,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#2420](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2420))
- `opentelemetry-i... |
apache__tvm-6853 | [Relay][Bug] nn.batch_norm not being simplified by SimplifyInference
cc @hypercubestart, who discovered this oddity
```python
r = """
#[version = "0.0.5"]
def @main(%data: Tensor[(1, 32, 32, 16), float32], %bn_gamma: Tensor[(16), float32], %bn_beta: Tensor[(16), float32], %bn_mean: Tensor[(16), float32], %bn_var:... | [
{
"content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n... | [
{
"content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n... | diff --git a/include/tvm/relay/transform.h b/include/tvm/relay/transform.h
index cbd6a88e584e..a9a45b5f101a 100644
--- a/include/tvm/relay/transform.h
+++ b/include/tvm/relay/transform.h
@@ -194,8 +194,9 @@ TVM_DLL Pass ToGraphNormalForm();
TVM_DLL Pass PartialEval();
/*!
- * \brief Simplify certain operators durin... |
pyqtgraph__pyqtgraph-935 | Bug in PlotItem.py: addLine(pos=user_pos, angle=user_angle) cannot work
Compare
https://github.com/pyqtgraph/pyqtgraph/blob/develop/pyqtgraph/graphicsItems/PlotItem/PlotItem.py#L570
specifying the "angle" kwd on the addLine() call will lead to `InfiniteLine.__init__(pos, angle, **kwds)` being called with two angle key... | [
{
"content": "# -*- coding: utf-8 -*-\nimport sys\nimport weakref\nimport numpy as np\nimport os\nfrom ...Qt import QtGui, QtCore, QT_LIB\nfrom ... import pixmaps\nfrom ... import functions as fn\nfrom ...widgets.FileDialog import FileDialog\nfrom .. PlotDataItem import PlotDataItem\nfrom .. ViewBox import View... | [
{
"content": "# -*- coding: utf-8 -*-\nimport sys\nimport weakref\nimport numpy as np\nimport os\nfrom ...Qt import QtGui, QtCore, QT_LIB\nfrom ... import pixmaps\nfrom ... import functions as fn\nfrom ...widgets.FileDialog import FileDialog\nfrom .. PlotDataItem import PlotDataItem\nfrom .. ViewBox import View... | diff --git a/pyqtgraph/graphicsItems/PlotItem/PlotItem.py b/pyqtgraph/graphicsItems/PlotItem/PlotItem.py
index ae74c5b6c4..9703f28605 100644
--- a/pyqtgraph/graphicsItems/PlotItem/PlotItem.py
+++ b/pyqtgraph/graphicsItems/PlotItem/PlotItem.py
@@ -545,9 +545,9 @@ def addLine(self, x=None, y=None, z=None, **kwds):
... |
carpentries__amy-1396 | Persons API bug - duplicate entries returned
Think I discovered a possible bug in persons API - possibly other parts of the API are affected. Certain number of duplicated entries are returned, e.g. when searching for UK instructors at page 2 of results there are two entries for "m.wallis@leeds.ac.uk", on page 3 there a... | [
{
"content": "from collections import OrderedDict\nimport datetime\nfrom itertools import accumulate\n\nfrom django.db.models import (\n Case,\n Count,\n F,\n IntegerField,\n Min,\n Prefetch,\n Sum,\n Value,\n When,\n)\nfrom rest_framework import viewsets\nfrom rest_framework.decorato... | [
{
"content": "from collections import OrderedDict\nimport datetime\nfrom itertools import accumulate\n\nfrom django.db.models import (\n Case,\n Count,\n F,\n IntegerField,\n Min,\n Prefetch,\n Sum,\n Value,\n When,\n)\nfrom rest_framework import viewsets\nfrom rest_framework.decorato... | diff --git a/api/views.py b/api/views.py
index b2f435204..3cd1d66f6 100644
--- a/api/views.py
+++ b/api/views.py
@@ -736,7 +736,8 @@ class PersonViewSet(viewsets.ReadOnlyModelViewSet):
"""List many people or retrieve only one person."""
permission_classes = (IsAuthenticated, IsAdmin)
queryset = Person.ob... |
DataDog__dd-trace-py-3035 | tuple index out of range of threading.py
After upgrading from ddtrace==0.46.0 to version ddtrace==0.55.4 my service crash with IndexError.
```
Traceback (most recent call last):
File "/my_service/services/base_service.py", line 105, in run
futures.append(executor.submit(fn=self._single_entry_point_run, entry_... | [
{
"content": "import ddtrace\n\n\ndef _wrap_submit(func, instance, args, kwargs):\n \"\"\"\n Wrap `Executor` method used to submit a work executed in another\n thread. This wrapper ensures that a new `Context` is created and\n properly propagated using an intermediate function.\n \"\"\"\n # If... | [
{
"content": "import ddtrace\n\n\ndef _wrap_submit(func, instance, args, kwargs):\n \"\"\"\n Wrap `Executor` method used to submit a work executed in another\n thread. This wrapper ensures that a new `Context` is created and\n properly propagated using an intermediate function.\n \"\"\"\n # If... | diff --git a/ddtrace/contrib/futures/threading.py b/ddtrace/contrib/futures/threading.py
index 04f60baec75..9800978045f 100644
--- a/ddtrace/contrib/futures/threading.py
+++ b/ddtrace/contrib/futures/threading.py
@@ -21,10 +21,12 @@ def _wrap_submit(func, instance, args, kwargs):
if ddtrace.tracer.context_provider... |
pypa__pipenv-977 | Fails if two conflicting "requires" sections are present.
I stumbled upon this since, at some point, an extra `requires` section was added to my `Pipifile`. I'm not able to reproduce the circumstances that lead to such a malformed configuration file, but still the reaction of `pipenv` is quite baffling.
##### Descr... | [
{
"content": "# -*- coding: utf-8 -*-\nimport json\nimport os\nimport re\nimport sys\nimport base64\nimport hashlib\n\nimport contoml\nimport delegator\nimport pipfile\nimport toml\n\nfrom .utils import (\n mkdir_p, convert_deps_from_pip, pep423_name, recase_file,\n find_requirements, is_file, is_vcs, pyt... | [
{
"content": "# -*- coding: utf-8 -*-\nimport json\nimport os\nimport re\nimport sys\nimport base64\nimport hashlib\n\nimport contoml\nimport delegator\nimport pipfile\nimport toml\n\nfrom .utils import (\n mkdir_p, convert_deps_from_pip, pep423_name, recase_file,\n find_requirements, is_file, is_vcs, pyt... | diff --git a/pipenv/project.py b/pipenv/project.py
index 36a2bd4244..027da5422d 100644
--- a/pipenv/project.py
+++ b/pipenv/project.py
@@ -227,14 +227,6 @@ def parsed_pipfile(self):
with open(self.pipfile_location) as f:
contents = f.read()
- sections = re.findall("\[[a-zA-Z-]+\]", conten... |
yt-dlp__yt-dlp-6151 | [GoPlay] Unable to download JSON metadata: HTTP Error 403: Forbidden
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
- [X] I understand that I will be **blocked** if I remove or skip any mandatory\* field
### Checklist
- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2023.0... | [
{
"content": "import base64\nimport binascii\nimport datetime\nimport hashlib\nimport hmac\nimport json\nimport os\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n ExtractorError,\n traverse_obj,\n unescapeHTML,\n)\n\n\nclass GoPlayIE(InfoExtractor):\n _VALID_URL = r'https?://(www\\.)?g... | [
{
"content": "import base64\nimport binascii\nimport datetime\nimport hashlib\nimport hmac\nimport json\nimport os\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n ExtractorError,\n traverse_obj,\n unescapeHTML,\n)\n\n\nclass GoPlayIE(InfoExtractor):\n _VALID_URL = r'https?://(www\\.)?g... | diff --git a/yt_dlp/extractor/goplay.py b/yt_dlp/extractor/goplay.py
index 2882b49dd32f..960d7d7bc005 100644
--- a/yt_dlp/extractor/goplay.py
+++ b/yt_dlp/extractor/goplay.py
@@ -76,11 +76,11 @@ def _real_extract(self, url):
}
api = self._download_json(
- f'https://api.viervijfzes.be/... |
zostera__django-bootstrap4-217 | 'NoneType' object has no attribute 'attrs' when upgrading to 2.0.0
I just tried upgrading my project to django-bootstrap 2.0.0, and encountered the following error when loading websites.
```
Traceback (most recent call last):
File "/home/rixx/.local/share/virtualenvs/pretalx/lib/python3.8/site-packages/django/co... | [
{
"content": "from bs4 import BeautifulSoup\nfrom django.forms import (\n BaseForm,\n BaseFormSet,\n BoundField,\n CheckboxInput,\n CheckboxSelectMultiple,\n DateInput,\n EmailInput,\n FileInput,\n MultiWidget,\n NumberInput,\n PasswordInput,\n RadioSelect,\n Select,\n ... | [
{
"content": "from bs4 import BeautifulSoup\nfrom django.forms import (\n BaseForm,\n BaseFormSet,\n BoundField,\n CheckboxInput,\n CheckboxSelectMultiple,\n DateInput,\n EmailInput,\n FileInput,\n MultiWidget,\n NumberInput,\n PasswordInput,\n RadioSelect,\n Select,\n ... | diff --git a/HISTORY.rst b/HISTORY.rst
index 5e4d6699..f9afc160 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -3,6 +3,11 @@
History
-------
+2.0.1 (2020-mm-dd)
+++++++++++++++++++
+- Set beautifulsoup4 requirement to >= 4.8.0 (fixes #216).
+- Do not assume all inputs are inside labels (fixes #215).
+
2.0.0 (2020-0... |
ultralytics__yolov5-2134 | Caching image path
I have 2 files train.txt and valid.txt. The train images and valid images are in the same directory "/content/train"
```
# train.txt file
/content/train/1.jpg
/content/train/2.jpg
# val.txt file
/content/train/3.jpg
/content/train/4.jpg
```
When we train a model, the train and val caching ... | [
{
"content": "# Dataset utils and dataloaders\n\nimport glob\nimport logging\nimport math\nimport os\nimport random\nimport shutil\nimport time\nfrom itertools import repeat\nfrom multiprocessing.pool import ThreadPool\nfrom pathlib import Path\nfrom threading import Thread\n\nimport cv2\nimport numpy as np\nim... | [
{
"content": "# Dataset utils and dataloaders\n\nimport glob\nimport logging\nimport math\nimport os\nimport random\nimport shutil\nimport time\nfrom itertools import repeat\nfrom multiprocessing.pool import ThreadPool\nfrom pathlib import Path\nfrom threading import Thread\n\nimport cv2\nimport numpy as np\nim... | diff --git a/utils/datasets.py b/utils/datasets.py
index 9b823eb85b75..7a8f073608cb 100755
--- a/utils/datasets.py
+++ b/utils/datasets.py
@@ -372,7 +372,7 @@ def __init__(self, path, img_size=640, batch_size=16, augment=False, hyp=None, r
# Check cache
self.label_files = img2label_paths(self.img_fi... |
conda__conda-build-1802 | non-ASCII characters in patches not allowed.
I get an error when there are non-ASCII characters in a patch.
```
File "/home/isuru/miniconda3_2/bin/conda-build", line 6, in <module>
sys.exit(conda_build.cli.main_build.main())
File "/home/isuru/miniconda3_2/lib/python3.5/site-packages/conda_build/cli/main_bui... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport locale\nimport logging\nimport os\nfrom os.path import join, isdir, isfile, abspath, basename, exists, normpath\nimport re\nfrom subprocess import Popen, PIPE, CalledProcessError\nimport sys\nimport time\n\nfrom .conda_inte... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport io\nimport locale\nimport logging\nimport os\nfrom os.path import join, isdir, isfile, abspath, basename, exists, normpath\nimport re\nfrom subprocess import Popen, PIPE, CalledProcessError\nimport sys\nimport time\n\nfrom ... | diff --git a/conda_build/source.py b/conda_build/source.py
index 745b76dfdf..d5b1145cc2 100644
--- a/conda_build/source.py
+++ b/conda_build/source.py
@@ -1,5 +1,6 @@
from __future__ import absolute_import, division, print_function
+import io
import locale
import logging
import os
@@ -437,7 +438,7 @@ def _guess_p... |
pyinstaller__pyinstaller-7876 | Fixing 'Cannot Get Architecture from File' Error in 32-bit PyInstaller Compilation on Windows
When I compile the program using pyinstaller on a 32-bit Python,
it gives the error message "Cannot get architecture from file." After my investigation,
I found that the `matchDLLArch` function in `bindepend.py` is causi... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2023, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2023, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens... | diff --git a/PyInstaller/depend/bindepend.py b/PyInstaller/depend/bindepend.py
index a599d53a41..b47ca5cb47 100644
--- a/PyInstaller/depend/bindepend.py
+++ b/PyInstaller/depend/bindepend.py
@@ -590,7 +590,12 @@ def _resolve_library_path_in_search_paths(name, search_paths=None):
# On Windows, ensure that arc... |
qtile__qtile-2811 | Set version using importlib.metadata
<!--
Please do not ask general questions here! There are [community
contact](https://github.com/qtile/qtile#community) options for that.
If you are suggesting a new feature/enhancement please instead post it on the
discussions board as an idea: https://github.com/qtile/qtile/d... | [
{
"content": "import argparse\nimport logging\nimport sys\n\nfrom libqtile.log_utils import init_log\nfrom libqtile.scripts import check, cmd_obj, migrate, run_cmd, shell, start, top\n\ntry:\n import pkg_resources\n VERSION = pkg_resources.require(\"qtile\")[0].version\nexcept (pkg_resources.DistributionN... | [
{
"content": "import argparse\nimport logging\nimport sys\n\nfrom libqtile.log_utils import init_log\nfrom libqtile.scripts import check, cmd_obj, migrate, run_cmd, shell, start, top\n\ntry:\n # Python>3.7 can get the version from importlib\n from importlib.metadata import distribution\n VERSION = dist... | diff --git a/libqtile/scripts/main.py b/libqtile/scripts/main.py
index 8b9cbc4bd8..bd308720ce 100644
--- a/libqtile/scripts/main.py
+++ b/libqtile/scripts/main.py
@@ -6,10 +6,16 @@
from libqtile.scripts import check, cmd_obj, migrate, run_cmd, shell, start, top
try:
- import pkg_resources
- VERSION = pkg_reso... |
open-telemetry__opentelemetry-python-1119 | Configuration object stores ints as floats
The global configuration object will store `"2"` as `2.0` instead of `2`. Fix that.
| [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
{
"content": "# Copyright The OpenTelemetry Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | diff --git a/opentelemetry-api/CHANGELOG.md b/opentelemetry-api/CHANGELOG.md
index 54916dc9922..c56919b8320 100644
--- a/opentelemetry-api/CHANGELOG.md
+++ b/opentelemetry-api/CHANGELOG.md
@@ -2,6 +2,9 @@
## Unreleased
+- Store `int`s as `int`s in the global Configuration object
+ ([#1118](https://github.com/open... |
vacanza__python-holidays-419 | Collecting holidays for Singapore takes to long!
Hi folks!
I noticed that, in newest version of you package (10.4), simple code which I'm already using takes a lot of time and at the end it raise error. I noticed that it happens only for 'Singapore'. In version 10.3 and earlier (10.2 for sure) it works normally. Ple... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# specific sets of holidays on the fly. It aims to make determining whether a\n# specific date is a holiday as fast and flexible as possible.\n#\n# ... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# specific sets of holidays on the fly. It aims to make determining whether a\n# specific date is a holiday as fast and flexible as possible.\n#\n# ... | diff --git a/holidays/countries/singapore.py b/holidays/countries/singapore.py
index 95aa3a78b..ffa94f8dc 100644
--- a/holidays/countries/singapore.py
+++ b/holidays/countries/singapore.py
@@ -186,7 +186,7 @@ def _populate(self, year):
# a Sunday, the day next following not being itself a public holiday
... |
dbt-labs__dbt-core-7568 | [CT-2440] `dbt show` throws `Database Error` for models with `sql_header` required for valid query
If a model is configured with a `sql_header` that is necessary to successfully run the query, `dbt show` currently fails because the [`compiled_node.compiled_code` does not include the sql_header SQL](https://github.com/... | [
{
"content": "import io\nimport threading\nimport time\n\nfrom dbt.contracts.graph.nodes import SeedNode\nfrom dbt.contracts.results import RunResult, RunStatus\nfrom dbt.events.base_types import EventLevel\nfrom dbt.events.functions import fire_event\nfrom dbt.events.types import ShowNode, Note\nfrom dbt.excep... | [
{
"content": "import io\nimport threading\nimport time\n\nfrom dbt.contracts.graph.nodes import SeedNode\nfrom dbt.contracts.results import RunResult, RunStatus\nfrom dbt.events.base_types import EventLevel\nfrom dbt.events.functions import fire_event\nfrom dbt.events.types import ShowNode, Note\nfrom dbt.excep... | diff --git a/.changes/unreleased/Fixes-20230509-102932.yaml b/.changes/unreleased/Fixes-20230509-102932.yaml
new file mode 100644
index 00000000000..7227e77b639
--- /dev/null
+++ b/.changes/unreleased/Fixes-20230509-102932.yaml
@@ -0,0 +1,6 @@
+kind: Fixes
+body: inject sql header in query for show
+time: 2023-05-09T10... |
dask__dask-10113 | Removal of dask.compatibility.entry_points has broken dask-kubernetes
It looks like `dask.compatibility.entry_points` was removed in #10070 without warning. This was being used in `dask-kubernetes` so CI is now failing.
https://github.com/dask/dask-kubernetes/actions/runs/4499027159/jobs/7916366189?pr=683
cc @gra... | [
{
"content": "import sys\n\nfrom packaging.version import parse as parse_version\n\n_PY_VERSION = parse_version(\".\".join(map(str, sys.version_info[:3])))\n\n_EMSCRIPTEN = sys.platform == \"emscripten\"\n",
"path": "dask/compatibility.py"
}
] | [
{
"content": "import sys\nimport warnings\n\nfrom importlib_metadata import entry_points as _entry_points\nfrom packaging.version import parse as parse_version\n\n_PY_VERSION = parse_version(\".\".join(map(str, sys.version_info[:3])))\n\n_EMSCRIPTEN = sys.platform == \"emscripten\"\n\n\ndef entry_points(group=N... | diff --git a/dask/compatibility.py b/dask/compatibility.py
index b156f60d0f3..b1b9e9bf6aa 100644
--- a/dask/compatibility.py
+++ b/dask/compatibility.py
@@ -1,7 +1,19 @@
import sys
+import warnings
+from importlib_metadata import entry_points as _entry_points
from packaging.version import parse as parse_version
... |
sherlock-project__sherlock-1518 | Check multiple similar usernames
<!--
######################################################################
WARNING!
IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################
-->
## Checklist
<!--
Put x into all bo... | [
{
"content": "#! /usr/bin/env python3\n\n\"\"\"\nSherlock: Find Usernames Across Social Networks Module\n\nThis module contains the main logic to search for usernames at social\nnetworks.\n\"\"\"\n\nimport csv\nimport signal\nimport pandas as pd\nimport os\nimport platform\nimport re\nimport sys\nfrom argparse ... | [
{
"content": "#! /usr/bin/env python3\n\n\"\"\"\nSherlock: Find Usernames Across Social Networks Module\n\nThis module contains the main logic to search for usernames at social\nnetworks.\n\"\"\"\n\nimport csv\nimport signal\nimport pandas as pd\nimport os\nimport platform\nimport re\nimport sys\nfrom argparse ... | diff --git a/README.md b/README.md
index 5e94cac97..1823354f7 100644
--- a/README.md
+++ b/README.md
@@ -59,6 +59,7 @@ Sherlock: Find Usernames Across Social Networks (Version 0.14.2)
positional arguments:
USERNAMES One or more usernames to check with social networks.
+ Check si... |
open-mmlab__mmocr-285 | LineStrParser: separator behaviour
I've a question regarding this snippet of code:
https://github.com/open-mmlab/mmocr/blob/01d8d63be945882fb2d9eaca5e1c1b39cb45f274/mmocr/datasets/utils/parser.py#L33-L36
Is there a particular reason to use these 4 lines of code instead of simply `line_str = line_str.split(self.sepa... | [
{
"content": "import json\n\nfrom mmocr.datasets.builder import PARSERS\n\n\n@PARSERS.register_module()\nclass LineStrParser:\n \"\"\"Parse string of one line in annotation file to dict format.\n\n Args:\n keys (list[str]): Keys in result dict.\n keys_idx (list[int]): Value index in sub-stri... | [
{
"content": "import json\n\nfrom mmocr.datasets.builder import PARSERS\n\n\n@PARSERS.register_module()\nclass LineStrParser:\n \"\"\"Parse string of one line in annotation file to dict format.\n\n Args:\n keys (list[str]): Keys in result dict.\n keys_idx (list[int]): Value index in sub-stri... | diff --git a/mmocr/datasets/utils/parser.py b/mmocr/datasets/utils/parser.py
index a895e217d..27f0c618c 100644
--- a/mmocr/datasets/utils/parser.py
+++ b/mmocr/datasets/utils/parser.py
@@ -30,10 +30,7 @@ def __init__(self,
def get_item(self, data_ret, index):
map_index = index % len(data_ret)
lin... |
nilearn__nilearn-2529 | nilearn.signal.clean modifies input when "session" parameter used.
Hi guys,
[docs](https://nilearn.github.io/modules/generated/nilearn.signal.clean.html) for nilearn.signal.clean say:
"signals: numpy.ndarray
Timeseries. Must have shape (instant number, features number). **This array is not modified**."
Howe... | [
{
"content": "\"\"\"\nPreprocessing functions for time series.\n\nAll functions in this module should take X matrices with samples x\nfeatures\n\"\"\"\n# Authors: Alexandre Abraham, Gael Varoquaux, Philippe Gervais\n# License: simplified BSD\n\nimport distutils.version\nimport warnings\n\nimport numpy as np\nfr... | [
{
"content": "\"\"\"\nPreprocessing functions for time series.\n\nAll functions in this module should take X matrices with samples x\nfeatures\n\"\"\"\n# Authors: Alexandre Abraham, Gael Varoquaux, Philippe Gervais\n# License: simplified BSD\n\nimport distutils.version\nimport warnings\n\nimport numpy as np\nfr... | diff --git a/nilearn/signal.py b/nilearn/signal.py
index b0aa2bc3b3..43a301e87b 100644
--- a/nilearn/signal.py
+++ b/nilearn/signal.py
@@ -482,13 +482,13 @@ def clean(signals, sessions=None, detrend=True, standardize='zscore',
"but you provided ensure_finite={0}"
.for... |
jazzband__django-simple-history-323 | Can't Access the History Detail View of /app/model/<pk>/history/<history_id>
We have this setup (Django **1.8.18**, SimpleHistory **1.8.2**):
```
# core/models.py
class VersionedAbstractModel(models.Model):
class Meta:
abstract = True
history = HistoricalRecords(inherit=True)
# accounts/mod... | [
{
"content": "from __future__ import unicode_literals\n\nfrom django import http\nfrom django.core.exceptions import PermissionDenied\nfrom django.conf.urls import url\nfrom django.contrib import admin\nfrom django.contrib.admin import helpers\nfrom django.contrib.contenttypes.models import ContentType\nfrom dj... | [
{
"content": "from __future__ import unicode_literals\n\nfrom django import http\nfrom django.core.exceptions import PermissionDenied\nfrom django.conf.urls import url\nfrom django.contrib import admin\nfrom django.contrib.admin import helpers\nfrom django.contrib.contenttypes.models import ContentType\nfrom dj... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index e2f11046c..9c6fd54f4 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -31,6 +31,7 @@ Authors
- Rajesh Pappula
- Rod Xavier Bondoc
- Ross Lote
+- Ross Mechanic
- Steven Klass
- Steeve Chailloux
- Trey Hunner
diff --git a/simple_history/admin.py b/simple_history/admin.py
in... |
benoitc__gunicorn-1483 | Upgrading to 19.7.0 means can't bind anymore
Upgraded to latest gunicorn and could not bind ip address anymore (simple wsgi app, ipv4 or ipv6 same story).
```
foo@xxx:~$ cd current
foo@xxx:~/current$ . env/bin/activate
foo@xxx:~/current$ gunicorn my.wsgi.package
[2017-03-10 18:50:46 +0000] [9242] [INFO] Starting... | [
{
"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport errno\nimport os\nimport socket\nimport stat\nimport sys\nimport time\n\nfrom gunicorn import util\nfrom gunicorn.six import string_types\n\n\nclass BaseSocke... | [
{
"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport errno\nimport os\nimport socket\nimport stat\nimport sys\nimport time\n\nfrom gunicorn import util\nfrom gunicorn.six import string_types\n\n\nclass BaseSocke... | diff --git a/gunicorn/sock.py b/gunicorn/sock.py
index 6f3044b2d..562a6653f 100644
--- a/gunicorn/sock.py
+++ b/gunicorn/sock.py
@@ -39,8 +39,12 @@ def __getattr__(self, name):
def set_options(self, sock, bound=False):
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
- if hasattr(socket... |
ckan__ckan-5153 | Validation errors during resource creation lead to wrong URLs
This was hard to track as it doesn't happen in a standard CKAN install, as the default resource form doesn't have required fields.
If an extension implements custom validation in the resource schema, and there are errors returned in the form the File uplo... | [
{
"content": "# encoding: utf-8\nimport cgi\nimport json\nimport logging\n\nimport flask\nfrom flask.views import MethodView\n\nimport six\nimport ckan.lib.base as base\nimport ckan.lib.datapreview as lib_datapreview\nimport ckan.lib.helpers as h\nimport ckan.lib.navl.dictization_functions as dict_fns\nimport c... | [
{
"content": "# encoding: utf-8\nimport cgi\nimport json\nimport logging\n\nimport flask\nfrom flask.views import MethodView\n\nimport six\nimport ckan.lib.base as base\nimport ckan.lib.datapreview as lib_datapreview\nimport ckan.lib.helpers as h\nimport ckan.lib.navl.dictization_functions as dict_fns\nimport c... | diff --git a/ckan/public/base/css/fuchsia.css b/ckan/public/base/css/fuchsia.css
index 9353e542365..c0e2f7fd3c3 100644
--- a/ckan/public/base/css/fuchsia.css
+++ b/ckan/public/base/css/fuchsia.css
@@ -8150,6 +8150,11 @@ fieldset[disabled] .control-custom.disabled .checkbox.btn.focus {
.js .image-upload .btn-remove-url... |
open-mmlab__mmsegmentation-19 | FileNotFoundError: [Errno 2] No such file or directory: 'VOCdevkit/VOCaug/dataset/trainval.txt'
https://github.com/open-mmlab/mmsegmentation/blob/1c3f54765981ba352d4cf6582edb1c8915e51d71/tools/convert_datasets/voc_aug.py#L53
Directory `VOCdevkit/VOCaug/dataset` does not exist `trainval.txt`, `trainval.txt` is the me... | [
{
"content": "import argparse\nimport os.path as osp\nfrom functools import partial\n\nimport mmcv\nimport numpy as np\nfrom PIL import Image\nfrom scipy.io import loadmat\n\nAUG_LEN = 10582\n\n\ndef convert_mat(mat_file, in_dir, out_dir):\n data = loadmat(osp.join(in_dir, mat_file))\n mask = data['GTcls'... | [
{
"content": "import argparse\nimport os.path as osp\nfrom functools import partial\n\nimport mmcv\nimport numpy as np\nfrom PIL import Image\nfrom scipy.io import loadmat\n\nAUG_LEN = 10582\n\n\ndef convert_mat(mat_file, in_dir, out_dir):\n data = loadmat(osp.join(in_dir, mat_file))\n mask = data['GTcls'... | diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 3ba13e0cec..6eaae3e0d5 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1 +1,6 @@
blank_issues_enabled: false
+
+contact_links:
+ - name: MMSegmentation Documentation
+ url: https://mm... |
ytdl-org__youtube-dl-1216 | Invalid signature again
Decryption function:
```
function kj(a) {
a = a.split("");
a = a.slice(2);
var b = a[0];
a[0] = a[18 % a.length];
a[18] = b;
a = a.slice(3);
return a.join("")
};
```
| [
{
"content": "# coding: utf-8\n\nimport json\nimport netrc\nimport re\nimport socket\nimport itertools\n\nfrom .common import InfoExtractor, SearchInfoExtractor\nfrom ..utils import (\n compat_http_client,\n compat_parse_qs,\n compat_urllib_error,\n compat_urllib_parse,\n compat_urllib_request,\n... | [
{
"content": "# coding: utf-8\n\nimport json\nimport netrc\nimport re\nimport socket\nimport itertools\n\nfrom .common import InfoExtractor, SearchInfoExtractor\nfrom ..utils import (\n compat_http_client,\n compat_parse_qs,\n compat_urllib_error,\n compat_urllib_parse,\n compat_urllib_request,\n... | diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index b191021db5a..ba2da4c5146 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -340,7 +340,7 @@ def _decrypt_signature(self, s):
elif len(s) == 87:
return s[83:53:-1] + s[3] + s[52:... |
pytorch__pytorch-4598 | Spelling error in lr_scheduler.py
Trivial report, unfortunately I can't make a PR at the moment, but I can submit a report.
line 329 in `torch/optim/lr_scheduler.py`
```python
if threshold_mode not in {'rel', 'abs'}:
raise ValueError('threshold mode ' + mode + ' is unknown!')
```
should... | [
{
"content": "import math\nfrom bisect import bisect_right\nfrom .optimizer import Optimizer\n\n\nclass _LRScheduler(object):\n def __init__(self, optimizer, last_epoch=-1):\n if not isinstance(optimizer, Optimizer):\n raise TypeError('{} is not an Optimizer'.format(\n type(o... | [
{
"content": "import math\nfrom bisect import bisect_right\nfrom .optimizer import Optimizer\n\n\nclass _LRScheduler(object):\n def __init__(self, optimizer, last_epoch=-1):\n if not isinstance(optimizer, Optimizer):\n raise TypeError('{} is not an Optimizer'.format(\n type(o... | diff --git a/torch/optim/lr_scheduler.py b/torch/optim/lr_scheduler.py
index 752e8606aa6a5c..33b7ebf34db103 100644
--- a/torch/optim/lr_scheduler.py
+++ b/torch/optim/lr_scheduler.py
@@ -326,7 +326,7 @@ def _init_is_better(self, mode, threshold, threshold_mode):
if mode not in {'min', 'max'}:
rais... |
vllm-project__vllm-1389 | AssertionError in LLM.generate from version 0.2.1
I've only tested this using Zephyr (mistral-type model), but when calling LLM.generate in version 0.2.1, I receive an AssertionError in the worker runs.
Code to reproduce:
```py
from vllm import LLM, SamplingParams
llm = LLM("HuggingFaceH4/zephyr-7b-alpha", tens... | [
{
"content": "\"\"\"Sequence and its related classes.\"\"\"\nimport copy\nimport enum\nfrom typing import Dict, List, Optional, Union\n\nfrom vllm.block import LogicalTokenBlock\nfrom vllm.sampling_params import SamplingParams\n\nPromptLogprobs = List[Optional[Dict[int, float]]]\nSampleLogprobs = List[Dict[int,... | [
{
"content": "\"\"\"Sequence and its related classes.\"\"\"\nimport copy\nimport enum\nfrom typing import Dict, List, Optional, Union\n\nfrom vllm.block import LogicalTokenBlock\nfrom vllm.sampling_params import SamplingParams\n\nPromptLogprobs = List[Optional[Dict[int, float]]]\nSampleLogprobs = List[Dict[int,... | diff --git a/vllm/sequence.py b/vllm/sequence.py
index 5847626b030..ecfaee6e8c3 100644
--- a/vllm/sequence.py
+++ b/vllm/sequence.py
@@ -401,6 +401,12 @@ def __repr__(self) -> str:
return (f"SequenceGroupOutputs(samples={self.samples}, "
f"prompt_logprobs={self.prompt_logprobs})")
+ def _... |
kivy__python-for-android-800 | Cryptography recipe does not compile
I'm trying to build Kivy app with:
- sdl2 bootstrap
- recipes python2,kivy,cryptography
- buildozer 0.32
- latest python-for-android master branch
In libffi recipe I had to replace [line](https://github.com/kivy/python-for-android/blob/master/pythonforandroid/recipes/libffi/__in... | [
{
"content": "from pythonforandroid.recipe import Recipe\nfrom pythonforandroid.logger import shprint\nfrom pythonforandroid.util import current_directory\nfrom os.path import exists, join\nimport sh\nimport glob\n\n\nclass LibffiRecipe(Recipe):\n\tname = 'libffi'\n\tversion = 'v3.2.1'\n\turl = 'https://github.... | [
{
"content": "from pythonforandroid.recipe import Recipe\nfrom pythonforandroid.logger import shprint\nfrom pythonforandroid.util import current_directory\nfrom os.path import exists, join\nimport sh\nimport glob\n\n\nclass LibffiRecipe(Recipe):\n\tname = 'libffi'\n\tversion = 'v3.2.1'\n\turl = 'https://github.... | diff --git a/pythonforandroid/recipes/libffi/__init__.py b/pythonforandroid/recipes/libffi/__init__.py
index cbceed4a00..1f216b960c 100644
--- a/pythonforandroid/recipes/libffi/__init__.py
+++ b/pythonforandroid/recipes/libffi/__init__.py
@@ -40,7 +40,7 @@ def build_arch(self, arch):
with current_directory(self.get_... |
django-cms__django-cms-2930 | render_model hvad model on apphook with 2 languages but one not published raises 500
following situation:
apphook with a hvad model.
one apphook page language is published. the other not. if both are published everything works. if one is not published (en) it raises 500. It could be that usersettings language is engli... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom copy import copy\nfrom itertools import chain\nfrom datetime import datetime\nfrom django.template.defaultfilters import safe\nfrom classytags.arguments import Argument, MultiValueArgument\nfrom classytags.core import Options, Tag\nfrom classytags.helpers import Inclu... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom copy import copy\nfrom itertools import chain\nfrom datetime import datetime\nfrom django.template.defaultfilters import safe\nfrom classytags.arguments import Argument, MultiValueArgument\nfrom classytags.core import Options, Tag\nfrom classytags.helpers import Inclu... | diff --git a/cms/templatetags/cms_tags.py b/cms/templatetags/cms_tags.py
index 9202dce952d..103ca515b5a 100644
--- a/cms/templatetags/cms_tags.py
+++ b/cms/templatetags/cms_tags.py
@@ -742,7 +742,10 @@ def _get_content(self, context, instance, attribute, language, filters):
Renders the requested attribute
... |
pyro-ppl__numpyro-255 | Usage of the `scale` effect handler?
The `scale` effect handler was introduced in commit [495cdbf2](https://github.com/pyro-ppl/numpyro/commit/495cdbf2c696ca9568e5a074e5b45d2e9eb2784c) but varies from other handlers in that it doesn't accept a callable `fn` argument on construction but only the scaling factor. Therefor... | [
{
"content": "\"\"\"\nThis provides a small set of effect handlers in NumPyro that are modeled\nafter Pyro's `poutine <http://docs.pyro.ai/en/stable/poutine.html>`_ module.\nFor a tutorial on effect handlers more generally, readers are encouraged to\nread `Poutine: A Guide to Programming with Effect Handlers in... | [
{
"content": "\"\"\"\nThis provides a small set of effect handlers in NumPyro that are modeled\nafter Pyro's `poutine <http://docs.pyro.ai/en/stable/poutine.html>`_ module.\nFor a tutorial on effect handlers more generally, readers are encouraged to\nread `Poutine: A Guide to Programming with Effect Handlers in... | diff --git a/numpyro/handlers.py b/numpyro/handlers.py
index 684206fe4..c065a10b7 100644
--- a/numpyro/handlers.py
+++ b/numpyro/handlers.py
@@ -247,11 +247,11 @@ class scale(Messenger):
:param float scale_factor: a positive scaling factor
"""
- def __init__(self, scale_factor):
+ def __init__(self, f... |
mozilla__kitsune-3192 | Improve performance of _get_creator_counts util function
`kitsune.community.utils._get_creator_counts` until function is DB heavy and takes a lot of time to execute. Evaluate its usefulness and provide a way to optimize the query and/or cache the results.
This issue is related to the degraded performance SUMO expe... | [
{
"content": "import hashlib\n\nfrom datetime import datetime, date, timedelta\nfrom django.conf import settings\nfrom django.core.cache import cache\nfrom django.db.models import Count, F\n\nfrom kitsune.products.models import Product\nfrom kitsune.questions.models import Answer\nfrom kitsune.users.models impo... | [
{
"content": "import hashlib\n\nfrom datetime import datetime, date, timedelta\nfrom operator import itemgetter\n\nfrom django.conf import settings\nfrom django.core.cache import cache\nfrom django.db.models import Count, F\n\nfrom kitsune.products.models import Product\nfrom kitsune.questions.models import Ans... | diff --git a/kitsune/community/utils.py b/kitsune/community/utils.py
index 5c6b47ee48d..37f43ce7a47 100644
--- a/kitsune/community/utils.py
+++ b/kitsune/community/utils.py
@@ -1,6 +1,8 @@
import hashlib
from datetime import datetime, date, timedelta
+from operator import itemgetter
+
from django.conf import setti... |
ivy-llc__ivy-14394 | unique
| [
{
"content": "import ivy\r\nfrom ivy.func_wrapper import with_unsupported_dtypes\r\nfrom ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back\r\nfrom collections import namedtuple\r\n\r\n\r\n@to_ivy_arrays_and_back\r\ndef dist(input, other, p=2):\r\n return ivy.vector_norm(ivy.subtract(i... | [
{
"content": "import ivy\r\nfrom ivy.func_wrapper import with_unsupported_dtypes\r\nfrom ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back\r\nfrom collections import namedtuple\r\n\r\n\r\n@to_ivy_arrays_and_back\r\ndef dist(input, other, p=2):\r\n return ivy.vector_norm(ivy.subtract(i... | diff --git a/ivy/functional/frontends/torch/reduction_ops.py b/ivy/functional/frontends/torch/reduction_ops.py
index 6071157d3bf76..cef3d118cb8af 100644
--- a/ivy/functional/frontends/torch/reduction_ops.py
+++ b/ivy/functional/frontends/torch/reduction_ops.py
@@ -230,3 +230,24 @@ def logsumexp(input, dim, keepdim=Fals... |
google__timesketch-898 | IndexError: cannot do a non-empty take from an empty axes. (when domain_count_array is empty)
I don't know why domain_count_array is empty but in this case an error is raised:
```
[2019-05-15 15:57:25,067: ERROR/ForkPoolWorker-1] Task timesketch.lib.tasks.run_sketch_analyzer[87c2fee5-d10c-4a92-8d28-a6acc970a7fe] rais... | [
{
"content": "\"\"\"Sketch analyzer plugin for domain.\"\"\"\nfrom __future__ import unicode_literals\n\nimport collections\nimport numpy\n\nfrom timesketch.lib import emojis\nfrom timesketch.lib.analyzers import interface\nfrom timesketch.lib.analyzers import manager\nfrom timesketch.lib.analyzers import utils... | [
{
"content": "\"\"\"Sketch analyzer plugin for domain.\"\"\"\nfrom __future__ import unicode_literals\n\nimport collections\nimport numpy\n\nfrom timesketch.lib import emojis\nfrom timesketch.lib.analyzers import interface\nfrom timesketch.lib.analyzers import manager\nfrom timesketch.lib.analyzers import utils... | diff --git a/timesketch/lib/analyzers/domain.py b/timesketch/lib/analyzers/domain.py
index ce4a98f171..0716ecf7b1 100644
--- a/timesketch/lib/analyzers/domain.py
+++ b/timesketch/lib/analyzers/domain.py
@@ -67,6 +67,10 @@ def run(self):
tld = '.'.join(domain.split('.')[-2:])
tld_counter[tld] +... |
holoviz__panel-3677 | Panel code raises DeprecationWarning: panel.Pane(...) is deprecated, use panel.panel(...) instead.
Panel 0.13.1
```python
import panel as pn
def test_func():
slider = pn.widgets.IntSlider(value=0, start=0, end=10)
def func(value):
return value
func = pn.bind(func, slider)
return pn.C... | [
{
"content": "\"\"\"\nDefines the PaneBase class defining the API for panes which convert\nobjects to a visual representation expressed as a bokeh model.\n\"\"\"\nfrom __future__ import annotations\n\nimport warnings\n\nfrom functools import partial\nfrom typing import (\n TYPE_CHECKING, Any, Callable, Class... | [
{
"content": "\"\"\"\nDefines the PaneBase class defining the API for panes which convert\nobjects to a visual representation expressed as a bokeh model.\n\"\"\"\nfrom __future__ import annotations\n\nimport warnings\n\nfrom functools import partial\nfrom typing import (\n TYPE_CHECKING, Any, Callable, Class... | diff --git a/panel/pane/base.py b/panel/pane/base.py
index 144a18ff0a..19cf9d3627 100644
--- a/panel/pane/base.py
+++ b/panel/pane/base.py
@@ -386,7 +386,7 @@ def __init__(self, object: Any=None, **params):
self._kwargs = {p: params.pop(p) for p in list(params)
if p not in self.param... |
frappe__frappe-15483 | deny_multiple_sessions doesn't let anyone login (develop)
<!--
Welcome to the Frappe Framework issue tracker! Before creating an issue, please heed the following:
1. This tracker should only be used to report bugs and request features / enhancements to Frappe
- For questions and general support, use https://st... | [
{
"content": "# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors\n# License: MIT. See LICENSE\n\"\"\"\nBoot session from cache or build\n\nSession bootstraps info needed by common client side activities including\npermission, homepage, default variables, system defaults etc\n\"\"\"\nimport fra... | [
{
"content": "# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors\n# License: MIT. See LICENSE\n\"\"\"\nBoot session from cache or build\n\nSession bootstraps info needed by common client side activities including\npermission, homepage, default variables, system defaults etc\n\"\"\"\nimport fra... | diff --git a/frappe/sessions.py b/frappe/sessions.py
index f0609cd74ea6..6c9acdba1367 100644
--- a/frappe/sessions.py
+++ b/frappe/sessions.py
@@ -68,9 +68,14 @@ def get_sessions_to_clear(user=None, keep_current=False, device=None):
session = DocType("Sessions")
session_id = frappe.qb.from_(session).where((session.... |
geopandas__geopandas-2599 | ENH: prefer min_zoom and max_zoom arguments instead of tile metadata in explore()
#### Is your feature request related to a problem?
Right now, `xyzservices.TileProvider` metadata overrides `min_zoom` and `max_zoom` arguments and there's essentially no way around it without changing the provider.
#### Describe th... | [
{
"content": "from statistics import mean\n\nimport geopandas\nfrom shapely.geometry import LineString\nimport numpy as np\nimport pandas as pd\n\nfrom packaging.version import Version\n\n_MAP_KWARGS = [\n \"location\",\n \"prefer_canvas\",\n \"no_touch\",\n \"disable_3d\",\n \"png_enabled\",\n ... | [
{
"content": "from statistics import mean\n\nimport geopandas\nfrom shapely.geometry import LineString\nimport numpy as np\nimport pandas as pd\n\nfrom packaging.version import Version\n\n_MAP_KWARGS = [\n \"location\",\n \"prefer_canvas\",\n \"no_touch\",\n \"disable_3d\",\n \"png_enabled\",\n ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 53fb4d2f38..146ed76ef0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
New features and improvements:
- Added ``minimum_bounding_circle()`` method from shapely to GeoSeries/GeoDataframe (#2621).
+- Support specifying ``min_zoom`` and ``max_zoom`` inside th... |
safe-global__safe-config-service-1092 | `/api/v1/chains` returns unexpected nativeCurrency.logoUri path
**Describe the bug**
I deployed a project locally using the code from `https://github.com/safe-global/safe-infrastructure`. However, after adding a configuration for a chain in cfg, the `/v1/chains` endpoint of cgw started returning a 500 error. After ena... | [
{
"content": "from abc import abstractmethod\n\nfrom drf_yasg.utils import swagger_serializer_method\nfrom gnosis.eth.django.serializers import EthereumAddressField\nfrom rest_framework import serializers\nfrom rest_framework.exceptions import APIException\nfrom rest_framework.utils.serializer_helpers import Re... | [
{
"content": "from abc import abstractmethod\n\nfrom drf_yasg.utils import swagger_serializer_method\nfrom gnosis.eth.django.serializers import EthereumAddressField\nfrom rest_framework import serializers\nfrom rest_framework.exceptions import APIException\nfrom rest_framework.utils.serializer_helpers import Re... | diff --git a/src/chains/serializers.py b/src/chains/serializers.py
index 92fab0e9..c65a2e83 100644
--- a/src/chains/serializers.py
+++ b/src/chains/serializers.py
@@ -171,10 +171,11 @@ class Meta:
"features",
]
- @staticmethod
@swagger_serializer_method(serializer_or_field=CurrencySerial... |
DataDog__dd-agent-2443 | [marathon] Marathon plugin slows down agent when marathon has many apps running
We are monitoring a marathon framework using datadog which has over 150 apps, and the marathon check seems to be slowing down the entire datadog process.
After investigating what the plugin actually does, the problem seems to be this loop:... | [
{
"content": "# (C) Datadog, Inc. 2014-2016\n# (C) graemej <graeme.johnson@jadedpixel.com> 2014\n# All rights reserved\n# Licensed under Simplified BSD License (see LICENSE)\n\n\n# stdlib\nfrom urlparse import urljoin\n\n# 3rd party\nimport requests\n\n# project\nfrom checks import AgentCheck\n\n\nclass Marath... | [
{
"content": "# (C) Datadog, Inc. 2014-2016\n# (C) graemej <graeme.johnson@jadedpixel.com> 2014\n# All rights reserved\n# Licensed under Simplified BSD License (see LICENSE)\n\n\n# stdlib\nfrom urlparse import urljoin\n\n# 3rd party\nimport requests\n\n# project\nfrom checks import AgentCheck\n\n\nclass Marath... | diff --git a/checks.d/marathon.py b/checks.d/marathon.py
index 8be73689c4..d06ec71a33 100644
--- a/checks.d/marathon.py
+++ b/checks.d/marathon.py
@@ -56,12 +56,6 @@ def check(self, instance):
if attr in app:
self.gauge('marathon.' + attr, app[attr], tags=tags)
- ... |
encode__starlette-1041 | StreamingResponse doesn't support PEP-492 asynchronous iterators
[PEP-492 asynchronous iterators](https://www.python.org/dev/peps/pep-0492/#asynchronous-iterators-and-async-for) have the following signature:
```python
class AsyncIterable:
def __aiter__(self):
return self
async def __anext__(sel... | [
{
"content": "import hashlib\nimport http.cookies\nimport inspect\nimport json\nimport os\nimport stat\nimport sys\nimport typing\nfrom email.utils import formatdate\nfrom mimetypes import guess_type as mimetypes_guess_type\nfrom urllib.parse import quote, quote_plus\n\nfrom starlette.background import Backgrou... | [
{
"content": "import hashlib\nimport http.cookies\nimport json\nimport os\nimport stat\nimport sys\nimport typing\nfrom email.utils import formatdate\nfrom mimetypes import guess_type as mimetypes_guess_type\nfrom urllib.parse import quote, quote_plus\n\nfrom starlette.background import BackgroundTask\nfrom sta... | diff --git a/starlette/responses.py b/starlette/responses.py
index 24e3b5469..d5f273467 100644
--- a/starlette/responses.py
+++ b/starlette/responses.py
@@ -1,6 +1,5 @@
import hashlib
import http.cookies
-import inspect
import json
import os
import stat
@@ -204,7 +203,7 @@ def __init__(
media_type: str = ... |
translate__pootle-6595 | Running `calculate_checks` without a project specified runs same checks for all projects
It seems that running `pootle calculate_checks` uses same checks for all projects, regardless of per-project settings.
This caused quite a headache for me by seemingly using the `standard` checks on a project with `reduced` checks... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport logging... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship information.\n\nimport logging... | diff --git a/pootle/apps/pootle_checks/utils.py b/pootle/apps/pootle_checks/utils.py
index a46c6bdbe0c..794a87b3137 100644
--- a/pootle/apps/pootle_checks/utils.py
+++ b/pootle/apps/pootle_checks/utils.py
@@ -298,7 +298,7 @@ def update_translated(self):
if self.translation_project is not None:
... |
localstack__localstack-3752 | ListStackResources does not have LastUpdatedTimestamp field
# Type of request: This is a ...
bug report
# Detailed description
aws cloudformation list-stack-resources --stack-name "mystack"
{
"StackResourceSummaries": [
{
"LogicalResourceId": "MyS3Bucket",
"PhysicalRes... | [
{
"content": "import json\nimport logging\nimport traceback\nimport xmltodict\nfrom flask import Flask, request\nfrom requests.models import Response\nfrom localstack.utils.aws import aws_stack\nfrom localstack.utils.common import (\n parse_request_data, short_uid, long_uid, clone, clone_safe, select_attribu... | [
{
"content": "import json\nimport logging\nimport traceback\nimport xmltodict\nfrom flask import Flask, request\nfrom requests.models import Response\nfrom localstack.utils.aws import aws_stack\nfrom localstack.utils.common import (\n parse_request_data, short_uid, long_uid, clone, clone_safe, select_attribu... | diff --git a/localstack/services/cloudformation/cloudformation_api.py b/localstack/services/cloudformation/cloudformation_api.py
index 922cd8ced9b35..9b7e287dd0b5b 100644
--- a/localstack/services/cloudformation/cloudformation_api.py
+++ b/localstack/services/cloudformation/cloudformation_api.py
@@ -127,6 +127,7 @@ def... |
nautobot__nautobot-1520 | Include IP in device view export
### As ...
Ozzie - Operator
### I want ...
have IP address column in my device UI export
### So that ...
I can easily work with device/IP relation, for example compare the data with another system.
### I know this is done when...
- Exporting from device view returns IP address c... | [
{
"content": "from collections import OrderedDict\n\nimport yaml\nfrom django.contrib.contenttypes.fields import GenericRelation\nfrom django.core.exceptions import ValidationError\nfrom django.core.serializers.json import DjangoJSONEncoder\nfrom django.core.validators import MaxValueValidator, MinValueValidato... | [
{
"content": "from collections import OrderedDict\n\nimport yaml\nfrom django.contrib.contenttypes.fields import GenericRelation\nfrom django.core.exceptions import ValidationError\nfrom django.core.serializers.json import DjangoJSONEncoder\nfrom django.core.validators import MaxValueValidator, MinValueValidato... | diff --git a/nautobot/dcim/models/devices.py b/nautobot/dcim/models/devices.py
index 9203ebd3896..ef3bca9d68d 100644
--- a/nautobot/dcim/models/devices.py
+++ b/nautobot/dcim/models/devices.py
@@ -561,6 +561,7 @@ class Device(PrimaryModel, ConfigContextModel, StatusModel):
"position",
"face",
... |
biolab__orange3-4692 | Select Columns not remembering settings on workflow reload
When using Select Columns in a workflow, saving a workflow and reopening it the selection in Select Columns is forgotten. - Select Columns shows no features and Reset must be used before they are shown again (image below).
![Screenshot from 2020-04-23 21-09... | [
{
"content": "from functools import partial\nfrom typing import Optional\n\nfrom AnyQt.QtWidgets import QWidget, QGridLayout\nfrom AnyQt.QtWidgets import QListView\nfrom AnyQt.QtCore import (\n Qt, QTimer, QSortFilterProxyModel, QItemSelection, QItemSelectionModel,\n QMimeData, QAbstractItemModel\n)\n\nfr... | [
{
"content": "from functools import partial\nfrom typing import Optional\n\nfrom AnyQt.QtWidgets import QWidget, QGridLayout\nfrom AnyQt.QtWidgets import QListView\nfrom AnyQt.QtCore import (\n Qt, QTimer, QSortFilterProxyModel, QItemSelection, QItemSelectionModel,\n QMimeData, QAbstractItemModel\n)\n\nfr... | diff --git a/Orange/widgets/data/owselectcolumns.py b/Orange/widgets/data/owselectcolumns.py
index 49a9a0dfcb8..f511fba7747 100644
--- a/Orange/widgets/data/owselectcolumns.py
+++ b/Orange/widgets/data/owselectcolumns.py
@@ -124,8 +124,9 @@ def match(self, context, domain, attrs, metas):
value = context.values... |
RedHatInsights__insights-core-2464 | Enhance parser "satellite_installer_configurations"
As a default, the file "/etc/foreman-installer/custom-hiera.yaml" is empty, it means customers haven't done any tuning, it shouldn't be skipped.
| [
{
"content": "\"\"\"\nSatellite installer configuration files\n=======================================\n\nParsers included in this module are:\n\nCustomHiera - file ``/etc/foreman-installer/custom-hiera.yaml``\n---------------------------------------------------------------\nParsers the file `/etc/foreman-insta... | [
{
"content": "\"\"\"\nSatellite installer configuration files\n=======================================\n\nParsers included in this module are:\n\nCustomHiera - file ``/etc/foreman-installer/custom-hiera.yaml``\n---------------------------------------------------------------\nParsers the file `/etc/foreman-insta... | diff --git a/insights/parsers/satellite_installer_configurations.py b/insights/parsers/satellite_installer_configurations.py
index abbd09340f..efe43c7c35 100644
--- a/insights/parsers/satellite_installer_configurations.py
+++ b/insights/parsers/satellite_installer_configurations.py
@@ -12,6 +12,7 @@
from insights im... |
nvaccess__nvda-14517 | Espeak reads numbers more than 34 digits as 3647
### Steps to reproduce:
Try to read number 2748573849604723649583647594365737548 With espeak
### Actual behavior:
Espeak read this number as 3647
### Expected behavior:
Espeak should read large number correctly
### System configuration
#### NVDA installed/portable... | [
{
"content": "# -*- coding: UTF-8 -*-\r\n# A part of NonVisual Desktop Access (NVDA)\r\n# Copyright (C) 2007-2022 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Leonard de Ruijter\r\n# This file is covered by the GNU General Public License.\r\n# See the file COPYING for more details.\r\n\r\nimport os\r\nfrom... | [
{
"content": "# -*- coding: UTF-8 -*-\r\n# A part of NonVisual Desktop Access (NVDA)\r\n# Copyright (C) 2007-2022 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Leonard de Ruijter\r\n# This file is covered by the GNU General Public License.\r\n# See the file COPYING for more details.\r\n\r\nimport os\r\nfrom... | diff --git a/include/espeak b/include/espeak
index b17ed2d682f..a51235aaabd 160000
--- a/include/espeak
+++ b/include/espeak
@@ -1 +1 @@
-Subproject commit b17ed2d682fa5cc1bbab3d20089ce781a0579a03
+Subproject commit a51235aaabdc15f76ed0f7f642f2c1efd562b373
diff --git a/nvdaHelper/espeak/sconscript b/nvdaHelper/espeak/s... |
django-tastypie__django-tastypie-1503 | Django 1.9 not fully supported
related: #1395
django-tastypie states in the README that Django 1.9 is supported, but request.REQUEST is used somewhere in current master: https://github.com/django-tastypie/django-tastypie/blob/ea010ffb09f2a30db4acfb734b4315242652da29/tastypie/authentication.py#L528
The removal o... | [
{
"content": "from __future__ import unicode_literals\nimport base64\nfrom hashlib import sha1\nimport hmac\nimport time\nimport uuid\nimport warnings\n\nfrom django.conf import settings\nfrom django.contrib.auth import authenticate\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.middlewar... | [
{
"content": "from __future__ import unicode_literals\nimport base64\nfrom hashlib import sha1\nimport hmac\nimport time\nimport uuid\nimport warnings\n\nfrom django.conf import settings\nfrom django.contrib.auth import authenticate\nfrom django.core.exceptions import ImproperlyConfigured\nfrom django.middlewar... | diff --git a/tastypie/authentication.py b/tastypie/authentication.py
index 88e5c463e..69bc26b64 100644
--- a/tastypie/authentication.py
+++ b/tastypie/authentication.py
@@ -525,7 +525,9 @@ def is_valid_request(self, request):
according to OAuth spec) or fall back to ``GET/POST``.
"""
auth_par... |
oppia__oppia-14117 | Small Typo in core/controllers/admin.py
core/controllers/admin.py
Line 191
`handlded` -> `handled`
Small Typo in core/controllers/admin.py
core/controllers/admin.py
Line 191
`handlded` -> `handled`
| [
{
"content": "# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | [
{
"content": "# Copyright 2014 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | diff --git a/core/controllers/admin.py b/core/controllers/admin.py
index f46ec48099eb9..5a1bce8992b6d 100644
--- a/core/controllers/admin.py
+++ b/core/controllers/admin.py
@@ -187,7 +187,7 @@ def get(self):
feature_flag_dicts = feature_services.get_all_feature_flag_dicts()
config_properties = confi... |
dmlc__gluon-nlp-1056 | Unicode comma error
## Description
When running the `word_language_model.py` script, sometimes I ran into the following error:
```
Traceback (most recent call last):
File "word_language_model.py", line 468, in <module>
train()
File "word_language_model.py", line 426, in train
trainer.learning_rate)... | [
{
"content": "\"\"\"\nWord Language Model\n===================\n\nThis example shows how to build a word-level language model on WikiText-2 with Gluon NLP Toolkit.\nBy using the existing data pipeline tools and building blocks, the process is greatly simplified.\n\nWe implement the AWD LSTM language model propo... | [
{
"content": "\"\"\"\nWord Language Model\n===================\n\nThis example shows how to build a word-level language model on WikiText-2 with Gluon NLP Toolkit.\nBy using the existing data pipeline tools and building blocks, the process is greatly simplified.\n\nWe implement the AWD LSTM language model propo... | diff --git a/scripts/language_model/word_language_model.py b/scripts/language_model/word_language_model.py
index 374307fb3d..12df344d79 100644
--- a/scripts/language_model/word_language_model.py
+++ b/scripts/language_model/word_language_model.py
@@ -421,7 +421,7 @@ def train():
else:
model.save_p... |
PrefectHQ__prefect-7360 | `NameError: name 'ObjectAlreadyExists' is not defined` when updating an existing deployment with Python API
### First check
- [X] I added a descriptive title to this issue.
- [X] I used the GitHub search to find a similar issue and didn't find it.
- [X] I searched the Prefect documentation for this issue.
- [X] I... | [
{
"content": "\"\"\"\nObjects for specifying deployments and utilities for loading flows from deployments.\n\"\"\"\n\nimport importlib\nimport json\nimport sys\nfrom datetime import datetime\nfrom pathlib import Path\nfrom typing import Any, Dict, List, Optional\nfrom uuid import UUID\n\nimport anyio\nimport pe... | [
{
"content": "\"\"\"\nObjects for specifying deployments and utilities for loading flows from deployments.\n\"\"\"\n\nimport importlib\nimport json\nimport sys\nfrom datetime import datetime\nfrom pathlib import Path\nfrom typing import Any, Dict, List, Optional\nfrom uuid import UUID\n\nimport anyio\nimport pe... | diff --git a/src/prefect/deployments.py b/src/prefect/deployments.py
index 7d1efa40286d..ce2bebc52382 100644
--- a/src/prefect/deployments.py
+++ b/src/prefect/deployments.py
@@ -19,7 +19,7 @@
from prefect.client.orion import OrionClient, get_client
from prefect.client.utilities import inject_client
from prefect.con... |
aws-cloudformation__cfn-lint-1768 | AutoPublishAlias property in Globals section throws E0001
*cfn-lint version: (`cfn-lint --version`)*
`cfn-lint 0.34.0`
*Description of issue.*
`AutoPublishAlias` in `Globals` section, referencing template parameter throws [`E0001`](https://github.com/aws-cloudformation/cfn-python-lint/blob/master/docs/rules.md#E00... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport os\nimport logging\nimport six\nimport samtranslator\nfrom samtranslator.parser import parser\nfrom samtranslator.translator.translator import Translator\nfrom samtranslator.p... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport os\nimport logging\nimport six\nimport samtranslator\nfrom samtranslator.parser import parser\nfrom samtranslator.translator.translator import Translator\nfrom samtranslator.p... | diff --git a/src/cfnlint/transform.py b/src/cfnlint/transform.py
index 23fa6bf3b4..e91d00c695 100644
--- a/src/cfnlint/transform.py
+++ b/src/cfnlint/transform.py
@@ -57,6 +57,16 @@ def _replace_local_codeuri(self):
all_resources = self._template.get('Resources', {})
+ template_globals = self._templ... |
DataDog__dd-trace-py-2476 | Mongoengine/PyMongo instrumentation caused extreme slowness(nearly causing an outage).
### Which version of dd-trace-py are you using?
ddtrace==0.48.4
### Which version of pip are you using?
pip 20.0.1
_ddtrace requires pip>=18 to install one of our pre-built wheels_
### Which version of the libraries ar... | [
{
"content": "# stdlib\nimport contextlib\nimport json\n\n# 3p\nimport pymongo\n\n# project\nimport ddtrace\nfrom ddtrace import config\nfrom ddtrace.vendor.wrapt import ObjectProxy\n\nfrom ...constants import ANALYTICS_SAMPLE_RATE_KEY\nfrom ...constants import SPAN_MEASURED_KEY\nfrom ...ext import SpanTypes\nf... | [
{
"content": "# stdlib\nimport contextlib\nimport json\n\n# 3p\nimport pymongo\n\n# project\nimport ddtrace\nfrom ddtrace import config\nfrom ddtrace.vendor.wrapt import ObjectProxy\n\nfrom ...constants import ANALYTICS_SAMPLE_RATE_KEY\nfrom ...constants import SPAN_MEASURED_KEY\nfrom ...ext import SpanTypes\nf... | diff --git a/ddtrace/contrib/pymongo/client.py b/ddtrace/contrib/pymongo/client.py
index b58e99e62b1..4eaa2473f24 100644
--- a/ddtrace/contrib/pymongo/client.py
+++ b/ddtrace/contrib/pymongo/client.py
@@ -55,7 +55,8 @@ def __init__(self, client=None, *args, **kwargs):
# calls in the trace library. This is good... |
akvo__akvo-rsr-2213 | Add reporting template for Plan Finland
We should add the reporting template that @stellanl and @Geerts are working on to the "My reports" section. Preferably so that only superusers / admins / Plan Finland employees can see this, but we might need a little hack for that.
| [
{
"content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\nfrom djang... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\nfrom djang... | diff --git a/akvo/rsr/reports.py b/akvo/rsr/reports.py
index 86da4ca480..4faa169279 100644
--- a/akvo/rsr/reports.py
+++ b/akvo/rsr/reports.py
@@ -52,6 +52,15 @@
'formats': ['pdf', 'excel'],
'parameters': ['organisation', ],
'url': '/en/reports/data_quality/{organisation}?format={format}&down... |
scrapy__scrapy-4761 | Have tests generate a certificate on-the-fly
Unless we want to be doing https://github.com/scrapy/scrapy/pull/4650 every year, we should look into making tests generate a fresh certificate at run time.
| [
{
"content": "from pathlib import Path\n\nimport pytest\n\n\ndef _py_files(folder):\n return (str(p) for p in Path(folder).rglob('*.py'))\n\n\ncollect_ignore = [\n # not a test, but looks like a test\n \"scrapy/utils/testsite.py\",\n # contains scripts to be run by tests/test_crawler.py::CrawlerProc... | [
{
"content": "from pathlib import Path\n\nimport pytest\n\nfrom tests.keys import generate_keys\n\n\ndef _py_files(folder):\n return (str(p) for p in Path(folder).rglob('*.py'))\n\n\ncollect_ignore = [\n # not a test, but looks like a test\n \"scrapy/utils/testsite.py\",\n # contains scripts to be r... | diff --git a/.gitignore b/.gitignore
index 83a2569ddf0..795e2605e00 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,6 +16,8 @@ htmlcov/
.coverage.*
.cache/
.mypy_cache/
+/tests/keys/localhost.crt
+/tests/keys/localhost.key
# Windows
Thumbs.db
diff --git a/conftest.py b/conftest.py
index b39d644a511..95d4eaef632 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.