problem_id
stringlengths
18
22
source
stringclasses
1 value
task_type
stringclasses
1 value
in_source_id
stringlengths
13
58
prompt
stringlengths
1.1k
10.2k
golden_diff
stringlengths
151
4.94k
verification_info
stringlengths
582
21k
num_tokens
int64
271
2.05k
num_tokens_diff
int64
47
1.02k
gh_patches_debug_3993
rasdani/github-patches
git_diff
openstates__openstates-scrapers-382
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- NY: Committees don't have members Taken from bug #195 http://openstates.org/browse/ny/committees/ http://www.nysenate.gov/committee/state-native-american-relations http://assembly.state.ny.us/comm/?sec=mem&i...
diff --git a/openstates/ny/committees.py b/openstates/ny/committees.py --- a/openstates/ny/committees.py +++ b/openstates/ny/committees.py @@ -68,7 +68,7 @@ comm = Committee('lower', name) comm.add_source(url) - for link in page.xpath("//a[contains(@href, 'mem?ad')]"): + for link in pa...
{"golden_diff": "diff --git a/openstates/ny/committees.py b/openstates/ny/committees.py\n--- a/openstates/ny/committees.py\n+++ b/openstates/ny/committees.py\n@@ -68,7 +68,7 @@\n comm = Committee('lower', name)\n comm.add_source(url)\n \n- for link in page.xpath(\"//a[contains(@href, 'mem?ad')]\"...
1,560
137
gh_patches_debug_20787
rasdani/github-patches
git_diff
saulpw__visidata-2185
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- inputMultiple() displays a malformed empty status box **Small description** `search-keys` and `search-col` displays an empty box while waiting for the user to input a regex at the prompt. The box is shown wh...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ ], packages=['visidata', 'visidata.loaders', 'visidata.vendor', 'visidata.tests', 'visidata.ddw', 'visidata.man', 'visidata.themes', 'visidata.features', 'visidata.experimental', 'visidata.apps', 'visidata.apps.vgit', 'visida...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -29,7 +29,7 @@\n ],\n packages=['visidata', 'visidata.loaders', 'visidata.vendor', 'visidata.tests', 'visidata.ddw', 'visidata.man', 'visidata.themes', 'visidata.features', 'visidata.experimental', 'visidata.apps', 'visida...
1,221
275
gh_patches_debug_19917
rasdani/github-patches
git_diff
sbi-dev__sbi-646
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- SNLE + multiple independent prior + MCMC with num_workers > 1 throws error SNLE: - multiple independent prior + num_workers=2 leads to an error (ValueError: Expected value argument to be within the support o...
diff --git a/sbi/samplers/mcmc/init_strategy.py b/sbi/samplers/mcmc/init_strategy.py --- a/sbi/samplers/mcmc/init_strategy.py +++ b/sbi/samplers/mcmc/init_strategy.py @@ -63,9 +63,8 @@ init_param_candidates = [] for i in range(sir_num_batches): batch_draws = proposal.sample((sir_batch_siz...
{"golden_diff": "diff --git a/sbi/samplers/mcmc/init_strategy.py b/sbi/samplers/mcmc/init_strategy.py\n--- a/sbi/samplers/mcmc/init_strategy.py\n+++ b/sbi/samplers/mcmc/init_strategy.py\n@@ -63,9 +63,8 @@\n init_param_candidates = []\n for i in range(sir_num_batches):\n batch_draws = proposa...
1,523
248
gh_patches_debug_16978
rasdani/github-patches
git_diff
fossasia__open-event-server-3183
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Mail: New Session Proposals not Sent out to Organizers and Co-organizers After the submission of several people the new Session Proposals have not been sent out to Organizers and Co-organizers. One reason cou...
diff --git a/app/helpers/notification_email_triggers.py b/app/helpers/notification_email_triggers.py --- a/app/helpers/notification_email_triggers.py +++ b/app/helpers/notification_email_triggers.py @@ -19,7 +19,7 @@ admin_msg_setting = DataGetter.get_message_setting_by_action(NEW_SESSION) organizers = DataGe...
{"golden_diff": "diff --git a/app/helpers/notification_email_triggers.py b/app/helpers/notification_email_triggers.py\n--- a/app/helpers/notification_email_triggers.py\n+++ b/app/helpers/notification_email_triggers.py\n@@ -19,7 +19,7 @@\n admin_msg_setting = DataGetter.get_message_setting_by_action(NEW_SESSION)\n ...
1,662
187
gh_patches_debug_28782
rasdani/github-patches
git_diff
Pylons__pyramid-1024
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Pyramid app frozen with py2exe fails because of Chameleon imports If I freeze a Pyramid application with py2exe and try to run it, it fails during the startup, with the following traceback: ``` Traceback (mo...
diff --git a/pyramid/chameleon_text.py b/pyramid/chameleon_text.py --- a/pyramid/chameleon_text.py +++ b/pyramid/chameleon_text.py @@ -1,7 +1,5 @@ from zope.interface import implementer -from chameleon.zpt.template import PageTextTemplateFile - from pyramid.interfaces import ITemplateRenderer from pyramid.decora...
{"golden_diff": "diff --git a/pyramid/chameleon_text.py b/pyramid/chameleon_text.py\n--- a/pyramid/chameleon_text.py\n+++ b/pyramid/chameleon_text.py\n@@ -1,7 +1,5 @@\n from zope.interface import implementer\n \n-from chameleon.zpt.template import PageTextTemplateFile\n-\n from pyramid.interfaces import ITemplateRender...
1,273
308
gh_patches_debug_2156
rasdani/github-patches
git_diff
spacetelescope__jwql-569
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Write tests for bokeh templating software With the merge of #459, bokeh templating will be implemented for `jwql`. We should address the test coverage for this software. --- END ISSUE --- Below are some c...
diff --git a/jwql/bokeh_templating/example/main.py b/jwql/bokeh_templating/example/main.py --- a/jwql/bokeh_templating/example/main.py +++ b/jwql/bokeh_templating/example/main.py @@ -24,6 +24,8 @@ class TestBokehApp(BokehTemplate): """This is a minimal ``BokehTemplate`` app.""" + + _embed = True d...
{"golden_diff": "diff --git a/jwql/bokeh_templating/example/main.py b/jwql/bokeh_templating/example/main.py\n--- a/jwql/bokeh_templating/example/main.py\n+++ b/jwql/bokeh_templating/example/main.py\n@@ -24,6 +24,8 @@\n \n class TestBokehApp(BokehTemplate):\n \"\"\"This is a minimal ``BokehTemplate`` app.\"\"\"\n+ ...
880
125
gh_patches_debug_347
rasdani/github-patches
git_diff
kivy__python-for-android-2436
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- "diff" files are ignored during "pip install ." in `setup.py` the "diff" is not listed: https://github.com/kivy/python-for-android/blob/develop/setup.py ```python package_data = {'': ['*.tmpl', ...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -11,7 +11,8 @@ packages = find_packages() package_data = {'': ['*.tmpl', - '*.patch', ], } + '*.patch', + '*.diff', ], } data_files = []
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -11,7 +11,8 @@\n packages = find_packages()\n \n package_data = {'': ['*.tmpl',\n- '*.patch', ], }\n+ '*.patch',\n+ '*.diff', ], }\n \n data_files = []\n", "issue": "\"diff\"...
1,741
71
gh_patches_debug_18046
rasdani/github-patches
git_diff
Lightning-AI__pytorch-lightning-3745
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Setting of PYTHONHASHSEED has no effect <!-- ### Common bugs: 1. Tensorboard not showing in Jupyter-notebook see [issue 79](https://github.com/PyTorchLightning/pytorch-lightning/issues/79). 2. PyTorch...
diff --git a/pytorch_lightning/utilities/seed.py b/pytorch_lightning/utilities/seed.py --- a/pytorch_lightning/utilities/seed.py +++ b/pytorch_lightning/utilities/seed.py @@ -27,7 +27,7 @@ def seed_everything(seed: Optional[int] = None) -> int: """ Function that sets seed for pseudo-random number generators ...
{"golden_diff": "diff --git a/pytorch_lightning/utilities/seed.py b/pytorch_lightning/utilities/seed.py\n--- a/pytorch_lightning/utilities/seed.py\n+++ b/pytorch_lightning/utilities/seed.py\n@@ -27,7 +27,7 @@\n def seed_everything(seed: Optional[int] = None) -> int:\n \"\"\"\n Function that sets seed for pseudo...
1,836
220
gh_patches_debug_21147
rasdani/github-patches
git_diff
netbox-community__netbox-8565
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Banner edit fields should be larger ### NetBox version v3.1.6 ### Feature type Change to existing functionality ### Proposed functionality Currently the Login, Top and Bottom banner edit fields in Config...
diff --git a/netbox/netbox/config/parameters.py b/netbox/netbox/config/parameters.py --- a/netbox/netbox/config/parameters.py +++ b/netbox/netbox/config/parameters.py @@ -20,19 +20,28 @@ name='BANNER_LOGIN', label='Login banner', default='', - description="Additional content to display...
{"golden_diff": "diff --git a/netbox/netbox/config/parameters.py b/netbox/netbox/config/parameters.py\n--- a/netbox/netbox/config/parameters.py\n+++ b/netbox/netbox/config/parameters.py\n@@ -20,19 +20,28 @@\n name='BANNER_LOGIN',\n label='Login banner',\n default='',\n- description=\"Addi...
1,778
263
gh_patches_debug_1073
rasdani/github-patches
git_diff
open-telemetry__opentelemetry-python-contrib-98
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- EC2 resource detector hangs for a long time outside of an EC2 instance **Describe your environment** Describe any aspect of your environment relevant to the problem, including your Python version, [platform](...
diff --git a/instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/version.py b/instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/version.py --- a/instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrume...
{"golden_diff": "diff --git a/instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/version.py b/instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/version.py\n--- a/instrumentation/opentelemetry-instrumentation-botocore/src/open...
962
169
gh_patches_debug_4517
rasdani/github-patches
git_diff
TileDB-Inc__TileDB-Py-309
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- array.query no longer works for string attributes I have a case that looks basically like this: ``` array = tiledb.DenseArray(uri, mode="r") q = array.query(attrs=["attrname"]) data = q[:] ``` This wo...
diff --git a/tiledb/multirange_indexing.py b/tiledb/multirange_indexing.py --- a/tiledb/multirange_indexing.py +++ b/tiledb/multirange_indexing.py @@ -128,7 +128,7 @@ for name, item in result_dict.items(): if len(item[1]) > 0: - arr = self.array._unpack_varlen_query(item, name) + ...
{"golden_diff": "diff --git a/tiledb/multirange_indexing.py b/tiledb/multirange_indexing.py\n--- a/tiledb/multirange_indexing.py\n+++ b/tiledb/multirange_indexing.py\n@@ -128,7 +128,7 @@\n \n for name, item in result_dict.items():\n if len(item[1]) > 0:\n- arr = self.array._unpack_var...
2,001
141
gh_patches_debug_36022
rasdani/github-patches
git_diff
alltheplaces__alltheplaces-6357
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- yettel_bg is broken The spider does not return anything. It seems like they've moved the page for getting their store data. I wasn't able to find the new address or how the data reaches their store locator pa...
diff --git a/locations/spiders/yettel_bg.py b/locations/spiders/yettel_bg.py --- a/locations/spiders/yettel_bg.py +++ b/locations/spiders/yettel_bg.py @@ -1,5 +1,9 @@ -from scrapy import Selector, Spider +import io +from openpyxl import load_workbook +from scrapy import Spider + +from locations.hours import OpeningHo...
{"golden_diff": "diff --git a/locations/spiders/yettel_bg.py b/locations/spiders/yettel_bg.py\n--- a/locations/spiders/yettel_bg.py\n+++ b/locations/spiders/yettel_bg.py\n@@ -1,5 +1,9 @@\n-from scrapy import Selector, Spider\n+import io\n \n+from openpyxl import load_workbook\n+from scrapy import Spider\n+\n+from locat...
633
756
gh_patches_debug_1875
rasdani/github-patches
git_diff
mdn__kuma-6598
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Possibly to prefill Reason textarea on $delete If you're going to have some human-helped automation that deletes the 20% or so non-en-US documents that aren't actually translated, it would be nice if you don'...
diff --git a/kuma/wiki/views/delete.py b/kuma/wiki/views/delete.py --- a/kuma/wiki/views/delete.py +++ b/kuma/wiki/views/delete.py @@ -100,7 +100,8 @@ document.delete() return redirect(document) else: - form = DocumentDeletionForm() + + form = DocumentDeletionForm(initial={"...
{"golden_diff": "diff --git a/kuma/wiki/views/delete.py b/kuma/wiki/views/delete.py\n--- a/kuma/wiki/views/delete.py\n+++ b/kuma/wiki/views/delete.py\n@@ -100,7 +100,8 @@\n document.delete()\n return redirect(document)\n else:\n- form = DocumentDeletionForm()\n+\n+ form = Docum...
1,875
103
gh_patches_debug_10882
rasdani/github-patches
git_diff
statsmodels__statsmodels-6292
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- nonparametric.KDEUnivariate returns zero bandwidth Hi, Does anyone have an idea why the following dataset makes KDEUnivariate return zero bandwidth? ``` data = np.array([1,1,1,1,2]) kde_sm = sm.nonparam...
diff --git a/statsmodels/nonparametric/bandwidths.py b/statsmodels/nonparametric/bandwidths.py --- a/statsmodels/nonparametric/bandwidths.py +++ b/statsmodels/nonparametric/bandwidths.py @@ -168,8 +168,10 @@ bw = bw.lower() if bw not in bandwidth_funcs: raise ValueError("Bandwidth %s not understood" ...
{"golden_diff": "diff --git a/statsmodels/nonparametric/bandwidths.py b/statsmodels/nonparametric/bandwidths.py\n--- a/statsmodels/nonparametric/bandwidths.py\n+++ b/statsmodels/nonparametric/bandwidths.py\n@@ -168,8 +168,10 @@\n bw = bw.lower()\n if bw not in bandwidth_funcs:\n raise ValueError(\"Bandw...
2,009
223
gh_patches_debug_2714
rasdani/github-patches
git_diff
sanic-org__sanic-1397
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Logger not work. **Describe the bug** Logger did not work at current master commit (https://github.com/huge-success/sanic/commit/7d79a86d4dc48de11cd34e8ba12e41f3a9f9ff18). **Code snippet** ```python f...
diff --git a/sanic/log.py b/sanic/log.py --- a/sanic/log.py +++ b/sanic/log.py @@ -6,7 +6,7 @@ version=1, disable_existing_loggers=False, loggers={ - "root": {"level": "INFO", "handlers": ["console"]}, + "sanic.root": {"level": "INFO", "handlers": ["console"]}, "sanic.error": { ...
{"golden_diff": "diff --git a/sanic/log.py b/sanic/log.py\n--- a/sanic/log.py\n+++ b/sanic/log.py\n@@ -6,7 +6,7 @@\n version=1,\n disable_existing_loggers=False,\n loggers={\n- \"root\": {\"level\": \"INFO\", \"handlers\": [\"console\"]},\n+ \"sanic.root\": {\"level\": \"INFO\", \"handlers\": ...
1,273
114
gh_patches_debug_1097
rasdani/github-patches
git_diff
openfun__richie-290
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Person plugin form list every pages, not only Person pages ## Bug Report **Expected behavior/code** Select box in PersonPlugin form should list only extended page with Person model. **Actual Behavior**...
diff --git a/src/richie/apps/persons/models.py b/src/richie/apps/persons/models.py --- a/src/richie/apps/persons/models.py +++ b/src/richie/apps/persons/models.py @@ -86,7 +86,7 @@ to their Person instance """ - page = models.ForeignKey(Page) + page = models.ForeignKey(Page, limit_choices_to={"person_...
{"golden_diff": "diff --git a/src/richie/apps/persons/models.py b/src/richie/apps/persons/models.py\n--- a/src/richie/apps/persons/models.py\n+++ b/src/richie/apps/persons/models.py\n@@ -86,7 +86,7 @@\n to their Person instance\n \"\"\"\n \n- page = models.ForeignKey(Page)\n+ page = models.ForeignKey(Page...
1,238
110
gh_patches_debug_9198
rasdani/github-patches
git_diff
sotetsuk__pgx-792
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [Docs] Add PyPI description Currently, it's empty. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `setup.py...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -1,10 +1,14 @@ from setuptools import find_packages, setup +from pathlib import Path + +long_description = (Path(__file__).parent / "README.md").read_text() setup( name="pgx", version="0.4.0", - long_description_content_type="text/markdo...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -1,10 +1,14 @@\n from setuptools import find_packages, setup\n+from pathlib import Path\n+\n+long_description = (Path(__file__).parent / \"README.md\").read_text()\n \n setup(\n name=\"pgx\",\n version=\"0.4.0\",\n- long_de...
513
171
gh_patches_debug_27075
rasdani/github-patches
git_diff
chainer__chainer-478
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Bug: Reshape() with -1 fails When calling the chainer function Reshape() with a -1 value (e.g. Reshape((-1, 10, 10))) I get an error: ``` InvalidType: Expect: prod(in_types[0].shape) == prod((-1, 10, 10)) A...
diff --git a/chainer/functions/array/reshape.py b/chainer/functions/array/reshape.py --- a/chainer/functions/array/reshape.py +++ b/chainer/functions/array/reshape.py @@ -1,10 +1,12 @@ -import numpy - from chainer import function from chainer.utils import type_check -_type_check_prod = type_check.Variable(numpy.p...
{"golden_diff": "diff --git a/chainer/functions/array/reshape.py b/chainer/functions/array/reshape.py\n--- a/chainer/functions/array/reshape.py\n+++ b/chainer/functions/array/reshape.py\n@@ -1,10 +1,12 @@\n-import numpy\n-\n from chainer import function\n from chainer.utils import type_check\n \n \n-_type_check_prod = ...
795
394
gh_patches_debug_13895
rasdani/github-patches
git_diff
ethereum__web3.py-2587
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Web3 instantiation from subclass throws error * Version: 5.30.0 * Python: 3.8 * OS: osx * pip freeze output is intentionally omitted. ### What was wrong? We use a sub-class of Web3, for the purpose of ...
diff --git a/web3/_utils/module.py b/web3/_utils/module.py --- a/web3/_utils/module.py +++ b/web3/_utils/module.py @@ -55,9 +55,13 @@ "already has an attribute with that name" ) - # The parent module is the ``Web3`` instance on first run of the loop - if type(parent_module)...
{"golden_diff": "diff --git a/web3/_utils/module.py b/web3/_utils/module.py\n--- a/web3/_utils/module.py\n+++ b/web3/_utils/module.py\n@@ -55,9 +55,13 @@\n \"already has an attribute with that name\"\n )\n \n- # The parent module is the ``Web3`` instance on first run of the loop\n- ...
1,574
221
gh_patches_debug_1968
rasdani/github-patches
git_diff
hylang__hy-358
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Allow macros to return None ``` (defmacro foo []) (foo) ``` Will break as macros are not handling the NoneType yet --- END ISSUE --- Below are some code segments, each from a relevant file. One or more...
diff --git a/hy/macros.py b/hy/macros.py --- a/hy/macros.py +++ b/hy/macros.py @@ -84,7 +84,8 @@ complex: HyComplex, str_type: HyString, dict: lambda d: HyDict(_wrap_value(x) for x in sum(d.items(), ())), - list: lambda l: HyList(_wrap_value(x) for x in l) + list: lambda l: HyList(_wrap_value(x) fo...
{"golden_diff": "diff --git a/hy/macros.py b/hy/macros.py\n--- a/hy/macros.py\n+++ b/hy/macros.py\n@@ -84,7 +84,8 @@\n complex: HyComplex,\n str_type: HyString,\n dict: lambda d: HyDict(_wrap_value(x) for x in sum(d.items(), ())),\n- list: lambda l: HyList(_wrap_value(x) for x in l)\n+ list: lambda l:...
1,829
131
gh_patches_debug_13579
rasdani/github-patches
git_diff
chainer__chainer-2234
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Wrong behavior of SerialIterator if dataset is numpy array. In `serial_iterator.py` lines [66](https://github.com/pfnet/chainer/blob/master/chainer/iterators/serial_iterator.py#L66) and [68](https://github.co...
diff --git a/chainer/iterators/serial_iterator.py b/chainer/iterators/serial_iterator.py --- a/chainer/iterators/serial_iterator.py +++ b/chainer/iterators/serial_iterator.py @@ -63,10 +63,10 @@ numpy.random.shuffle(self._order) if rest > 0: if self._order is N...
{"golden_diff": "diff --git a/chainer/iterators/serial_iterator.py b/chainer/iterators/serial_iterator.py\n--- a/chainer/iterators/serial_iterator.py\n+++ b/chainer/iterators/serial_iterator.py\n@@ -63,10 +63,10 @@\n numpy.random.shuffle(self._order)\n if rest > 0:\n ...
1,474
164
gh_patches_debug_39730
rasdani/github-patches
git_diff
carpentries__amy-351
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Deal with breadcrumbs As Greg mentioned in #296, he hadn't liked the way breadcrumbs repeat current page title (or header) in their last element, for example: page "Event 2015-05-25-something" will have bread...
diff --git a/workshops/templatetags/breadcrumbs.py b/workshops/templatetags/breadcrumbs.py deleted file mode 100644 --- a/workshops/templatetags/breadcrumbs.py +++ /dev/null @@ -1,128 +0,0 @@ -import logging - -from django import template -from django.core.urlresolvers import reverse -from django.utils.encoding import ...
{"golden_diff": "diff --git a/workshops/templatetags/breadcrumbs.py b/workshops/templatetags/breadcrumbs.py\ndeleted file mode 100644\n--- a/workshops/templatetags/breadcrumbs.py\n+++ /dev/null\n@@ -1,128 +0,0 @@\n-import logging\n-\n-from django import template\n-from django.core.urlresolvers import reverse\n-from dja...
1,608
950
gh_patches_debug_25587
rasdani/github-patches
git_diff
vllm-project__vllm-148
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Documentation on running basic python server and FastAPI server --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- P...
diff --git a/vllm/outputs.py b/vllm/outputs.py --- a/vllm/outputs.py +++ b/vllm/outputs.py @@ -4,6 +4,18 @@ class CompletionOutput: + """The output data of one completion output of a request. + + Args: + index: The index of the output in the request. + text: The generated output text. + ...
{"golden_diff": "diff --git a/vllm/outputs.py b/vllm/outputs.py\n--- a/vllm/outputs.py\n+++ b/vllm/outputs.py\n@@ -4,6 +4,18 @@\n \n \n class CompletionOutput:\n+ \"\"\"The output data of one completion output of a request.\n+\n+ Args:\n+ index: The index of the output in the request.\n+ text: The g...
1,137
360
gh_patches_debug_22017
rasdani/github-patches
git_diff
facebookresearch__CompilerGym-563
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `statistics.py` wrong parameter name ## 🐛 Bug The functions [here](https://github.com/facebookresearch/CompilerGym/blob/e248330d2475fbcdf473cc3df951f25b5eaf4945/compiler_gym/util/statistics.py#L8) says th...
diff --git a/compiler_gym/util/statistics.py b/compiler_gym/util/statistics.py --- a/compiler_gym/util/statistics.py +++ b/compiler_gym/util/statistics.py @@ -5,9 +5,9 @@ import numpy as np -def geometric_mean(iterable): +def geometric_mean(array_like): """Zero-length-safe geometric mean.""" - values = np....
{"golden_diff": "diff --git a/compiler_gym/util/statistics.py b/compiler_gym/util/statistics.py\n--- a/compiler_gym/util/statistics.py\n+++ b/compiler_gym/util/statistics.py\n@@ -5,9 +5,9 @@\n import numpy as np\n \n \n-def geometric_mean(iterable):\n+def geometric_mean(array_like):\n \"\"\"Zero-length-safe geometr...
723
260
gh_patches_debug_42303
rasdani/github-patches
git_diff
sublimelsp__LSP-1690
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Format JSON on save Is there a way to get this LSP to format json files ons save? It works for other LSPs but just not JSON, Here are my configs: Preferences ``` { ... "lsp_format_on_sav...
diff --git a/plugin/formatting.py b/plugin/formatting.py --- a/plugin/formatting.py +++ b/plugin/formatting.py @@ -1,9 +1,11 @@ from .core.edit import parse_text_edit +from .core.promise import Promise +from .core.protocol import Error from .core.protocol import TextEdit from .core.registry import LspTextCommand fr...
{"golden_diff": "diff --git a/plugin/formatting.py b/plugin/formatting.py\n--- a/plugin/formatting.py\n+++ b/plugin/formatting.py\n@@ -1,9 +1,11 @@\n from .core.edit import parse_text_edit\n+from .core.promise import Promise\n+from .core.protocol import Error\n from .core.protocol import TextEdit\n from .core.registry ...
1,775
847
gh_patches_debug_23027
rasdani/github-patches
git_diff
mirumee__ariadne-172
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Unbound enum values are None when used in arguments When used as a mutation input, enum parameter should be `str`, but actually is `None`. ```python def test_executing_mutation_takes_enum(): type_def...
diff --git a/ariadne/enums.py b/ariadne/enums.py --- a/ariadne/enums.py +++ b/ariadne/enums.py @@ -37,3 +37,15 @@ "%s is defined in the schema, but it is instance of %s (expected %s)" % (self.name, type(graphql_type).__name__, GraphQLEnumType.__name__) ) + + +def set_defau...
{"golden_diff": "diff --git a/ariadne/enums.py b/ariadne/enums.py\n--- a/ariadne/enums.py\n+++ b/ariadne/enums.py\n@@ -37,3 +37,15 @@\n \"%s is defined in the schema, but it is instance of %s (expected %s)\"\n % (self.name, type(graphql_type).__name__, GraphQLEnumType.__name__)\n ...
1,296
329
gh_patches_debug_11707
rasdani/github-patches
git_diff
elastic__ecs-1164
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Incorrect output of the "tracing" fields in the Beats yml file Just like the `base` fields, the `tracing` fields are not nested under the name of the field set. So it's not `base.@timestamp`, it's `@timestamp...
diff --git a/scripts/generators/beats.py b/scripts/generators/beats.py --- a/scripts/generators/beats.py +++ b/scripts/generators/beats.py @@ -17,6 +17,11 @@ continue fieldset = ecs_nested[fieldset_name] + # Handle when `root:true` + if fieldset.get('root', False): + bea...
{"golden_diff": "diff --git a/scripts/generators/beats.py b/scripts/generators/beats.py\n--- a/scripts/generators/beats.py\n+++ b/scripts/generators/beats.py\n@@ -17,6 +17,11 @@\n continue\n fieldset = ecs_nested[fieldset_name]\n \n+ # Handle when `root:true`\n+ if fieldset.get('root',...
1,461
166
gh_patches_debug_34022
rasdani/github-patches
git_diff
scrapy__scrapy-594
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- engine status util references removed engine.slots attribute ``` Traceback (most recent call last): Less File "/usr/lib/pymodules/python2.7/scrapy/xlib/pydispatch/robustapply.py", line 54, in robustAppl...
diff --git a/scrapy/utils/engine.py b/scrapy/utils/engine.py --- a/scrapy/utils/engine.py +++ b/scrapy/utils/engine.py @@ -5,14 +5,13 @@ def get_engine_status(engine): """Return a report of the current engine status""" - global_tests = [ + tests = [ "time()-engine.start_time", "engine.ha...
{"golden_diff": "diff --git a/scrapy/utils/engine.py b/scrapy/utils/engine.py\n--- a/scrapy/utils/engine.py\n+++ b/scrapy/utils/engine.py\n@@ -5,14 +5,13 @@\n \n def get_engine_status(engine):\n \"\"\"Return a report of the current engine status\"\"\"\n- global_tests = [\n+ tests = [\n \"time()-engine...
1,208
551
gh_patches_debug_26859
rasdani/github-patches
git_diff
SeldonIO__MLServer-850
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- MLServer to hide http health request logs to avoid polluting the logs As part of the Seldon Core addition https://github.com/SeldonIO/seldon-core/pull/4028 which moves the TCP ready checks into proper HTTP re...
diff --git a/mlserver/rest/logging.py b/mlserver/rest/logging.py --- a/mlserver/rest/logging.py +++ b/mlserver/rest/logging.py @@ -1,4 +1,35 @@ import logging + +class HealthEndpointFilter(logging.Filter): + """ + Filter to avoid logging health endpoints. + From: + https://github.com/encode/starlette...
{"golden_diff": "diff --git a/mlserver/rest/logging.py b/mlserver/rest/logging.py\n--- a/mlserver/rest/logging.py\n+++ b/mlserver/rest/logging.py\n@@ -1,4 +1,35 @@\n import logging\n \n+\n+class HealthEndpointFilter(logging.Filter):\n+ \"\"\"\n+ Filter to avoid logging health endpoints.\n+ From:\n+ http...
1,279
424
gh_patches_debug_23720
rasdani/github-patches
git_diff
ivy-llc__ivy-22870
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- lstsq --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `ivy/functional/frontends/jax/numpy/linalg.py` Conten...
diff --git a/ivy/functional/frontends/jax/numpy/linalg.py b/ivy/functional/frontends/jax/numpy/linalg.py --- a/ivy/functional/frontends/jax/numpy/linalg.py +++ b/ivy/functional/frontends/jax/numpy/linalg.py @@ -4,6 +4,7 @@ from ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_back from ivy.func_wrap...
{"golden_diff": "diff --git a/ivy/functional/frontends/jax/numpy/linalg.py b/ivy/functional/frontends/jax/numpy/linalg.py\n--- a/ivy/functional/frontends/jax/numpy/linalg.py\n+++ b/ivy/functional/frontends/jax/numpy/linalg.py\n@@ -4,6 +4,7 @@\n from ivy.functional.frontends.jax.func_wrapper import to_ivy_arrays_and_bac...
1,508
404
gh_patches_debug_3684
rasdani/github-patches
git_diff
napari__napari-5474
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Visual Bug: Labels Layer Controls get squished when toggling 3D ## 🐛 Bug When toggling to 3D, the labels layer Layer Controls widget gains an extra line `rendering`. However the widget doesn't resize for...
diff --git a/napari/_qt/layer_controls/qt_layer_controls_container.py b/napari/_qt/layer_controls/qt_layer_controls_container.py --- a/napari/_qt/layer_controls/qt_layer_controls_container.py +++ b/napari/_qt/layer_controls/qt_layer_controls_container.py @@ -101,6 +101,7 @@ self.setMouseTracking(True) ...
{"golden_diff": "diff --git a/napari/_qt/layer_controls/qt_layer_controls_container.py b/napari/_qt/layer_controls/qt_layer_controls_container.py\n--- a/napari/_qt/layer_controls/qt_layer_controls_container.py\n+++ b/napari/_qt/layer_controls/qt_layer_controls_container.py\n@@ -101,6 +101,7 @@\n \n self.setMous...
1,945
125
gh_patches_debug_10802
rasdani/github-patches
git_diff
interlegis__sapl-2147
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Audiências Públicas sem possibilidade de Edição Ao criar uma Audiência Pública e salva-la, não aparecem os metadados da matéria legislativa inseridas no preenchimento. Ao clicar em Editar, só aparece o tít...
diff --git a/sapl/audiencia/views.py b/sapl/audiencia/views.py --- a/sapl/audiencia/views.py +++ b/sapl/audiencia/views.py @@ -34,9 +34,10 @@ def get_initial(self): initial = super(UpdateView, self).get_initial() - initial['tipo_materia'] = self.object.materia.tipo.id - ini...
{"golden_diff": "diff --git a/sapl/audiencia/views.py b/sapl/audiencia/views.py\n--- a/sapl/audiencia/views.py\n+++ b/sapl/audiencia/views.py\n@@ -34,9 +34,10 @@\n \n def get_initial(self):\n initial = super(UpdateView, self).get_initial()\n- initial['tipo_materia'] = self.object.materia....
788
188
gh_patches_debug_5571
rasdani/github-patches
git_diff
certbot__certbot-6099
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- certbot-nginx requires acme >= 0.25 Because of the import of symbols `from acme.magic_typing`, the nginx plugin released in 0.25 depends on acme 0.25 or better. However, setup.py only lists `acme>0.21.1`, le...
diff --git a/certbot-nginx/setup.py b/certbot-nginx/setup.py --- a/certbot-nginx/setup.py +++ b/certbot-nginx/setup.py @@ -7,10 +7,7 @@ # Remember to update local-oldest-requirements.txt when changing the minimum # acme/certbot version. install_requires = [ - # This plugin works with an older version of acme, but...
{"golden_diff": "diff --git a/certbot-nginx/setup.py b/certbot-nginx/setup.py\n--- a/certbot-nginx/setup.py\n+++ b/certbot-nginx/setup.py\n@@ -7,10 +7,7 @@\n # Remember to update local-oldest-requirements.txt when changing the minimum\n # acme/certbot version.\n install_requires = [\n- # This plugin works with an ol...
1,038
182
gh_patches_debug_20003
rasdani/github-patches
git_diff
searx__searx-925
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add a software categorie and add the Free software directory search engine Shame on me I forgot to ask this. I am a volunteer on the [FSD](https://directory.fsf.org/wiki/Main_Page) (Free software directory) ...
diff --git a/searx/engines/mediawiki.py b/searx/engines/mediawiki.py --- a/searx/engines/mediawiki.py +++ b/searx/engines/mediawiki.py @@ -21,6 +21,7 @@ language_support = True paging = True number_of_results = 1 +search_type = 'nearmatch' # possible values: title, text, nearmatch # search-url base_url = 'https:...
{"golden_diff": "diff --git a/searx/engines/mediawiki.py b/searx/engines/mediawiki.py\n--- a/searx/engines/mediawiki.py\n+++ b/searx/engines/mediawiki.py\n@@ -21,6 +21,7 @@\n language_support = True\n paging = True\n number_of_results = 1\n+search_type = 'nearmatch' # possible values: title, text, nearmatch\n \n # sear...
1,112
258
gh_patches_debug_6063
rasdani/github-patches
git_diff
openstates__openstates-scrapers-1627
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- MI scraper failing since at least 2017-04-01 MI has been failing since 2017-04-01 Based on automated runs it appears that MI has not run successfully in 5 days (2017-04-01). ``` 06:00:31 INFO billy: bill...
diff --git a/openstates/mi/legislators.py b/openstates/mi/legislators.py --- a/openstates/mi/legislators.py +++ b/openstates/mi/legislators.py @@ -73,7 +73,7 @@ self.save_legislator(leg) def scrape_upper(self, chamber, term): - url = 'http://www.senate.michigan.gov/senatorinfo.html' + ...
{"golden_diff": "diff --git a/openstates/mi/legislators.py b/openstates/mi/legislators.py\n--- a/openstates/mi/legislators.py\n+++ b/openstates/mi/legislators.py\n@@ -73,7 +73,7 @@\n self.save_legislator(leg)\n \n def scrape_upper(self, chamber, term):\n- url = 'http://www.senate.michigan.gov/sen...
2,042
159
gh_patches_debug_25714
rasdani/github-patches
git_diff
mkdocs__mkdocs-443
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `mkdocs new` broken under python2 current master, python 2.7.9 virtualenv only top directory and mkdocs.yml created, no docs dir or index.md ``` (karasu)[lashni@orphan src]$ mkdocs new karasu Creating projec...
diff --git a/mkdocs/main.py b/mkdocs/main.py --- a/mkdocs/main.py +++ b/mkdocs/main.py @@ -55,7 +55,7 @@ build(config, clean_site_dir=clean_site_dir) gh_deploy(config) elif cmd == 'new': - new(args, options) + new(args) else: print('MkDocs (version {0})'.format(__versi...
{"golden_diff": "diff --git a/mkdocs/main.py b/mkdocs/main.py\n--- a/mkdocs/main.py\n+++ b/mkdocs/main.py\n@@ -55,7 +55,7 @@\n build(config, clean_site_dir=clean_site_dir)\n gh_deploy(config)\n elif cmd == 'new':\n- new(args, options)\n+ new(args)\n else:\n print('MkDocs (v...
1,816
346
gh_patches_debug_63962
rasdani/github-patches
git_diff
redis__redis-py-1678
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- CI run to install the built package In light of bug #1645 we should amend our CI run to install the built package, in a new virtual env and run something simple like a redis.Redis().ping(). Eventually we cou...
diff --git a/tasks.py b/tasks.py --- a/tasks.py +++ b/tasks.py @@ -56,4 +56,4 @@ @task def package(c): """Create the python packages""" - run("python setup.py build install") + run("python setup.py sdist bdist_wheel")
{"golden_diff": "diff --git a/tasks.py b/tasks.py\n--- a/tasks.py\n+++ b/tasks.py\n@@ -56,4 +56,4 @@\n @task\n def package(c):\n \"\"\"Create the python packages\"\"\"\n- run(\"python setup.py build install\")\n+ run(\"python setup.py sdist bdist_wheel\")\n", "issue": "CI run to install the built package\nIn ...
849
69
gh_patches_debug_32160
rasdani/github-patches
git_diff
alltheplaces__alltheplaces-3322
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Spider holiday_stationstores is broken During the global build at 2021-08-18-14-42-26, spider **holiday_stationstores** failed with **552 features** and **10 errors**. Here's [the log](https://data.allthepla...
diff --git a/locations/spiders/holiday_stationstores.py b/locations/spiders/holiday_stationstores.py --- a/locations/spiders/holiday_stationstores.py +++ b/locations/spiders/holiday_stationstores.py @@ -31,6 +31,8 @@ store = response.meta['store'] address = response.xpath('//div[@class="col-lg-4 col...
{"golden_diff": "diff --git a/locations/spiders/holiday_stationstores.py b/locations/spiders/holiday_stationstores.py\n--- a/locations/spiders/holiday_stationstores.py\n+++ b/locations/spiders/holiday_stationstores.py\n@@ -31,6 +31,8 @@\n store = response.meta['store']\n \n address = response.xpath('//d...
2,040
407
gh_patches_debug_1769
rasdani/github-patches
git_diff
googleapis__google-auth-library-python-697
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Missing pyOpenSSL Dependency Thanks for stopping by to let us know something could be better! **PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](ht...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -29,7 +29,10 @@ "six>=1.9.0", ) -extras = {"aiohttp": "aiohttp >= 3.6.2, < 4.0.0dev; python_version>='3.6'"} +extras = { + "aiohttp": "aiohttp >= 3.6.2, < 4.0.0dev; python_version>='3.6'", + "pyopenssl": "pyopenssl>=20.0.0", +} with io.o...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -29,7 +29,10 @@\n \"six>=1.9.0\",\n )\n \n-extras = {\"aiohttp\": \"aiohttp >= 3.6.2, < 4.0.0dev; python_version>='3.6'\"}\n+extras = {\n+ \"aiohttp\": \"aiohttp >= 3.6.2, < 4.0.0dev; python_version>='3.6'\",\n+ \"pyopenssl\...
1,351
164
gh_patches_debug_12271
rasdani/github-patches
git_diff
cloud-custodian__cloud-custodian-3464
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Tagging CloudFormation - Error: Parameters must have value Initially the stack is created with an input parameter. **c7n policy** ``` policies: - name: add-cfn-tag resource: cfn filters: ...
diff --git a/c7n/resources/cfn.py b/c7n/resources/cfn.py --- a/c7n/resources/cfn.py +++ b/c7n/resources/cfn.py @@ -145,9 +145,14 @@ self.manager.session_factory).client('cloudformation') def _tag_stacks(s): + params = [] + for p in s.get('Parameters', []): + ...
{"golden_diff": "diff --git a/c7n/resources/cfn.py b/c7n/resources/cfn.py\n--- a/c7n/resources/cfn.py\n+++ b/c7n/resources/cfn.py\n@@ -145,9 +145,14 @@\n self.manager.session_factory).client('cloudformation')\n \n def _tag_stacks(s):\n+ params = []\n+ for p in s.get('Parameters...
2,041
157
gh_patches_debug_235
rasdani/github-patches
git_diff
scikit-hep__pyhf-1460
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Logging configuration in contrib/utils # Question `pyhf.contrib.utils` sets up logging: https://github.com/scikit-hep/pyhf/blob/6b769fd6f5e1473deba2b4c55d49ebdb3db5b447/src/pyhf/contrib/utils.py#L9 Th...
diff --git a/src/pyhf/contrib/utils.py b/src/pyhf/contrib/utils.py --- a/src/pyhf/contrib/utils.py +++ b/src/pyhf/contrib/utils.py @@ -6,7 +6,6 @@ import logging from .. import exceptions -logging.basicConfig() log = logging.getLogger(__name__) __all__ = ["download"]
{"golden_diff": "diff --git a/src/pyhf/contrib/utils.py b/src/pyhf/contrib/utils.py\n--- a/src/pyhf/contrib/utils.py\n+++ b/src/pyhf/contrib/utils.py\n@@ -6,7 +6,6 @@\n import logging\n from .. import exceptions\n \n-logging.basicConfig()\n log = logging.getLogger(__name__)\n \n __all__ = [\"download\"]\n", "issue": "L...
1,550
77
gh_patches_debug_8585
rasdani/github-patches
git_diff
scrapy__scrapy-4759
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add a job for Python 3.9 to .travis.yml It looks like Travis support specifying such a Python version as `3.9-dev`. While I’m not sure we should officially support Python 3.9 it until its release, running ...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -85,6 +85,7 @@ 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Programming Language :: Pytho...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -85,6 +85,7 @@\n 'Programming Language :: Python :: 3.6',\n 'Programming Language :: Python :: 3.7',\n 'Programming Language :: Python :: 3.8',\n+ 'Programming Language :: Python :: 3.9',\n 'Prog...
1,398
115
gh_patches_debug_1345
rasdani/github-patches
git_diff
castorini__pyserini-667
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Switch to jnius_config.add_classpath Currently, pyserini replaces any previously registered jars on the classpath in its setup code. Is there any reason to not use add_classpath() instead of set_classpath()? ...
diff --git a/pyserini/setup.py b/pyserini/setup.py --- a/pyserini/setup.py +++ b/pyserini/setup.py @@ -37,4 +37,4 @@ raise Exception('No matching jar file found in {}'.format(os.path.abspath(anserini_root))) latest = max(paths, key=os.path.getctime) - jnius_config.set_classpath(latest) + jnius_con...
{"golden_diff": "diff --git a/pyserini/setup.py b/pyserini/setup.py\n--- a/pyserini/setup.py\n+++ b/pyserini/setup.py\n@@ -37,4 +37,4 @@\n raise Exception('No matching jar file found in {}'.format(os.path.abspath(anserini_root)))\n \n latest = max(paths, key=os.path.getctime)\n- jnius_config.set_classpat...
803
101
gh_patches_debug_21488
rasdani/github-patches
git_diff
WeblateOrg__weblate-10189
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- "Add missing languages" add-on not working ### Describe the issue I have enabled the "Add missing languages" add-on on https://hosted.weblate.org/projects/catima/. However, despite waiting over 24 hours as t...
diff --git a/weblate/addons/consistency.py b/weblate/addons/consistency.py --- a/weblate/addons/consistency.py +++ b/weblate/addons/consistency.py @@ -2,13 +2,11 @@ # # SPDX-License-Identifier: GPL-3.0-or-later -from django.db.models import Q from django.utils.translation import gettext_lazy from weblate.addons...
{"golden_diff": "diff --git a/weblate/addons/consistency.py b/weblate/addons/consistency.py\n--- a/weblate/addons/consistency.py\n+++ b/weblate/addons/consistency.py\n@@ -2,13 +2,11 @@\n #\n # SPDX-License-Identifier: GPL-3.0-or-later\n \n-from django.db.models import Q\n from django.utils.translation import gettext_la...
1,015
242
gh_patches_debug_3297
rasdani/github-patches
git_diff
liberapay__liberapay.com-1484
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Requests access to GitHub private repos? Hi. I'm a brand-new user. I have a question I didn't see in the FAQ or when I searched issues here. I was going to connect my GitHub account and saw this: > Libe...
diff --git a/liberapay/elsewhere/github.py b/liberapay/elsewhere/github.py --- a/liberapay/elsewhere/github.py +++ b/liberapay/elsewhere/github.py @@ -18,7 +18,6 @@ auth_url = 'https://github.com/login/oauth/authorize' access_token_url = 'https://github.com/login/oauth/access_token' oauth_email_scope = '...
{"golden_diff": "diff --git a/liberapay/elsewhere/github.py b/liberapay/elsewhere/github.py\n--- a/liberapay/elsewhere/github.py\n+++ b/liberapay/elsewhere/github.py\n@@ -18,7 +18,6 @@\n auth_url = 'https://github.com/login/oauth/authorize'\n access_token_url = 'https://github.com/login/oauth/access_token'\n ...
1,425
123
gh_patches_debug_7347
rasdani/github-patches
git_diff
wagtail__wagtail-10645
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- 🎛️ Migrate header search Stimulus Controller > ℹ️ **Part of the [Stimulus 🎛️ RFC 78](https://github.com/wagtail/rfcs/pull/78)** ### Is your proposal related to a problem? We have a core.js implementa...
diff --git a/wagtail/admin/forms/search.py b/wagtail/admin/forms/search.py --- a/wagtail/admin/forms/search.py +++ b/wagtail/admin/forms/search.py @@ -7,7 +7,10 @@ def __init__(self, *args, **kwargs): placeholder = kwargs.pop("placeholder", _("Search")) super().__init__(*args, **kwargs) - ...
{"golden_diff": "diff --git a/wagtail/admin/forms/search.py b/wagtail/admin/forms/search.py\n--- a/wagtail/admin/forms/search.py\n+++ b/wagtail/admin/forms/search.py\n@@ -7,7 +7,10 @@\n def __init__(self, *args, **kwargs):\n placeholder = kwargs.pop(\"placeholder\", _(\"Search\"))\n super().__init__...
1,372
149
gh_patches_debug_23092
rasdani/github-patches
git_diff
freedomofpress__securedrop-6430
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Tor2web warning page still using outdated pre-SI-redesign resources ## Description In the SI redesign, we overlooked the Tor2web page which tries to render an old location for the icon and does not show an...
diff --git a/securedrop/source_app/info.py b/securedrop/source_app/info.py --- a/securedrop/source_app/info.py +++ b/securedrop/source_app/info.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- import flask -from flask import Blueprint, render_template, send_file, redirect, url_for, flash +from flask import Blueprint, rende...
{"golden_diff": "diff --git a/securedrop/source_app/info.py b/securedrop/source_app/info.py\n--- a/securedrop/source_app/info.py\n+++ b/securedrop/source_app/info.py\n@@ -1,6 +1,6 @@\n # -*- coding: utf-8 -*-\n import flask\n-from flask import Blueprint, render_template, send_file, redirect, url_for, flash\n+from flask...
1,037
270
gh_patches_debug_10569
rasdani/github-patches
git_diff
gratipay__gratipay.com-2047
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Username change fails silently When you change your username, you're querying [`username.json.spt`](https://github.com/gittip/www.gittip.com/blob/0464c57465aed49a95a2c546f0d9987ad5b9b3fa/www/%25username/usern...
diff --git a/gittip/exceptions.py b/gittip/exceptions.py --- a/gittip/exceptions.py +++ b/gittip/exceptions.py @@ -18,10 +18,8 @@ class UsernameTooLong(ProblemChangingUsername): msg = "The username '{}' is too long." -# Not passing the potentially unicode characters back because of: -# https://github.com/gittip...
{"golden_diff": "diff --git a/gittip/exceptions.py b/gittip/exceptions.py\n--- a/gittip/exceptions.py\n+++ b/gittip/exceptions.py\n@@ -18,10 +18,8 @@\n class UsernameTooLong(ProblemChangingUsername):\n msg = \"The username '{}' is too long.\"\n \n-# Not passing the potentially unicode characters back because of:\n-...
954
153
gh_patches_debug_60356
rasdani/github-patches
git_diff
blaze__blaze-1037
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- cytoolz is required to import blaze, but it's not listed in requirements_strict.txt In a fresh virtualenv, `pip install blaze && python -c "import blaze"` fails with: ``` Traceback (most recent call last): ...
diff --git a/blaze/utils.py b/blaze/utils.py --- a/blaze/utils.py +++ b/blaze/utils.py @@ -4,7 +4,11 @@ import datetime from functools import wraps -from cytoolz import nth +try: + from cytoolz import nth +except ImportError: + from toolz import nth + from itertools import islice from collections import Ite...
{"golden_diff": "diff --git a/blaze/utils.py b/blaze/utils.py\n--- a/blaze/utils.py\n+++ b/blaze/utils.py\n@@ -4,7 +4,11 @@\n import datetime\n from functools import wraps\n \n-from cytoolz import nth\n+try:\n+ from cytoolz import nth\n+except ImportError:\n+ from toolz import nth\n+\n from itertools import islic...
1,901
96
gh_patches_debug_47848
rasdani/github-patches
git_diff
bookwyrm-social__bookwyrm-404
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Rate stars don't work You should be able to click to give a star rating to a book on the book page, it doesn't do anything. --- END ISSUE --- Below are some code segments, each from a relevant file. One or ...
diff --git a/bookwyrm/activitypub/note.py b/bookwyrm/activitypub/note.py --- a/bookwyrm/activitypub/note.py +++ b/bookwyrm/activitypub/note.py @@ -53,7 +53,7 @@ @dataclass(init=False) class Review(Comment): ''' a full book review ''' - name: str + name: str = None rating: int = None type: str = '...
{"golden_diff": "diff --git a/bookwyrm/activitypub/note.py b/bookwyrm/activitypub/note.py\n--- a/bookwyrm/activitypub/note.py\n+++ b/bookwyrm/activitypub/note.py\n@@ -53,7 +53,7 @@\n @dataclass(init=False)\n class Review(Comment):\n ''' a full book review '''\n- name: str\n+ name: str = None\n rating: int...
811
103
gh_patches_debug_18295
rasdani/github-patches
git_diff
avocado-framework__avocado-5562
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Handle "could not import module" errors gracefully **Describe the bug** Avocado does not handle "could not import module" errors very gracefully, with error messages that are quite cryptic. **Steps to rep...
diff --git a/avocado/core/utils/loader.py b/avocado/core/utils/loader.py --- a/avocado/core/utils/loader.py +++ b/avocado/core/utils/loader.py @@ -30,6 +30,8 @@ :return: an instance of :class:`avocado.core.test.Test`. """ test_class, test_parameters = test_factory + if "run.results_dir" in test_parame...
{"golden_diff": "diff --git a/avocado/core/utils/loader.py b/avocado/core/utils/loader.py\n--- a/avocado/core/utils/loader.py\n+++ b/avocado/core/utils/loader.py\n@@ -30,6 +30,8 @@\n :return: an instance of :class:`avocado.core.test.Test`.\n \"\"\"\n test_class, test_parameters = test_factory\n+ if \"run...
1,522
210
gh_patches_debug_56084
rasdani/github-patches
git_diff
hpcaitech__ColossalAI-5611
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs....
diff --git a/examples/inference/benchmark_ops/benchmark_rmsnorm.py b/examples/inference/benchmark_ops/benchmark_rmsnorm.py --- a/examples/inference/benchmark_ops/benchmark_rmsnorm.py +++ b/examples/inference/benchmark_ops/benchmark_rmsnorm.py @@ -35,7 +35,7 @@ styles=[("red", "-"), ("blue", "-"), ("yellow", "-...
{"golden_diff": "diff --git a/examples/inference/benchmark_ops/benchmark_rmsnorm.py b/examples/inference/benchmark_ops/benchmark_rmsnorm.py\n--- a/examples/inference/benchmark_ops/benchmark_rmsnorm.py\n+++ b/examples/inference/benchmark_ops/benchmark_rmsnorm.py\n@@ -35,7 +35,7 @@\n styles=[(\"red\", \"-\"), (\"...
1,314
154
gh_patches_debug_33315
rasdani/github-patches
git_diff
cookiecutter__cookiecutter-666
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Idea: have a way to specify context via command line Something like repeat arguments: ``` cookiecutter mytemplate -Cname=my-project -Cgithub-user=ionelmc ``` Or maybe the whole json? ``` cookiecutter mytem...
diff --git a/cookiecutter/cli.py b/cookiecutter/cli.py --- a/cookiecutter/cli.py +++ b/cookiecutter/cli.py @@ -38,9 +38,23 @@ return message.format(location, python_version) +def validate_extra_context(ctx, param, value): + for s in value: + if '=' not in s: + raise click.BadParameter( + ...
{"golden_diff": "diff --git a/cookiecutter/cli.py b/cookiecutter/cli.py\n--- a/cookiecutter/cli.py\n+++ b/cookiecutter/cli.py\n@@ -38,9 +38,23 @@\n return message.format(location, python_version)\n \n \n+def validate_extra_context(ctx, param, value):\n+ for s in value:\n+ if '=' not in s:\n+ ra...
1,515
475
gh_patches_debug_4402
rasdani/github-patches
git_diff
aws__aws-cli-1769
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- JSON Cache for AssumeRoleProvider not truncating files When we open a file for writing, if we're reusing the same file (same cache key) we don't truncate the file before writing. If the second JSON response ...
diff --git a/awscli/customizations/assumerole.py b/awscli/customizations/assumerole.py --- a/awscli/customizations/assumerole.py +++ b/awscli/customizations/assumerole.py @@ -80,6 +80,7 @@ os.makedirs(self._working_dir) with os.fdopen(os.open(full_key, os.O_WRONLY |...
{"golden_diff": "diff --git a/awscli/customizations/assumerole.py b/awscli/customizations/assumerole.py\n--- a/awscli/customizations/assumerole.py\n+++ b/awscli/customizations/assumerole.py\n@@ -80,6 +80,7 @@\n os.makedirs(self._working_dir)\n with os.fdopen(os.open(full_key,\n ...
1,201
124
gh_patches_debug_49851
rasdani/github-patches
git_diff
netbox-community__netbox-15890
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- OpenIDC SSO through apache stopped working after update to 3.7.6 ### Deployment Type Self-hosted ### NetBox Version v3.7.6 ### Python Version 3.9 ### Steps to Reproduce This is a longstanding NetBox in...
diff --git a/contrib/gunicorn.py b/contrib/gunicorn.py --- a/contrib/gunicorn.py +++ b/contrib/gunicorn.py @@ -14,3 +14,7 @@ # The maximum number of requests a worker can handle before being respawned max_requests = 5000 max_requests_jitter = 500 + +# Uncomment this line to accept HTTP headers containing underscores...
{"golden_diff": "diff --git a/contrib/gunicorn.py b/contrib/gunicorn.py\n--- a/contrib/gunicorn.py\n+++ b/contrib/gunicorn.py\n@@ -14,3 +14,7 @@\n # The maximum number of requests a worker can handle before being respawned\n max_requests = 5000\n max_requests_jitter = 500\n+\n+# Uncomment this line to accept HTTP heade...
695
124
gh_patches_debug_30377
rasdani/github-patches
git_diff
goauthentik__authentik-2845
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Using 'Have-I-been-pwned' policy breaks flows in Authentik 2022.4.1 **Describe the bug** Using a 'Have-I-been-pwned' policy on a password prompt within a flow breaks the flow. **To Reproduce** Steps to r...
diff --git a/authentik/policies/hibp/models.py b/authentik/policies/hibp/models.py --- a/authentik/policies/hibp/models.py +++ b/authentik/policies/hibp/models.py @@ -9,6 +9,7 @@ from authentik.lib.utils.http import get_http_session from authentik.policies.models import Policy, PolicyResult from authentik.policies.t...
{"golden_diff": "diff --git a/authentik/policies/hibp/models.py b/authentik/policies/hibp/models.py\n--- a/authentik/policies/hibp/models.py\n+++ b/authentik/policies/hibp/models.py\n@@ -9,6 +9,7 @@\n from authentik.lib.utils.http import get_http_session\n from authentik.policies.models import Policy, PolicyResult\n fr...
1,365
346
gh_patches_debug_30742
rasdani/github-patches
git_diff
mathesar-foundation__mathesar-265
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- More filters for table list API **Problem** <!-- Please provide a clear and concise description of the problem that this feature request is designed to solve.--> The table list API should allow filtering. F...
diff --git a/mathesar/filters.py b/mathesar/filters.py --- a/mathesar/filters.py +++ b/mathesar/filters.py @@ -1,5 +1,6 @@ from django_property_filter import ( PropertyFilterSet, PropertyBaseInFilter, PropertyCharFilter, + PropertyDateTimeFromToRangeFilter, PropertyBooleanFilter ) from mathesar.models impo...
{"golden_diff": "diff --git a/mathesar/filters.py b/mathesar/filters.py\n--- a/mathesar/filters.py\n+++ b/mathesar/filters.py\n@@ -1,5 +1,6 @@\n from django_property_filter import (\n PropertyFilterSet, PropertyBaseInFilter, PropertyCharFilter,\n+ PropertyDateTimeFromToRangeFilter, PropertyBooleanFilter\n )\n \n...
1,838
448
gh_patches_debug_19797
rasdani/github-patches
git_diff
DataDog__dd-trace-py-4220
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `ddtrace.opentracer` incorrectly raises `SpanContextCorruptedException` on `extract` of missing span context The documentation for `SpanContextCorruptedException` [says](https://opentracing-python.readthedocs...
diff --git a/ddtrace/opentracer/propagation/http.py b/ddtrace/opentracer/propagation/http.py --- a/ddtrace/opentracer/propagation/http.py +++ b/ddtrace/opentracer/propagation/http.py @@ -1,7 +1,6 @@ from typing import Dict from opentracing import InvalidCarrierException -from opentracing import SpanContextCorrupted...
{"golden_diff": "diff --git a/ddtrace/opentracer/propagation/http.py b/ddtrace/opentracer/propagation/http.py\n--- a/ddtrace/opentracer/propagation/http.py\n+++ b/ddtrace/opentracer/propagation/http.py\n@@ -1,7 +1,6 @@\n from typing import Dict\n \n from opentracing import InvalidCarrierException\n-from opentracing imp...
1,742
240
gh_patches_debug_15487
rasdani/github-patches
git_diff
mkdocs__mkdocs-3511
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Building MkDocs' documentation When I began working on #3493 I needed to be able to run the dev server with MkDocs' own documentation, which was more difficult than it should have been. First, let me say t...
diff --git a/docs/hooks.py b/docs/hooks.py --- a/docs/hooks.py +++ b/docs/hooks.py @@ -1,8 +1,12 @@ +from __future__ import annotations + import re from pathlib import Path +from typing import TYPE_CHECKING -from mkdocs.config.defaults import MkDocsConfig -from mkdocs.structure.nav import Page +if TYPE_CHECKING: + ...
{"golden_diff": "diff --git a/docs/hooks.py b/docs/hooks.py\n--- a/docs/hooks.py\n+++ b/docs/hooks.py\n@@ -1,8 +1,12 @@\n+from __future__ import annotations\n+\n import re\n from pathlib import Path\n+from typing import TYPE_CHECKING\n \n-from mkdocs.config.defaults import MkDocsConfig\n-from mkdocs.structure.nav impor...
1,179
220
gh_patches_debug_300
rasdani/github-patches
git_diff
mlcommons__GaNDLF-477
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add histology exception tests **Is your feature request related to a problem? Please describe.** Currently, the histology inference pipeline contains a lot of exceptions, but they aren't being tested. **D...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -67,7 +67,7 @@ "tiffslide", "matplotlib", "requests>=2.25.0", - "pyvips", + "pyvips==2.2.1", "pytest", "coverage", "pytest-cov",
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -67,7 +67,7 @@\n \"tiffslide\",\n \"matplotlib\",\n \"requests>=2.25.0\",\n- \"pyvips\",\n+ \"pyvips==2.2.1\",\n \"pytest\",\n \"coverage\",\n \"pytest-cov\",\n", "issue": "Add histology exception tests\n...
1,869
87
gh_patches_debug_38652
rasdani/github-patches
git_diff
sagemath__sage-37422
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- make sage.parallel.ncpus.ncpus() use os.cpu_count() <div id="comment:0"></div> Currently, `sage.parallel.ncpus.ncpus()` uses platform-specific code to determine the number of available CPUs for some specific...
diff --git a/src/sage/parallel/ncpus.py b/src/sage/parallel/ncpus.py --- a/src/sage/parallel/ncpus.py +++ b/src/sage/parallel/ncpus.py @@ -1,46 +1,19 @@ """ CPU Detection """ -# Parallel Python Software: http://www.parallelpython.com -# Copyright (c) 2005-2008, Vitalii Vanovschi -# All rights reserved. -# Redistribu...
{"golden_diff": "diff --git a/src/sage/parallel/ncpus.py b/src/sage/parallel/ncpus.py\n--- a/src/sage/parallel/ncpus.py\n+++ b/src/sage/parallel/ncpus.py\n@@ -1,46 +1,19 @@\n \"\"\"\n CPU Detection\n \"\"\"\n-# Parallel Python Software: http://www.parallelpython.com\n-# Copyright (c) 2005-2008, Vitalii Vanovschi\n-# Al...
1,302
867
gh_patches_debug_9132
rasdani/github-patches
git_diff
bokeh__bokeh-10307
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] cElementTree has been deprecated and will be removed in favor of ElementTree Reference : https://bugs.python.org/issue36543 ``` bokeh/sampledata/us_states.py 33:import xml.etree.cElementTree as et ...
diff --git a/bokeh/sampledata/us_counties.py b/bokeh/sampledata/us_counties.py --- a/bokeh/sampledata/us_counties.py +++ b/bokeh/sampledata/us_counties.py @@ -37,7 +37,7 @@ # Standard library imports import csv -import xml.etree.cElementTree as et +import xml.etree.ElementTree as et # Bokeh imports from ..util....
{"golden_diff": "diff --git a/bokeh/sampledata/us_counties.py b/bokeh/sampledata/us_counties.py\n--- a/bokeh/sampledata/us_counties.py\n+++ b/bokeh/sampledata/us_counties.py\n@@ -37,7 +37,7 @@\n \n # Standard library imports\n import csv\n-import xml.etree.cElementTree as et\n+import xml.etree.ElementTree as et\n \n # ...
1,931
205
gh_patches_debug_8327
rasdani/github-patches
git_diff
qutebrowser__qutebrowser-3652
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Empty completion.timestamp_format crashes After `:set completion.timestamp_format ''`: ``` 17:26:29 ERROR misc crashsignal:exception_hook:216 Uncaught exception Traceback (most recent call last)...
diff --git a/qutebrowser/completion/models/histcategory.py b/qutebrowser/completion/models/histcategory.py --- a/qutebrowser/completion/models/histcategory.py +++ b/qutebrowser/completion/models/histcategory.py @@ -80,7 +80,7 @@ for i in range(len(words))) # replace ' in timestamp-format to avoi...
{"golden_diff": "diff --git a/qutebrowser/completion/models/histcategory.py b/qutebrowser/completion/models/histcategory.py\n--- a/qutebrowser/completion/models/histcategory.py\n+++ b/qutebrowser/completion/models/histcategory.py\n@@ -80,7 +80,7 @@\n for i in range(len(words)))\n \n # replace ' in t...
1,777
140
gh_patches_debug_38751
rasdani/github-patches
git_diff
kserve__kserve-116
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Python Model download for GCS and S3 Downloading from GCS and S3 needs to be completed. https://github.com/kubeflow/kfserving/blob/2f8d33d1a9773c5694a22ba749192163251fe287/python/kfserving/kfserving/storag...
diff --git a/python/kfserving/kfserving/storage.py b/python/kfserving/kfserving/storage.py --- a/python/kfserving/kfserving/storage.py +++ b/python/kfserving/kfserving/storage.py @@ -15,6 +15,10 @@ import logging import tempfile import os +import re +from minio import Minio +from google.cloud import storage +from go...
{"golden_diff": "diff --git a/python/kfserving/kfserving/storage.py b/python/kfserving/kfserving/storage.py\n--- a/python/kfserving/kfserving/storage.py\n+++ b/python/kfserving/kfserving/storage.py\n@@ -15,6 +15,10 @@\n import logging\n import tempfile\n import os\n+import re\n+from minio import Minio\n+from google.clo...
1,318
816
gh_patches_debug_17010
rasdani/github-patches
git_diff
mlflow__mlflow-4880
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] Alembic migration for metrics table uses incorrect server default ## MLflow Roadmap Item This is an MLflow Roadmap item that has been prioritized by the MLflow maintainers. We're seeking help with th...
diff --git a/mlflow/store/db_migrations/versions/c48cb773bb87_reset_default_value_for_is_nan_in_metrics_table_for_mysql.py b/mlflow/store/db_migrations/versions/c48cb773bb87_reset_default_value_for_is_nan_in_metrics_table_for_mysql.py --- a/mlflow/store/db_migrations/versions/c48cb773bb87_reset_default_value_for_is_nan...
{"golden_diff": "diff --git a/mlflow/store/db_migrations/versions/c48cb773bb87_reset_default_value_for_is_nan_in_metrics_table_for_mysql.py b/mlflow/store/db_migrations/versions/c48cb773bb87_reset_default_value_for_is_nan_in_metrics_table_for_mysql.py\n--- a/mlflow/store/db_migrations/versions/c48cb773bb87_reset_defaul...
1,513
328
gh_patches_debug_24334
rasdani/github-patches
git_diff
freedomofpress__securedrop-3688
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [reply refactor] Allow journalists to download replies from journalist interface After #3673 is implemented, we should allow journalists to download replies from the journalist interface UI. Note that for lon...
diff --git a/securedrop/journalist_app/col.py b/securedrop/journalist_app/col.py --- a/securedrop/journalist_app/col.py +++ b/securedrop/journalist_app/col.py @@ -67,18 +67,21 @@ return method(cols_selected) @view.route('/<filesystem_id>/<fn>') - def download_single_submission(filesystem_id, fn): - ...
{"golden_diff": "diff --git a/securedrop/journalist_app/col.py b/securedrop/journalist_app/col.py\n--- a/securedrop/journalist_app/col.py\n+++ b/securedrop/journalist_app/col.py\n@@ -67,18 +67,21 @@\n return method(cols_selected)\n \n @view.route('/<filesystem_id>/<fn>')\n- def download_single_submission...
1,181
354
gh_patches_debug_42292
rasdani/github-patches
git_diff
azavea__raster-vision-178
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add metrics for counting to eval.py We should add a new metric to the detection evaluation script so that it computes how close the counts are compared to ground truth. --- END ISSUE --- Below are some code...
diff --git a/src/rv/detection/commands/eval_predictions.py b/src/rv/detection/commands/eval_predictions.py --- a/src/rv/detection/commands/eval_predictions.py +++ b/src/rv/detection/commands/eval_predictions.py @@ -1,7 +1,6 @@ import json -from os.path import join +from os.path import join, dirname -import numpy as ...
{"golden_diff": "diff --git a/src/rv/detection/commands/eval_predictions.py b/src/rv/detection/commands/eval_predictions.py\n--- a/src/rv/detection/commands/eval_predictions.py\n+++ b/src/rv/detection/commands/eval_predictions.py\n@@ -1,7 +1,6 @@\n import json\n-from os.path import join\n+from os.path import join, dirn...
1,475
780
gh_patches_debug_524
rasdani/github-patches
git_diff
encode__uvicorn-660
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Reload Behavior: Documentation != Code, Unnecessary Reloads Hey! I upgraded to 0.11.4 shortly after release today, and it has a couple of quirks. 1. The documentation [here](https://github.com/encode/uvico...
diff --git a/uvicorn/__init__.py b/uvicorn/__init__.py --- a/uvicorn/__init__.py +++ b/uvicorn/__init__.py @@ -1,5 +1,5 @@ from uvicorn.config import Config from uvicorn.main import Server, main, run -__version__ = "0.11.4" +__version__ = "0.11.5" __all__ = ["main", "run", "Config", "Server"]
{"golden_diff": "diff --git a/uvicorn/__init__.py b/uvicorn/__init__.py\n--- a/uvicorn/__init__.py\n+++ b/uvicorn/__init__.py\n@@ -1,5 +1,5 @@\n from uvicorn.config import Config\n from uvicorn.main import Server, main, run\n \n-__version__ = \"0.11.4\"\n+__version__ = \"0.11.5\"\n __all__ = [\"main\", \"run\", \"Confi...
840
110
gh_patches_debug_64390
rasdani/github-patches
git_diff
alltheplaces__alltheplaces-2150
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Spider tmobile_us is broken During the global build at 2021-06-30-14-42-26, spider **tmobile_us** failed with **7563 features** and **2 errors**. Here's [the log](https://data.alltheplaces.xyz/runs/2021-06-3...
diff --git a/locations/spiders/tmobile_us.py b/locations/spiders/tmobile_us.py --- a/locations/spiders/tmobile_us.py +++ b/locations/spiders/tmobile_us.py @@ -15,7 +15,7 @@ 'Saturday': 'Sa', 'Sunday': 'Su'} -BASE_URL = 'https://onmyj41p3c.execute-api.us-west-2.amazonaws.com/prod/getSto...
{"golden_diff": "diff --git a/locations/spiders/tmobile_us.py b/locations/spiders/tmobile_us.py\n--- a/locations/spiders/tmobile_us.py\n+++ b/locations/spiders/tmobile_us.py\n@@ -15,7 +15,7 @@\n 'Saturday': 'Sa',\n 'Sunday': 'Su'}\n \n-BASE_URL = 'https://onmyj41p3c.execute-api.us-west-2.a...
1,227
150
gh_patches_debug_1059
rasdani/github-patches
git_diff
internetarchive__openlibrary-5645
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Image uploader does not recognise uploaded file <!-- What problem are we solving? What does the experience look like today? What are the symptoms? --> As of today (8-09-2021) the image uploader does not reco...
diff --git a/openlibrary/plugins/upstream/covers.py b/openlibrary/plugins/upstream/covers.py --- a/openlibrary/plugins/upstream/covers.py +++ b/openlibrary/plugins/upstream/covers.py @@ -54,7 +54,7 @@ else: data = None - if i.url and i.url.strip() == "http://": + if i.url and i.url...
{"golden_diff": "diff --git a/openlibrary/plugins/upstream/covers.py b/openlibrary/plugins/upstream/covers.py\n--- a/openlibrary/plugins/upstream/covers.py\n+++ b/openlibrary/plugins/upstream/covers.py\n@@ -54,7 +54,7 @@\n else:\n data = None\n \n- if i.url and i.url.strip() == \"http://\":\n...
2,015
108
gh_patches_debug_36368
rasdani/github-patches
git_diff
secdev__scapy-4017
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- scapy.layers.tls.crypto.hkdf.TLS13_HKDF crashes when cryptography module is missing ### Brief description scapy.layers.tls.crypto.hkdf.TLS13_HKDF crashes in multiple environments ### Scapy version 2.5.0 #...
diff --git a/scapy/layers/tls/crypto/hkdf.py b/scapy/layers/tls/crypto/hkdf.py --- a/scapy/layers/tls/crypto/hkdf.py +++ b/scapy/layers/tls/crypto/hkdf.py @@ -9,7 +9,7 @@ import struct -from scapy.config import conf +from scapy.config import conf, crypto_validator from scapy.layers.tls.crypto.pkcs1 import _get_ha...
{"golden_diff": "diff --git a/scapy/layers/tls/crypto/hkdf.py b/scapy/layers/tls/crypto/hkdf.py\n--- a/scapy/layers/tls/crypto/hkdf.py\n+++ b/scapy/layers/tls/crypto/hkdf.py\n@@ -9,7 +9,7 @@\n \n import struct\n \n-from scapy.config import conf\n+from scapy.config import conf, crypto_validator\n from scapy.layers.tls.c...
1,396
494
gh_patches_debug_4597
rasdani/github-patches
git_diff
keras-team__keras-16277
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- ThresholdedReLU crashes when the input is a list **System information**. - Have I written custom code (as opposed to using a stock example script provided in Keras): Yes - OS Platform and Distribution (e.g....
diff --git a/keras/layers/activation/thresholded_relu.py b/keras/layers/activation/thresholded_relu.py --- a/keras/layers/activation/thresholded_relu.py +++ b/keras/layers/activation/thresholded_relu.py @@ -59,8 +59,8 @@ self.theta = backend.cast_to_floatx(theta) def call(self, inputs): - theta = tf.cast(s...
{"golden_diff": "diff --git a/keras/layers/activation/thresholded_relu.py b/keras/layers/activation/thresholded_relu.py\n--- a/keras/layers/activation/thresholded_relu.py\n+++ b/keras/layers/activation/thresholded_relu.py\n@@ -59,8 +59,8 @@\n self.theta = backend.cast_to_floatx(theta)\n \n def call(self, inputs):...
1,993
162
gh_patches_debug_2919
rasdani/github-patches
git_diff
mesonbuild__meson-1538
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- VS 2017 backend emits bad WindowsTargetPlatformVersion value When I tried generating a VS 2017 solution, the generated app.vcxproj contained this: ``` <WindowsTargetPlatformVersion>10.0.14393.0\</WindowsT...
diff --git a/mesonbuild/backend/vs2017backend.py b/mesonbuild/backend/vs2017backend.py --- a/mesonbuild/backend/vs2017backend.py +++ b/mesonbuild/backend/vs2017backend.py @@ -24,4 +24,4 @@ self.platform_toolset = 'v141' self.vs_version = '2017' # WindowsSDKVersion should be set by command pro...
{"golden_diff": "diff --git a/mesonbuild/backend/vs2017backend.py b/mesonbuild/backend/vs2017backend.py\n--- a/mesonbuild/backend/vs2017backend.py\n+++ b/mesonbuild/backend/vs2017backend.py\n@@ -24,4 +24,4 @@\n self.platform_toolset = 'v141'\n self.vs_version = '2017'\n # WindowsSDKVersion shoul...
750
144
gh_patches_debug_10204
rasdani/github-patches
git_diff
deepchecks__deepchecks-1098
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [FEAT][CV] Add a "per-class" option to property drift & heatmap comparison In this per class option, the drift would be shown per class for the top drifted classes. --- END ISSUE --- Below are some code se...
diff --git a/docs/source/examples/vision/checks/distribution/source/plot_image_property_check.py b/docs/source/examples/vision/checks/distribution/source/plot_image_property_check.py --- a/docs/source/examples/vision/checks/distribution/source/plot_image_property_check.py +++ b/docs/source/examples/vision/checks/distri...
{"golden_diff": "diff --git a/docs/source/examples/vision/checks/distribution/source/plot_image_property_check.py b/docs/source/examples/vision/checks/distribution/source/plot_image_property_check.py\n--- a/docs/source/examples/vision/checks/distribution/source/plot_image_property_check.py\n+++ b/docs/source/examples/v...
1,646
226
gh_patches_debug_1730
rasdani/github-patches
git_diff
cal-itp__benefits-209
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Secure Django's language cookie The following can be configured in [`settings.py`](https://github.com/cal-itp/benefits/blob/dev/benefits/settings.py) * [x] [`LANGUAGE_COOKIE_HTTPONLY`](https://docs.djangop...
diff --git a/benefits/settings.py b/benefits/settings.py --- a/benefits/settings.py +++ b/benefits/settings.py @@ -142,6 +142,10 @@ LANGUAGE_CODE = "en" +LANGUAGE_COOKIE_HTTPONLY = True +LANGUAGE_COOKIE_SAMESITE = "Strict" +LANGUAGE_COOKIE_SECURE = True + LANGUAGES = [("en", "English"), ("es", "Español")] LOCA...
{"golden_diff": "diff --git a/benefits/settings.py b/benefits/settings.py\n--- a/benefits/settings.py\n+++ b/benefits/settings.py\n@@ -142,6 +142,10 @@\n \n LANGUAGE_CODE = \"en\"\n \n+LANGUAGE_COOKIE_HTTPONLY = True\n+LANGUAGE_COOKIE_SAMESITE = \"Strict\"\n+LANGUAGE_COOKIE_SECURE = True\n+\n LANGUAGES = [(\"en\", \"En...
1,977
119
gh_patches_debug_36828
rasdani/github-patches
git_diff
crytic__slither-577
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- FileNotFoundError: [Errno 2] No such file or directory: 'solc' I launch program like this: slither Contract.sol and receive an error: "FileNotFoundError: [Errno 2] No such file or directory: 'sol...
diff --git a/slither/detectors/attributes/incorrect_solc.py b/slither/detectors/attributes/incorrect_solc.py --- a/slither/detectors/attributes/incorrect_solc.py +++ b/slither/detectors/attributes/incorrect_solc.py @@ -33,23 +33,30 @@ `solc` frequently releases new compiler versions. Using an old version prevents acce...
{"golden_diff": "diff --git a/slither/detectors/attributes/incorrect_solc.py b/slither/detectors/attributes/incorrect_solc.py\n--- a/slither/detectors/attributes/incorrect_solc.py\n+++ b/slither/detectors/attributes/incorrect_solc.py\n@@ -33,23 +33,30 @@\n `solc` frequently releases new compiler versions. Using an old ...
1,993
794
gh_patches_debug_2854
rasdani/github-patches
git_diff
wger-project__wger-170
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- BMI And Calorie Calculator Not Working Using this software in Linux Mint 13. When I enter my data into either the BMI calculator or the calorie estimator nothing happens. I have entered my height in cm and my...
diff --git a/wger/nutrition/forms.py b/wger/nutrition/forms.py --- a/wger/nutrition/forms.py +++ b/wger/nutrition/forms.py @@ -55,6 +55,9 @@ class BmiForm(forms.ModelForm): + height = forms.DecimalField(widget=Html5NumberInput(), + max_value=999, + l...
{"golden_diff": "diff --git a/wger/nutrition/forms.py b/wger/nutrition/forms.py\n--- a/wger/nutrition/forms.py\n+++ b/wger/nutrition/forms.py\n@@ -55,6 +55,9 @@\n \n \n class BmiForm(forms.ModelForm):\n+ height = forms.DecimalField(widget=Html5NumberInput(),\n+ max_value=999,\n+ ...
1,550
111
gh_patches_debug_13384
rasdani/github-patches
git_diff
great-expectations__great_expectations-5460
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Use cleaner solution for non-truncating division in python 2 Prefer `from __future__ import division` to `1.*x/y` --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of th...
diff --git a/great_expectations/expectations/metrics/query_metrics/query_table.py b/great_expectations/expectations/metrics/query_metrics/query_table.py --- a/great_expectations/expectations/metrics/query_metrics/query_table.py +++ b/great_expectations/expectations/metrics/query_metrics/query_table.py @@ -23,6 +23,7 @@...
{"golden_diff": "diff --git a/great_expectations/expectations/metrics/query_metrics/query_table.py b/great_expectations/expectations/metrics/query_metrics/query_table.py\n--- a/great_expectations/expectations/metrics/query_metrics/query_table.py\n+++ b/great_expectations/expectations/metrics/query_metrics/query_table.p...
1,163
183
gh_patches_debug_31612
rasdani/github-patches
git_diff
tough-dev-school__education-backend-855
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Слать в лототрон только один ответ от одного пользователя Сейчас, если пользователь дал три ответа на домашку, то при кросс-проверке все три ответа уйдут разным студентам. Это — плохо, нужно либо слать только...
diff --git a/src/homework/services/answer_crosscheck_dispatcher.py b/src/homework/services/answer_crosscheck_dispatcher.py --- a/src/homework/services/answer_crosscheck_dispatcher.py +++ b/src/homework/services/answer_crosscheck_dispatcher.py @@ -9,11 +9,12 @@ class AnswerCrossCheckDispatcher: """Given a bunch ...
{"golden_diff": "diff --git a/src/homework/services/answer_crosscheck_dispatcher.py b/src/homework/services/answer_crosscheck_dispatcher.py\n--- a/src/homework/services/answer_crosscheck_dispatcher.py\n+++ b/src/homework/services/answer_crosscheck_dispatcher.py\n@@ -9,11 +9,12 @@\n \n class AnswerCrossCheckDispatcher:\...
880
382
gh_patches_debug_17240
rasdani/github-patches
git_diff
napari__napari-6139
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Removing comments from PR does not work ## 🐛 Bug After merging it looks like the action for removing comments does not work. I will be happy to fast merge potential bugfix without the standard 24 hours ...
diff --git a/tools/remove_html_comments_from_pr.py b/tools/remove_html_comments_from_pr.py --- a/tools/remove_html_comments_from_pr.py +++ b/tools/remove_html_comments_from_pr.py @@ -10,6 +10,8 @@ import requests +REPO = 'napari/napari' + def remove_html_comments(text): # Regular expression to remove HTML ...
{"golden_diff": "diff --git a/tools/remove_html_comments_from_pr.py b/tools/remove_html_comments_from_pr.py\n--- a/tools/remove_html_comments_from_pr.py\n+++ b/tools/remove_html_comments_from_pr.py\n@@ -10,6 +10,8 @@\n \n import requests\n \n+REPO = 'napari/napari'\n+\n \n def remove_html_comments(text):\n # Regula...
1,016
207
gh_patches_debug_18479
rasdani/github-patches
git_diff
doccano__doccano-1744
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- How could I reduce number of workers? Could I reduce the number_of_workers? --------- I run the doccano in my machine use this code. ``` doccano init doccano create user *** doccano web server --port **...
diff --git a/backend/cli.py b/backend/cli.py --- a/backend/cli.py +++ b/backend/cli.py @@ -51,7 +51,7 @@ options = { "bind": "%s:%s" % ("0.0.0.0", args.port), - "workers": number_of_workers(), + "workers": args.workers, "chdir": base, "capture_output": True, "log...
{"golden_diff": "diff --git a/backend/cli.py b/backend/cli.py\n--- a/backend/cli.py\n+++ b/backend/cli.py\n@@ -51,7 +51,7 @@\n \n options = {\n \"bind\": \"%s:%s\" % (\"0.0.0.0\", args.port),\n- \"workers\": number_of_workers(),\n+ \"workers\": args.workers,\n \"chdir\": base,\n ...
1,990
218
gh_patches_debug_14081
rasdani/github-patches
git_diff
pypi__warehouse-439
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Double check conditional HTTP implementation The conditional HTTP implementation doesn't check the status code of the response at all. Determine if it should, and if it should update it to do the right thing....
diff --git a/warehouse/cache/http.py b/warehouse/cache/http.py --- a/warehouse/cache/http.py +++ b/warehouse/cache/http.py @@ -75,8 +75,13 @@ response.conditional_response = True elif (isinstance(response.app_iter, collections.abc.Sequence) and len(response.app_iter) == 1): - ...
{"golden_diff": "diff --git a/warehouse/cache/http.py b/warehouse/cache/http.py\n--- a/warehouse/cache/http.py\n+++ b/warehouse/cache/http.py\n@@ -75,8 +75,13 @@\n response.conditional_response = True\n elif (isinstance(response.app_iter, collections.abc.Sequence) and\n len(response....
1,076
198
gh_patches_debug_35947
rasdani/github-patches
git_diff
opsdroid__opsdroid-1099
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Invert constraints I can imagine situations where it would be useful to be able to invert constraints so that they do the opposite of what they are designed to do. ```python from opsdroid.skill import Ski...
diff --git a/opsdroid/constraints.py b/opsdroid/constraints.py --- a/opsdroid/constraints.py +++ b/opsdroid/constraints.py @@ -5,6 +5,7 @@ """ import logging +from functools import wraps from opsdroid.helper import add_skill_attributes @@ -12,7 +13,17 @@ _LOGGER = logging.getLogger(__name__) -def constrai...
{"golden_diff": "diff --git a/opsdroid/constraints.py b/opsdroid/constraints.py\n--- a/opsdroid/constraints.py\n+++ b/opsdroid/constraints.py\n@@ -5,6 +5,7 @@\n \"\"\"\n \n import logging\n+from functools import wraps\n \n from opsdroid.helper import add_skill_attributes\n \n@@ -12,7 +13,17 @@\n _LOGGER = logging.getLo...
825
426
gh_patches_debug_8106
rasdani/github-patches
git_diff
aws__aws-sam-cli-815
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Region from Env Vars or profile are not respected for ALL commands but package and deploy The region option in SAM CLI was changed between 0.7.0 and 0.8.0 to add the default explicitly on the [command line op...
diff --git a/samcli/__init__.py b/samcli/__init__.py --- a/samcli/__init__.py +++ b/samcli/__init__.py @@ -2,4 +2,4 @@ SAM CLI version """ -__version__ = '0.8.0' +__version__ = '0.8.1' diff --git a/samcli/cli/options.py b/samcli/cli/options.py --- a/samcli/cli/options.py +++ b/samcli/cli/options.py @@ -41,7 +41,6 @...
{"golden_diff": "diff --git a/samcli/__init__.py b/samcli/__init__.py\n--- a/samcli/__init__.py\n+++ b/samcli/__init__.py\n@@ -2,4 +2,4 @@\n SAM CLI version\n \"\"\"\n \n-__version__ = '0.8.0'\n+__version__ = '0.8.1'\ndiff --git a/samcli/cli/options.py b/samcli/cli/options.py\n--- a/samcli/cli/options.py\n+++ b/samcli/...
921
176
gh_patches_debug_29338
rasdani/github-patches
git_diff
enthought__chaco-498
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- bar_plot_stacked example unfinished? **Problem Description** The example in https://github.com/enthought/chaco/blob/master/examples/demo/basic/bar_plot_stacked.py doesn't do any stacking. **Expected beha...
diff --git a/examples/demo/basic/bar_plot_stacked.py b/examples/demo/basic/bar_plot_stacked.py --- a/examples/demo/basic/bar_plot_stacked.py +++ b/examples/demo/basic/bar_plot_stacked.py @@ -11,7 +11,7 @@ from traitsui.api import UItem, View # Chaco imports -from chaco.api import LabelAxis, Plot, ArrayPlotData +fro...
{"golden_diff": "diff --git a/examples/demo/basic/bar_plot_stacked.py b/examples/demo/basic/bar_plot_stacked.py\n--- a/examples/demo/basic/bar_plot_stacked.py\n+++ b/examples/demo/basic/bar_plot_stacked.py\n@@ -11,7 +11,7 @@\n from traitsui.api import UItem, View\n \n # Chaco imports\n-from chaco.api import LabelAxis, ...
1,055
433
gh_patches_debug_44
rasdani/github-patches
git_diff
zestedesavoir__zds-site-6179
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Retirer les dernier restes de Travis **Description du bug** J'ai l'impression qu'il reste quelques miettes de Travis : * https://github.com/zestedesavoir/zds-site/blob/dev/zds/settings/travis_fixture.py...
diff --git a/zds/settings/travis_fixture.py b/zds/settings/travis_fixture.py deleted file mode 100644 --- a/zds/settings/travis_fixture.py +++ /dev/null @@ -1,6 +0,0 @@ -from .ci_test import * - -LOGGING["loggers"]["zds.utils.templatetags.emarkdown"] = { - "level": "INFO", - "handlers": ["console"], -}
{"golden_diff": "diff --git a/zds/settings/travis_fixture.py b/zds/settings/travis_fixture.py\ndeleted file mode 100644\n--- a/zds/settings/travis_fixture.py\n+++ /dev/null\n@@ -1,6 +0,0 @@\n-from .ci_test import *\n-\n-LOGGING[\"loggers\"][\"zds.utils.templatetags.emarkdown\"] = {\n- \"level\": \"INFO\",\n- \"ha...
463
102
gh_patches_debug_10578
rasdani/github-patches
git_diff
DDMAL__CantusDB-1167
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- We should disable the remap_user_ids command for the time being We have changes on Staging that need to make their way to Production soon. The `remap_user_ids` command is not working properly (#1165). W...
diff --git a/django/cantusdb_project/main_app/management/commands/remap_user_ids.py b/django/cantusdb_project/main_app/management/commands/remap_user_ids.py --- a/django/cantusdb_project/main_app/management/commands/remap_user_ids.py +++ b/django/cantusdb_project/main_app/management/commands/remap_user_ids.py @@ -124,6...
{"golden_diff": "diff --git a/django/cantusdb_project/main_app/management/commands/remap_user_ids.py b/django/cantusdb_project/main_app/management/commands/remap_user_ids.py\n--- a/django/cantusdb_project/main_app/management/commands/remap_user_ids.py\n+++ b/django/cantusdb_project/main_app/management/commands/remap_us...
1,909
207
gh_patches_debug_5603
rasdani/github-patches
git_diff
netbox-community__netbox-15611
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Empty search entries are being created for device asset tags ### Deployment Type NetBox Cloud ### NetBox Version v3.7.4 ### Python Version 3.11 ### Steps to Reproduce 1. Create a new device and note it...
diff --git a/netbox/netbox/search/__init__.py b/netbox/netbox/search/__init__.py --- a/netbox/netbox/search/__init__.py +++ b/netbox/netbox/search/__init__.py @@ -59,9 +59,10 @@ @staticmethod def get_field_value(instance, field_name): """ - Return the value of the specified model field as a st...
{"golden_diff": "diff --git a/netbox/netbox/search/__init__.py b/netbox/netbox/search/__init__.py\n--- a/netbox/netbox/search/__init__.py\n+++ b/netbox/netbox/search/__init__.py\n@@ -59,9 +59,10 @@\n @staticmethod\n def get_field_value(instance, field_name):\n \"\"\"\n- Return the value of the sp...
1,573
149
gh_patches_debug_11540
rasdani/github-patches
git_diff
plotly__dash-1493
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] dash doesn't get imported when a file named "org.py", "dash.py", or "test.py" with specific content is present in the current directory // "AttributeError: module 'dash' has no attribute 'Dash'" **Descr...
diff --git a/dash/__init__.py b/dash/__init__.py --- a/dash/__init__.py +++ b/dash/__init__.py @@ -1,7 +1,11 @@ -from .dash import Dash, no_update # noqa: F401 -from . import dependencies # noqa: F401 -from . import development # noqa: F401 -from . import exceptions # noqa: F401 -from . import resources # noqa: F4...
{"golden_diff": "diff --git a/dash/__init__.py b/dash/__init__.py\n--- a/dash/__init__.py\n+++ b/dash/__init__.py\n@@ -1,7 +1,11 @@\n-from .dash import Dash, no_update # noqa: F401\n-from . import dependencies # noqa: F401\n-from . import development # noqa: F401\n-from . import exceptions # noqa: F401\n-from . imp...
893
331
gh_patches_debug_25606
rasdani/github-patches
git_diff
python-telegram-bot__python-telegram-bot-521
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- BUG: all_members_are_administrators fails I don;t know if telegram api changed but the parameter to tell if all administrators in a group are admin has changed: to `all_members_are_administrators` Chat's fail...
diff --git a/telegram/chat.py b/telegram/chat.py --- a/telegram/chat.py +++ b/telegram/chat.py @@ -32,7 +32,7 @@ username (str): Username, for private chats and channels if available first_name (str): First name of the other party in a private chat last_name (str): Last name of the other part...
{"golden_diff": "diff --git a/telegram/chat.py b/telegram/chat.py\n--- a/telegram/chat.py\n+++ b/telegram/chat.py\n@@ -32,7 +32,7 @@\n username (str): Username, for private chats and channels if available\n first_name (str): First name of the other party in a private chat\n last_name (str): Last...
1,635
270
gh_patches_debug_32416
rasdani/github-patches
git_diff
linz__geostore-1651
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Use latest of each STAC extension version ### Enabler So that we don't have to manually update the code to use the latest version, we want to automatically use the latest version available in the relevant ...
diff --git a/geostore/check_stac_metadata/stac_validators.py b/geostore/check_stac_metadata/stac_validators.py --- a/geostore/check_stac_metadata/stac_validators.py +++ b/geostore/check_stac_metadata/stac_validators.py @@ -1,6 +1,9 @@ -from functools import cached_property +from distutils.version import StrictVersion +...
{"golden_diff": "diff --git a/geostore/check_stac_metadata/stac_validators.py b/geostore/check_stac_metadata/stac_validators.py\n--- a/geostore/check_stac_metadata/stac_validators.py\n+++ b/geostore/check_stac_metadata/stac_validators.py\n@@ -1,6 +1,9 @@\n-from functools import cached_property\n+from distutils.version ...
2,018
529
gh_patches_debug_14246
rasdani/github-patches
git_diff
pyca__cryptography-1554
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- raises_unsupported_algorithm gives very unhelpful errors When the error tag is wrong you get errors along the lines of `assert <object object at 0xf0000000> is not <object object as 0xb0000000>`. This is not ...
diff --git a/src/cryptography/exceptions.py b/src/cryptography/exceptions.py --- a/src/cryptography/exceptions.py +++ b/src/cryptography/exceptions.py @@ -4,17 +4,19 @@ from __future__ import absolute_import, division, print_function - -class _Reasons(object): - BACKEND_MISSING_INTERFACE = object() - UNSUPPO...
{"golden_diff": "diff --git a/src/cryptography/exceptions.py b/src/cryptography/exceptions.py\n--- a/src/cryptography/exceptions.py\n+++ b/src/cryptography/exceptions.py\n@@ -4,17 +4,19 @@\n \n from __future__ import absolute_import, division, print_function\n \n-\n-class _Reasons(object):\n- BACKEND_MISSING_INTERFA...
737
275
gh_patches_debug_3149
rasdani/github-patches
git_diff
huggingface__dataset-viewer-479
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Use main instead of master to load the datasets The main branch in https://github.com/huggingface/datasets is now `main`, not `master` anymore. Note that it's backward compatible, so no need to hurry --- END...
diff --git a/services/worker/src/worker/constants.py b/services/worker/src/worker/constants.py --- a/services/worker/src/worker/constants.py +++ b/services/worker/src/worker/constants.py @@ -2,7 +2,7 @@ DEFAULT_ASSETS_BASE_URL: str = "assets" DEFAULT_ASSETS_DIRECTORY: None = None -DEFAULT_DATASETS_REVISION: str = "...
{"golden_diff": "diff --git a/services/worker/src/worker/constants.py b/services/worker/src/worker/constants.py\n--- a/services/worker/src/worker/constants.py\n+++ b/services/worker/src/worker/constants.py\n@@ -2,7 +2,7 @@\n \n DEFAULT_ASSETS_BASE_URL: str = \"assets\"\n DEFAULT_ASSETS_DIRECTORY: None = None\n-DEFAULT_...
590
132
gh_patches_debug_11689
rasdani/github-patches
git_diff
python-poetry__poetry-1140
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Poetry fails to install p4python due to read-only files <!-- Hi there! Thank you for discovering and submitting an issue. Before you submit this; let's make sure of a few things. Please make sure t...
diff --git a/poetry/utils/helpers.py b/poetry/utils/helpers.py --- a/poetry/utils/helpers.py +++ b/poetry/utils/helpers.py @@ -34,19 +34,18 @@ return str(Version(version)) +def _del_ro(action, name, exc): + os.chmod(name, stat.S_IWRITE) + os.remove(name) + + @contextmanager def temporary_directory(*arg...
{"golden_diff": "diff --git a/poetry/utils/helpers.py b/poetry/utils/helpers.py\n--- a/poetry/utils/helpers.py\n+++ b/poetry/utils/helpers.py\n@@ -34,19 +34,18 @@\n return str(Version(version))\n \n \n+def _del_ro(action, name, exc):\n+ os.chmod(name, stat.S_IWRITE)\n+ os.remove(name)\n+\n+\n @contextmanager\...
1,656
214
gh_patches_debug_23207
rasdani/github-patches
git_diff
getsentry__snuba-1794
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Snuba cleanup for sentry onpremise ### Environment Sentry self-hosted 21.3.0 (based on docker-compose from here https://github.com/getsentry/onpremise/blob/21.3.0/docker-compose.yml) ### Steps to Reprod...
diff --git a/snuba/cli/cleanup.py b/snuba/cli/cleanup.py --- a/snuba/cli/cleanup.py +++ b/snuba/cli/cleanup.py @@ -50,7 +50,8 @@ (clickhouse_user, clickhouse_password,) = storage.get_cluster().get_credentials() - database = storage.get_cluster().get_database() + cluster = storage.get_cluster() + datab...
{"golden_diff": "diff --git a/snuba/cli/cleanup.py b/snuba/cli/cleanup.py\n--- a/snuba/cli/cleanup.py\n+++ b/snuba/cli/cleanup.py\n@@ -50,7 +50,8 @@\n \n (clickhouse_user, clickhouse_password,) = storage.get_cluster().get_credentials()\n \n- database = storage.get_cluster().get_database()\n+ cluster = storage...
1,154
274
gh_patches_debug_11354
rasdani/github-patches
git_diff
getnikola__nikola-2523
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Nikola generates invalid html5 when markdown footnote extension is used The [default output type](http://pythonhosted.org/Markdown/reference.html#markdown) of the python markdown library is xhtml1. The 4 temp...
diff --git a/nikola/plugins/compile/markdown/__init__.py b/nikola/plugins/compile/markdown/__init__.py --- a/nikola/plugins/compile/markdown/__init__.py +++ b/nikola/plugins/compile/markdown/__init__.py @@ -78,7 +78,7 @@ data = in_file.read() if not is_two_file: _, data = ...
{"golden_diff": "diff --git a/nikola/plugins/compile/markdown/__init__.py b/nikola/plugins/compile/markdown/__init__.py\n--- a/nikola/plugins/compile/markdown/__init__.py\n+++ b/nikola/plugins/compile/markdown/__init__.py\n@@ -78,7 +78,7 @@\n data = in_file.read()\n if not is_two_file:\n ...
1,619
160
gh_patches_debug_10501
rasdani/github-patches
git_diff
pypa__virtualenv-1964
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- AttributeError: 'NoneType' object has no attribute 'group' with virtualenv 20.0.32 on CygWin **Issue** We are also testing on CygWin (using appveyor), and since this morning, tox fails creating a virtualenv ...
diff --git a/src/virtualenv/activation/via_template.py b/src/virtualenv/activation/via_template.py --- a/src/virtualenv/activation/via_template.py +++ b/src/virtualenv/activation/via_template.py @@ -38,7 +38,10 @@ if any(platform in current_platform for platform in platforms): pattern = re.compile...
{"golden_diff": "diff --git a/src/virtualenv/activation/via_template.py b/src/virtualenv/activation/via_template.py\n--- a/src/virtualenv/activation/via_template.py\n+++ b/src/virtualenv/activation/via_template.py\n@@ -38,7 +38,10 @@\n if any(platform in current_platform for platform in platforms):\n ...
1,734
175
gh_patches_debug_22280
rasdani/github-patches
git_diff
airctic__icevision-878
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Fix download_mmdet_configs No need to download the zip file if it exists. This will solve the issue encountered in the Kaggle offline installation. --- END ISSUE --- Below are some code segments, each fro...
diff --git a/icevision/models/mmdet/download_configs.py b/icevision/models/mmdet/download_configs.py --- a/icevision/models/mmdet/download_configs.py +++ b/icevision/models/mmdet/download_configs.py @@ -9,12 +9,26 @@ def download_mmdet_configs() -> Path: save_dir = get_root_dir() / f"mmdetection_configs" - s...
{"golden_diff": "diff --git a/icevision/models/mmdet/download_configs.py b/icevision/models/mmdet/download_configs.py\n--- a/icevision/models/mmdet/download_configs.py\n+++ b/icevision/models/mmdet/download_configs.py\n@@ -9,12 +9,26 @@\n \n def download_mmdet_configs() -> Path:\n save_dir = get_root_dir() / f\"mmd...
496
388
gh_patches_debug_28282
rasdani/github-patches
git_diff
getpelican__pelican-1040
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Allow nice URLs on devserver When you publish the website is quite easy to implement nice URLs. For example an nginx configuraiton like this would provide you with nice URLs for your website: ``` index index...
diff --git a/pelican/server.py b/pelican/server.py --- a/pelican/server.py +++ b/pelican/server.py @@ -1,5 +1,7 @@ from __future__ import print_function +import os import sys +import logging try: import SimpleHTTPServer as srvmod except ImportError: @@ -11,19 +13,36 @@ import socketserver # NOQA PORT ...
{"golden_diff": "diff --git a/pelican/server.py b/pelican/server.py\n--- a/pelican/server.py\n+++ b/pelican/server.py\n@@ -1,5 +1,7 @@\n from __future__ import print_function\n+import os\n import sys\n+import logging\n try:\n import SimpleHTTPServer as srvmod\n except ImportError:\n@@ -11,19 +13,36 @@\n import ...
671
440
gh_patches_debug_25372
rasdani/github-patches
git_diff
facebookresearch__CompilerGym-739
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Logical Failure when combing TimeLimit Wrapper with IterateOverBenchmarks ## 🐛 Bug If an environment is first wrapper with TimeLimit before IterateOverBenchmarks, it will not return "done" as True. ##...
diff --git a/compiler_gym/wrappers/time_limit.py b/compiler_gym/wrappers/time_limit.py --- a/compiler_gym/wrappers/time_limit.py +++ b/compiler_gym/wrappers/time_limit.py @@ -2,7 +2,7 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -fro...
{"golden_diff": "diff --git a/compiler_gym/wrappers/time_limit.py b/compiler_gym/wrappers/time_limit.py\n--- a/compiler_gym/wrappers/time_limit.py\n+++ b/compiler_gym/wrappers/time_limit.py\n@@ -2,7 +2,7 @@\n #\n # This source code is licensed under the MIT license found in the\n # LICENSE file in the root directory of...
1,020
304