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 ⌀ |
|---|---|---|---|---|
Lightning-AI__torchmetrics-1655 | FID.compute() throws imprecise error with batch size of 1
## 🐛 Bug
<!-- A clear and concise description of what the bug is. -->
Running FID with a batch size of 1 throws error: ValueError: array must not contain infs or NaNs
### To Reproduce
To reproduce, run the code below. Distribution with size ([1, 3, 29... | [
{
"content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | [
{
"content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index fa6511d42ae..ba546fa4282 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -96,6 +96,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Changed `__iter__` method from raising `NotImplementedError` to `TypeError` by setting to `None` ([#1... |
ourownstory__neural_prophet-1096 | [bug] test_plot_conformal_prediction fails with auto-regression enabled on plot_latest_forecast
Here is the code snippet from `test_plot_conformal_prediction` in the test_plotting.py file:
```
# With auto-regression enabled
# TO-DO: Fix Assertion error n_train >= 1
m = NeuralProphet(
n_foreca... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport math\nimport os\nimport sys\nfrom collections import OrderedDict\nfrom typing import TYPE_CHECKING, Optional\n\nimport holidays as pyholidays\nimport numpy as np\nimport pandas as pd\nimport pytorch_lightning as pl\nimport torch\n\nfrom ... | [
{
"content": "from __future__ import annotations\n\nimport logging\nimport math\nimport os\nimport sys\nfrom collections import OrderedDict\nfrom typing import TYPE_CHECKING, Optional\n\nimport holidays as pyholidays\nimport numpy as np\nimport pandas as pd\nimport pytorch_lightning as pl\nimport torch\n\nfrom ... | diff --git a/neuralprophet/utils.py b/neuralprophet/utils.py
index 7b106d48c..912768c49 100644
--- a/neuralprophet/utils.py
+++ b/neuralprophet/utils.py
@@ -586,7 +586,9 @@ def fcst_df_to_latest_forecast(fcst, quantiles, n_last=1):
df = pd.concat((fcst[cols],), axis=1)
df.reset_index(drop=True, inplace=True)
... |
mathesar-foundation__mathesar-284 | API tests using wrong tables database
**Describe the bug**
The django API tests are running on the `test_mathesar_db_test_database`, which differs from the `mathesar_db_test_database` tables database we should be using. As a result, we don't have a proper reference to the database being used by the API functions, whic... | [
{
"content": "\"\"\"\nDjango settings for config project.\n\nGenerated by 'django-admin startproject' using Django 3.1.7.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/3.1/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/3.... | [
{
"content": "\"\"\"\nDjango settings for config project.\n\nGenerated by 'django-admin startproject' using Django 3.1.7.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/3.1/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/3.... | diff --git a/config/settings.py b/config/settings.py
index 5b383fc6f6..6d52367486 100644
--- a/config/settings.py
+++ b/config/settings.py
@@ -74,6 +74,13 @@
decouple_config('MATHESAR_DATABASE_KEY'): decouple_config('MATHESAR_DATABASE_URL', cast=db_url)
}
+# pytest-django will create a new database named 'test_... |
bridgecrewio__checkov-619 | Azure NSG Security rule loop error
I got the following error when I execute to scan Azure NSG terraform file.
_ERROR:checkov.terraform.checks.resource.azure.NSGRuleSSHAccessRestricted:Failed to run check: Ensure that SSH access is restricted from the internet for configuration: {'name': ['${var.nsg_name}'], 'resourc... | [
{
"content": "from checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceCheck\nfrom checkov.common.util.type_forcers import force_list\nimport re\n\nINTERNET_ADDRESSES = [\"*\", \"0.0.0.0\", \"<nw>/0\", \"/0\", \"int... | [
{
"content": "from checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceCheck\nfrom checkov.common.util.type_forcers import force_list\nimport re\n\nINTERNET_ADDRESSES = [\"*\", \"0.0.0.0\", \"<nw>/0\", \"/0\", \"int... | diff --git a/checkov/terraform/checks/resource/azure/NSGRulePortAccessRestricted.py b/checkov/terraform/checks/resource/azure/NSGRulePortAccessRestricted.py
index 2aa3ceb7a6..c05cd0ffff 100644
--- a/checkov/terraform/checks/resource/azure/NSGRulePortAccessRestricted.py
+++ b/checkov/terraform/checks/resource/azure/NSGR... |
ivy-llc__ivy-28594 | Fix Frontend Failing Test: tensorflow - operators.jax.lax.real
| [
{
"content": "# global\nimport math\nfrom typing import Optional, Union\n\nimport paddle\n\nimport ivy\nimport ivy.functional.backends.paddle as paddle_backend\nfrom ivy import promote_types_of_inputs\nfrom ivy.func_wrapper import (\n with_supported_device_and_dtypes,\n with_supported_dtypes,\n with_un... | [
{
"content": "# global\nimport math\nfrom typing import Optional, Union\n\nimport paddle\n\nimport ivy\nimport ivy.functional.backends.paddle as paddle_backend\nfrom ivy import promote_types_of_inputs\nfrom ivy.func_wrapper import (\n with_supported_device_and_dtypes,\n with_supported_dtypes,\n with_un... | diff --git a/ivy/functional/backends/paddle/elementwise.py b/ivy/functional/backends/paddle/elementwise.py
index d066112f63143..92d812e15450d 100644
--- a/ivy/functional/backends/paddle/elementwise.py
+++ b/ivy/functional/backends/paddle/elementwise.py
@@ -886,22 +886,8 @@ def logaddexp2(
return ivy.log2(ivy.e... |
openstates__openstates-scrapers-2240 | LA failing since at least 2018-04-05
LA has been failing since 2018-04-05
Based on automated runs it appears that LA has not run successfully in 2 days (2018-04-05).
```
01:05:05 INFO scrapelib: GET - http://house.louisiana.gov/H_Reps/members.aspx?ID=49
01:05:07 INFO pupa: save person Blake Miguez as person_74dd4a... | [
{
"content": "import re\n\nfrom pupa.scrape import Person, Scraper\nfrom openstates.utils import LXMLMixin\n\n\nclass LAPersonScraper(Scraper, LXMLMixin):\n def scrape(self, chamber=None):\n chambers = [chamber] if chamber is not None else ['upper', 'lower']\n for chamber in chambers:\n ... | [
{
"content": "import re\n\nfrom pupa.scrape import Person, Scraper\nfrom openstates.utils import LXMLMixin\n\n\nclass LAPersonScraper(Scraper, LXMLMixin):\n def scrape(self, chamber=None):\n chambers = [chamber] if chamber is not None else ['upper', 'lower']\n for chamber in chambers:\n ... | diff --git a/openstates/la/people.py b/openstates/la/people.py
index ac1be4adf1..b1c16bb99a 100644
--- a/openstates/la/people.py
+++ b/openstates/la/people.py
@@ -117,10 +117,12 @@ def scrape_lower_legislator(self, url, leg_info):
'//span[@id="body_FormView5_PARTYAFFILIATIONLabel"]/text()'
)[0... |
Lightning-AI__pytorch-lightning-1576 | Batch being moved to gpu repeatedly with multiple optimizers and single gpu training
If you have multiple optimizers, then transfer_batch_to_gpu winds up getting called once per opt_idx, and the batch is copied each time via copy.copy(batch) in training_forward. Why copy the batch when there is only a single gpu? By re... | [
{
"content": "\"\"\"\nThe lightning training loop handles everything except the actual computations of your model.\n To decide what will happen in your training loop, define the `training_step` function.\n\nBelow are all the things lightning automates for you in the training loop.\n\nAccumulated gradients\n----... | [
{
"content": "\"\"\"\nThe lightning training loop handles everything except the actual computations of your model.\n To decide what will happen in your training loop, define the `training_step` function.\n\nBelow are all the things lightning automates for you in the training loop.\n\nAccumulated gradients\n----... | diff --git a/pytorch_lightning/trainer/training_loop.py b/pytorch_lightning/trainer/training_loop.py
index 5b3d13c72b5f1..c5fb1b9717869 100644
--- a/pytorch_lightning/trainer/training_loop.py
+++ b/pytorch_lightning/trainer/training_loop.py
@@ -754,7 +754,11 @@ def training_forward(self, batch, batch_idx, opt_idx, hidd... |
jazzband__pip-tools-1989 | Options in pyproject.toml break usage of `pip-sync`
I found it handy to add some often used options to the `[tools.pip-tools]`-section of my `pyproject.toml`. In particular I added:
```
[tool.pip-tools]
strip-extras = true
no-emit-index-url = true
no-emit-trusted-host = true
```
But now, calling `pip-sync requir... | [
{
"content": "from __future__ import annotations\n\nimport collections\nimport copy\nimport difflib\nimport itertools\nimport json\nimport os\nimport re\nimport shlex\nimport sys\nfrom pathlib import Path\nfrom typing import Any, Callable, Iterable, Iterator, TypeVar, cast\n\nfrom click.core import ParameterSou... | [
{
"content": "from __future__ import annotations\n\nimport collections\nimport copy\nimport difflib\nimport itertools\nimport json\nimport os\nimport re\nimport shlex\nimport sys\nfrom pathlib import Path\nfrom typing import Any, Callable, Iterable, Iterator, TypeVar, cast\n\nfrom click.core import ParameterSou... | diff --git a/piptools/utils.py b/piptools/utils.py
index 62cb26a0b..de4399be4 100644
--- a/piptools/utils.py
+++ b/piptools/utils.py
@@ -702,7 +702,13 @@ def _invert_negative_bool_options_in_config(
# Transform config key to its equivalent in the CLI
long_option = _convert_to_long_option(key)
... |
spack__spack-22396 | spack activate fails if package is already active with a conflict error
Example (this is not unique to `py-sphinx`):
`bin/spack -d activate -f py-sphinx` fails if `py-sphinx` is already activated.
Similarity, if I try to activate any package that depends on `py-sphinx`, it will fail.
To get to the root caus... | [
{
"content": "# Copyright 2013-2021 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\nimport shutil\nimport glob\nimport tempfile\nimport errno\nfrom contextlib import co... | [
{
"content": "# Copyright 2013-2021 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\nimport shutil\nimport glob\nimport tempfile\nimport errno\nfrom contextlib import co... | diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py
index 9cf148a33fd966..41db24bd2c49b3 100644
--- a/lib/spack/spack/directory_layout.py
+++ b/lib/spack/spack/directory_layout.py
@@ -429,8 +429,8 @@ def add_extension(self, spec, ext_spec):
def check_extension_conflict(self, spec... |
django-cms__django-cms-1125 | Language chooser cannot switch language for untranslated page
Language chooser uses page_language_url from menus.templatetags. The final except solution for this template tag is to provide no URL if no translation could be found. For untranslated django-cms pages, this blocks a visitor from switching his language. I wo... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom classytags.arguments import IntegerArgument, Argument, StringArgument\nfrom classytags.core import Options\nfrom classytags.helpers import InclusionTag\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.sites.models import Site\nfrom d... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom classytags.arguments import IntegerArgument, Argument, StringArgument\nfrom classytags.core import Options\nfrom classytags.helpers import InclusionTag\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.sites.models import Site\nfrom d... | diff --git a/menus/templatetags/menu_tags.py b/menus/templatetags/menu_tags.py
index 952a668dcfb..9bff0ea8d4f 100644
--- a/menus/templatetags/menu_tags.py
+++ b/menus/templatetags/menu_tags.py
@@ -371,7 +371,13 @@ def get_context(self, context, lang):
url = page.get_absolute_url(language=lang, fallback... |
scrapy__scrapy-2065 | IOError, 'Not a gzipped file'
while trying to access sitemap from robots.txt , Scrapy fails with **IOError, 'Not a gzipped file'** error
not sure if this issue is related to following issue(s)
https://github.com/scrapy/scrapy/issues/193 -> closed issue
https://github.com/scrapy/scrapy/pull/660 -> merged pull request t... | [
{
"content": "import struct\n\ntry:\n from cStringIO import StringIO as BytesIO\nexcept ImportError:\n from io import BytesIO\nfrom gzip import GzipFile\n\nimport six\nimport re\n\n# - Python>=3.5 GzipFile's read() has issues returning leftover\n# uncompressed data when input is corrupted\n# (regressi... | [
{
"content": "import struct\n\ntry:\n from cStringIO import StringIO as BytesIO\nexcept ImportError:\n from io import BytesIO\nfrom gzip import GzipFile\n\nimport six\nimport re\n\n# - Python>=3.5 GzipFile's read() has issues returning leftover\n# uncompressed data when input is corrupted\n# (regressi... | diff --git a/scrapy/utils/gz.py b/scrapy/utils/gz.py
index cfb6521434e..afc7ed12853 100644
--- a/scrapy/utils/gz.py
+++ b/scrapy/utils/gz.py
@@ -50,9 +50,12 @@ def gunzip(data):
raise
return output
-_is_gzipped_re = re.compile(br'^application/(x-)?gzip\b', re.I)
+_is_gzipped = re.compile(br'^app... |
huggingface__text-generation-inference-795 | ImportError: CUDA is not available
### System Info
```
Mon Jul 3 13:44:40 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.39.01 Driver Version: 510.39.01 CUDA Version: 11.6 |
|-------------------------------+----------------------+------------... | [
{
"content": "import os\nimport sys\nimport typer\n\nfrom pathlib import Path\nfrom loguru import logger\nfrom typing import Optional\nfrom enum import Enum\nfrom huggingface_hub import hf_hub_download\n\n\napp = typer.Typer()\n\n\nclass Quantization(str, Enum):\n bitsandbytes = \"bitsandbytes\"\n bitsand... | [
{
"content": "import os\nimport sys\nimport typer\n\nfrom pathlib import Path\nfrom loguru import logger\nfrom typing import Optional\nfrom enum import Enum\nfrom huggingface_hub import hf_hub_download\n\n\napp = typer.Typer()\n\n\nclass Quantization(str, Enum):\n bitsandbytes = \"bitsandbytes\"\n bitsand... | diff --git a/README.md b/README.md
index 0ba496753e5..d937e16c971 100644
--- a/README.md
+++ b/README.md
@@ -280,3 +280,4 @@ make integration-tests
TGI is also supported on the following AI hardware accelerators:
- *Habana first-gen Gaudi and Gaudi2:* checkout [here](https://github.com/huggingface/optimum-habana/tr... |
pyca__cryptography-8403 | ignore FRP256v1 in wycheproof tests
| [
{
"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\nimport typing\n\nfrom cryptography.hazmat.primitives import hashes\nfrom cryptography.hazmat.primitives.asymmetri... | [
{
"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\nimport typing\n\nfrom cryptography.hazmat.primitives import hashes\nfrom cryptography.hazmat.primitives.asymmetri... | diff --git a/docs/development/test-vectors.rst b/docs/development/test-vectors.rst
index b8a703f90786..72fdf7fabac1 100644
--- a/docs/development/test-vectors.rst
+++ b/docs/development/test-vectors.rst
@@ -22,7 +22,7 @@ for various cryptographic algorithms. These are not included in the repository
continuous integrat... |
mitmproxy__mitmproxy-3735 | Cannot parse client hello
Hi! I’m trying to capture the traffic in android10 machines with no rooting.
So I added the mitmproxy certificate as the user certificate.
It pretty works well in the Chrome browser but in https://play.google.com/store/apps/details?id=com.nhn.android.search&hl=ko this browser I got crash
w... | [
{
"content": "from typing import Optional # noqa\nfrom typing import Union\n\nfrom mitmproxy import exceptions\nfrom mitmproxy.net import tls as net_tls\nfrom mitmproxy.proxy.protocol import base\n\n# taken from https://testssl.sh/openssl-rfc.mapping.html\nCIPHER_ID_NAME_MAP = {\n 0x00: 'NULL-MD5',\n 0x0... | [
{
"content": "from typing import Optional # noqa\nfrom typing import Union\n\nfrom mitmproxy import exceptions\nfrom mitmproxy.net import tls as net_tls\nfrom mitmproxy.proxy.protocol import base\n\n# taken from https://testssl.sh/openssl-rfc.mapping.html\nCIPHER_ID_NAME_MAP = {\n 0x00: 'NULL-MD5',\n 0x0... | diff --git a/mitmproxy/proxy/protocol/tls.py b/mitmproxy/proxy/protocol/tls.py
index 282df60d35..f48cb94756 100644
--- a/mitmproxy/proxy/protocol/tls.py
+++ b/mitmproxy/proxy/protocol/tls.py
@@ -242,6 +242,8 @@ def __call__(self):
self._client_hello = net_tls.ClientHello.from_file(self.client_conn.rfil... |
joke2k__faker-297 | Sex-specific names and Sex attribute don't match
While person distinguisheds between name_male() and name_female(), and profile generates a random ['sex'] attribute, these do not correlate at present. So in 50% of cases (ignoring neutral names like Chris) this results in F with male names and M with female names.
| [
{
"content": "# coding=utf-8\n\nfrom .. import BaseProvider\nimport itertools\n\n\nclass Provider(BaseProvider):\n \"\"\"\n This provider is a collection of functions to generate personal profiles and identities.\n\n \"\"\"\n\n def simple_profile(self):\n \"\"\"\n Generates a basic pro... | [
{
"content": "# coding=utf-8\n\nfrom .. import BaseProvider\nimport itertools\n\n\nclass Provider(BaseProvider):\n \"\"\"\n This provider is a collection of functions to generate personal profiles and identities.\n\n \"\"\"\n\n def simple_profile(self):\n \"\"\"\n Generates a basic pro... | diff --git a/faker/providers/profile/__init__.py b/faker/providers/profile/__init__.py
index 250f959d89..238c956574 100644
--- a/faker/providers/profile/__init__.py
+++ b/faker/providers/profile/__init__.py
@@ -15,10 +15,15 @@ def simple_profile(self):
Generates a basic profile with personal informations
... |
qutip__qutip-1400 | Bloch3d add_points failing
**Describe the bug**
The add_points method of BLoch3d seems to broken. There is an easy fix in the merge request #1400
**To Reproduce**
Minimal working instance
```python
from qutip import Bloch3d
import numpy as np
# This works
points = np.array([[0,0,1.0],[1.0,0,0],[0,1,0]])
b... | [
{
"content": "# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the followi... | [
{
"content": "# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the followi... | diff --git a/qutip/bloch3d.py b/qutip/bloch3d.py
index 88c16214e6..efa1f37d08 100644
--- a/qutip/bloch3d.py
+++ b/qutip/bloch3d.py
@@ -374,8 +374,8 @@ def plot_points(self):
self.points[k][2][j] ** 2) for j in range(num)]
if any(abs(dist - dist[0]) / dist[0] > 1e-12):
... |
apache__airflow-34928 | EcsRunTaskOperator -`date value out of range` on deferrable execution - default waiter_max_attempts
### Apache Airflow version
2.7.1
### What happened
Trying to test **EcsRunTaskOperator** in deferrable mode resulted in an unexpected error at the `_start_task()` step of the Operator's `execute` method. The return e... | [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | diff --git a/airflow/providers/amazon/aws/operators/ecs.py b/airflow/providers/amazon/aws/operators/ecs.py
index ad500db40a30b..7d5d1d0583bfe 100644
--- a/airflow/providers/amazon/aws/operators/ecs.py
+++ b/airflow/providers/amazon/aws/operators/ecs.py
@@ -475,8 +475,8 @@ def __init__(
number_logs_exception: i... |
elastic__ecs-2248 | Generator does not add "ignore_above" property for field type: flattened
<!--
GitHub is reserved for bug reports and feature requests; it is not the place
for general questions. If you have a general question, please visit the
discuss forums: https://discuss.elastic.co/tag/ecs-elastic-common-schema.
Please fill i... | [
{
"content": "# Licensed to Elasticsearch B.V. under one or more contributor\n# license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright\n# ownership. Elasticsearch B.V. licenses this file to you under\n# the Apache License, Version 2.0 (the \"License\... | [
{
"content": "# Licensed to Elasticsearch B.V. under one or more contributor\n# license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright\n# ownership. Elasticsearch B.V. licenses this file to you under\n# the Apache License, Version 2.0 (the \"License\... | diff --git a/CHANGELOG.next.md b/CHANGELOG.next.md
index 81824e7f03..20cb1a94a6 100644
--- a/CHANGELOG.next.md
+++ b/CHANGELOG.next.md
@@ -18,6 +18,7 @@ Thanks, you're awesome :-) -->
* Added `container.security_context.privileged` to indicated whether a container was started in privileged mode. #2219, #2225
#### I... |
yt-project__yt-4297 | NaNs generated in grid edges for 1D FLASH data
### Bug report
After loading 1D FLASH data index.grid_left_edge and index.grid_right edge contain NaN values for the z axis, which are not present in the HDF5 file. This appears to then lead to errors when trying to generate data arrays.
Link to data:
http://use.yt/... | [
{
"content": "import os\nimport weakref\nfrom typing import Type\n\nimport numpy as np\n\nfrom yt.data_objects.index_subobjects.grid_patch import AMRGridPatch\nfrom yt.data_objects.static_output import Dataset, ParticleFile, validate_index_order\nfrom yt.funcs import mylog, setdefaultattr\nfrom yt.geometry.geom... | [
{
"content": "import os\nimport weakref\nfrom typing import Type\n\nimport numpy as np\n\nfrom yt.data_objects.index_subobjects.grid_patch import AMRGridPatch\nfrom yt.data_objects.static_output import Dataset, ParticleFile, validate_index_order\nfrom yt.funcs import mylog, setdefaultattr\nfrom yt.geometry.geom... | diff --git a/yt/frontends/flash/data_structures.py b/yt/frontends/flash/data_structures.py
index 2362610a66d..7685083dd86 100644
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -400,7 +400,7 @@ def _parse_parameter_file(self):
dle = np.array([self.parameters[f"{ax}min... |
mozilla__kitsune-3360 | Revert to using square/alternate product icons where appropriate
The newly added square/alternate product icons are a better fit than the rectangle icons in many places across the new design.
| [
{
"content": "import datetime\nimport json as jsonlib\nimport logging\nimport os\nimport re\nimport urlparse\n\nfrom django.conf import settings\nfrom django.contrib.staticfiles.templatetags.staticfiles import static as django_static\nfrom django.core.urlresolvers import reverse as django_reverse\nfrom django.h... | [
{
"content": "import datetime\nimport json as jsonlib\nimport logging\nimport os\nimport re\nimport urlparse\n\nfrom django.conf import settings\nfrom django.contrib.staticfiles.templatetags.staticfiles import static as django_static\nfrom django.core.urlresolvers import reverse as django_reverse\nfrom django.h... | diff --git a/kitsune/questions/jinja2/questions/product_list.html b/kitsune/questions/jinja2/questions/product_list.html
index 48a36d5d512..269014c2610 100644
--- a/kitsune/questions/jinja2/questions/product_list.html
+++ b/kitsune/questions/jinja2/questions/product_list.html
@@ -16,7 +16,7 @@ <h1>{{ title }}</h1>
... |
conda__conda-8272 | condarc file precedence not respected when merging
In my system `.condarc` I have `defaults` and `conda-forge` and in my user `.condarc` I have my own `dhirschfeld` channel:

My understanding ([from this bl... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2012 Anaconda, Inc\n# SPDX-License-Identifier: BSD-3-Clause\n\"\"\"\nThis file should hold most string literals and magic numbers used throughout the code base.\nThe exception is if a literal is specifically meant to be private to and isolated within a modu... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2012 Anaconda, Inc\n# SPDX-License-Identifier: BSD-3-Clause\n\"\"\"\nThis file should hold most string literals and magic numbers used throughout the code base.\nThe exception is if a literal is specifically meant to be private to and isolated within a modu... | diff --git a/conda/base/constants.py b/conda/base/constants.py
index 177355bff82..eeebc2fe16f 100644
--- a/conda/base/constants.py
+++ b/conda/base/constants.py
@@ -24,13 +24,23 @@
APP_NAME = 'conda'
-SEARCH_PATH = (
- '/etc/conda/.condarc',
- '/etc/conda/condarc',
- '/etc/conda/condarc.d/',
- '/var/li... |
xonsh__xonsh-3138 | Garbage collection command fails because of msising `gc_units_to_rmfiles`
Here is my shell session:
```
┌─18-12:44[confus@confusion6 ~]
└$ xonfig info
+------------------+----------------------+
| ... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Implements JSON version of xonsh history backend.\"\"\"\nimport os\nimport sys\nimport time\nimport json\nimport builtins\nimport collections\nimport threading\nimport collections.abc as cabc\n\nfrom xonsh.history.base import History\nimport xonsh.tools as xt\nimport... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Implements JSON version of xonsh history backend.\"\"\"\nimport os\nimport sys\nimport time\nimport json\nimport builtins\nimport collections\nimport threading\nimport collections.abc as cabc\n\nfrom xonsh.history.base import History\nimport xonsh.tools as xt\nimport... | diff --git a/news/hist-gc.rst b/news/hist-gc.rst
new file mode 100644
index 0000000000..6141cc4673
--- /dev/null
+++ b/news/hist-gc.rst
@@ -0,0 +1,23 @@
+**Added:**
+
+* <news item>
+
+**Changed:**
+
+* <news item>
+
+**Deprecated:**
+
+* <news item>
+
+**Removed:**
+
+* <news item>
+
+**Fixed:**
+
+* Fixed issue with ... |
GPflow__GPflow-100 | compute_log_likelihood for SVGP class results in unitialized variable error.
The following code gives an error.
```
import numpy as np
import GPflow
rng = np.random.RandomState(1)
X = rng.randn( 10, 1)
Y = rng.randn( 10, 1 )
Z = rng.randn( 3,1 )
model = GPflow.svgp.SVGP( X=X, Y=Y, kern=GPflow.kernels.RBF(1) ,likeli... | [
{
"content": "import numpy as np\nimport tensorflow as tf\nfrom . import transforms\nfrom contextlib import contextmanager\nfrom functools import wraps\n\n# when one of these attributes is set, notify a recompilation\nrecompile_keys = ['prior', 'transform', 'fixed']\n\n\nclass Parentable(object):\n \"\"\"\n ... | [
{
"content": "import numpy as np\nimport tensorflow as tf\nfrom . import transforms\nfrom contextlib import contextmanager\nfrom functools import wraps\n\n# when one of these attributes is set, notify a recompilation\nrecompile_keys = ['prior', 'transform', 'fixed']\n\n\nclass Parentable(object):\n \"\"\"\n ... | diff --git a/GPflow/param.py b/GPflow/param.py
index 3d08a9508..2ddac206e 100644
--- a/GPflow/param.py
+++ b/GPflow/param.py
@@ -297,6 +297,7 @@ def runnable(instance, *np_args):
with instance.tf_mode():
storage['tf_result'] = tf_method(instance, *storage['tf_args'])
... |
Flexget__Flexget-2479 | Series' from_group filter merging instead of overwriting values
<!---
Before opening an issue, verify:
- Is this a feature request? Post it on https://feathub.com/Flexget/Flexget
- Did you recently upgrade? Look at the Change Log and Upgrade Actions to make sure that you don't need to make any changes to your conf... | [
{
"content": "\"\"\"Contains miscellaneous helpers\"\"\"\nfrom __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # noqa pylint: disable=unused-import, redefined-builtin\nfrom future.moves.urllib import request\nfrom future.utils import PY2\n\nimport logging\nimport ast\nimpo... | [
{
"content": "\"\"\"Contains miscellaneous helpers\"\"\"\nfrom __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # noqa pylint: disable=unused-import, redefined-builtin\nfrom future.moves.urllib import request\nfrom future.utils import PY2\n\nimport logging\nimport ast\nimpo... | diff --git a/flexget/tests/test_series.py b/flexget/tests/test_series.py
index 4730ba62ac..b5e5204fda 100644
--- a/flexget/tests/test_series.py
+++ b/flexget/tests/test_series.py
@@ -1548,6 +1548,19 @@ class TestFromGroup(object):
- {title: 'Test :: h264 10-bit | Softsubs (Ignore) | Episode 3'}
... |
freedomofpress__securedrop-1723 | Fix hard-coded local IPv4 addresses in staging tests
During merge of #1709, there was a regression in the testinfra tests, so the hardcoded IPv4 addresses used in Vagrant VMs were overwritten with ephemeral IPv4 addresses for CI. Specifically the commt in question is 48db3f57528e69a3e7cbe2e337cec114192d54ef.
We'll n... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# (c) 2012-2013, Timothy Appnel <tim@appnel.com>\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# (c) 2012-2013, Timothy Appnel <tim@appnel.com>\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your... | diff --git a/install_files/ansible-base/action_plugins/synchronize.py b/install_files/ansible-base/action_plugins/synchronize.py
index dc07af895e..7e5e926d56 100644
--- a/install_files/ansible-base/action_plugins/synchronize.py
+++ b/install_files/ansible-base/action_plugins/synchronize.py
@@ -364,7 +364,7 @@ def run(s... |
psychopy__psychopy-4718 | visual.ShapeStim ctypes.ArgumentError
I got this error when I set the autoDraw to True for a visual.shapeStim stimulus:
File "C:\Computer Science\Educ 464\Experiments\hollow_dots\hollow_dots_lastrun.py", line 446, in <module>
win.flip()
File "C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\wind... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"Create geometric (vector) shapes by defining vertex locations.\"\"\"\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 L... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"Create geometric (vector) shapes by defining vertex locations.\"\"\"\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 L... | diff --git a/psychopy/visual/shape.py b/psychopy/visual/shape.py
index 7d624d77e7..bd13b608e6 100755
--- a/psychopy/visual/shape.py
+++ b/psychopy/visual/shape.py
@@ -193,7 +193,11 @@ def lineWidth(self, value):
:ref:`Operations <attrib-operations>` supported.
"""
- if isinstance(self, psycho... |
pyodide__pyodide-4568 | Better performing event loop
## Proposed refactoring or deprecation
The current implementation in [webloop.py](https://github.com/pyodide/pyodide/blob/3caa249177c09624b4e2039d4a68cfcf2fb014c4/src/py/pyodide/webloop.py#L342) relies on javascript's setTimeout function. While this implementation works, it introduces an... | [
{
"content": "import asyncio\nimport contextvars\nimport inspect\nimport sys\nimport time\nimport traceback\nfrom asyncio import Future, Task\nfrom collections.abc import Awaitable, Callable\nfrom typing import Any, TypeVar, overload\n\nfrom .ffi import IN_BROWSER, create_once_callable\n\nif IN_BROWSER:\n fr... | [
{
"content": "import asyncio\nimport contextvars\nimport inspect\nimport sys\nimport time\nimport traceback\nfrom asyncio import Future, Task\nfrom collections.abc import Awaitable, Callable\nfrom typing import Any, TypeVar, overload\n\nfrom .ffi import IN_BROWSER, create_once_callable\n\nif IN_BROWSER:\n fr... | diff --git a/docs/project/changelog.md b/docs/project/changelog.md
index 9b1313fd43d..f740fe6734b 100644
--- a/docs/project/changelog.md
+++ b/docs/project/changelog.md
@@ -54,6 +54,9 @@ myst:
- {{ Enhancement }} Fixed a memory leak when iterating over a PyProxy.
{pr}`4546`
+- {{ Enhancement }} `asyncio.sleep(0)`... |
searxng__searxng-3204 | Bug: lingva engine / redirects & Key-Errors
**Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG**
Repository: https://github.com/return42/searxng
Branch: darmarit.org
Version: 2024.2.3+a6f5d690
**How did you install SearXNG?**
(unmodified fork/brand) from... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n# lint: pylint\n\"\"\"Lingva (alternative Google Translate frontend)\"\"\"\n\nfrom json import loads\n\nabout = {\n \"website\": 'https://lingva.ml',\n \"wikidata_id\": None,\n \"official_api_documentation\": 'https://github.com/thedaviddelta/... | [
{
"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n# lint: pylint\n\"\"\"Lingva (alternative Google Translate frontend)\"\"\"\n\nfrom json import loads\n\nabout = {\n \"website\": 'https://lingva.ml',\n \"wikidata_id\": None,\n \"official_api_documentation\": 'https://github.com/thedaviddelta/... | diff --git a/searx/engines/lingva.py b/searx/engines/lingva.py
index 124499719a4..cc5646050a8 100644
--- a/searx/engines/lingva.py
+++ b/searx/engines/lingva.py
@@ -16,7 +16,7 @@
engine_type = 'online_dictionary'
categories = ['general']
-url = "https://lingva.thedaviddelta.com/"
+url = "https://lingva.thedaviddelt... |
deis__deis-839 | services remain listed in fleetctl after app is deleted
``` console
$ deis destroy
! WARNING: Potentially Destructive Action
! This command will destroy the application: bolder-farmland
! To proceed, type "bolder-farmland" or re-run this command with --confirm=bolder-farmland
> bolder-farmland
Destroying ... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nData models for the Deis API.\n\"\"\"\n\nfrom __future__ import unicode_literals\nimport etcd\nimport importlib\nimport logging\nimport os\nimport subprocess\n\nfrom celery.canvas import group\nfrom django.conf import settings\nfrom django.contrib.auth.models imp... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nData models for the Deis API.\n\"\"\"\n\nfrom __future__ import unicode_literals\nimport etcd\nimport importlib\nimport logging\nimport os\nimport subprocess\n\nfrom celery.canvas import group\nfrom django.conf import settings\nfrom django.contrib.auth.models imp... | diff --git a/controller/api/models.py b/controller/api/models.py
index 938e2563ed..8ec9101559 100644
--- a/controller/api/models.py
+++ b/controller/api/models.py
@@ -121,9 +121,10 @@ def create(self, *args, **kwargs):
build = Build.objects.create(owner=self.owner, app=self, image=settings.DEFAULT_BUILD)
... |
piskvorky__gensim-2479 | BM25 does not support generator as corpus
``__init__`` method in BM25 class takes a "list of list of str" as corpus instead of a generator. More precisely, this is what it looks like right now:
```
def __init__(self, corpus):
"""
Parameters
----------
corpus : list of list of str... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\"\"\"This module contains function of computing rank scores for documents in\ncorpus and helper class `BM25` used in calculations. Original algorithm\ndescibed in [1]_,... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\"\"\"This module contains function of computing rank scores for documents in\ncorpus and helper class `BM25` used in calculations. Original algorithm\ndescibed in [1]_,... | diff --git a/gensim/summarization/bm25.py b/gensim/summarization/bm25.py
index fa8552c35e..b9621aeb1e 100644
--- a/gensim/summarization/bm25.py
+++ b/gensim/summarization/bm25.py
@@ -74,7 +74,7 @@ def __init__(self, corpus):
Given corpus.
"""
- self.corpus_size = len(corpus)
+ self... |
mathesar-foundation__mathesar-3265 | Add OpenAPI Specification for /queries/ endpoint and fix the incorrect specs
This is a part of the API Documentation project #2888
## Problem
To ensure the accuracy of the specs generated by drf-spectacular, we will generate an OpenAPI Specification specifically for a particular endpoint. This will allow us to veri... | [
{
"content": "def custom_preprocessing_hook(endpoints):\n filtered = []\n for (path, path_regex, method, callback) in endpoints:\n # Remove all but DRF API endpoints\n if path.startswith(\"/api/db/v0/databases/\") or path.startswith(\"/api/db/v0/data_files/\") or path.startswith(\"/api/db/v0... | [
{
"content": "def custom_preprocessing_hook(endpoints):\n filtered = []\n for (path, path_regex, method, callback) in endpoints:\n # Remove all but DRF API endpoints\n if path.startswith(\"/api/db/v0/databases/\") or path.startswith(\"/api/db/v0/data_files/\") or path.startswith(\"/api/db/v0... | diff --git a/config/settings/openapi.py b/config/settings/openapi.py
index 1095acbd77..891ad127d0 100644
--- a/config/settings/openapi.py
+++ b/config/settings/openapi.py
@@ -2,7 +2,7 @@ def custom_preprocessing_hook(endpoints):
filtered = []
for (path, path_regex, method, callback) in endpoints:
# R... |
hylang__hy-2287 | kwargs with symbolic :keywords as keys
This is more of an annoyance I probably will just learn to live with than anything else, but the following is counterintuitive (according to me).
```
(defn f1 [alpha beta] (* alpha beta))
(defn simple [] (f1 :alpha 3 :beta 7)) ;; works
(defn bad [] (f1 #**{:alpha 3 :beta 7... | [
{
"content": "import operator\nfrom contextlib import contextmanager\nfrom functools import reduce\nfrom itertools import groupby\nfrom math import isinf, isnan\n\nfrom colorama import Fore\n\nfrom hy import _initialize_env_var\nfrom hy.errors import HyWrapperError\n\nPRETTY = True\nCOLORED = _initialize_env_va... | [
{
"content": "import operator\nfrom contextlib import contextmanager\nfrom functools import reduce\nfrom itertools import groupby\nfrom math import isinf, isnan\n\nfrom colorama import Fore\n\nfrom hy import _initialize_env_var\nfrom hy.errors import HyWrapperError\n\nPRETTY = True\nCOLORED = _initialize_env_va... | diff --git a/docs/syntax.rst b/docs/syntax.rst
index 275a17e4e..cc95f6bf6 100644
--- a/docs/syntax.rst
+++ b/docs/syntax.rst
@@ -10,6 +10,10 @@ turns text into, as when invoked with :hy:func:`hy.read`. The basic units of
syntax at the textual level are called **forms**, and the basic objects
representing forms are ca... |
kubeflow__pipelines-4804 | [sdk] KFP SDK fail to use argo CLI >=2.12 to lint workflows
### What happened:
After https://github.com/kubeflow/pipelines/pull/5266, I noticed in tests, the warning
> Cannot validate the compiled workflow. Found the argo program in PATH, but it's not usable. argo v2.4.3 should work.
### What did you expect to h... | [
{
"content": "# Copyright 2018-2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app... | [
{
"content": "# Copyright 2018-2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app... | diff --git a/sdk/python/kfp/compiler/compiler.py b/sdk/python/kfp/compiler/compiler.py
index 331242a6e5a..c64bc8e107b 100644
--- a/sdk/python/kfp/compiler/compiler.py
+++ b/sdk/python/kfp/compiler/compiler.py
@@ -1091,7 +1091,17 @@ def _validate_workflow(workflow: dict):
if argo_path:
has_working_argo_lint = Fa... |
ray-project__ray-10680 | [rllib] Weights & Biases logger cannot handle objects in configuration
<!--Please include [tune], [rllib], [autoscaler] etc. in the issue title if relevant-->
### What is the problem?
The Weights & Biases logger cannot handle object references in RLlib configurations, for example in the callback API.
```
Proc... | [
{
"content": "import os\nimport pickle\nfrom multiprocessing import Process, Queue\nfrom numbers import Number\n\nfrom ray import logger\nfrom ray.tune import Trainable\nfrom ray.tune.function_runner import FunctionRunner\nfrom ray.tune.logger import Logger\nfrom ray.tune.utils import flatten_dict\n\ntry:\n ... | [
{
"content": "import os\nimport pickle\nfrom multiprocessing import Process, Queue\nfrom numbers import Number\n\nfrom ray import logger\nfrom ray.tune import Trainable\nfrom ray.tune.function_runner import FunctionRunner\nfrom ray.tune.logger import Logger\nfrom ray.tune.utils import flatten_dict\n\nimport yam... | diff --git a/python/ray/tune/integration/wandb.py b/python/ray/tune/integration/wandb.py
index b464187a2a3bb..b3248cbcb99f9 100644
--- a/python/ray/tune/integration/wandb.py
+++ b/python/ray/tune/integration/wandb.py
@@ -9,6 +9,8 @@
from ray.tune.logger import Logger
from ray.tune.utils import flatten_dict
+import ... |
aws-cloudformation__cfn-lint-659 | !GetAtt reference lint error
Hello,
Getting validation error on `AWS::ElasticLoadBalancingV2::Listener` property `LoadBalancerArn` when the `LoadBalancerArn` is referenced using !GetAtt nested-stack-name.Outputs.LoadbalancerArn
`[cfn-lint] E3008:CloudFormation stack outputs need to be strings not lists at Resourc... | [
{
"content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w... | [
{
"content": "\"\"\"\n Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy of this\n software and associated documentation files (the \"Software\"), to deal in the Software\n without restriction, including w... | diff --git a/src/cfnlint/rules/resources/properties/ValueRefGetAtt.py b/src/cfnlint/rules/resources/properties/ValueRefGetAtt.py
index 38e079a480..e3a0a5d0ba 100644
--- a/src/cfnlint/rules/resources/properties/ValueRefGetAtt.py
+++ b/src/cfnlint/rules/resources/properties/ValueRefGetAtt.py
@@ -140,8 +140,7 @@ def check... |
pwr-Solaar__Solaar-1689 | Add G935 headset support.
**Information**
<!-- Please update to Solaar from this repository before asking for a new feature. -->
- Solaar version : solaar 1.1.4
- Distribution: Ubuntu
- Kernel version (ex. `uname -srmo`): Linux 5.15.0-43-generic x86_64 GNU/Linux
- Output of `solaar show` for the target device (if ... | [
{
"content": "# -*- python-mode -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your... | [
{
"content": "# -*- python-mode -*-\n\n## Copyright (C) 2012-2013 Daniel Pavel\n##\n## This program is free software; you can redistribute it and/or modify\n## it under the terms of the GNU General Public License as published by\n## the Free Software Foundation; either version 2 of the License, or\n## (at your... | diff --git a/lib/logitech_receiver/descriptors.py b/lib/logitech_receiver/descriptors.py
index aa174f3a46..c054a16113 100644
--- a/lib/logitech_receiver/descriptors.py
+++ b/lib/logitech_receiver/descriptors.py
@@ -309,6 +309,7 @@ class _PerformanceMXDpi(_ST.RegisterDpi):
# Headset
-_D('Logitech G533 Gaming Headse... |
mlflow__mlflow-592 | AttributeError: 'RestStore' object has no attribute 'get_experiment_by_name'
### System information
- **Have I written custom code (as opposed to using a stock example script provided in MLflow)**:
I am trying to implement simple tracking server using mlflow.
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.0... | [
{
"content": "import json\n\nfrom mlflow.store.abstract_store import AbstractStore\n\nfrom mlflow.entities import Experiment, Run, RunInfo, RunTag, Param, Metric, ViewType\n\nfrom mlflow.utils.mlflow_tags import MLFLOW_RUN_NAME\nfrom mlflow.utils.proto_json_utils import message_to_json, parse_dict\nfrom mlflow.... | [
{
"content": "import json\n\nfrom mlflow.store.abstract_store import AbstractStore\n\nfrom mlflow.entities import Experiment, Run, RunInfo, RunTag, Param, Metric, ViewType\n\nfrom mlflow.utils.mlflow_tags import MLFLOW_RUN_NAME\nfrom mlflow.utils.proto_json_utils import message_to_json, parse_dict\nfrom mlflow.... | diff --git a/mlflow/store/rest_store.py b/mlflow/store/rest_store.py
index 56be6116444dc..563135c2bc241 100644
--- a/mlflow/store/rest_store.py
+++ b/mlflow/store/rest_store.py
@@ -107,6 +107,12 @@ def get_experiment(self, experiment_id):
response_proto = self._call_endpoint(GetExperiment, req_body)
r... |
zestedesavoir__zds-site-6326 | Incohérence des tags entre la bibliothèque et les billets
Pour un même tag `un zeste de culture` on a :
- `/bibliotheque/?tag=un-zeste-de-culture` ([lien](https://zestedesavoir.com/bibliotheque/?tag=un-zeste-de-culture))
- `/billets/?tag=un zeste de culture` ([lien](https://zestedesavoir.com/billets/?tag=un%20zest... | [
{
"content": "from collections import defaultdict, OrderedDict\n\nfrom django.contrib.auth.models import User\nfrom django.core.exceptions import PermissionDenied\nfrom django.utils.translation import gettext_lazy as _\nfrom django.conf import settings\nfrom django.db.models import Count\nfrom django.http impor... | [
{
"content": "from collections import defaultdict, OrderedDict\n\nfrom django.contrib.auth.models import User\nfrom django.core.exceptions import PermissionDenied\nfrom django.utils.translation import gettext_lazy as _\nfrom django.conf import settings\nfrom django.db.models import Count\nfrom django.http impor... | diff --git a/templates/header.html b/templates/header.html
index 1ea571dcee..f2f9d9e0bb 100644
--- a/templates/header.html
+++ b/templates/header.html
@@ -84,7 +84,7 @@
{% trans "Tags les plus utilisés" %}
</li>
... |
openshift__openshift-ansible-4183 | python3 error in repoquery.py
#### Description
When installing on Fedora 25 with ansible_python_interpreter=/usr/bin/python3, the openshift_version task fails:
TASK [openshift_version : Get available origin version] ****************************************************************************************************... | [
{
"content": "#!/usr/bin/env python\n# pylint: disable=missing-docstring\n# ___ ___ _ _ ___ ___ _ _____ ___ ___\n# / __| __| \\| | __| _ \\ /_\\_ _| __| \\\n# | (_ | _|| .` | _|| / / _ \\| | | _|| |) |\n# \\___|___|_|\\_|___|_|_\\/_/_\\_\\_|_|___|___/_ _____\n# | \\ / _ \\ | \\| |/ _... | [
{
"content": "#!/usr/bin/env python\n# pylint: disable=missing-docstring\n# ___ ___ _ _ ___ ___ _ _____ ___ ___\n# / __| __| \\| | __| _ \\ /_\\_ _| __| \\\n# | (_ | _|| .` | _|| / / _ \\| | | _|| |) |\n# \\___|___|_|\\_|___|_|_\\/_/_\\_\\_|_|___|___/_ _____\n# | \\ / _ \\ | \\| |/ _... | diff --git a/roles/lib_utils/library/repoquery.py b/roles/lib_utils/library/repoquery.py
index cf33e48d5fe..95a305b589b 100644
--- a/roles/lib_utils/library/repoquery.py
+++ b/roles/lib_utils/library/repoquery.py
@@ -465,7 +465,7 @@ def process_versions(query_output):
version_dict = defaultdict(dict)
- ... |
zostera__django-bootstrap3-471 | Use Poetry, switch to Markdown, update configuration files
* Use Poetry (https://python-poetry.org/) for dependency management and packaging.
* Drop support for Python 3.5 and Django 2.1.
* Change documentation to support main branch rename to 'main'.
* Fix settings override bug (fixes #388).
* Use Markdown for REA... | [
{
"content": "#!/usr/local/bin/python\n\n\nimport os\n\nfrom setuptools import find_packages, setup\n\nwith open(os.path.join(os.path.dirname(__file__), \"README.rst\")) as readme_file:\n readme = readme_file.read()\n\nwith open(os.path.join(os.path.dirname(__file__), \"HISTORY.rst\")) as history_file:\n ... | [
{
"content": "#!/usr/local/bin/python\n\n\nimport os\n\nfrom setuptools import find_packages, setup\n\nwith open(os.path.join(os.path.dirname(__file__), \"README.rst\")) as readme_file:\n readme = readme_file.read()\n\nwith open(os.path.join(os.path.dirname(__file__), \"HISTORY.rst\")) as history_file:\n ... | diff --git a/.gitignore b/.gitignore
index ca98757f..e5e533f9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,14 @@
+# Version generated by setuptools_scm
+src/bootstrap3/_version.py
+
+# Python
*.py[cod]
# C extensions
*.so
# Packages
+.eggs
*.egg
*.egg-info
dist
@@ -17,8 +22,7 @@ develop-eggs
.install... |
azavea__raster-vision-497 | Unit Tests: `task` Directory
| [
{
"content": "import os\nimport shutil\nfrom threading import Timer\nimport logging\n\nfrom google.protobuf import json_format\n\nfrom rastervision.filesystem.filesystem import FileSystem\nfrom rastervision.filesystem.filesystem import ProtobufParseException\nfrom rastervision.filesystem.local_filesystem import... | [
{
"content": "import os\nimport shutil\nfrom threading import Timer\nimport logging\n\nfrom google.protobuf import json_format\n\nfrom rastervision.filesystem.filesystem import FileSystem\nfrom rastervision.filesystem.filesystem import ProtobufParseException\nfrom rastervision.filesystem.local_filesystem import... | diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 000000000..1869b9584
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,8 @@
+[run]
+source =
+ rastervision/
+omit =
+ rastervision/protos/**.py
+ rastervision/utils/filter_geojson.py
+ rastervision/utils/geojson.py
+ rastervision/utils/misc.py
d... |
pypa__virtualenv-1591 | `.dist-info.virtualenv` marker files break importlib.metadata in app-data seeded venvs
Since virtualenv 20.0.0, dist-info directories in virtual environments seeded using the `app-data` method are accompanied by empty marker files with the same name as the directory plus a `.virtualenv` suffix:
https://github.com/py... | [
{
"content": "from __future__ import absolute_import, unicode_literals\n\nimport logging\nimport os\nimport re\nimport shutil\nimport zipfile\nfrom abc import ABCMeta, abstractmethod\nfrom tempfile import mkdtemp\n\nimport six\nfrom six import PY3\n\nfrom virtualenv.util import ConfigParser\nfrom virtualenv.uti... | [
{
"content": "from __future__ import absolute_import, unicode_literals\n\nimport logging\nimport os\nimport re\nimport shutil\nimport zipfile\nfrom abc import ABCMeta, abstractmethod\nfrom tempfile import mkdtemp\n\nimport six\nfrom six import PY3\n\nfrom virtualenv.util import ConfigParser\nfrom virtualenv.uti... | diff --git a/docs/changelog/1589.bugfix.rst b/docs/changelog/1589.bugfix.rst
new file mode 100644
index 000000000..b204f8f86
--- /dev/null
+++ b/docs/changelog/1589.bugfix.rst
@@ -0,0 +1,2 @@
+Fix ``app-data`` :option:`seeder` injects a extra ``.dist-info.virtualenv`` path that breaks ``importlib.metadata``,
+now we in... |
pydantic__pydantic-1061 | Subclassing StrictStr / ConstrainedStr causes ValidationError
# Bug
Please complete:
* OS: **Manjaro Linux**
* Python version: **3.7.4**
* Pydantic version: **1.2.0**
------------------------------------------------------------------
### Original bug discussion in #799
--------------------------------------... | [
{
"content": "import re\nimport sys\nfrom collections import OrderedDict\nfrom datetime import date, datetime, time, timedelta\nfrom decimal import Decimal, DecimalException\nfrom enum import Enum, IntEnum\nfrom ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network\nf... | [
{
"content": "import re\nimport sys\nfrom collections import OrderedDict\nfrom datetime import date, datetime, time, timedelta\nfrom decimal import Decimal, DecimalException\nfrom enum import Enum, IntEnum\nfrom ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network\nf... | diff --git a/changes/1061-skewty.md b/changes/1061-skewty.md
new file mode 100644
index 00000000000..199f3170f42
--- /dev/null
+++ b/changes/1061-skewty.md
@@ -0,0 +1 @@
+Trick Cython into allowing str subclassing.
\ No newline at end of file
diff --git a/pydantic/types.py b/pydantic/types.py
index a5d031defa1..b078364... |
dask__distributed-6306 | parse_stdout.py produces malformed Junit reports
parse_stdout.py has recently stopped working.
This causes Windows timeouts to be reported as a white box instead of a red box in https://dask.org/distributed/test_report.html.
https://github.com/dask/distributed/actions/runs/2293197167
> Publish test results: artifa... | [
{
"content": "\"\"\"On Windows, pytest-timeout kills off the whole test suite, leaving no junit report\nbehind. Parse the stdout of pytest to generate one.\n\"\"\"\nfrom __future__ import annotations\n\nimport re\nimport sys\nfrom collections import Counter, defaultdict\nfrom collections.abc import Iterable\nfr... | [
{
"content": "\"\"\"On Windows, pytest-timeout kills off the whole test suite, leaving no junit report\nbehind. Parse the stdout of pytest to generate one.\n\"\"\"\nfrom __future__ import annotations\n\nimport html\nimport re\nimport sys\nfrom collections import Counter, defaultdict\nfrom collections.abc import... | diff --git a/continuous_integration/scripts/parse_stdout.py b/continuous_integration/scripts/parse_stdout.py
index a84018f2d9f..e9b53b193c4 100644
--- a/continuous_integration/scripts/parse_stdout.py
+++ b/continuous_integration/scripts/parse_stdout.py
@@ -3,6 +3,7 @@
"""
from __future__ import annotations
+import ... |
crytic__slither-617 | Type conversion failure when assigning YUL variable to string literal
The following contract causes an exception:
```
contract YULAssignStringLiteral {
function f() public {
assembly
{
let x := "oh_god_solidity"
}
}
}
```
Output:
```
ERROR:root:Traceback (mo... | [
{
"content": "import abc\nimport json\nfrom typing import Optional, Dict, List, Union\n\nfrom slither.core.cfg.node import NodeType, Node, link_nodes\nfrom slither.core.declarations import (\n Function,\n SolidityFunction,\n SolidityVariable,\n Contract,\n)\nfrom slither.core.expressions import (\n ... | [
{
"content": "import abc\nimport json\nfrom typing import Optional, Dict, List, Union\n\nfrom slither.core.cfg.node import NodeType, Node, link_nodes\nfrom slither.core.declarations import (\n Function,\n SolidityFunction,\n SolidityVariable,\n Contract,\n)\nfrom slither.core.expressions import (\n ... | diff --git a/slither/solc_parsing/yul/parse_yul.py b/slither/solc_parsing/yul/parse_yul.py
index 3cfe8cdeb4..74348932c6 100644
--- a/slither/solc_parsing/yul/parse_yul.py
+++ b/slither/solc_parsing/yul/parse_yul.py
@@ -679,13 +679,16 @@ def parse_yul_identifier(root: YulScope, _node: YulNode, ast: Dict) -> Optional[
... |
pre-commit__pre-commit-1700 | Rbenv default ruby issue on install
I am trying to install MDL v0.11.0
i get the following error during install
```
pre-commit
[INFO] Installing environment for git://github.com/markdownlint/markdownlint.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpecte... | [
{
"content": "import contextlib\nimport functools\nimport os.path\nimport shutil\nimport tarfile\nfrom typing import Generator\nfrom typing import Sequence\nfrom typing import Tuple\n\nimport pre_commit.constants as C\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import PatchesT\nfro... | [
{
"content": "import contextlib\nimport functools\nimport os.path\nimport shutil\nimport tarfile\nfrom typing import Generator\nfrom typing import Sequence\nfrom typing import Tuple\n\nimport pre_commit.constants as C\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import PatchesT\nfro... | diff --git a/pre_commit/languages/ruby.py b/pre_commit/languages/ruby.py
index 1a0f0c7e3..81bc95436 100644
--- a/pre_commit/languages/ruby.py
+++ b/pre_commit/languages/ruby.py
@@ -52,7 +52,6 @@ def get_env_patch(
else: # pragma: win32 no cover
patches += (
('RBENV_ROOT', venv),
- ... |
deis__deis-289 | Refresh EC2 AMIs for 0.2.0 release
Having the AMIs up-to-date speeds node scaling time somewhat, and it's a slow but mostly-automated process so let's do this each release.
(Ditto for Rackspace, Vagrant .box images on S3, and DigitalOcean when we get there for each of them...)
| [
{
"content": "\"\"\"\nDeis cloud provider implementation for Amazon EC2.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport json\nimport time\n\nfrom boto import ec2\nfrom boto.exception import EC2ResponseError\n\n# from api.ssh import connect_ssh, exec_ssh\nfrom deis import settings\n\n\n# Deis-optim... | [
{
"content": "\"\"\"\nDeis cloud provider implementation for Amazon EC2.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport json\nimport time\n\nfrom boto import ec2\nfrom boto.exception import EC2ResponseError\n\n# from api.ssh import connect_ssh, exec_ssh\nfrom deis import settings\n\n\n# Deis-optim... | diff --git a/contrib/ec2/provision-ec2-controller.sh b/contrib/ec2/provision-ec2-controller.sh
index 54c9371e38..4f0d803a7e 100755
--- a/contrib/ec2/provision-ec2-controller.sh
+++ b/contrib/ec2/provision-ec2-controller.sh
@@ -42,21 +42,21 @@ region=$1
# see contrib/prepare-ubuntu-ami.sh for instructions
# on creatin... |
webkom__lego-1113 | Add user id to metadata related to all data/actions in stripe
| [
{
"content": "from datetime import timedelta\n\nimport stripe\nfrom django.db import IntegrityError, transaction\nfrom django.utils import timezone\nfrom redis.exceptions import LockError\nfrom structlog import get_logger\n\nfrom lego import celery_app\nfrom lego.apps.events import constants\nfrom lego.apps.eve... | [
{
"content": "from datetime import timedelta\n\nimport stripe\nfrom django.db import IntegrityError, transaction\nfrom django.utils import timezone\nfrom redis.exceptions import LockError\nfrom structlog import get_logger\n\nfrom lego import celery_app\nfrom lego.apps.events import constants\nfrom lego.apps.eve... | diff --git a/lego/apps/events/tasks.py b/lego/apps/events/tasks.py
index 3dfc7d439..cd5f975d0 100644
--- a/lego/apps/events/tasks.py
+++ b/lego/apps/events/tasks.py
@@ -127,8 +127,9 @@ def async_payment(self, registration_id, token, logger_context=None):
amount=event.get_price(self.registration.user), curr... |
deis__deis-571 | Make EC2 AMIs for 0.5.1 release
| [
{
"content": "\"\"\"\nDeis cloud provider implementation for Amazon EC2.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport json\nimport time\n\nfrom boto import ec2\nfrom boto.exception import EC2ResponseError\n\n# from api.ssh import connect_ssh, exec_ssh\nfrom deis import settings\n\n\n# Deis-optim... | [
{
"content": "\"\"\"\nDeis cloud provider implementation for Amazon EC2.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport json\nimport time\n\nfrom boto import ec2\nfrom boto.exception import EC2ResponseError\n\n# from api.ssh import connect_ssh, exec_ssh\nfrom deis import settings\n\n\n# Deis-optim... | diff --git a/contrib/ec2/prepare-controller-ami.sh b/contrib/ec2/prepare-controller-ami.sh
index 6762672273..9d9cb830e8 100755
--- a/contrib/ec2/prepare-controller-ami.sh
+++ b/contrib/ec2/prepare-controller-ami.sh
@@ -6,9 +6,9 @@
# Instructions:
#
# 1. Launch a vanilla Ubuntu 12.04 instance (64-bit with an EBS ro... |
edgedb__edgedb-4103 | std::array_get doesn't return if input is result of a sub-query
- EdgeDB Version: EdgeDB CLI 1.1.2+f38a6e0 & Instance 1.4+5ffe34b
- OS Version: Windows 10 21H2
## Summary
`array_get` doesn't return anything even if the index is valid when its first argument is a postrequisite of a query.
Take this query for exa... | [
{
"content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2008-present MagicStack Inc. and the EdgeDB 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... | [
{
"content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2008-present MagicStack Inc. and the EdgeDB 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... | diff --git a/edb/edgeql/compiler/func.py b/edb/edgeql/compiler/func.py
index 49e0dfd4549..9ebd484b22b 100644
--- a/edb/edgeql/compiler/func.py
+++ b/edb/edgeql/compiler/func.py
@@ -895,8 +895,11 @@ def finalize_args(
# cast the arguments so that the backend has no
# wiggle room to apply its ow... |
pytorch__TensorRT-2490 | Expose ISelectLayer in dynamo.conversion.impl
| [
{
"content": "from typing import Optional, Union\n\nimport numpy as np\nimport tensorrt as trt\nimport torch\nfrom torch.fx.node import Target\nfrom torch_tensorrt.dynamo._SourceIR import SourceIR\nfrom torch_tensorrt.dynamo.conversion._ConversionContext import ConversionContext\nfrom torch_tensorrt.dynamo.conv... | [
{
"content": "from typing import Optional, Union\n\nimport numpy as np\nimport tensorrt as trt\nimport torch\nfrom torch.fx.node import Target\nfrom torch_tensorrt.dynamo._SourceIR import SourceIR\nfrom torch_tensorrt.dynamo.conversion._ConversionContext import ConversionContext\nfrom torch_tensorrt.dynamo.conv... | diff --git a/py/torch_tensorrt/dynamo/conversion/impl/condition/ops.py b/py/torch_tensorrt/dynamo/conversion/impl/condition/ops.py
index 326344d5e9..7fe7793812 100644
--- a/py/torch_tensorrt/dynamo/conversion/impl/condition/ops.py
+++ b/py/torch_tensorrt/dynamo/conversion/impl/condition/ops.py
@@ -96,8 +96,18 @@ def wh... |
joke2k__faker-759 | Generating invalid cpf (brazillian ssn)
Faker is generating invalid checksum digits for cpf (brazillian ssn).
### Steps to reproduce
1. Create fake instance using localization "pt_BR"
1. Call fake.cpf()
### Expected behavior
It should generate a valid CPF.
### Actual behavior
It is generating a CPF w... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\nfrom .. import Provider as SsnProvider\n\n\ndef checksum(digits):\n s = 0\n p = len(digits) + 1\n for i in range(0, len(digits)):\n s += digits[i] * p\n p -= 1\n\n reminder = s % 11\n if reminder == 0... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\nfrom .. import Provider as SsnProvider\n\n\ndef checksum(digits):\n \"\"\"\n Returns the checksum of CPF digits.\n References to the algorithm:\n https://pt.wikipedia.org/wiki/Cadastro_de_pessoas_f%C3%ADsicas#Algoritm... | diff --git a/faker/providers/ssn/pt_BR/__init__.py b/faker/providers/ssn/pt_BR/__init__.py
index 7fcdcda15e..010a703041 100644
--- a/faker/providers/ssn/pt_BR/__init__.py
+++ b/faker/providers/ssn/pt_BR/__init__.py
@@ -5,6 +5,12 @@
def checksum(digits):
+ """
+ Returns the checksum of CPF digits.
+ Refere... |
deis__deis-207 | Update AMIs in all EC2 regions
Our images are behind on some kernel and security updates and should be re-published as v0.1.0 versions. It's also kind of a performance optimization since we do apt-get upgrade during bootstrap.
| [
{
"content": "\"\"\"\nDeis cloud provider implementation for Amazon EC2.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport json\nimport time\n\nfrom boto import ec2\nfrom boto.exception import EC2ResponseError\n\n# from api.ssh import connect_ssh, exec_ssh\nfrom deis import settings\n\n\n# Deis-optim... | [
{
"content": "\"\"\"\nDeis cloud provider implementation for Amazon EC2.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport json\nimport time\n\nfrom boto import ec2\nfrom boto.exception import EC2ResponseError\n\n# from api.ssh import connect_ssh, exec_ssh\nfrom deis import settings\n\n\n# Deis-optim... | diff --git a/contrib/provision-ec2-controller.sh b/contrib/provision-ec2-controller.sh
index 930cf67ce0..66d787e9c4 100755
--- a/contrib/provision-ec2-controller.sh
+++ b/contrib/provision-ec2-controller.sh
@@ -28,21 +28,21 @@ region=$1
# see contrib/prepare-ubuntu-ami.sh for instructions
# on creating your own deis-... |
azavea__raster-vision-506 | Unit Tests: `command` Directory
| [
{
"content": "import os\nimport shutil\nfrom threading import Timer\nimport logging\n\nfrom google.protobuf import json_format\n\nfrom rastervision.filesystem.filesystem import FileSystem\nfrom rastervision.filesystem.filesystem import ProtobufParseException\nfrom rastervision.filesystem.local_filesystem import... | [
{
"content": "import os\nimport shutil\nfrom threading import Timer\nimport logging\n\nfrom google.protobuf import json_format\n\nfrom rastervision.filesystem.filesystem import FileSystem\nfrom rastervision.filesystem.filesystem import ProtobufParseException\nfrom rastervision.filesystem.local_filesystem import... | diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 000000000..1869b9584
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,8 @@
+[run]
+source =
+ rastervision/
+omit =
+ rastervision/protos/**.py
+ rastervision/utils/filter_geojson.py
+ rastervision/utils/geojson.py
+ rastervision/utils/misc.py
d... |
urllib3__urllib3-2216 | Is HTTPHeaderDict a public API to make requests?
`HTTPHeaderDict` was initially designed to handle response headers, and is not documented for request headers.
* Should it be documented?
* How should it be imported? The current options are `from urllib3.response import HTTPHeaderDict` and `from urllib3._collectio... | [
{
"content": "\"\"\"\nPython HTTP library with thread-safe connection pooling, file post support, user friendly, and more\n\"\"\"\n\n# Set default logging handler to avoid \"No handler found\" warnings.\nimport logging\nimport warnings\nfrom logging import NullHandler\n\nfrom . import exceptions\nfrom ._version... | [
{
"content": "\"\"\"\nPython HTTP library with thread-safe connection pooling, file post support, user friendly, and more\n\"\"\"\n\n# Set default logging handler to avoid \"No handler found\" warnings.\nimport logging\nimport warnings\nfrom logging import NullHandler\n\nfrom . import exceptions\nfrom ._collect... | diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 2ff36d7142..0c904979eb 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -312,5 +312,8 @@ In chronological order:
* Dmitry Mazin <https://archvile.net>
* _put_conn changes and unit tests
+* Ubdussamad <ubdussamad@gmail.com>
+ * Added HTTPHeaderDict to ... |
django-cms__django-cms-3023 | language_fallback in placeholder conf can make plugins disappear (edit and live mode)
when having a placeholder with "language_fallback", no more plugins at all are shown in draft mode (neither in "edit" nor in "structure", and neither for plugins with no fallback). simply removing the fallback (as below) makes things ... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom collections import defaultdict\nfrom itertools import groupby\nimport operator\nimport warnings\n\nfrom django.contrib.sites.models import Site, SITE_CACHE\nfrom django.shortcuts import get_object_or_404\nfrom django.template import NodeList, VariableNode, TemplateSyn... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom collections import defaultdict\nfrom itertools import groupby\nimport operator\nimport warnings\n\nfrom django.contrib.sites.models import Site, SITE_CACHE\nfrom django.shortcuts import get_object_or_404\nfrom django.template import NodeList, VariableNode, TemplateSyn... | diff --git a/cms/tests/placeholder.py b/cms/tests/placeholder.py
index 3b22a4a1fb1..857f99d1e87 100644
--- a/cms/tests/placeholder.py
+++ b/cms/tests/placeholder.py
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import with_statement
import itertools
+from cms.toolbar.toolbar import CMSToolbar
+from sekizai... |
Mailu__Mailu-699 | admin_1 errors in the logs
I'm seeing a lot of errors in the docker-compose logs:
```
admin_1 | 2018-09-06T03:27:32.130634316Z File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 667, in _init_compiled
admin_1 | 2018-09-06T03:27:32.130647067Z param.append(processors[key... | [
{
"content": "from mailu import app, db, dkim, login_manager\n\nfrom sqlalchemy.ext import declarative\nfrom passlib import context, hash\nfrom datetime import datetime, date\nfrom email.mime import text\n\nimport sqlalchemy\nimport re\nimport time\nimport os\nimport glob\nimport smtplib\nimport idna\nimport dn... | [
{
"content": "from mailu import app, db, dkim, login_manager\n\nfrom sqlalchemy.ext import declarative\nfrom passlib import context, hash\nfrom datetime import datetime, date\nfrom email.mime import text\n\nimport sqlalchemy\nimport re\nimport time\nimport os\nimport glob\nimport smtplib\nimport idna\nimport dn... | diff --git a/core/admin/mailu/models.py b/core/admin/mailu/models.py
index 62c25c811..9a19730fb 100644
--- a/core/admin/mailu/models.py
+++ b/core/admin/mailu/models.py
@@ -35,11 +35,14 @@ class IdnaEmail(db.TypeDecorator):
impl = db.String(255, collation="NOCASE")
def process_bind_param(self, value, dialec... |
talonhub__community-1040 | "phones that" should DTRT and select the current word if nothing is selected
there's really no need for both `phones that` and `phones word`, we can just make `phones that` do the right thing and select the current word if nothing is selected - ie. if `edit.selected_text()` returns the empty string?
| [
{
"content": "import os\n\nfrom talon import Context, Module, actions, app, clip, fs, imgui, ui\n\n########################################################################\n# global settings\n########################################################################\n\n# a list of homophones where each line is a ... | [
{
"content": "import os\n\nfrom talon import Context, Module, actions, app, clip, fs, imgui, ui\n\n########################################################################\n# global settings\n########################################################################\n\n# a list of homophones where each line is a ... | diff --git a/core/homophones/homophones.py b/core/homophones/homophones.py
index 721fce1a09..33f582e6db 100644
--- a/core/homophones/homophones.py
+++ b/core/homophones/homophones.py
@@ -185,6 +185,15 @@ def homophones_show(m: str):
"""Show the homophones display"""
raise_homophones(m, False, False)
... |
bokeh__bokeh-9068 | [BUG] Development guide missing `test` argument for conda install and pytest install failure on windows
### Missing `test` argument
The current [developement guide](https://bokeh.pydata.org/en/latest/docs/dev_guide/setup.html#conda-packages) is missing the `test` argument for windows setups.
As for OSX / Linux (... | [
{
"content": "import sys\nimport jinja2\nimport yaml\n\n\ndef load_setup_py_data():\n import os\n import setuptools\n os.environ['CONDA_BUILD_STATE'] = 'RENDER'\n data = {}\n\n def _setup(**kw): data.update(kw)\n setuptools.setup = _setup\n return data\n\nmeta_src = jinja2.Template(open(\"c... | [
{
"content": "import sys\nimport platform\nimport jinja2\nimport yaml\n\n\ndef load_setup_py_data():\n import os\n import setuptools\n os.environ['CONDA_BUILD_STATE'] = 'RENDER'\n data = {}\n\n def _setup(**kw): data.update(kw)\n setuptools.setup = _setup\n return data\n\nmeta_src = jinja2.... | diff --git a/scripts/deps.py b/scripts/deps.py
index 26272880fa3..4d9a953228e 100644
--- a/scripts/deps.py
+++ b/scripts/deps.py
@@ -1,4 +1,5 @@
import sys
+import platform
import jinja2
import yaml
@@ -31,6 +32,10 @@ def _setup(**kw): data.update(kw)
# bare python unpins python version causing upgrade to latest
... |
evennia__evennia-1402 | SaverMutable will raise ValueError on operations if underlying Attribute removed
#### Brief summary of issue / Description of requested feature:
SaverLists, SaverDicts, etc, all store the underlying Attribute as its `._db_obj` attribute, and set the Attribute's .value appropriately upon assignment, allowing for dict a... | [
{
"content": "\"\"\"\nThis module handles serialization of arbitrary python structural data,\nintended primarily to be stored in the database. It also supports\nstoring Django model instances (which plain pickle cannot do).\n\nThis serialization is used internally by the server, notably for\nstoring data in Att... | [
{
"content": "\"\"\"\nThis module handles serialization of arbitrary python structural data,\nintended primarily to be stored in the database. It also supports\nstoring Django model instances (which plain pickle cannot do).\n\nThis serialization is used internally by the server, notably for\nstoring data in Att... | diff --git a/evennia/utils/dbserialize.py b/evennia/utils/dbserialize.py
index 83d3863ab70..ffd360c674d 100644
--- a/evennia/utils/dbserialize.py
+++ b/evennia/utils/dbserialize.py
@@ -153,6 +153,12 @@ def _save_tree(self):
if self._parent:
self._parent._save_tree()
elif self._db_obj:
+ ... |
arviz-devs__arviz-1619 | `az.from_numpyro` crashes when running MCMC with `thinning != 1`
**Describe the bug**
When using `az.from_numpyro` to import an MCMC run from `numpyro`, a `ValueError` is thrown if the MCMC was run with, e.g., `thinning=2`.
**To Reproduce**
Running
```python
import arviz as az
import numpy as np
import numpyro... | [
{
"content": "\"\"\"NumPyro-specific conversion code.\"\"\"\nimport logging\nfrom typing import Callable, Optional\n\nimport numpy as np\n\nfrom .. import utils\nfrom .base import dict_to_dataset, requires\nfrom .inference_data import InferenceData\n\n_log = logging.getLogger(__name__)\n\n\nclass NumPyroConvert... | [
{
"content": "\"\"\"NumPyro-specific conversion code.\"\"\"\nimport logging\nfrom typing import Callable, Optional\n\nimport numpy as np\n\nfrom .. import utils\nfrom .base import dict_to_dataset, requires\nfrom .inference_data import InferenceData\n\n_log = logging.getLogger(__name__)\n\n\nclass NumPyroConvert... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 632728a2b0..0c1299c8cd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,7 @@
* Fix `c` argument in `plot_khat` ([1592](https://github.com/arviz-devs/arviz/pull/1592))
* Fix `ax` argument in `plot_elpd` ([1593](https://github.com/arviz-devs/arviz/pull/1593))
* R... |
fonttools__fonttools-1952 | [merge] OS/2 table Mixed Versions Crash
Got a crash in _pyftmerge_ when merging several fonts with OS/2 tables that have mixed versions.
If a font with a v5 OS/2 table **follows** font(s) with v4 OS/2 tables, I get:
File "C:\App\Python37\lib\site-packages\fontTools\misc\loggingTools.py", line 375, in wrapper
... | [
{
"content": "# Copyright 2013 Google, Inc. All Rights Reserved.\n#\n# Google Author(s): Behdad Esfahbod, Roozbeh Pournader\n\nfrom fontTools.misc.py23 import *\nfrom fontTools.misc.timeTools import timestampNow\nfrom fontTools import ttLib, cffLib\nfrom fontTools.ttLib.tables import otTables, _h_e_a_d\nfrom fo... | [
{
"content": "# Copyright 2013 Google, Inc. All Rights Reserved.\n#\n# Google Author(s): Behdad Esfahbod, Roozbeh Pournader\n\nfrom fontTools.misc.py23 import *\nfrom fontTools.misc.timeTools import timestampNow\nfrom fontTools import ttLib, cffLib\nfrom fontTools.ttLib.tables import otTables, _h_e_a_d\nfrom fo... | diff --git a/Lib/fontTools/merge.py b/Lib/fontTools/merge.py
index 82a5e3f75a..a6a7b0284e 100644
--- a/Lib/fontTools/merge.py
+++ b/Lib/fontTools/merge.py
@@ -291,11 +291,18 @@ def mergeOs2FsType(lst):
'sTypoLineGap': max,
'usWinAscent': max,
'usWinDescent': max,
- # Version 2,3,4
+ # Version 1
'ulCodePageRange... |
wagtail__wagtail-7023 | Wagtail API pages endpoint responds with a 500 error when entering an invalid value to a filter
### Issue Summary
When querying the Wagtail API and using filters, invalid filter values cause the server to respond with a 500 error.
Given a `BlogPage` with an `author` ForeignKey.
e.g. `/api/v2/pages/?type=blog.B... | [
{
"content": "from django.conf import settings\nfrom django.db import models\nfrom django.shortcuts import get_object_or_404\nfrom rest_framework.filters import BaseFilterBackend\nfrom taggit.managers import TaggableManager\n\nfrom wagtail.core.models import Locale, Page\nfrom wagtail.search.backends import get... | [
{
"content": "from django.conf import settings\nfrom django.db import models\nfrom django.shortcuts import get_object_or_404\nfrom rest_framework.filters import BaseFilterBackend\nfrom taggit.managers import TaggableManager\n\nfrom wagtail.core.models import Locale, Page\nfrom wagtail.search.backends import get... | diff --git a/wagtail/api/v2/filters.py b/wagtail/api/v2/filters.py
index 996e486943dc..61aeb8204e91 100644
--- a/wagtail/api/v2/filters.py
+++ b/wagtail/api/v2/filters.py
@@ -36,6 +36,8 @@ def filter_queryset(self, request, queryset, view):
value = parse_boolean(value)
elif... |
praw-dev__praw-914 | Accessing wiki revisions by ID
I was thinking more about #907 and I think there ought to be a better way to access a wiki page directly by its revision ID. Right now you can get a page's revisions and that listing will have a bunch of appropriately-initialized `WikiPage` objects, but if you (for example) store some IDs... | [
{
"content": "\"\"\"Provide the WikiPage class.\"\"\"\nfrom ...const import API_PATH\nfrom ..listing.generator import ListingGenerator\nfrom .base import RedditBase\nfrom .redditor import Redditor\n\n\nclass WikiPage(RedditBase):\n \"\"\"An individual WikiPage object.\"\"\"\n\n __hash__ = RedditBase.__has... | [
{
"content": "\"\"\"Provide the WikiPage class.\"\"\"\nfrom ...const import API_PATH\nfrom ..listing.generator import ListingGenerator\nfrom .base import RedditBase\nfrom .redditor import Redditor\n\n\nclass WikiPage(RedditBase):\n \"\"\"An individual WikiPage object.\"\"\"\n\n __hash__ = RedditBase.__has... | diff --git a/CHANGES.rst b/CHANGES.rst
index 2f8f1f75e..ffdc181a9 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -20,6 +20,7 @@ Unreleased
:class:`.Preferences`.
* Add method :meth:`.Message.delete()`.
* Add class :class:`.Emoji` to work with custom subreddit emoji.
+* Add method :meth:`.WikiPage.revision` to get a... |
deis__deis-241 | Refresh EC2 AMIs for 0.1.1 release
There are a few package updates, esp. Docker 0.6.4. Having the AMIs up-to-date speeds node scaling time somewhat, and it's a slow but mostly-automated process so let's get in the habit of doing this each release.
(Ditto for Rackspace, Vagrant .box images on S3, and DigitalOcean when ... | [
{
"content": "\"\"\"\nDeis cloud provider implementation for Amazon EC2.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport json\nimport time\n\nfrom boto import ec2\nfrom boto.exception import EC2ResponseError\n\n# from api.ssh import connect_ssh, exec_ssh\nfrom deis import settings\n\n\n# Deis-optim... | [
{
"content": "\"\"\"\nDeis cloud provider implementation for Amazon EC2.\n\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport json\nimport time\n\nfrom boto import ec2\nfrom boto.exception import EC2ResponseError\n\n# from api.ssh import connect_ssh, exec_ssh\nfrom deis import settings\n\n\n# Deis-optim... | diff --git a/contrib/ec2/provision-ec2-controller.sh b/contrib/ec2/provision-ec2-controller.sh
index 7dee6c401e..bcbfa372d4 100755
--- a/contrib/ec2/provision-ec2-controller.sh
+++ b/contrib/ec2/provision-ec2-controller.sh
@@ -42,21 +42,21 @@ region=$1
# see contrib/prepare-ubuntu-ami.sh for instructions
# on creatin... |
freedomofpress__securedrop-2929 | Bump Ansible to 2.4
## Description
The current version of Ansible in the admin workstation uses PyCrypto==2.6.1 as a dependency, which is causing CI safety failures when checking the admin pip requirements due to the fact that there is a CVE in PyCrypto 2.6.1. See upstream discussion in https://github.com/ansible/an... | [
{
"content": "# -*- encoding:utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport sys\n\nimport ansible\n\ntry:\n # Version 2.0+\n from ansible.plugins.callback import CallbackBase\nexcept ImportError:\n CallbackBase = object\n\n\ndef print_red_bold(te... | [
{
"content": "# -*- encoding:utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport sys\n\nimport ansible\n\ntry:\n # Version 2.0+\n from ansible.plugins.callback import CallbackBase\nexcept ImportError:\n CallbackBase = object\n\n\ndef print_red_bold(te... | diff --git a/.circleci/config.yml b/.circleci/config.yml
index f0ec92b46a..3fa80c5e9a 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -112,7 +112,7 @@ jobs:
- run:
name: Check Python dependencies for CVEs
- command: make safety || true # Revert when Ansible 2.4 is used
+ ... |
microsoft__botbuilder-python-1205 | [PORT] Slack adapter updates for dialog interactions
> Port this change from botbuilder-dotnet/master branch:
https://github.com/microsoft/botbuilder-dotnet/pull/3744
Fixes #3733 #3726 #3725 #3724
* Adds missing values to SlackPayload model
* Expose SlackClientWrapper via public property
# Changed projects
*... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\r\n# Licensed under the MIT License.\r\n\r\nfrom typing import Optional, List\r\nfrom slack.web.classes.actions import Action\r\nfrom botbuilder.adapters.slack.slack_message import SlackMessage\r\n\r\n\r\nclass SlackPayload:\r\n def __... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\r\n# Licensed under the MIT License.\r\n\r\nfrom typing import Optional, List\r\nfrom slack.web.classes.actions import Action\r\nfrom botbuilder.adapters.slack.slack_message import SlackMessage\r\n\r\n\r\nclass SlackPayload:\r\n def __... | diff --git a/libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_payload.py b/libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_payload.py
index d5d87a225..c05456f69 100644
--- a/libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_payload.py
+++ b/libraries/botbuilder-a... |
jupyterhub__jupyterhub-896 | Generated jupyterhub_config.py has whitelist error
Hi Everyone,
Minor issue with jupyterhub_config.py that is generated by jupyterhub command. The string is as follows:
#c.Authenticator.whitelist = set('')
This causes all user logins to fail. When I changed it to the following--which is on the Getting Started pa... | [
{
"content": "\"\"\"Base Authenticator class and the default PAM Authenticator\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom grp import getgrnam\nimport pipes\nimport pwd\nimport re\nfrom shutil import which\nimport sys\nfrom subprocess im... | [
{
"content": "\"\"\"Base Authenticator class and the default PAM Authenticator\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom grp import getgrnam\nimport pipes\nimport pwd\nimport re\nfrom shutil import which\nimport sys\nfrom subprocess im... | diff --git a/jupyterhub/auth.py b/jupyterhub/auth.py
index 5028b4ead4..d248c971c4 100644
--- a/jupyterhub/auth.py
+++ b/jupyterhub/auth.py
@@ -56,6 +56,17 @@ class Authenticator(LoggingConfigurable):
"""
).tag(config=True)
+ @observe('whitelist')
+ def _check_whitelist(self, change):
+ shor... |
yt-project__yt-3630 | [GDF] Grids cell width is wrongly set to 1.0 for inappropriate dimension for 2D datasets.
### Bug report
**Bug summary**
I'm trying to create a simple plot for a dataset with a specific orientation: 2d, where x-axis is reduced, y-axis is horizontal and z-axis is vertical. It turns out to be pretty impossible (unl... | [
{
"content": "import os\nimport weakref\n\nimport numpy as np\n\nfrom yt.data_objects.index_subobjects.grid_patch import AMRGridPatch\nfrom yt.data_objects.static_output import Dataset\nfrom yt.funcs import just_one, setdefaultattr\nfrom yt.geometry.grid_geometry_handler import GridIndex\nfrom yt.units.dimensio... | [
{
"content": "import os\nimport weakref\n\nimport numpy as np\n\nfrom yt.data_objects.index_subobjects.grid_patch import AMRGridPatch\nfrom yt.data_objects.static_output import Dataset\nfrom yt.funcs import just_one, setdefaultattr\nfrom yt.geometry.grid_geometry_handler import GridIndex\nfrom yt.units.dimensio... | diff --git a/yt/frontends/gdf/data_structures.py b/yt/frontends/gdf/data_structures.py
index 6c9a744e4c8..4ab77c2377f 100644
--- a/yt/frontends/gdf/data_structures.py
+++ b/yt/frontends/gdf/data_structures.py
@@ -46,11 +46,6 @@ def _setup_dx(self):
else:
LE, RE = self.index.grid_left_edge[id, :], ... |
joke2k__faker-325 | Add ability to generate lorem characters without punctuation
Sometimes I want to generate a string of characters of a specific length without any punctuation or capitalization but the lorem provider currently does not allow for this.
| [
{
"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\n\nfrom decimal import Decimal\nimport sys\n\nfrom faker.providers.lorem.la import Provider as Lorem\n\nfrom .. import BaseProvider\n\n\nif sys.version_info[0] == 2:\n string_types = (basestring,)\nelif sys.version_info[0] == 3:\n str... | [
{
"content": "# coding=utf-8\n\nfrom __future__ import unicode_literals\n\nfrom decimal import Decimal\nimport sys\n\nfrom faker.providers.lorem.la import Provider as Lorem\n\nfrom .. import BaseProvider\n\n\nif sys.version_info[0] == 2:\n string_types = (basestring,)\nelif sys.version_info[0] == 3:\n str... | diff --git a/faker/providers/lorem/__init__.py b/faker/providers/lorem/__init__.py
index 5f07712d24..dea4dd3698 100644
--- a/faker/providers/lorem/__init__.py
+++ b/faker/providers/lorem/__init__.py
@@ -8,7 +8,8 @@ class Provider(BaseProvider):
@classmethod
def word(cls):
"""
- :example 'Lorem... |
freedomofpress__securedrop-3564 | Login throttling should be per-user
# Description
This is a denial of service bug that is fortunately behind the journalist interface ATHS. Login throttling is currently not per-user, it's global, i.e. if a single user is blocked from logging in due to login throttling, then all users are. We should fix this in 0.8.... | [
{
"content": "# -*- coding: utf-8 -*-\nimport binascii\nimport datetime\nimport base64\nimport os\nimport scrypt\nimport pyotp\nimport qrcode\n# Using svg because it doesn't require additional dependencies\nimport qrcode.image.svg\n\n# Find the best implementation available on this platform\ntry:\n from cStr... | [
{
"content": "# -*- coding: utf-8 -*-\nimport binascii\nimport datetime\nimport base64\nimport os\nimport scrypt\nimport pyotp\nimport qrcode\n# Using svg because it doesn't require additional dependencies\nimport qrcode.image.svg\n\n# Find the best implementation available on this platform\ntry:\n from cStr... | diff --git a/securedrop/models.py b/securedrop/models.py
index 0b099562a5..3eab69dc21 100644
--- a/securedrop/models.py
+++ b/securedrop/models.py
@@ -407,6 +407,7 @@ def throttle_login(cls, user):
login_attempt_period = datetime.datetime.utcnow() - \
datetime.timedelta(seconds=cls._LOGIN_ATTEMPT_... |
dask__distributed-270 | WindowsError on dscheduler
So it appears that Bokeh is not found, but I have Bokeh and everything is up to date.
Interesting...
here lieth the traceback:
```
distributed.scheduler - INFO - Start Scheduler at: 192.168.0.7:8786
distributed.scheduler - INFO - http at: 192.168.0.7:9786
distr... | [
{
"content": "from __future__ import print_function, division, absolute_import\n\nimport json\nimport logging\nimport multiprocessing\nimport os\nimport socket\nimport subprocess\nimport sys\nfrom time import sleep\n\nimport click\n\nimport distributed\nfrom distributed import Scheduler\nfrom distributed.utils ... | [
{
"content": "from __future__ import print_function, division, absolute_import\n\nimport json\nimport logging\nimport multiprocessing\nimport os\nimport socket\nimport subprocess\nimport sys\nfrom time import sleep\n\nimport click\n\nimport distributed\nfrom distributed import Scheduler\nfrom distributed.utils ... | diff --git a/distributed/cli/dscheduler.py b/distributed/cli/dscheduler.py
index b7c5a806c46..60e3bc5ade9 100755
--- a/distributed/cli/dscheduler.py
+++ b/distributed/cli/dscheduler.py
@@ -62,7 +62,8 @@ def main(center, host, port, http_port, bokeh_port, show, _bokeh, bokeh_whitelis
dirname = os.path.dirna... |
elastic__apm-agent-python-2002 | AttributeError: 'Retry' object has no attribute 'copy'
The `elasticapm` Python client fails with `AttributeError: 'Retry' object has no attribute 'copy'` during HTTP retries.
The Elastic APM UI points towards the following lines being responsible for the crash https://github.com/elastic/apm-agent-python/blob/c9a1f7a... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | [
{
"content": "# BSD 3-Clause License\n#\n# Copyright (c) 2019, Elasticsearch BV\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain... | diff --git a/elasticapm/instrumentation/packages/urllib3.py b/elasticapm/instrumentation/packages/urllib3.py
index cc7206e83..93d9c3392 100644
--- a/elasticapm/instrumentation/packages/urllib3.py
+++ b/elasticapm/instrumentation/packages/urllib3.py
@@ -61,12 +61,7 @@ def update_headers(args, kwargs, instance, transacti... |
urllib3__urllib3-3344 | urllib3 2.2 explicitly casts all headers to HTTPHeaderDict
### Subject
Originally reported in https://github.com/boto/botocore/issues/3111, we noticed users started experiencing TypeErrors being raised from urllib3 around the time 2.2.0 was released. After a deeper dive, it appears a change was made in https://githu... | [
{
"content": "from __future__ import annotations\n\nimport errno\nimport logging\nimport queue\nimport sys\nimport typing\nimport warnings\nimport weakref\nfrom socket import timeout as SocketTimeout\nfrom types import TracebackType\n\nfrom ._base_connection import _TYPE_BODY\nfrom ._collections import HTTPHead... | [
{
"content": "from __future__ import annotations\n\nimport errno\nimport logging\nimport queue\nimport sys\nimport typing\nimport warnings\nimport weakref\nfrom socket import timeout as SocketTimeout\nfrom types import TracebackType\n\nfrom ._base_connection import _TYPE_BODY\nfrom ._collections import HTTPHead... | diff --git a/changelog/3343.bugfix.rst b/changelog/3343.bugfix.rst
new file mode 100644
index 0000000000..4f2df9e7a4
--- /dev/null
+++ b/changelog/3343.bugfix.rst
@@ -0,0 +1 @@
+Fixed ``HTTPConnectionPool.urlopen`` to stop automatically casting non-proxy headers to ``HTTPHeaderDict``. This change was premature as it di... |
TheAlgorithms__Python-9161 | issue with permute_recursive
### What would you like to share?
Your code looks mostly correct, but there's one issue in the `permute_recursive` function due to the modification of the `nums` list. Lists in Python are mutable, and when you use `nums.pop(0)`, it modifies the original `nums` list. This can lead to incorr... | [
{
"content": "def permute_recursive(nums: list[int]) -> list[list[int]]:\n \"\"\"\n Return all permutations.\n\n >>> permute_recursive([1, 2, 3])\n [[3, 2, 1], [2, 3, 1], [1, 3, 2], [3, 1, 2], [2, 1, 3], [1, 2, 3]]\n \"\"\"\n result: list[list[int]] = []\n if len(nums) == 0:\n return... | [
{
"content": "def permute_recursive(nums: list[int]) -> list[list[int]]:\n \"\"\"\n Return all permutations.\n\n >>> permute_recursive([1, 2, 3])\n [[3, 2, 1], [2, 3, 1], [1, 3, 2], [3, 1, 2], [2, 1, 3], [1, 2, 3]]\n \"\"\"\n result: list[list[int]] = []\n if len(nums) == 0:\n return... | diff --git a/data_structures/arrays/permutations.py b/data_structures/arrays/permutations.py
index 0f029187b92b..4906dd5c2ae1 100644
--- a/data_structures/arrays/permutations.py
+++ b/data_structures/arrays/permutations.py
@@ -10,7 +10,7 @@ def permute_recursive(nums: list[int]) -> list[list[int]]:
return [[]]... |
streamlink__streamlink-1082 | Unable to open Smashcast streams
I get the following error whenever I try to open a Smashcast stream
```
streamlink smashcast.tv/greatvaluesmash best
[cli][info] Found matching plugin hitbox for URL smashcast.tv/greatvaluesmash
Traceback (most recent call last):
File "C:\Program Files (x86)\Streamlink\bin\str... | [
{
"content": "import re\n\nfrom itertools import chain\n\nfrom streamlink.compat import urlparse\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import StreamMapper, http, validate\nfrom streamlink.stream import HLSStream, HTTPStream, RTMPStream\nfrom streamlink.utils import absolute_url\n\nHL... | [
{
"content": "import re\n\nfrom itertools import chain\n\nfrom streamlink.compat import urlparse\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import StreamMapper, http, validate\nfrom streamlink.stream import HLSStream, HTTPStream, RTMPStream\nfrom streamlink.utils import absolute_url\n\nHL... | diff --git a/src/streamlink/plugins/hitbox.py b/src/streamlink/plugins/hitbox.py
index 4d7a3e9b584..ddb45036a71 100644
--- a/src/streamlink/plugins/hitbox.py
+++ b/src/streamlink/plugins/hitbox.py
@@ -178,7 +178,7 @@ def _get_streams(self):
if not media_id:
res = http.get(LIVE_API.format(channel))... |
optuna__optuna-44 | sample_categorical does not work with RDBStorage
`sample_categorical` raises errors when storage is an RDBStorage, due to a cast problem.
Repro:
```python
from pfnopt import minimize
from pfnopt.storage import RDBStorage
from pfnopt.study import create_new_study
def objective(client):
y = client.... | [
{
"content": "import math\nimport numpy\nfrom typing import List # NOQA\nfrom typing import Optional # NOQA\n\nfrom pfnopt import distributions # NOQA\nfrom pfnopt.samplers import _hyperopt\nfrom pfnopt.samplers import base\nfrom pfnopt.samplers import random\nfrom pfnopt.storage.base import BaseStorage # N... | [
{
"content": "import math\nimport numpy\nfrom typing import List # NOQA\nfrom typing import Optional # NOQA\n\nfrom pfnopt import distributions # NOQA\nfrom pfnopt.samplers import _hyperopt\nfrom pfnopt.samplers import base\nfrom pfnopt.samplers import random\nfrom pfnopt.storage.base import BaseStorage # N... | diff --git a/pfnopt/samplers/tpe.py b/pfnopt/samplers/tpe.py
index 3a9802ca75..0ded6083f7 100644
--- a/pfnopt/samplers/tpe.py
+++ b/pfnopt/samplers/tpe.py
@@ -75,6 +75,8 @@ def _sample_loguniform(self, distribution, below, above):
def _sample_categorical(self, distribution, below, above):
# type: (distrib... |
geopandas__geopandas-478 | BUG: coordinate indexer does not correctly handle slice start/stop of 0
When slicing a geoseries using the coordinate indexer, a slice start/stop of 0 is ignored.
```
>>> gs = gpd.GeoSeries([Point(x, x) for x in range(-3, 4)])
>>> print(gs)
0 POINT (-3 -3)
1 POINT (-2 -2)
2 POINT (-1 -1)
3 POINT ... | [
{
"content": "from functools import partial\nimport json\nfrom warnings import warn\n\nimport numpy as np\nfrom pandas import Series, DataFrame\nfrom pandas.core.indexing import _NDFrameIndexer\n\nimport pyproj\nfrom shapely.geometry import box, shape, Polygon, Point\nfrom shapely.geometry.collection import Geo... | [
{
"content": "from functools import partial\nimport json\nfrom warnings import warn\n\nimport numpy as np\nfrom pandas import Series, DataFrame\nfrom pandas.core.indexing import _NDFrameIndexer\n\nimport pyproj\nfrom shapely.geometry import box, shape, Polygon, Point\nfrom shapely.geometry.collection import Geo... | diff --git a/geopandas/geoseries.py b/geopandas/geoseries.py
index 1a106bb6ba..d057ff5822 100644
--- a/geopandas/geoseries.py
+++ b/geopandas/geoseries.py
@@ -37,10 +37,10 @@ def _getitem_tuple(self, tup):
if xs.step is not None or ys.step is not None:
warn("Ignoring step - full interval is used."... |
zulip__zulip-26770 | Add inbox view to set of allowed default views.
| [
{
"content": "from typing import Any, Dict, Optional, Union\n\nfrom django.core.exceptions import ValidationError\nfrom django.http import HttpRequest, HttpResponse\nfrom django.shortcuts import render\nfrom django.utils.translation import gettext as _\nfrom django.views.decorators.http import require_safe\n\nf... | [
{
"content": "from typing import Any, Dict, Optional, Union\n\nfrom django.core.exceptions import ValidationError\nfrom django.http import HttpRequest, HttpResponse\nfrom django.shortcuts import render\nfrom django.utils.translation import gettext as _\nfrom django.views.decorators.http import require_safe\n\nf... | diff --git a/web/src/hashchange.js b/web/src/hashchange.js
index 6a84f59c4d334..289dd4f4cfd1f 100644
--- a/web/src/hashchange.js
+++ b/web/src/hashchange.js
@@ -149,20 +149,30 @@ function show_default_view() {
// This function should only be called from the hashchange
// handlers, as it does not set the hash ... |
cloud-custodian__cloud-custodian-6235 | Custodian errors when using example conditional policy with a gcp resource
**Describe the bug**
Attempting to run the [example conditional execution policy ](https://cloudcustodian.io/docs/quickstart/advanced.html#conditional-policy-execution) in combination with a gcp resource results in an error when validating the ... | [
{
"content": "# Copyright 2015-2018 Capital One Services, LLC\n# Copyright The Cloud Custodian Authors.\n# SPDX-License-Identifier: Apache-2.0\nfrom datetime import datetime\nimport json\nimport fnmatch\nimport itertools\nimport logging\nimport os\nimport time\n\nfrom dateutil import parser, tz as tzutil\nimpor... | [
{
"content": "# Copyright 2015-2018 Capital One Services, LLC\n# Copyright The Cloud Custodian Authors.\n# SPDX-License-Identifier: Apache-2.0\nfrom datetime import datetime\nimport json\nimport fnmatch\nimport itertools\nimport logging\nimport os\nimport time\n\nfrom dateutil import parser, tz as tzutil\nimpor... | diff --git a/c7n/policy.py b/c7n/policy.py
index c0baaa1a7f3..40d40ea6249 100644
--- a/c7n/policy.py
+++ b/c7n/policy.py
@@ -927,10 +927,13 @@ def __init__(self, policy, data):
self.session_factory = rm.session_factory
# used by c7n-org to extend evaluation conditions
self.env_vars = {}
+ ... |
tornadoweb__tornado-745 | remote_ip breaks if "X-Forwarded-For" is a list
From the mailing list:
The "X-Forwarded-For" header can be a comma-separated list of IP addresses. This happens when Tornado is behind a reverse proxy such as HAProxy. The first IP in the list will be the original client IP, and the last one will be the proxy closest to... | [
{
"content": "#!/usr/bin/env python\n#\n# Copyright 2009 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle... | [
{
"content": "#!/usr/bin/env python\n#\n# Copyright 2009 Facebook\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle... | diff --git a/tornado/httpserver.py b/tornado/httpserver.py
index 16472fa44d..f597737a0b 100644
--- a/tornado/httpserver.py
+++ b/tornado/httpserver.py
@@ -431,8 +431,10 @@ def __init__(self, method, uri, version="HTTP/1.0", headers=None,
# xheaders can override the defaults
if connection and connectio... |
zulip__zulip-16602 | Translation for zh_TW gets ignored in some places
In the webapp, if I try switching to the translation for "Chinese (Taiwan)", a lot of the text on the screen is still untranslated:

That's even though many (at ... | [
{
"content": "# See https://zulip.readthedocs.io/en/latest/translating/internationalization.html\n\nimport logging\nimport operator\nimport os\nfrom functools import lru_cache\nfrom itertools import zip_longest\nfrom typing import Any, Dict, List, Optional\n\nimport orjson\nfrom django.conf import settings\nfro... | [
{
"content": "# See https://zulip.readthedocs.io/en/latest/translating/internationalization.html\n\nimport logging\nimport operator\nimport os\nfrom functools import lru_cache\nfrom itertools import zip_longest\nfrom typing import Any, Dict, List, Optional\n\nimport orjson\nfrom django.conf import settings\nfro... | diff --git a/zerver/lib/i18n.py b/zerver/lib/i18n.py
index ee1765adccbbb..b77d6e93cb24b 100644
--- a/zerver/lib/i18n.py
+++ b/zerver/lib/i18n.py
@@ -73,13 +73,8 @@ def get_available_language_codes() -> List[str]:
def get_language_translation_data(language: str) -> Dict[str, str]:
if language == 'en':
ret... |
cupy__cupy-920 | cupy 2.2.0 with cudnn support: installation fails with cython 0.25.2
When installing cupy 2.2.0 when cudnn is present, installation fails depending on the Cython version that is present.
To reproduce, check the following Dockerfile:
```
FROM nvidia/cuda:8.0-cudnn7-devel-ubuntu16.04
RUN apt-get update && apt-get... | [
{
"content": "from __future__ import print_function\nfrom distutils import ccompiler\nfrom distutils import errors\nfrom distutils import msvccompiler\nfrom distutils import sysconfig\nfrom distutils import unixccompiler\nimport os\nfrom os import path\nimport sys\n\nimport pkg_resources\nimport setuptools\nfro... | [
{
"content": "from __future__ import print_function\nfrom distutils import ccompiler\nfrom distutils import errors\nfrom distutils import msvccompiler\nfrom distutils import sysconfig\nfrom distutils import unixccompiler\nimport os\nfrom os import path\nimport sys\n\nimport pkg_resources\nimport setuptools\nfro... | diff --git a/MANIFEST.in b/MANIFEST.in
index 0098efe6376..0d76d54b449 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,3 +1,4 @@
-recursive-include cupy *.pyx *.pxd *.pxi *.h
+recursive-include cupy *.h
+recursive-exclude cupy *.pyx *.pxd *.pxi
include cupy_setup_build.py
recursive-include install *.py
diff --git a/c... |
streamlit__streamlit-1295 | Remove Streamlit Mapbox API key
_Edit: apparently this is _not_ how Mapbox works. See Update section below._
If I understand correctly how Mapbox works, I think we don't need an API key by default since Mapbox throttles usage of their maps based on IP address (which is user-specific).
Can we just remove the defau... | [
{
"content": "# Copyright 2018-2020 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | [
{
"content": "# Copyright 2018-2020 Streamlit Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | diff --git a/.circleci/config.yml b/.circleci/config.yml
index bc14981c8d6f..af5b55d8066f 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -482,12 +482,19 @@ jobs:
- run:
name: Install Cypress dependencies
command: |
- ${SUDO} apt-get install -y xvfb libgtk2.0-0 li... |
wagtail__wagtail-9090 | Implement target width, resize rules, and overlap fallback for side panels
In https://github.com/wagtail/wagtail/blob/main/client/scss/components/forms/_form-width.scss, we define how much of the forms’ width should be dedicated to the form itself. This has fallen out of date with our [design system’s grid setup](https... | [
{
"content": "import json\nfrom datetime import datetime\nfrom urllib.parse import urljoin\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.admin.utils import quote\nfrom django.contrib.humanize.templatetags.humanize import intcomma, naturaltime\nfrom django.contrib.messages... | [
{
"content": "import json\nfrom datetime import datetime\nfrom urllib.parse import urljoin\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.admin.utils import quote\nfrom django.contrib.humanize.templatetags.humanize import intcomma, naturaltime\nfrom django.contrib.messages... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index abe90a8ad4be..6cdeb98b82d2 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -45,6 +45,8 @@ Changelog
* Support "Ctrl + f" in-page search within collapsed StreamField blocks (Thibaud Colas)
* Remember the last opened side panel in the page editor, activating it on pa... |
kubeflow__pipelines-6600 | [sdk] Compilation problems in kfp==1.7.1 when creating two independent operators from the same python component.
### Environment
```
$ pip list | grep kfp
kfp 1.7.1
kfp-pipeline-spec 0.1.9
kfp-server-api 1.4.1
```
### Steps to reproduce
I have a python ... | [
{
"content": "# Copyright 2018-2019 The Kubeflow 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 requi... | [
{
"content": "# Copyright 2018-2019 The Kubeflow 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 requi... | diff --git a/sdk/RELEASE.md b/sdk/RELEASE.md
index 7514779180c..0dc176a150b 100644
--- a/sdk/RELEASE.md
+++ b/sdk/RELEASE.md
@@ -18,7 +18,7 @@
* Support re-use of PVC with VolumeOp. [\#6582](https://github.com/kubeflow/pipelines/pull/6582)
* When namespace file is missing, remove stack trace so it doesn't look like a... |
WeblateOrg__weblate-9990 | docker: Enable WEBLATE_GITLAB_CREDENTIALS environment variable
### Describe the problem
Right now it seems I can use gitlab_username and gitlab_token variables. But when I try to use gitlab_credentials:
> WEBLATE_GITLAB_CREDENTIALS: "git.duniter.org": {username: weblate,token: XXXXXXXXXXXXXXX}
I get this e... | [
{
"content": "# Copyright © Michal Čihař <michal@weblate.org>\n#\n# SPDX-License-Identifier: GPL-3.0-or-later\n\nfrom __future__ import annotations\n\nimport os\n\n\ndef get_env_str(\n name: str,\n default: str | None = None,\n required: bool = False,\n fallback_name: str | None = None,\n) -> str:\n... | [
{
"content": "# Copyright © Michal Čihař <michal@weblate.org>\n#\n# SPDX-License-Identifier: GPL-3.0-or-later\n\nfrom __future__ import annotations\n\nimport ast\nimport os\n\n\ndef get_env_str(\n name: str,\n default: str | None = None,\n required: bool = False,\n fallback_name: str | None = None,\... | diff --git a/docs/admin/install/docker.rst b/docs/admin/install/docker.rst
index a1e7832bb997..4109690a14c8 100644
--- a/docs/admin/install/docker.rst
+++ b/docs/admin/install/docker.rst
@@ -751,6 +751,7 @@ Generic settings
.. envvar:: WEBLATE_GITHUB_USERNAME
.. envvar:: WEBLATE_GITHUB_TOKEN
.. envvar:: WEBLATE_GITH... |
mlflow__mlflow-5559 | [BUG] PyTorch LightningDeprecationWarning ModelSummary and get_gpu_memory_map
Thank you for submitting an issue. Please refer to our [issue policy](https://www.github.com/mlflow/mlflow/blob/master/ISSUE_POLICY.md) for additional information about bug reports. For help with debugging your code, please refer to [Stack Ov... | [
{
"content": "from packaging.version import Version\nimport logging\nimport mlflow.pytorch\nimport os\nimport shutil\nimport tempfile\nimport pytorch_lightning as pl\nfrom pytorch_lightning.core.memory import ModelSummary\nfrom pytorch_lightning.utilities import rank_zero_only\n\nfrom mlflow.exceptions import M... | [
{
"content": "from packaging.version import Version\nimport logging\nimport mlflow.pytorch\nimport os\nimport shutil\nimport tempfile\nimport pytorch_lightning as pl\nfrom pytorch_lightning.utilities import rank_zero_only\n\nfrom mlflow.exceptions import MlflowException\nfrom mlflow.utils.autologging_utils impo... | diff --git a/mlflow/pytorch/_pytorch_autolog.py b/mlflow/pytorch/_pytorch_autolog.py
index 05293b50907bb..e341563311b6b 100644
--- a/mlflow/pytorch/_pytorch_autolog.py
+++ b/mlflow/pytorch/_pytorch_autolog.py
@@ -5,7 +5,6 @@
import shutil
import tempfile
import pytorch_lightning as pl
-from pytorch_lightning.core.me... |
ansible-collections__community.general-3719 | #2267 lead to behaviour regression
### Summary
I recently upgraded to 3.5.0, which is past the point #2267 was merged.
This PR broke some behaviour I have been using for a long time with the lvol module.
I manage a large number of VMs - when they're created from a template with variable disk size, I create an l... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be>, Alexander Bulimov <lazywolf0@gmail.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, pr... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2013, Jeroen Hoekx <jeroen.hoekx@dsquare.be>, Alexander Bulimov <lazywolf0@gmail.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, pr... | diff --git a/changelogs/fragments/3681-lvol-fix-create.yml b/changelogs/fragments/3681-lvol-fix-create.yml
new file mode 100644
index 00000000000..d04ec5460b8
--- /dev/null
+++ b/changelogs/fragments/3681-lvol-fix-create.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - lvol - allows logical volumes to be created with certain size a... |
qutebrowser__qutebrowser-2399 | ValueError: fileobj was already set! (opening downloads twice)
Report on v0.9.1 with QtWebKit and Qt 5.5.1, on Windows:
> I think I hit ctrl+x twice and before the prompt opened..
```
11:17:56 DEBUG downloads qtnetworkdownloads:fetch:464 fetch: PyQt5.QtCore.QUrl('http://sharepoint/sites/esec/it/IT Documentat... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | [
{
"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License... | diff --git a/qutebrowser/browser/downloads.py b/qutebrowser/browser/downloads.py
index 8a1a7853a96..0e6a7af4f19 100644
--- a/qutebrowser/browser/downloads.py
+++ b/qutebrowser/browser/downloads.py
@@ -529,7 +529,11 @@ def open_file(self, cmdline=None):
if filename is None: # pragma: no cover
log.... |
comic__grand-challenge.org-1265 | Reader study progress bar text hard to read
Too small, wrong colour.
| [
{
"content": "import json\nfrom collections import Counter\n\nimport numpy as np\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group\nfrom django.contrib.postgres.fields import JSONField\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom djang... | [
{
"content": "import json\nfrom collections import Counter\n\nimport numpy as np\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group\nfrom django.contrib.postgres.fields import JSONField\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom djang... | diff --git a/app/grandchallenge/jqfileupload/static/jqfileupload/js/upload_widget.js b/app/grandchallenge/jqfileupload/static/jqfileupload/js/upload_widget.js
index f56edad1ce..6711a8abf5 100644
--- a/app/grandchallenge/jqfileupload/static/jqfileupload/js/upload_widget.js
+++ b/app/grandchallenge/jqfileupload/static/jq... |
kornia__kornia-786 | RandomAffine with 2 values for scale specified
## 🐛 Bug: RandomAffine and scale
I'm getting the following error when using `RandomAffine` initialized with a tuple of two values for `scale`:
```
TypeError: scale_y should be a float number or a tuple with length 2 whose values between (-inf, inf).Got tensor([])... | [
{
"content": "from typing import Tuple, List, Union, Dict, Optional, cast\nimport random\n\nimport torch\nfrom torch.distributions import Bernoulli\n\nfrom kornia.constants import Resample, BorderType, SamplePadding\nfrom kornia.geometry import bbox_generator\nfrom ..utils import (\n _adapted_sampling,\n ... | [
{
"content": "from typing import Tuple, List, Union, Dict, Optional, cast\nimport random\n\nimport torch\nfrom torch.distributions import Bernoulli\n\nfrom kornia.constants import Resample, BorderType, SamplePadding\nfrom kornia.geometry import bbox_generator\nfrom ..utils import (\n _adapted_sampling,\n ... | diff --git a/kornia/augmentation/random_generator/random_generator.py b/kornia/augmentation/random_generator/random_generator.py
index db0f2ffe8f..a630fd762a 100644
--- a/kornia/augmentation/random_generator/random_generator.py
+++ b/kornia/augmentation/random_generator/random_generator.py
@@ -187,7 +187,7 @@ def rando... |
web2py__web2py-2115 | Python 3 compatibility fix
https://github.com/web2py/web2py/blob/master/gluon/contrib/webclient.py#L124 should be `data['_formname'] = list(self.forms.keys())[0]` to avoid `TypeError: 'dict_keys' object does not support indexing` when this is executing under Python 3.
| [
{
"content": "\"\"\"\nDeveloped by Massimo Di Pierro\nReleased under the web2py license (LGPL)\n\nIt an interface on top of urllib2 which simplifies scripting of http requests\nmostly for testing purposes\n\n- customizable\n- supports basic auth\n- supports cookies\n- supports session cookies (tested with web2p... | [
{
"content": "\"\"\"\nDeveloped by Massimo Di Pierro\nReleased under the web2py license (LGPL)\n\nIt an interface on top of urllib2 which simplifies scripting of http requests\nmostly for testing purposes\n\n- customizable\n- supports basic auth\n- supports cookies\n- supports session cookies (tested with web2p... | diff --git a/gluon/contrib/webclient.py b/gluon/contrib/webclient.py
index 6454e97f4..beac2ff9d 100644
--- a/gluon/contrib/webclient.py
+++ b/gluon/contrib/webclient.py
@@ -121,7 +121,7 @@ def post(self, url, data=None, cookies=None,
self.method = 'POST' if method=='auto' else method
#... |
python__mypy-9452 | Overload with Dict only checks overlap on keys
Using mypy 0.782, it looks like overlap is only checked on dictionary keys.
```
from typing import Dict, overload
class A: pass
class B: pass
@overload
def foo(x: Dict[A, A]) -> A: ...
@overload
def foo(x: Dict[A, B]) -> B: ...
def foo(x):
for k, v ... | [
{
"content": "from mypy.ordered_dict import OrderedDict\nfrom typing import List, Optional, Tuple, Callable\n\nfrom mypy.join import (\n is_similar_callables, combine_similar_callables, join_type_list, unpack_callback_protocol\n)\nfrom mypy.types import (\n Type, AnyType, TypeVisitor, UnboundType, NoneTyp... | [
{
"content": "from mypy.ordered_dict import OrderedDict\nfrom typing import List, Optional, Tuple, Callable\n\nfrom mypy.join import (\n is_similar_callables, combine_similar_callables, join_type_list, unpack_callback_protocol\n)\nfrom mypy.types import (\n Type, AnyType, TypeVisitor, UnboundType, NoneTyp... | diff --git a/mypy/meet.py b/mypy/meet.py
index 3446783c9f0a..2e01116e6d73 100644
--- a/mypy/meet.py
+++ b/mypy/meet.py
@@ -339,9 +339,9 @@ def _type_object_overlap(left: Type, right: Type) -> bool:
# Or, to use a more concrete example, List[Union[A, B]] and List[Union[B, C]]
# would be conside... |
PaddlePaddle__models-2482 | deeplabv3+ eval 报维度错误
在paddle1.5分支下,deeplabv3+ 的评估有如下报错:
Traceback (most recent call last):
File "./eval.py", line 131, in <module>
fetch_list=[pred, miou, out_wrong, out_correct])
File "/opt/_internal/cpython-3.6.0/lib/python3.6/site-packages/paddle/fluid/executor.py", line 650, in run
use_program_cac... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport os\nif 'FLAGS_fraction_of_gpu_memory_to_use' not in os.environ:\n os.environ['FLAGS_fraction_of_gpu_memory_to_use'] = '0.98'\nos.environ['FLAGS_enable_parallel_graph'] = '1'\n\... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport os\nif 'FLAGS_fraction_of_gpu_memory_to_use' not in os.environ:\n os.environ['FLAGS_fraction_of_gpu_memory_to_use'] = '0.98'\nos.environ['FLAGS_enable_parallel_graph'] = '1'\n\... | diff --git a/PaddleCV/deeplabv3+/eval.py b/PaddleCV/deeplabv3+/eval.py
index a0bd5b74eb..94d82e70d2 100644
--- a/PaddleCV/deeplabv3+/eval.py
+++ b/PaddleCV/deeplabv3+/eval.py
@@ -112,7 +112,7 @@ def load_model():
batches = dataset.get_batch_generator(batch_size, total_step)
if args.use_py_reader:
- py_reader.dec... |
pypa__pip-11417 | Completion in ZSH doesn't understand that arguments follow certain options
* Pip version: 9.0.1
* Python version: 2.7.12
* Operating system: Ubuntu 16.04
### Description:
Completion in Zsh uses the older `compctl` builtin and returns completions for long options that take arguments with a trailing equals sign. ... | [
{
"content": "import sys\nimport textwrap\nfrom optparse import Values\nfrom typing import List\n\nfrom pip._internal.cli.base_command import Command\nfrom pip._internal.cli.status_codes import SUCCESS\nfrom pip._internal.utils.misc import get_prog\n\nBASE_COMPLETION = \"\"\"\n# pip {shell} completion start{scr... | [
{
"content": "import sys\nimport textwrap\nfrom optparse import Values\nfrom typing import List\n\nfrom pip._internal.cli.base_command import Command\nfrom pip._internal.cli.status_codes import SUCCESS\nfrom pip._internal.utils.misc import get_prog\n\nBASE_COMPLETION = \"\"\"\n# pip {shell} completion start{scr... | diff --git a/news/11416.bugfix.rst b/news/11416.bugfix.rst
new file mode 100644
index 00000000000..3815b2da864
--- /dev/null
+++ b/news/11416.bugfix.rst
@@ -0,0 +1 @@
+Fix ``pip completion --zsh``.
diff --git a/src/pip/_internal/commands/completion.py b/src/pip/_internal/commands/completion.py
index deaa30899e6..30233f... |
flairNLP__flair-587 | one redundant code line
in TextClassifier class
`
34 self.document_embeddings = document_embeddings
`
`
38 self.document_embeddings: flair.embeddings.DocumentLSTMEmbeddings = document_embeddings
`
| [
{
"content": "import warnings\nimport logging\nfrom pathlib import Path\nfrom typing import List, Union\n\nimport torch\nimport torch.nn as nn\n\nimport flair.nn\nimport flair.embeddings\nfrom flair.data import Dictionary, Sentence, Label\nfrom flair.file_utils import cached_path\nfrom flair.training_utils impo... | [
{
"content": "import warnings\nimport logging\nfrom pathlib import Path\nfrom typing import List, Union\n\nimport torch\nimport torch.nn as nn\n\nimport flair.nn\nimport flair.embeddings\nfrom flair.data import Dictionary, Sentence, Label\nfrom flair.file_utils import cached_path\nfrom flair.training_utils impo... | diff --git a/flair/models/text_classification_model.py b/flair/models/text_classification_model.py
index 224d8e9574..ff17a27325 100644
--- a/flair/models/text_classification_model.py
+++ b/flair/models/text_classification_model.py
@@ -31,12 +31,10 @@ def __init__(self,
super(TextClassifier, self).__init__()
... |
dask__dask-6982 | Cannot compare tz-naive and tz-aware timestamps on concat
**What happened**:
When concatenating two dask dataframes with indices dype=datetime64[ns, UTC], I get a `TypeError: Cannot compare tz-naive and tz-aware timestamps`. One of the the dask dataframe was created with `dd.from_pandas` and the other with `dd.read_... | [
{
"content": "from distutils.version import LooseVersion\n\nfrom collections import OrderedDict\nimport copy\nimport json\nimport warnings\n\nimport tlz as toolz\n\nimport numpy as np\nimport pandas as pd\n\ntry:\n import fastparquet\n from fastparquet import ParquetFile\n from fastparquet.util import ... | [
{
"content": "from distutils.version import LooseVersion\n\nfrom collections import OrderedDict\nimport copy\nimport json\nimport warnings\n\nimport tlz as toolz\n\nimport numpy as np\nimport pandas as pd\n\ntry:\n import fastparquet\n from fastparquet import ParquetFile\n from fastparquet.util import ... | diff --git a/dask/dataframe/io/parquet/fastparquet.py b/dask/dataframe/io/parquet/fastparquet.py
index 8aa17aa6a32..1b36226ca37 100644
--- a/dask/dataframe/io/parquet/fastparquet.py
+++ b/dask/dataframe/io/parquet/fastparquet.py
@@ -322,8 +322,9 @@ def read_metadata(
skip_cols.add(col)
... |
getnikola__nikola-1908 | nikola check --clean-files should delete empty directories
| [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2015 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2015 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi... | diff --git a/CHANGES.txt b/CHANGES.txt
index d3b33f6351..60c9af741f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,8 @@ New in master
Features
--------
+* Remove empty directories with nikola check --clean-files (Issue #1873)
+
Bugfixes
--------
diff --git a/nikola/plugins/command/check.py b/nikola/plugi... |
avocado-framework__avocado-4253 | distutils depreaction
https://www.python.org/dev/peps/pep-0632/
We have one module using this: `avocado.utils.kernel`.
| [
{
"content": "# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope t... | [
{
"content": "# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope t... | diff --git a/avocado/utils/kernel.py b/avocado/utils/kernel.py
index b7bb9f7321..66ba3555d8 100644
--- a/avocado/utils/kernel.py
+++ b/avocado/utils/kernel.py
@@ -22,7 +22,8 @@
import os
import shutil
import tempfile
-from distutils.version import LooseVersion # pylint: disable=E0611
+
+from pkg_resources import pa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.