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 ⌀ |
|---|---|---|---|---|
cookiecutter__cookiecutter-django-3848 | [Update Django] Django 4.0
4.0 requirements tables
## base.txt
| Name | Version in Master | 4.0 Compatible Version | OK |
| ---- | :---------------: | :-----------------------------: | :-: |
| [pytz](http://pythonhosted.org/pytz) | 2022.4 | n/a | ✅ |
| [python-slugify](https://github.com/un33k/python-slugify) | 6.1... | [
{
"content": "#!/usr/bin/env python\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n# We use calendar versioning\nversion = \"2022.10.13\"\n\nwith open(\"README.rst\") as readme_file:\n long_description = readme_file.read()\n\nsetup(\n name=\"cookiecut... | [
{
"content": "#!/usr/bin/env python\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n# We use calendar versioning\nversion = \"2022.10.13\"\n\nwith open(\"README.rst\") as readme_file:\n long_description = readme_file.read()\n\nsetup(\n name=\"cookiecut... | diff --git a/README.md b/README.md
index 7059e07d2a..149227e03c 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ production-ready Django projects quickly.
## Features
-- For Django 3.2
+- For Django 4.0
- Works with Python 3.9
- Renders Django projects with 100% starting test coverage
- Twitte... |
numpy__numpy-12239 | polyval turns masked array into array (Trac #1884)
_Original ticket http://projects.scipy.org/numpy/ticket/1884 on 2011-06-28 by trac user mauro, assigned to @pierregm._
When using a masked array as input for polyval, then the return is an array. I think it should be a masked array again (or at least document it that... | [
{
"content": "\"\"\"\nFunctions to operate on polynomials.\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\n__all__ = ['poly', 'roots', 'polyint', 'polyder', 'polyadd',\n 'polysub', 'polymul', 'polydiv', 'polyval', 'poly1d',\n 'polyfit', 'RankWarning']\n\nimport... | [
{
"content": "\"\"\"\nFunctions to operate on polynomials.\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\n__all__ = ['poly', 'roots', 'polyint', 'polyder', 'polyadd',\n 'polysub', 'polymul', 'polydiv', 'polyval', 'poly1d',\n 'polyfit', 'RankWarning']\n\nimport... | diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py
index 9f3b84732f99..165fd1b954a8 100644
--- a/numpy/lib/polynomial.py
+++ b/numpy/lib/polynomial.py
@@ -651,6 +651,8 @@ def polyval(p, x):
for polynomials of high degree the values may be inaccurate due to
rounding errors. Use carefully.
+ If... |
easybuilders__easybuild-easyblocks-1795 | CP2K easyblock fails when using Python 3
```
$ CP2K-6.1-foss-2019a.eb
...
== testing...
ERROR: Traceback (most recent call last):
File "/home/kehoste/easybuild-framework/easybuild/main.py", line 112, in build_and_install_software
(ec_res['success'], app_log, err) = build_and_install_one(ec, init_env)
Fil... | [
{
"content": "##\n# Copyright 2009-2019 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# F... | [
{
"content": "##\n# Copyright 2009-2019 Ghent University\n#\n# This file is part of EasyBuild,\n# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n# with support of Ghent University (http://ugent.be/hpc),\n# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),\n# F... | diff --git a/easybuild/easyblocks/c/cp2k.py b/easybuild/easyblocks/c/cp2k.py
index 674b81c3b2b..fff471b688b 100644
--- a/easybuild/easyblocks/c/cp2k.py
+++ b/easybuild/easyblocks/c/cp2k.py
@@ -699,7 +699,7 @@ def test_step(self):
self.log.info("No reference output found for regression test, just contin... |
ansible-collections__community.general-986 | parted: unexpected partition table wipe
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->
##### SUMMARY
<!--- Explain the problem ... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2016, Fabrizio Colonna <colofabrix@tin.it>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOC... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2016, Fabrizio Colonna <colofabrix@tin.it>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\nDOC... | diff --git a/changelogs/fragments/522-parted_change_label.yml b/changelogs/fragments/522-parted_change_label.yml
new file mode 100644
index 00000000000..4d30dec1d87
--- /dev/null
+++ b/changelogs/fragments/522-parted_change_label.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - "parted - fix creating partition when label is changed ... |
Kinto__kinto-1312 | PostgreSQL Cache: Deadlock
```
(psycopg2.extensions.TransactionRollbackError) deadlock detected
DETAIL: Process 12750 waits for ShareLock on transaction 632693475; blocked by process 10080.
Process 10080 waits for ShareLock on transaction 632693479; blocked by process 12750.
HINT: See server log for query details... | [
{
"content": "import logging\nimport os\n\nfrom kinto.core.cache import CacheBase\nfrom kinto.core.storage.postgresql.client import create_from_config\nfrom kinto.core.utils import json\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass Cache(CacheBase):\n \"\"\"Cache backend using PostgreSQL.\n\n Enabl... | [
{
"content": "import logging\nimport os\n\nfrom kinto.core.cache import CacheBase\nfrom kinto.core.storage.postgresql.client import create_from_config\nfrom kinto.core.utils import json\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass Cache(CacheBase):\n \"\"\"Cache backend using PostgreSQL.\n\n Enabl... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 078a21a6a..14e82290a 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -11,6 +11,11 @@ Changelog
7.3.2 (unreleased)
------------------
+**Bug fixes**
+
+- The PostgreSQL cache backend now orders deletes according to keys,
+ which are a well-defined order that never ... |
blakeblackshear__frigate-8923 | [Support]: Recording error, OpenCV returns N/A
### Describe the problem you are having
recording stops after opencv exception.
### Version
0.13.0-A490C375
### Frigate config file
```yaml
mqtt:
# Optional: Enable mqtt server (default: shown below)
enabled: false
# Required: host name
host: mq... | [
{
"content": "\"\"\"Utilities for services.\"\"\"\n\nimport asyncio\nimport json\nimport logging\nimport os\nimport re\nimport signal\nimport subprocess as sp\nimport traceback\nfrom typing import Optional\n\nimport cv2\nimport psutil\nimport py3nvml.py3nvml as nvml\n\nfrom frigate.util.builtin import escape_sp... | [
{
"content": "\"\"\"Utilities for services.\"\"\"\n\nimport asyncio\nimport json\nimport logging\nimport os\nimport re\nimport signal\nimport subprocess as sp\nimport traceback\nfrom typing import Optional\n\nimport cv2\nimport psutil\nimport py3nvml.py3nvml as nvml\n\nfrom frigate.util.builtin import escape_sp... | diff --git a/frigate/util/services.py b/frigate/util/services.py
index 94946434b0..28421cef3d 100644
--- a/frigate/util/services.py
+++ b/frigate/util/services.py
@@ -371,7 +371,7 @@ def vainfo_hwaccel(device_name: Optional[str] = None) -> sp.CompletedProcess:
return sp.run(ffprobe_cmd, capture_output=True)
-a... |
biolab__orange3-4068 | k-Means: Silhouette scoring fails on missing values
**Describe the bug**
Asking k-Means to compute silhouette score on data with missing values results in an error.
**To Reproduce**
Steps to reproduce the behavior:
Datasets (Online retails) - k-Means (use From 2 to 8 clusters).
**Orange version:**
3.23.dev
... | [
{
"content": "from concurrent.futures import Future\nfrom typing import Optional, List, Dict\n\nimport numpy as np\nfrom AnyQt.QtCore import Qt, QTimer, QAbstractTableModel, QModelIndex, QThread, \\\n pyqtSlot as Slot\nfrom AnyQt.QtGui import QIntValidator\nfrom AnyQt.QtWidgets import QGridLayout, QTableView... | [
{
"content": "from concurrent.futures import Future\nfrom typing import Optional, List, Dict\n\nimport numpy as np\nfrom AnyQt.QtCore import Qt, QTimer, QAbstractTableModel, QModelIndex, QThread, \\\n pyqtSlot as Slot\nfrom AnyQt.QtGui import QIntValidator\nfrom AnyQt.QtWidgets import QGridLayout, QTableView... | diff --git a/Orange/widgets/unsupervised/owkmeans.py b/Orange/widgets/unsupervised/owkmeans.py
index c8a9ae8743b..71ccc7f4e3a 100644
--- a/Orange/widgets/unsupervised/owkmeans.py
+++ b/Orange/widgets/unsupervised/owkmeans.py
@@ -436,7 +436,7 @@ def invalidate(self, unconditional=False):
def update_results(self):... |
talonhub__community-378 | the command key should probably be made Mac specific
| [
{
"content": "from typing import Set\n\nfrom talon import Module, Context, actions, app\nimport sys\n\ndefault_alphabet = \"air bat cap drum each fine gust harp sit jury crunch look made near odd pit quench red sun trap urge vest whale plex yank zip\".split(\n \" \"\n)\nletters_string = \"abcdefghijklmnopqrs... | [
{
"content": "from typing import Set\n\nfrom talon import Module, Context, actions, app\nimport sys\n\ndefault_alphabet = \"air bat cap drum each fine gust harp sit jury crunch look made near odd pit quench red sun trap urge vest whale plex yank zip\".split(\n \" \"\n)\nletters_string = \"abcdefghijklmnopqrs... | diff --git a/code/keys.py b/code/keys.py
index 112ba562a0..265161f2c3 100644
--- a/code/keys.py
+++ b/code/keys.py
@@ -111,15 +111,17 @@ def letters(m) -> str:
ctx = Context()
-ctx.lists["self.modifier_key"] = {
+modifier_keys = {
# If you find 'alt' is often misrecognized, try using 'alter'.
"alt": "alt... |
mlflow__mlflow-3976 | [BUG] await_registration_for isn't always overridable when registering model version
### Willingness to contribute
The MLflow Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the MLflow code base?
- [ ] Yes. I can contribute ... | [
{
"content": "from mlflow.exceptions import MlflowException\nfrom mlflow.protos.databricks_pb2 import RESOURCE_ALREADY_EXISTS, ErrorCode\nfrom mlflow.store.artifact.runs_artifact_repo import RunsArtifactRepository\nfrom mlflow.tracking import MlflowClient\nfrom mlflow.utils.logging_utils import eprint\nfrom mlf... | [
{
"content": "from mlflow.exceptions import MlflowException\nfrom mlflow.protos.databricks_pb2 import RESOURCE_ALREADY_EXISTS, ErrorCode\nfrom mlflow.store.artifact.runs_artifact_repo import RunsArtifactRepository\nfrom mlflow.tracking import MlflowClient\nfrom mlflow.utils.logging_utils import eprint\nfrom mlf... | diff --git a/mlflow/tracking/_model_registry/fluent.py b/mlflow/tracking/_model_registry/fluent.py
index 37292af24994f..263e5e4caeb0f 100644
--- a/mlflow/tracking/_model_registry/fluent.py
+++ b/mlflow/tracking/_model_registry/fluent.py
@@ -66,7 +66,9 @@ def register_model(model_uri, name, await_registration_for=DEFAUL... |
ydataai__ydata-profiling-945 | Potential incompatiblity with Pandas 1.4.0
**Describe the bug**
Pandas version 1.4.0 was release few days ago and some tests start failing. I was able to reproduce with a minimum example which is failing with Pandas 1.4.0 and working with Pandas 1.3.5.
**To Reproduce**
```python
import pandas as pd
import pa... | [
{
"content": "import numpy as np\n\n\ndef weighted_median(data: np.ndarray, weights: np.ndarray) -> int:\n \"\"\"\n Args:\n data (list or numpy.array): data\n weights (list or numpy.array): weights\n \"\"\"\n s_data, s_weights = map(np.array, zip(*sorted(zip(data, weights))))\n midpoint... | [
{
"content": "import numpy as np\n\n\ndef weighted_median(data: np.ndarray, weights: np.ndarray) -> int:\n \"\"\"\n Args:\n data (list or numpy.array): data\n weights (list or numpy.array): weights\n \"\"\"\n if not isinstance(data, np.ndarray):\n data = np.array(data)\n if not i... | diff --git a/src/pandas_profiling/model/pandas/utils_pandas.py b/src/pandas_profiling/model/pandas/utils_pandas.py
index bc696b02c..8ad910d01 100644
--- a/src/pandas_profiling/model/pandas/utils_pandas.py
+++ b/src/pandas_profiling/model/pandas/utils_pandas.py
@@ -7,10 +7,16 @@ def weighted_median(data: np.ndarray, wei... |
django-haystack__django-haystack-1773 | Compatibility with django 3
Using django-haystack with django 3 leads to a bunch of warnings similar to
```
/usr/local/lib/python3.8/site-packages/haystack/forms.py:25: RemovedInDjango40Warning: django.utils.translation.ugettext_lazy() is deprecated in favor of django.utils.translation.gettext_lazy().
label=... | [
{
"content": "# encoding: utf-8\nfrom django import forms\nfrom django.utils.encoding import smart_text\nfrom django.utils.text import capfirst\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom haystack import connections\nfrom haystack.constants import DEFAULT_ALIAS\nfrom haystack.query import E... | [
{
"content": "# encoding: utf-8\nfrom django import forms\nfrom django.utils.encoding import smart_text\nfrom django.utils.text import capfirst\nfrom django.utils.translation import gettext_lazy as _\n\nfrom haystack import connections\nfrom haystack.constants import DEFAULT_ALIAS\nfrom haystack.query import Em... | diff --git a/haystack/forms.py b/haystack/forms.py
index 27a784045..ba9335729 100644
--- a/haystack/forms.py
+++ b/haystack/forms.py
@@ -2,7 +2,7 @@
from django import forms
from django.utils.encoding import smart_text
from django.utils.text import capfirst
-from django.utils.translation import ugettext_lazy as _
+f... |
freedomofpress__securedrop-2426 | Only show source codename on first session
# Feature request
## Description
A source is shown their codename on the `/lookup` page to help them remember it on their first session. This hint should not be shown again after the source logs out. The reason being is in the future, we maybe remove the actual codename ... | [
{
"content": "import operator\nimport os\n\nfrom datetime import datetime\nfrom flask import (Blueprint, render_template, flash, redirect, url_for, g,\n session, current_app, request, Markup, abort)\nfrom flask_babel import gettext\nfrom sqlalchemy.exc import IntegrityError\n\nimport crypto_ut... | [
{
"content": "import operator\nimport os\n\nfrom datetime import datetime\nfrom flask import (Blueprint, render_template, flash, redirect, url_for, g,\n session, current_app, request, Markup, abort)\nfrom flask_babel import gettext\nfrom sqlalchemy.exc import IntegrityError\n\nimport crypto_ut... | diff --git a/securedrop/source_app/main.py b/securedrop/source_app/main.py
index beb3feb557..72dc9d2e9e 100644
--- a/securedrop/source_app/main.py
+++ b/securedrop/source_app/main.py
@@ -38,6 +38,7 @@ def generate():
codename = generate_unique_codename()
session['codename'] = codename
+ sessi... |
google__fuzzbench-207 | wpantund benchmark can initiate network connections
The wpantund benchmark can initiate networking connections to remote networks under some conditions. Attaching a testcase for that:
[1788a8b166e1fe4e854bdbb1572e2bb6.00000080.honggfuzz.cov.txt](https://github.com/google/fuzzbench/files/4391761/1788a8b166e1fe4e854bd... | [
{
"content": "#!/usr/bin/env python3\n# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unl... | [
{
"content": "#!/usr/bin/env python3\n# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unl... | diff --git a/.github/workflows/build.py b/.github/workflows/build.py
index ab5960e4c..f00d5b271 100644
--- a/.github/workflows/build.py
+++ b/.github/workflows/build.py
@@ -42,7 +42,6 @@
're2-2014-12-09',
'vorbis-2017-12-11',
'woff2-2016-05-06',
- 'wpantund-2018-02-27',
]
diff --git a/benchmarks/... |
wagtail__wagtail-5142 | Rich text processing converts non-breaking spaces into normal spaces
### Issue Summary
When inserting non-breaking spaces into Draftail (with `option + space` on macOS), they are persisted in the database and rendered in the front-end HTML, but subsequently get lost in the DB -> editor JSON conversion.
Initially ... | [
{
"content": "import re\nfrom html.parser import HTMLParser\n\nfrom wagtail.admin.rich_text.converters.contentstate_models import (\n Block, ContentState, Entity, EntityRange, InlineStyleRange)\nfrom wagtail.admin.rich_text.converters.html_ruleset import HTMLRuleset\nfrom wagtail.core.models import Page\nfro... | [
{
"content": "import re\nfrom html.parser import HTMLParser\n\nfrom wagtail.admin.rich_text.converters.contentstate_models import (\n Block, ContentState, Entity, EntityRange, InlineStyleRange)\nfrom wagtail.admin.rich_text.converters.html_ruleset import HTMLRuleset\nfrom wagtail.core.models import Page\nfro... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index f63ee32f7d9d..25a92c70573f 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -36,6 +36,7 @@ Changelog
* Fix: Make sure page chooser search results correspond to the latest search by canceling previous requests (Esper Kuijs)
* Fix: Inform user when moving a page from ... |
google-research__text-to-text-transfer-transformer-223 | train multiple datasets using gpu
I tried to train using multiple datasets (my own tsv datasets).
If I use the following way:
```
t5_mesh_transformer \
--model_dir="${MODEL_DIR}" \
--t5_tfds_data_dir="${DATA_DIR}" \
--gin_file="dataset.gin" \
--gin_param="utils.run.mesh_shape = 'model:1,batch:1'" \
... | [
{
"content": "# Copyright 2020 The T5 Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl... | [
{
"content": "# Copyright 2020 The T5 Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl... | diff --git a/t5/models/mtf_model.py b/t5/models/mtf_model.py
index 38674007..29f819b9 100644
--- a/t5/models/mtf_model.py
+++ b/t5/models/mtf_model.py
@@ -160,7 +160,7 @@ def __init__(
self._iterations_per_loop = iterations_per_loop
self._cluster = tf.distribute.cluster_resolver.TPUClusterResolver(
- ... |
ansible-collections__community.vmware-1408 | vmware_vm_info module throws AttributeError: 'NoneType' object has no attribute 'datastoreUrl'
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automat... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2015, Joseph Callen <jcallen () csc.com>\n# Copyright: (c) 2018, Ansible Project\n# Copyright: (c) 2018, Fedor Vompe <f.vompe () comptek.ru>\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2015, Joseph Callen <jcallen () csc.com>\n# Copyright: (c) 2018, Ansible Project\n# Copyright: (c) 2018, Fedor Vompe <f.vompe () comptek.ru>\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/... | diff --git a/changelogs/fragments/1407-vmware_vm_info-inaccessible_vm.yml b/changelogs/fragments/1407-vmware_vm_info-inaccessible_vm.yml
new file mode 100644
index 0000000000..32ecf4bf46
--- /dev/null
+++ b/changelogs/fragments/1407-vmware_vm_info-inaccessible_vm.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - vmware_vm_info - Fix... |
biolab__orange3-2608 | Names of models are not saved as settings
1. Put logistic regression on the canvas.
2. Edit its name
3. Save the schema
4. Close canvas
5. Open Orange and load the schema
The logistic regression name is reverted back to Logistic regression.
--------
The base class for learners sets `self.learner_name = sel... | [
{
"content": "from copy import deepcopy\n\nimport itertools\nimport numpy as np\n\nfrom AnyQt.QtCore import QTimer, Qt\n\nfrom Orange.data import Table\nfrom Orange.modelling import Fitter, Learner, Model\nfrom Orange.preprocess.preprocess import Preprocess\nfrom Orange.widgets import gui\nfrom Orange.widgets.s... | [
{
"content": "from copy import deepcopy\n\nimport itertools\nimport numpy as np\n\nfrom AnyQt.QtCore import QTimer, Qt\n\nfrom Orange.data import Table\nfrom Orange.modelling import Fitter, Learner, Model\nfrom Orange.preprocess.preprocess import Preprocess\nfrom Orange.widgets import gui\nfrom Orange.widgets.s... | diff --git a/Orange/widgets/utils/owlearnerwidget.py b/Orange/widgets/utils/owlearnerwidget.py
index 488c6ba06e1..b887e05c381 100644
--- a/Orange/widgets/utils/owlearnerwidget.py
+++ b/Orange/widgets/utils/owlearnerwidget.py
@@ -67,6 +67,7 @@ class OWBaseLearner(OWWidget, metaclass=OWBaseLearnerMeta):
LEARNER = No... |
vacanza__python-holidays-469 | 2 april 2021 in spain
hi,
dt.date(2021, 4, 2) in holidays.ES() don't work
| [
{
"content": "# -*- coding: utf-8 -*-\n\n# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# specific sets of holidays on the fly. It aims to make determining whether a\n# specific date is a holiday as fast and flexible as possible.\n#\n# ... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# specific sets of holidays on the fly. It aims to make determining whether a\n# specific date is a holiday as fast and flexible as possible.\n#\n# ... | diff --git a/holidays/countries/spain.py b/holidays/countries/spain.py
index 794032b12..6b2c8dd0e 100644
--- a/holidays/countries/spain.py
+++ b/holidays/countries/spain.py
@@ -117,7 +117,7 @@ def _populate(self, year):
self._is_observed(date(year, MAR, 19), "San José")
if self.prov and self.prov ... |
joke2k__faker-1840 | Incorrect type annotation on Generator.add_provider
* Faker version: 18.3.2
* OS: MacOS
The type annotation on `Generator.add_provider` is needlessly restrictive - the implementation clearly supports passing either a type or an instance, but the type annotation only allows instances:
```python
# faker/gener... | [
{
"content": "import random as random_module\nimport re\n\nfrom typing import TYPE_CHECKING, Any, Callable, Dict, Hashable, List, Optional\n\nfrom .typing import SeedType\n\nif TYPE_CHECKING:\n from .providers import BaseProvider\n\n_re_token = re.compile(r\"\\{\\{\\s*(\\w+)(:\\s*\\w+?)?\\s*\\}\\}\")\nrandom... | [
{
"content": "import random as random_module\nimport re\n\nfrom typing import TYPE_CHECKING, Any, Callable, Dict, Hashable, List, Optional, Type, Union\n\nfrom .typing import SeedType\n\nif TYPE_CHECKING:\n from .providers import BaseProvider\n\n_re_token = re.compile(r\"\\{\\{\\s*(\\w+)(:\\s*\\w+?)?\\s*\\}\... | diff --git a/faker/generator.py b/faker/generator.py
index 2e5dc25042..b04c063683 100644
--- a/faker/generator.py
+++ b/faker/generator.py
@@ -1,7 +1,7 @@
import random as random_module
import re
-from typing import TYPE_CHECKING, Any, Callable, Dict, Hashable, List, Optional
+from typing import TYPE_CHECKING, Any,... |
PyGithub__PyGithub-1053 | dismiss a PR review?
Am I reading the docs correctly and understanding that there is no support for [dismissing a PR review](https://developer.github.com/v3/pulls/reviews/#dismiss-a-pull-request-review)?
| [
{
"content": "# -*- coding: utf-8 -*-\n\n############################ Copyrights and license ############################\n# #\n# Copyright 2017 Aaron Levine <allevin@sandia.gov> #\n# Copyright 2017 Mike Mil... | [
{
"content": "# -*- coding: utf-8 -*-\n\n############################ Copyrights and license ############################\n# #\n# Copyright 2017 Aaron Levine <allevin@sandia.gov> #\n# Copyright 2017 Mike Mil... | diff --git a/github/PullRequestReview.py b/github/PullRequestReview.py
index f96b6b905e..afde6f6afa 100644
--- a/github/PullRequestReview.py
+++ b/github/PullRequestReview.py
@@ -111,6 +111,19 @@ def submitted_at(self):
self._completeIfNotSet(self._submitted_at)
return self._submitted_at.value
+ ... |
microsoft__ptvsd-2015 | Don't step into loop when pressing F11 with hit count breakpoint
## Environment data
- VS Code version: 1.40.0-insider
- Extension version (available under the Extensions sidebar): 2019.11.47235-dev
## Expected behaviour
It should step into loop when pressing F11 with hit count breakpoint
## Actual behavio... | [
{
"content": "import linecache\nimport os.path\nimport re\n\nfrom _pydev_bundle import pydev_log\nfrom _pydevd_bundle import pydevd_dont_trace\nfrom _pydevd_bundle.pydevd_constants import (dict_iter_values, IS_PY3K, RETURN_VALUES_DICT, NO_FTRACE)\nfrom _pydevd_bundle.pydevd_frame_utils import add_exception_to_f... | [
{
"content": "import linecache\nimport os.path\nimport re\n\nfrom _pydev_bundle import pydev_log\nfrom _pydevd_bundle import pydevd_dont_trace\nfrom _pydevd_bundle.pydevd_constants import (dict_iter_values, IS_PY3K, RETURN_VALUES_DICT, NO_FTRACE)\nfrom _pydevd_bundle.pydevd_frame_utils import add_exception_to_f... | diff --git a/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c b/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c
index 1e9b2e07b..4076f8a3f 100644
--- a/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c
+++ b/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_cython.c
@@ -15644,7 +15644,7 @@ sta... |
PennyLaneAI__pennylane-1615 | [BUG] QAOA layer template does not work with TensorFlow
### Expected behavior
PennyLane's QAOA layer templates should work with the TensorFlow interface.
### Actual behavior
A `TypeError: object of type 'ResourceVariable' has no len()` is thrown.
### Additional information
_No response_
### Source code
```shell
... | [
{
"content": "# Copyright 2018-2021 Xanadu Quantum Technologies 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# Unle... | [
{
"content": "# Copyright 2018-2021 Xanadu Quantum Technologies 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# Unle... | diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md
index 269f71d8f03..d018e675895 100644
--- a/.github/CHANGELOG.md
+++ b/.github/CHANGELOG.md
@@ -394,6 +394,9 @@ and requirements-ci.txt (unpinned). This latter would be used by the CI.
<h3>Bug fixes</h3>
+* The `qml.layer` template now works with tensorflow ... |
xorbitsai__inference-192 | FEAT: support vicuna-v1.3 33B
| [
{
"content": "# Copyright 2022-2023 XProbe 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 ap... | [
{
"content": "# Copyright 2022-2023 XProbe 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 ap... | diff --git a/xinference/model/llm/__init__.py b/xinference/model/llm/__init__.py
index f6d6e3f484..f704eda7cf 100644
--- a/xinference/model/llm/__init__.py
+++ b/xinference/model/llm/__init__.py
@@ -88,12 +88,14 @@ def install():
else (
"https://huggingface.co/TheBloke/vicuna-13b-v1.3.0-GGML/resol... |
bokeh__bokeh-10018 | [BUG] Cannot apply patch to [id] which is not in the document anymore
#### ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)
bokeh 2.0.0 py37_0
python 3.7.7 hcf32534_0_cpython
WSL Ubuntu 18.04 (hosted on win10
Firefox 75.0 (64-bit)
running the app with command` bokeh ser... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.\n# All rights reserved.\n#\n# The full license is in the file LICENSE.txt, distributed with this software.\n#----------------------------------------... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.\n# All rights reserved.\n#\n# The full license is in the file LICENSE.txt, distributed with this software.\n#----------------------------------------... | diff --git a/bokeh/document/document.py b/bokeh/document/document.py
index e70aacecaa7..28ee722e9fa 100644
--- a/bokeh/document/document.py
+++ b/bokeh/document/document.py
@@ -403,7 +403,7 @@ def apply_json_patch(self, patch, setter=None):
if patched_id not in self._all_former_model_ids:
... |
googleapis__google-auth-library-python-124 | Add public properties to google.oauth2.credentials.Credentials
Resolves #124
| [
{
"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica... | [
{
"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica... | diff --git a/google/oauth2/credentials.py b/google/oauth2/credentials.py
index 9727e189e..077a95f73 100644
--- a/google/oauth2/credentials.py
+++ b/google/oauth2/credentials.py
@@ -68,6 +68,27 @@ def __init__(self, token, refresh_token=None, token_uri=None,
self._client_id = client_id
self._client_sec... |
nltk__nltk-2719 | Error when using nltk.stem.arlstem2 module
I was trying to use the stemming function in arlstem2 object and always found an error that there is no object called adject but, i tried to fix adject and replaced it with adjective in the source code it worked perfectly.
I just wanted to mention that it works for me :)
... | [
{
"content": "# Natural Language Toolkit: Stemmers\n#\n# Copyright (C) 2001-2021 NLTK Project\n# Author: Trevor Cohn <tacohn@cs.mu.oz.au>\n# Edward Loper <edloper@gmail.com>\n# Steven Bird <stevenbird1@gmail.com>\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\n\"\"\"\nN... | [
{
"content": "# Natural Language Toolkit: Stemmers\n#\n# Copyright (C) 2001-2021 NLTK Project\n# Author: Trevor Cohn <tacohn@cs.mu.oz.au>\n# Edward Loper <edloper@gmail.com>\n# Steven Bird <stevenbird1@gmail.com>\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\n\"\"\"\nN... | diff --git a/nltk/stem/__init__.py b/nltk/stem/__init__.py
index 2cfe492cb7..b2bdad2ec1 100644
--- a/nltk/stem/__init__.py
+++ b/nltk/stem/__init__.py
@@ -30,3 +30,5 @@
from nltk.stem.wordnet import WordNetLemmatizer
from nltk.stem.rslp import RSLPStemmer
from nltk.stem.cistem import Cistem
+from nltk.stem.arlstem i... |
freqtrade__freqtrade-965 | fails to get balances in Cobinhood
## Step 1: Have you search for this issue before posting it?
If you have discovered a bug in the bot, please [search our issue tracker](https://github.com/freqtrade/freqtrade/issues?q=is%3Aissue).
If it hasn't been reported, please create a new issue.
## Step 2: Describe your ... | [
{
"content": "\"\"\"\nFreqtrade is the main module of this bot. It contains the class Freqtrade()\n\"\"\"\n\nimport copy\nimport logging\nimport time\nimport traceback\nfrom datetime import datetime\nfrom typing import Dict, List, Optional, Any, Callable\n\nimport arrow\nimport requests\nfrom cachetools import ... | [
{
"content": "\"\"\"\nFreqtrade is the main module of this bot. It contains the class Freqtrade()\n\"\"\"\n\nimport copy\nimport logging\nimport time\nimport traceback\nfrom datetime import datetime\nfrom typing import Dict, List, Optional, Any, Callable\n\nimport arrow\nimport requests\nfrom cachetools import ... | diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py
index e25ed66cf99..985ecb37004 100644
--- a/freqtrade/freqtradebot.py
+++ b/freqtrade/freqtradebot.py
@@ -277,11 +277,14 @@ def _get_min_pair_stake_amount(self, pair: str, price: float) -> Optional[float]
return None
min_stake_am... |
ansible__ansible-34420 | Callback plugins are called twice if custom plugin has the same name as standard one
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
callback plugins
##### ANSIBLE VERSION
```
ansible-3 2.4.1.0
config file = /home/ericl/Documents/Technik/Ansible/ansible.cfg
configured module search path = ['/h... | [
{
"content": "# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com>\n# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> and others\n# (c) 2017, Toshio Kuratomi <tkuratomi@ansible.com>\n# (c) 2017 Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt... | [
{
"content": "# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com>\n# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> and others\n# (c) 2017, Toshio Kuratomi <tkuratomi@ansible.com>\n# (c) 2017 Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt... | diff --git a/lib/ansible/plugins/loader.py b/lib/ansible/plugins/loader.py
index 211dd4c6de8812..4177138b16fe63 100644
--- a/lib/ansible/plugins/loader.py
+++ b/lib/ansible/plugins/loader.py
@@ -424,7 +424,14 @@ def all(self, *args, **kwargs):
continue
if path not in self._module_cache:
... |
scrapy__scrapy-5993 | Backward compatibility in utils.conf.build_component_list
There is some code from 2015 in `scrapy.utils.conf.build_component_list` marked as "Backward compatibility for old (base, custom) call signature", which was added in #1586. I couldn't understand after a quick glance why is it "backward compatibility" but if it's... | [
{
"content": "import numbers\nimport os\nimport sys\nimport warnings\nfrom configparser import ConfigParser\nfrom operator import itemgetter\nfrom pathlib import Path\nfrom typing import Any, Dict, List, Optional, Union\n\nfrom scrapy.exceptions import ScrapyDeprecationWarning, UsageError\nfrom scrapy.settings ... | [
{
"content": "import numbers\nimport os\nimport sys\nimport warnings\nfrom configparser import ConfigParser\nfrom operator import itemgetter\nfrom pathlib import Path\nfrom typing import Any, Dict, List, Optional, Union\n\nfrom scrapy.exceptions import ScrapyDeprecationWarning, UsageError\nfrom scrapy.settings ... | diff --git a/scrapy/utils/conf.py b/scrapy/utils/conf.py
index 43a8b65a5c7..1889f757190 100644
--- a/scrapy/utils/conf.py
+++ b/scrapy/utils/conf.py
@@ -50,11 +50,17 @@ def _validate_values(compdict):
"please provide a real number or None instead"
)
- if isinstance(custom, (li... |
mitmproxy__mitmproxy-6819 | Mitmdump does not exit
#### Problem Description
Mitmdump does not exit automatically when executing:
`mitmdump -nr infile -w outfile
`
Until version 10.0.0 it was working properly and when running mitmdump with "-n" the process finished automatically once the outfile was written.
#### Steps to reproduce the ... | [
{
"content": "import asyncio\nimport logging\nimport os.path\nimport sys\nfrom typing import BinaryIO\nfrom typing import Optional\n\nfrom mitmproxy import command\nfrom mitmproxy import ctx\nfrom mitmproxy import exceptions\nfrom mitmproxy import flowfilter\nfrom mitmproxy import io\n\nlogger = logging.getLogg... | [
{
"content": "import asyncio\nimport logging\nimport os.path\nimport sys\nfrom typing import BinaryIO\nfrom typing import Optional\n\nfrom mitmproxy import command\nfrom mitmproxy import ctx\nfrom mitmproxy import exceptions\nfrom mitmproxy import flowfilter\nfrom mitmproxy import io\n\nlogger = logging.getLogg... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0592cefe92..253169312b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@
* Release tags are now prefixed with `v` again to follow SemVer convention.
([#6810](https://github.com/mitmproxy/mitmproxy/pull/6810), @mhils)
+* Fix a bug where mitmproxy would not ... |
pulp__pulpcore-3034 | Remove orphans: Repository matching query does not exist.
**Version**
```
$ rpm -qa | grep tfm-rubygem-pulp
tfm-rubygem-pulp_certguard_client-1.5.0-1.el7.noarch
tfm-rubygem-pulp_ansible_client-0.13.1-1.el7.noarch
tfm-rubygem-pulp_deb_client-2.18.0-1.el7.noarch
tfm-rubygem-pulp_rpm_client-3.17.4-1.el7.noarch
tfm-... | [
{
"content": "from drf_spectacular.utils import extend_schema\nfrom rest_framework.views import APIView\n\nfrom pulpcore.app.response import OperationPostponedResponse\nfrom pulpcore.app.serializers import AsyncOperationResponseSerializer\nfrom pulpcore.app.tasks import orphan_cleanup\nfrom pulpcore.tasking.tas... | [
{
"content": "from drf_spectacular.utils import extend_schema\nfrom rest_framework.views import APIView\n\nfrom pulpcore.app.response import OperationPostponedResponse\nfrom pulpcore.app.serializers import AsyncOperationResponseSerializer\nfrom pulpcore.app.tasks import orphan_cleanup\nfrom pulpcore.tasking.tas... | diff --git a/CHANGES/3030.bugfix b/CHANGES/3030.bugfix
new file mode 100644
index 0000000000..dc389d112f
--- /dev/null
+++ b/CHANGES/3030.bugfix
@@ -0,0 +1 @@
+Serialized orphan cleanup tasks with respect to each other to prevent them from failing.
diff --git a/pulpcore/app/views/orphans.py b/pulpcore/app/views/orphans... |
liqd__adhocracy4-1524 | Custom model delete method deprecated: after django upgrade
**expected behaviour:** Custom deletion logic should move to form_valid() for django > 4
**behaviour:** During the upgrade, we missed updating one of the custom deletion methods in dashboard/mixins.py
`https://github.com/liqd/adhocracy4/blob/main/adhocra... | [
{
"content": "from copy import deepcopy\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.shortcuts import get_object_or_404\nfrom django.shortcuts import redirect\nfrom django.urls import NoRe... | [
{
"content": "from copy import deepcopy\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.shortcuts import get_object_or_404\nfrom django.shortcuts import redirect\nfrom django.urls import NoRe... | diff --git a/adhocracy4/dashboard/mixins.py b/adhocracy4/dashboard/mixins.py
index fc16faa9d..44fcc4412 100644
--- a/adhocracy4/dashboard/mixins.py
+++ b/adhocracy4/dashboard/mixins.py
@@ -129,13 +129,13 @@ def form_valid(self, form):
class DashboardComponentDeleteSignalMixin(edit.DeletionMixin):
- def delete(s... |
conan-io__conan-center-index-16194 | [package] ffmpeg/4.4.3: configure hangs when building for Android with NDK >= 24
### Description
When building ffmpeg 4.4.3 for Android, its `configure` step hangs. In Terminal window I see that `grep` is being executed at the moment, but `grep`'s process consumes 0% CPU. Waited for about 10 minutes before terminati... | [
{
"content": "from conan import ConanFile\nfrom conan.errors import ConanInvalidConfiguration\nfrom conan.tools.apple import is_apple_os\nfrom conan.tools.build import cross_building\nfrom conan.tools.files import get, rename, rmdir\nfrom conan.tools.scm import Version\nfrom conans import AutoToolsBuildEnvironm... | [
{
"content": "from conan import ConanFile\nfrom conan.errors import ConanInvalidConfiguration\nfrom conan.tools.apple import is_apple_os\nfrom conan.tools.build import cross_building\nfrom conan.tools.files import get, rename, rmdir\nfrom conan.tools.scm import Version\nfrom conans import AutoToolsBuildEnvironm... | diff --git a/recipes/ffmpeg/all/conanfile.py b/recipes/ffmpeg/all/conanfile.py
index f0a1d0fdee146..f1ddd0714c380 100644
--- a/recipes/ffmpeg/all/conanfile.py
+++ b/recipes/ffmpeg/all/conanfile.py
@@ -536,10 +536,10 @@ def opt_append_disable_if_set(args, what, v):
])
if not self.options.with_progr... |
pyodide__pyodide-3658 | New signature mismatch in `scipy.sparse.linalg.svds`
## 🐛 Bug
I am seeing new fatal errors in the scipy test suite in https://github.com/lesteve/scipy-tests-pyodide since a few days ago. They are likely related to the numpy version upgrade in #3593 although I have no idea why.
### To Reproduce
You can reprodu... | [
{
"content": "import re\nfrom collections.abc import Iterable, Iterator\nfrom pathlib import Path\nfrom textwrap import dedent # for doctests\n\n\ndef prepare_doctest(x: str) -> list[str]:\n return dedent(x).strip().splitlines(True)\n\n\ndef fix_f2c_input(f2c_input_path: str) -> None:\n \"\"\"\n CLAPA... | [
{
"content": "import re\nfrom collections.abc import Iterable, Iterator\nfrom pathlib import Path\nfrom textwrap import dedent # for doctests\n\n\ndef prepare_doctest(x: str) -> list[str]:\n return dedent(x).strip().splitlines(True)\n\n\ndef fix_f2c_input(f2c_input_path: str) -> None:\n \"\"\"\n CLAPA... | diff --git a/packages/scipy/test_scipy.py b/packages/scipy/test_scipy.py
index 05b5010531f..c41faf7e962 100644
--- a/packages/scipy/test_scipy.py
+++ b/packages/scipy/test_scipy.py
@@ -63,6 +63,7 @@ def runtest(module, filter):
runtest("odr", "explicit")
runtest("signal.tests.test_ltisys", "TestImpulse2")
... |
internetarchive__openlibrary-9151 | Notes update handler should redirect immediately on unauthenticated request
### Problem
Today, whenever an unauthenticated request is sent to our notes update endpoint, some unnecessary processing is occurring before the handler redirects.
#### Evidence / Screenshot
#### Relevant URL(s)
### Reproducing the b... | [
{
"content": "\"\"\"\nThis file should be for internal APIs which Open Library requires for\nits experience. This does not include public facing APIs with LTS\n(long term support)\n\"\"\"\n\nimport web\nimport re\nimport json\nfrom collections import defaultdict\nfrom openlibrary.views.loanstats import get_tren... | [
{
"content": "\"\"\"\nThis file should be for internal APIs which Open Library requires for\nits experience. This does not include public facing APIs with LTS\n(long term support)\n\"\"\"\n\nimport web\nimport re\nimport json\nfrom collections import defaultdict\nfrom openlibrary.views.loanstats import get_tren... | diff --git a/openlibrary/plugins/openlibrary/api.py b/openlibrary/plugins/openlibrary/api.py
index e7be6a91faf..186870e441f 100644
--- a/openlibrary/plugins/openlibrary/api.py
+++ b/openlibrary/plugins/openlibrary/api.py
@@ -227,14 +227,14 @@ def POST(self, work_id):
:return: the note
"""
use... |
Kinto__kinto-1003 | GET on /v1/admin returns 404
The expected address for built-in admin plugin is `/v1/admin/`. But if you forget the trailing slash and type `/v1/admin` you get a 404. I think it would be better to raise a 307.
Related to #112 and #858.
```
> http get localhost:8888/v1/admin/
HTTP/1.1 200 OK
(...)
> http get ... | [
{
"content": "from pyramid.static import static_view\n\n\ndef includeme(config):\n # Process settings to remove storage wording.\n\n # Expose capability.\n config.add_api_capability(\n \"admin\",\n version=\"1.6.0\",\n description=\"Serves the admin console.\",\n url=\"https... | [
{
"content": "from pyramid.static import static_view\nfrom pyramid.httpexceptions import HTTPTemporaryRedirect\n\n\ndef includeme(config):\n # Process settings to remove storage wording.\n\n # Expose capability.\n config.add_api_capability(\n \"admin\",\n version=\"1.6.0\",\n descr... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 3fa009c32..fc207a05f 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -11,6 +11,10 @@ This document describes changes between each past release.
- Add an `OpenAPI specification <https://kinto.readthedocs.io/en/latest/api/1.x/openapi.html>`
for the HTTP API on ``/swa... |
Mailu__Mailu-2450 | Feature request: Overwriting the TLS configuration on port 25
## Environment & Versions
### Environment
- [x] docker-compose
- [ ] kubernetes
- [ ] docker swarm
### Versions
1.8
## Description
Feature request: Overwriting TLS settings for smtp.
while overwriting the TLS settings for https works perfec... | [
{
"content": "#!/usr/bin/python3\n\nimport os\nimport logging as log\nimport sys\nfrom socrate import system, conf\n\nargs = os.environ.copy()\n\nlog.basicConfig(stream=sys.stderr, level=args.get(\"LOG_LEVEL\", \"WARNING\"))\n\n# Get the first DNS server\nwith open(\"/etc/resolv.conf\") as handle:\n content ... | [
{
"content": "#!/usr/bin/python3\n\nimport os\nimport logging as log\nimport sys\nfrom socrate import system, conf\n\nargs = os.environ.copy()\n\nlog.basicConfig(stream=sys.stderr, level=args.get(\"LOG_LEVEL\", \"WARNING\"))\n\nargs['TLS_PERMISSIVE'] = str(args.get('TLS_PERMISSIVE')).lower() not in ('false', 'n... | diff --git a/core/admin/mailu/configuration.py b/core/admin/mailu/configuration.py
index 0ba64c840..2f137c0c2 100644
--- a/core/admin/mailu/configuration.py
+++ b/core/admin/mailu/configuration.py
@@ -74,6 +74,7 @@
'PERMANENT_SESSION_LIFETIME': 30*24*3600,
'SESSION_COOKIE_SECURE': True,
'CREDENTIAL_ROUND... |
zulip__zulip-5615 | Translated messages in Handlebars templates should never contain handlebars
When a Handlebars template contains something like this:
```
{{#tr this}}Your email is {{ page_params.email }}.{{/tr}}
```
it results in the inside expression (`{{ page_params.email }}`) being evaluated and substituted *first*, a... | [
{
"content": "from __future__ import print_function\nfrom __future__ import absolute_import\n\nimport os\nimport re\nimport sys\nimport traceback\n\nfrom typing import cast, Any, Callable, Dict, List, Optional, Tuple\n\ndef build_custom_checkers(by_lang):\n # type: (Dict[str, List[str]]) -> Tuple[Callable[[]... | [
{
"content": "from __future__ import print_function\nfrom __future__ import absolute_import\n\nimport os\nimport re\nimport sys\nimport traceback\n\nfrom typing import cast, Any, Callable, Dict, List, Optional, Tuple\n\ndef build_custom_checkers(by_lang):\n # type: (Dict[str, List[str]]) -> Tuple[Callable[[]... | diff --git a/frontend_tests/node_tests/templates.js b/frontend_tests/node_tests/templates.js
index 2cd3de36e6edb..e3c81e617d0c1 100644
--- a/frontend_tests/node_tests/templates.js
+++ b/frontend_tests/node_tests/templates.js
@@ -635,6 +635,7 @@ function render(template_name, args) {
content: 'This is messa... |
pfnet__pytorch-pfn-extras-763 | Adding pytest in an MPI environment
There are some functions that run in a distributed environment that have not been fully verified, so some pytests will be run in MPI to verify them.
https://github.com/pfnet/pytorch-pfn-extras/blob/266e8bde2c2a1a6aa3f8648d49e758975c8b436a/tests/pytorch_pfn_extras_tests/training_te... | [
{
"content": "import os\n\nimport setuptools\n\nhere = os.path.abspath(os.path.dirname(__file__))\n# Get __version__ variable\nexec(open(os.path.join(here, \"pytorch_pfn_extras\", \"_version.py\")).read())\n\n\nsetuptools.setup(\n name=\"pytorch-pfn-extras\",\n version=__version__, # NOQA\n descriptio... | [
{
"content": "import os\n\nimport setuptools\n\nhere = os.path.abspath(os.path.dirname(__file__))\n# Get __version__ variable\nexec(open(os.path.join(here, \"pytorch_pfn_extras\", \"_version.py\")).read())\n\n\nsetuptools.setup(\n name=\"pytorch-pfn-extras\",\n version=__version__, # NOQA\n descriptio... | diff --git a/.flexci/config.pbtxt b/.flexci/config.pbtxt
index 475c05ef..56d44b93 100644
--- a/.flexci/config.pbtxt
+++ b/.flexci/config.pbtxt
@@ -121,7 +121,7 @@ configs {
image: "windows"
}
time_limit: {
- seconds: 1200
+ seconds: 1800
}
command: ".flexci\\windows\\run.bat torch11... |
google__timesketch-2221 | New authentication cannot be performed on terminals with no tty
**Describe the bug**
When authenticating for the first time (or after removing a token) the user is presented with a url to visit via stdout, and a token is entered via stdin. In a session with no, or non default tty's, this means the user will not see th... | [
{
"content": "# Copyright 2017 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | [
{
"content": "# Copyright 2017 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | diff --git a/api_client/python/timesketch_api_client/client.py b/api_client/python/timesketch_api_client/client.py
index 734229b67a..77fe0e09db 100644
--- a/api_client/python/timesketch_api_client/client.py
+++ b/api_client/python/timesketch_api_client/client.py
@@ -16,6 +16,7 @@
import os
import logging
+import sy... |
conda__conda-4327 | Channels in centrally installed .condarc file are being ignored in conda 4.3.4
Hi, I am testing a centrally installed Anaconda setup with Anaconda installed under `C:\Program Files\Anaconda3`. I have a condarc file under `C:\Program Files\Anaconda3\.condarc`.
When I run `conda info` it tells me that my config file i... | [
{
"content": "# (c) 2012-2016 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\"\"\"OS-agnostic, system-level binary package manager.\"\"\"\nfrom... | [
{
"content": "# (c) 2012-2016 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\"\"\"OS-agnostic, system-level binary package manager.\"\"\"\nfrom... | diff --git a/conda/__init__.py b/conda/__init__.py
index 766519c2ca5..6b7e5d86d72 100644
--- a/conda/__init__.py
+++ b/conda/__init__.py
@@ -6,7 +6,9 @@
"""OS-agnostic, system-level binary package manager."""
from __future__ import absolute_import, division, print_function, unicode_literals
+import os
from os.path... |
sopel-irc__sopel-2428 | url: Unexpected error on nonexistent domains
The following code line raises an unhandled `dns.resolver.NXDOMAIN` for URLs at nonexistent domains:
https://github.com/sopel-irc/sopel/blob/eff60e9b49a14e1f3c0c4dab5bb4d2ddbf0098a5/sopel/modules/url.py#L377
Some variant of this operation has been in the code for a whi... | [
{
"content": "\"\"\"\nurl.py - Sopel URL Title Plugin\nCopyright 2010-2011, Michael Yanovich (yanovich.net) & Kenneth Sham\nCopyright 2012-2013, Elsie Powell\nCopyright 2013, Lior Ramati <firerogue517@gmail.com>\nCopyright 2014, Elad Alfassa <elad@fedoraproject.org>\nLicensed under the Eiffel Forum License 2.\n... | [
{
"content": "\"\"\"\nurl.py - Sopel URL Title Plugin\nCopyright 2010-2011, Michael Yanovich (yanovich.net) & Kenneth Sham\nCopyright 2012-2013, Elsie Powell\nCopyright 2013, Lior Ramati <firerogue517@gmail.com>\nCopyright 2014, Elad Alfassa <elad@fedoraproject.org>\nLicensed under the Eiffel Forum License 2.\n... | diff --git a/sopel/modules/url.py b/sopel/modules/url.py
index 47087c224..7f16d1879 100644
--- a/sopel/modules/url.py
+++ b/sopel/modules/url.py
@@ -406,7 +406,18 @@ def process_urls(
try:
ips = [ip_address(parsed_url.hostname)]
except ValueError:
- ips = [ip_ad... |
beetbox__beets-618 | User-defined delimiter for multiple genres in LastGenre plugin
It would be very nice to setup a user-defined separator for the multiple genre setting in the lastgenre plugin.
| [
{
"content": "# This file is part of beets.\n# Copyright 2013, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limita... | [
{
"content": "# This file is part of beets.\n# Copyright 2013, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limita... | diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py
index 8c38eac316..c398bf7e31 100644
--- a/beetsplug/lastgenre/__init__.py
+++ b/beetsplug/lastgenre/__init__.py
@@ -114,7 +114,9 @@ def _strings_to_genre(tags):
tags = out
tags = [t.title() for t in tags]
- return u', '.jo... |
jazzband__pip-tools-450 | pip-compile may not be able to resolve dependencies
pip-compile can be left with wrong candidates when toplevel requirements happen to be also pinned in subdependencies. This is a regression caused by #378 which indirectly (and subtly) modifies the self.our_constraints set.
Note that in the actual result (pasted bel... | [
{
"content": "# coding: utf-8\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\n\nimport os\nfrom functools import partial\nfrom itertools import chain, count\n\nfrom first import first\nfrom pip.req import InstallRequirement\n\nfrom . import click\n... | [
{
"content": "# coding: utf-8\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\n\nimport os\nimport copy\nfrom functools import partial\nfrom itertools import chain, count\n\nfrom first import first\nfrom pip.req import InstallRequirement\n\nfrom . i... | diff --git a/piptools/resolver.py b/piptools/resolver.py
index 9ee0d773f..4bc3d2d27 100644
--- a/piptools/resolver.py
+++ b/piptools/resolver.py
@@ -3,6 +3,7 @@
unicode_literals)
import os
+import copy
from functools import partial
from itertools import chain, count
@@ -154,7 +155,8 @@ d... |
google__mobly-325 | If `SnippetClient.connect` throws, adb port forwarding is not cleaned.
This leaves adb forwarded port there forever and requires manual clean up.
| [
{
"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/mobly/controllers/android_device.py b/mobly/controllers/android_device.py
index 2be180b4..5d7027e8 100644
--- a/mobly/controllers/android_device.py
+++ b/mobly/controllers/android_device.py
@@ -725,7 +725,17 @@ def load_snippet(self, name, package):
' "%s".' % (package, client_name))
... |
facebookresearch__ParlAI-3069 | Getting error while invoking interactive web CLI
I am receiving the below error while invoking the following command:
**Command:**
`python3.7 -m parlai.scripts.interactive_web --host 0.0.0.0 -m drqa`
**Error:**
```python-traceback
InteractiveWeb.main()
File "/Omega/ParlAI/parlai/scripts/script.py", line... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"\n(A partial) implementation of the DrQa Document Reader from:\n\nDanqi Chen, Adam Fisch... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"\n(A partial) implementation of the DrQa Document Reader from:\n\nDanqi Chen, Adam Fisch... | diff --git a/parlai/agents/drqa/drqa.py b/parlai/agents/drqa/drqa.py
index 1a6a599d4f8..0bce606b429 100644
--- a/parlai/agents/drqa/drqa.py
+++ b/parlai/agents/drqa/drqa.py
@@ -44,10 +44,6 @@
class SimpleDictionaryAgent(DictionaryAgent):
- """
- Override DictionaryAgent to use spaCy tokenizer.
- """
-
... |
zulip__zulip-7580 | Eliminate "Sending invitation" output spam in test_signup
We're getting close to eliminating output spam in our tests! One of the remaining cases is in `tools/test-backend zerver.tests.test_signup`, a bunch of lines like this:
```
2017-11-29 01:22:45.669 INFO [] Sending invitation for realm zulip to alice@zulip.com
... | [
{
"content": "# Documented in https://zulip.readthedocs.io/en/latest/subsystems/queuing.html\nfrom typing import Any, Callable, Dict, List, Mapping, Optional, cast\n\nimport signal\nimport sys\nimport os\nfrom functools import wraps\n\nimport smtplib\nimport socket\n\nfrom django.conf import settings\nfrom djan... | [
{
"content": "# Documented in https://zulip.readthedocs.io/en/latest/subsystems/queuing.html\nfrom typing import Any, Callable, Dict, List, Mapping, Optional, cast\n\nimport signal\nimport sys\nimport os\nfrom functools import wraps\n\nimport smtplib\nimport socket\n\nfrom django.conf import settings\nfrom djan... | diff --git a/zerver/worker/queue_processors.py b/zerver/worker/queue_processors.py
index 8548430133846..6d17f5d858c98 100644
--- a/zerver/worker/queue_processors.py
+++ b/zerver/worker/queue_processors.py
@@ -59,6 +59,7 @@
import re
import importlib
+logger = logging.getLogger(__name__)
class WorkerDeclarationEx... |
lhotse-speech__lhotse-103 | A few questions...
I came across a few confusions while I was reading the code in order to write an example. It would be helpful for me if they are clarified ( I may have missed something).
https://github.com/lhotse-speech/lhotse/blob/master/lhotse/kaldi.py#L68
why `duration - start` rather than just `duration`?
... | [
{
"content": "from collections import defaultdict\nfrom pathlib import Path\nfrom typing import Dict, Optional, Tuple\n\nfrom lhotse.audio import AudioSource, Recording, RecordingSet\nfrom lhotse.supervision import SupervisionSegment, SupervisionSet\nfrom lhotse.utils import Pathlike\n\n\ndef load_kaldi_data_di... | [
{
"content": "from collections import defaultdict\nfrom pathlib import Path\nfrom typing import Dict, Optional, Tuple\n\nfrom lhotse.audio import AudioSource, Recording, RecordingSet\nfrom lhotse.supervision import SupervisionSegment, SupervisionSet\nfrom lhotse.utils import Pathlike\n\n\ndef load_kaldi_data_di... | diff --git a/lhotse/kaldi.py b/lhotse/kaldi.py
index 28772d076..e4eb73c8d 100644
--- a/lhotse/kaldi.py
+++ b/lhotse/kaldi.py
@@ -65,14 +65,14 @@ def load_kaldi_data_dir(path: Pathlike, sampling_rate: int) -> Tuple[RecordingSe
id=segment_id,
recording_id=recording_id,
start=float(s... |
translate__pootle-4149 | Broken l10n in timeline
Issue #3824 requested a comment for this unit:
```
templates/editor/units/xhr_timeline.html:30
check
```
> This one could use some translator comment, what is it used for?
Inspection of [that code](https://github.com/translate/pootle/blob/7907606c/pootle/templates/editor/units/xhr_timelin... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa... | diff --git a/pootle/apps/pootle_store/views.py b/pootle/apps/pootle_store/views.py
index f79bb05d654..53d2f848e8b 100644
--- a/pootle/apps/pootle_store/views.py
+++ b/pootle/apps/pootle_store/views.py
@@ -636,11 +636,9 @@ def timeline(request, unit):
entry.update({
'check_name': ch... |
mdn__kuma-7673 | Changing your locale on the Edit Profile should set a preferredlocale cookie
**Summary**
When you click to "Edit profile" and change your language, it shouldn't just update your session cookie profile, but it should also set a non-HTTP cookie which that works like [we're doing it in Yari](https://github.com/mdn/yari/b... | [
{
"content": "import json\nfrom datetime import datetime, timedelta\n\nimport stripe\nfrom allauth.account.adapter import get_adapter\nfrom allauth.account.models import EmailAddress\nfrom allauth.socialaccount import helpers\nfrom allauth.socialaccount.views import ConnectionsView\nfrom allauth.socialaccount.v... | [
{
"content": "import json\nfrom datetime import datetime, timedelta\n\nimport stripe\nfrom allauth.account.adapter import get_adapter\nfrom allauth.account.models import EmailAddress\nfrom allauth.socialaccount import helpers\nfrom allauth.socialaccount.views import ConnectionsView\nfrom allauth.socialaccount.v... | diff --git a/kuma/users/views.py b/kuma/users/views.py
index 63883da29bd..b0bbf766f2f 100644
--- a/kuma/users/views.py
+++ b/kuma/users/views.py
@@ -473,7 +473,16 @@ def user_edit(request, username):
# If there's no Beta Testers group, ignore that logic
pass
- return redir... |
pytorch__text-1889 | Error running unit tests when building with setup.py install
## 🐛 Bug
**Describe the bug** A clear and concise description of what the bug is.
When building with python setup.py install, running pytest from either the project root directory or the test/ directory causes the error `ImportError: torchtext C++ Extens... | [
{
"content": "import distutils.sysconfig\nimport os\nimport platform\nimport subprocess\nfrom pathlib import Path\n\nimport torch\nfrom setuptools import Extension\nfrom setuptools.command.build_ext import build_ext\n\n\n__all__ = [\n \"get_ext_modules\",\n \"CMakeBuild\",\n]\n\n\n_LIBTORCHTEXT_NAME = \"t... | [
{
"content": "import distutils.sysconfig\nimport os\nimport platform\nimport subprocess\nfrom pathlib import Path\n\nimport torch\nfrom setuptools import Extension\nfrom setuptools.command.build_ext import build_ext\n\n\n__all__ = [\n \"get_ext_modules\",\n \"CMakeBuild\",\n]\n\n\n_LIBTORCHTEXT_NAME = \"t... | diff --git a/.circleci/unittest/linux/scripts/run_test.sh b/.circleci/unittest/linux/scripts/run_test.sh
index c8322ea5f9..3b44c3af62 100755
--- a/.circleci/unittest/linux/scripts/run_test.sh
+++ b/.circleci/unittest/linux/scripts/run_test.sh
@@ -6,4 +6,5 @@ eval "$(./conda/bin/conda shell.bash hook)"
conda activate .... |
tournesol-app__tournesol-1764 | bug: Preview broken with `uploader=`
Preview for the link with empty uploder does not show the same videos as the frontend https://tournesol.app/recommendations?language=&uploader=&advanced=unsafe&duration_gte=180
unlike
https://tournesol.app/recommendations?language=&advanced=unsafe&duration_gte=180
| [
{
"content": "\"\"\"\nAPI returning preview images of the recommendations.\n\"\"\"\nimport datetime\n\nimport numpy\nfrom django.http import HttpResponse, HttpResponseRedirect, QueryDict\nfrom django.urls import reverse\nfrom django.utils import timezone\nfrom django.utils.decorators import method_decorator\nfr... | [
{
"content": "\"\"\"\nAPI returning preview images of the recommendations.\n\"\"\"\nimport datetime\n\nimport numpy\nfrom django.http import HttpResponse, HttpResponseRedirect, QueryDict\nfrom django.urls import reverse\nfrom django.utils import timezone\nfrom django.utils.decorators import method_decorator\nfr... | diff --git a/backend/scripts/ci/lint-fix.sh b/backend/scripts/ci/lint-fix.sh
index 227305ae43..6d4c96a760 100755
--- a/backend/scripts/ci/lint-fix.sh
+++ b/backend/scripts/ci/lint-fix.sh
@@ -3,4 +3,4 @@ set -euxo pipefail
# Python Code Quality Fixes
-isort --settings-path .isort.cfg ${@:-backoffice core faq ml set... |
getsentry__sentry-9517 | SVG static assets broken and not displayed
Every asset with svg type are displayed as broken in web interface.

We installed sentry 9 with python and nginx as proxy on CentOS 7.2
When I look the content-... | [
{
"content": "\"\"\"\nsentry.runner.settings\n~~~~~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2015 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\nfrom __future__ import absolute_import, print_function\n\nimport os\nimport click\n\nDEFAULT_SETTINGS_MODULE = 'se... | [
{
"content": "\"\"\"\nsentry.runner.settings\n~~~~~~~~~~~~~~~~~~~~~~\n\n:copyright: (c) 2015 by the Sentry Team, see AUTHORS for more details.\n:license: BSD, see LICENSE for more details.\n\"\"\"\nfrom __future__ import absolute_import, print_function\n\nimport os\nimport click\n\nDEFAULT_SETTINGS_MODULE = 'se... | diff --git a/src/sentry/runner/settings.py b/src/sentry/runner/settings.py
index 8e9a618b69667b..a5f796d723ff40 100644
--- a/src/sentry/runner/settings.py
+++ b/src/sentry/runner/settings.py
@@ -101,10 +101,14 @@ def configure(ctx, py, yaml, skip_service_validation=False):
# which aren't common in default system r... |
django-hijack__django-hijack-505 | Context processor data not available in notification
The notification is [rendered without any context](https://github.com/django-hijack/django-hijack/blob/ae1d9969346d885570276c3ba1ac307085ac1ed6/hijack/middleware.py#L45), so the context I'm expecting from my context processors doesn't show.
Could the render be cha... | [
{
"content": "import django\nfrom django import forms\nfrom django.shortcuts import resolve_url\nfrom django.template.loader import render_to_string\nfrom django.utils.translation import gettext_lazy as _\n\nfrom hijack.conf import settings\n\n\nclass HijackUserAdminMixin:\n \"\"\"Add hijack button to change... | [
{
"content": "import django\nfrom django import forms\nfrom django.shortcuts import resolve_url\nfrom django.template.loader import render_to_string\nfrom django.utils.translation import gettext_lazy as _\n\nfrom hijack.conf import settings\n\n\nclass HijackUserAdminMixin:\n \"\"\"Add hijack button to change... | diff --git a/hijack/contrib/admin/admin.py b/hijack/contrib/admin/admin.py
index ec37d8cb..26095da0 100644
--- a/hijack/contrib/admin/admin.py
+++ b/hijack/contrib/admin/admin.py
@@ -52,6 +52,7 @@ def hijack_button(self, request, obj):
"is_user_admin": self.model == type(user),
"next":... |
obspy__obspy-2105 | Error reading REFTEK130 file with unoccupied first three channels
ObsPy version 1.1.0 (Windows) installed via Anaconda
Hello ObsPy community,
I'm facing the situation where three component data has been recorded on the velocity channels (4-6) of a reftek 130, but the acceleration channels (1-3) of the datalogger... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nREFTEK130 read support, core routines.\n\"\"\"\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nfrom future.builtins import * # NOQA\nfrom future.utils import native_str\n\nimport copy\nimport io\nimpo... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nREFTEK130 read support, core routines.\n\"\"\"\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nfrom future.builtins import * # NOQA\nfrom future.utils import native_str\n\nimport copy\nimport io\nimpo... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index ac5fa185f9a..d2464ce029d 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -21,7 +21,9 @@
* Fix problems reading some Reftek 130 files, presumably due to floating
point accuracy issues in comparing timestamps. Internal representation of
time stamps is cha... |
Parsl__parsl-3151 | Remove BlueWaters from userguide
**Describe the bug**
Bluewaters is a supercomputer at the NCSA (UIUC) that is now retired. Our userguide still contains an example configuration for this defunct machine that should be removed.
Here's a link to the userguide section as rendered: https://parsl.readthedocs.io/en/sta... | [
{
"content": "from parsl.config import Config\nfrom parsl.executors import HighThroughputExecutor\nfrom parsl.launchers import AprunLauncher\nfrom parsl.providers import TorqueProvider\n\n\nconfig = Config(\n executors=[\n HighThroughputExecutor(\n label=\"bw_htex\",\n cores_per_... | [
{
"content": null,
"path": "parsl/configs/bluewaters.py"
}
] | diff --git a/docs/userguide/configuring.rst b/docs/userguide/configuring.rst
index 7378157601..5233b30ddc 100644
--- a/docs/userguide/configuring.rst
+++ b/docs/userguide/configuring.rst
@@ -446,16 +446,7 @@ The following snippet shows an example configuration for accessing NSCC's **ASPI
.. literalinclude:: ../../pars... |
xonsh__xonsh-3814 | Feature request: exit 1 should work
Currently the commands "exit 0" or "exit 1" don't do anything.
It would be nice if it would do the same as "sys.exit(0/1)" to make it easier and faster to convert a bash script to xonsh.
| [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"The main xonsh script.\"\"\"\nimport os\nimport sys\nimport enum\nimport argparse\nimport builtins\nimport contextlib\nimport signal\nimport traceback\n\nfrom xonsh import __version__\nfrom xonsh.timings import setup_timings\nfrom xonsh.lazyasd import lazyobject\nfro... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"The main xonsh script.\"\"\"\nimport os\nimport sys\nimport enum\nimport argparse\nimport builtins\nimport contextlib\nimport signal\nimport traceback\n\nfrom xonsh import __version__\nfrom xonsh.timings import setup_timings\nfrom xonsh.lazyasd import lazyobject\nfro... | diff --git a/docs/bash_to_xsh.rst b/docs/bash_to_xsh.rst
index 2d7c61fdcf..e5e9202fc1 100644
--- a/docs/bash_to_xsh.rst
+++ b/docs/bash_to_xsh.rst
@@ -110,8 +110,8 @@ line is ``#!/usr/bin/env xonsh``.
- ``docker run -it xonsh/xonsh:slim``
- Xonsh publishes a handful of containers, primarily targeting CI a... |
ietf-tools__datatracker-5253 | Document Search result: sort headers have wrong links
### Describe the issue
https://datatracker.ietf.org/doc/search?activedrafts=on&author=Bormann&by=author&name=&sort=date
is very useful to me. Unfortunately, the sorting links in the table heading are all messed up, Document points to date, Date points to titl... | [
{
"content": "# Copyright The IETF Trust 2016-2020, All Rights Reserved\n# -*- coding: utf-8 -*-\n\nimport re\nimport datetime\nimport debug # pyflakes:ignore\n\nfrom zoneinfo import ZoneInfo\n\nfrom django.conf import settings\n\nfrom ietf.doc.models import Document, DocAlias, Relate... | [
{
"content": "# Copyright The IETF Trust 2016-2020, All Rights Reserved\n# -*- coding: utf-8 -*-\n\nimport re\nimport datetime\nimport debug # pyflakes:ignore\n\nfrom zoneinfo import ZoneInfo\n\nfrom django.conf import settings\n\nfrom ietf.doc.models import Document, DocAlias, Relate... | diff --git a/ietf/doc/utils_search.py b/ietf/doc/utils_search.py
index 0353d52965..00046ed304 100644
--- a/ietf/doc/utils_search.py
+++ b/ietf/doc/utils_search.py
@@ -251,7 +251,6 @@ def num(i):
if query and hasattr(query, "urlencode"): # fed a Django QueryDict
d = query.copy()
for h in meta['he... |
ipython__ipython-3669 | AttributeError: 'BlockingKernelClient' object has no attribute 'started_channels'
I have an app that is centered around IPython running in qt (https://github.com/neuropy/neuropy/blob/master/neuropy/main.py). Yesterday I updated IPython from git, and have had to change a few things since the refactoring about 3 months a... | [
{
"content": "\"\"\" Defines a KernelClient that provides signals and slots.\n\"\"\"\n\nfrom IPython.external.qt import QtCore\n\n# Local imports\nfrom IPython.utils.traitlets import Bool\n\nfrom IPython.kernel import KernelManager\nfrom IPython.kernel.restarter import KernelRestarter\n\nfrom .kernel_mixins imp... | [
{
"content": "\"\"\" Defines a KernelClient that provides signals and slots.\n\"\"\"\n\nfrom IPython.external.qt import QtCore\n\n# Local imports\nfrom IPython.utils.traitlets import Bool, DottedObjectName\n\nfrom IPython.kernel import KernelManager\nfrom IPython.kernel.restarter import KernelRestarter\n\nfrom ... | diff --git a/IPython/qt/manager.py b/IPython/qt/manager.py
index 6887e816177..f9c255e8d85 100644
--- a/IPython/qt/manager.py
+++ b/IPython/qt/manager.py
@@ -4,7 +4,7 @@
from IPython.external.qt import QtCore
# Local imports
-from IPython.utils.traitlets import Bool
+from IPython.utils.traitlets import Bool, DottedO... |
Lightning-AI__torchmetrics-1129 | ClasswiseWrapper yields different results
## 🐛 Bug
Using `JaccardIndex` with `ClasswiseWrapper` results in different values than without `ClasswiseWrapper`.
### To Reproduce
Steps to reproduce the behavior...
Run the code snippet.
#### Code sample
```python
from torchmetrics import ClasswiseWrap... | [
{
"content": "from typing import Any, Dict, List, Optional\n\nfrom torch import Tensor\n\nfrom torchmetrics import Metric\n\n\nclass ClasswiseWrapper(Metric):\n \"\"\"Wrapper class for altering the output of classification metrics that returns multiple values to include\n label information.\n\n Args:\n... | [
{
"content": "from typing import Any, Dict, List, Optional\n\nfrom torch import Tensor\n\nfrom torchmetrics import Metric\n\n\nclass ClasswiseWrapper(Metric):\n \"\"\"Wrapper class for altering the output of classification metrics that returns multiple values to include\n label information.\n\n Args:\n... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index fcd98aa4101..5f85c006ad2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -40,7 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
--
+- Fixed missing reset in `ClasswiseWrapper` ([#1129](https://github.com/Lightning-AI/... |
Flexget__Flexget-2212 | Inaccurate exists_series reject message
The original issue was solved on forums: https://discuss.flexget.com/t/quality-upgrade-doesnt-working/3642 but I've been asked to add an issue here because of the _inaccurate error message_.
### Expected behaviour:
Download better quality
<!---
Please don't just say "it doesn... | [
{
"content": "from __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # noqa pylint: disable=unused-import, redefined-builtin\nfrom past.builtins import basestring\n\nimport logging\n\nfrom path import Path\n\nfrom flexget import plugin\nfrom flexget.event import event\nfrom ... | [
{
"content": "from __future__ import unicode_literals, division, absolute_import\nfrom builtins import * # noqa pylint: disable=unused-import, redefined-builtin\nfrom past.builtins import basestring\n\nimport logging\n\nfrom path import Path\n\nfrom flexget import plugin\nfrom flexget.event import event\nfrom ... | diff --git a/flexget/plugins/filter/exists_series.py b/flexget/plugins/filter/exists_series.py
index 083057c2e8..6608ffd05a 100644
--- a/flexget/plugins/filter/exists_series.py
+++ b/flexget/plugins/filter/exists_series.py
@@ -114,7 +114,7 @@ def on_task_filter(self, task, config):
... |
xonsh__xonsh-427 | Tab completing on empty line with prompt_toolkit kills terminal
Arch Linux with xonsh 0.2.2 and using prompt toolkit. Hitting TAB on an empty line crashes the terminal (rxvt-unicode). I can see the traceback for a split second but then the terminal is gone.
This doesn't happen using readline.
| [
{
"content": "\"\"\"Key bindings for prompt_toolkit xonsh shell.\"\"\"\nimport builtins\n\nfrom prompt_toolkit.filters import Filter\nfrom prompt_toolkit.keys import Keys\n\n\nclass TabShouldInsertIndentFilter(Filter):\n \"\"\"\n Filter that is intended to check if <Tab> should insert indent instead of\n ... | [
{
"content": "\"\"\"Key bindings for prompt_toolkit xonsh shell.\"\"\"\nimport builtins\n\nfrom prompt_toolkit.filters import Filter\nfrom prompt_toolkit.keys import Keys\n\n\nclass TabShouldInsertIndentFilter(Filter):\n \"\"\"\n Filter that is intended to check if <Tab> should insert indent instead of\n ... | diff --git a/xonsh/prompt_toolkit_key_bindings.py b/xonsh/prompt_toolkit_key_bindings.py
index 06f42e28d1..12e4d5b2b3 100644
--- a/xonsh/prompt_toolkit_key_bindings.py
+++ b/xonsh/prompt_toolkit_key_bindings.py
@@ -15,7 +15,7 @@ class TabShouldInsertIndentFilter(Filter):
def __call__(self, cli):
before_cu... |
beeware__toga-1626 | Android: `paths.app` doesn't work in event handlers
**Describe the bug**
On Android, `paths.app` returns `/` when called outside of the `startup` method, e.g. in an event handler. This is because the `__main__` module has finished importing, and it no longer exists in `sys.modules` under that name.
This doesn't h... | [
{
"content": "import sys\nfrom pathlib import Path\n\nimport toga\nfrom toga import App\n\n\nclass Paths:\n # Allow instantiating Path object via the factory\n Path = Path\n\n @property\n def __context(self):\n return App.app._impl.native.getApplicationContext()\n\n @property\n def app(... | [
{
"content": "import sys\nfrom pathlib import Path\n\nimport toga\nfrom toga import App\n\n\nclass Paths:\n # Allow instantiating Path object via the factory\n Path = Path\n\n @property\n def __context(self):\n return App.app._impl.native.getApplicationContext()\n\n def __init__(self):\n ... | diff --git a/src/android/toga_android/paths.py b/src/android/toga_android/paths.py
index 37ad58d97b..653f0074bc 100644
--- a/src/android/toga_android/paths.py
+++ b/src/android/toga_android/paths.py
@@ -13,18 +13,13 @@ class Paths:
def __context(self):
return App.app._impl.native.getApplicationContext()
... |
Netflix__lemur-739 | [Web-UI] Active button for authority is not working
I have list of authorities created on the lemur. I want to disable creation of new certificates using one of the authority. Clicking on **active** button against that authority should make that authority inactive which is not the case.
Even the PUT call to the `htt... | [
{
"content": "\"\"\"\n.. module: lemur.authorities.service\n :platform: Unix\n :synopsis: This module contains all of the services level functions used to\n administer authorities in Lemur\n :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more\n :license: Apache, see LICENSE for more detail... | [
{
"content": "\"\"\"\n.. module: lemur.authorities.service\n :platform: Unix\n :synopsis: This module contains all of the services level functions used to\n administer authorities in Lemur\n :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more\n :license: Apache, see LICENSE for more detail... | diff --git a/lemur/authorities/schemas.py b/lemur/authorities/schemas.py
index 015b5cb96a..7be7e87100 100644
--- a/lemur/authorities/schemas.py
+++ b/lemur/authorities/schemas.py
@@ -70,7 +70,7 @@ def ensure_dates(self, data):
class AuthorityUpdateSchema(LemurInputSchema):
owner = fields.Email(required=True)
... |
pymedusa__Medusa-6751 | [APP SUBMITTED]: AttributeError: 'NoneType' object has no attribute 'find_all'
### INFO
**Python Version**: `3.7.3rc1 (default, Mar 13 2019, 11:01:15) [GCC 8.2.0]`
**Operating System**: `Linux-4.9.35-v7+-armv7l-with-debian-buster-sid`
**Locale**: `UTF-8`
**Branch**: [develop](../tree/develop)
**Database**: `44.14`
**C... | [
{
"content": "# coding=utf-8\n\n\"\"\"Provider code for BTDB.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\n\nfrom medusa import tv\nfrom medusa.bs4_parser import BS4Parser\nfrom medusa.helper.common import convert_size\nfrom medusa.logger.adapters.style import BraceAdapter\nfrom medusa.pr... | [
{
"content": "# coding=utf-8\n\n\"\"\"Provider code for BTDB.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\n\nfrom medusa import tv\nfrom medusa.bs4_parser import BS4Parser\nfrom medusa.helper.common import convert_size\nfrom medusa.logger.adapters.style import BraceAdapter\nfrom medusa.pr... | diff --git a/medusa/providers/torrent/html/btdb.py b/medusa/providers/torrent/html/btdb.py
index 01f49940b5..181b977255 100644
--- a/medusa/providers/torrent/html/btdb.py
+++ b/medusa/providers/torrent/html/btdb.py
@@ -91,12 +91,11 @@ def parse(self, data, mode):
items = []
with BS4Parser(data, 'htm... |
facebookresearch__habitat-lab-343 | Runtime error when running the DD-PPO baseline with 'PROXIMITY_SENSOR'
## ❓ Questions and Help
Hello,
I'm trying to run the DD-PPO RL baseline with all different sensors, specifying them inside the `configs/tasks/pointnav.yaml` file:
<pre>
TASK:
TYPE: Nav-v0
SUCCESS_DISTANCE: 0.2
SENSORS: ['POINTGOAL_WIT... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom typing import Any, Dict, List, Optional, Type, Union\n\nimport attr\nimport numpy as np... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom typing import Any, Dict, List, Optional, Type, Union\n\nimport attr\nimport numpy as np... | diff --git a/habitat/tasks/nav/nav.py b/habitat/tasks/nav/nav.py
index 386e861c32..e8025cd168 100644
--- a/habitat/tasks/nav/nav.py
+++ b/habitat/tasks/nav/nav.py
@@ -388,7 +388,7 @@ def _get_observation_space(self, *args: Any, **kwargs: Any):
low=0.0,
high=self._max_detection_radius,
... |
AUTOMATIC1111__stable-diffusion-webui-7430 | [Bug]: "AssertionError: bad number of vertical texts: 2; must be 3" on hires and prompt matrix
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
Performing a render using both **hires fix** and **prompt matrix** results in an e... | [
{
"content": "import math\r\nfrom collections import namedtuple\r\nfrom copy import copy\r\nimport random\r\n\r\nimport modules.scripts as scripts\r\nimport gradio as gr\r\n\r\nfrom modules import images\r\nfrom modules.processing import process_images, Processed\r\nfrom modules.shared import opts, cmd_opts, st... | [
{
"content": "import math\r\nfrom collections import namedtuple\r\nfrom copy import copy\r\nimport random\r\n\r\nimport modules.scripts as scripts\r\nimport gradio as gr\r\n\r\nfrom modules import images\r\nfrom modules.processing import process_images, Processed\r\nfrom modules.shared import opts, cmd_opts, st... | diff --git a/scripts/prompt_matrix.py b/scripts/prompt_matrix.py
index 6340a7d9aff..b1c486d44e3 100644
--- a/scripts/prompt_matrix.py
+++ b/scripts/prompt_matrix.py
@@ -99,8 +99,8 @@ def run(self, p, put_at_start, different_seeds, prompt_type, variations_delimite
p.prompt_for_display = positive_prompt
... |
deepset-ai__haystack-7972 | Add Distribution-based rank fusion in JoinDocuments
**Is your feature request related to a problem? Please describe.**
Add [Distribution-based rank fusion](https://medium.com/plain-simple-software/distribution-based-score-fusion-dbsf-a-new-approach-to-vector-search-ranking-f87c37488b18) in JoinDocuments
**Describe ... | [
{
"content": "# SPDX-FileCopyrightText: 2022-present deepset GmbH <info@deepset.ai>\n#\n# SPDX-License-Identifier: Apache-2.0\n\nimport itertools\nfrom collections import defaultdict\nfrom math import inf\nfrom typing import List, Optional\n\nfrom haystack import Document, component, logging\nfrom haystack.core... | [
{
"content": "# SPDX-FileCopyrightText: 2022-present deepset GmbH <info@deepset.ai>\n#\n# SPDX-License-Identifier: Apache-2.0\n\nimport itertools\nfrom collections import defaultdict\nfrom math import inf\nfrom typing import List, Optional\n\nfrom haystack import Document, component, logging\nfrom haystack.core... | diff --git a/haystack/components/joiners/document_joiner.py b/haystack/components/joiners/document_joiner.py
index 6e1e5a803b..bd51613df7 100644
--- a/haystack/components/joiners/document_joiner.py
+++ b/haystack/components/joiners/document_joiner.py
@@ -195,9 +195,11 @@ def _distribution_based_rank_fusion(self, docume... |
AUTOMATIC1111__stable-diffusion-webui-5907 | [Bug]: Slow .safetensors loading
### Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
### What happened?
System specs: 5800X3D, RTX 3080 12GB, 64GB DDR4-3600, Windows 11 22H2 22621.963, latest Nvidia driver (527.56), latest BIOS update.
Th... | [
{
"content": "import collections\r\nimport os.path\r\nimport sys\r\nimport gc\r\nfrom collections import namedtuple\r\nimport torch\r\nimport re\r\nimport safetensors.torch\r\nfrom omegaconf import OmegaConf\r\nfrom os import mkdir\r\nfrom urllib import request\r\nimport ldm.modules.midas as midas\r\n\r\nfrom l... | [
{
"content": "import collections\r\nimport os.path\r\nimport sys\r\nimport gc\r\nfrom collections import namedtuple\r\nimport torch\r\nimport re\r\nimport safetensors.torch\r\nfrom omegaconf import OmegaConf\r\nfrom os import mkdir\r\nfrom urllib import request\r\nimport ldm.modules.midas as midas\r\n\r\nfrom l... | diff --git a/modules/sd_models.py b/modules/sd_models.py
index ecdd91c5084..cd938656c87 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -168,7 +168,10 @@ def get_state_dict_from_checkpoint(pl_sd):
def read_state_dict(checkpoint_file, print_global_state=False, map_location=None):
_, extension = os... |
zulip__zulip-23473 | We should 404 on /api/api-doc-template, not 500
Requesting `/api/api-doc-template` directly hits this code:
https://github.com/zulip/zulip/blob/c2148dc4d9e2ba1ea96d8ee0c972fcf77af43e8d/zerver/views/documentation.py#L190-L196
Those `assert`s cause the request to 500, since `/zerver/api/api-doc-template.md` is an int... | [
{
"content": "import os\nimport random\nimport re\nfrom collections import OrderedDict\nfrom dataclasses import dataclass\nfrom typing import Any, Dict, Optional\n\nfrom django.conf import settings\nfrom django.http import HttpRequest, HttpResponse, HttpResponseNotFound\nfrom django.template import loader\nfrom... | [
{
"content": "import os\nimport random\nimport re\nfrom collections import OrderedDict\nfrom dataclasses import dataclass\nfrom typing import Any, Dict, Optional\n\nfrom django.conf import settings\nfrom django.http import HttpRequest, HttpResponse, HttpResponseNotFound\nfrom django.template import loader\nfrom... | diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.py
index b9442aeb39c39..2e1d572a265d4 100644
--- a/zerver/tests/test_docs.py
+++ b/zerver/tests/test_docs.py
@@ -137,6 +137,14 @@ def test_api_doc_endpoints(self) -> None:
)
self.assertEqual(result.status_code, 404)
+ result = se... |
fossasia__open-event-server-5902 | Depenendency Upgrades
The following dependencies have to be upgraded
- urllib3 = ">=1.24.2"
- SQLAlchemy = ">=1.3.0"
- Jinja2 = ">=2.10.1"
- marshmallow = ">=2.15.1"
| [
{
"content": "from marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Schema\nfrom flask_rest_jsonapi import ResourceList\nfrom sqlalchemy import func\nfrom app.api.helpers.utilities import dasherize\n\nfrom app.api.bootstrap import api\nfrom app.models import db\nfrom app.models.event imp... | [
{
"content": "from marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Schema\nfrom flask_rest_jsonapi import ResourceList\nfrom sqlalchemy import func\nfrom app.api.helpers.utilities import dasherize\n\nfrom app.api.bootstrap import api\nfrom app.models import db\nfrom app.models.event imp... | diff --git a/Pipfile b/Pipfile
index 9daff16234..7881565e4c 100644
--- a/Pipfile
+++ b/Pipfile
@@ -59,7 +59,7 @@ Flask-REST-JSONAPI = {editable = true, ref = "shubhamp-master", git = "https://g
WTForms = "*"
factory_boy = "*"
Flask-Redis = "*"
-SQLAlchemy = "==1.1.15"
+SQLAlchemy = ">=1.3.0,<2.0.0"
Flask-Elasticsea... |
googleapis__python-bigquery-1484 | option to set preserve_ascii_control_characters is not available on load config
#### Environment details
- OS type and version: windows 10
- Python version: 3.10
- pip version: pip 22.0.3
- `google-cloud-bigquery` version: `Name: google-cloud-bigquery
Version: 3.3.3
Summary: Google BigQuery API cli... | [
{
"content": "# Copyright 2015 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 applicabl... | [
{
"content": "# Copyright 2015 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 applicabl... | diff --git a/google/cloud/bigquery/job/load.py b/google/cloud/bigquery/job/load.py
index 5c7f26841..14a7fa30b 100644
--- a/google/cloud/bigquery/job/load.py
+++ b/google/cloud/bigquery/job/load.py
@@ -311,6 +311,19 @@ def null_marker(self):
def null_marker(self, value):
self._set_sub_prop("nullMarker", va... |
kubeflow__pipelines-4988 | Add clear instructions for authorization code / token
I was following [this official example](https://colab.research.google.com/github/kubeflow/website/blob/master/content/en/docs/pipelines/sdk/python-function-components.ipynb) to submit a pipeline via Jupyter or Python script
I filled in the client id and credentia... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/sdk/python/kfp/_auth.py b/sdk/python/kfp/_auth.py
index 057b39b6849..654d74c39a6 100644
--- a/sdk/python/kfp/_auth.py
+++ b/sdk/python/kfp/_auth.py
@@ -178,7 +178,7 @@ def get_auth_code(client_id):
auth_url = "https://accounts.google.com/o/oauth2/v2/auth?client_id=%s&response_type=code&scope=openid%%2... |
django-cms__django-cms-3269 | Error in DefaultLanguageChanger when passing classes as views kwargs
When passing classes as kwargs to views in apphooked applications (e.g.: `authentication_form` parameter to `django.contrib.auth.views.login`) DefaultLanguageChanger.**call** result in a traceback
Error is originated here
https://github.com/divio/dja... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import with_statement\nfrom cms.utils import get_language_from_request\nfrom cms.utils.i18n import force_language, hide_untranslated\nfrom django.conf import settings\nfrom django.core.urlresolvers import NoReverseMatch, reverse, resolve\n\nimport warnings\... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import with_statement\nfrom cms.utils import get_language_from_request\nfrom cms.utils.i18n import force_language, hide_untranslated\nfrom django.conf import settings\nfrom django.core.urlresolvers import NoReverseMatch, reverse, resolve\n\nimport warnings\... | diff --git a/cms/test_utils/project/sampleapp/forms.py b/cms/test_utils/project/sampleapp/forms.py
new file mode 100644
index 00000000000..ff3db099a28
--- /dev/null
+++ b/cms/test_utils/project/sampleapp/forms.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+from django.contrib.auth.forms import AuthenticationForm
+
+
+cl... |
pre-commit__pre-commit-370 | Ruby hooks failing with rbenv installed
Pre-commit has been failing for the past few weeks.
https://gist.github.com/ThatGerber/d6533155848076b25e5e0d5cb02e20eb
Seems to be an issue with the ruby (rbenv) environment.
Tried running `pre-commit clean && pre-commit` but it returns the same issue. Setting `rbenv global 2... | [
{
"content": "from __future__ import unicode_literals\n\nimport contextlib\nimport io\nimport os.path\nimport shutil\n\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import Var\nfrom pre_commit.languages import helpers\nfrom pre_commit.util import CalledProcessError\nfrom pre_commit.u... | [
{
"content": "from __future__ import unicode_literals\n\nimport contextlib\nimport io\nimport os.path\nimport shutil\n\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import Var\nfrom pre_commit.languages import helpers\nfrom pre_commit.util import CalledProcessError\nfrom pre_commit.u... | diff --git a/pre_commit/languages/ruby.py b/pre_commit/languages/ruby.py
index dc320b3f0..28ad37718 100644
--- a/pre_commit/languages/ruby.py
+++ b/pre_commit/languages/ruby.py
@@ -19,16 +19,18 @@
def get_env_patch(venv, language_version):
- return (
+ patches = (
('GEM_HOME', os.path.join(venv, 'ge... |
cloud-custodian__cloud-custodian-5945 | aws.lambda network-location filter causes KeyError
**Describe the bug**
Attempting to use the `network-location` filter with either `resource/security-group` or `subnet/security-group` causes a `KeyError`
**To Reproduce**
Execute example policy below.
**Expected behavior**
Custodian should execute the policy s... | [
{
"content": "# Copyright 2016-2017 Capital One Services, LLC\n# Copyright The Cloud Custodian Authors.\n# SPDX-License-Identifier: Apache-2.0\nfrom c7n.exceptions import PolicyValidationError\nfrom c7n.utils import local_session, type_schema\n\nfrom .core import Filter, ValueFilter\nfrom .related import Relate... | [
{
"content": "# Copyright 2016-2017 Capital One Services, LLC\n# Copyright The Cloud Custodian Authors.\n# SPDX-License-Identifier: Apache-2.0\nfrom c7n.exceptions import PolicyValidationError\nfrom c7n.utils import local_session, type_schema\n\nfrom .core import Filter, ValueFilter\nfrom .related import Relate... | diff --git a/c7n/filters/vpc.py b/c7n/filters/vpc.py
index c47b96ee419..96736efe2e1 100644
--- a/c7n/filters/vpc.py
+++ b/c7n/filters/vpc.py
@@ -163,9 +163,10 @@ def process(self, resources, event=None):
results = []
for r in resources:
resource_sgs = self.filter_ignored(
- ... |
ultrabug__py3status-239 | Module "xrandr_rotate" makes i3 unusable
We have seen a case (see #217) when i3 becomes unusable after rotating screen using `xrandr_rotate` module. The symptoms are: `xrandr` process is stalled and only sending SIGCONT to it makes i3 usable again.
This issue is not reproducible for everyone. If you experience a simil... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nSwitch between horizontal and vertical screen rotation on a single click.\n\nConfiguration parameters:\n cache_timeout: how often to refresh this module.\n (default is 10)\n format: a string that formats the output, can include placeholders.\n ... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nSwitch between horizontal and vertical screen rotation on a single click.\n\nConfiguration parameters:\n cache_timeout: how often to refresh this module.\n (default is 10)\n format: a string that formats the output, can include placeholders.\n ... | diff --git a/py3status/modules/xrandr_rotate.py b/py3status/modules/xrandr_rotate.py
index 35cee6f415..8c4676c137 100644
--- a/py3status/modules/xrandr_rotate.py
+++ b/py3status/modules/xrandr_rotate.py
@@ -84,8 +84,8 @@ def _apply(self):
rotation = self.horizontal_rotation if self.displayed == self.horizontal... |
yt-project__yt-3569 | OffAxisProjectionPlot Failed when Log Level Set to Debug
### Bug report
**Bug summary**
If log level set to `debug`, then `OffAxisProjectionPlot` would fail when following the tutorial at [website](https://yt-project.org/doc/visualizing/plots.html#off-axis-projection-plots).
Alhough this can be avoid by setting l... | [
{
"content": "import numpy as np\n\nfrom yt.funcs import mylog\nfrom yt.units.yt_array import YTArray\nfrom yt.utilities.exceptions import YTException\n\n\ndef _aligned(a, b):\n aligned_component = np.abs(np.dot(a, b) / np.linalg.norm(a) / np.linalg.norm(b))\n return np.isclose(aligned_component, 1.0, 1.0... | [
{
"content": "import numpy as np\n\nfrom yt.units.yt_array import YTArray\nfrom yt.utilities.exceptions import YTException\n\n\ndef _aligned(a, b):\n aligned_component = np.abs(np.dot(a, b) / np.linalg.norm(a) / np.linalg.norm(b))\n return np.isclose(aligned_component, 1.0, 1.0e-13)\n\n\ndef _validate_uni... | diff --git a/yt/utilities/orientation.py b/yt/utilities/orientation.py
index c536b6a38d2..c02f1efa3ac 100644
--- a/yt/utilities/orientation.py
+++ b/yt/utilities/orientation.py
@@ -1,6 +1,5 @@
import numpy as np
-from yt.funcs import mylog
from yt.units.yt_array import YTArray
from yt.utilities.exceptions import Y... |
pre-commit__pre-commit-2605 | Rscript not found in Windows
### search you tried in the issue tracker
Rscript not found
### describe your issue
Hi,
I was adding hook for R language in pre-commit for the first time. And pre-commit throw me an error as
```
Executable `C:\path\to\R\R-4.0.5\bin\Rscript` not found
```
Because I was using ho... | [
{
"content": "from __future__ import annotations\n\nimport contextlib\nimport os\nimport shlex\nimport shutil\nfrom typing import Generator\nfrom typing import Sequence\n\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import PatchesT\nfrom pre_commit.envcontext import UNSET\nfrom pre_... | [
{
"content": "from __future__ import annotations\n\nimport contextlib\nimport os\nimport shlex\nimport shutil\nfrom typing import Generator\nfrom typing import Sequence\n\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import PatchesT\nfrom pre_commit.envcontext import UNSET\nfrom pre_... | diff --git a/pre_commit/languages/r.py b/pre_commit/languages/r.py
index 22b5f2530..d281102b2 100644
--- a/pre_commit/languages/r.py
+++ b/pre_commit/languages/r.py
@@ -15,6 +15,7 @@
from pre_commit.prefix import Prefix
from pre_commit.util import clean_path_on_failure
from pre_commit.util import cmd_output_b
+from ... |
e-valuation__EvaP-1751 | Questionnaire names in result exports
When hiding a questionnaire and creating a new version, the current date will be added to the title of the old questionnaire. This information will be shown in exports which might confuse users. We should think about only showing the display name instead or handling it in a complet... | [
{
"content": "import warnings\nfrom collections import OrderedDict, defaultdict\nfrom itertools import chain, repeat\nfrom typing import Dict, Tuple\n\nimport xlwt\nfrom django.db.models import Q\nfrom django.utils.translation import gettext as _\n\nfrom evap.evaluation.models import CourseType, Degree, Evaluat... | [
{
"content": "import warnings\nfrom collections import OrderedDict, defaultdict\nfrom itertools import chain, repeat\nfrom typing import Dict, Tuple\n\nimport xlwt\nfrom django.db.models import Q\nfrom django.utils.translation import gettext as _\n\nfrom evap.evaluation.models import CourseType, Degree, Evaluat... | diff --git a/evap/results/exporters.py b/evap/results/exporters.py
index e006bc6f23..41f5f63ccc 100644
--- a/evap/results/exporters.py
+++ b/evap/results/exporters.py
@@ -244,9 +244,9 @@ def write_overall_results(self, evaluations_with_results, course_results_exist):
def write_questionnaire(self, questionnaire, ... |
google__timesketch-406 | Pylint not present in requirements.txt
Not pinning version of Pylint makes our build a bit non-deterministic. Pylint's behavior can change between versions and break our build.
| [
{
"content": "#!/usr/bin/env python\n# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/L... | [
{
"content": "#!/usr/bin/env python\n# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/L... | diff --git a/.travis.yml b/.travis.yml
index b19a30a703..4720800a0b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,6 +4,5 @@ python:
# command to install dependencies
install:
- "pip install ."
- - "pip install Flask-Testing nose mock pylint coverage requests BeautifulSoup"
# command to run tests
script: nose... |
spack__spack-2768 | Unable to build PETSc, PETSC_DIR already set
`configure` fails immediately if the `PETSC_DIR` environment variable is already set. Spack should unset this.
```
===============================================================================
Configuring PETSc to compile on your system ... | [
{
"content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ... | [
{
"content": "##############################################################################\n# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.\n# Produced at the Lawrence Livermore National Laboratory.\n#\n# This file is part of Spack.\n# Created by Todd Gamblin, tgamblin@llnl.gov, All righ... | diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py
index 578349cbc45b6d..7d51bbad487616 100644
--- a/var/spack/repos/builtin/packages/petsc/package.py
+++ b/var/spack/repos/builtin/packages/petsc/package.py
@@ -218,6 +218,16 @@ def install(self, spec, pref... |
ibis-project__ibis-9055 | bug(postgres): cannot parse types from `information_schema`
For the information_schema database, if you attempt to pull a table the types have `information_schema.` prepended, which breaks our type parsing.
I can't get this to replicate for other databases, so I don't think it's an issue beyond info schema, but stil... | [
{
"content": "from __future__ import annotations\n\nfrom functools import partial\nfrom typing import NoReturn\n\nimport sqlglot as sg\nimport sqlglot.expressions as sge\n\nimport ibis.common.exceptions as com\nimport ibis.expr.datatypes as dt\nfrom ibis.common.collections import FrozenDict\nfrom ibis.formats i... | [
{
"content": "from __future__ import annotations\n\nfrom functools import partial\nfrom typing import NoReturn\n\nimport sqlglot as sg\nimport sqlglot.expressions as sge\n\nimport ibis.common.exceptions as com\nimport ibis.expr.datatypes as dt\nfrom ibis.common.collections import FrozenDict\nfrom ibis.formats i... | diff --git a/ibis/backends/postgres/tests/test_client.py b/ibis/backends/postgres/tests/test_client.py
index 6c78c751bf1a..6a2d635786d4 100644
--- a/ibis/backends/postgres/tests/test_client.py
+++ b/ibis/backends/postgres/tests/test_client.py
@@ -295,3 +295,84 @@ def test_pgvector_type_load(con):
)
con.drop... |
googleapis__python-spanner-django-429 | django: lookups with multiple target fields fail
3 test failures out of 13. The failing tests fail with
```shell
django.core.exceptions.FieldError: The relation has multiple target fields, but only single target field was asked for
```
as per
```shell
==============================================================... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file or at\n# https://developers.google.com/open-source/licenses/bsd\n\nfrom django.db.models import DecimalField\nfrom django.db.models.lookups import (\n Contains, ... | [
{
"content": "# Copyright 2020 Google LLC\n#\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file or at\n# https://developers.google.com/open-source/licenses/bsd\n\nfrom django.db.models import DecimalField\nfrom django.db.models.lookups import (\n Contains, ... | diff --git a/django_spanner/lookups.py b/django_spanner/lookups.py
index 0f0c30da64..a48be3167c 100644
--- a/django_spanner/lookups.py
+++ b/django_spanner/lookups.py
@@ -122,10 +122,10 @@ def cast_param_to_float(self, compiler, connection):
if isinstance(self.lhs.output_field, DecimalField):
para... |
archlinux__archinstall-1193 | KeyError: 'children' trying to create VM uefi systemboot and xfs
Attached files with a zip because it does not support json files.
[otherfiles.zip](https://github.com/archlinux/archinstall/files/8496385/otherfiles.zip)
[cmd_history.txt](https://github.com/archlinux/archinstall/files/8496378/cmd_history.txt)
[install... | [
{
"content": "from __future__ import annotations\nimport time\nimport logging\nimport json\nimport pathlib\nfrom typing import Optional, Dict, Any, TYPE_CHECKING\n# https://stackoverflow.com/a/39757388/929999\nif TYPE_CHECKING:\n\tfrom .blockdevice import BlockDevice\n\t_: Any\n\nfrom .partition import Partitio... | [
{
"content": "from __future__ import annotations\nimport time\nimport logging\nimport json\nimport pathlib\nfrom typing import Optional, Dict, Any, TYPE_CHECKING\n# https://stackoverflow.com/a/39757388/929999\nif TYPE_CHECKING:\n\tfrom .blockdevice import BlockDevice\n\t_: Any\n\nfrom .partition import Partitio... | diff --git a/archinstall/lib/disk/filesystem.py b/archinstall/lib/disk/filesystem.py
index 8a531de000..db97924fa1 100644
--- a/archinstall/lib/disk/filesystem.py
+++ b/archinstall/lib/disk/filesystem.py
@@ -55,7 +55,7 @@ def partuuid_to_index(self, uuid :str) -> Optional[int]:
output = json.loads(SysCommand(f"lsblk... |
Netflix__lemur-142 | SubCA autogenerated descriptions for their certs are incorrect
If you create a root CA, and look up the certificate for that CA its description is:
This is the ROOT certificate for the $CN certificate authority.
If you create a subCA off of that rootCA, and look up the certificate for that SubCA its description is:
T... | [
{
"content": "\"\"\"\n.. module: lemur.authorities.service\n :platform: Unix\n :synopsis: This module contains all of the services level functions used to\n administer authorities in Lemur\n :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more\n :license: Apache, see LICENSE for more detail... | [
{
"content": "\"\"\"\n.. module: lemur.authorities.service\n :platform: Unix\n :synopsis: This module contains all of the services level functions used to\n administer authorities in Lemur\n :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more\n :license: Apache, see LICENSE for more detail... | diff --git a/lemur/authorities/service.py b/lemur/authorities/service.py
index 5a1f4341af..7d825c78c1 100644
--- a/lemur/authorities/service.py
+++ b/lemur/authorities/service.py
@@ -58,7 +58,15 @@ def create(kwargs):
cert = Certificate(cert_body, chain=intermediate)
cert.owner = kwargs['ownerEmail']
- c... |
Health-Informatics-UoN__Carrot-Mapper-645 | 💡 Combine Github release workflows
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Is your proposal related to a problem or functionality gap?
Currently the release workflow for dev/test/production is 3 separate Github actions, working with Gitflow. So merging a new fix ... | [
{
"content": "\"\"\"\nDjango settings for api project.\n\nGenerated by 'django-admin startproject' using Django 3.1.5.\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.1/r... | [
{
"content": "\"\"\"\nDjango settings for api project.\n\nGenerated by 'django-admin startproject' using Django 3.1.5.\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.1/r... | diff --git a/.github/labeler.yml b/.github/labeler.yml
new file mode 100644
index 000000000..63e4b82dd
--- /dev/null
+++ b/.github/labeler.yml
@@ -0,0 +1,26 @@
+"Area: Migrations":
+ - 'app/api/mapping/migrations/*'
+
+dependencies:
+ - 'app/react-client-app/package.json'
+ - 'app/react-client-app/package-lock.json'... |
akvo__akvo-rsr-1822 | Show all projects in MyRSR for superusers and RSR admins
## Test plan
1. **Superusers or RSR admins**
1. Login as a superuser or RSR admin
2. Go to MyRSR -> My projects
3. All projects should be shown
2. **Organisation admins or project editors**
1. Login as an organisation admin or project editor
2. Go ... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"Akvo RSR is covered by the GNU Affero General Public License.\n\nSee more details in the license.txt file located at the root folder of the\nAkvo RSR module. For additional details on the GNU license please\nsee < http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"Akvo RSR is covered by the GNU Affero General Public License.\n\nSee more details in the license.txt file located at the root folder of the\nAkvo RSR module. For additional details on the GNU license please\nsee < http://www.gnu.org/licenses/agpl.html >.\n\"\"\"\n\... | diff --git a/akvo/rsr/views/my_rsr.py b/akvo/rsr/views/my_rsr.py
index 6e0bc81df6..7bc7fea795 100644
--- a/akvo/rsr/views/my_rsr.py
+++ b/akvo/rsr/views/my_rsr.py
@@ -112,10 +112,14 @@ def my_updates(request):
def my_projects(request):
"""Directory of Projects connected to the user."""
organisations = reques... |
aio-libs__aiohttp-2341 | Relax attribute lookup in warning about old-styled middleware
For class-based middleware like
```
class Middleware:
async def __call__(self, app, handler):
...
```
there is no `__name__` attr.
Moreover I could imaging other situations where `__name__` doesn't exists.
It breaks web server starting.... | [
{
"content": "import asyncio\nimport os\nimport signal\nimport socket\nimport stat\nimport sys\nimport warnings\nfrom argparse import ArgumentParser\nfrom collections import Iterable, MutableMapping\nfrom functools import partial\nfrom importlib import import_module\n\nfrom yarl import URL\n\nfrom . import (hdr... | [
{
"content": "import asyncio\nimport os\nimport signal\nimport socket\nimport stat\nimport sys\nimport warnings\nfrom argparse import ArgumentParser\nfrom collections import Iterable, MutableMapping\nfrom functools import partial\nfrom importlib import import_module\n\nfrom yarl import URL\n\nfrom . import (hdr... | diff --git a/CHANGES/2340.bugfix b/CHANGES/2340.bugfix
new file mode 100644
index 00000000000..aa0c5e4b947
--- /dev/null
+++ b/CHANGES/2340.bugfix
@@ -0,0 +1 @@
+Relax attribute lookup in warning about old-styled middleware
diff --git a/aiohttp/web.py b/aiohttp/web.py
index 4b5a1de2ff6..cc89d9304a8 100644
--- a/aiohttp... |
OpenCTI-Platform__connectors-608 | Riskiq Connector throwing errors
## Description
RiskIQ connector is not working as expected with the correct credentials defined.
## Environment
1. OS - Ubuntu
2. OpenCTI version: 5.1.3
## Riskiq Connector Logs:
INFO:root:Listing Threat-Actors with filters null.,
INFO:root:Connector registered with ID: ... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"OpenCTI RiskIQ's article importer module.\"\"\"\nimport datetime\nimport itertools\nfrom typing import Any, Mapping, Optional\n\nfrom dateutil import parser\nfrom pycti import OpenCTIConnectorHelper\nfrom stix2 import (\n Bundle,\n DomainName,\n EmailAddress... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"OpenCTI RiskIQ's article importer module.\"\"\"\nimport datetime\nimport itertools\nfrom typing import Any, Mapping, Optional\n\nfrom dateutil import parser\nfrom pycti import OpenCTIConnectorHelper\nfrom stix2 import (\n Bundle,\n DomainName,\n EmailAddress... | diff --git a/external-import/riskiq/src/riskiq/article_importer.py b/external-import/riskiq/src/riskiq/article_importer.py
index 1b1435a7f8..2b8a8aa67d 100644
--- a/external-import/riskiq/src/riskiq/article_importer.py
+++ b/external-import/riskiq/src/riskiq/article_importer.py
@@ -222,8 +222,14 @@ def _process_indicat... |
PennyLaneAI__pennylane-2020 | [BUG] Classical jacobian is computed for non-trainable parameters too with Torch
### Expected behavior
Using `qml.transforms.classical_jacobian` by passing `argnum=None` with Torch interface computes the classical jacobian wrt. the trainable parameters.
```python
import pennylane as qml
from pennylane import numpy ... | [
{
"content": "# Copyright 2018-2021 Xanadu Quantum Technologies Inc.\r\n\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n\r\n# http://www.apache.org/licenses/LICENSE-2... | [
{
"content": "# Copyright 2018-2021 Xanadu Quantum Technologies Inc.\r\n\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n\r\n# http://www.apache.org/licenses/LICENSE-2... | diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md
index e1af8f97bc7..9b3cfdefe3b 100644
--- a/doc/releases/changelog-dev.md
+++ b/doc/releases/changelog-dev.md
@@ -10,6 +10,11 @@
<h3>Bug fixes</h3>
+* Fixes a bug in `classical_jacobian` when used with Torch, where the
+ Jacobian of the pr... |
hi-primus__optimus-1104 | Profiling bug when creating a dataframe from a dictionary using dask
**Describe the bug**
calling `df.profile("*")` for a dataframe created using `op.create.dataframe` causes an error `KeyError: 'id'`.
**To Reproduce**
```
df = op.create.dataframe({"id":[5,6,10,11,79,100]})
df.profile("*")
```
| [
{
"content": "from abc import abstractmethod\n\nimport dask\nimport humanize\nfrom dask.distributed import Variable\nfrom dask.utils import parse_bytes\n\nfrom optimus.engines.base.basedataframe import BaseDataFrame\nfrom optimus.engines.pandas.dataframe import PandasDataFrame\nfrom optimus.helpers.functions im... | [
{
"content": "from abc import abstractmethod\n\nimport dask\nimport humanize\nfrom dask.distributed import Variable\nfrom dask.utils import parse_bytes\n\nfrom optimus.engines.base.basedataframe import BaseDataFrame\nfrom optimus.engines.pandas.dataframe import PandasDataFrame\nfrom optimus.helpers.functions im... | diff --git a/optimus/engines/base/dask/dataframe.py b/optimus/engines/base/dask/dataframe.py
index b3890191e..f8ab1af70 100644
--- a/optimus/engines/base/dask/dataframe.py
+++ b/optimus/engines/base/dask/dataframe.py
@@ -25,7 +25,13 @@ def _assign(self, kw_columns):
for key in kw_columns:
... |
freedomofpress__securedrop-6299 | add `robots.txt` and a `nofollow` robots meta tag to dissuade legitimate crawlers from crawling tor2webb-ed instances
| [
{
"content": "import operator\nimport os\nimport io\n\nfrom base64 import urlsafe_b64encode\nfrom datetime import datetime, timedelta, timezone\nfrom typing import Union\n\nimport werkzeug\nfrom flask import (Blueprint, render_template, flash, redirect, url_for,\n session, current_app, request... | [
{
"content": "import operator\nimport os\nimport io\n\nfrom base64 import urlsafe_b64encode\nfrom datetime import datetime, timedelta, timezone\nfrom typing import Union\n\nimport werkzeug\nfrom flask import (Blueprint, render_template, flash, redirect, url_for,\n session, current_app, request... | diff --git a/securedrop/source_app/main.py b/securedrop/source_app/main.py
index 46095a537b..03a17bbe5e 100644
--- a/securedrop/source_app/main.py
+++ b/securedrop/source_app/main.py
@@ -8,7 +8,7 @@
import werkzeug
from flask import (Blueprint, render_template, flash, redirect, url_for,
- session,... |
chainer__chainer-1554 | Nested exception occurs on type error on using Python3
When a type error occurs in type-check, Chainer raises a nested error when a user uses Python3 and shows the message:
```
During handling of the above exception, another exception occurred:
```
| [
{
"content": "import collections\nimport os\nimport six\nimport traceback\nimport weakref\n\nimport chainer\nfrom chainer import cuda\nfrom chainer import flag\nfrom chainer.utils import type_check\nfrom chainer import variable\n\n\nclass Function(object):\n\n \"\"\"Function on variables with backpropagation... | [
{
"content": "import collections\nimport os\nimport traceback\nimport weakref\n\nimport six\n\nimport chainer\nfrom chainer import cuda\nfrom chainer import flag\nfrom chainer.utils import type_check\nfrom chainer import variable\n\n\nclass Function(object):\n\n \"\"\"Function on variables with backpropagati... | diff --git a/chainer/function.py b/chainer/function.py
index a2e606c5c637..3a5a4da20160 100644
--- a/chainer/function.py
+++ b/chainer/function.py
@@ -1,9 +1,10 @@
import collections
import os
-import six
import traceback
import weakref
+import six
+
import chainer
from chainer import cuda
from chainer import ... |
facebookresearch__nevergrad-723 | Suggesting a point breaks when one of the parameters is a constant numpy array
## Steps to reproduce
```
import nevergrad as ng
import numpy as np
constant_param = np.zeros(3, dtype=int)
param = ng.p.Instrumentation(ng.p.Choice(["a", "b", "c"]), constant_param)
optim = ng.optimizers.OnePlusOne(parametrization... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport uuid\nimport warnings\nimport operator\nimport functools\nfrom collections import Order... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport uuid\nimport warnings\nimport operator\nimport functools\nfrom collections import Order... | diff --git a/nevergrad/parametrization/core.py b/nevergrad/parametrization/core.py
index e1ec68acd..eb3937704 100644
--- a/nevergrad/parametrization/core.py
+++ b/nevergrad/parametrization/core.py
@@ -402,7 +402,13 @@ def value(self) -> tp.Any:
@value.setter
def value(self, value: tp.Any) -> None:
- ... |
paperless-ngx__paperless-ngx-4374 | [BUG] Adding a note doesn't update the "modified" parameter of a document
### Description
I'm working on an app that relies on the "modified" attribute of a document to determine whether it was changed recently.
This works well unless the only change made to a document was the addition of a note, which case "modifi... | [
{
"content": "import itertools\nimport json\nimport logging\nimport os\nimport re\nimport tempfile\nimport urllib\nimport zipfile\nfrom datetime import datetime\nfrom pathlib import Path\nfrom time import mktime\nfrom unicodedata import normalize\nfrom urllib.parse import quote\n\nimport pathvalidate\nfrom djan... | [
{
"content": "import itertools\nimport json\nimport logging\nimport os\nimport re\nimport tempfile\nimport urllib\nimport zipfile\nfrom datetime import datetime\nfrom pathlib import Path\nfrom time import mktime\nfrom unicodedata import normalize\nfrom urllib.parse import quote\n\nimport pathvalidate\nfrom djan... | diff --git a/docs/api.md b/docs/api.md
index df86ef1e5d2..749c9e0620e 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -6,7 +6,7 @@ provides a browsable API for most of its endpoints, which you can
inspect at `http://<paperless-host>:<port>/api/`. This also documents
most of the available filters and ordering fields.
... |
python-poetry__poetry-1762 | unexpected empty environments listing
<!--
Hi there! Thank you for discovering and submitting an issue.
Before you submit this; let's make sure of a few things.
Please make sure the following boxes are ticked if they are correct.
If not, please try and fulfill these first.
-->
<!-- Checked checkbox sh... | [
{
"content": "import base64\nimport hashlib\nimport json\nimport os\nimport platform\nimport re\nimport shutil\nimport sys\nimport sysconfig\nimport warnings\n\nfrom contextlib import contextmanager\nfrom typing import Any\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typi... | [
{
"content": "import base64\nimport hashlib\nimport json\nimport os\nimport platform\nimport re\nimport shutil\nimport sys\nimport sysconfig\nimport warnings\n\nfrom contextlib import contextmanager\nfrom typing import Any\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typi... | diff --git a/poetry/utils/env.py b/poetry/utils/env.py
index b5dda9a8f18..0cbb2de6a13 100644
--- a/poetry/utils/env.py
+++ b/poetry/utils/env.py
@@ -367,11 +367,20 @@ def list(self, name=None): # type: (Optional[str]) -> List[VirtualEnv]
else:
venv_path = Path(venv_path)
- return [
+ ... |
horovod__horovod-2038 | Horovod spark raise error No module named 'pyspark'
**Environment:**
1. Framework: (TensorFlow, Keras, PyTorch, MXNet) Tensorflow
2. Framework version:
3. Horovod version: Horovod >= 0.19.2
4. MPI version: N/A
5. CUDA version: N/A
6. NCCL version: N/A
7. Python version: 3.7
8. Spark / PySpark version: spark 2.... | [
{
"content": "# Copyright 2019 Uber Technologies, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | [
{
"content": "# Copyright 2019 Uber Technologies, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | diff --git a/horovod/run/mpi_run.py b/horovod/run/mpi_run.py
index 06fd92a03d..e196f10789 100644
--- a/horovod/run/mpi_run.py
+++ b/horovod/run/mpi_run.py
@@ -187,11 +187,14 @@ def mpi_run(settings, nics, env, command, stdout=None, stderr=None):
if settings.verbose >= 2:
print(mpirun_command)
- # we ... |
tiangolo__fastapi-1534 | Support HTTPStatus
### Is your feature request related to a problem
We typically use [HTTPStatus](https://docs.python.org/3/library/http.html#http.HTTPStatus) in our code. When used as a value for `status_code` in path functions this results in the string literal in the documentation and when "trying" the response i... | [
{
"content": "import asyncio\nimport inspect\nfrom typing import Any, Callable, Dict, List, Optional, Sequence, Set, Type, Union\n\nfrom fastapi import params\nfrom fastapi.dependencies.models import Dependant\nfrom fastapi.dependencies.utils import (\n get_body_field,\n get_dependant,\n get_parameterl... | [
{
"content": "import asyncio\nimport enum\nimport inspect\nfrom typing import Any, Callable, Dict, List, Optional, Sequence, Set, Type, Union\n\nfrom fastapi import params\nfrom fastapi.dependencies.models import Dependant\nfrom fastapi.dependencies.utils import (\n get_body_field,\n get_dependant,\n g... | diff --git a/docs/en/docs/tutorial/response-status-code.md b/docs/en/docs/tutorial/response-status-code.md
index 29b8521fc737f..b63e48b0345cc 100644
--- a/docs/en/docs/tutorial/response-status-code.md
+++ b/docs/en/docs/tutorial/response-status-code.md
@@ -17,6 +17,9 @@ The same way you can specify a response model, yo... |
cupy__cupy-3264 | Real FFTs with empty `axes` should fail
The shape of the output of `fft.(i)rfft*` depends on the last axis.
```
>>> numpy.fft.rfftn(numpy.arange(3), axes=())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<__array_function__ internals>", line 5, in rfftn
File "/path/to/python3.... | [
{
"content": "import copy\nimport functools\nimport math\nimport warnings\n\nimport numpy as np\n\nimport cupy\nfrom cupy.cuda import cufft\nfrom cupy.fft import config\n\n_reduce = functools.reduce\n_prod = cupy.core.internal.prod\n\n\n@cupy.util.memoize()\ndef _output_dtype(dtype, value_type):\n if value_t... | [
{
"content": "import copy\nimport functools\nimport math\nimport warnings\n\nimport numpy as np\n\nimport cupy\nfrom cupy.cuda import cufft\nfrom cupy.fft import config\n\n_reduce = functools.reduce\n_prod = cupy.core.internal.prod\n\n\n@cupy.util.memoize()\ndef _output_dtype(dtype, value_type):\n if value_t... | diff --git a/cupy/fft/fft.py b/cupy/fft/fft.py
index 6c9938ea851..a9d81b22c4d 100644
--- a/cupy/fft/fft.py
+++ b/cupy/fft/fft.py
@@ -167,7 +167,10 @@ def _fft(a, s, axes, norm, direction, value_type='C2C', overwrite_x=False,
else:
axes = tuple(axes)
if not axes:
- return a
+ if value_ty... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.