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 ⌀ |
|---|---|---|---|---|
pulp__pulpcore-4641 | pulp_file version is set to 3.40.0.dev
**Version**
pulpcore 3.40.0
**Describe the bug**
Status API reports pulp_file version as 3.40.0.dev
| [
{
"content": "from pulpcore.plugin import PulpPluginAppConfig\n\n\nclass PulpFilePluginAppConfig(PulpPluginAppConfig):\n \"\"\"\n Entry point for pulp_file plugin.\n \"\"\"\n\n name = \"pulp_file.app\"\n label = \"file\"\n version = \"3.40.0.dev\"\n python_package_name = \"pulp_file\" # TO... | [
{
"content": "from pulpcore.plugin import PulpPluginAppConfig\n\n\nclass PulpFilePluginAppConfig(PulpPluginAppConfig):\n \"\"\"\n Entry point for pulp_file plugin.\n \"\"\"\n\n name = \"pulp_file.app\"\n label = \"file\"\n version = \"3.41.0.dev\"\n python_package_name = \"pulp_file\" # TO... | diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 540db5cc96..aba3e10392 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -19,3 +19,5 @@ values =
[bumpversion:file:./setup.py]
[bumpversion:file:./docs/conf.py]
+
+[bumpversion:file:pulp_file/app/__init__.py]
diff --git a/CHANGES/pulp_file/4633.bugfix b/C... |
DataBiosphere__toil-239 | Jenkins should only deploy to PyPI when building off the master branch
| [
{
"content": "from setuptools import setup, find_packages\n\nsetup(\n name='toil',\n version='3.0.4',\n description='Pipeline management software for clusters.',\n author='Benedict Paten',\n author_email='benedict@soe.usc.edu',\n url=\"https://github.com/BD2KGenomics/toil\",\n install_requi... | [
{
"content": "from setuptools import setup, find_packages\n\nsetup(\n name='toil',\n version='3.0.5.dev1',\n description='Pipeline management software for clusters.',\n author='Benedict Paten',\n author_email='benedict@soe.usc.edu',\n url=\"https://github.com/BD2KGenomics/toil\",\n install_... | diff --git a/Makefile b/Makefile
index 252cda9d12..a854a9d914 100644
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,11 @@ check_running_on_jenkins:
@test -n "$$BUILD_NUMBER" || ( echo "\033[0;31mThis target should only be invoked on Jenkins.\033[0m" ; false )
pypi: check_clean_working_copy check_running_on_jenkins
- $... |
google__mobly-524 | Fix pytest warnings in Python 3
`pytests` currently produces the following warnings:
mobly/mobly/test_runner.py:181: PytestWarning: cannot collect test class 'TestRunner' because it has a __init__ constructor
class TestRunner(object):
mobly/tests/mobly/base_instrumentation_test_test.py:179: Depreca... | [
{
"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/setup.py b/setup.py
index 9e593a80..adc1df5d 100755
--- a/setup.py
+++ b/setup.py
@@ -40,7 +40,7 @@ class PyTest(test.test):
def finalize_options(self):
test.test.finalize_options(self)
- self.test_args = ['-x', "tests"]
+ self.test_args = ['-x', "tests/mobly"]
self.t... |
carpentries__amy-430 | Skills should be displayed in sorted order
Skills are currently displayed in a more-or-less random order (based I presume on the order in which they were added to the DB). They should be sorted, either alphabetically (which would put all 'dc' before all 'swc') or by second part (e.g., by what's after the '/').
| [
{
"content": "import datetime\nimport re\n\nfrom django.contrib.auth.models import (\n AbstractBaseUser, BaseUserManager, PermissionsMixin)\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.core.urlresolvers import reverse\nfrom django.db import models\nfrom django.db.models import Q\n\nfro... | [
{
"content": "import datetime\nimport re\n\nfrom django.contrib.auth.models import (\n AbstractBaseUser, BaseUserManager, PermissionsMixin)\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom django.core.urlresolvers import reverse\nfrom django.db import models\nfrom django.db.models import Q\n\nfro... | diff --git a/workshops/models.py b/workshops/models.py
index 0fd73428d..d52ca94f5 100644
--- a/workshops/models.py
+++ b/workshops/models.py
@@ -391,6 +391,9 @@ class Lesson(models.Model):
def __str__(self):
return self.name
+ class Meta:
+ ordering = ['name']
+
#-----------------------------... |
magenta__magenta-629 | ValueError: Cell returns tuple of states, but the flag state_is_tuple is not set. State size is: (LSTMStateTuple(c=128, h=128), LSTMStateTuple(c=128, h=128))
Hey guys,
I've just set up my conda environment and packages. When I running the bazel test //magenta/... command, the test //magenta/models/shared:events_rnn_... | [
{
"content": "# Copyright 2016 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 2016 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/magenta/models/shared/events_rnn_graph.py b/magenta/models/shared/events_rnn_graph.py
index c4e6f7dd02..3b58b22d7e 100644
--- a/magenta/models/shared/events_rnn_graph.py
+++ b/magenta/models/shared/events_rnn_graph.py
@@ -44,7 +44,8 @@ def make_rnn_cell(rnn_layer_sizes,
cell = tf.contrib.rnn.MultiRNNC... |
projectmesa__mesa-826 | Push new Mesa release
Wee are overdue for an official release. Before I push one, does anyone have anything that really want to try to get in or should I just tag and release?
Discuss.
| [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nMesa Agent-Based Modeling Framework\n\nCore Objects: Model, and Agent.\n\n\"\"\"\nimport datetime\n\nfrom .model import Model\nfrom .agent import Agent\n\n\n__all__ = [\"Model\", \"Agent\"]\n\n__title__ = \"mesa\"\n__version__ = \"0.8.6\"\n__license__ = \"Apache 2.... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nMesa Agent-Based Modeling Framework\n\nCore Objects: Model, and Agent.\n\n\"\"\"\nimport datetime\n\nfrom .model import Model\nfrom .agent import Agent\n\n\n__all__ = [\"Model\", \"Agent\"]\n\n__title__ = \"mesa\"\n__version__ = \"0.8.7\"\n__license__ = \"Apache 2.... | diff --git a/HISTORY.rst b/HISTORY.rst
index 9a6869ac774..2be43bafb32 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -3,6 +3,74 @@
Release History
---------------
+0.8.7 (2020-05-XX) Lake Havasu City
++++++++++++++++++++++++++++++++++++++++++++
+
+**Improvements**
+
+* Enable BatchRunner to run specified set of para... |
mindsdb__mindsdb-28 | IndexError: list index out of range when missing predict value
**Is your feature request related to a problem? Please describe.**
When there is empty string provided as predict value e.g:
```
result = mdb.predict(predict=' ', model_name='home_rentals')
```
IndexError: list index out of range error is thrown
**... | [
{
"content": "import sqlite3\nimport pandas\nimport requests\nimport logging\nimport os\nimport platform\nimport _thread\nimport uuid\nimport traceback\nimport urllib\n\nfrom mindsdb.libs.helpers.sqlite_helpers import *\nfrom mindsdb.libs.helpers.multi_data_source import getDS\nfrom mindsdb.config import SQLITE... | [
{
"content": "import sqlite3\nimport pandas\nimport requests\nimport logging\nimport os\nimport platform\nimport _thread\nimport uuid\nimport traceback\nimport urllib\n\nfrom mindsdb.libs.helpers.sqlite_helpers import *\nfrom mindsdb.libs.helpers.multi_data_source import getDS\nfrom mindsdb.config import SQLITE... | diff --git a/mindsdb/libs/controllers/mindsdb_controller.py b/mindsdb/libs/controllers/mindsdb_controller.py
index 149e2533f88..4d70d3ae767 100644
--- a/mindsdb/libs/controllers/mindsdb_controller.py
+++ b/mindsdb/libs/controllers/mindsdb_controller.py
@@ -174,6 +174,9 @@ def predict(self, predict, from_data = None, wh... |
pytorch__ignite-2826 | WandBLogger and TensorboardLogger have different APIs for logging audio
## 🚀 Feature
The following code doesn't work:
```
logger = WandBLogger()
logger.writer
```
This is how you would typically add audio with a tensorboard logger:
```
logger.writer.add_audio('mixture', x.t(), engine.state.epoch)
```
... | [
{
"content": "\"\"\"TensorBoard logger and its helper handlers.\"\"\"\nfrom typing import Any, Callable, List, Optional, Union\n\nfrom torch.optim import Optimizer\n\nfrom ignite.contrib.handlers.base_logger import (\n BaseLogger,\n BaseOptimizerParamsHandler,\n BaseOutputHandler,\n BaseWeightsHandl... | [
{
"content": "\"\"\"TensorBoard logger and its helper handlers.\"\"\"\nfrom typing import Any, Callable, List, Optional, Union\n\nfrom torch.optim import Optimizer\n\nfrom ignite.contrib.handlers.base_logger import (\n BaseLogger,\n BaseOptimizerParamsHandler,\n BaseOutputHandler,\n BaseWeightsHandl... | diff --git a/ignite/contrib/handlers/tensorboard_logger.py b/ignite/contrib/handlers/tensorboard_logger.py
index 042d19198320..f8b002e3020b 100644
--- a/ignite/contrib/handlers/tensorboard_logger.py
+++ b/ignite/contrib/handlers/tensorboard_logger.py
@@ -160,6 +160,9 @@ def __init__(self, *args: Any, **kwargs: Any):
... |
mosaicml__composer-79 | Add Colab Example
* Add Example Jupyter notebook to the examples folder
* Add "Open in Colab" to the README.md
| [
{
"content": "# Copyright 2021 MosaicML. All Rights Reserved.\n\nimport os\nimport sys\n\nimport setuptools\nfrom setuptools import setup\n\n\ndef package_files(directory):\n # from https://stackoverflow.com/a/36693250\n paths = []\n for (path, directories, filenames) in os.walk(directory):\n fo... | [
{
"content": "# Copyright 2021 MosaicML. All Rights Reserved.\n\nimport os\nimport sys\n\nimport setuptools\nfrom setuptools import setup\n\n\ndef package_files(directory):\n # from https://stackoverflow.com/a/36693250\n paths = []\n for (path, directories, filenames) in os.walk(directory):\n fo... | diff --git a/README.md b/README.md
index 8caf8f42ca..d50b6b9df0 100644
--- a/README.md
+++ b/README.md
@@ -7,11 +7,18 @@ The library features:
* Standardized approach to implement and compose efficiency methods, extended from two-way callbacks ([Howard et al, 2020](https://arxiv.org/abs/2002.04688))
* Easy way to acc... |
beeware__toga-928 | toga-demo alias doesn't work on Windows
## Expected Behavior
Examples in the documentation should work. I have to specify version 0.2.15 for anything to run properly - the normal pip installation of toga installs the dev builds that are not functioning.
## Current Behavior
They all fail with various errors of m... | [
{
"content": "#!/usr/bin/env python\nimport io\n\nfrom setuptools import setup, find_packages\n\n\nwith io.open('README.rst', encoding='utf8') as readme:\n long_description = readme.read()\n\n\nsetup(\n name='toga-demo',\n version='0.3.0.dev20',\n description='A demonstration of the capabilities of ... | [
{
"content": "#!/usr/bin/env python\nimport io\n\nfrom setuptools import setup, find_packages\n\n\nwith io.open('README.rst', encoding='utf8') as readme:\n long_description = readme.read()\n\n\nsetup(\n name='toga-demo',\n version='0.3.0.dev20',\n description='A demonstration of the capabilities of ... | diff --git a/demo/pyproject.toml b/demo/pyproject.toml
index 29077abdbe..abf54d10f8 100644
--- a/demo/pyproject.toml
+++ b/demo/pyproject.toml
@@ -1,5 +1,3 @@
-[build-system]
-requires = ["briefcase"]
[tool.briefcase]
project_name = "Toga Demo"
diff --git a/demo/setup.py b/demo/setup.py
index c8776abf61..1e6ac8011e... |
streamlit__streamlit-6348 | experimental_get_query_params won't work before rerun
### Checklist
- [X] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues.
- [X] I added a very descriptive title to this issue.
- [X] I have provided sufficient information below to help reproduce this issue.
#... | [
{
"content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2... | [
{
"content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2... | diff --git a/lib/streamlit/commands/query_params.py b/lib/streamlit/commands/query_params.py
index b15e753aa1d6..7b632f3391ed 100644
--- a/lib/streamlit/commands/query_params.py
+++ b/lib/streamlit/commands/query_params.py
@@ -97,6 +97,7 @@ def set_query_params(**query_params: Any) -> None:
msg.page_info_changed.q... |
EleutherAI__gpt-neox-1024 | 'attention.bias' and 'attention.masked_bias' not in `hf_layer.state_dict()` when converting gpt-neox model to huggingface
**Describe the bug**
A clear and concise description of what the bug is.
I encounter the following error when I am converting GPTNeoX models to Huggingface using the `tools/convert_module_to_hf.... | [
{
"content": "# Copyright (c) 2021, EleutherAI\n# This file is based on code by the authors denoted below and has been modified from its original version.\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... | [
{
"content": "# Copyright (c) 2021, EleutherAI\n# This file is based on code by the authors denoted below and has been modified from its original version.\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... | diff --git a/configs/neox_arguments.md b/configs/neox_arguments.md
index b8367075a..f7cc3f084 100644
--- a/configs/neox_arguments.md
+++ b/configs/neox_arguments.md
@@ -111,7 +111,7 @@ Logging Arguments
- **git_hash**: str
- Default = 16485ee
+ Default = 7bdda99
current git hash of repository
diff -... |
scoutapp__scout_apm_python-583 | Support Python 3.9
Python 3.9 will be released 2020-10-05.
Here are some steps before its release:
* Start testing with prerelease
After release:
* Ensure tests run with released version
* Add 3.9 PyPI classifier
* Enable PYthon wheel building in release
| [
{
"content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport os\nimport sys\n\nfrom setuptools import Extension, find_packages, setup\n\nwith open(\"README.md\", \"r\") as fp:\n long_description = fp.read()\n\npackages = find_packages(\"src\")\nif... | [
{
"content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport os\nimport sys\n\nfrom setuptools import Extension, find_packages, setup\n\nwith open(\"README.md\", \"r\") as fp:\n long_description = fp.read()\n\npackages = find_packages(\"src\")\nif... | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 88366fde..4e3aa315 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -21,6 +21,7 @@ jobs:
- 3.6
- 3.7
- 3.8
+ - 3.9
services:
elasticsearch:
@@ -47,7 +48,7 @@ jobs:
... |
rlworkgroup__garage-714 | Cannot plot during training
```
from garage.experiment import LocalRunner, run_experiment
from garage.np.baselines import LinearFeatureBaseline
from garage.tf.algos import TRPO
from garage.tf.envs import TfEnv
from garage.tf.policies import CategoricalMLPPolicy
def run_task(*_):
with LocalRunner() as runne... | [
{
"content": "\"\"\"\nThe local runner for tensorflow algorithms.\n\nA runner setup context for algorithms during initialization and\npipelines data between sampler and algorithm during training.\n\"\"\"\nimport copy\nimport time\nfrom types import SimpleNamespace\n\nfrom dowel import logger, tabular\nimport te... | [
{
"content": "\"\"\"\nThe local runner for tensorflow algorithms.\n\nA runner setup context for algorithms during initialization and\npipelines data between sampler and algorithm during training.\n\"\"\"\nimport copy\nimport time\nfrom types import SimpleNamespace\n\nfrom dowel import logger, tabular\nimport te... | diff --git a/src/garage/experiment/local_tf_runner.py b/src/garage/experiment/local_tf_runner.py
index 8ecc20931c..5573f7fcfe 100644
--- a/src/garage/experiment/local_tf_runner.py
+++ b/src/garage/experiment/local_tf_runner.py
@@ -388,6 +388,7 @@ def _train(self,
pause_for_plot=pause_for_plot,
... |
python-pillow__Pillow-4455 | PIL cannot read JPEG comment
### What did you do?
I want PIL to read the JPEG comment (marker: 0xFF 0xFE).
I took an image with an attached JPEG comment - verified with exiftools & IrfanView to exist.
```python
from PIL import Image, JpegImagePlugin
pic = Image.open(<path_to_pic_with_JPEG_comment>)
print(... | [
{
"content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# JPEG (JFIF) file handling\n#\n# See \"Digital Compression and Coding of Continuous-Tone Still Images,\n# Part 1, Requirements and Guidelines\" (CCITT T.81 / ISO 10918-1)\n#\n# History:\n# 1995-09-09 fl Created\n# 1995-09-13 fl Added full parser\n#... | [
{
"content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# JPEG (JFIF) file handling\n#\n# See \"Digital Compression and Coding of Continuous-Tone Still Images,\n# Part 1, Requirements and Guidelines\" (CCITT T.81 / ISO 10918-1)\n#\n# History:\n# 1995-09-09 fl Created\n# 1995-09-13 fl Added full parser\n#... | diff --git a/Tests/test_file_jpeg.py b/Tests/test_file_jpeg.py
index f13536d5868..33045122891 100644
--- a/Tests/test_file_jpeg.py
+++ b/Tests/test_file_jpeg.py
@@ -60,6 +60,8 @@ def test_app(self):
)
assert len(im.applist) == 2
+ assert im.info["comment"] == b"File written by Ado... |
feast-dev__feast-244 | Feast cli config file should be settable by an env var
**Is your feature request related to a problem? Please describe.**
If I have multiple feast instances, I want to be able to set different .feast files to configure the CLI.
**Describe the solution you'd like**
export FEAST_CONFIG=path/to/feast/configfile
... | [
{
"content": "#\n# Copyright 2019 The Feast 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
{
"content": "#\n# Copyright 2019 The Feast 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | diff --git a/sdk/python/feast/config.py b/sdk/python/feast/config.py
index 77867cbaa4d..9b6a6dd4d83 100644
--- a/sdk/python/feast/config.py
+++ b/sdk/python/feast/config.py
@@ -28,7 +28,7 @@
feast_configuration_properties = {"core_url": "URL", "serving_url": "URL"}
-CONFIGURATION_FILE_DIR = ".feast"
+CONFIGURATION... |
chainer__chainer-5586 | Docstring of `functions.forget` is incorrect as `+` doesn't retain inputs anymore
The docstring says that `(x + y) + x` retains the immediate variable holding `x + y`.
```
Let ``f`` be a function defined as:
>>> def f(a, b):
... return a + b + a
and, ``x`` and ``y`` be :class:`~cha... | [
{
"content": "import chainer\nfrom chainer import function\nfrom chainer import function_node\nfrom chainer import variable\n\n\ndef _call_func(func, xs):\n outs = func(*xs)\n\n if isinstance(outs, tuple):\n for i, out in enumerate(outs):\n if isinstance(out, variable.Variable):\n ... | [
{
"content": "import chainer\nfrom chainer import function\nfrom chainer import function_node\nfrom chainer import variable\n\n\ndef _call_func(func, xs):\n outs = func(*xs)\n\n if isinstance(outs, tuple):\n for i, out in enumerate(outs):\n if isinstance(out, variable.Variable):\n ... | diff --git a/chainer/functions/util/forget.py b/chainer/functions/util/forget.py
index 14e62093af8c..44c1c2271d57 100644
--- a/chainer/functions/util/forget.py
+++ b/chainer/functions/util/forget.py
@@ -89,7 +89,7 @@ def forget(func, *xs):
Let ``f`` be a function defined as:
>>> def f(a, b):
- .... |
ray-project__ray-9297 | [tune] Parameters from `tune.choice()` do not get logged to TensorBoard when integers
### What is the problem?
When providing parameters via `tune.choice()` that include integers, the values are not logged to TensorBoard's HPARAMS section.
The issue is that `numpy.random.choice([1, 2, 3])` (for example) returns `num... | [
{
"content": "import csv\nimport json\nimport logging\nimport os\nimport yaml\nimport numbers\nimport numpy as np\n\nimport ray.cloudpickle as cloudpickle\nfrom ray.util.debug import log_once\nfrom ray.tune.result import (NODE_IP, TRAINING_ITERATION, TIME_TOTAL_S,\n TIMESTEPS_TOTAL, ... | [
{
"content": "import csv\nimport json\nimport logging\nimport os\nimport yaml\nimport numbers\nimport numpy as np\n\nimport ray.cloudpickle as cloudpickle\nfrom ray.util.debug import log_once\nfrom ray.tune.result import (NODE_IP, TRAINING_ITERATION, TIME_TOTAL_S,\n TIMESTEPS_TOTAL, ... | diff --git a/python/ray/tune/logger.py b/python/ray/tune/logger.py
index 044448d47c622..d2fae3723fd0a 100644
--- a/python/ray/tune/logger.py
+++ b/python/ray/tune/logger.py
@@ -187,7 +187,7 @@ class TBXLogger(Logger):
"""
# NoneType is not supported on the last TBX release yet.
- VALID_HPARAMS = (str, bo... |
pyodide__pyodide-3868 | Aborted fetch requests freeze REPL
## 🐛 Bug
Fetch requests aborted (using the [signal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/timeout_static#examples) options) freeze REPL, and do not raise exception.
### To Reproduce
```python
def fetch_response(url, timeout):
options = js.Object.... | [
{
"content": "import sys\nfrom collections.abc import (\n AsyncIterator,\n Awaitable,\n Callable,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Mapping,\n MutableMapping,\n Sequence,\n ValuesView,\n)\nfrom functools import reduce\nfrom types import TracebackType\nfrom typin... | [
{
"content": "import sys\nfrom collections.abc import (\n AsyncIterator,\n Awaitable,\n Callable,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Mapping,\n MutableMapping,\n Sequence,\n ValuesView,\n)\nfrom functools import reduce\nfrom types import TracebackType\nfrom typin... | diff --git a/docs/project/changelog.md b/docs/project/changelog.md
index a56412e88ec..bf1866a1654 100644
--- a/docs/project/changelog.md
+++ b/docs/project/changelog.md
@@ -31,6 +31,10 @@ myst:
- {{ Enhancement }} Added `headers` property to `pyodide.http.FetchResponse`.
{pr}`2078`
+- {{ Fix }} A `JSProxy` of a `... |
kivy__kivy-6128 | 🙏 emoji in README.md breaks return fileh.read() in pip install from master
When running with latest pip 19
```
pip3 install https://github.com/kivy/kivy/archive/master.zip
```
I get:
```
Collecting https://github.com/kivy/kivy/archive/master.zip
Downloading https://github.com/kivy/kivy/archive/master.zip
... | [
{
"content": "#\n# Kivy - Cross-platform UI framework\n# https://kivy.org/\n#\nfrom __future__ import print_function\n\nimport sys\nbuild_examples = False\nif \"--build_examples\" in sys.argv:\n build_examples = True\n sys.argv.remove(\"--build_examples\")\n\nfrom copy import deepcopy\nimport os\nfrom os.... | [
{
"content": "#\n# Kivy - Cross-platform UI framework\n# https://kivy.org/\n#\nfrom __future__ import print_function\n\nimport sys\nbuild_examples = False\nif \"--build_examples\" in sys.argv:\n build_examples = True\n sys.argv.remove(\"--build_examples\")\n\nfrom copy import deepcopy\nimport os\nfrom os.... | diff --git a/setup.py b/setup.py
index eac026084d..4eebf8fdf9 100644
--- a/setup.py
+++ b/setup.py
@@ -40,8 +40,8 @@ def ver_equal(self, other):
def get_description():
- with open(join(dirname(__file__), 'README.md')) as fileh:
- return fileh.read()
+ with open(join(dirname(__file__), 'README.md'), 'r... |
scikit-hep__pyhf-2220 | Menu on mobile page not accessible for pyhf v0.7.1 docs
### Summary
On the [`pyhf` `v0.7.1` docs](https://pyhf.readthedocs.io/en/v0.7.1/) and on the `main` docs build the drop down menu (circled in screen shot bellow) fails to open when clicked on.
d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#... | [
{
"content": "#\n# pyhf documentation build configuration file, created by\n# sphinx-quickstart on Fri Feb 9 11:58:49 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#... | diff --git a/docs/conf.py b/docs/conf.py
index 30b9f2c6aa..cda874ee89 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -55,6 +55,7 @@ def setup(app):
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx.ext.intersphinx',
+ 'sphinx_rtd_theme',
'sphinxcontrib.bibtex',
'sphinx.ext.napoleon',... |
mindsdb__lightwood-603 | :wrench: Add default logging level environment variable
## Task
Add a `LIGHTWOOD_LOG` environment variable that controls the default logging level for lightwood. It should be possible to set values for it so that `DEBUG`, `INFO`, `WARNING`, `ERROR` and `CRITICAL` are all possible options. The logger lightwood uses i... | [
{
"content": "import logging\nimport os\n\n\ndef initialize_log():\n pid = os.getpid()\n logging.basicConfig()\n log = logging.getLogger(f'lightwood-{pid}')\n log.setLevel(logging.DEBUG)\n return log\n\n\nlog = initialize_log()\n",
"path": "lightwood/helpers/log.py"
}
] | [
{
"content": "import logging\nimport os\n\n\ndef initialize_log():\n pid = os.getpid()\n logging.basicConfig()\n log = logging.getLogger(f'lightwood-{pid}')\n log_level = os.environ.get('LIGHTWOOD_LOG', 'DEBUG')\n log.setLevel(log_level)\n return log\n\n\nlog = initialize_log()\n",
"path":... | diff --git a/lightwood/helpers/log.py b/lightwood/helpers/log.py
index d25dc4c01..96f893b3e 100644
--- a/lightwood/helpers/log.py
+++ b/lightwood/helpers/log.py
@@ -6,7 +6,8 @@ def initialize_log():
pid = os.getpid()
logging.basicConfig()
log = logging.getLogger(f'lightwood-{pid}')
- log.setLevel(logg... |
crytic__slither-1108 | [Bug]: Infinite loop in RTLO detector
### What happened?
Slither hangs on this code indefinitely
### Can you share code with us to reproduce this bug?
https://github.com/ethereum/solidity/blob/develop/test/libsolidity/syntaxTests/comments/multiline_unicode_direction_override_5.sol
### Version
0.8.2
### Relevant l... | [
{
"content": "import re\nfrom slither.detectors.abstract_detector import AbstractDetector, DetectorClassification\n\n\nclass RightToLeftOverride(AbstractDetector):\n \"\"\"\n Detect the usage of a Right-To-Left-Override (U+202E) character\n \"\"\"\n\n ARGUMENT = \"rtlo\"\n HELP = \"Right-To-Left-... | [
{
"content": "import re\nfrom slither.detectors.abstract_detector import AbstractDetector, DetectorClassification\n\n\nclass RightToLeftOverride(AbstractDetector):\n \"\"\"\n Detect the usage of a Right-To-Left-Override (U+202E) character\n \"\"\"\n\n ARGUMENT = \"rtlo\"\n HELP = \"Right-To-Left-... | diff --git a/slither/detectors/source/rtlo.py b/slither/detectors/source/rtlo.py
index 904f2d2e39..df1f265952 100644
--- a/slither/detectors/source/rtlo.py
+++ b/slither/detectors/source/rtlo.py
@@ -88,6 +88,6 @@ def _detect(self):
results.append(res)
# Advance the start index for th... |
python-discord__site-402 | Replace Allauth anti-email monkey-patch with proper settings.
The allauth extension we use for the discord login and connection to a github account for any of our site accounts.
We have a [monkeypatch](https://github.com/python-discord/site/blob/master/pydis_site/apps/home/apps.py#L17-L38) to avoid saving in our dat... | [
{
"content": "\"\"\"\nDjango settings for pydis_site project.\n\nGenerated by 'django-admin startproject' using Django 2.1.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.1/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/... | [
{
"content": "\"\"\"\nDjango settings for pydis_site project.\n\nGenerated by 'django-admin startproject' using Django 2.1.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.1/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/... | diff --git a/pydis_site/settings.py b/pydis_site/settings.py
index 1f042c1bb..3769fa253 100644
--- a/pydis_site/settings.py
+++ b/pydis_site/settings.py
@@ -401,3 +401,11 @@ def WIKI_CAN_WRITE(article: "Article", user: "User") -> bool: # noqa: N802
LOGIN_REDIRECT_URL = "home"
SOCIALACCOUNT_ADAPTER = "pydis_site.ut... |
iterative__dvc-3828 | End of file fixer
I am using an [end-of-file fixer in the pre-commit hook](https://pre-commit.com/hooks.html). It checks that the file ends with an empty new line.
It looks like files
```
modified: .dvc/plots/confusion.json
modified: .dvc/plots/default.json
modified: .dvc/plots/scatter.json
```
... | [
{
"content": "import json\nimport logging\nimport os\nimport re\n\nfrom funcy import cached_property\n\nfrom dvc.exceptions import DvcException\nfrom dvc.utils.fs import makedirs\n\nlogger = logging.getLogger(__name__)\n\n\nclass TemplateNotFoundError(DvcException):\n def __init__(self, path):\n super... | [
{
"content": "import json\nimport logging\nimport os\nimport re\n\nfrom funcy import cached_property\n\nfrom dvc.exceptions import DvcException\nfrom dvc.utils.fs import makedirs\n\nlogger = logging.getLogger(__name__)\n\n\nclass TemplateNotFoundError(DvcException):\n def __init__(self, path):\n super... | diff --git a/dvc/repo/plots/template.py b/dvc/repo/plots/template.py
index 0bfe6b415a..731897f5d2 100644
--- a/dvc/repo/plots/template.py
+++ b/dvc/repo/plots/template.py
@@ -59,6 +59,7 @@ def dump(self):
indent=self.INDENT,
separators=self.SEPARATORS,
)
+ fobj.... |
pypa__pipenv-2111 | Newly added / changed sources not used
When an environment variable source (possibly any source) is updated in the Pipfile, the new source isn't used for resolution when `pipenv install` or `pipenv lock` is next run.
See for example:
<details><summary>Pipfile</summary>
```
[[source]]
url = "https://pypi.pyth... | [
{
"content": "import os\nimport sys\nimport json\nimport logging\n\nos.environ['PIP_PYTHON_PATH'] = sys.executable\n\n\ndef _patch_path():\n pipenv_libdir = os.path.dirname(os.path.abspath(__file__))\n for _dir in ('vendor', 'patched'):\n sys.path.insert(0, os.path.join(pipenv_libdir, _dir))\n s... | [
{
"content": "import os\nimport sys\nimport json\nimport logging\n\nos.environ['PIP_PYTHON_PATH'] = sys.executable\n\n\ndef _patch_path():\n pipenv_libdir = os.path.dirname(os.path.abspath(__file__))\n for _dir in ('vendor', 'patched'):\n sys.path.insert(0, os.path.join(pipenv_libdir, _dir))\n s... | diff --git a/pipenv/resolver.py b/pipenv/resolver.py
index c04a6b3cd3..7e4b95d36a 100644
--- a/pipenv/resolver.py
+++ b/pipenv/resolver.py
@@ -68,7 +68,7 @@ def resolve(packages, pre, sources, verbose, clear, system):
results = resolve(
packages,
pre=do_pre,
- sources=project.sources,
+ ... |
obspy__obspy-3012 | Station.identifiers[0] should not be URI type
Hello!
Just want to say that obspy continues to be an incredibly useful package!
I'm trying to set the identifiers on an obspy Station instance.
According to FDSN schema 1.1 IdentifierType should be a simple string with "type" attribute:
```
<xs:complexType name="I... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nUtility objects.\n\n:copyright:\n Lion Krischer (krischer@geophysik.uni-muenchen.de), 2013\n:license:\n GNU Lesser General Public License, Version 3\n (https://www.gnu.org/copyleft/lesser.html)\n\"\"\"\nimport copy\nimport re\nimport... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nUtility objects.\n\n:copyright:\n Lion Krischer (krischer@geophysik.uni-muenchen.de), 2013\n:license:\n GNU Lesser General Public License, Version 3\n (https://www.gnu.org/copyleft/lesser.html)\n\"\"\"\nimport copy\nimport re\nimport... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 8cdb7bc8c2f..bb87264e9ca 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -46,6 +46,8 @@ Changes:
safe route but it also prevents valid calculations as it is up to the user
to make sure that signal spectrum is properly suppressed in those
frequency ran... |
adamchainz__django-cors-headers-238 | CORS_HEADER value is set to regex match object
The `CORS_ENABLED` response header is set to the regex match object in line 82 of `middleware.py` as returned by `CorsPostCsrfMiddleware.is_enabled`
I am not aware of the best practice here, but I would assume a boolean response makes more sense.
`` - previously it
+ could be set to a regex match object.
2.1.0 (2017-05-28)
---... |
getsentry__sentry-15491 | Simple typo in the compact docstring for utils.functional
## Important Details
How are you running Sentry?
* [ ] On-Premise docker [Version xyz]
* [ ] Saas (sentry.io)
* [x] Other [briefly describe your environment]
Observed documentation - not running sentry.
## Description
Simple typo should be values ... | [
{
"content": "from __future__ import absolute_import\n\nimport six\n\nfrom django.utils.functional import empty\n\n\ndef extract_lazy_object(lo):\n \"\"\"\n Unwrap a LazyObject and return the inner object. Whatever that may be.\n\n ProTip: This is relying on `django.utils.functional.empty`, which may\n... | [
{
"content": "from __future__ import absolute_import\n\nimport six\n\nfrom django.utils.functional import empty\n\n\ndef extract_lazy_object(lo):\n \"\"\"\n Unwrap a LazyObject and return the inner object. Whatever that may be.\n\n ProTip: This is relying on `django.utils.functional.empty`, which may\n... | diff --git a/src/sentry/utils/functional.py b/src/sentry/utils/functional.py
index ee23e33a38f021..91a5e2f4200ff9 100644
--- a/src/sentry/utils/functional.py
+++ b/src/sentry/utils/functional.py
@@ -46,7 +46,7 @@ def compact(seq):
Removes keys with a corresponding ``None`` value.
list:
- Removes ... |
googleapis__google-cloud-python-9973 | Bigquery: Missing Entity Type when reading dataset.access_entries
When running the following code:
```python
from google.cloud import bigquery
gbq_client = bigquery.Client(project='project-name')
dataset_ref = gbq_client.dataset(dataset_id='dataset1', project='project-name')
dataset = gbq_client.get_dataset(data... | [
{
"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/bigquery/google/cloud/bigquery/dataset.py b/bigquery/google/cloud/bigquery/dataset.py
index 02664d87b153..99c47026fe3a 100644
--- a/bigquery/google/cloud/bigquery/dataset.py
+++ b/bigquery/google/cloud/bigquery/dataset.py
@@ -123,7 +123,7 @@ class AccessEntry(object):
"""
ENTITY_TYPES = frozens... |
huggingface__transformers-6719 | Some weights of AlbertModel were not initialized ['albert.embeddings.position_ids']
Hello!
There seems to be a problem with the current code to load a pre-trained Albert model. This warning appears in any configuration of the Albert model:
`Some weights of AlbertModel were not initialized from the model checkpoint... | [
{
"content": "# coding=utf-8\n# Copyright 2018 Google AI, Google Brain and the HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache... | [
{
"content": "# coding=utf-8\n# Copyright 2018 Google AI, Google Brain and the HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache... | diff --git a/src/transformers/modeling_albert.py b/src/transformers/modeling_albert.py
index eb0ed4dfbdd5..76f099895252 100755
--- a/src/transformers/modeling_albert.py
+++ b/src/transformers/modeling_albert.py
@@ -403,6 +403,7 @@ class AlbertPreTrainedModel(PreTrainedModel):
config_class = AlbertConfig
bas... |
espnet__espnet-617 | Conversion of AttributeDict with vars() returns unexpected results
I found a bug.
In training phase, `train_args` is `argparse.Namespace`.
So `vars(train_args)` convert into dict as follows.
```python
(Pdb) train_args
Namespace(aconv_chans=10, aconv_filts=100, adim=320, aheads=4, asr_model=False, atype='locatio... | [
{
"content": "import logging\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\n\nfrom espnet.nets.pytorch_backend.nets_utils import to_device\n\n\nclass CTC(torch.nn.Module):\n \"\"\"CTC module\n\n :param int odim: dimension of outputs\n :param int eprojs: number of encoder projecti... | [
{
"content": "import logging\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\n\nfrom espnet.nets.pytorch_backend.nets_utils import to_device\n\n\nclass CTC(torch.nn.Module):\n \"\"\"CTC module\n\n :param int odim: dimension of outputs\n :param int eprojs: number of encoder projecti... | diff --git a/espnet/nets/pytorch_backend/ctc.py b/espnet/nets/pytorch_backend/ctc.py
index 4573cec9d7e..8c58ca557be 100644
--- a/espnet/nets/pytorch_backend/ctc.py
+++ b/espnet/nets/pytorch_backend/ctc.py
@@ -113,4 +113,4 @@ def ctc_for(args, odim, reduce=True):
:return: the corresponding CTC module
"""
... |
numba__numba-941 | Update README
Two issues with our README file:
- it is not up-to-date (e.g. it mentions Cython, which we don't use anymore)
- it uses Markdown rather than reST, and therefore is badly formatted when used for the PyPI long description: https://pypi.python.org/pypi/numba
| [
{
"content": "try:\n # Try to use setuptools so as to enable support of the special\n # \"Microsoft Visual C++ Compiler for Python 2.7\" (http://aka.ms/vcpython27)\n # for building under Windows.\n # Note setuptools >= 6.0 is required for this.\n from setuptools import setup, Extension\nexcept Im... | [
{
"content": "try:\n # Try to use setuptools so as to enable support of the special\n # \"Microsoft Visual C++ Compiler for Python 2.7\" (http://aka.ms/vcpython27)\n # for building under Windows.\n # Note setuptools >= 6.0 is required for this.\n from setuptools import setup, Extension\nexcept Im... | diff --git a/MANIFEST.in b/MANIFEST.in
index f6157564a73..17330a666bc 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,4 @@
-include README.md setup.py runtests.py versioneer.py CHANGE_LOG AUTHORS LICENSE
+include README.rst setup.py runtests.py versioneer.py CHANGE_LOG AUTHORS LICENSE
recursive-include docs *.ip... |
chainer__chainer-987 | Fix the shape of return value of F.det
Currently, return value of `det` is `xp.array` whose shape is `(1, )`, not a scalar.
```
In [16]: a = chainer.Variable(numpy.random.uniform(-1, 1, (3, 3)).astype(numpy.float32))
In [17]: chainer.functions.det(a).data
Out[17]: array([-0.80874199], dtype=float32)
```
But the docum... | [
{
"content": "import numpy\n\nfrom chainer import cuda\nfrom chainer import function\nfrom chainer.functions.array import reshape\nfrom chainer.functions.math import inv\nfrom chainer.functions.math import matmul\nfrom chainer import utils\nfrom chainer.utils import type_check\n\n\ndef _det_gpu(b):\n # We do... | [
{
"content": "import numpy\n\nfrom chainer import cuda\nfrom chainer import function\nfrom chainer.functions.array import reshape\nfrom chainer.functions.math import inv\nfrom chainer.functions.math import matmul\nfrom chainer import utils\nfrom chainer.utils import type_check\n\n\ndef _det_gpu(b):\n # We do... | diff --git a/chainer/functions/math/det.py b/chainer/functions/math/det.py
index c34d5ce5e2ce..219e16247dfa 100644
--- a/chainer/functions/math/det.py
+++ b/chainer/functions/math/det.py
@@ -109,4 +109,4 @@ def det(a):
shape = (1, len(a.data), a.data.shape[1])
batched_a = reshape.Reshape(shape)(a)
batche... |
mitmproxy__mitmproxy-4762 | When too many requests come simultaneously, mitmdump called an error and quited [ValueError: too many file descriptors in select()]
#### Problem Description
A clear and concise description of what the bug is.
When too many requests come simultaneously, mitmdump called an error and quited.
Traceback (most recent call... | [
{
"content": "import asyncio\nimport sys\n\nif sys.platform == 'win32':\n # workaround for\n # https://github.com/tornadoweb/tornado/issues/2751\n # https://www.tornadoweb.org/en/stable/index.html#installation\n # (copied multiple times in the codebase, please remove all occurrences)\n asyncio.se... | [
{
"content": "",
"path": "mitmproxy/__init__.py"
}
] | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c4f9ff6dd8..acf76819b8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,8 @@
## Unreleased: mitmproxy next
* fix some responses not being decoded properly if the encoding was uppercase #4735 (@Mattwmaster58)
+* Windows: Switch to Python's default asyncio event l... |
jazzband__django-debug-toolbar-1872 | New AJAX request resets whole view if HistoryPanel is enabled.
Maybe I am doing something wrong, but I find working with DDT with HistoryPanel enabled quite annoying.
I have notifications on my website which makes request every ~5 seconds if there is anything new.
If I have HistoryPanel enabled in DDT this means ... | [
{
"content": "import warnings\nfrom functools import lru_cache\n\nfrom django.conf import settings\nfrom django.dispatch import receiver\nfrom django.test.signals import setting_changed\n\nCONFIG_DEFAULTS = {\n # Toolbar options\n \"DISABLE_PANELS\": {\n \"debug_toolbar.panels.profiling.ProfilingPa... | [
{
"content": "import warnings\nfrom functools import lru_cache\n\nfrom django.conf import settings\nfrom django.dispatch import receiver\nfrom django.test.signals import setting_changed\n\nCONFIG_DEFAULTS = {\n # Toolbar options\n \"DISABLE_PANELS\": {\n \"debug_toolbar.panels.profiling.ProfilingPa... | diff --git a/debug_toolbar/settings.py b/debug_toolbar/settings.py
index eb6b59209..1df24527d 100644
--- a/debug_toolbar/settings.py
+++ b/debug_toolbar/settings.py
@@ -42,6 +42,7 @@
"SQL_WARNING_THRESHOLD": 500, # milliseconds
"OBSERVE_REQUEST_CALLBACK": "debug_toolbar.toolbar.observe_request",
"TOOLBA... |
translate__pootle-3671 | Confusing sentence in permissions view
There is a permission called "Can review translations" that confused me as I thought that there are also reviewers beside suggesters and translators! Hopefully you fix it so that it lands in 2.7.0.
| [
{
"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/core/initdb.py b/pootle/core/initdb.py
index fc14e6d8cc5..3b3b5ab3b07 100644
--- a/pootle/core/initdb.py
+++ b/pootle/core/initdb.py
@@ -124,7 +124,7 @@ def create_pootle_permissions():
'codename': "translate",
},
{
- 'name': _("Can review translations"),
+ ... |
archlinux__archinstall-1787 | archinstall crashing
Here's the traceback
```
Traceback (most recent call last):
File "/usr/bin/archinstall", line 5, in <module>
from archinstall import run_as_a_module
File "/usr/lib/python3.11/site-packages/archinstall/__init__.py", line 5, in <module>
from .lib import disk
File "/usr/lib/pyt... | [
{
"content": "from __future__ import annotations\n\nimport dataclasses\nimport json\nimport logging\nimport math\nimport time\nimport uuid\nfrom dataclasses import dataclass, field\nfrom enum import Enum\nfrom enum import auto\nfrom pathlib import Path\nfrom typing import Optional, List, Dict, TYPE_CHECKING, An... | [
{
"content": "from __future__ import annotations\n\nimport dataclasses\nimport json\nimport logging\nimport math\nimport time\nimport uuid\nfrom dataclasses import dataclass, field\nfrom enum import Enum\nfrom enum import auto\nfrom pathlib import Path\nfrom typing import Optional, List, Dict, TYPE_CHECKING, An... | diff --git a/archinstall/lib/disk/device_model.py b/archinstall/lib/disk/device_model.py
index 8e26b1d703..d57347b737 100644
--- a/archinstall/lib/disk/device_model.py
+++ b/archinstall/lib/disk/device_model.py
@@ -851,7 +851,7 @@ class LsblkInfo:
name: str = ''
path: Path = Path()
pkname: str = ''
- size: Size =... |
ivy-llc__ivy-17989 | fmax
| [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\... | [
{
"content": "# global\nimport ivy\nfrom ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes\nfrom ivy.functional.frontends.paddle.func_wrapper import to_ivy_arrays_and_back\n\n\n@with_unsupported_dtypes({\"2.5.0 and below\": (\"float16\", \"bfloat16\")}, \"paddle\")\n@to_ivy_arrays_and_back\... | diff --git a/ivy/functional/frontends/paddle/tensor/math.py b/ivy/functional/frontends/paddle/tensor/math.py
index a55742b58857c..c0301050626a6 100644
--- a/ivy/functional/frontends/paddle/tensor/math.py
+++ b/ivy/functional/frontends/paddle/tensor/math.py
@@ -253,3 +253,9 @@ def fmin(x, y, name=None):
@to_ivy_arrays_... |
conan-io__conan-127 | mark headers as "SYSTEM" headers to silence warnings
Many libraries generate tons of warnings in public headers. WebSocket++ uses auto_ptr for example and many Boost libraries truncate integers implicitly (-Wconversion). To consume these libraries you have to treat them as system headers because GCC won't emit warnings... | [
{
"content": "from conans.model import Generator\nfrom conans.paths import BUILD_INFO_CMAKE\n\n\nclass DepsCppCmake(object):\n def __init__(self, deps_cpp_info):\n self.include_paths = \"\\n\\t\\t\\t\".join('\"%s\"' % p.replace(\"\\\\\", \"/\")\n for p in de... | [
{
"content": "from conans.model import Generator\nfrom conans.paths import BUILD_INFO_CMAKE\n\n\nclass DepsCppCmake(object):\n def __init__(self, deps_cpp_info):\n self.include_paths = \"\\n\\t\\t\\t\".join('\"%s\"' % p.replace(\"\\\\\", \"/\")\n for p in de... | diff --git a/conans/client/generators/cmake.py b/conans/client/generators/cmake.py
index 827f8b2cb1a..56291fdedcf 100644
--- a/conans/client/generators/cmake.py
+++ b/conans/client/generators/cmake.py
@@ -82,7 +82,7 @@ def _aux_cmake_test_setup(self):
endmacro()
macro(CONAN_FLAGS_SETUP)
- include_directories(${C... |
pypa__pip-6427 | ensure_dir() should also check for ENOTEMPTY
**Environment**
* pip version:
pip 19.0.3
* Python version:
python 3.7
* OS:
'python:3.7-alpine3.9' docker image (docker-ce 17.9) running on Ubuntu 18.04.2 LTS in WSL (Windows)
**Description**
`pip install pipenv` fails with the following error:
> Could not ... | [
{
"content": "from __future__ import absolute_import\n\nimport contextlib\nimport errno\nimport io\n# we have a submodule named 'logging' which would shadow this if we used the\n# regular name:\nimport logging as std_logging\nimport os\nimport posixpath\nimport re\nimport shutil\nimport stat\nimport subprocess\... | [
{
"content": "from __future__ import absolute_import\n\nimport contextlib\nimport errno\nimport io\n# we have a submodule named 'logging' which would shadow this if we used the\n# regular name:\nimport logging as std_logging\nimport os\nimport posixpath\nimport re\nimport shutil\nimport stat\nimport subprocess\... | diff --git a/news/6426.bugfix b/news/6426.bugfix
new file mode 100644
index 00000000000..25512b3c808
--- /dev/null
+++ b/news/6426.bugfix
@@ -0,0 +1 @@
+Make ``ensure_dir()`` also ignore ``ENOTEMPTY`` as seen on Windows.
diff --git a/src/pip/_internal/utils/misc.py b/src/pip/_internal/utils/misc.py
index ca7a529387c..7... |
coala__coala-4276 | pytest-3.1 raises lots of warnings running our tests
Latest `pytest-3.1.x` versions raise several warnings when running our tests, mostly telling that `unittest` functions `assertEquals` and `assertRaisesRegexp` should not be used anymore. We should get rid of those warnings...
| [
{
"content": "import os\nimport platform\nimport re\nfrom functools import lru_cache\n\nfrom coala_utils.decorators import yield_once\nfrom coalib.misc.Constants import GLOBBING_SPECIAL_CHARS\n\n\ndef _end_of_set_index(string, start_index):\n \"\"\"\n Returns the position of the appropriate closing bracke... | [
{
"content": "import os\nimport platform\nimport re\nfrom functools import lru_cache\n\nfrom coala_utils.decorators import yield_once\nfrom coalib.misc.Constants import GLOBBING_SPECIAL_CHARS\n\n\ndef _end_of_set_index(string, start_index):\n \"\"\"\n Returns the position of the appropriate closing bracke... | diff --git a/coalib/parsing/Globbing.py b/coalib/parsing/Globbing.py
index c31726a861..0e64920688 100644
--- a/coalib/parsing/Globbing.py
+++ b/coalib/parsing/Globbing.py
@@ -191,7 +191,7 @@ def translate(pattern):
regex += '[' + sequence + ']'
else:
regex = regex + re.escape(char... |
ansible__molecule-3103 | Current directory being inadvertently added to ANSIBLE_LIBRARY
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Do not report bugs before reproducing them with the code of the master branch! -->
<!--- Please also check https://molecule.readthedocs.io/en/latest/faq.html --->
<!--- Please... | [
{
"content": "# Copyright (c) 2015-2018 Cisco Systems, Inc.\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# rights... | [
{
"content": "# Copyright (c) 2015-2018 Cisco Systems, Inc.\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to\n# deal in the Software without restriction, including without limitation the\n# rights... | diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml
index d4a61c8db1..af350717a0 100644
--- a/.github/workflows/tox.yml
+++ b/.github/workflows/tox.yml
@@ -25,17 +25,17 @@ jobs:
- tox_env: lint
- tox_env: docs
- tox_env: py36
- PREFIX: PYTEST_REQPASS=433
+ ... |
ccnmtl__django-pagetree-89 | Custom pageblocks in Hierarchy menu
Jess has a feature request for pagetree:
WORTH has a giant hierarchy menu: https://worth2.ccnmtl.columbia.edu/pages/edit/ and it would be nice to see which sections have which pageblocks on them. She says it shouldn't list text blocks, html blocks, quizzes etc., since many of those ... | [
{
"content": "# Copyright (c) 2007-2015, Columbia Center For New Media Teaching And Learning (CCNMTL)\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redistributions of source... | [
{
"content": "# Copyright (c) 2007-2015, Columbia Center For New Media Teaching And Learning (CCNMTL)\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redistributions of source... | diff --git a/CHANGES.txt b/CHANGES.txt
index edfd1023..1d7c5f10 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+1.1.5 (2015-05-15)
+==================
+* Add pageblock count to sections in the edit page
+
1.1.4 (2015-05-13)
==================
* Show sections with empty labels in the edit_page hierarchy
d... |
bridgecrewio__checkov-4012 | Dependent Package "packaging" upgrade halts invocation
**Describe the issue**
Currently we are running checkov in a CI environment in Azure DevOps over our Terraform configurations. Earlier today Checkov started failing to run, at first it was believed to link to the release that occurred earlier.
Investigation thoug... | [
{
"content": "#!/usr/bin/env python\nimport logging\nimport os\nfrom importlib import util\nfrom os import path\n\nimport setuptools\nfrom setuptools import setup\n\n# read the contents of your README file\nthis_directory = path.abspath(path.dirname(__file__))\nwith open(path.join(this_directory, \"README.md\")... | [
{
"content": "#!/usr/bin/env python\nimport logging\nimport os\nfrom importlib import util\nfrom os import path\n\nimport setuptools\nfrom setuptools import setup\n\n# read the contents of your README file\nthis_directory = path.abspath(path.dirname(__file__))\nwith open(path.join(this_directory, \"README.md\")... | diff --git a/Pipfile b/Pipfile
index 49b82a3f54..74502f78a7 100644
--- a/Pipfile
+++ b/Pipfile
@@ -55,7 +55,7 @@ jmespath = "*"
tqdm = "*"
update-checker = "*"
semantic-version = "*"
-packaging = "*"
+packaging = "==21.3"
cloudsplaining = ">=0.4.3"
networkx = "<2.7"
dockerfile-parse ="*"
diff --git a/Pipfile.lock... |
swcarpentry__python-novice-inflammation-736 | Lesson 10 - numpy.mean(data) and data.mean
In lesson 10, when the lesson refers to readings_03.py, the code shows that to calculate the mean over 'data' across all days, numpy.mean is used: numpy.mean(data, axis=1). However when looking at the file readings_03.py (at least the version I downloaded recently) uses the in... | [
{
"content": "import sys\nimport numpy\n\n\ndef main():\n script = sys.argv[0]\n for filename in sys.argv[1:]:\n data = numpy.loadtxt(filename, delimiter=',')\n for m in data.mean(axis=1):\n print(m)\n\n\nif __name__ == '__main__':\n main()\n",
"path": "code/readings_03.py"... | [
{
"content": "import sys\nimport numpy\n\n\ndef main():\n script = sys.argv[0]\n for filename in sys.argv[1:]:\n data = numpy.loadtxt(filename, delimiter=',')\n for m in numpy.mean(data, axis=1):\n print(m)\n\n\nif __name__ == '__main__':\n main()\n",
"path": "code/readings... | diff --git a/code/readings_03.py b/code/readings_03.py
index 7736fdf73..423ec9bf5 100644
--- a/code/readings_03.py
+++ b/code/readings_03.py
@@ -6,7 +6,7 @@ def main():
script = sys.argv[0]
for filename in sys.argv[1:]:
data = numpy.loadtxt(filename, delimiter=',')
- for m in data.mean(axis=1)... |
codespell-project__codespell-96 | README: outdated license notice
README says:
> The Python script `codespell.py` is available with the following terms:
But currently `codespell.py` is just a thin wrapper over `codespell_lib`, with little to no creativity.
This sentence should probably read something like this:
> The Python code is available with th... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; version 2 of the License.\n#\n# This program is distributed in the hop... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; version 2 of the License.\n#\n# This program is distributed in the hop... | diff --git a/Makefile b/Makefile
index b541dc91ec..9b0b051d3f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,28 +1,12 @@
-prefix ?= /usr/local
-bindir ?= ${prefix}/bin
-datadir ?= ${prefix}/share/codespell
-mandir ?= ${prefix}/share/man/man1
-
-_VERSION := $(shell grep -e "VERSION = '[0-9]\.[0-9]" codespell_lib/_codespell.... |
aws__aws-cli-2892 | - Support use of colorama up to 0.3.8
+ colorama bugfix release 0.3.8 is available and contains no incompatible
changes. There is no need to restrict use to less or equal 0.3.7
| [
{
"content": "#!/usr/bin/env python\nimport codecs\nimport os.path\nimport re\nimport sys\n\nfrom setuptools import setup, find_packages\n\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read(*parts):\n return codecs.open(os.path.join(here, *parts), 'r').read()\n\n\ndef find_version(*file_paths... | [
{
"content": "#!/usr/bin/env python\nimport codecs\nimport os.path\nimport re\nimport sys\n\nfrom setuptools import setup, find_packages\n\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read(*parts):\n return codecs.open(os.path.join(here, *parts), 'r').read()\n\n\ndef find_version(*file_paths... | diff --git a/.changes/next-release/enhancement-colorama-91382.json b/.changes/next-release/enhancement-colorama-91382.json
new file mode 100644
index 000000000000..95c802ae4eac
--- /dev/null
+++ b/.changes/next-release/enhancement-colorama-91382.json
@@ -0,0 +1,5 @@
+{
+ "type": "enhancement",
+ "category": "colorama... |
cookiecutter__cookiecutter-django-4520 | Unused gulp dependency added to package.json when Webpack is chosen
## What happened?
package.json has reference to `"gulp-concat": "^2.6.1"` even though it is not used when Webpack has been chosen
## What should've happened instead?
No reference to gulp-concat at all when using Webpack
## Additional details
... | [
{
"content": "\"\"\"\nNOTE:\n the below code is to be maintained Python 2.x-compatible\n as the whole Cookiecutter Django project initialization\n can potentially be run in Python 2.x environment\n (at least so we presume in `pre_gen_project.py`).\n\nTODO: restrict Cookiecutter Django project initia... | [
{
"content": "\"\"\"\nNOTE:\n the below code is to be maintained Python 2.x-compatible\n as the whole Cookiecutter Django project initialization\n can potentially be run in Python 2.x environment\n (at least so we presume in `pre_gen_project.py`).\n\nTODO: restrict Cookiecutter Django project initia... | diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py
index 8d1be5a165..37f96efc03 100644
--- a/hooks/post_gen_project.py
+++ b/hooks/post_gen_project.py
@@ -183,6 +183,7 @@ def handle_js_runner(choice, use_docker, use_async):
"browser-sync",
"cssnano",
"gulp",
+ ... |
microsoft__botbuilder-python-1932 | Bump MSAL to the latest version
**Is your feature request related to a problem? Please describe.**
Old version of MSAL is used in [botframework-connector](https://github.com/microsoft/botbuilder-python/blob/main/libraries/botframework-connector/requirements.txt#L6) (v1.6.0)
**Describe the solution you'd like**
Upg... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport os\nfrom setuptools import setup\n\nNAME = \"botframework-connector\"\nVERSION = os.environ[\"packageVersion\"] if \"packageVersion\" in os.environ else \"4.15.0\"\nREQUIRES = [\n \"msrest==... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport os\nfrom setuptools import setup\n\nNAME = \"botframework-connector\"\nVERSION = os.environ[\"packageVersion\"] if \"packageVersion\" in os.environ else \"4.15.0\"\nREQUIRES = [\n \"msrest==... | diff --git a/libraries/botframework-connector/setup.py b/libraries/botframework-connector/setup.py
index 7e6bff958..84bb6dce9 100644
--- a/libraries/botframework-connector/setup.py
+++ b/libraries/botframework-connector/setup.py
@@ -11,7 +11,7 @@
"requests>=2.23.0,<2.26",
"PyJWT>=1.5.3,<2.0.0",
"botbuild... |
webkom__lego-1505 | Add end_time of an event when getting all events with get request
I want to be able to get the end time of an event when getting all events. I know I can get the end time when getting a specific event, but it is a bit cumbersome.
| [
{
"content": "from django.db import transaction\nfrom rest_framework import serializers\nfrom rest_framework.fields import BooleanField, CharField\n\nfrom lego.apps.comments.serializers import CommentSerializer\nfrom lego.apps.companies.fields import CompanyField\nfrom lego.apps.companies.models import Company\... | [
{
"content": "from django.db import transaction\nfrom rest_framework import serializers\nfrom rest_framework.fields import BooleanField, CharField\n\nfrom lego.apps.comments.serializers import CommentSerializer\nfrom lego.apps.companies.fields import CompanyField\nfrom lego.apps.companies.models import Company\... | diff --git a/lego/apps/events/serializers/events.py b/lego/apps/events/serializers/events.py
index 95da047a2..7f81934ee 100644
--- a/lego/apps/events/serializers/events.py
+++ b/lego/apps/events/serializers/events.py
@@ -62,6 +62,7 @@ class Meta:
"event_type",
"location",
"start_t... |
aio-libs-abandoned__aioredis-py-1048 | [2.0] Type annotations break mypy
I tried porting an existing project to aioredis 2.0. I've got it almost working, but the type annotations that have been added are too strict (and in some cases just wrong) and break mypy. The main problem is that all the functions that take keys annotate them as `str`, when `bytes` (a... | [
{
"content": "import os.path\nimport re\n\nfrom setuptools import find_packages, setup\n\n\ndef read(*parts):\n with open(os.path.join(*parts)) as f:\n return f.read().strip()\n\n\ndef read_version():\n regexp = re.compile(r\"^__version__\\W*=\\W*\\\"([\\d.abrc]+)\\\"\")\n init_py = os.path.join... | [
{
"content": "import os.path\nimport re\n\nfrom setuptools import find_packages, setup\n\n\ndef read(*parts):\n with open(os.path.join(*parts)) as f:\n return f.read().strip()\n\n\ndef read_version():\n regexp = re.compile(r\"^__version__\\W*=\\W*\\\"([\\d.abrc]+)\\\"\")\n init_py = os.path.join... | diff --git a/CHANGES/1009.misc b/CHANGES/1009.misc
deleted file mode 100644
index e14ad9413..000000000
--- a/CHANGES/1009.misc
+++ /dev/null
@@ -1 +0,0 @@
-Temporarily remove py.typed because there are errors in the type annotations.
diff --git a/aioredis/py.typed b/aioredis/py.typed
new file mode 100644
index 00000000... |
fidals__shopelectro-346 | Do `gulp build` on image side
Currently, we have problems with gulp build on client side. See #344 for details.
Moreover, building static on container site is more good practice
| [
{
"content": "\"\"\"\nDjango settings for shopelectro project.\n\nGenerated by 'django-admin startproject' using Django 1.9.5.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.9/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/... | [
{
"content": "\"\"\"\nDjango settings for shopelectro project.\n\nGenerated by 'django-admin startproject' using Django 1.9.5.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.9/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/... | diff --git a/.dockerignore b/.dockerignore
index cf35f273..ed67fd93 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,3 +1,4 @@
+node_modules/
media/
*.sqlite*
*.log
diff --git a/.drone.yml b/.drone.yml
index 1a762090..39dfb09d 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -13,24 +13,29 @@ pipeline:
event: [... |
web2py__web2py-2144 | gluon.utils.unlocalised_http_header_date returns wrong time
**Describe the bug**
in function unlocalised_http_header_date, line 481:
`year_and_time = time.strftime("%Y %H:%M:%S GMT")`
should be:
`year_and_time = time.strftime("%Y %H:%M:%S GMT", data)`
| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#pylint: disable=invalid-name,redefined-builtin\n\n\"\"\"\n| This file is part of the web2py Web Framework\n| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>\n| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)\n\nThis file specifica... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#pylint: disable=invalid-name,redefined-builtin\n\n\"\"\"\n| This file is part of the web2py Web Framework\n| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>\n| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)\n\nThis file specifica... | diff --git a/gluon/utils.py b/gluon/utils.py
index bbaba4e53..e4771d9cb 100644
--- a/gluon/utils.py
+++ b/gluon/utils.py
@@ -411,7 +411,7 @@ def unlocalised_http_header_date(data):
"12": "Dec",
}.get(time.strftime("%m", data))
- year_and_time = time.strftime("%Y %H:%M:%S GMT")
+ year_and_time = ti... |
spyder-ide__spyder-16483 | Drag & drop error in the Help pane
## Description
### What steps will reproduce the problem?
<!--- You can use Markdown here --->
open spyder
Drag any python file from file explorer to spyder application
Spyder reports internal problem
### Traceback
```python-traceback
Traceback (most recent call last):
File "C:\... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n#\n\"\"\"\nHelp plugin widgets.\n\"\"\"\n\n# Standard library imports\nimport os\nimport re\nimport socket\nimport sys\n\n# Third party imports\nfrom qtpy.QtCore import Qt, QUrl, S... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright © Spyder Project Contributors\n# Licensed under the terms of the MIT License\n#\n\"\"\"\nHelp plugin widgets.\n\"\"\"\n\n# Standard library imports\nimport os\nimport re\nimport socket\nimport sys\n\n# Third party imports\nfrom qtpy.QtCore import Qt, QUrl, S... | diff --git a/spyder/plugins/help/widgets.py b/spyder/plugins/help/widgets.py
index 17ed408c570..12bc411b5d8 100644
--- a/spyder/plugins/help/widgets.py
+++ b/spyder/plugins/help/widgets.py
@@ -195,8 +195,7 @@ def load_url(self, url):
qurl = url
else:
qurl = QUrl(url)
-
- self.l... |
ansible-collections__community.general-2419 | svr4pkg on Solaris 11.4: TypeError: a bytes-like object is required, not 'str'
### Summary
When you try to install a package on Solaris 11.4 with the svr4pkg module, you get an error:
TypeError: a bytes-like object is required, not 'str'
Fix:
```
--- svr4pkg.py.orig 2021-04-29 08:28:55.110835528 -0400
+++ ... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Boyd Adamson <boyd () boydadamson.com>\n#\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\nDOCUMENTA... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Boyd Adamson <boyd () boydadamson.com>\n#\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\nDOCUMENTA... | diff --git a/changelogs/fragments/2373-svr4pkg-fix-typeerror.yml b/changelogs/fragments/2373-svr4pkg-fix-typeerror.yml
new file mode 100644
index 00000000000..d0b35808895
--- /dev/null
+++ b/changelogs/fragments/2373-svr4pkg-fix-typeerror.yml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - svr4pkg - convert string to a bytes-like... |
internetarchive__openlibrary-4551 | Add February carousel to top of homepage
@seabelis has created a collection for February! Let's add it to the top of the home page as "Books for February". We want:
- [ ] A search query that summarizes the collection so that books appear on the homepage (here's the literal aggregate of all the carousels: https://ope... | [
{
"content": "import web\nimport json\nimport babel\nimport babel.core\nimport babel.dates\nfrom collections import defaultdict\nimport re\nimport random\nimport xml.etree.ElementTree as etree\nimport datetime\nimport logging\n\nimport six\nfrom six import PY3\nfrom six.moves import urllib\nfrom six.moves.colle... | [
{
"content": "import web\nimport json\nimport babel\nimport babel.core\nimport babel.dates\nfrom collections import defaultdict\nimport re\nimport random\nimport xml.etree.ElementTree as etree\nimport datetime\nimport logging\n\nimport six\nfrom six import PY3\nfrom six.moves import urllib\nfrom six.moves.colle... | diff --git a/openlibrary/macros/QueryCarousel.html b/openlibrary/macros/QueryCarousel.html
index 55ad3a3f842..e9998acc3c9 100644
--- a/openlibrary/macros/QueryCarousel.html
+++ b/openlibrary/macros/QueryCarousel.html
@@ -1,4 +1,4 @@
-$def with(query, title=None, sort='new', key='', limit=20, search=False, has_fulltext_... |
pwndbg__pwndbg-760 | `find_fake_fast` fails when providing a size argument
<!--
Before reporting a new issue, make sure that we do not have any duplicates already open.
If there is one it might be good to take part in the discussion there.
Please make sure you have checked that the issue persists on LATEST pwndbg version.
Below is ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport argparse\nimport ctypes\nimport struct\n\nimport gdb\nimport six\n\nimport pwndbg.color.... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport argparse\nimport ctypes\nimport struct\n\nimport gdb\nimport six\n\nimport pwndbg.color.... | diff --git a/pwndbg/commands/heap.py b/pwndbg/commands/heap.py
index 743d55d4bee..ae28b14852f 100755
--- a/pwndbg/commands/heap.py
+++ b/pwndbg/commands/heap.py
@@ -511,7 +511,7 @@ def find_fake_fast(addr, size=None):
if size is None:
sizes = range(min_fast, max_fast + 1, align)
else:
- sizes ... |
ivy-llc__ivy-17162 | is_integer
| [
{
"content": "# global\nimport ivy\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@to_ivy_arrays_and_back\ndef is_complex(x):\n return ivy.is_complex_dtype(x)\n\n\n@to_ivy_arrays_and_back\ndef is_floating_point(x):\n return ivy.is_float_dtype(x)\n",
"p... | [
{
"content": "# global\nimport ivy\nfrom ivy.functional.frontends.paddle.func_wrapper import (\n to_ivy_arrays_and_back,\n)\n\n\n@to_ivy_arrays_and_back\ndef is_complex(x):\n return ivy.is_complex_dtype(x)\n\n\n@to_ivy_arrays_and_back\ndef is_integer(x):\n return ivy.is_int_dtype(x)\n\n\n@to_ivy_arrays... | diff --git a/ivy/functional/frontends/paddle/tensor/attribute.py b/ivy/functional/frontends/paddle/tensor/attribute.py
index 9520930395f91..cc5d69066978b 100644
--- a/ivy/functional/frontends/paddle/tensor/attribute.py
+++ b/ivy/functional/frontends/paddle/tensor/attribute.py
@@ -10,6 +10,11 @@ def is_complex(x):
... |
mitmproxy__mitmproxy-1510 | Divide by Zero error
Its in `netlib/strutils.py`
This line # around 126 :
``` python
for i in six.iterbytes(s[:100])
) / len(s[:100]) > 0.3
```
if s is empty, it gives this error in the mitmproxy, (doesn't crash though due to recent improvements in mitmproxy i guess..)
| [
{
"content": "from __future__ import absolute_import, print_function, division\nimport re\nimport codecs\n\nimport six\n\n\ndef always_bytes(unicode_or_bytes, *encode_args):\n if isinstance(unicode_or_bytes, six.text_type):\n return unicode_or_bytes.encode(*encode_args)\n return unicode_or_bytes\n\... | [
{
"content": "from __future__ import absolute_import, print_function, division\nimport re\nimport codecs\n\nimport six\n\n\ndef always_bytes(unicode_or_bytes, *encode_args):\n if isinstance(unicode_or_bytes, six.text_type):\n return unicode_or_bytes.encode(*encode_args)\n return unicode_or_bytes\n\... | diff --git a/netlib/strutils.py b/netlib/strutils.py
index 4a46b6b1ff..4cb3b80560 100644
--- a/netlib/strutils.py
+++ b/netlib/strutils.py
@@ -121,6 +121,9 @@ def escaped_str_to_bytes(data):
def is_mostly_bin(s):
# type: (bytes) -> bool
+ if not s or len(s) == 0:
+ return False
+
return sum(
... |
learningequality__kolibri-5237 | running kolibri pex on mac in background mode causes a seg fault
### Observed behavior
Trying to run the kolibri pex in background mode causes a hard python crash with no script-level errors:

running... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport importlib\nimport logging\nimport os\nimport signal\nimport sys\nfrom sqlite3 import DatabaseError as SQLite3DatabaseError\n\nimport django\nfrom django.core.exceptions ... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport importlib\nimport logging\nimport os\nimport signal\nimport sys\nfrom sqlite3 import DatabaseError as SQLite3DatabaseError\n\nimport django\nfrom django.core.exceptions ... | diff --git a/kolibri/utils/cli.py b/kolibri/utils/cli.py
index 998417f5ebf..bb6d2c3264b 100644
--- a/kolibri/utils/cli.py
+++ b/kolibri/utils/cli.py
@@ -668,6 +668,8 @@ def main(args=None): # noqa: max-complexity=13
call_command("clearsessions")
daemon = not arguments['--foreground']
+ if sy... |
python-gitlab__python-gitlab-2088 | sphinx warnings `reference target not found`
On building my packages I'm using `sphinx-build` command with `-n` switch which shows warmings about missing references. These are not critical issues.
Here is the output with warnings:
```console
+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx ... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# python-gitlab documentation build configuration file, created by\n# sphinx-quickstart on Mon Dec 8 15:17:39 2014.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configur... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# python-gitlab documentation build configuration file, created by\n# sphinx-quickstart on Mon Dec 8 15:17:39 2014.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configur... | diff --git a/docs/conf.py b/docs/conf.py
index 11b920e7b..13de175d0 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -287,6 +287,7 @@ def setup(sphinx):
# If true, show URL addresses after external links.
# man_show_urls = False
+nitpick_ignore_regex = [(r"py:.*", r".*")]
# -- Options for Texinfo output ---------... |
cisagov__manage.get.gov-1583 | Redirect logout to {beta.}get.gov info site
Now that we have the `cloud.gov Pages` site setup at get.gov, we should redirect logout actions to that site.
As a logged-in user of the registrar
I want to be redirected to the new get.gov informational site when I log out
So that I stay in the .gov experience rather t... | [
{
"content": "\"\"\"\nDjango settings for .gov registrar project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/4.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/4.0/ref/settings/\n\nIF you'd like to see all of these set... | [
{
"content": "\"\"\"\nDjango settings for .gov registrar project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/4.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/4.0/ref/settings/\n\nIF you'd like to see all of these set... | diff --git a/src/registrar/config/settings.py b/src/registrar/config/settings.py
index bc46c60ba..2de7e6eb2 100644
--- a/src/registrar/config/settings.py
+++ b/src/registrar/config/settings.py
@@ -519,7 +519,7 @@
]
# where to go after logging out
-LOGOUT_REDIRECT_URL = "home"
+LOGOUT_REDIRECT_URL = "https://get.gov... |
microsoft__botbuilder-python-1637 | botbuilder-testing is missing install requirements
## Version
botbuilder-testing 4.12.0
## Describe the bug
While installing botbuilder-testing for CI I got errors about missing dependencies.
## To Reproduce
1. `python3 -m venv .venv`
2. `. .venv/bin/activate`
3. `pip install -U pip wheel`
4. `pip inst... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport os\nfrom setuptools import setup\n\nREQUIRES = [\n \"botbuilder-schema==4.13.0\",\n \"botbuilder-core==4.13.0\",\n \"botbuilder-dialogs==4.13.0\",\n]\n\nTESTS_REQUIRES = [\"aiounittest... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport os\nfrom setuptools import setup\n\nREQUIRES = [\n \"botbuilder-schema==4.13.0\",\n \"botbuilder-core==4.13.0\",\n \"botbuilder-dialogs==4.13.0\",\n \"botbuilder-azure==4.13.0\",\n ... | diff --git a/libraries/botbuilder-testing/setup.py b/libraries/botbuilder-testing/setup.py
index af36832cd..bd6ed4856 100644
--- a/libraries/botbuilder-testing/setup.py
+++ b/libraries/botbuilder-testing/setup.py
@@ -8,6 +8,8 @@
"botbuilder-schema==4.13.0",
"botbuilder-core==4.13.0",
"botbuilder-dialogs=... |
python-poetry__poetry-3159 | Poetry fails with KeyError if the PATH environment variable is not present
- [x] I am on the [latest](https://github.com/python-poetry/poetry/releases/latest) Poetry version.
- [x] I have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repo and believe that this is not a duplicate.
- [x]... | [
{
"content": "import base64\nimport hashlib\nimport json\nimport os\nimport platform\nimport re\nimport shutil\nimport sys\nimport sysconfig\nimport textwrap\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 textwrap\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 0a027bd668a..ccd855b5c60 100644
--- a/poetry/utils/env.py
+++ b/poetry/utils/env.py
@@ -1212,7 +1212,7 @@ def unset_env(self, key):
del os.environ[key]
def _updated_path(self):
- return os.pathsep.join([str(self._bin_dir), os.enviro... |
python-poetry__poetry-3146 | Poetry fails with KeyError if the PATH environment variable is not present
- [x] I am on the [latest](https://github.com/python-poetry/poetry/releases/latest) Poetry version.
- [x] I have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repo and believe that this is not a duplicate.
- [x]... | [
{
"content": "import base64\nimport hashlib\nimport json\nimport os\nimport platform\nimport re\nimport shutil\nimport sys\nimport sysconfig\nimport textwrap\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 textwrap\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 0a027bd668a..ccd855b5c60 100644
--- a/poetry/utils/env.py
+++ b/poetry/utils/env.py
@@ -1212,7 +1212,7 @@ def unset_env(self, key):
del os.environ[key]
def _updated_path(self):
- return os.pathsep.join([str(self._bin_dir), os.enviro... |
cleanlab__cleanlab-990 | Add underperforming_group issue type among the Datalab defaults
Test issue manager with different datasets (Image, tabular etc.) to make sure that the underperforming group in the dataset is extracted successfully. List any failure cases that might need to be addressed before adding this issue type to the defaults.
| [
{
"content": "# Copyright (C) 2017-2023 Cleanlab Inc.\n# This file is part of cleanlab.\n#\n# cleanlab is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as published\n# by the Free Software Foundation, either version 3 of the License, or\n# (... | [
{
"content": "# Copyright (C) 2017-2023 Cleanlab Inc.\n# This file is part of cleanlab.\n#\n# cleanlab is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as published\n# by the Free Software Foundation, either version 3 of the License, or\n# (... | diff --git a/cleanlab/datalab/internal/issue_manager_factory.py b/cleanlab/datalab/internal/issue_manager_factory.py
index 28cabb58a6..d85fc62e4c 100644
--- a/cleanlab/datalab/internal/issue_manager_factory.py
+++ b/cleanlab/datalab/internal/issue_manager_factory.py
@@ -223,6 +223,7 @@ def list_default_issue_types(task... |
liqd__adhocracy4-1243 | Poll cannot change order of questions
Poll: after moving a question in the dashboard and saving, the question moves back to it's original position.
NOTE: flip-move lib still working in documents, may require a poll refactor
https://github.com/liqd/adhocracy-plus/issues/1964
https://github.com/liqd/a4-meinberlin/i... | [
{
"content": "from django.contrib.contenttypes.fields import GenericRelation\nfrom django.core.exceptions import ValidationError\nfrom django.db import models\nfrom django.utils.translation import gettext_lazy as _\n\nfrom adhocracy4.comments import models as comment_models\nfrom adhocracy4.models.base import U... | [
{
"content": "from django.contrib.contenttypes.fields import GenericRelation\nfrom django.core.exceptions import ValidationError\nfrom django.db import models\nfrom django.utils.translation import gettext_lazy as _\n\nfrom adhocracy4.comments import models as comment_models\nfrom adhocracy4.models.base import U... | diff --git a/adhocracy4/comments_async/static/comments_async/comment_edit_form.jsx b/adhocracy4/comments_async/static/comments_async/comment_edit_form.jsx
index 958b0108a..85ba95a8a 100644
--- a/adhocracy4/comments_async/static/comments_async/comment_edit_form.jsx
+++ b/adhocracy4/comments_async/static/comments_async/c... |
DataDog__dd-trace-py-906 | Scrolling for the left-side menu on the API docs is broken
Chromium, Ubuntu
Go to http://pypi.datadoghq.com/trace/docs/advanced_usage.html
Scroll up and down
If your browser window is short enough, you'll notice the left-side menu doesn't scroll with the page, leaving some parts inaccessible.
Video: [vokoscreen... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# ddtrace documentation build configuration file, created by\n# sphinx-quickstart on Thu Jul 7 17:25:05 2016.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in th... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# ddtrace documentation build configuration file, created by\n# sphinx-quickstart on Thu Jul 7 17:25:05 2016.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in th... | diff --git a/docs/conf.py b/docs/conf.py
index 0ed85b47747..5abb255baaf 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -145,7 +145,6 @@
#
html_theme_options = {
'description': 'Datadog\'s Python tracing client',
- 'fixed_sidebar': True,
}
# Add any paths that contain custom themes here, relative to this ... |
opendatacube__datacube-core-875 | If DB_PORT is not set, config process sets port to an empty string
I have an existing environment that sets up the datacube connection using this:
```
- DB_HOSTNAME=host.docker.internal
- DB_USERNAME=opendatacube
- DB_PASSWORD=opendatacubepassword
- DB_DATABASE=opendatacube
```
and with... | [
{
"content": "# coding=utf-8\n\"\"\"\nUser configuration.\n\"\"\"\n\nimport os\nfrom pathlib import Path\nimport configparser\nfrom urllib.parse import unquote_plus, urlparse\nfrom typing import Optional, Iterable, Union, Any, Tuple, Dict\n\nPathLike = Union[str, 'os.PathLike[Any]']\n\n\nENVIRONMENT_VARNAME = '... | [
{
"content": "# coding=utf-8\n\"\"\"\nUser configuration.\n\"\"\"\n\nimport os\nfrom pathlib import Path\nimport configparser\nfrom urllib.parse import unquote_plus, urlparse\nfrom typing import Optional, Iterable, Union, Any, Tuple, Dict\n\nPathLike = Union[str, 'os.PathLike[Any]']\n\n\nENVIRONMENT_VARNAME = '... | diff --git a/datacube/config.py b/datacube/config.py
index 1bf4ce6371..fd10ff3c84 100755
--- a/datacube/config.py
+++ b/datacube/config.py
@@ -233,7 +233,7 @@ def parse_env_params() -> Dict[str, str]:
for k in DB_KEYS}
return {k: v
for k, v in params.items()
- if v is not Non... |
openai__gym-2633 | [Bug Report] Empty print version warning
**Describe the bug**
When I import gym, there's an empty line printed.
It's because of this line: https://github.com/openai/gym/blob/master/gym/__init__.py#L30
Either it's a bug, because `notice` shouldn't be an empty string, or the check should be `if notice:` which is fa... | [
{
"content": "from gym import error\nfrom gym.version import VERSION as __version__\n\nfrom gym.core import (\n Env,\n Wrapper,\n ObservationWrapper,\n ActionWrapper,\n RewardWrapper,\n)\nfrom gym.spaces import Space\nfrom gym.envs import make, spec, register\nfrom gym import logger\nfrom gym imp... | [
{
"content": "from gym import error\nfrom gym.version import VERSION as __version__\n\nfrom gym.core import (\n Env,\n Wrapper,\n ObservationWrapper,\n ActionWrapper,\n RewardWrapper,\n)\nfrom gym.spaces import Space\nfrom gym.envs import make, spec, register\nfrom gym import logger\nfrom gym imp... | diff --git a/gym/__init__.py b/gym/__init__.py
index 71797c7e798..b44d1b419ad 100644
--- a/gym/__init__.py
+++ b/gym/__init__.py
@@ -26,7 +26,7 @@
# print version warning if necessary
notice = notices.notices.get(__version__)
- if notice is not None:
+ if notice:
print(notice, file=sys.stderr... |
feast-dev__feast-1585 | Bump fastavro version
**Is your feature request related to a problem? Please describe.**
The version of Fastavro that we're using is kinda old and may be buggy soon. It's also causing some version conflicts with packages that have already upgraded to the newer (1.xx) versions.
**Describe the solution you'd like**
... | [
{
"content": "# Copyright 2019 The Feast 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | [
{
"content": "# Copyright 2019 The Feast 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | diff --git a/sdk/python/setup.py b/sdk/python/setup.py
index e2bb02f10d0..2c40d7ec4ac 100644
--- a/sdk/python/setup.py
+++ b/sdk/python/setup.py
@@ -40,7 +40,7 @@
REQUIRED = [
"Click==7.*",
"colorama>=0.3.9",
- "fastavro>=0.22.11,<0.23",
+ "fastavro>=1.1.0",
"google-api-core>=1.23.0",
"google... |
apache__airflow-12386 | [ldap] section in configuration is not applicable anymore in 2.0
**Apache Airflow version**: 2.0.0b* / master
**What happened**:
`[ldap]` section in `airflow.cfg` is not applicable anymore in 2.0 and `master`, because the LDAP authentication (for webserver and API) is handled by FAB, and the configuration for t... | [
{
"content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n... | [
{
"content": "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n... | diff --git a/airflow/config_templates/config.yml b/airflow/config_templates/config.yml
index df5a53abe7282..516bb6284e1c0 100644
--- a/airflow/config_templates/config.yml
+++ b/airflow/config_templates/config.yml
@@ -1747,84 +1747,6 @@
type: string
example: ~
default: "False"
-- name: ldap
- descr... |
archlinux__archinstall-555 | Version Bump in conf.py?
https://github.com/archlinux/archinstall/blob/a4033a7d3a94916f2b4972d212f9d0069fca39cd/docs/conf.py#L44
| [
{
"content": "import os\nimport re\nimport sys\n\nsys.path.insert(0, os.path.abspath('..'))\n\n\ndef process_docstring(app, what, name, obj, options, lines):\n\tspaces_pat = re.compile(r\"( {8})\")\n\tll = []\n\tfor line in lines:\n\t\tll.append(spaces_pat.sub(\" \", line))\n\tlines[:] = ll\n\n\ndef setup(ap... | [
{
"content": "import os\nimport re\nimport sys\n\nsys.path.insert(0, os.path.abspath('..'))\n\n\ndef process_docstring(app, what, name, obj, options, lines):\n\tspaces_pat = re.compile(r\"( {8})\")\n\tll = []\n\tfor line in lines:\n\t\tll.append(spaces_pat.sub(\" \", line))\n\tlines[:] = ll\n\n\ndef setup(ap... | diff --git a/docs/conf.py b/docs/conf.py
index 375ff434de..add1c5e749 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -41,7 +41,7 @@ def setup(app):
author = 'Anton Hvornum'
# The full version, including alpha/beta/rc tags
-release = 'v2.1.0'
+release = 'v2.3.0.dev0'
# -- General configuration ------------------... |
comic__grand-challenge.org-758 | grandchallenge.cases.tasks.build_images should use a separate queue
This process can take a long time
| [
{
"content": "# Django settings for comic project.\nimport glob\nimport os\nimport re\nimport uuid\nfrom datetime import timedelta\nfrom distutils.util import strtobool as strtobool_i\n\nfrom django.contrib.messages import constants as messages\nfrom django.core.exceptions import ImproperlyConfigured\n\nfrom co... | [
{
"content": "# Django settings for comic project.\nimport glob\nimport os\nimport re\nimport uuid\nfrom datetime import timedelta\nfrom distutils.util import strtobool as strtobool_i\n\nfrom django.contrib.messages import constants as messages\nfrom django.core.exceptions import ImproperlyConfigured\n\nfrom co... | diff --git a/app/config/settings.py b/app/config/settings.py
index 85a8a2cd6b..f2b24552f2 100644
--- a/app/config/settings.py
+++ b/app/config/settings.py
@@ -601,7 +601,8 @@ def strtobool(val) -> bool:
}
CELERY_TASK_ROUTES = {
- "grandchallenge.container_exec.tasks.execute_job": "evaluation"
+ "grandchalleng... |
weecology__retriever-950 | Check MySQL and Postgres credential files
In addition to allowing users to directly provide their MySQL and PostgreSQL credentials, it should also be possible for them to store these credentials in the usual places.
We should check information given by the user to the retriever first, and then fall back on the configu... | [
{
"content": "from __future__ import print_function\nfrom builtins import str\nimport os\nfrom retriever.lib.models import Engine, no_cleanup\nfrom retriever import ENCODING\n\n\nclass engine(Engine):\n \"\"\"Engine instance for MySQL.\"\"\"\n name = \"MySQL\"\n abbreviation = \"mysql\"\n datatypes ... | [
{
"content": "from __future__ import print_function\nfrom builtins import str\nimport os\nfrom retriever.lib.models import Engine, no_cleanup\nfrom retriever import ENCODING\n\n\nclass engine(Engine):\n \"\"\"Engine instance for MySQL.\"\"\"\n name = \"MySQL\"\n abbreviation = \"mysql\"\n datatypes ... | diff --git a/docs/introduction.rst b/docs/introduction.rst
index 3458a4577..57f8c7fbf 100644
--- a/docs/introduction.rst
+++ b/docs/introduction.rst
@@ -241,6 +241,39 @@ The ``citation`` command show the citation for the retriever and for the scripts
**To create new, edit, delete scripts please read the documentatio... |
deepchecks__deepchecks-1291 | [BUG] Tables have no style rendered on `check_result.save_as_html()`
The tables are not looking good when exporting single check as html

```
from deepchecks.tabular.datasets.regression import avocado
f... | [
{
"content": "# ----------------------------------------------------------------------------\n# Copyright (C) 2021-2022 Deepchecks (https://www.deepchecks.com)\n#\n# This file is part of Deepchecks.\n# Deepchecks is distributed under the terms of the GNU Affero General\n# Public License (version 3 or later).\n#... | [
{
"content": "# ----------------------------------------------------------------------------\n# Copyright (C) 2021-2022 Deepchecks (https://www.deepchecks.com)\n#\n# This file is part of Deepchecks.\n# Deepchecks is distributed under the terms of the GNU Affero General\n# Public License (version 3 or later).\n#... | diff --git a/deepchecks/core/check_result.py b/deepchecks/core/check_result.py
index d9d26d9290..7426865571 100644
--- a/deepchecks/core/check_result.py
+++ b/deepchecks/core/check_result.py
@@ -130,6 +130,7 @@ def display_check(self, unique_id: str = None, as_widget: bool = False,
"""
if as_widget:
... |
ray-project__ray-1471 | Travis test failures in test_catalog.py.
The Travis builds all seem to be failing in `test_catalog.py`.
I can reproduce some failures locally with `gym` version `0.9.5`.
Gym pushed a new version today, so that may be the issue https://pypi.python.org/pypi/gym.
For example,
```
$ python -m pytest python/ray... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport cv2\nimport numpy as np\nimport gym\n\nATARI_OBS_SHAPE = (210, 160, 3)\nATARI_RAM_OBS_SHAPE = (128,)\n\n\nclass Preprocessor(object):\n \"\"\"Defines an abstract observation pr... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport cv2\nimport numpy as np\nimport gym\n\nATARI_OBS_SHAPE = (210, 160, 3)\nATARI_RAM_OBS_SHAPE = (128,)\n\n\nclass Preprocessor(object):\n \"\"\"Defines an abstract observation pr... | diff --git a/python/ray/rllib/models/preprocessors.py b/python/ray/rllib/models/preprocessors.py
index 01e9db16fbc3..f6ec1fa5e071 100644
--- a/python/ray/rllib/models/preprocessors.py
+++ b/python/ray/rllib/models/preprocessors.py
@@ -78,7 +78,6 @@ def transform(self, observation):
class OneHotPreprocessor(Preproces... |
CTPUG__wafer-643 | Add support for Django 4.0
Currently failing tests (See #632)
| [
{
"content": "from glob import glob\nimport subprocess\n\nfrom setuptools import find_packages, setup\n\nREQUIRES = [\n 'Django>=2.2,<4',\n 'bleach',\n 'bleach-allowlist',\n 'diff-match-patch',\n 'django-bakery>=0.12.0',\n 'django-crispy-forms',\n 'django-markitup>=4.0.0',\n 'django-regi... | [
{
"content": "from glob import glob\nimport subprocess\n\nfrom setuptools import find_packages, setup\n\nREQUIRES = [\n 'Django>=2.2,<4',\n 'bleach',\n 'bleach-allowlist',\n 'diff-match-patch',\n 'django-bakery>=0.13.0',\n 'django-crispy-forms',\n 'django-markitup>=4.0.0',\n 'django-regi... | diff --git a/setup.py b/setup.py
index 87913769..223b9c61 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@
'bleach',
'bleach-allowlist',
'diff-match-patch',
- 'django-bakery>=0.12.0',
+ 'django-bakery>=0.13.0',
'django-crispy-forms',
'django-markitup>=4.0.0',
'django-registration... |
Nitrate__Nitrate-564 | Remove Django 2.0
Django 2.0 is not supported and marked as insecure. Refer to https://docs.djangoproject.com/en/2.0/
| [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\n\nwith open('VERSION.txt', 'r') as f:\n pkg_version = f.read().strip()\n\n\ndef get_long_description():\n with open('README.rst', 'r') as f:\n return f.read()\n\n\ninstall_requires = [\n 'beautifulsoup4 >= 4.... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\n\nwith open('VERSION.txt', 'r') as f:\n pkg_version = f.read().strip()\n\n\ndef get_long_description():\n with open('README.rst', 'r') as f:\n return f.read()\n\n\ninstall_requires = [\n 'beautifulsoup4 >= 4.... | diff --git a/.travis.yml b/.travis.yml
index 18075323..2e06adea 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,11 +4,6 @@ services:
- docker
matrix:
include:
- # Django 2.0.x with Python 3.6 and 3.7
- - python: "3.6"
- env: DJANGO_REL="django>=2.0,<2.1"
- - python: "3.7"
- env: DJANGO_REL="django>=2.0,<... |
pymodbus-dev__pymodbus-2065 | ModbusException 0x07 is missing in pdu.py
In pdu.py is ModbusException NegativeAcknowledge missing. Is it possible to add: NegativeAcknowledge = 0x07 ?
class ModbusExceptions:
IllegalFunction = 0x01
IllegalAddress = 0x02
IllegalValue = 0x03
SlaveFailure = 0x04
Acknowledge = 0x05
... | [
{
"content": "\"\"\"Contains base classes for modbus request/response/error packets.\"\"\"\n\n__all__ = [\n \"ModbusRequest\",\n \"ModbusResponse\",\n \"ModbusExceptions\",\n \"ExceptionResponse\",\n \"IllegalFunctionRequest\",\n]\n\n# pylint: disable=missing-type-doc\nimport struct\n\nfrom pymod... | [
{
"content": "\"\"\"Contains base classes for modbus request/response/error packets.\"\"\"\n\n__all__ = [\n \"ModbusRequest\",\n \"ModbusResponse\",\n \"ModbusExceptions\",\n \"ExceptionResponse\",\n \"IllegalFunctionRequest\",\n]\n\n# pylint: disable=missing-type-doc\nimport struct\n\nfrom pymod... | diff --git a/pymodbus/pdu.py b/pymodbus/pdu.py
index d73b841cd..64c48b1e1 100644
--- a/pymodbus/pdu.py
+++ b/pymodbus/pdu.py
@@ -164,6 +164,7 @@ class ModbusExceptions: # pylint: disable=too-few-public-methods
SlaveFailure = 0x04
Acknowledge = 0x05
SlaveBusy = 0x06
+ NegativeAcknowledge = 0x07
M... |
wandb__wandb-424 | Install issue on DLAMI images, conflict with PyYAML
wandb has a dependency conflict when installing on AWS Deep Learning images -- DLAMI v23
You can get arround it with 'pip install wandb --ignore-installed', but also perhaps wandb could relax PyYAML version requirement to make life easier (ie, I can't put wandb in re... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup\n\nwith open('README.md') as readme_file:\n readme = readme_file.read()\n\nrequirements = [\n 'backports.tempfile>=1.0',\n 'Click>=7.0',\n 'GitPython>=1.0.0',\n 'gql>=0.1.0',\n 'nvidia-ml-py3>=7.352.0'... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom setuptools import setup\n\nwith open('README.md') as readme_file:\n readme = readme_file.read()\n\nrequirements = [\n 'backports.tempfile>=1.0',\n 'Click>=7.0',\n 'GitPython>=1.0.0',\n 'gql>=0.1.0',\n 'nvidia-ml-py3>=7.352.0'... | diff --git a/setup.py b/setup.py
index 4f157098539..9613dc19495 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,6 @@
'shortuuid>=0.5.0',
'six>=1.10.0',
'watchdog>=0.8.3',
- 'PyYAML>=4.2b4', # watchdog depends on pyyaml but doesnt specify safe version
'psutil>=5.0.0',
'sentry-sdk>=0.4.0',
... |
ceph__ceph-ansible-3614 | Python3 seems to break TASK [ceph-mon : create monitor initial keyring]
<!-- **Are you in the right place?**
1. For issues or feature requests, please create an issue in this repository.
2. Did you already search the existing open issues for anything similar? -->
**Bug Report**
# What happened:
Using stable-... | [
{
"content": "#!/usr/bin/python\n# Copyright 2018, Red Hat, 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# Unles... | [
{
"content": "#!/usr/bin/python\n# Copyright 2018, Red Hat, 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# Unles... | diff --git a/library/ceph_key.py b/library/ceph_key.py
index a5fd517c91..34a3b79b25 100644
--- a/library/ceph_key.py
+++ b/library/ceph_key.py
@@ -678,8 +678,8 @@ def run_module():
end=str(endd),
delta=str(delta),
rc=rc,
- stdout=out.rstrip(b"\r\n"),
- stderr=err.rstrip(b"\r\n")... |
pallets__click-2175 | `click.secho` is improperly typed
The `file` argument for `click.secho` is missing part of its typehint causing the entire secho function to be untyped.
This is not flagged by mypy strict mode, but does in pyright strict mode.
---
Install pyright and click
```bash
python -m venv .venv && source .venv/bin/activ... | [
{
"content": "import inspect\nimport io\nimport itertools\nimport os\nimport sys\nimport typing as t\nfrom gettext import gettext as _\n\nfrom ._compat import isatty\nfrom ._compat import strip_ansi\nfrom ._compat import WIN\nfrom .exceptions import Abort\nfrom .exceptions import UsageError\nfrom .globals impor... | [
{
"content": "import inspect\nimport io\nimport itertools\nimport os\nimport sys\nimport typing as t\nfrom gettext import gettext as _\n\nfrom ._compat import isatty\nfrom ._compat import strip_ansi\nfrom ._compat import WIN\nfrom .exceptions import Abort\nfrom .exceptions import UsageError\nfrom .globals impor... | diff --git a/CHANGES.rst b/CHANGES.rst
index 6348d6f25..6c9a79327 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -14,6 +14,7 @@ Unreleased
- Fix a typo in the Bash completion script that affected file and
directory completion. If this script was generated by a previous
version, it should be regenerated. :is... |
jupyterhub__zero-to-jupyterhub-k8s-403 | Allow making JupyterLab default thing to launch
Is there a way to make JupyterLab come up by default when new users connect?
Is there a way to get the JupyterHub control panel from JupyterLab?
| [
{
"content": "import os\nimport glob\nfrom tornado.httpclient import AsyncHTTPClient\n\nfrom z2jh import get_config, get_secret\n\n# Configure JupyterHub to use the curl backend for making HTTP requests,\n# rather than the pure-python implementations. The default one starts\n# being too slow to make a large num... | [
{
"content": "import os\nimport glob\nfrom tornado.httpclient import AsyncHTTPClient\n\nfrom z2jh import get_config, get_secret\n\n# Configure JupyterHub to use the curl backend for making HTTP requests,\n# rather than the pure-python implementations. The default one starts\n# being too slow to make a large num... | diff --git a/doc/source/user-environment.rst b/doc/source/user-environment.rst
index 42cb34a6a2..fdf4b829e4 100644
--- a/doc/source/user-environment.rst
+++ b/doc/source/user-environment.rst
@@ -185,6 +185,35 @@ how to configure JupyterHub to build off of this image:
9. **Enjoy your new computing environment!** You sh... |
sql-machine-learning__elasticdl-368 | Better check for codec names
currently, codec name argument is not checked. A typo would result in worker interpreting encoded data.
| [
{
"content": "import logging\nimport time\nimport argparse\nimport os\n\nimport grpc\nimport tensorflow as tf\n\ntf.enable_eager_execution()\n\nfrom concurrent import futures\nfrom recordio import File\nfrom elasticdl.proto import master_pb2_grpc\nfrom elasticdl.master.servicer import MasterServicer\nfrom elast... | [
{
"content": "import logging\nimport time\nimport argparse\nimport os\n\nimport grpc\nimport tensorflow as tf\n\ntf.enable_eager_execution()\n\nfrom concurrent import futures\nfrom recordio import File\nfrom elasticdl.proto import master_pb2_grpc\nfrom elasticdl.master.servicer import MasterServicer\nfrom elast... | diff --git a/elasticdl/master/main.py b/elasticdl/master/main.py
index d06686bbc..0f2b0b4c7 100644
--- a/elasticdl/master/main.py
+++ b/elasticdl/master/main.py
@@ -65,6 +65,7 @@ def _parse_args():
parser.add_argument(
"--codec-type",
default=None,
+ choices=["tf_example"],
help="... |
vega__altair-1844 | Fix simple typo: packge -> package
There is a small typo in setup.py.
Should read package rather than packge.
| [
{
"content": "import io\nimport os\nimport re\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n#==============================================================================\n# Utilities\n#===================================================================... | [
{
"content": "import io\nimport os\nimport re\n\ntry:\n from setuptools import setup\nexcept ImportError:\n from distutils.core import setup\n\n#==============================================================================\n# Utilities\n#===================================================================... | diff --git a/setup.py b/setup.py
index 8c2e4e73b..da9afb201 100644
--- a/setup.py
+++ b/setup.py
@@ -27,7 +27,7 @@ def get_install_requirements(path):
def version(path):
- """Obtain the packge version from a python file e.g. pkg/__init__.py
+ """Obtain the package version from a python file e.g. pkg/__init__... |
pyca__cryptography-3803 | Signer/Verifier deprecation warning has wrong stacklevel
Seeing this with Cryptography 2.0:
```
.../python3.5/site-packages/cryptography/hazmat/backends/openssl/rsa.py:477: DeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead.
_warn_sign_verify_deprecated()
.../python... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport warnings\n\nfrom cryptography import u... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport warnings\n\nfrom cryptography import u... | diff --git a/src/cryptography/hazmat/backends/openssl/utils.py b/src/cryptography/hazmat/backends/openssl/utils.py
index ff1b97458735..05d0fe589158 100644
--- a/src/cryptography/hazmat/backends/openssl/utils.py
+++ b/src/cryptography/hazmat/backends/openssl/utils.py
@@ -41,5 +41,5 @@ def _warn_sign_verify_deprecated():... |
fossasia__open-event-server-9132 | Add the unique ticket code into the downlad CSV file
The CSV download file of the attendee list does not include the numbers on the QR Code. Please add this field "Ticket-ID".
The ticket ID has the following format: 135ccbd7-9b23-4a52-a7fd-326fec1b2c1c
Whereas the order has a format like this: #O1691408152-34896
... | [
{
"content": "import base64\nfrom dataclasses import dataclass\nfrom datetime import datetime\nfrom io import BytesIO\n\nimport qrcode\nfrom citext import CIText\n\nfrom app.api.helpers.storage import UPLOAD_PATHS, generate_hash\nfrom app.models import db\nfrom app.models.base import SoftDeletionModel\n\n\n@dat... | [
{
"content": "import base64\nfrom dataclasses import dataclass\nfrom datetime import datetime\nfrom io import BytesIO\n\nimport qrcode\nfrom citext import CIText\n\nfrom app.api.helpers.storage import UPLOAD_PATHS, generate_hash\nfrom app.models import db\nfrom app.models.base import SoftDeletionModel\n\n\n@dat... | diff --git a/app/models/ticket_holder.py b/app/models/ticket_holder.py
index 3501b54e7a..1d8f1371a3 100644
--- a/app/models/ticket_holder.py
+++ b/app/models/ticket_holder.py
@@ -108,7 +108,7 @@ def qr_code(self):
box_size=10,
border=0,
)
- qr.add_data(self.order.identifier + "... |
ansible-collections__community.vmware-1280 | community.vmware.vmware_guest_powerstate not finding VM by name
##### SUMMARY
When trying to control powerstate of a VM by name the module is unable to find the VM. This despite the fact that the exact same parameters will find the VM in other modules (such as vmware_guest_snapshot).
##### ISSUE TYPE
- Bug Report
... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n#\n# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\n... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n#\n# Copyright: (c) 2017, Abhijeet Kasurde <akasurde@redhat.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\n\n... | diff --git a/changelogs/fragments/1238-vmware_guest_powerstate-ignore_trailing_slash_in_folder.yml b/changelogs/fragments/1238-vmware_guest_powerstate-ignore_trailing_slash_in_folder.yml
new file mode 100644
index 0000000000..f73c29011e
--- /dev/null
+++ b/changelogs/fragments/1238-vmware_guest_powerstate-ignore_traili... |
oppia__oppia-7459 | Upgrade @typescript-eslint/eslint-plugin
`eslint-utils` is currently out of date, https://github.com/oppia/oppia/pull/7451 provides a temporary fix, but we need to upgrade the main package that requires `eslint-utils` to ensure that we have a long term fix.
When fixing this, please make sure that the lint tests run... | [
{
"content": "# Copyright 2019 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | [
{
"content": "# Copyright 2019 The Oppia Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | diff --git a/.eslintrc b/.eslintrc
index 2a39be6f84aae..ab5cdb333ac38 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -149,6 +149,7 @@
"no-multi-str": [
"error"
],
+ "no-prototype-builtins": "off",
"no-redeclare": [
"off"
],
diff --git a/core/domain/feedback_jobs_one_off.py b/core/domain/... |
PyGithub__PyGithub-486 | GistFile.content is None If Gist haven't complete
If gist object haven't complete, files in this gist has no content.
I create an pull request using Just4test account.
| [
{
"content": "# -*- coding: utf-8 -*-\n\n# ########################## Copyrights and license ############################\n# #\n# Copyright 2012 Steve English <steve.english@navetas.com> #\n# Copyright 2012 Vincent ... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# ########################## Copyrights and license ############################\n# #\n# Copyright 2012 Steve English <steve.english@navetas.com> #\n# Copyright 2012 Vincent ... | diff --git a/github/Gist.py b/github/Gist.py
index 8d75e1e10e..12e83c9547 100644
--- a/github/Gist.py
+++ b/github/Gist.py
@@ -88,7 +88,7 @@ def files(self):
"""
:type: dict of string to :class:`github.GistFile.GistFile`
"""
- self._completeIfNotSet(self._files)
+ self._complete... |
projectmesa__mesa-1432 | `OSError: Int or String expected` when running boid_flockers example
**Describe the bug**
Running the `boid_flockers` example results in `OSError: Int or String expected`.
**Expected behavior**
Examples should be able to run without errors.
**Additional context**
This is likely due to a breaking change i... | [
{
"content": "\"\"\"\nModularServer\n=============\n\nA visualization server which renders a model via one or more elements.\n\nThe concept for the modular visualization server as follows:\nA visualization is composed of VisualizationElements, each of which defines how\nto generate some visualization from a mod... | [
{
"content": "\"\"\"\nModularServer\n=============\n\nA visualization server which renders a model via one or more elements.\n\nThe concept for the modular visualization server as follows:\nA visualization is composed of VisualizationElements, each of which defines how\nto generate some visualization from a mod... | diff --git a/mesa/visualization/ModularVisualization.py b/mesa/visualization/ModularVisualization.py
index cc6d727bb97..9aa2c4b53dd 100644
--- a/mesa/visualization/ModularVisualization.py
+++ b/mesa/visualization/ModularVisualization.py
@@ -257,8 +257,8 @@ def __init__(
model_cls,
visualization_elemen... |
google__jax-1096 | jaxlib build w/ cuda: File not found during compilation
I'm compiling `jaxlib` with CUDA 10.0 on Ubuntu 18.04. The build fails with the following error:
```
$ python3 build/build.py --enable_cuda --cuda_path /usr/local/cuda-10.0/ --cudnn_path /usr/local/cuda-10.0/ --enable_march_native
[...]
ERROR: /home/clem... | [
{
"content": "#!/usr/bin/python\n#\n# 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unles... | [
{
"content": "#!/usr/bin/python\n#\n# 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unles... | diff --git a/build/build.py b/build/build.py
index f2428415c590..32fb7b38d180 100755
--- a/build/build.py
+++ b/build/build.py
@@ -187,6 +187,9 @@ def check_bazel_version(bazel_path, min_version, max_version):
build:cuda --crosstool_top=@local_config_cuda//crosstool:toolchain
build:cuda --define=using_cuda=true --d... |
Parsl__parsl-534 | Fix import error
```
ImportError: cannot import name 'BashApp' from 'parsl.app.python' (/home/annawoodard/parsl/parsl/app/python.py)
```
It looks like I introduced this bug in 3d0e2d1e69ad27a133b0c40a42472ae43876d5f2.
| [
{
"content": "\"\"\"Definitions for the @App decorator and the App classes.\n\nThe App class encapsulates a generic leaf task that can be executed asynchronously.\n\"\"\"\nimport logging\nfrom inspect import getsource\nfrom hashlib import md5\nfrom inspect import signature\n\nfrom parsl.app.errors import Invali... | [
{
"content": "\"\"\"Definitions for the @App decorator and the App classes.\n\nThe App class encapsulates a generic leaf task that can be executed asynchronously.\n\"\"\"\nimport logging\nfrom inspect import getsource\nfrom hashlib import md5\nfrom inspect import signature\n\nfrom parsl.app.errors import Invali... | diff --git a/parsl/app/app.py b/parsl/app/app.py
index 6c7523f2b6..9b75a8ee88 100644
--- a/parsl/app/app.py
+++ b/parsl/app/app.py
@@ -181,7 +181,7 @@ def bash_app(function=None, data_flow_kernel=None, walltime=60, cache=False, exe
cache : bool
Enable caching of the app call. Default is False.
"""
- ... |
hylang__hy-161 | LIST-COMP breaks with certain variable names
Try compiling:
```
(list-comp (, i j) (i [-1 0 1] j [-1 0 1]))
```
With hy and you'll get some strange errors. If you replace "i" and "j" with "x" and "y" respectively, the same piece of code works as expected.
| [
{
"content": "# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without restriction, including without limitation\n# t... | [
{
"content": "# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without restriction, including without limitation\n# t... | diff --git a/hy/lex/states.py b/hy/lex/states.py
index 8c8ffd4df..772f8c6a0 100644
--- a/hy/lex/states.py
+++ b/hy/lex/states.py
@@ -67,10 +67,11 @@ def _resolve_atom(obj):
except ValueError:
pass
- try:
- return HyComplex(obj)
- except ValueError:
- pass
+ if obj != "j":
+ ... |
buildbot__buildbot-380 | Update flake8 to version 2.6.
This introduces a few new errors:
- `W503` line break before binary operator
I don't think this is a sensible choice and the codebase doesn't follow this convention.
- `E731` do not assign a lambda expression, use a def
This is used often in tests for functions that return canned... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | diff --git a/master/buildbot/buildslave.py b/master/buildbot/buildslave.py
index 6fe79c1cd0bb..29f77df99f6c 100644
--- a/master/buildbot/buildslave.py
+++ b/master/buildbot/buildslave.py
@@ -233,6 +233,8 @@ def reconfigService(self, new_config):
return d
def stopService(self):
+ if self.registrat... |
feast-dev__feast-4085 | Remove numpy <1.25 dependency in setup.py
In setup.py, I can see that the dependency for pandas has already been updated from
"pandas>=1.4.3,<2" (which is still in the current PyPI version) to "pandas>=1.4.3,<3", but numpy hasn't, which will break the installation if I am using e.g. pandas 2.2.1, that requires numpy ... | [
{
"content": "# Copyright 2019 The Feast 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | [
{
"content": "# Copyright 2019 The Feast 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | diff --git a/setup.py b/setup.py
index f94fb25bb55..b0e9c0c6af4 100644
--- a/setup.py
+++ b/setup.py
@@ -48,7 +48,7 @@
"Jinja2>=2,<4",
"jsonschema",
"mmh3",
- "numpy>=1.22,<1.25",
+ "numpy>=1.22,<2",
"pandas>=1.4.3,<3",
# Higher than 4.23.4 seems to cause a seg fault
"protobuf>=4.24.... |
readthedocs__readthedocs.org-4853 | Confusing error message to end user
In https://github.com/rtfd/readthedocs.org/issues/4071#issuecomment-405939492 I realized that we are saying that we have a problem parsing the YAML file but the problem is in fact in one of the options set from the web admin dashboard.
Example:
![captura de pantalla_2018-07-18_... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Exceptions raised when building documentation.\"\"\"\n\nfrom __future__ import division, print_function, unicode_literals\n\nfrom django.utils.translation import ugettext_noop\n\n\nclass BuildEnvironmentException(Exception):\n message = None\n status_code = Non... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Exceptions raised when building documentation.\"\"\"\n\nfrom __future__ import division, print_function, unicode_literals\n\nfrom django.utils.translation import ugettext_noop\n\n\nclass BuildEnvironmentException(Exception):\n message = None\n status_code = Non... | diff --git a/readthedocs/doc_builder/exceptions.py b/readthedocs/doc_builder/exceptions.py
index 4897fd41daa..ce2ce3d844b 100644
--- a/readthedocs/doc_builder/exceptions.py
+++ b/readthedocs/doc_builder/exceptions.py
@@ -43,7 +43,7 @@ class ProjectBuildsSkippedError(BuildEnvironmentError):
class YAMLParseError(Build... |
apache__airflow-9699 | TimeSensor triggers immediately when used over midnight (UTC)
<!--
Welcome to Apache Airflow! For a smooth issue process, try to answer the following questions.
Don't worry if they're not all applicable; just try to include what you can :-)
If you need to include code snippets or logs, please put them in fenced... | [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | diff --git a/UPDATING.md b/UPDATING.md
index c5097aeb34521..b58eaf1bb9e70 100644
--- a/UPDATING.md
+++ b/UPDATING.md
@@ -1475,6 +1475,12 @@ arguments, please change `store_serialized_dags` to `read_dags_from_db`.
Similarly, if you were using `DagBag().store_serialized_dags` property, change it to
`DagBag().read_dags_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.