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 ⌀ |
|---|---|---|---|---|
pyca__cryptography-4160 | aes keywrap with padding does properly handle key to wrap length % 8 == 0
@SalusaSecondus and I found a bug in the new `aes_key_unwrap_with_padding` for wrapped keys where the plaintext is multiples of 8 bytes. Strangely, it looks like the NIST test vectors used do include cases like this, but they are passing.
The ... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport struct\n\nfrom cryptography.hazmat.pri... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport struct\n\nfrom cryptography.hazmat.pri... | diff --git a/src/cryptography/hazmat/primitives/keywrap.py b/src/cryptography/hazmat/primitives/keywrap.py
index 3b5313189c89..2b7955f8b056 100644
--- a/src/cryptography/hazmat/primitives/keywrap.py
+++ b/src/cryptography/hazmat/primitives/keywrap.py
@@ -118,11 +118,16 @@ def aes_key_unwrap_with_padding(wrapping_key, w... |
pypa__pip-10588 | Document PIP_REQUIRE_VIRTUALENV and --require-venv
### Description
The documentation does not seem to mention PIP_REQUIRE_VIRTUALENV or --require-venv anywhere.
### Expected behavior
_No response_
### pip version
20.3.3
### Python version
3.9
### OS
Linux
### How to Reproduce
Search for `PIP_REQUIRE_VIRTUALE... | [
{
"content": "\"\"\"\nshared options and groups\n\nThe principle here is to define options once, but *not* instantiate them\nglobally. One reason being that options with action='append' can carry state\nbetween parses. pip parses general options twice internally, and shouldn't\npass on state. To be consistent, ... | [
{
"content": "\"\"\"\nshared options and groups\n\nThe principle here is to define options once, but *not* instantiate them\nglobally. One reason being that options with action='append' can carry state\nbetween parses. pip parses general options twice internally, and shouldn't\npass on state. To be consistent, ... | diff --git a/news/10588.feature.rst b/news/10588.feature.rst
new file mode 100644
index 00000000000..c8985b7a05a
--- /dev/null
+++ b/news/10588.feature.rst
@@ -0,0 +1 @@
+Documents the ``--require-virtualenv`` flag for ``pip install``.
diff --git a/src/pip/_internal/cli/cmdoptions.py b/src/pip/_internal/cli/cmdoptions.... |
google__fuzzbench-309 | master cannot pass "make presubmit"
Current master branch has one failed at "``make presubmit``".
To reproduce: ``git clone https://github.com/google/fuzzbench ; cd fuzzbench ; git submodule update --init ; make install-dependencies ; source ./vene/bin/activate ; make presubmit``
https://github.com/google/fuzzben... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml
index 389eae7be..bdb5c2fb0 100644
--- a/.github/workflows/presubmit.yml
+++ b/.github/workflows/presubmit.yml
@@ -16,4 +16,4 @@ jobs:
python-version: 3.7
- name: Run presubmit checks
run: |
- make presubmit
+ ... |
goauthentik__authentik-7693 | added user_agent to Failed Logins Events
Including the User-Agent in failed login attempt logs improves security monitoring. It enables the identification of suspicious or potentially malicious login attempts originating from specific devices or browsers.
| [
{
"content": "\"\"\"authentik events models\"\"\"\nimport time\nfrom collections import Counter\nfrom datetime import timedelta\nfrom inspect import currentframe\nfrom smtplib import SMTPException\nfrom typing import TYPE_CHECKING, Optional\nfrom uuid import uuid4\n\nfrom django.db import models\nfrom django.db... | [
{
"content": "\"\"\"authentik events models\"\"\"\nimport time\nfrom collections import Counter\nfrom datetime import timedelta\nfrom inspect import currentframe\nfrom smtplib import SMTPException\nfrom typing import TYPE_CHECKING, Optional\nfrom uuid import uuid4\n\nfrom django.db import models\nfrom django.db... | diff --git a/authentik/events/models.py b/authentik/events/models.py
index 4b245e49fefe..c43128419e46 100644
--- a/authentik/events/models.py
+++ b/authentik/events/models.py
@@ -217,6 +217,7 @@ def from_http(self, request: HttpRequest, user: Optional[User] = None) -> "Event
"path": request.path,
... |
wagtail__wagtail-1013 | OSError when image file is missing
If an image entry exists within Wagtail for which the cosponsoring filesystem path does not exist an `OSError` is thrown.
```
Traceback (most recent call last):
File "/srv/django/site/env/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
respo... | [
{
"content": "import json\n\nfrom django.shortcuts import render, redirect, get_object_or_404\nfrom django.core.paginator import Paginator, EmptyPage, PageNotAnInteger\nfrom django.contrib.auth.decorators import permission_required\nfrom django.core.exceptions import PermissionDenied\nfrom django.utils.translat... | [
{
"content": "import json\n\nfrom django.shortcuts import render, redirect, get_object_or_404\nfrom django.core.paginator import Paginator, EmptyPage, PageNotAnInteger\nfrom django.contrib.auth.decorators import permission_required\nfrom django.core.exceptions import PermissionDenied\nfrom django.utils.translat... | diff --git a/wagtail/wagtailimages/templates/wagtailimages/images/edit.html b/wagtail/wagtailimages/templates/wagtailimages/images/edit.html
index dd31a1ba5478..20c22988f5a6 100644
--- a/wagtail/wagtailimages/templates/wagtailimages/images/edit.html
+++ b/wagtail/wagtailimages/templates/wagtailimages/images/edit.html
@... |
bridgecrewio__checkov-5771 | Versions 3.1.0 and up fails when credentials for BridgeCrew integration is missing.
**Describe the issue**
The changes introduced in https://github.com/bridgecrewio/checkov/pull/5760/files#diff-2ce0ea68256051d5aa80a54fb68b2e7ec9c3802f3cb2c6a8efa957ddf18255e8R131 causes all of our CI pipelines that use `checkov` to fai... | [
{
"content": "from __future__ import annotations\n\nimport datetime\nimport hashlib\nimport linecache\nimport logging\nimport os\nimport re\nimport tempfile\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, cast, Optional, Iterable, Any, List, Dict\n\nimport requests\nfrom detect_secrets.filters.heur... | [
{
"content": "from __future__ import annotations\n\nimport datetime\nimport hashlib\nimport linecache\nimport logging\nimport os\nimport re\nimport tempfile\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING, cast, Optional, Iterable, Any, List, Dict\n\nimport requests\nfrom detect_secrets.filters.heur... | diff --git a/checkov/secrets/runner.py b/checkov/secrets/runner.py
index f95aabfaf7..904e85fed6 100644
--- a/checkov/secrets/runner.py
+++ b/checkov/secrets/runner.py
@@ -128,7 +128,9 @@ def run(
if bc_integration.daemon_process:
# only happens for 'ParallelizationType.SPAWN'
bc_integ... |
pypa__pip-6336 | AttributeError: 'NoneType' object has no attribute 'netloc'
**Environment**
* pip version: 18.1
* Python version: 3.6
* OS: linux
**Description**
I am using a fresh conda environment (most packages from conda-forge), pip 18.1, python 3.6, and linux. I am utilizing the new PEP508 syntax for installing private p... | [
{
"content": "\"\"\"Backing implementation for InstallRequirement's various constructors\n\nThe idea here is that these formed a major chunk of InstallRequirement's size\nso, moving them and support code dedicated to them outside of that class\nhelps creates for better understandability for the rest of the code... | [
{
"content": "\"\"\"Backing implementation for InstallRequirement's various constructors\n\nThe idea here is that these formed a major chunk of InstallRequirement's size\nso, moving them and support code dedicated to them outside of that class\nhelps creates for better understandability for the rest of the code... | diff --git a/news/5889.bugfix b/news/5889.bugfix
new file mode 100644
index 00000000000..ad1118f1f0d
--- /dev/null
+++ b/news/5889.bugfix
@@ -0,0 +1 @@
+Fixed crash when installing a requirement from a URL that comes from a dependency without a URL.
\ No newline at end of file
diff --git a/src/pip/_internal/req/constru... |
liqd__a4-opin-2462 | In the Poll Blueprint we refer to the OPIN App
**URL:** https://opin.me/en/dashboard/organisations/opin/blueprints/
**user:** All
**expected behaviour:**
Run customizable, multi-step polls on OPIN to get detailed opinions on topics from the public or your members.
Phase 1: Answer the questions and comment on the ... | [
{
"content": "from collections import namedtuple\nfrom enum import Enum\nfrom enum import unique\n\nfrom django.utils.translation import gettext_lazy as _\n\nfrom adhocracy4.polls import phases as poll_phases\nfrom euth.communitydebate import phases as communitydebate_phases\nfrom euth.documents import phases a... | [
{
"content": "from collections import namedtuple\nfrom enum import Enum\nfrom enum import unique\n\nfrom django.utils.translation import gettext_lazy as _\n\nfrom adhocracy4.polls import phases as poll_phases\nfrom euth.communitydebate import phases as communitydebate_phases\nfrom euth.documents import phases a... | diff --git a/euth/blueprints/blueprints.py b/euth/blueprints/blueprints.py
index b24a50170..22429f65e 100644
--- a/euth/blueprints/blueprints.py
+++ b/euth/blueprints/blueprints.py
@@ -313,8 +313,7 @@ class Accessibility(BlueprintEnum):
title=_('Poll'),
description=_('Run customizable, multi-step po... |
yt-project__yt-1360 | yt.ProfilePlot gives different answers on repeated execution
### Bug report
When executing yt.ProfilePlot for multiple times sequentially, the answers, i.e. the plots, change.
**Code for reproduction**
```python
%matplotlib inline
import yt
data_ds = yt.load(<dump>)
my_sphere = data_ds.sphere("max", (5.0, "k... | [
{
"content": "\"\"\"\nEnzo-specific IO functions\n\n\n\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distribut... | [
{
"content": "\"\"\"\nEnzo-specific IO functions\n\n\n\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2013, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distribut... | diff --git a/yt/frontends/enzo/io.py b/yt/frontends/enzo/io.py
index 8ed18bfc2c8..8196801353c 100644
--- a/yt/frontends/enzo/io.py
+++ b/yt/frontends/enzo/io.py
@@ -151,7 +151,9 @@ def _read_obj_field(self, obj, field, fid_data = None):
node = "/Grid%08i/%s" % (obj.id, fname)
dg = h5py.h5d.ope... |
nerfstudio-project__nerfstudio-2002 | a simple mistake in ExponentialDecayScheduler
When training nerfacto with --optimizers.fields.scheduler.warmup-steps 5000, it will crash soon.
**Expected behavior**
The lr should ramps up to 1e-2 in 5000 steps. However, the lr increase like this.
;\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License a... | [
{
"content": "# Copyright 2022 the Regents of the University of California, Nerfstudio Team and contributors. 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 a... | diff --git a/nerfstudio/engine/schedulers.py b/nerfstudio/engine/schedulers.py
index 35b3138cb5..6d1e11b667 100644
--- a/nerfstudio/engine/schedulers.py
+++ b/nerfstudio/engine/schedulers.py
@@ -122,7 +122,7 @@ def get_scheduler(self, optimizer: Optimizer, lr_init: float) -> LRScheduler:
def func(step):
... |
modin-project__modin-7057 | Update exception message for `iloc/loc` functions
| [
{
"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ... | [
{
"content": "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the ... | diff --git a/modin/pandas/indexing.py b/modin/pandas/indexing.py
index 08bfb995efe..4ae8d0833e4 100644
--- a/modin/pandas/indexing.py
+++ b/modin/pandas/indexing.py
@@ -290,9 +290,7 @@ def _validate_key_length(self, key: tuple) -> tuple: # noqa: GL08
if Ellipsis in key:
raise Inde... |
hpcaitech__ColossalAI-4165 | [tensor] fix some unittests
[tensor] fix some unittests
[tensor] fix some unittests
[BUG]: colossalai run is stuck during multi-nodes training
### 🐛 Describe the bug
When using colossalai run during multi-nodes training, it's stuck before initializing distributed process group.
This is because potentially wrong... | [
{
"content": "import os\nimport sys\nfrom typing import List\n\nimport click\nimport torch\nfrom packaging import version\n\nfrom colossalai.context import Config\n\nfrom .hostinfo import HostInfo, HostInfoList\nfrom .multinode_runner import MultiNodeRunner\n\n# Constants that define our syntax\nNODE_SEP = ','\... | [
{
"content": "import os\nimport sys\nfrom typing import List\n\nimport click\nimport torch\nfrom packaging import version\n\nfrom colossalai.context import Config\n\nfrom .hostinfo import HostInfo, HostInfoList\nfrom .multinode_runner import MultiNodeRunner\n\n# Constants that define our syntax\nNODE_SEP = ','\... | diff --git a/colossalai/cli/launcher/run.py b/colossalai/cli/launcher/run.py
index daa5107caf90..5e74c2c4f5b8 100644
--- a/colossalai/cli/launcher/run.py
+++ b/colossalai/cli/launcher/run.py
@@ -164,9 +164,7 @@ def _arg_dict_to_list(arg_dict):
]
else:
# extra launch args for torch distributed lau... |
locustio__locust-1918 | the report cant show the right time
<!--
If you have a general question about how to use Locust, please check Stack Overflow first https://stackoverflow.com/questions/tagged/locust
You can also ask new questions on SO, https://stackoverflow.com/questions/ask just remember to tag your question with "locust". Do not... | [
{
"content": "from jinja2 import Environment, FileSystemLoader\nimport os\nimport pathlib\nimport datetime\nfrom itertools import chain\nfrom .stats import sort_stats\nfrom .user.inspectuser import get_task_ratio_dict\nfrom html import escape\nfrom json import dumps\n\n\ndef render_template(file, **kwargs):\n ... | [
{
"content": "from jinja2 import Environment, FileSystemLoader\nimport os\nimport pathlib\nimport datetime\nfrom itertools import chain\nfrom .stats import sort_stats\nfrom .user.inspectuser import get_task_ratio_dict\nfrom html import escape\nfrom json import dumps\n\n\ndef render_template(file, **kwargs):\n ... | diff --git a/locust/html.py b/locust/html.py
index 93e8edfd07..a3735bff65 100644
--- a/locust/html.py
+++ b/locust/html.py
@@ -20,11 +20,11 @@ def get_html_report(environment, show_download_link=True):
stats = environment.runner.stats
start_ts = stats.start_time
- start_time = datetime.datetime.fromtimes... |
psychopy__psychopy-5742 | Bug: Component named 'self' in python is translated to 'this' in JS
Today we got a request for help troubleshooting an experiment that worked in PsychoPy but got stuck on the initialising screen in Pavlovia. The console log showed an invalid left-hand assignment error. It turned out they had named one of their componen... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Part of the PsychoPy library\n# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2022 Open Science Tools Ltd.\n# Distributed under the terms of the GNU General Public License (GPL).\n\n\"\"\"Experiment classes:\n Experiment, Flow, Routine, Par... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Part of the PsychoPy library\n# Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2022 Open Science Tools Ltd.\n# Distributed under the terms of the GNU General Public License (GPL).\n\n\"\"\"Experiment classes:\n Experiment, Flow, Routine, Par... | diff --git a/psychopy/experiment/exports.py b/psychopy/experiment/exports.py
index fcb619a6ac..4583cf8ed5 100644
--- a/psychopy/experiment/exports.py
+++ b/psychopy/experiment/exports.py
@@ -136,7 +136,7 @@ def __init__(self, exp):
self.numpy = _numpyImports + _numpyRandomImports + ['np']
# noinspec... |
yt-project__yt-2024 | annotate_domain in disagreement with rendered image.
### Bug report
I want to volume-render a non-cubic simulation from FLASH. So far, I tried to follow the official [volume rendering tutorial](http://yt-project.org/doc/visualizing/volume_rendering_tutorial.html#volume-rendering-tutorial) but I'm struggling with ori... | [
{
"content": "\"\"\"\nLens Classes\n\n\n\n\"\"\"\n\n# ----------------------------------------------------------------------------\n# Copyright (c) 2013, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed with this s... | [
{
"content": "\"\"\"\nLens Classes\n\n\n\n\"\"\"\n\n# ----------------------------------------------------------------------------\n# Copyright (c) 2013, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed with this s... | diff --git a/yt/visualization/volume_rendering/lens.py b/yt/visualization/volume_rendering/lens.py
index b5b4664677e..22c11678d42 100644
--- a/yt/visualization/volume_rendering/lens.py
+++ b/yt/visualization/volume_rendering/lens.py
@@ -131,9 +131,8 @@ def project_to_plane(self, camera, pos, res=None):
dy = np... |
jschneier__django-storages-1168 | I can't upload image with dropbox SuspiciousFileOperation
settings.py
```
STATICFILES_STORAGE = 'storages.backends.dropbox.DropBoxStorage'
DEFAULT_FILE_STORAGE = 'storages.backends.dropbox.DropBoxStorage'
DROPBOX_OAUTH2_TOKEN = 'xxx-xxx'
DROPBOX_ROOT_PATH = '/TKYK/'
```
my models.py
```
def get_image_filename... | [
{
"content": "# Dropbox storage class for Django pluggable storage system.\n# Author: Anthony Monthe <anthony.monthe@gmail.com>\n# License: BSD\n#\n# Usage:\n#\n# Add below to settings.py:\n# DROPBOX_ROOT_PATH = '/dir/'\n# DROPBOX_OAUTH2_TOKEN = 'YourOauthToken'\n# DROPBOX_APP_KEY = 'YourAppKey'\n# DROPBOX_APP_... | [
{
"content": "# Dropbox storage class for Django pluggable storage system.\n# Author: Anthony Monthe <anthony.monthe@gmail.com>\n# License: BSD\n#\n# Usage:\n#\n# Add below to settings.py:\n# DROPBOX_ROOT_PATH = '/dir/'\n# DROPBOX_OAUTH2_TOKEN = 'YourOauthToken'\n# DROPBOX_APP_KEY = 'YourAppKey'\n# DROPBOX_APP_... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 4b45ff9a5..d4ebaaddd 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -7,9 +7,11 @@ django-storages CHANGELOG
Dropbox
-------
+- Strip off the root path when saving files to fix saving with upgraded versions of Django (`#1168`_)
- Update ``DropBoxStorage`` construc... |
oobabooga__text-generation-webui-1547 | Error with images using LLaVA
### Describe the bug
RuntimeError when LLaVA tries to answer to an image.
Different errors depending on the settings(clip+projector), but always related to "Half", 16bit.
Only working combinations are:
* clip+projector 16bit on gpu
* clip 32bit cpu/gpu, projector 16bit gpu
I th... | [
{
"content": "import base64\nimport re\nimport time\nfrom dataclasses import dataclass\nfrom functools import partial\nfrom io import BytesIO\n\nimport gradio as gr\nimport torch\nfrom huggingface_hub import hf_hub_download\nfrom PIL import Image\nfrom transformers import CLIPImageProcessor, CLIPVisionModel\n\n... | [
{
"content": "import base64\nimport re\nimport time\nfrom dataclasses import dataclass\nfrom functools import partial\nfrom io import BytesIO\n\nimport gradio as gr\nimport torch\nfrom huggingface_hub import hf_hub_download\nfrom PIL import Image\nfrom transformers import CLIPImageProcessor, CLIPVisionModel\n\n... | diff --git a/extensions/llava/script.py b/extensions/llava/script.py
index d48e35fa6e..ba951f209b 100644
--- a/extensions/llava/script.py
+++ b/extensions/llava/script.py
@@ -245,7 +245,9 @@ def tokenizer_modifier(state, prompt, input_ids, input_embeds):
prompt, input_ids, input_embeds, total_embedded = llava_em... |
aws-cloudformation__cfn-lint-1454 | E0000 found unknown escape character '/'
*cfn-lint version: `0.29.2`*
*Description of issue.*
Using a regex pattern in a JSON cfn template fails linting with `E000 found unknown escape character '/'`
This appears to be a duplicate of #727 but the fix applied as part of that PR doesn't seem to be working in thi... | [
{
"content": "\"\"\"\nCopyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport sys\nimport logging\nimport six\ntry:\n from json.decoder import JSONDecodeError\nexcept ImportError:\n JSONDecodeError = ValueError\nfrom yaml.parser import Parser... | [
{
"content": "\"\"\"\nCopyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nimport sys\nimport logging\nimport six\ntry:\n from json.decoder import JSONDecodeError\nexcept ImportError:\n JSONDecodeError = ValueError\nfrom yaml.parser import Parser... | diff --git a/src/cfnlint/decode/__init__.py b/src/cfnlint/decode/__init__.py
index 312f88b7bb..fcfa5ba739 100644
--- a/src/cfnlint/decode/__init__.py
+++ b/src/cfnlint/decode/__init__.py
@@ -58,7 +58,8 @@ def decode(filename, ignore_bad_template):
except ScannerError as err:
if err.problem in [
... |
microsoft__nni-2375 | BUG in spos evolution part
I trained the spos from scratch with supernet.py, but failed to load the checkpoints. It turned out there was a mismatch between load and save part.
In the save part https://github.com/microsoft/nni/blob/69dfbf5e976cf75e89949af4764928dde631a3f6/src/sdk/pynni/nni/nas/pytorch/callbacks.py... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport os\nimport pickle\nimport re\n\nimport torch\nimport torch.nn as nn\nfrom nni.nas.pytorch import mutables\n\nfrom blocks import ShuffleNetBlock, ShuffleXceptionBlock\n\n\nclass ShuffleNetV2OneShot(nn.Module):\n ... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport os\nimport pickle\nimport re\n\nimport torch\nimport torch.nn as nn\nfrom nni.nas.pytorch import mutables\n\nfrom blocks import ShuffleNetBlock, ShuffleXceptionBlock\n\n\nclass ShuffleNetV2OneShot(nn.Module):\n ... | diff --git a/examples/nas/spos/network.py b/examples/nas/spos/network.py
index 9083321641..b365156c5a 100644
--- a/examples/nas/spos/network.py
+++ b/examples/nas/spos/network.py
@@ -147,8 +147,10 @@ def _initialize_weights(self):
def load_and_parse_state_dict(filepath="./data/checkpoint-150000.pth.tar"):
check... |
django-json-api__django-rest-framework-json-api-1013 | Add support for Python 3.10
## Description of the Bug Report
Python 3.10 has been [released](https://www.python.org/downloads/release/python-3100/) and we should add support to DJA. See #846 as reference for implementation.
## Checklist
- [x] Certain that this is a bug (if unsure or you have a question use [di... | [
{
"content": "#!/usr/bin/env python3\n\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\n\nneeds_wheel = {\"bdist_wheel\"}.intersection(sys.argv)\nwheel = [\"wheel\"] if needs_wheel else []\n\n\ndef read(*paths):\n \"\"\"\n Build a file path from paths and return the contents.\n \"\"\"... | [
{
"content": "#!/usr/bin/env python3\n\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\n\nneeds_wheel = {\"bdist_wheel\"}.intersection(sys.argv)\nwheel = [\"wheel\"] if needs_wheel else []\n\n\ndef read(*paths):\n \"\"\"\n Build a file path from paths and return the contents.\n \"\"\"... | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index ebe31bb1..3d085c5c 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: ["3.6", "3.7", "3.8", "3.9"]
+ python-ver... |
castorini__pyserini-1098 | Better error message when index doesn't store doc vectors to support RM3 expansion
This allows us to use RM3 query expansion.
| [
{
"content": "#\n# Pyserini: Reproducible IR research with sparse and dense representations\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/... | [
{
"content": "#\n# Pyserini: Reproducible IR research with sparse and dense representations\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/... | diff --git a/pyserini/search/lucene/_searcher.py b/pyserini/search/lucene/_searcher.py
index 625e90d56..bd0ae7003 100644
--- a/pyserini/search/lucene/_searcher.py
+++ b/pyserini/search/lucene/_searcher.py
@@ -228,7 +228,10 @@ def set_rm3(self, fb_terms=10, fb_docs=10, original_query_weight=float(0.5), rm3
rm3_... |
scipy__scipy-10377 | TST: Travis CI fails (with pytest 5.0 ?)
Example logs: https://travis-ci.org/scipy/scipy/jobs/552251037
Perhaps this is because of the recent pytest release.
Potentially relevant snippet of error output:
```
E _pytest.config.ConftestImportFailure: (local('/home/travis/virtualenv/python3.6.3/lib/python3.6/si... | [
{
"content": "#!/usr/bin/env python\n\"\"\"SciPy: Scientific Library for Python\n\nSciPy (pronounced \"Sigh Pie\") is open-source software for mathematics,\nscience, and engineering. The SciPy library\ndepends on NumPy, which provides convenient and fast N-dimensional\narray manipulation. The SciPy library is b... | [
{
"content": "#!/usr/bin/env python\n\"\"\"SciPy: Scientific Library for Python\n\nSciPy (pronounced \"Sigh Pie\") is open-source software for mathematics,\nscience, and engineering. The SciPy library\ndepends on NumPy, which provides convenient and fast N-dimensional\narray manipulation. The SciPy library is b... | diff --git a/.travis.yml b/.travis.yml
index d97d8d0c7573..62034dd2a6e7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -154,7 +154,7 @@ before_install:
- travis_retry pip install --upgrade pip setuptools wheel
- travis_retry pip install cython
- if [ -n "$NUMPYSPEC" ]; then travis_retry pip install $NUMPYSPEC; ... |
biopython__biopython-3955 | ValueError: Unknown prefix 'ali' with uri 'http://www.niso.org/schemas/ali/1.0'
### Setup
I am reporting a problem with Biopython version, Python version, and operating
system as follows:
```python
import sys; print(sys.version)
import platform; print(platform.python_implementation()); print(platform.platform(... | [
{
"content": "# Copyright 2008-2014 by Michiel de Hoon. All rights reserved.\n# Revisions copyright 2008-2015 by Peter Cock. All rights reserved.\n#\n# This file is part of the Biopython distribution and governed by your\n# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n# Pleas... | [
{
"content": "# Copyright 2008-2014 by Michiel de Hoon. All rights reserved.\n# Revisions copyright 2008-2015 by Peter Cock. All rights reserved.\n#\n# This file is part of the Biopython distribution and governed by your\n# choice of the \"Biopython License Agreement\" or the \"BSD 3-Clause License\".\n# Pleas... | diff --git a/Bio/Entrez/Parser.py b/Bio/Entrez/Parser.py
index c5877667325..cde130e444c 100644
--- a/Bio/Entrez/Parser.py
+++ b/Bio/Entrez/Parser.py
@@ -504,7 +504,7 @@ def startNamespaceDeclHandler(self, prefix, uri):
elif prefix == "xlink":
assert uri == "http://www.w3.org/1999/xlink"
... |
python__mypy-7632 | mypy 0.730 no longer recognizes x**y literals to be ints
I noticed a regression when switching from 0.720 to 0.730. Here's the code:
```py
def f() -> int:
size = 2 ** 20
reveal_type(size)
return size
```
**Expected behavior**
With mypy 0.720 (no matter whether the new or the old semantic analyze... | [
{
"content": "from functools import partial\nfrom typing import Callable, Optional, List\n\nfrom mypy import message_registry\nfrom mypy.nodes import StrExpr, IntExpr, DictExpr, UnaryExpr\nfrom mypy.plugin import (\n Plugin, FunctionContext, MethodContext, MethodSigContext, AttributeContext, ClassDefContext\... | [
{
"content": "from functools import partial\nfrom typing import Callable, Optional, List\n\nfrom mypy import message_registry\nfrom mypy.nodes import StrExpr, IntExpr, DictExpr, UnaryExpr\nfrom mypy.plugin import (\n Plugin, FunctionContext, MethodContext, MethodSigContext, AttributeContext, ClassDefContext\... | diff --git a/mypy/plugins/default.py b/mypy/plugins/default.py
index 3476b930307b..b9ec575dabb5 100644
--- a/mypy/plugins/default.py
+++ b/mypy/plugins/default.py
@@ -365,8 +365,10 @@ def typed_dict_update_signature_callback(ctx: MethodSigContext) -> CallableType:
def int_pow_callback(ctx: MethodContext) -> Type:
... |
open-telemetry__opentelemetry-python-2097 | _clean_attribute shouldn't skip attributes
From attributes [spec](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/common.md#attributes)
>_This is required for map/dictionary structures represented as two arrays with indices that are kept in sync (e.g., two attributes head... | [
{
"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 e1627ba1c3a..e6e35414c80 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#2096](https://github.com/open-telemetry/opentelemetry-python/pull/2096))
- Fix propagation bug ca... |
cornellius-gp__gpytorch-343 | Multitask KISS-GP single test point error
The problem from #247 seems to preserve for the particular single test points, e.g., if the grid is
`[-3.3333, -1.6667, 0.0000, 1.6667, 3.3333]` when provided `grid_size=5` and `grid_bounds=[(-2,2)]`, then prediction will fail on any single test point outside of the range ... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom copy import deepcopy\n\nimport torch\n\n\nclass Interpolation(object):\n \"\"\"\n \"\"\"\n\n def _cubic_interpolation_kernel(self... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom copy import deepcopy\n\nimport torch\n\n\nclass Interpolation(object):\n \"\"\"\n \"\"\"\n\n def _cubic_interpolation_kernel(self... | diff --git a/gpytorch/utils/interpolation.py b/gpytorch/utils/interpolation.py
index f226f8c48..47f6d60de 100644
--- a/gpytorch/utils/interpolation.py
+++ b/gpytorch/utils/interpolation.py
@@ -100,6 +100,9 @@ def interpolate(self, x_grid, x_target, interp_points=range(-2, 2)):
lower_grid_pt_idxs = lower_gr... |
aio-libs__aiohttp-1530 | writing nested multipart messages does not work correctly
## Long story short
Write the following multipart message:
```python
from aiohttp.multipart import MultipartWriter
with MultipartWriter('mixed') as root:
with MultipartWriter('mixed') as subwriter1:
subwriter1.append('first message')
root.append... | [
{
"content": "import asyncio\nimport base64\nimport binascii\nimport io\nimport json\nimport mimetypes\nimport os\nimport re\nimport sys\nimport uuid\nimport warnings\nimport zlib\nfrom collections import Mapping, Sequence, deque\nfrom pathlib import Path\nfrom urllib.parse import parse_qsl, quote, unquote, url... | [
{
"content": "import asyncio\nimport base64\nimport binascii\nimport io\nimport json\nimport mimetypes\nimport os\nimport re\nimport sys\nimport uuid\nimport warnings\nimport zlib\nfrom collections import Mapping, Sequence, deque\nfrom pathlib import Path\nfrom urllib.parse import parse_qsl, quote, unquote, url... | diff --git a/CHANGES.rst b/CHANGES.rst
index 4f96f0101dd..9e2f1cb5a2b 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -6,7 +6,7 @@ CHANGES
- Fix polls demo run application #1487
--
+- Fix sub-Multipart messages missing their headers on serialization #1525
1.2.0 (2016-12-17)
------------------
diff --git a/CONTRI... |
mars-project__mars-675 | [BUG] Set value to copied tensor still changed the original tensor
<!--
Thank you for your contribution!
Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue.
-->
**Describe the bug**
Set value to copied tensor still changed the original tensor.
**To Repr... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://... | diff --git a/mars/core.py b/mars/core.py
index 0b12100a63..f6ccd055b1 100644
--- a/mars/core.py
+++ b/mars/core.py
@@ -604,6 +604,9 @@ def view(self):
def copy(self):
new_op = self.op.copy().reset_key()
+ if new_op.create_view:
+ # set create_view to False
+ new_op._create_v... |
freqtrade__freqtrade-1999 | minor: the 'Using data folder' info message is incorrect
...because there are no 'folders' in Linux/Unix. Only directories (or catalogs). 'Folder' is a term specific for Windows.
```
freqtrade.configuration - INFO - Using data folder: user_data/data/bittrex ...
```
The message should be rephrased.
| [
{
"content": "\"\"\"\nThis module contains the configuration class\n\"\"\"\nimport json\nimport logging\nimport os\nimport sys\nfrom argparse import Namespace\nfrom logging.handlers import RotatingFileHandler\nfrom typing import Any, Callable, Dict, List, Optional\n\nfrom jsonschema import Draft4Validator, vali... | [
{
"content": "\"\"\"\nThis module contains the configuration class\n\"\"\"\nimport json\nimport logging\nimport os\nimport sys\nfrom argparse import Namespace\nfrom logging.handlers import RotatingFileHandler\nfrom typing import Any, Callable, Dict, List, Optional\n\nfrom jsonschema import Draft4Validator, vali... | diff --git a/config_full.json.example b/config_full.json.example
index acecfb649bd..b6451859c17 100644
--- a/config_full.json.example
+++ b/config_full.json.example
@@ -123,5 +123,5 @@
"process_throttle_secs": 5
},
"strategy": "DefaultStrategy",
- "strategy_path": "/some/folder/"
+ "strategy_pa... |
joke2k__faker-1607 | es_ES postalcode is not generating valid codes
* Faker version: 11.3
* OS: Any
When using postcode for es_ES and using it with a field that requires a valid Postal Code, it fails sometimes.
I will assume that there is no logic with postal code generation for Spain.
### Steps to reproduce
Generate postal code... | [
{
"content": "from ..es import Provider as AddressProvider\n\n\nclass Provider(AddressProvider):\n building_number_formats = (\"%\", \"%#\", \"%#\", \"%#\", \"%##\")\n street_prefixes = (\n \"Plaza\",\n \"Calle\",\n \"Avenida\",\n \"Via\",\n \"Vial\",\n \"Rambla\"... | [
{
"content": "from ..es import Provider as AddressProvider\n\n\nclass Provider(AddressProvider):\n building_number_formats = (\"%\", \"%#\", \"%#\", \"%#\", \"%##\")\n street_prefixes = (\n \"Plaza\",\n \"Calle\",\n \"Avenida\",\n \"Via\",\n \"Vial\",\n \"Rambla\"... | diff --git a/faker/providers/address/es_ES/__init__.py b/faker/providers/address/es_ES/__init__.py
index e9d9ab323b..7ac8a0104d 100644
--- a/faker/providers/address/es_ES/__init__.py
+++ b/faker/providers/address/es_ES/__init__.py
@@ -24,7 +24,6 @@ class Provider(AddressProvider):
"Paseo",
"Camino",
... |
certbot__certbot-4857 | Flesh out oldest tests
We should find the oldest versions of all our Python dependencies used in OS packages and add them to the [oldest tests](https://github.com/certbot/certbot/blob/master/tox.ini#L36) in Travis. This will prevent bugs like #3098 and #4040 from slipping into a release.
The two distros I'd check he... | [
{
"content": "import sys\n\nfrom setuptools import setup\nfrom setuptools import find_packages\n\n\nversion = '0.16.0.dev0'\n\n# Please update tox.ini when modifying dependency version requirements\ninstall_requires = [\n # load_pem_private/public_key (>=0.6)\n # rsa_recover_prime_factors (>=0.8)\n 'cr... | [
{
"content": "import sys\n\nfrom setuptools import setup\nfrom setuptools import find_packages\n\n\nversion = '0.16.0.dev0'\n\n# Please update tox.ini when modifying dependency version requirements\ninstall_requires = [\n # load_pem_private/public_key (>=0.6)\n # rsa_recover_prime_factors (>=0.8)\n 'cr... | diff --git a/acme/setup.py b/acme/setup.py
index 76ca87afa2d..4e6eaf50cfa 100644
--- a/acme/setup.py
+++ b/acme/setup.py
@@ -16,11 +16,7 @@
'PyOpenSSL>=0.13',
'pyrfc3339',
'pytz',
- # requests>=2.10 is required to fix
- # https://github.com/shazow/urllib3/issues/556. This requirement can be
- # ... |
ietf-tools__datatracker-4546 | Many tests failing with YangModelExtractor error
### Describe the issue
Starting with [test run 790](https://github.com/ietf-tools/datatracker/actions/runs/3172961553), a few dozen tests are failing with the error
```
AttributeError: 'YangModuleExtractor' object has no attribute 'extract_yang_model'
```
The last p... | [
{
"content": "# Copyright The IETF Trust 2016-2020, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nimport io\nimport os\nimport re\nimport shutil\nimport sys\nimport tempfile\n\nfrom xym import xym\nfrom django.conf import settings\n\nimport debug # pyflakes:ignore\n\nfrom ietf.uti... | [
{
"content": "# Copyright The IETF Trust 2016-2020, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nimport io\nimport os\nimport re\nimport shutil\nimport sys\nimport tempfile\n\nfrom xym import xym\nfrom django.conf import settings\n\nimport debug # pyflakes:ignore\n\nfrom ietf.uti... | diff --git a/ietf/submit/checkers.py b/ietf/submit/checkers.py
index 6e409daf38..5822f155f5 100644
--- a/ietf/submit/checkers.py
+++ b/ietf/submit/checkers.py
@@ -147,7 +147,7 @@ def check_file_txt(self, path):
saved_stderr = sys.stderr
sys.stdout = io.StringIO()
sys.s... |
PrefectHQ__prefect-239 | Don't allow passing parameters that don't exist
`FlowRunner` raises an error if you run a flow and don't pass a required parameter, but it has no problem with users providing a parameter that doesn't exist. This should raise an error as well to avoid confusion.
```python
f = Flow()
f.run(parameters=dict(a=1)) # no... | [
{
"content": "# Licensed under LICENSE.md; also available at https://www.prefect.io/licenses/alpha-eula\n\nimport copy\nimport functools\nimport inspect\nimport tempfile\nimport uuid\nfrom collections import Counter\nfrom typing import Any, Dict, Iterable, List, Mapping, Set, Tuple\n\nimport xxhash\nfrom mypy_e... | [
{
"content": "# Licensed under LICENSE.md; also available at https://www.prefect.io/licenses/alpha-eula\n\nimport copy\nimport functools\nimport inspect\nimport tempfile\nimport uuid\nfrom collections import Counter\nfrom typing import Any, Dict, Iterable, List, Mapping, Set, Tuple\n\nimport xxhash\nfrom mypy_e... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 872656c476cf..d324cda01656 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,22 @@
# Prefect Changelog
+## 0.4.0 <Badge text="alpha" type="warn">
+### Major Features
+
+- None
+
+### Minor Features
+
+- None
+
+### Fixes
+
+- Flow consistently raises if passed a p... |
freedomofpress__securedrop-350 | Can we get rid of "flag this source for reply"?
I can't seem to find the original issue now, but my understanding is that the reason gpg keys don't get automatically generated for sources is to prevent an entropy depletion attack that works by attackers creating tons of sources, and therefore forcing the server to gene... | [
{
"content": "# -*- coding: utf-8 -*-\nimport os\nfrom datetime import datetime\nimport uuid\nfrom functools import wraps\nimport zipfile\nfrom cStringIO import StringIO\nimport subprocess\n\nimport logging\n# This module's logger is explicitly labeled so the correct logger is used,\n# even when this is run fro... | [
{
"content": "# -*- coding: utf-8 -*-\nimport os\nfrom datetime import datetime\nimport uuid\nfrom functools import wraps\nimport zipfile\nfrom cStringIO import StringIO\nimport subprocess\n\nimport logging\n# This module's logger is explicitly labeled so the correct logger is used,\n# even when this is run fro... | diff --git a/securedrop/source.py b/securedrop/source.py
index ef49947cc3..89df41c4b4 100644
--- a/securedrop/source.py
+++ b/securedrop/source.py
@@ -205,7 +205,14 @@ def submit():
submission = Submission(g.source, fname)
db_session.add(submission)
- g.source.pending = False
+ if g.source.pen... |
biolab__orange3-4035 | Information on data import / loading, File widget
As discussed earlier the data loading in Orange can be hard to perform - when opening the File widget or File documentation there is no information on possibilities to open other file formats (distance file, networks, etc.) with add-ons.
A popup in File widget could b... | [
{
"content": "import os\nimport logging\nfrom warnings import catch_warnings\nfrom urllib.parse import urlparse\nfrom typing import List\n\nimport numpy as np\nfrom AnyQt.QtWidgets import \\\n QStyle, QComboBox, QMessageBox, QGridLayout, QLabel, \\\n QLineEdit, QSizePolicy as Policy, QCompleter\nfrom AnyQ... | [
{
"content": "import os\nimport logging\nfrom warnings import catch_warnings\nfrom urllib.parse import urlparse\nfrom typing import List\n\nimport numpy as np\nfrom AnyQt.QtWidgets import \\\n QStyle, QComboBox, QMessageBox, QGridLayout, QLabel, \\\n QLineEdit, QSizePolicy as Policy, QCompleter\nfrom AnyQ... | diff --git a/Orange/widgets/data/owfile.py b/Orange/widgets/data/owfile.py
index 976a9e80930..d6bd6725b5d 100644
--- a/Orange/widgets/data/owfile.py
+++ b/Orange/widgets/data/owfile.py
@@ -133,6 +133,18 @@ class Error(widget.OWWidget.Error):
class NoFileSelected:
pass
+ UserAdviceMessages = [
+ ... |
readthedocs__readthedocs.org-1404 | Pip install failing to install sphinx when PYTHON_HOME is set
If the env variable PYTHON_HOME exists, pip install is failing to install spinx into the virtualenv.
| [
{
"content": "\"\"\"Utility functions used by projects.\n\"\"\"\nimport fnmatch\nimport os\nimport re\nimport subprocess\nimport traceback\nimport logging\nfrom httplib2 import Http\n\nfrom django.conf import settings\nfrom distutils2.version import NormalizedVersion, suggest_normalized_version\nimport redis\n\... | [
{
"content": "\"\"\"Utility functions used by projects.\n\"\"\"\nimport fnmatch\nimport os\nimport re\nimport subprocess\nimport traceback\nimport logging\nfrom httplib2 import Http\n\nfrom django.conf import settings\nfrom distutils2.version import NormalizedVersion, suggest_normalized_version\nimport redis\n\... | diff --git a/readthedocs/projects/utils.py b/readthedocs/projects/utils.py
index 6f25055369e..75de94d2277 100644
--- a/readthedocs/projects/utils.py
+++ b/readthedocs/projects/utils.py
@@ -69,6 +69,10 @@ def run(*commands, **kwargs):
del environment['DJANGO_SETTINGS_MODULE']
if 'PYTHONPATH' in environment... |
huggingface__accelerate-1094 | Reduce support for multi_cpu
As far as I can tell, reduce for multi_cpu actually just performs a within-process instead of an across-process reduction.
https://github.com/huggingface/accelerate/blob/36beea9a1be9251a3ad07f7c10fd425c96954f46/src/accelerate/utils/operations.py#L430-L443
| [
{
"content": "# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | [
{
"content": "# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#... | diff --git a/src/accelerate/utils/operations.py b/src/accelerate/utils/operations.py
index b3c87f38aeb..d70f6baeda6 100644
--- a/src/accelerate/utils/operations.py
+++ b/src/accelerate/utils/operations.py
@@ -436,6 +436,9 @@ def _reduce_across_processes(tensor, reduction="mean"):
elif state.distributed_type.va... |
flairNLP__flair-448 | Error when training a model on CUDA
Hi,
I think this is a regression bug that was introduced after merging the CUDA semantics pull request #402.
Here's an error message that comes from the `test_model_integration.py` integration test:
```bash
> tag_tensor = torch.LongTensor(sentence_tags)
E ... | [
{
"content": "import warnings\nimport logging\nfrom pathlib import Path\n\nimport torch.autograd as autograd\nimport torch.nn\nfrom torch.optim import Optimizer\n\nimport flair.nn\nimport torch\n\nimport flair.embeddings\nfrom flair.data import Dictionary, Sentence, Token, Label\nfrom flair.file_utils import ca... | [
{
"content": "import warnings\nimport logging\nfrom pathlib import Path\n\nimport torch.autograd as autograd\nimport torch.nn\nfrom torch.optim import Optimizer\n\nimport flair.nn\nimport torch\n\nimport flair.embeddings\nfrom flair.data import Dictionary, Sentence, Token, Label\nfrom flair.file_utils import ca... | diff --git a/flair/models/sequence_tagger_model.py b/flair/models/sequence_tagger_model.py
index 06ec7dcf1a..dbb93dc4ec 100644
--- a/flair/models/sequence_tagger_model.py
+++ b/flair/models/sequence_tagger_model.py
@@ -429,10 +429,7 @@ def _calculate_loss(self, features, lengths, tags) -> float:
for senten... |
streamlink__streamlink-4210 | plugins.tviplayer: unable to handle CNN Portugal
### Checklist
- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open and recen... | [
{
"content": "import json\nimport re\nfrom urllib.parse import parse_qsl\n\nfrom lxml.etree import HTML, XML\n\nfrom streamlink.plugin import PluginError\n\n\ndef _parse(parser, data, name, exception, schema, *args, **kwargs):\n try:\n parsed = parser(data, *args, **kwargs)\n except Exception as er... | [
{
"content": "import json\nimport re\nfrom urllib.parse import parse_qsl\n\nfrom lxml.etree import HTML, XML\n\nfrom streamlink.plugin import PluginError\n\n\ndef _parse(parser, data, name, exception, schema, *args, **kwargs):\n try:\n parsed = parser(data, *args, **kwargs)\n except Exception as er... | diff --git a/src/streamlink/utils/parse.py b/src/streamlink/utils/parse.py
index fd2cfc4a569..617d59682b9 100644
--- a/src/streamlink/utils/parse.py
+++ b/src/streamlink/utils/parse.py
@@ -48,8 +48,12 @@ def parse_html(
"""Wrapper around lxml.etree.HTML with some extras.
Provides these extra features:
+ ... |
pallets__click-929 | File('x') should default to stdout not stdin
Using click 6.7 + Python 3.6.0 :: Anaconda custom (64-bit)
If I create option with parameters `type=click.File('w') default='-'` Then the value defaults to `sys.stdout`. But when I create it with `type=click.File('x') default='-'` it defaults to `sys.stdin`. In my opinion... | [
{
"content": "import re\nimport io\nimport os\nimport sys\nimport codecs\nfrom weakref import WeakKeyDictionary\n\n\nPY2 = sys.version_info[0] == 2\nWIN = sys.platform.startswith('win')\nCYGWIN = sys.platform.startswith('cygwin')\nDEFAULT_COLUMNS = 80\n\n\n_ansi_re = re.compile(r'\\033\\[((?:\\d|;)*)([a-zA-Z])'... | [
{
"content": "import re\nimport io\nimport os\nimport sys\nimport codecs\nfrom weakref import WeakKeyDictionary\n\n\nPY2 = sys.version_info[0] == 2\nWIN = sys.platform.startswith('win')\nCYGWIN = sys.platform.startswith('cygwin')\nDEFAULT_COLUMNS = 80\n\n\n_ansi_re = re.compile(r'\\033\\[((?:\\d|;)*)([a-zA-Z])'... | diff --git a/click/_compat.py b/click/_compat.py
index d072224c1..be9f74360 100644
--- a/click/_compat.py
+++ b/click/_compat.py
@@ -423,7 +423,7 @@ def open_stream(filename, mode='r', encoding=None, errors='strict',
# Standard streams first. These are simple because they don't need
# special handling for th... |
bokeh__bokeh-6182 | `Property.__delete__` does not send a change notification
We support "revert to default" with `del model.prop` but it won't change-notify I don't thinK:
https://github.com/bokeh/bokeh/blob/0c5bb0039b2505d09f9d5360eff861ba466db85c/bokeh/core/properties.py#L464-L466
The needed code would be similar to the stuff in `appl... | [
{
"content": "''' Provide Python descriptors for delegating to Bokeh properties.\n\nThe Python `descriptor protocol`_ allows fine-grained control over all\nattribute access on instances (\"You control the dot\"). Bokeh uses the\ndescriptor protocol to provide easy-to-use, declarative, type-based\nclass properti... | [
{
"content": "''' Provide Python descriptors for delegating to Bokeh properties.\n\nThe Python `descriptor protocol`_ allows fine-grained control over all\nattribute access on instances (\"You control the dot\"). Bokeh uses the\ndescriptor protocol to provide easy-to-use, declarative, type-based\nclass properti... | diff --git a/bokeh/core/property/descriptors.py b/bokeh/core/property/descriptors.py
index 84f30eeb97c..515a0e902f4 100644
--- a/bokeh/core/property/descriptors.py
+++ b/bokeh/core/property/descriptors.py
@@ -501,8 +501,11 @@ def __delete__(self, obj):
obj (HasProps) : An instance to delete this property f... |
python__mypy-9445 | mypy fails with *-stubs is not a valid Python package name
According to PEP 561 [stub-only package](https://www.python.org/dev/peps/pep-0561/#stub-only-packages):
> The name of the stub package MUST follow the scheme foopkg-stubs for type stubs for the package named foopkg.
However if we invoke mypy on such pack... | [
{
"content": "\"\"\"Routines for finding the sources that mypy will check\"\"\"\n\nimport os.path\n\nfrom typing import List, Sequence, Set, Tuple, Optional, Dict\nfrom typing_extensions import Final\n\nfrom mypy.modulefinder import BuildSource, PYTHON_EXTENSIONS\nfrom mypy.fscache import FileSystemCache\nfrom ... | [
{
"content": "\"\"\"Routines for finding the sources that mypy will check\"\"\"\n\nimport os.path\n\nfrom typing import List, Sequence, Set, Tuple, Optional, Dict\nfrom typing_extensions import Final\n\nfrom mypy.modulefinder import BuildSource, PYTHON_EXTENSIONS\nfrom mypy.fscache import FileSystemCache\nfrom ... | diff --git a/mypy/find_sources.py b/mypy/find_sources.py
index e96dc2d617ce..e9dd9edecec5 100644
--- a/mypy/find_sources.py
+++ b/mypy/find_sources.py
@@ -128,6 +128,8 @@ def crawl_up_dir(self, dir: str) -> Tuple[str, str]:
base_dir = dir or '.'
else:
# Ensure that base is a valid pyt... |
pyinstaller__pyinstaller-3578 | Pyside2 looking different from when running as script.
Hi. Im using latest development version.
As you can see when i run my test script:
```
from PySide2 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
Mai... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2018, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING.... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2018, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License with exception\n# for distributing bootloader.\n#\n# The full license is in the file COPYING.... | diff --git a/PyInstaller/hooks/hook-PySide2.QtGui.py b/PyInstaller/hooks/hook-PySide2.QtGui.py
index 2ff959bd52..5d8bc8d888 100644
--- a/PyInstaller/hooks/hook-PySide2.QtGui.py
+++ b/PyInstaller/hooks/hook-PySide2.QtGui.py
@@ -19,6 +19,7 @@
binaries.extend(qt_plugins_binaries('inputmethods', namespace='PySide2'))
bin... |
fedora-infra__bodhi-3975 | Cannot create new update after unpushing old one
To work around the issue with [not being able to edit updates](https://github.com/fedora-infra/bodhi/issues/3714), I wanted to unpush the updates ([f30](https://bodhi.fedoraproject.org/updates/FEDORA-2019-7cafbe66ba), [f31](https://bodhi.fedoraproject.org/updates/FEDORA-... | [
{
"content": "# Copyright © 2007-2019 Red Hat, Inc. and others.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License... | [
{
"content": "# Copyright © 2007-2019 Red Hat, Inc. and others.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License... | diff --git a/bodhi/server/validators.py b/bodhi/server/validators.py
index 111b2b0190..e50e2fa5c5 100644
--- a/bodhi/server/validators.py
+++ b/bodhi/server/validators.py
@@ -295,9 +295,10 @@ def validate_builds(request, **kwargs):
for nvr in builds:
build = request.db.query(Build).filter_by(nvr=nvr).firs... |
facebookresearch__hydra-1364 | [Ax-Plugin] Add support for Python 3.9
Python 3.9 support pending on scikit 2.4.0 release. Relevant comment: https://github.com/scikit-learn/scikit-learn/issues/18621#issuecomment-733078676
Related to #1062
| [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n# type: ignore\nfrom setuptools import find_namespace_packages, setup\n\nwith open(\"README.md\", \"r\") as fh:\n LONG_DESC = fh.read()\n setup(\n name=\"hydra-ax-sweeper\",\n version=\"1.1.0rc1\",\n ... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n# type: ignore\nfrom setuptools import find_namespace_packages, setup\n\nwith open(\"README.md\", \"r\") as fh:\n LONG_DESC = fh.read()\n setup(\n name=\"hydra-ax-sweeper\",\n version=\"1.1.0rc1\",\n ... | diff --git a/plugins/hydra_ax_sweeper/news/1203.feature b/plugins/hydra_ax_sweeper/news/1203.feature
new file mode 100644
index 00000000000..a678dcf78df
--- /dev/null
+++ b/plugins/hydra_ax_sweeper/news/1203.feature
@@ -0,0 +1 @@
+Enable support of Python 3.9 .
\ No newline at end of file
diff --git a/plugins/hydra_ax_... |
ansible__ansible-lint-110 | False positive detecting OctalPermissionsRule
When trying to setgid permissions
```
[ANSIBLE0008] Octal file permissions must contain leading zero
mode: 02775
```
Looks like the regex requires exactly 3 digits, which is not always correct.
```
# At least an indent, "mode:", optional whitespace, any digits, EOL
mode_... | [
{
"content": "# Copyright (c) 2013-2014 Will Thames <will@thames.id.au>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the r... | [
{
"content": "# Copyright (c) 2013-2014 Will Thames <will@thames.id.au>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the r... | diff --git a/lib/ansiblelint/rules/OctalPermissionsRule.py b/lib/ansiblelint/rules/OctalPermissionsRule.py
index 5545894afa..ddd0efe58a 100644
--- a/lib/ansiblelint/rules/OctalPermissionsRule.py
+++ b/lib/ansiblelint/rules/OctalPermissionsRule.py
@@ -33,7 +33,7 @@ class OctalPermissionsRule(AnsibleLintRule):
# At ... |
jupyterhub__jupyterhub-987 | cookie_id column in users table should be NOT NULL and UNIQUE
**How to reproduce the issue**
Accidentally delete the jupyterhub database, and when recreating it from logs make cookie_id for more than one user be empty or the same dummy value.
**What you expected to happen**
The db schema complains, telling me ... | [
{
"content": "\"\"\"sqlalchemy ORM tools for the state of the constellation of processes\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom datetime import datetime\nimport json\n\nfrom tornado import gen\nfrom tornado.log import app_log\nfrom ... | [
{
"content": "\"\"\"sqlalchemy ORM tools for the state of the constellation of processes\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom datetime import datetime\nimport json\n\nfrom tornado import gen\nfrom tornado.log import app_log\nfrom ... | diff --git a/jupyterhub/orm.py b/jupyterhub/orm.py
index 3d140fab4c..94d5be1188 100644
--- a/jupyterhub/orm.py
+++ b/jupyterhub/orm.py
@@ -381,7 +381,7 @@ class User(Base):
last_activity = Column(DateTime, default=datetime.utcnow)
api_tokens = relationship("APIToken", backref="user")
- cookie_id = Column... |
microsoft__qlib-1072 | Missing `f` prefix on f-strings
Some strings looks like they're meant to be f-strings but are missing the `f` prefix meaning variable interpolation won't happen.
https://github.com/microsoft/qlib/blob/caea495f4087cabb15914123deca8acf94bbf4c6/qlib/contrib/eva/alpha.py#L126
I found this issue automatically. I'm a bot. ... | [
{
"content": "\"\"\"\nHere is a batch of evaluation functions.\n\nThe interface should be redesigned carefully in the future.\n\"\"\"\nimport pandas as pd\nfrom typing import Tuple\nfrom qlib import get_module_logger\nfrom qlib.utils.paral import complex_parallel, DelayedDict\nfrom joblib import Parallel, delay... | [
{
"content": "\"\"\"\nHere is a batch of evaluation functions.\n\nThe interface should be redesigned carefully in the future.\n\"\"\"\nimport pandas as pd\nfrom typing import Tuple\nfrom qlib import get_module_logger\nfrom qlib.utils.paral import complex_parallel, DelayedDict\nfrom joblib import Parallel, delay... | diff --git a/qlib/contrib/eva/alpha.py b/qlib/contrib/eva/alpha.py
index 735555df33..398bd6f550 100644
--- a/qlib/contrib/eva/alpha.py
+++ b/qlib/contrib/eva/alpha.py
@@ -123,7 +123,7 @@ def pred_autocorr(pred: pd.Series, lag=1, inst_col="instrument", date_col="datet
"""
if isinstance(pred, pd.DataFrame):
... |
dask__distributed-8020 | Worker-worker connections fail with "missing port number in address `<closed>`"
**Describe the issue**: We sometimes see a ValueError with the message `"missing port number in address '<closed>'"` with this stacktrace:
Worker-worker connections fail with "missing port number in address `<closed>`"
```
Tracebac... | [
{
"content": "from __future__ import annotations\n\nimport asyncio\nimport ctypes\nimport errno\nimport functools\nimport logging\nimport socket\nimport ssl\nimport struct\nimport sys\nimport weakref\nfrom ssl import SSLCertVerificationError, SSLError\nfrom typing import Any, ClassVar\n\nfrom tlz import sliding... | [
{
"content": "from __future__ import annotations\n\nimport asyncio\nimport ctypes\nimport errno\nimport functools\nimport logging\nimport socket\nimport ssl\nimport struct\nimport sys\nimport weakref\nfrom ssl import SSLCertVerificationError, SSLError\nfrom typing import Any, ClassVar\n\nfrom tlz import sliding... | diff --git a/distributed/comm/tcp.py b/distributed/comm/tcp.py
index 6c521650941..76e8c958cc6 100644
--- a/distributed/comm/tcp.py
+++ b/distributed/comm/tcp.py
@@ -119,14 +119,13 @@ def get_stream_address(comm):
"""
Get a stream's local address.
"""
+ # raise OSError in case the comm is closed, s.t.
... |
cowrie__cowrie-1312 | Erroneous handling of MySQL errors
The MySQL plug-in (`src/cowrie/output/mysql.py`) has code like this:
```python
except MySQLdb.OperationalError as e:
if e[0] not in (2003, 2006, 2013):
raise e
```
From there, this code has been inherited by another honeypot of mine. Yeste... | [
{
"content": "\"\"\"\nMySQL output connector. Writes audit logs to MySQL database\n\"\"\"\n\nfrom __future__ import absolute_import, division\n\nimport MySQLdb\n\nfrom twisted.enterprise import adbapi\nfrom twisted.internet import defer\nfrom twisted.python import log\n\nimport cowrie.core.output\nfrom cowrie.c... | [
{
"content": "\"\"\"\nMySQL output connector. Writes audit logs to MySQL database\n\"\"\"\n\nfrom __future__ import absolute_import, division\n\nimport MySQLdb\n\nfrom twisted.enterprise import adbapi\nfrom twisted.internet import defer\nfrom twisted.python import log\n\nimport cowrie.core.output\nfrom cowrie.c... | diff --git a/src/cowrie/output/mysql.py b/src/cowrie/output/mysql.py
index bb1ed457f2..83e7f0c376 100644
--- a/src/cowrie/output/mysql.py
+++ b/src/cowrie/output/mysql.py
@@ -32,7 +32,7 @@ def _runInteraction(self, interaction, *args, **kw):
return adbapi.ConnectionPool._runInteraction(
se... |
Mailu__Mailu-2975 | Overriding rspamd forbidden_file_extension.map doesn't work as documented
<!--
Thank you for opening an issue with Mailu. Please understand that issues are meant for bugs and enhancement-requests.
For **user-support questions**, reach out to us on [matrix](https://matrix.to/#/#mailu:tedomum.net).
To be able to ... | [
{
"content": "#!/usr/bin/env python3\n\nimport os\nimport glob\nimport logging as log\nimport requests\nimport shutil\nimport sys\nimport time\nfrom socrate import system,conf\n\nenv = system.set_env()\n\n# Actual startup script\n\nconfig_files = []\nfor rspamd_file in glob.glob(\"/conf/*\"):\n conf.jinja(rs... | [
{
"content": "#!/usr/bin/env python3\n\nimport os\nimport glob\nimport logging as log\nimport requests\nimport shutil\nimport sys\nimport time\nfrom socrate import system,conf\n\nenv = system.set_env()\n\n# Actual startup script\n\nconfig_files = []\nfor rspamd_file in glob.glob(\"/conf/*\"):\n conf.jinja(rs... | diff --git a/core/rspamd/start.py b/core/rspamd/start.py
index 54b2f192b..67574a01b 100755
--- a/core/rspamd/start.py
+++ b/core/rspamd/start.py
@@ -16,7 +16,8 @@
config_files = []
for rspamd_file in glob.glob("/conf/*"):
conf.jinja(rspamd_file, env, os.path.join("/etc/rspamd/local.d", os.path.basename(rspamd_fi... |
numba__numba-7236 | CUDA: Managed alloc test fail on Jetson AGX Xavier
Message from test suite:
```
======================================================================
ERROR: test_managed_alloc_driver_host_attach (numba.cuda.tests.cudadrv.test_managed_alloc.TestManagedAlloc)
-------------------------------------------------------... | [
{
"content": "\"\"\"\nAPI that are reported to numba.cuda\n\"\"\"\n\n\nimport contextlib\nimport os\n\nimport numpy as np\n\nfrom .cudadrv import devicearray, devices, driver\nfrom numba.core import config\n\n\n# NDarray device helper\n\nrequire_context = devices.require_context\ncurrent_context = devices.get_c... | [
{
"content": "\"\"\"\nAPI that are reported to numba.cuda\n\"\"\"\n\n\nimport contextlib\nimport os\n\nimport numpy as np\n\nfrom .cudadrv import devicearray, devices, driver\nfrom numba.core import config\n\n\n# NDarray device helper\n\nrequire_context = devices.require_context\ncurrent_context = devices.get_c... | diff --git a/numba/cuda/api.py b/numba/cuda/api.py
index 6275a96f748..4788558a21f 100644
--- a/numba/cuda/api.py
+++ b/numba/cuda/api.py
@@ -146,8 +146,8 @@ def managed_array(shape, dtype=np.float_, strides=None, order='C', stream=0,
Allocate a np.ndarray with a buffer that is managed.
Similar to np.empty().
... |
archlinux__archinstall-704 | AttributeError: 'NoneType' object has no attribute 'format' on master
It seams that `Getting mount information at location` is trying to lookup `/dev/sda1` instead of `/`, or something else is wrong.

Virt... | [
{
"content": "import time\nimport logging\nimport json\nfrom .partition import Partition\nfrom .validators import valid_fs_type\nfrom ..exceptions import DiskError\nfrom ..general import SysCommand\nfrom ..output import log\nfrom ..storage import storage\n\nGPT = 0b00000001\nMBR = 0b00000010\n\nclass Filesystem... | [
{
"content": "import time\nimport logging\nimport json\nfrom .partition import Partition\nfrom .validators import valid_fs_type\nfrom ..exceptions import DiskError\nfrom ..general import SysCommand\nfrom ..output import log\nfrom ..storage import storage\n\nGPT = 0b00000001\nMBR = 0b00000010\n\nclass Filesystem... | diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py
index 177c58f7f1..4d137163e3 100644
--- a/archinstall/lib/disk/filesystem.py
+++ b/archinstall/lib/disk/filesystem.py
@@ -143,7 +143,10 @@ def parted(self, string: str):
:param string: A raw string passed to /usr/bin/parted -s <stri... |
cobbler__cobbler-3507 | cobbler import rsync fails from mounted ISO media with SELinux enabled with return code 23
### Describe the bug
When you mount an ISO image - the permissions of the mounted files are read only:
```
# ls -la /mnt
total 38
dr-xr-xr-x. 1 root root 2048 Oct 29 22:06 ./
dr-xr-xr-x. 25 root root 4096 Oct 26 08:44 ... | [
{
"content": "\"\"\"\nThis module contains the logic that kicks of the ``cobbler import`` process. This is extracted logic from ``api.py``\nthat is essentially calling ``modules/mangers/import_signatures.py`` with some preparatory code.\n\"\"\"\nimport logging\nimport os\nfrom typing import TYPE_CHECKING, Optio... | [
{
"content": "\"\"\"\nThis module contains the logic that kicks of the ``cobbler import`` process. This is extracted logic from ``api.py``\nthat is essentially calling ``modules/mangers/import_signatures.py`` with some preparatory code.\n\"\"\"\nimport logging\nimport os\nfrom typing import TYPE_CHECKING, Optio... | diff --git a/changelog.d/3506.fixed b/changelog.d/3506.fixed
new file mode 100644
index 0000000000..9778ecdc51
--- /dev/null
+++ b/changelog.d/3506.fixed
@@ -0,0 +1 @@
+Fix cobbler import rsync failure with SELinux enabled
diff --git a/cobbler/actions/importer.py b/cobbler/actions/importer.py
index 851534b624..ba50d30e... |
open-telemetry__opentelemetry-python-contrib-1788 | [instrumentation-django] - empty span name
**Describe your environment**
opentelemetry-instrumentation-django==0.30b1
django==4.0.4
**Steps to reproduce**
Having the following URL patterns:
`from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
pat... | [
{
"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 618eb4910f..3dc96096ec 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
+- `opentelemetry-instrumentation-django` Fix empty span name when using
+ `path("", ...)`... |
horovod__horovod-1726 | PID KeyError in broadcast_optimizer_state
**Environment:**
1. Framework: PyTorch
2. Framework version: `torch==1.4.0`, `torchvision==0.5.0`
3. Horovod version: `horovod==0.19.0`
4. MPI version: Open MPI 4.0.0
5. CUDA version: 10.0
6. NCCL version: 2.4.2-1+cuda10.0
7. Python version: 3.7.6
8. OS and version: Ubu... | [
{
"content": "# Copyright 2019 Uber Technologies, Inc. All Rights Reserved.\n# Modifications copyright Microsoft\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http:/... | [
{
"content": "# Copyright 2019 Uber Technologies, Inc. All Rights Reserved.\n# Modifications copyright Microsoft\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http:/... | diff --git a/docs/requirements.txt b/docs/requirements.txt
index 08edad3bf6..8fcc41591f 100644
--- a/docs/requirements.txt
+++ b/docs/requirements.txt
@@ -1,4 +1,4 @@
-git+https://github.com/sphinx-doc/sphinx@2.0
+git+https://github.com/sphinx-doc/sphinx@2.x
sphinxcontrib-napoleon
alabaster
nbsphinx
diff --git a/hor... |
ansible-collections__community.general-936 | ZFS Snapshot fails on root zvol
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
<!--- Explain the problem briefly ... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2013, Johan Wiren <johan.wiren.se@gmail.com>\n# Copyright: (c) 2017, Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, pri... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2013, Johan Wiren <johan.wiren.se@gmail.com>\n# Copyright: (c) 2017, Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, pri... | diff --git a/changelogs/fragments/zfs-root-snapshot.yml b/changelogs/fragments/zfs-root-snapshot.yml
new file mode 100644
index 00000000000..13b5e8ce0c4
--- /dev/null
+++ b/changelogs/fragments/zfs-root-snapshot.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - zfs - fixed ``invalid character '@' in pool name"`` error when working w... |
pulp__pulpcore-4609 | Regression on performance improvements in rv.get_content()
**Version**
foreman-3.5.3, katello-4.7.6, python39-pulpcore-3.21.17+, and postgresql-12.15
**Describe the bug**
Users are experiencing a slowdown in their installations.
**To Reproduce**
Sync the content.
**Additional context**
https://community.... | [
{
"content": "\"\"\"\nRepository related Django models.\n\"\"\"\nfrom contextlib import suppress\nfrom gettext import gettext as _\nfrom os import path\nfrom collections import defaultdict\nimport logging\n\nimport django\nfrom asyncio_throttle import Throttler\nfrom django.conf import settings\nfrom django.con... | [
{
"content": "\"\"\"\nRepository related Django models.\n\"\"\"\nfrom contextlib import suppress\nfrom gettext import gettext as _\nfrom os import path\nfrom collections import defaultdict\nimport logging\n\nimport django\nfrom asyncio_throttle import Throttler\nfrom django.conf import settings\nfrom django.con... | diff --git a/CHANGES/4591.bugfix b/CHANGES/4591.bugfix
new file mode 100644
index 0000000000..922a961d3e
--- /dev/null
+++ b/CHANGES/4591.bugfix
@@ -0,0 +1 @@
+Resolved a sync-time performance regression.
diff --git a/pulpcore/app/models/repository.py b/pulpcore/app/models/repository.py
index a73bfaac93..1fe98517fd 100... |
spack__spack-39889 | [SIRIUS] Update package
As a maintainer and developer of SIRIUS I would like to update and simplify the spack package for it. The following is changed
* versions below 6.0 are removed from the recipe. If needed they can be found in tagged release of spack
* versions below 7.3 are flagged as deprecated
* dependency o... | [
{
"content": "# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport os\n\nfrom spack.package import *\n\n\nclass Sirius(CMakePackage, CudaPackage, ROCmPacka... | [
{
"content": "# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport os\n\nfrom spack.package import *\n\n\nclass Sirius(CMakePackage, CudaPackage, ROCmPacka... | diff --git a/var/spack/repos/builtin/packages/sirius/package.py b/var/spack/repos/builtin/packages/sirius/package.py
index 8716f89ef2765b..e9b6b5cd4573a6 100644
--- a/var/spack/repos/builtin/packages/sirius/package.py
+++ b/var/spack/repos/builtin/packages/sirius/package.py
@@ -342,8 +342,10 @@ def cmake_args(self):
... |
pulp__pulpcore-4610 | Regression on performance improvements in rv.get_content()
**Version**
foreman-3.5.3, katello-4.7.6, python39-pulpcore-3.21.17+, and postgresql-12.15
**Describe the bug**
Users are experiencing a slowdown in their installations.
**To Reproduce**
Sync the content.
**Additional context**
https://community.... | [
{
"content": "\"\"\"\nRepository related Django models.\n\"\"\"\nfrom contextlib import suppress\nfrom gettext import gettext as _\nfrom os import path\nfrom collections import defaultdict\nimport logging\n\nimport django\nfrom asyncio_throttle import Throttler\nfrom dynaconf import settings\nfrom django.core.v... | [
{
"content": "\"\"\"\nRepository related Django models.\n\"\"\"\nfrom contextlib import suppress\nfrom gettext import gettext as _\nfrom os import path\nfrom collections import defaultdict\nimport logging\n\nimport django\nfrom asyncio_throttle import Throttler\nfrom dynaconf import settings\nfrom django.core.v... | diff --git a/CHANGES/4591.bugfix b/CHANGES/4591.bugfix
new file mode 100644
index 0000000000..922a961d3e
--- /dev/null
+++ b/CHANGES/4591.bugfix
@@ -0,0 +1 @@
+Resolved a sync-time performance regression.
diff --git a/pulpcore/app/models/repository.py b/pulpcore/app/models/repository.py
index 43e4daca1b..e347f2b42f 100... |
pypa__pip-481 | Bad error message on malformed VCS string
The item in my requirements.txt:
```
git://github.com/alex/django-fixture-generator.git#egg=fixture_generator
```
The resulting error message:
``` python
Downloading/unpacking fixture-generator from git://github.com/alex/django-fixture-generator.git (from -r requirements/dev... | [
{
"content": "\"\"\"Handles all VCS (version control) support\"\"\"\n\nimport os\nimport shutil\n\nfrom pip.backwardcompat import urlparse, urllib\nfrom pip.log import logger\nfrom pip.util import (display_path, backup_dir, find_command,\n ask, rmtree, ask_path_exists)\n\n\n__all__ = ['vcs'... | [
{
"content": "\"\"\"Handles all VCS (version control) support\"\"\"\n\nimport os\nimport shutil\n\nfrom pip.backwardcompat import urlparse, urllib\nfrom pip.log import logger\nfrom pip.util import (display_path, backup_dir, find_command,\n ask, rmtree, ask_path_exists)\n\n\n__all__ = ['vcs'... | diff --git a/AUTHORS.txt b/AUTHORS.txt
index 5fa57113de4..034174cd093 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -42,6 +42,7 @@ Rene Dudfield
Ronny Pfannschmidt
Simon Cross
Stavros Korokithakis
+Thomas Fenzl
Thomas Johansson
Vinay Sajip
Vitaly Babiy
diff --git a/pip/vcs/__init__.py b/pip/vcs/__init__.py
index ... |
ansible__ansible-modules-core-3176 | docker_image path param doesn't support home directory
##### Issue Type:
<!-- Please pick one and delete the rest: -->
- Bug Report
##### Plugin Name:
<!-- Name of the plugin/module/task -->
docker_image
##### Ansible Version:
```
ansible 2.0.1.0
config file = /Users/mylokin/.ansible.cfg
configured module searc... | [
{
"content": "#!/usr/bin/python\n#\n\n# (c) 2014, Pavel Antonov <antonov@adwz.ru>\n#\n# This file is part of Ansible\n#\n# This module is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3... | [
{
"content": "#!/usr/bin/python\n#\n\n# (c) 2014, Pavel Antonov <antonov@adwz.ru>\n#\n# This file is part of Ansible\n#\n# This module is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3... | diff --git a/cloud/docker/docker_image.py b/cloud/docker/docker_image.py
index cf839a3d08e..12ba67de663 100644
--- a/cloud/docker/docker_image.py
+++ b/cloud/docker/docker_image.py
@@ -353,7 +353,7 @@ def remove_images(self):
def main():
module = AnsibleModule(
argument_spec = dict(
- path ... |
pypa__pip-2939 | pip should not assume all git repositories have an origin remote url.
So, the latest pip/git issue I've got is the following:
```
virtualenv --no-site-packages my-env
. my-env/bin/activate
pip install pyramid
pcreate -s starter my-app
cd my-app
git init .
python setup.py develop
pip freeze #Kaboom!
```
`python setup.... | [
{
"content": "from __future__ import absolute_import\n\nimport logging\nimport tempfile\nimport os.path\n\nfrom pip._vendor.six.moves.urllib import parse as urllib_parse\nfrom pip._vendor.six.moves.urllib import request as urllib_request\n\nfrom pip.utils import display_path, rmtree\nfrom pip.vcs import vcs, Ve... | [
{
"content": "from __future__ import absolute_import\n\nimport logging\nimport tempfile\nimport os.path\n\nfrom pip._vendor.six.moves.urllib import parse as urllib_parse\nfrom pip._vendor.six.moves.urllib import request as urllib_request\n\nfrom pip.utils import display_path, rmtree\nfrom pip.vcs import vcs, Ve... | diff --git a/pip/vcs/git.py b/pip/vcs/git.py
index 7f4bccb0497..60e758bdc98 100644
--- a/pip/vcs/git.py
+++ b/pip/vcs/git.py
@@ -124,9 +124,12 @@ def obtain(self, dest):
self.update_submodules(dest)
def get_url(self, location):
- url = self.run_command(
- ['config', 'remote.origin.... |
onnx__sklearn-onnx-818 | AttributeError: 'numpy.uintXX' object has no attribute 'encode'
Hi Team,
Found an issue similar to #476, but for sklearn.neural_network.MLPClassifier objects.
Any model trained using an unsigned integer output type fails to be converted. See below a script to reproduce the issue:
```
import numpy as np
from skle... | [
{
"content": "# SPDX-License-Identifier: Apache-2.0\n\n\nimport numpy as np\nfrom ..common.data_types import guess_proto_type\nfrom ..common._apply_operation import (\n apply_add, apply_cast, apply_concat, apply_identity,\n apply_reshape, apply_sub)\nfrom ..common._registration import register_converter\n... | [
{
"content": "# SPDX-License-Identifier: Apache-2.0\n\n\nimport numpy as np\nfrom ..common.data_types import guess_proto_type\nfrom ..common._apply_operation import (\n apply_add, apply_cast, apply_concat, apply_identity,\n apply_reshape, apply_sub)\nfrom ..common._registration import register_converter\n... | diff --git a/skl2onnx/operator_converters/multilayer_perceptron.py b/skl2onnx/operator_converters/multilayer_perceptron.py
index 31977d98d..eca398fc9 100644
--- a/skl2onnx/operator_converters/multilayer_perceptron.py
+++ b/skl2onnx/operator_converters/multilayer_perceptron.py
@@ -111,7 +111,7 @@ def convert_sklearn_mlp... |
ckan__ckan-6638 | Intermittent duplicate key errors when creating default sysadmin
**CKAN version**
CKAN 2.9.x. Does not appear to affect 2.8.
**Describe the bug**
When our continuous integration tests initialise a test CKAN 2.9 instance, they sometimes encounter a duplicate key exception when CKAN is attempting to create the '... | [
{
"content": "# encoding: utf-8\n\n'''CKAN environment configuration'''\nimport os\nimport logging\nimport warnings\nimport pytz\n\nimport sqlalchemy\n\nimport ckan.model as model\nimport ckan.plugins as p\nimport ckan.lib.plugins as lib_plugins\nimport ckan.lib.helpers as helpers\nimport ckan.lib.app_globals a... | [
{
"content": "# encoding: utf-8\n\n'''CKAN environment configuration'''\nimport os\nimport logging\nimport warnings\nimport pytz\n\nimport sqlalchemy\n\nimport ckan.model as model\nimport ckan.plugins as p\nimport ckan.lib.plugins as lib_plugins\nimport ckan.lib.helpers as helpers\nimport ckan.lib.app_globals a... | diff --git a/ckan/config/environment.py b/ckan/config/environment.py
index 896657f9170..aa837852fad 100644
--- a/ckan/config/environment.py
+++ b/ckan/config/environment.py
@@ -227,6 +227,9 @@ def update_config():
except (sqlalchemy.exc.ProgrammingError, sqlalchemy.exc.OperationalError):
# The database is... |
docker__docker-py-381 | Streaming broken on Python3
See Issue #336!
Fix lost data & hangs when reading chunked streams
I managed to [track down a hang when calling `build()`](https://groups.google.com/forum/#!topic/docker-dev/fhrTqwF7IJQ) to a problem handling streams.
`strace` proved that the problem was somewhere in the python client and ... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | [
{
"content": "# Copyright 2013 dotCloud inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000..ababae31d
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,15 @@
+.git/
+
+build
+dist
+*.egg-info
+*.egg/
+*.pyc
+*.swp
+
+.tox
+.coverage
+html/*
+
+# Compiled Documentation
+site/
diff --git a/.gitignore b/.gitignore
index 64175fadb..998037... |
NVIDIA__NeMo-1557 | Tacotron2 bug when batch dimension is 1
**Describe the bug**
Training (or just passing input with ground-truth spectrogram) Tacotron2 with a batch dimension of 1 does not work due to a dimension problem when aggregating the gate outputs.
The line here
https://github.com/NVIDIA/NeMo/blob/d01b7bbc3fdb1bbf14789f71b... | [
{
"content": "# Copyright (c) 2020, NVIDIA CORPORATION. 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.... | [
{
"content": "# Copyright (c) 2020, NVIDIA CORPORATION. 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.... | diff --git a/nemo/collections/tts/modules/tacotron2.py b/nemo/collections/tts/modules/tacotron2.py
index 6478b5b32d68..6cb192bc797c 100644
--- a/nemo/collections/tts/modules/tacotron2.py
+++ b/nemo/collections/tts/modules/tacotron2.py
@@ -321,7 +321,7 @@ def train_forward(self, *, memory, decoder_inputs, memory_lengths... |
MongoEngine__mongoengine-1868 | queryset transform tries to update query dictionary with regex pattern
> > > ResultRecord.objects(Q( defects__number__iexact='FFF-10219') & Q(defects__number__exists=True))
> > > Traceback (most recent call last):
> > > File "<stdin>", line 1, in <module>
> > > File "/usr/local/lib/python2.7/dist-packages/mongoengi... | [
{
"content": "from collections import defaultdict\n\nfrom bson import ObjectId, SON\nfrom bson.dbref import DBRef\nimport pymongo\nimport six\n\nfrom mongoengine.base import UPDATE_OPERATORS\nfrom mongoengine.common import _import_class\nfrom mongoengine.connection import get_connection\nfrom mongoengine.errors... | [
{
"content": "from collections import defaultdict\n\nfrom bson import ObjectId, SON\nfrom bson.dbref import DBRef\nimport pymongo\nimport six\n\nfrom mongoengine.base import UPDATE_OPERATORS\nfrom mongoengine.common import _import_class\nfrom mongoengine.connection import get_connection\nfrom mongoengine.errors... | diff --git a/mongoengine/queryset/transform.py b/mongoengine/queryset/transform.py
index 5f777f413..f450c8a3c 100644
--- a/mongoengine/queryset/transform.py
+++ b/mongoengine/queryset/transform.py
@@ -147,7 +147,7 @@ def query(_doc_cls=None, **kwargs):
if op is None or key not in mongo_query:
mong... |
svthalia__concrexit-2962 | Fix escaped HTML in promorequest email remarks field
### Describe the bug

| [
{
"content": "\"\"\"The emails defined by the promotion request package.\"\"\"\nimport logging\n\nfrom django.conf import settings\n\nfrom promotion.models import PromotionRequest\nfrom utils.snippets import send_email\n\nlogger = logging.getLogger(__name__)\n\n\ndef send_weekly_overview():\n new_requests = ... | [
{
"content": "\"\"\"The emails defined by the promotion request package.\"\"\"\nimport logging\n\nfrom django.conf import settings\n\nfrom promotion.models import PromotionRequest\nfrom utils.snippets import send_email\n\nlogger = logging.getLogger(__name__)\n\n\ndef send_weekly_overview():\n new_requests = ... | diff --git a/website/promotion/emails.py b/website/promotion/emails.py
index e6b9443b1..3a1e88b6e 100644
--- a/website/promotion/emails.py
+++ b/website/promotion/emails.py
@@ -16,8 +16,8 @@ def send_weekly_overview():
send_email(
to=[settings.PROMO_REQUEST_NOTIFICATION_ADDRESS],
subject="[PROMO]... |
DjangoGirls__djangogirls-831 | Automate code formatting
Although flake8 is a really helpful tool for maintaining code quality, it doesn't fix formatting issues automatically. As a result, there are still some inconsistencies in the codebase. I'd like to propose adopting the code formatting tools below, which would improve readability and consistency... | [
{
"content": "import csv\n\nfrom django.contrib import messages\nfrom django.http import Http404, HttpResponse, JsonResponse\nfrom django.shortcuts import get_object_or_404, redirect, render\nfrom django.template.defaultfilters import striptags\nfrom django.views.decorators.csrf import csrf_exempt\nfrom django.... | [
{
"content": "import csv\n\nfrom django.contrib import messages\nfrom django.http import Http404, HttpResponse, JsonResponse\nfrom django.shortcuts import get_object_or_404, redirect, render\nfrom django.template.defaultfilters import striptags\nfrom django.utils.translation import gettext_lazy as _\nfrom djang... | diff --git a/.flake8 b/.flake8
index b2e7b310e..f77fc184f 100644
--- a/.flake8
+++ b/.flake8
@@ -12,4 +12,4 @@ exclude =
.venv,
__pycache__,
**/migrations/**
-max-line-length = 119
\ No newline at end of file
+max-line-length = 120
\ No newline at end of file
diff --git a/.pre-commit-config.yaml b/.pre-c... |
unionai-oss__pandera-1022 | `pandera.check_types` causes `ValueError: no results` for functions called by `pandas.DataFrame.apply`
If the `@pandera.check_types` decorator is used for a function that is called by `pandas.DataFrame.apply`, it causes `ValueError: no results`.
- [X] I have checked that this issue has not already been reported.
- ... | [
{
"content": "\"\"\"Decorators for integrating pandera into existing data pipelines.\"\"\"\nimport functools\nimport inspect\nimport sys\nimport typing\nimport types\nfrom collections import OrderedDict\nfrom typing import (\n Any,\n Callable,\n Dict,\n Iterable,\n List,\n NoReturn,\n Optio... | [
{
"content": "\"\"\"Decorators for integrating pandera into existing data pipelines.\"\"\"\nimport functools\nimport inspect\nimport sys\nimport typing\nimport types\nfrom collections import OrderedDict\nfrom typing import (\n Any,\n Callable,\n Dict,\n Iterable,\n List,\n NoReturn,\n Optio... | diff --git a/pandera/decorators.py b/pandera/decorators.py
index d8fa966b0..e861e429c 100644
--- a/pandera/decorators.py
+++ b/pandera/decorators.py
@@ -752,4 +752,11 @@ def _wrapper(
out = wrapped_(*validated_pos.values(), **validated_kwd)
return _check_arg("return", out)
- return _w... |
holoviz__panel-1030 | Panel 0.8.0rc3 Audio pane broken loading .wav (conda install)
#### ALL software version info (this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)
- OS: Ubuntu 18.04.3 LTS 64-bit
- Browser: Firefox 72.0.1 (64-bit)
- Jupyter Notebook (same problem in Jupyter Lab)
- Fresh co... | [
{
"content": "\"\"\"\nContains Media panes including renderers for Audio and Video content.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nimport os\n\nfrom base64 import b64encode\nfrom io import BytesIO\nfrom six import string_types\n\nimport numpy as np\nimport param\n\nfrom .... | [
{
"content": "\"\"\"\nContains Media panes including renderers for Audio and Video content.\n\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n\nimport os\n\nfrom base64 import b64encode\nfrom io import BytesIO\nfrom six import string_types\n\nimport numpy as np\nimport param\n\nfrom .... | diff --git a/panel/pane/media.py b/panel/pane/media.py
index 63d4de5792..38b1a2e387 100644
--- a/panel/pane/media.py
+++ b/panel/pane/media.py
@@ -88,8 +88,8 @@ def _process_param_change(self, msg):
buffer = self._from_numpy(value)
data = b64encode(buffer.getvalue())
elif ... |
spack__spack-15918 | Automake version mismatch in cryptsetup
### Spack version
Pulled e1238bae9053d3c283c1721f85af78f3539f473d (2020-03-27) without any additional configuration.
```console
$ spack --version
fatal: No names found, cannot describe anything.
0.14.1
```
### Steps to reproduce the issue
```console
$ spack install ... | [
{
"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Cryptsetup(AutotoolsPackage):\n \"\"\"Cryptsetup and LUKS - o... | [
{
"content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Cryptsetup(AutotoolsPackage):\n \"\"\"Cryptsetup and LUKS - o... | diff --git a/var/spack/repos/builtin/packages/cryptsetup/package.py b/var/spack/repos/builtin/packages/cryptsetup/package.py
index 99c14de004b53d..c81e024d4d4dbb 100644
--- a/var/spack/repos/builtin/packages/cryptsetup/package.py
+++ b/var/spack/repos/builtin/packages/cryptsetup/package.py
@@ -34,6 +34,8 @@ class Crypt... |
mampfes__hacs_waste_collection_schedule-1986 | [Bug]: Haringey Waste Collection sensor returning 'Unknown'
### I Have A Problem With:
A specific source
### What's Your Problem
I am having an issue adding the Haringey council (UK) Waste Collection sensor into HA. The sensor value shows as 'Unknown'.
I have added this code to my configuration.yaml (replac... | [
{
"content": "from datetime import datetime\n\nimport requests\nfrom bs4 import BeautifulSoup\nfrom waste_collection_schedule import Collection # type: ignore[attr-defined]\n\nTITLE = \"Haringey Council\"\nDESCRIPTION = \"Source for haringey.gov.uk services for Haringey Council, UK.\"\nURL = \"https://www.hari... | [
{
"content": "from datetime import datetime\n\nimport requests\nfrom bs4 import BeautifulSoup\nfrom waste_collection_schedule import Collection # type: ignore[attr-defined]\n\nTITLE = \"Haringey Council\"\nDESCRIPTION = \"Source for haringey.gov.uk services for Haringey Council, UK.\"\nURL = \"https://www.hari... | diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/haringey_gov_uk.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/haringey_gov_uk.py
index a361e5a23..bca70b274 100644
--- a/custom_components/waste_collection_schedule/waste_collection_schedule/sou... |
pulp__pulpcore-4615 | Regression on performance improvements in rv.get_content()
**Version**
foreman-3.5.3, katello-4.7.6, python39-pulpcore-3.21.17+, and postgresql-12.15
**Describe the bug**
Users are experiencing a slowdown in their installations.
**To Reproduce**
Sync the content.
**Additional context**
https://community.... | [
{
"content": "\"\"\"\nRepository related Django models.\n\"\"\"\nfrom contextlib import suppress\nfrom gettext import gettext as _\nfrom os import path\nfrom collections import defaultdict\nimport logging\n\nimport django\nfrom asyncio_throttle import Throttler\nfrom django.conf import settings\nfrom django.con... | [
{
"content": "\"\"\"\nRepository related Django models.\n\"\"\"\nfrom contextlib import suppress\nfrom gettext import gettext as _\nfrom os import path\nfrom collections import defaultdict\nimport logging\n\nimport django\nfrom asyncio_throttle import Throttler\nfrom django.conf import settings\nfrom django.con... | diff --git a/CHANGES/4591.bugfix b/CHANGES/4591.bugfix
new file mode 100644
index 0000000000..922a961d3e
--- /dev/null
+++ b/CHANGES/4591.bugfix
@@ -0,0 +1 @@
+Resolved a sync-time performance regression.
diff --git a/pulpcore/app/models/repository.py b/pulpcore/app/models/repository.py
index 9f7bdaa068..1f71ac4f12 100... |
pulp__pulpcore-4611 | Regression on performance improvements in rv.get_content()
**Version**
foreman-3.5.3, katello-4.7.6, python39-pulpcore-3.21.17+, and postgresql-12.15
**Describe the bug**
Users are experiencing a slowdown in their installations.
**To Reproduce**
Sync the content.
**Additional context**
https://community.... | [
{
"content": "\"\"\"\nRepository related Django models.\n\"\"\"\nfrom contextlib import suppress\nfrom gettext import gettext as _\nfrom os import path\nfrom collections import defaultdict\nimport logging\n\nimport django\nfrom asyncio_throttle import Throttler\nfrom dynaconf import settings\nfrom django.core.v... | [
{
"content": "\"\"\"\nRepository related Django models.\n\"\"\"\nfrom contextlib import suppress\nfrom gettext import gettext as _\nfrom os import path\nfrom collections import defaultdict\nimport logging\n\nimport django\nfrom asyncio_throttle import Throttler\nfrom dynaconf import settings\nfrom django.core.v... | diff --git a/CHANGES/4591.bugfix b/CHANGES/4591.bugfix
new file mode 100644
index 0000000000..922a961d3e
--- /dev/null
+++ b/CHANGES/4591.bugfix
@@ -0,0 +1 @@
+Resolved a sync-time performance regression.
diff --git a/pulpcore/app/models/repository.py b/pulpcore/app/models/repository.py
index 51362c9be6..04e56249ca 100... |
jdb78__pytorch-forecasting-996 | Scale set to 0 by `TorchNormalizer(method="identity", center=False)` causing division by 0
- PyTorch-Forecasting version: 0.10.1
- PyTorch version: 1.10.2+cu111
- Python version: 3.8.10
- Operating System: Ubuntu
My goal is to run `DeepAR `with `NegativeBinomialDistributionLoss`.
As specified in the documentatio... | [
{
"content": "\"\"\"\nEncoders for encoding categorical variables and scaling continuous data.\n\"\"\"\n\nfrom typing import Callable, Dict, Iterable, List, Tuple, Union\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.base import BaseEstimator, TransformerMixin\nimport torch\nfrom torc... | [
{
"content": "\"\"\"\nEncoders for encoding categorical variables and scaling continuous data.\n\"\"\"\n\nfrom typing import Callable, Dict, Iterable, List, Tuple, Union\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.base import BaseEstimator, TransformerMixin\nimport torch\nfrom torc... | diff --git a/pytorch_forecasting/data/encoders.py b/pytorch_forecasting/data/encoders.py
index fcb4cc245..a6cf8e6f9 100644
--- a/pytorch_forecasting/data/encoders.py
+++ b/pytorch_forecasting/data/encoders.py
@@ -498,7 +498,7 @@ def _set_parameters(
q_75 = np.percentile(y_scale, 75)
q_... |
spack__spack-12381 | Clang always references system gcc, even if being built with spack gcc
### Steps to reproduce the issue
Even when building LLVM with a spack-installed GCC compiler, Clang includes the system GCC installation in its search paths:
```console
$ spack install llvm@7.0.1%gcc@8.2.0
$ $(spack location -i llvm)/bin/cla... | [
{
"content": "# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Llvm(CMakePackage):\n \"\"\"The LLVM Project is a collection ... | [
{
"content": "# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Llvm(CMakePackage):\n \"\"\"The LLVM Project is a collection ... | diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py
index c45928c9fe132a..ef5eaed1eb7950 100644
--- a/var/spack/repos/builtin/packages/llvm/package.py
+++ b/var/spack/repos/builtin/packages/llvm/package.py
@@ -697,6 +697,10 @@ def cmake_args(self):
i... |
statsmodels__statsmodels-7055 | HoltWintersResults simulation throws ValueError
### **Describe:**
I use the following example codes given on the page (https://www.statsmodels.org/stable/examples/notebooks/generated/exponential_smoothing.html):
fit = ExponentialSmoothing(aust, seasonal_periods=4, trend='add', seasonal='mul', initialization_m... | [
{
"content": "import numpy as np\nimport pandas as pd\nfrom scipy.special import inv_boxcox\nfrom scipy.stats import (\n _distn_infrastructure,\n boxcox,\n rv_continuous,\n rv_discrete,\n)\n\nfrom statsmodels.base.data import PandasData\nfrom statsmodels.base.model import Results\nfrom statsmodels.b... | [
{
"content": "import numpy as np\nimport pandas as pd\nfrom scipy.special import inv_boxcox\nfrom scipy.stats import (\n _distn_infrastructure,\n boxcox,\n rv_continuous,\n rv_discrete,\n)\n\nfrom statsmodels.base.data import PandasData\nfrom statsmodels.base.model import Results\nfrom statsmodels.b... | diff --git a/statsmodels/tsa/holtwinters/results.py b/statsmodels/tsa/holtwinters/results.py
index 7874bb627c3..09ac7539280 100644
--- a/statsmodels/tsa/holtwinters/results.py
+++ b/statsmodels/tsa/holtwinters/results.py
@@ -743,10 +743,11 @@ def simulate(
if use_boxcox:
y = inv_boxcox(y, lamda)
... |
huggingface__transformers-9411 | `run_glue.py` fails when using my own dataset of regression task
## Environment info
- `transformers` version: 4.1.1
- Platform: Linux-4.15.0-123-generic-x86_64-with-glibc2.10
- Python version: 3.8.3
- PyTorch version (GPU?): 1.7.0 (True)
- Tensorflow version (GPU?): 2.3.1 (True)
- Using GPU in script?: Ye... | [
{
"content": "# coding=utf-8\n# Copyright 2020 The HuggingFace Inc. team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/li... | [
{
"content": "# coding=utf-8\n# Copyright 2020 The HuggingFace Inc. team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/li... | diff --git a/examples/text-classification/run_glue.py b/examples/text-classification/run_glue.py
index afe9cd976120..1ae47e692347 100644
--- a/examples/text-classification/run_glue.py
+++ b/examples/text-classification/run_glue.py
@@ -289,7 +289,7 @@ def main():
f"model labels: {list(sorted(label_name_... |
conda-forge__conda-smithy-877 | BUG: "Recipe maintainers should be a json list"
Seeing the linter complaining about [the recipe maintainers not being a list]( https://github.com/conda-forge/gperftools-feedstock/pull/2#issuecomment-413905960 ). However not only they are a list and they have not changed in that PR, but the linter did not raise the issu... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\ntry:\n from collections.abc import Sequence, Mapping\n str_type = str\nexcept ImportError: # python 2\n from collections import Sequence, Mapping\n str_type = basestring\nimport copy\nimport io\nimport itertools\nim... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\n\ntry:\n from collections.abc import Sequence, Mapping\n str_type = str\nexcept ImportError: # python 2\n from collections import Sequence, Mapping\n str_type = basestring\nimport copy\nimport io\nimport itertools\nim... | diff --git a/conda_smithy/lint_recipe.py b/conda_smithy/lint_recipe.py
index c78091823..da99011c1 100644
--- a/conda_smithy/lint_recipe.py
+++ b/conda_smithy/lint_recipe.py
@@ -132,7 +132,9 @@ def lintify(meta, recipe_dir=None, conda_forge=False):
'the `extra/recipe-maintainers` section.')
... |
nerfstudio-project__nerfstudio-1919 | Pytorch 2.0 nerfacto optimizer inf check error
**Describe the bug**
Nerfacto fails under PyTorch 2.0 with the `no inf checks error`.
**Error**
```
Traceback (most recent call last):
File "/home/kulhajon/.conda/envs/nerfstudio-torch20/bin/ns-train", line 8, in <module>
sys.exit(entrypoint())
File "/home... | [
{
"content": "# Copyright 2022 the Regents of the University of California, Nerfstudio Team and contributors. 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 a... | [
{
"content": "# Copyright 2022 the Regents of the University of California, Nerfstudio Team and contributors. 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 a... | diff --git a/nerfstudio/engine/optimizers.py b/nerfstudio/engine/optimizers.py
index 3f01fb2e96..3ff693685d 100644
--- a/nerfstudio/engine/optimizers.py
+++ b/nerfstudio/engine/optimizers.py
@@ -127,7 +127,8 @@ def optimizer_scaler_step_all(self, grad_scaler: GradScaler) -> None:
if max_norm is not None:
... |
docarray__docarray-1643 | docs: add docs for the dict() method
# Context
we need to document the behavior of calling `dict()` on a BaseDoc. Especially with nested DocList.
```python
class InnerDoc(BaseDoc):
x: int
class MyDoc(BaseDoc):
l: DocList[InnerDoc]
doc = MyDoc(l=[InnerDoc(x=1), InnerDoc(x=2)])
print(f'{doc.dict()... | [
{
"content": "import os\nimport warnings\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n Dict,\n List,\n Mapping,\n Optional,\n Tuple,\n Type,\n TypeVar,\n Union,\n cast,\n no_type_check,\n)\n\nimport orjson\nfrom pydantic import BaseModel, Fi... | [
{
"content": "import os\nimport warnings\nfrom typing import (\n TYPE_CHECKING,\n AbstractSet,\n Any,\n Callable,\n Dict,\n List,\n Mapping,\n Optional,\n Tuple,\n Type,\n TypeVar,\n Union,\n cast,\n no_type_check,\n)\n\nimport orjson\nfrom pydantic import BaseModel, Fi... | diff --git a/docarray/base_doc/doc.py b/docarray/base_doc/doc.py
index 0dfbabd57c0..6ebeeb6b477 100644
--- a/docarray/base_doc/doc.py
+++ b/docarray/base_doc/doc.py
@@ -311,7 +311,11 @@ def dict(
) -> 'DictStrAny':
"""
Generate a dictionary representation of the model, optionally specifying
- ... |
carpentries__amy-665 | Survey links field should be Survey results
Rename "Survey links" to "Survey results"
Survey _links_ are automatically generated using workshop slug.
The _results_ are what we need to store because those have to be manually generated.
| [
{
"content": "import re\n\nfrom django import forms\nfrom django.core.validators import RegexValidator\nfrom django.forms import (\n HiddenInput, CheckboxSelectMultiple, TextInput, modelformset_factory,\n)\n\nfrom captcha.fields import ReCaptchaField\nfrom crispy_forms.helper import FormHelper\nfrom crispy_f... | [
{
"content": "import re\n\nfrom django import forms\nfrom django.core.validators import RegexValidator\nfrom django.forms import (\n HiddenInput, CheckboxSelectMultiple, TextInput, modelformset_factory,\n)\n\nfrom captcha.fields import ReCaptchaField\nfrom crispy_forms.helper import FormHelper\nfrom crispy_f... | diff --git a/workshops/forms.py b/workshops/forms.py
index 2b6658d8b..90c3d2983 100644
--- a/workshops/forms.py
+++ b/workshops/forms.py
@@ -291,7 +291,7 @@ def __init__(self, *args, **kwargs):
Div, css_class='panel panel-default')
# add <div class='panel-heading'>Venue details</div> inside "div.p... |
celery__celery-3934 | Broadcast messages in Celery 4.0.1 + Django not worked for me
## Checklist
- [x] I have included the output of ``celery -A proj report`` in the issue.
(if you are not able to do this, then at least specify the Celery
version affected).
- [x] I have verified that the issue exists against the `master` ... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Sending/Receiving Messages (Kombu integration).\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport numbers\nimport sys\n\nfrom collections import Mapping, namedtuple\nfrom datetime import timedelta\nfrom weakref import WeakValueDictionary\n\nfr... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Sending/Receiving Messages (Kombu integration).\"\"\"\nfrom __future__ import absolute_import, unicode_literals\n\nimport numbers\nimport sys\n\nfrom collections import Mapping, namedtuple\nfrom datetime import timedelta\nfrom weakref import WeakValueDictionary\n\nfr... | diff --git a/celery/app/amqp.py b/celery/app/amqp.py
index c81b1852d2e..cba80a43598 100644
--- a/celery/app/amqp.py
+++ b/celery/app/amqp.py
@@ -521,7 +521,7 @@ def send_task_message(producer, name, message,
exchange_type = 'direct'
# convert to anon-exchange, when exchange not set a... |
encode__uvicorn-286 | NameError: name 'get_logger' is not defined
Happens only when running in debug mode.
```
$ uvicorn app:App --debug
Traceback (most recent call last):
File "/home/jamie.chang/.local/bin/uvicorn", line 11, in <module>
sys.exit(main())
File "/home/jamie.chang/.local/lib/python3.5/site-packages/click/core.py"... | [
{
"content": "from uvicorn.config import Config, LOG_LEVELS, HTTP_PROTOCOLS, WS_PROTOCOLS, LOOP_SETUPS\nfrom uvicorn.global_state import GlobalState\nfrom uvicorn.lifespan import Lifespan\nfrom uvicorn.reloaders.statreload import StatReload\nimport asyncio\nimport click\nimport signal\nimport os\nimport logging... | [
{
"content": "from uvicorn.config import get_logger, Config, LOG_LEVELS, HTTP_PROTOCOLS, WS_PROTOCOLS, LOOP_SETUPS\nfrom uvicorn.global_state import GlobalState\nfrom uvicorn.lifespan import Lifespan\nfrom uvicorn.reloaders.statreload import StatReload\nimport asyncio\nimport click\nimport signal\nimport os\nim... | diff --git a/uvicorn/__init__.py b/uvicorn/__init__.py
index 5fe10bbd4..0902b3b7d 100644
--- a/uvicorn/__init__.py
+++ b/uvicorn/__init__.py
@@ -1,4 +1,4 @@
from uvicorn.main import main, run
-__version__ = "0.3.29"
+__version__ = "0.3.30"
__all__ = ["main", "run"]
diff --git a/uvicorn/main.py b/uvicorn/main.py
ind... |
huggingface__text-generation-inference-579 | Tied weight optimization for checkpoints doesn't work with text-generation-inference.
### System Info
Ubuntu 20.04
4 A10 NVIDIA GPU's
I think checkpoints saved after this feature was merged don't work with text-generation-inference.
https://github.com/huggingface/transformers/issues/23868
With falcon models ge... | [
{
"content": "import torch\nimport torch.distributed\n\nfrom opentelemetry import trace\nfrom transformers import AutoTokenizer\nfrom typing import Optional\n\nfrom text_generation_server.models import FlashCausalLM\nfrom text_generation_server.models.custom_modeling.flash_rw_modeling import (\n RWConfig,\n ... | [
{
"content": "import torch\nimport torch.distributed\n\nfrom opentelemetry import trace\nfrom transformers import AutoTokenizer\nfrom typing import Optional\n\nfrom text_generation_server.models import FlashCausalLM\nfrom text_generation_server.models.custom_modeling.flash_rw_modeling import (\n RWConfig,\n ... | diff --git a/server/text_generation_server/models/flash_rw.py b/server/text_generation_server/models/flash_rw.py
index 12b862d78ed..55d555fccd8 100644
--- a/server/text_generation_server/models/flash_rw.py
+++ b/server/text_generation_server/models/flash_rw.py
@@ -49,7 +49,13 @@ def __init__(
torch.distribut... |
joke2k__faker-1526 | Default to Safe Email Addresses
By default `faker.email()` will generate email addresses that are potentially valid, especially considering `@gmail.com`, `@yahoo.com` and other free providers are included in the data.
This can be problematic considering there are a few potential outcomes that can come of this that ... | [
{
"content": "from ipaddress import IPV4LENGTH, IPV6LENGTH, ip_address, ip_network\n\nfrom text_unidecode import unidecode\n\n# from faker.generator import random\n# from faker.providers.lorem.la import Provider as Lorem\nfrom faker.utils.decorators import lowercase, slugify, slugify_unicode\nfrom faker.utils.d... | [
{
"content": "from ipaddress import IPV4LENGTH, IPV6LENGTH, ip_address, ip_network\n\nfrom text_unidecode import unidecode\n\n# from faker.generator import random\n# from faker.providers.lorem.la import Provider as Lorem\nfrom faker.utils.decorators import lowercase, slugify, slugify_unicode\nfrom faker.utils.d... | diff --git a/faker/providers/internet/__init__.py b/faker/providers/internet/__init__.py
index f5ebc38b20..e1b4f921f8 100644
--- a/faker/providers/internet/__init__.py
+++ b/faker/providers/internet/__init__.py
@@ -119,9 +119,11 @@ def _to_ascii(self, string):
return string
@lowercase
- def email(sel... |
pwndbg__pwndbg-1583 | Print thread id that belong to arena
`arena` print that struct
```
struct MallocState {
int mutex;
int flags;
int have_fastchunks;
pvoid_Array_10 fastbinsY;
pvoid top;
pvoid last_remainder;
pvoid_Array_254 bins;
int_Array_4 binmap;
pvoid next;
pvoid next_free;
size_t attached_threads... | [
{
"content": "import argparse\nimport ctypes\n\nimport gdb\n\nimport pwndbg.color.context as C\nimport pwndbg.color.memory as M\nimport pwndbg.commands\nimport pwndbg.gdblib.config\nimport pwndbg.gdblib.typeinfo\nimport pwndbg.glibc\nimport pwndbg.lib.heap.helpers\nfrom pwndbg.color import generateColorFunction... | [
{
"content": "import argparse\nimport ctypes\n\nimport gdb\n\nimport pwndbg.color.context as C\nimport pwndbg.color.memory as M\nimport pwndbg.commands\nimport pwndbg.gdblib.config\nimport pwndbg.gdblib.typeinfo\nimport pwndbg.glibc\nimport pwndbg.lib.heap.helpers\nfrom pwndbg.color import generateColorFunction... | diff --git a/pwndbg/commands/heap.py b/pwndbg/commands/heap.py
index 68074aa8f41..79ef0bc083c 100644
--- a/pwndbg/commands/heap.py
+++ b/pwndbg/commands/heap.py
@@ -169,6 +169,8 @@ def arena(addr=None) -> None:
else:
arena = allocator.thread_arena
+ tid = pwndbg.gdblib.proc.thread_id
+ print(messa... |
getsentry__sentry-1109 | Module name of individual file is its full URL
When javascript files are loaded in the browser directly without concatenation and source maps, the displayed module name is the full URL of the script.
I will create a PR for this in a moment.
| [
{
"content": "\"\"\"\nsentry.tasks.fetch_source\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n\nimport itertools\nimport logging\nimport hashlib\nimport re\nimport urllib2\nimport zlib\nimport base... | [
{
"content": "\"\"\"\nsentry.tasks.fetch_source\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\n\nimport itertools\nimport logging\nimport hashlib\nimport re\nimport urllib2\nimport zlib\nimport base... | diff --git a/src/sentry/tasks/fetch_source.py b/src/sentry/tasks/fetch_source.py
index 19bf7623eeff8c..23cd0023a2ec80 100644
--- a/src/sentry/tasks/fetch_source.py
+++ b/src/sentry/tasks/fetch_source.py
@@ -273,6 +273,9 @@ def expand_javascript_source(data, **kwargs):
# TODO: we're currently running splitlines... |
mkdocs__mkdocs-1565 | "Files not present in docs directory" message shown for external links
Hi!
### STR
1. `mkvirtualenv mkdocs -p python 3.6`
2. `pip install mkdocs==1.0b1`
3. Update [an existing project's mkdocs.yml](https://github.com/mozilla-neutrino/neutrino-dev/blob/cab8e9e0f50c83fbb5ae0f6fb0e98b286beef049/mkdocs.yml) to use `n... | [
{
"content": "# coding: utf-8\n\nfrom __future__ import unicode_literals\nimport logging\n\nfrom mkdocs.structure.pages import Page\nfrom mkdocs.utils import string_types, nest_paths\n\nlog = logging.getLogger(__name__)\n\n\nclass Navigation(object):\n def __init__(self, items, pages):\n self.items = ... | [
{
"content": "# coding: utf-8\n\nfrom __future__ import unicode_literals\nimport logging\n\nfrom mkdocs.structure.pages import Page\nfrom mkdocs.utils import string_types, nest_paths\n\nlog = logging.getLogger(__name__)\n\n\nclass Navigation(object):\n def __init__(self, items, pages):\n self.items = ... | diff --git a/mkdocs/structure/nav.py b/mkdocs/structure/nav.py
index 782f51a6c0..d10f27da08 100644
--- a/mkdocs/structure/nav.py
+++ b/mkdocs/structure/nav.py
@@ -126,8 +126,7 @@ def get_navigation(files, config):
links = _get_by_type(items, Link)
if links:
# Assume all links are external.
- #... |
saleor__saleor-4919 | Add description and deprecation support to filters
`FilterInputObjectType` doesn't provide a way to document fields. We could add two fields to the meta-class: `descriptions = {field: description}` and `deprecations = {field: reason}`.
| [
{
"content": "import six\nfrom graphene import InputField, InputObjectType\nfrom graphene.types.inputobjecttype import InputObjectTypeOptions\nfrom graphene.types.utils import yank_fields_from_attrs\nfrom graphene_django.filter.utils import get_filterset_class\n\nfrom .converter import convert_form_field\n\n\nc... | [
{
"content": "import six\nfrom graphene import InputField, InputObjectType\nfrom graphene.types.inputobjecttype import InputObjectTypeOptions\nfrom graphene.types.utils import yank_fields_from_attrs\nfrom graphene_django.filter.utils import get_filterset_class\n\nfrom .converter import convert_form_field\n\n\nc... | diff --git a/saleor/graphql/core/types/filter_input.py b/saleor/graphql/core/types/filter_input.py
index b32f223e740..e340de81373 100644
--- a/saleor/graphql/core/types/filter_input.py
+++ b/saleor/graphql/core/types/filter_input.py
@@ -58,7 +58,7 @@ def get_filtering_args_from_filterset(cls):
field_ty... |
celery__celery-3218 | celery multi ignores FQNs and subscribes to incorrect queue.
The following does not work:
`celery multi start celery1@turing.lan celery2@turing.lan -A tserver.app -Q:1 celery,hq1 -Q:2 celery,high,hq1 -c 4 -l info`
Output:
```
celery multi v3.1.23 (Cipater)
> Starting nodes...
> celery1@turing.lan: OK
> celery... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\n\n.. program:: celery multi\n\nExamples\n========\n\n.. code-block:: console\n\n $ # Single worker with explicit name and events enabled.\n $ celery multi start Leslie -E\n\n $ # Pidfiles and logfiles are stored in the current directory\n $ # by default... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\n\n.. program:: celery multi\n\nExamples\n========\n\n.. code-block:: console\n\n $ # Single worker with explicit name and events enabled.\n $ celery multi start Leslie -E\n\n $ # Pidfiles and logfiles are stored in the current directory\n $ # by default... | diff --git a/celery/bin/multi.py b/celery/bin/multi.py
index 39919c42a38..f0c1c457766 100644
--- a/celery/bin/multi.py
+++ b/celery/bin/multi.py
@@ -458,9 +458,14 @@ def _args_for_node(p, name, prefix, suffix, cmd, append, options):
name, nodename, expand = _get_nodename(
name, prefix, suffix, options)
... |
great-expectations__great_expectations-1489 | Use cleaner solution for non-truncating division in python 2
Prefer `from __future__ import division` to `1.*x/y`
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# great_expectations documentation build configuration file, created by\n# sphinx-quickstart on Thu Jun 8 23:00:19 2017.\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 pr... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# great_expectations documentation build configuration file, created by\n# sphinx-quickstart on Thu Jun 8 23:00:19 2017.\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 pr... | diff --git a/docs/_static/style.css b/docs/_static/style.css
index 15f97f8f499d..ee5e7b4c15f2 100644
--- a/docs/_static/style.css
+++ b/docs/_static/style.css
@@ -61,6 +61,11 @@ a {
}
}
+.wy-side-nav-search > a,
+.wy-side-nav-search .wy-dropdown > a {
+ display: none;
+}
+
.wy-nav-content {
width: auto !impo... |
sopel-irc__sopel-1827 | reddit: URL-encoded characters don't match in links
In the "post" pattern, for example, `\w` won't match the `%` in a URL-encoded character:
https://github.com/sopel-irc/sopel/blob/7cdefb91597cd7f995bd59eac3c7bbcc52da1964/sopel/modules/reddit.py#L42
Of course, anywhere a post's "slugified" title (not sure what else... | [
{
"content": "# coding=utf-8\n\"\"\"\nreddit.py - Sopel Reddit Module\nCopyright 2012, Elsie Powell, embolalia.com\nCopyright 2019, dgw, technobabbl.es\nCopyright 2019, deathbybandaid, deathbybandaid.net\nLicensed under the Eiffel Forum License 2.\n\nhttps://sopel.chat\n\"\"\"\nfrom __future__ import unicode_li... | [
{
"content": "# coding=utf-8\n\"\"\"\nreddit.py - Sopel Reddit Module\nCopyright 2012, Elsie Powell, embolalia.com\nCopyright 2019, dgw, technobabbl.es\nCopyright 2019, deathbybandaid, deathbybandaid.net\nLicensed under the Eiffel Forum License 2.\n\nhttps://sopel.chat\n\"\"\"\nfrom __future__ import unicode_li... | diff --git a/sopel/modules/reddit.py b/sopel/modules/reddit.py
index d6c1697204..87998b5d1e 100644
--- a/sopel/modules/reddit.py
+++ b/sopel/modules/reddit.py
@@ -39,7 +39,7 @@
domain = r'https?://(?:www\.|old\.|pay\.|ssl\.|[a-z]{2}\.)?reddit\.com'
subreddit_url = r'%s/r/([\w-]+)/?$' % domain
-post_url = r'%s/r/\S+... |
crytic__slither-1530 | "not in UPPER_CASE_WITH_UNDERSCORES" should not apply to public/external constants
### Describe the issue:
`public`/`external` fields of a contract are exported as functions, so they are part of a public API, and Slither should not report the warning `not in UPPER_CASE_WITH_UNDERSCORES` if these fields are in lowerc... | [
{
"content": "import re\nfrom slither.detectors.abstract_detector import AbstractDetector, DetectorClassification\nfrom slither.formatters.naming_convention.naming_convention import custom_format\n\n\nclass NamingConvention(AbstractDetector):\n \"\"\"\n Check if naming conventions are followed\n https:... | [
{
"content": "import re\nfrom slither.detectors.abstract_detector import AbstractDetector, DetectorClassification\nfrom slither.formatters.naming_convention.naming_convention import custom_format\n\n\nclass NamingConvention(AbstractDetector):\n \"\"\"\n Check if naming conventions are followed\n https:... | diff --git a/slither/detectors/naming_convention/naming_convention.py b/slither/detectors/naming_convention/naming_convention.py
index 5e81f003c4..94fd2e8f91 100644
--- a/slither/detectors/naming_convention/naming_convention.py
+++ b/slither/detectors/naming_convention/naming_convention.py
@@ -139,7 +139,8 @@ def _dete... |
cloud-custodian__cloud-custodian-2258 | Azure VM - We are not getting power state
The VM data we are getting back does not tell you if the VM is running or not.
I think perhaps you have to tell the `list_all` api what you want - we want `instanceview`
https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/instanceview
Not sure how this ha... | [
{
"content": "# Copyright 2018 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b... | [
{
"content": "# Copyright 2018 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b... | diff --git a/docs/source/azure/usecases/stoppedvm.rst b/docs/source/azure/usecases/stoppedvm.rst
new file mode 100644
index 00000000000..c987e400e6c
--- /dev/null
+++ b/docs/source/azure/usecases/stoppedvm.rst
@@ -0,0 +1,15 @@
+Find Stopped Virtual Machines
+=============================
+
+.. code-block:: yaml
+
+ ... |
systemd__mkosi-1906 | Is it possible to create system extensions based on Arch Linux
I have followed the documentation to the best of my abilities, however it seems not to be possible. When using `BaseTrees=…` and `Overlay=true`, pacman fails because it cannot lock its database. This is the reported error message:
```
‣ Building extensi... | [
{
"content": "# SPDX-License-Identifier: LGPL-2.1+\n\nfrom pathlib import Path\n\nfrom mkosi.config import MkosiArgs, MkosiConfig\nfrom mkosi.tree import make_tree\nfrom mkosi.util import umask\n\n\nclass MkosiState:\n \"\"\"State related properties.\"\"\"\n\n def __init__(self, args: MkosiArgs, config: M... | [
{
"content": "# SPDX-License-Identifier: LGPL-2.1+\n\nfrom pathlib import Path\n\nfrom mkosi.config import MkosiArgs, MkosiConfig\nfrom mkosi.tree import make_tree\nfrom mkosi.util import umask\n\n\nclass MkosiState:\n \"\"\"State related properties.\"\"\"\n\n def __init__(self, args: MkosiArgs, config: M... | diff --git a/mkosi/state.py b/mkosi/state.py
index 19b489632..3b3b6d200 100644
--- a/mkosi/state.py
+++ b/mkosi/state.py
@@ -16,7 +16,13 @@ def __init__(self, args: MkosiArgs, config: MkosiConfig, workspace: Path) -> Non
self.workspace = workspace
with umask(~0o755):
- make_tree(self.conf... |
deis__deis-1003 | fix(client): return HTTP 204 response for no logs
Referring to the OP in #989:
The 404 here is misleading. We found the endpoint, but no logs were found. We should be returning `HTTP 204 NO CONTENT`, not `HTTP 404 NOT FOUND`.
fix(client): return HTTP 204 response for no logs
Referring to the OP in #989:
The 404 here... | [
{
"content": "\"\"\"\nRESTful view classes for presenting Deis API objects.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\nimport json\n\nfrom django.contrib.auth.models import AnonymousUser\nfrom django.contrib.auth.models import User\nfrom django.utils import timez... | [
{
"content": "\"\"\"\nRESTful view classes for presenting Deis API objects.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\nimport json\n\nfrom django.contrib.auth.models import AnonymousUser\nfrom django.contrib.auth.models import User\nfrom django.utils import timez... | diff --git a/controller/api/tests/test_app.py b/controller/api/tests/test_app.py
index 1a79624a5d..8e150f3668 100644
--- a/controller/api/tests/test_app.py
+++ b/controller/api/tests/test_app.py
@@ -79,7 +79,7 @@ def test_app_actions(self):
os.remove(path)
url = '/api/apps/{app_id}/logs'.format(**... |
ytdl-org__youtube-dl-14997 | [https://www.franceinter.fr] WARNING: unable to extract upload date
---
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.12.14*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and upda... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nfrom .common import InfoExtractor\nfrom ..utils import month_by_name\n\n\nclass FranceInterIE(InfoExtractor):\n _VALID_URL = r'https?://(?:www\\.)?franceinter\\.fr/emissions/(?P<id>[^?#]+)'\n\n _TEST = {\n 'url': 'https://www... | [
{
"content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nfrom .common import InfoExtractor\nfrom ..utils import month_by_name\n\n\nclass FranceInterIE(InfoExtractor):\n _VALID_URL = r'https?://(?:www\\.)?franceinter\\.fr/emissions/(?P<id>[^?#]+)'\n\n _TEST = {\n 'url': 'https://www... | diff --git a/youtube_dl/extractor/franceinter.py b/youtube_dl/extractor/franceinter.py
index 707b9e00db0..05806895c0a 100644
--- a/youtube_dl/extractor/franceinter.py
+++ b/youtube_dl/extractor/franceinter.py
@@ -33,7 +33,7 @@ def _real_extract(self, url):
description = self._og_search_description(webpage)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.