problem_id
stringlengths
18
22
source
stringclasses
1 value
task_type
stringclasses
1 value
in_source_id
stringlengths
13
58
prompt
stringlengths
1.71k
9.01k
golden_diff
stringlengths
151
4.94k
verification_info
stringlengths
465
11.3k
num_tokens_prompt
int64
557
2.05k
num_tokens_diff
int64
48
1.02k
gh_patches_debug_32737
rasdani/github-patches
git_diff
dask__dask-586
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Additional improvement for da.image.imread I think following 2 improvements make the function better. #### 1. Allow custom `imread` function. Some prefer `opencv` which reads color in BGR order, otherwise `ski...
diff --git a/dask/array/image.py b/dask/array/image.py --- a/dask/array/image.py +++ b/dask/array/image.py @@ -13,7 +13,7 @@ return x[None, ...] -def imread(filename): +def imread(filename, imread=None, preprocess=None): """ Read a stack of images into a dask array Parameters @@ -21,6 +21,13 @@ ...
{"golden_diff": "diff --git a/dask/array/image.py b/dask/array/image.py\n--- a/dask/array/image.py\n+++ b/dask/array/image.py\n@@ -13,7 +13,7 @@\n return x[None, ...]\n \n \n-def imread(filename):\n+def imread(filename, imread=None, preprocess=None):\n \"\"\" Read a stack of images into a dask array\n \n Pa...
1,120
498
gh_patches_debug_3876
rasdani/github-patches
git_diff
xorbitsai__inference-299
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> FEAT: Disable Gradio Telemetry Pull requests are disabled but see here: https://github.com/arch-btw/inference/pull/1 </issue> <code> [start of examples/gradio_chatinterface.py] 1 from typing import Dict, Li...
diff --git a/examples/gradio_chatinterface.py b/examples/gradio_chatinterface.py --- a/examples/gradio_chatinterface.py +++ b/examples/gradio_chatinterface.py @@ -105,6 +105,7 @@ demo = gr.ChatInterface( fn=generate_wrapper, + analytics_enabled=False, examples=[ "Show me a t...
{"golden_diff": "diff --git a/examples/gradio_chatinterface.py b/examples/gradio_chatinterface.py\n--- a/examples/gradio_chatinterface.py\n+++ b/examples/gradio_chatinterface.py\n@@ -105,6 +105,7 @@\n \n demo = gr.ChatInterface(\n fn=generate_wrapper,\n+ analytics_enabled=False,\n examples=[\...
1,629
104
gh_patches_debug_4863
rasdani/github-patches
git_diff
digitalfabrik__integreat-cms-1210
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> PDF Export URL pattern ### Describe the Bug The web app calls `/REGION/LANG/wp-json/ig-mpdf/v1/pdf` to export a PDF which returns a 404. Our API currently uses `REGION/LANG/pdf`. The normal mapping does not...
diff --git a/integreat_cms/api/urls.py b/integreat_cms/api/urls.py --- a/integreat_cms/api/urls.py +++ b/integreat_cms/api/urls.py @@ -136,6 +136,11 @@ "<slug:language_slug>/wp-json/extensions/v3/", include(content_api_urlpatterns), ), + path( + ...
{"golden_diff": "diff --git a/integreat_cms/api/urls.py b/integreat_cms/api/urls.py\n--- a/integreat_cms/api/urls.py\n+++ b/integreat_cms/api/urls.py\n@@ -136,6 +136,11 @@\n \"<slug:language_slug>/wp-json/extensions/v3/\",\n include(content_api_urlpatterns),\n ),\...
1,935
130
gh_patches_debug_29434
rasdani/github-patches
git_diff
plone__Products.CMFPlone-1515
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Resources from third party add-ons are not being included in compiled plone-legacy bundle Seems JS resources registered in Plone 5 using old approach (`jsregistry.xml`) are not included in the final compilation...
diff --git a/Products/CMFPlone/resources/browser/combine.py b/Products/CMFPlone/resources/browser/combine.py --- a/Products/CMFPlone/resources/browser/combine.py +++ b/Products/CMFPlone/resources/browser/combine.py @@ -30,6 +30,14 @@ def get_resource(context, path): + if path.startswith('++plone++'): + #...
{"golden_diff": "diff --git a/Products/CMFPlone/resources/browser/combine.py b/Products/CMFPlone/resources/browser/combine.py\n--- a/Products/CMFPlone/resources/browser/combine.py\n+++ b/Products/CMFPlone/resources/browser/combine.py\n@@ -30,6 +30,14 @@\n \n \n def get_resource(context, path):\n+ if path.startswith(...
1,666
339
gh_patches_debug_22011
rasdani/github-patches
git_diff
docker__docker-py-1330
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Add docker network IPAM options parameter IPAM driver missing options supports an options field in the IPAM config It introduced in API v1.22. ``` POST /networks/create Now supports an options field in the I...
diff --git a/docker/types/networks.py b/docker/types/networks.py --- a/docker/types/networks.py +++ b/docker/types/networks.py @@ -50,6 +50,8 @@ driver (str): The IPAM driver to use. Defaults to ``default``. pool_configs (list): A list of pool configurations (:py:class:`~docker.types.IPAMPo...
{"golden_diff": "diff --git a/docker/types/networks.py b/docker/types/networks.py\n--- a/docker/types/networks.py\n+++ b/docker/types/networks.py\n@@ -50,6 +50,8 @@\n driver (str): The IPAM driver to use. Defaults to ``default``.\n pool_configs (list): A list of pool configurations\n (:py:clas...
1,579
255
gh_patches_debug_2452
rasdani/github-patches
git_diff
pyinstaller__pyinstaller-2225
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> missing hidden import for skimage When packaging an application that imports skimage.feature (and nothing else), the app would not run due to an ImportError on the "transform" module. This can be fixed by addi...
diff --git a/PyInstaller/hooks/hook-skimage.transform.py b/PyInstaller/hooks/hook-skimage.transform.py --- a/PyInstaller/hooks/hook-skimage.transform.py +++ b/PyInstaller/hooks/hook-skimage.transform.py @@ -12,6 +12,7 @@ # 64-bit hiddenimports = ['skimage.draw.draw', 'skimage._shared.geometry', + ...
{"golden_diff": "diff --git a/PyInstaller/hooks/hook-skimage.transform.py b/PyInstaller/hooks/hook-skimage.transform.py\n--- a/PyInstaller/hooks/hook-skimage.transform.py\n+++ b/PyInstaller/hooks/hook-skimage.transform.py\n@@ -12,6 +12,7 @@\n # 64-bit\n hiddenimports = ['skimage.draw.draw',\n 'skimage....
869
117
gh_patches_debug_7034
rasdani/github-patches
git_diff
aws__aws-cli-5019
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Add support for PyYAML 5.3 Closes: https://github.com/aws/aws-cli/issues/4828 Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com> *Issue #, if available:* *Description of changes:* By submitting ...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -28,13 +28,14 @@ 'docutils>=0.10,<0.16', 'rsa>=3.1.2,<=3.5.0', 's3transfer>=0.3.0,<0.4.0', - 'PyYAML>=3.10,<5.3', ] if sys.version_info[:2] == (3, 4): + install_requires.append('PyYAML>=3.10,<5.3') install_requires.append(...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -28,13 +28,14 @@\n 'docutils>=0.10,<0.16',\n 'rsa>=3.1.2,<=3.5.0',\n 's3transfer>=0.3.0,<0.4.0',\n- 'PyYAML>=3.10,<5.3',\n ]\n \n \n if sys.version_info[:2] == (3, 4):\n+ install_requires.append('PyYAML>=3.10,<5.3')\...
1,562
197
gh_patches_debug_19776
rasdani/github-patches
git_diff
azavea__raster-vision-1484
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Local runner should write makefile to temporary dir Instead, it writes it to the `root_uri` which might be an S3 URI, and `make`, which is used by the local runner cannot handle that. Makefile error when `root_...
diff --git a/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py b/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py --- a/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py +++ b/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py @@ -2,7 +2,7 @@ from os....
{"golden_diff": "diff --git a/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py b/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py\n--- a/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py\n+++ b/rastervision_pipeline/rastervision/pipeline/runner/local_runner.py\n@@ -2...
1,651
268
gh_patches_debug_26415
rasdani/github-patches
git_diff
bokeh__bokeh-9163
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Update dataset for parallel coords plot examples The example currently does this: ``` df = pd.read_csv("https://raw.githubusercontent.com/bcdunbar/datasets/master/parcoords_data.csv") ``` Which is not rea...
diff --git a/examples/custom/parallel_plot/parallel_plot.py b/examples/custom/parallel_plot/parallel_plot.py --- a/examples/custom/parallel_plot/parallel_plot.py +++ b/examples/custom/parallel_plot/parallel_plot.py @@ -1,11 +1,11 @@ import numpy as np -import pandas as pd from bokeh.plotting import figure from bok...
{"golden_diff": "diff --git a/examples/custom/parallel_plot/parallel_plot.py b/examples/custom/parallel_plot/parallel_plot.py\n--- a/examples/custom/parallel_plot/parallel_plot.py\n+++ b/examples/custom/parallel_plot/parallel_plot.py\n@@ -1,11 +1,11 @@\n import numpy as np\n-import pandas as pd\n \n from bokeh.plotting...
1,905
303
gh_patches_debug_5990
rasdani/github-patches
git_diff
googleapis__python-bigquery-672
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> AttributeError in `resource_name_to_date()` samples fixture See this samples [test run](https://source.cloud.google.com/results/invocations/e5c424d5-84a6-4505-ae44-3bc70fa94e44/targets/cloud-devrel%2Fclient-lib...
diff --git a/samples/snippets/conftest.py b/samples/snippets/conftest.py --- a/samples/snippets/conftest.py +++ b/samples/snippets/conftest.py @@ -33,7 +33,7 @@ def resource_name_to_date(resource_name: str): start_date = len(RESOURCE_PREFIX) + 1 date_string = resource_name[start_date : start_date + RESOURCE_...
{"golden_diff": "diff --git a/samples/snippets/conftest.py b/samples/snippets/conftest.py\n--- a/samples/snippets/conftest.py\n+++ b/samples/snippets/conftest.py\n@@ -33,7 +33,7 @@\n def resource_name_to_date(resource_name: str):\n start_date = len(RESOURCE_PREFIX) + 1\n date_string = resource_name[start_date :...
1,461
133
gh_patches_debug_60681
rasdani/github-patches
git_diff
OCHA-DAP__hdx-ckan-1830
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Organization view pages result in 500 error Only on stag. I tested several different orgs. ![image](https://cloud.githubusercontent.com/assets/1654485/5165739/e9046902-73e8-11e4-9358-19cd8652c0c8.png) </is...
diff --git a/ckanext-hdx_search/ckanext/hdx_search/plugin.py b/ckanext-hdx_search/ckanext/hdx_search/plugin.py --- a/ckanext-hdx_search/ckanext/hdx_search/plugin.py +++ b/ckanext-hdx_search/ckanext/hdx_search/plugin.py @@ -36,7 +36,7 @@ return map def before_search(self, search_params): - search_...
{"golden_diff": "diff --git a/ckanext-hdx_search/ckanext/hdx_search/plugin.py b/ckanext-hdx_search/ckanext/hdx_search/plugin.py\n--- a/ckanext-hdx_search/ckanext/hdx_search/plugin.py\n+++ b/ckanext-hdx_search/ckanext/hdx_search/plugin.py\n@@ -36,7 +36,7 @@\n return map\n \n def before_search(self, search_pa...
1,281
169
gh_patches_debug_5673
rasdani/github-patches
git_diff
scikit-hep__pyhf-1546
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Different ordering of channels between model.config.channels and mode.config.channel_nbins # Description We've recently observed that the ordering of channels outputted from `model.config.channels` differs f...
diff --git a/src/pyhf/mixins.py b/src/pyhf/mixins.py --- a/src/pyhf/mixins.py +++ b/src/pyhf/mixins.py @@ -42,6 +42,9 @@ self.samples = sorted(list(set(self.samples))) self.parameters = sorted(list(set(self.parameters))) self.modifiers = sorted(list(set(self.modifiers))) + self.channel...
{"golden_diff": "diff --git a/src/pyhf/mixins.py b/src/pyhf/mixins.py\n--- a/src/pyhf/mixins.py\n+++ b/src/pyhf/mixins.py\n@@ -42,6 +42,9 @@\n self.samples = sorted(list(set(self.samples)))\n self.parameters = sorted(list(set(self.parameters)))\n self.modifiers = sorted(list(set(self.modifiers))...
1,630
125
gh_patches_debug_12825
rasdani/github-patches
git_diff
fossasia__open-event-server-4403
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Verify Email endpoint doesn’t work. **I'm submitting a ...** (check one with "x") - [X] bug report - [ ] feature request - [ ] support request => Please do not submit support requests here, instead ask you...
diff --git a/app/api/auth.py b/app/api/auth.py --- a/app/api/auth.py +++ b/app/api/auth.py @@ -35,6 +35,8 @@ ) else: user.is_verified = True + save_to_db(user) + return make_response(jsonify(message="Email Verified"), 200) @auth_routes.route('/reset-password', methods=['POST'])...
{"golden_diff": "diff --git a/app/api/auth.py b/app/api/auth.py\n--- a/app/api/auth.py\n+++ b/app/api/auth.py\n@@ -35,6 +35,8 @@\n )\n else:\n user.is_verified = True\n+ save_to_db(user)\n+ return make_response(jsonify(message=\"Email Verified\"), 200)\n \n \n @auth_routes.route('/rese...
1,553
171
gh_patches_debug_7577
rasdani/github-patches
git_diff
webkom__lego-24
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Add shell pluss and django extensions </issue> <code> [start of lego/settings/base.py] 1 import sys 2 import os 3 BASE_DIR = os.path.dirname(os.path.dirname(__file__)) 4 5 SECRET_KEY = 'This is supersecret' ...
diff --git a/lego/settings/base.py b/lego/settings/base.py --- a/lego/settings/base.py +++ b/lego/settings/base.py @@ -6,6 +6,8 @@ TESTING = 'test' in sys.argv # Check if manage.py test has been run +SHELL_PLUS = "ipython" + DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] @@ -20,6 +22,8 @@ 'django.c...
{"golden_diff": "diff --git a/lego/settings/base.py b/lego/settings/base.py\n--- a/lego/settings/base.py\n+++ b/lego/settings/base.py\n@@ -6,6 +6,8 @@\n \n TESTING = 'test' in sys.argv # Check if manage.py test has been run\n \n+SHELL_PLUS = \"ipython\"\n+\n DEBUG = True\n TEMPLATE_DEBUG = True\n ALLOWED_HOSTS = []\n@...
1,048
135
gh_patches_debug_25227
rasdani/github-patches
git_diff
Textualize__textual-584
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Lazy load Widgets We have a `widgets` module that imports all the widgets. THis allows for easy imports like: ```python from textual.widgets import DataTable, Button ``` The downside is that all widgets...
diff --git a/src/textual/widgets/__init__.py b/src/textual/widgets/__init__.py --- a/src/textual/widgets/__init__.py +++ b/src/textual/widgets/__init__.py @@ -1,21 +1,41 @@ -from ._footer import Footer -from ._header import Header -from ._button import Button -from ._placeholder import Placeholder -from ._static import...
{"golden_diff": "diff --git a/src/textual/widgets/__init__.py b/src/textual/widgets/__init__.py\n--- a/src/textual/widgets/__init__.py\n+++ b/src/textual/widgets/__init__.py\n@@ -1,21 +1,41 @@\n-from ._footer import Footer\n-from ._header import Header\n-from ._button import Button\n-from ._placeholder import Placehold...
772
459
gh_patches_debug_14294
rasdani/github-patches
git_diff
scikit-image__scikit-image-4172
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> IO: unhandled exception, in case the URL cannot be opened ## Description ![image](https://user-images.githubusercontent.com/30770221/53887634-4a1eb600-3fe8-11e9-97db-f374815eb620.png) ## Way to reproduce...
diff --git a/skimage/io/util.py b/skimage/io/util.py --- a/skimage/io/util.py +++ b/skimage/io/util.py @@ -1,5 +1,6 @@ import urllib.parse import urllib.request +from urllib.error import URLError, HTTPError import os import re @@ -28,7 +29,15 @@ f.write(u.read()) # f must be closed b...
{"golden_diff": "diff --git a/skimage/io/util.py b/skimage/io/util.py\n--- a/skimage/io/util.py\n+++ b/skimage/io/util.py\n@@ -1,5 +1,6 @@\n import urllib.parse\n import urllib.request\n+from urllib.error import URLError, HTTPError\n \n import os\n import re\n@@ -28,7 +29,15 @@\n f.write(u.read())\n ...
1,656
188
gh_patches_debug_33372
rasdani/github-patches
git_diff
rasterio__rasterio-241
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> rio merge assumes nodata Running `rio merge` over a set of images without a nodata value results in an error: ``` (rio-test)$ rio merge warped.tif merged.tif ERROR:rio:Failed. Exception caught Traceback (most ...
diff --git a/rasterio/rio/merge.py b/rasterio/rio/merge.py --- a/rasterio/rio/merge.py +++ b/rasterio/rio/merge.py @@ -36,31 +36,39 @@ with rasterio.open(files[0]) as first: kwargs = first.meta kwargs['transform'] = kwargs.pop('affine') - dest = np.empty((fi...
{"golden_diff": "diff --git a/rasterio/rio/merge.py b/rasterio/rio/merge.py\n--- a/rasterio/rio/merge.py\n+++ b/rasterio/rio/merge.py\n@@ -36,31 +36,39 @@\n with rasterio.open(files[0]) as first:\n kwargs = first.meta\n kwargs['transform'] = kwargs.pop('affine')\n- ...
1,670
492
gh_patches_debug_14851
rasdani/github-patches
git_diff
python-poetry__poetry-289
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> CLI help for install is ambiguous <!-- Checked checkbox should look like this: [x] --> - [x] I am on the [latest](https://github.com/sdispater/poetry/releases/latest) Poetry version. - [x] I have searched the...
diff --git a/poetry/console/commands/install.py b/poetry/console/commands/install.py --- a/poetry/console/commands/install.py +++ b/poetry/console/commands/install.py @@ -13,12 +13,12 @@ { --develop=* : Install given packages in development mode. } """ - help = """The <info>install</info> command rea...
{"golden_diff": "diff --git a/poetry/console/commands/install.py b/poetry/console/commands/install.py\n--- a/poetry/console/commands/install.py\n+++ b/poetry/console/commands/install.py\n@@ -13,12 +13,12 @@\n { --develop=* : Install given packages in development mode. }\n \"\"\"\n \n- help = \"\"\"The <i...
1,544
215
gh_patches_debug_19685
rasdani/github-patches
git_diff
quantumlib__Cirq-1345
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Make ControlledGate work with gates that only provide a decomposition The following should work: ``` import cirq class G(cirq.TwoQubitGate): def _decompose_(self, qubits): a, b = qubits ...
diff --git a/cirq/ops/controlled_gate.py b/cirq/ops/controlled_gate.py --- a/cirq/ops/controlled_gate.py +++ b/cirq/ops/controlled_gate.py @@ -115,7 +115,18 @@ def _circuit_diagram_info_(self, args: protocols.CircuitDiagramInfoArgs ) -> protocols.Circ...
{"golden_diff": "diff --git a/cirq/ops/controlled_gate.py b/cirq/ops/controlled_gate.py\n--- a/cirq/ops/controlled_gate.py\n+++ b/cirq/ops/controlled_gate.py\n@@ -115,7 +115,18 @@\n def _circuit_diagram_info_(self,\n args: protocols.CircuitDiagramInfoArgs\n ...
2,042
253
gh_patches_debug_133
rasdani/github-patches
git_diff
holoviz__panel-752
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> panel/examples/apps/django2/ example doesn't work The django2 example doesn't work at least for Django 2.2. The interactive plot doesn't show up and there are no clear error messages either. However, the same e...
diff --git a/examples/apps/django2/sliders/bk_sliders.py b/examples/apps/django2/sliders/bk_sliders.py --- a/examples/apps/django2/sliders/bk_sliders.py +++ b/examples/apps/django2/sliders/bk_sliders.py @@ -5,4 +5,4 @@ def app(doc): sw = SineWave() row = pn.Row(sw.param, sw.plot) - row._get_root(doc) + ...
{"golden_diff": "diff --git a/examples/apps/django2/sliders/bk_sliders.py b/examples/apps/django2/sliders/bk_sliders.py\n--- a/examples/apps/django2/sliders/bk_sliders.py\n+++ b/examples/apps/django2/sliders/bk_sliders.py\n@@ -5,4 +5,4 @@\n def app(doc):\n sw = SineWave()\n row = pn.Row(sw.param, sw.plot)\n- ...
674
108
gh_patches_debug_11398
rasdani/github-patches
git_diff
dotkom__onlineweb4-741
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Ability to format company-url ![screenshot from 2014-01-29 17 32 37](https://f.cloud.github.com/assets/1758308/2031524/225447e4-8903-11e3-9de0-90237ad655ba.png) Like in this case, this ugly url should be format...
diff --git a/apps/companyprofile/models.py b/apps/companyprofile/models.py --- a/apps/companyprofile/models.py +++ b/apps/companyprofile/models.py @@ -14,7 +14,7 @@ image = FileBrowseField(_(u"bilde"), max_length=200, directory=IMAGE_FOLDER, extensions=IMAGE_EXTENSIONS, null=False, blank=False) ...
{"golden_diff": "diff --git a/apps/companyprofile/models.py b/apps/companyprofile/models.py\n--- a/apps/companyprofile/models.py\n+++ b/apps/companyprofile/models.py\n@@ -14,7 +14,7 @@\n image = FileBrowseField(_(u\"bilde\"), \n max_length=200, directory=IMAGE_FOLDER,\n extensions=IMAGE_EXTENSIONS, ...
976
174
gh_patches_debug_2803
rasdani/github-patches
git_diff
sopel-irc__sopel-1261
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Results from currency conversion should be rounded to 2 decimals At the moment, the results of a currency conversion query is reported as a float: < mynick> .cur 100 SEK to USD < mybot> 100.0 SEK (S...
diff --git a/sopel/modules/currency.py b/sopel/modules/currency.py --- a/sopel/modules/currency.py +++ b/sopel/modules/currency.py @@ -74,7 +74,7 @@ return NOLIMIT result = amount / of_rate * to_rate - bot.say("{} {} ({}) = {} {} ({})".format(amount, of.upper(), of_name, + bot.say("{:.2f} {} ({}) ...
{"golden_diff": "diff --git a/sopel/modules/currency.py b/sopel/modules/currency.py\n--- a/sopel/modules/currency.py\n+++ b/sopel/modules/currency.py\n@@ -74,7 +74,7 @@\n return NOLIMIT\n \n result = amount / of_rate * to_rate\n- bot.say(\"{} {} ({}) = {} {} ({})\".format(amount, of.upper(), of_name,\n+ ...
1,788
132
gh_patches_debug_445
rasdani/github-patches
git_diff
docker__docker-py-1156
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Requests v2.11.0 causes breakage This is a known issue within requests and looks like it will be fixed in v2.11.1. Documenting for the benefit of anyone else who runs into this :). After a recent pip upgrade I...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ SOURCE_DIR = os.path.join(ROOT_DIR) requirements = [ - 'requests >= 2.5.2', + 'requests >= 2.5.2, < 2.11', 'six >= 1.4.0', 'websocket-client >= 0.32.0', ]
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -9,7 +9,7 @@\n SOURCE_DIR = os.path.join(ROOT_DIR)\n \n requirements = [\n- 'requests >= 2.5.2',\n+ 'requests >= 2.5.2, < 2.11',\n 'six >= 1.4.0',\n 'websocket-client >= 0.32.0',\n ]\n", "issue": "Requests v2.11.0 causes...
1,375
100
gh_patches_debug_39038
rasdani/github-patches
git_diff
alltheplaces__alltheplaces-3314
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Spider kum_and_go is broken During the global build at 2021-08-25-14-42-15, spider **kum_and_go** failed with **0 features** and **0 errors**. Here's [the log](https://data.alltheplaces.xyz/runs/2021-08-25-14-...
diff --git a/locations/spiders/kum_and_go.py b/locations/spiders/kum_and_go.py --- a/locations/spiders/kum_and_go.py +++ b/locations/spiders/kum_and_go.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +import csv import scrapy import json @@ -12,56 +13,27 @@ allowed_domains = ["kumandgo.com"] def start_reque...
{"golden_diff": "diff --git a/locations/spiders/kum_and_go.py b/locations/spiders/kum_and_go.py\n--- a/locations/spiders/kum_and_go.py\n+++ b/locations/spiders/kum_and_go.py\n@@ -1,4 +1,5 @@\n # -*- coding: utf-8 -*-\n+import csv\n import scrapy\n import json\n \n@@ -12,56 +13,27 @@\n allowed_domains = [\"kumandgo....
1,428
828
gh_patches_debug_27197
rasdani/github-patches
git_diff
ansible__ansible-modules-core-3886
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> junos_facts - config parameter should have a default value ##### COMPONENT NAME module : junos_facts ``` network/junos_facts.py ``` ##### ANSIBLE VERSION 2.1.0.0 ##### OS / ENVIRONMENT Mac OS 10.11.5 ##### ...
diff --git a/network/junos/junos_facts.py b/network/junos/junos_facts.py --- a/network/junos/junos_facts.py +++ b/network/junos/junos_facts.py @@ -37,8 +37,8 @@ is then included in return facts. By default, the configuration is returned as text. The C(config_format) can be used to return di...
{"golden_diff": "diff --git a/network/junos/junos_facts.py b/network/junos/junos_facts.py\n--- a/network/junos/junos_facts.py\n+++ b/network/junos/junos_facts.py\n@@ -37,8 +37,8 @@\n is then included in return facts. By default, the configuration\n is returned as text. The C(config_format) can be used...
1,899
296
gh_patches_debug_5836
rasdani/github-patches
git_diff
sanic-org__sanic-961
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Cookie secure option not encoded properly When `Cookies.encode` encounters `response.cookies["<cookie>"]["secure"] = False` then it outputs: `b'Domain=xad.com; Path=/; Secure=False'` where it should outpu...
diff --git a/sanic/cookies.py b/sanic/cookies.py --- a/sanic/cookies.py +++ b/sanic/cookies.py @@ -98,7 +98,8 @@ def __setitem__(self, key, value): if key not in self._keys: raise KeyError("Unknown cookie property") - return super().__setitem__(key, value) + if value is not Fals...
{"golden_diff": "diff --git a/sanic/cookies.py b/sanic/cookies.py\n--- a/sanic/cookies.py\n+++ b/sanic/cookies.py\n@@ -98,7 +98,8 @@\n def __setitem__(self, key, value):\n if key not in self._keys:\n raise KeyError(\"Unknown cookie property\")\n- return super().__setitem__(key, value)\n+ ...
1,979
133
gh_patches_debug_39301
rasdani/github-patches
git_diff
mathesar-foundation__mathesar-114
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Handle routing takeover at client Currently, routing is handled by Django. When the user visits the application initially, the routing should be handled by Django, and after the application loads, the routing s...
diff --git a/mathesar/urls.py b/mathesar/urls.py --- a/mathesar/urls.py +++ b/mathesar/urls.py @@ -14,11 +14,7 @@ urlpatterns = [ path('', frontend.index, name="index"), - path( - 'tables/<int:pk>/', - frontend.TableDetail.as_view(), - name='frontend-table-detail', - ), + path('tab...
{"golden_diff": "diff --git a/mathesar/urls.py b/mathesar/urls.py\n--- a/mathesar/urls.py\n+++ b/mathesar/urls.py\n@@ -14,11 +14,7 @@\n \n urlpatterns = [\n path('', frontend.index, name=\"index\"),\n- path(\n- 'tables/<int:pk>/',\n- frontend.TableDetail.as_view(),\n- name='frontend-table-de...
1,166
737
gh_patches_debug_19303
rasdani/github-patches
git_diff
netbox-community__netbox-5286
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Plugins must define app_name in api/urls.py to be included in API root view ### Environment * Python version: 3.6.9 * NetBox version: 2.9.7 ### Steps to Reproduce I'm actually not certain whether this is ...
diff --git a/netbox/extras/plugins/views.py b/netbox/extras/plugins/views.py --- a/netbox/extras/plugins/views.py +++ b/netbox/extras/plugins/views.py @@ -10,8 +10,6 @@ from rest_framework.reverse import reverse from rest_framework.views import APIView -from extras.plugins.utils import import_object - class Inst...
{"golden_diff": "diff --git a/netbox/extras/plugins/views.py b/netbox/extras/plugins/views.py\n--- a/netbox/extras/plugins/views.py\n+++ b/netbox/extras/plugins/views.py\n@@ -10,8 +10,6 @@\n from rest_framework.reverse import reverse\n from rest_framework.views import APIView\n \n-from extras.plugins.utils import impor...
1,726
220
gh_patches_debug_8842
rasdani/github-patches
git_diff
deepset-ai__haystack-1620
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Connection Error. Is Haystack running? JSON Issue with Docker Compose On Fresh Repo and Image Pulls ### Discussed in https://github.com/deepset-ai/haystack/discussions/1617 <div type='discussions-op-text'> ...
diff --git a/ui/utils.py b/ui/utils.py --- a/ui/utils.py +++ b/ui/utils.py @@ -25,7 +25,7 @@ def retrieve_doc(query, filters=None, top_k_reader=5, top_k_retriever=5): # Query Haystack API url = f"{API_ENDPOINT}/{DOC_REQUEST}" - params = {"filters": filters, "ESRetriever": {"top_k": top_k_retriever}, "Read...
{"golden_diff": "diff --git a/ui/utils.py b/ui/utils.py\n--- a/ui/utils.py\n+++ b/ui/utils.py\n@@ -25,7 +25,7 @@\n def retrieve_doc(query, filters=None, top_k_reader=5, top_k_retriever=5):\n # Query Haystack API\n url = f\"{API_ENDPOINT}/{DOC_REQUEST}\"\n- params = {\"filters\": filters, \"ESRetriever\": {\"...
1,345
174
gh_patches_debug_21955
rasdani/github-patches
git_diff
netbox-community__netbox-15135
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Tunnel Group is not selectable as column in VPN tunnels list ### Deployment Type Self-hosted ### NetBox Version v3.7.2 ### Python Version 3.11 ### Steps to Reproduce 1. Go to VPN - Tunnels 2. Click Conf...
diff --git a/netbox/vpn/tables/tunnels.py b/netbox/vpn/tables/tunnels.py --- a/netbox/vpn/tables/tunnels.py +++ b/netbox/vpn/tables/tunnels.py @@ -40,6 +40,10 @@ verbose_name=_('Name'), linkify=True ) + group = tables.Column( + verbose_name=_('Group'), + linkify=True + ) ...
{"golden_diff": "diff --git a/netbox/vpn/tables/tunnels.py b/netbox/vpn/tables/tunnels.py\n--- a/netbox/vpn/tables/tunnels.py\n+++ b/netbox/vpn/tables/tunnels.py\n@@ -40,6 +40,10 @@\n verbose_name=_('Name'),\n linkify=True\n )\n+ group = tables.Column(\n+ verbose_name=_('Group'),\n+ ...
1,654
341
gh_patches_debug_31423
rasdani/github-patches
git_diff
alltheplaces__alltheplaces-8374
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Wendy's incorrect hours ATP populates incorrect hours for Wendy's. It's populating 10:30 when [the Wendy's website](https://locations.wendys.com/united-states/oh/loveland/10601-loveland-madeira-rd) says 12:00am...
diff --git a/locations/spiders/wendys.py b/locations/spiders/wendys.py --- a/locations/spiders/wendys.py +++ b/locations/spiders/wendys.py @@ -1,10 +1,48 @@ +import json + from scrapy.spiders import SitemapSpider +from locations.hours import OpeningHours from locations.structured_data_spider import StructuredDataSp...
{"golden_diff": "diff --git a/locations/spiders/wendys.py b/locations/spiders/wendys.py\n--- a/locations/spiders/wendys.py\n+++ b/locations/spiders/wendys.py\n@@ -1,10 +1,48 @@\n+import json\n+\n from scrapy.spiders import SitemapSpider\n \n+from locations.hours import OpeningHours\n from locations.structured_data_spid...
870
569
gh_patches_debug_23365
rasdani/github-patches
git_diff
biopython__biopython-4029
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Add option to silence/capture stdout/stderr from Bio.PDB.PSEA Spun from #3980. Running `p-sea` through `Bio.PDB.PSEA` will always print output to standard out. We should refactor the code to use `subprocess....
diff --git a/Bio/PDB/PSEA.py b/Bio/PDB/PSEA.py --- a/Bio/PDB/PSEA.py +++ b/Bio/PDB/PSEA.py @@ -17,11 +17,12 @@ """ import subprocess +import os from Bio.PDB.Polypeptide import is_aa -def run_psea(fname): +def run_psea(fname, verbose=False): """Run PSEA and return output filename. Note that this a...
{"golden_diff": "diff --git a/Bio/PDB/PSEA.py b/Bio/PDB/PSEA.py\n--- a/Bio/PDB/PSEA.py\n+++ b/Bio/PDB/PSEA.py\n@@ -17,11 +17,12 @@\n \"\"\"\n \n import subprocess\n+import os\n \n from Bio.PDB.Polypeptide import is_aa\n \n \n-def run_psea(fname):\n+def run_psea(fname, verbose=False):\n \"\"\"Run PSEA and return out...
1,693
339
gh_patches_debug_2944
rasdani/github-patches
git_diff
ivy-llc__ivy-14663
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Fix generating_index_arrays.test_numpy_diag_indices | | | |---|---| |paddle|<a href="https://github.com/unifyai/ivy/actions/runs/6413197943/job/17411744582"><img src=https://img.shields.io/badge/-failure-...
diff --git a/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py b/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py --- a/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py +++ b/ivy/functional/frontends/numpy/indexing_routines/generating_index...
{"golden_diff": "diff --git a/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py b/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py\n--- a/ivy/functional/frontends/numpy/indexing_routines/generating_index_arrays.py\n+++ b/ivy/functional/frontends/numpy/indexing_routin...
1,252
198
gh_patches_debug_38909
rasdani/github-patches
git_diff
bridgecrewio__checkov-2330
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> BC_AWS_PUBLIC_1 does not take Conditions into account **Describe the bug** BC_AWS_PUBLIC_1 seems to only look for the principal in a ECR Resource Policy. If you want to control access to a repo based on the pr...
diff --git a/checkov/cloudformation/checks/resource/aws/ECRPolicy.py b/checkov/cloudformation/checks/resource/aws/ECRPolicy.py --- a/checkov/cloudformation/checks/resource/aws/ECRPolicy.py +++ b/checkov/cloudformation/checks/resource/aws/ECRPolicy.py @@ -31,9 +31,22 @@ for statement_index, statemen...
{"golden_diff": "diff --git a/checkov/cloudformation/checks/resource/aws/ECRPolicy.py b/checkov/cloudformation/checks/resource/aws/ECRPolicy.py\n--- a/checkov/cloudformation/checks/resource/aws/ECRPolicy.py\n+++ b/checkov/cloudformation/checks/resource/aws/ECRPolicy.py\n@@ -31,9 +31,22 @@\n for stat...
1,792
642
gh_patches_debug_88
rasdani/github-patches
git_diff
watchdogpolska__small_eod-479
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Tagi Stworzenie ekranu Tagi tabela zawiera kolumnę * tag (pole `name` w serializatorze) Ekran paginowy wielkość strony 20 Ekran dostępny z menu bocznego </issue> <code> [start of backend-project/small...
diff --git a/backend-project/small_eod/tags/serializers.py b/backend-project/small_eod/tags/serializers.py --- a/backend-project/small_eod/tags/serializers.py +++ b/backend-project/small_eod/tags/serializers.py @@ -7,4 +7,5 @@ model = Tag fields = [ "name", + "id", ]
{"golden_diff": "diff --git a/backend-project/small_eod/tags/serializers.py b/backend-project/small_eod/tags/serializers.py\n--- a/backend-project/small_eod/tags/serializers.py\n+++ b/backend-project/small_eod/tags/serializers.py\n@@ -7,4 +7,5 @@\n model = Tag\n fields = [\n \"name\",\n+ ...
655
83
gh_patches_debug_37653
rasdani/github-patches
git_diff
python-telegram-bot__python-telegram-bot-2149
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> [BUG] Update timerbot example https://github.com/python-telegram-bot/python-telegram-bot/blob/3b4559dd95d14a4c9a9ca54237b5fe547386b666/examples/timerbot.py#L56-L58 If the job has already run, those lines giv...
diff --git a/examples/timerbot.py b/examples/timerbot.py --- a/examples/timerbot.py +++ b/examples/timerbot.py @@ -42,6 +42,16 @@ context.bot.send_message(job.context, text='Beep!') +def remove_job_if_exists(name, context): + """Remove job with given name. Returns whether job was removed.""" + current_jo...
{"golden_diff": "diff --git a/examples/timerbot.py b/examples/timerbot.py\n--- a/examples/timerbot.py\n+++ b/examples/timerbot.py\n@@ -42,6 +42,16 @@\n context.bot.send_message(job.context, text='Beep!')\n \n \n+def remove_job_if_exists(name, context):\n+ \"\"\"Remove job with given name. Returns whether job was...
1,734
668
gh_patches_debug_32102
rasdani/github-patches
git_diff
getsentry__sentry-2226
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> 500 error when rename team slug Error raised if same slug already exists Traceback: ``` File "/home/www/pyenv/versions/sentry/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_respon...
diff --git a/src/sentry/web/frontend/team_settings.py b/src/sentry/web/frontend/team_settings.py --- a/src/sentry/web/frontend/team_settings.py +++ b/src/sentry/web/frontend/team_settings.py @@ -3,6 +3,7 @@ from django import forms from django.contrib import messages from django.core.urlresolvers import reverse +fro...
{"golden_diff": "diff --git a/src/sentry/web/frontend/team_settings.py b/src/sentry/web/frontend/team_settings.py\n--- a/src/sentry/web/frontend/team_settings.py\n+++ b/src/sentry/web/frontend/team_settings.py\n@@ -3,6 +3,7 @@\n from django import forms\n from django.contrib import messages\n from django.core.urlresolv...
1,981
419
gh_patches_debug_29925
rasdani/github-patches
git_diff
kornia__kornia-2009
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Update `make test-all` ```Makefile # TODO: Add cuda-float16 when #649 is solved test-all: FORCE pytest -v --device all --dtype float32,float64 --cov=kornia test/ --flake8 --mypy ``` Maybe instead of just ...
diff --git a/kornia/enhance/core.py b/kornia/enhance/core.py --- a/kornia/enhance/core.py +++ b/kornia/enhance/core.py @@ -1,8 +1,12 @@ -from kornia.core import Module, Tensor +from typing import Union + +from kornia.core import Module, Tensor, tensor from kornia.testing import KORNIA_CHECK, KORNIA_CHECK_IS_TENSOR ...
{"golden_diff": "diff --git a/kornia/enhance/core.py b/kornia/enhance/core.py\n--- a/kornia/enhance/core.py\n+++ b/kornia/enhance/core.py\n@@ -1,8 +1,12 @@\n-from kornia.core import Module, Tensor\n+from typing import Union\n+\n+from kornia.core import Module, Tensor, tensor\n from kornia.testing import KORNIA_CHECK, K...
1,690
442
gh_patches_debug_18224
rasdani/github-patches
git_diff
internetarchive__openlibrary-6910
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Data Dumps not auto-generating Despite #5263 being resolved, it looks like the data dumps weren't uploaded on July 1st :/ ### Relevant URL? * https://github.com/internetarchive/openlibrary/wiki/Generating-...
diff --git a/scripts/oldump.py b/scripts/oldump.py --- a/scripts/oldump.py +++ b/scripts/oldump.py @@ -19,6 +19,7 @@ if __name__ == "__main__": + from contextlib import redirect_stdout from infogami import config from openlibrary.config import load_config from openlibrary.data import dump @@ -29,...
{"golden_diff": "diff --git a/scripts/oldump.py b/scripts/oldump.py\n--- a/scripts/oldump.py\n+++ b/scripts/oldump.py\n@@ -19,6 +19,7 @@\n \n \n if __name__ == \"__main__\":\n+ from contextlib import redirect_stdout\n from infogami import config\n from openlibrary.config import load_config\n from openlib...
1,313
229
gh_patches_debug_9976
rasdani/github-patches
git_diff
mkdocs__mkdocs-2421
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> file-system race condition while testing with mkdocs serve when mkdocs serve is shutting down, it cleans up after itself removing the temporary directory created earlier. the condition whether the directory ...
diff --git a/mkdocs/commands/serve.py b/mkdocs/commands/serve.py --- a/mkdocs/commands/serve.py +++ b/mkdocs/commands/serve.py @@ -2,7 +2,7 @@ import shutil import tempfile -from os.path import isfile, join +from os.path import isdir, isfile, join from mkdocs.commands.build import build from mkdocs.config import ...
{"golden_diff": "diff --git a/mkdocs/commands/serve.py b/mkdocs/commands/serve.py\n--- a/mkdocs/commands/serve.py\n+++ b/mkdocs/commands/serve.py\n@@ -2,7 +2,7 @@\n import shutil\n import tempfile\n \n-from os.path import isfile, join\n+from os.path import isdir, isfile, join\n from mkdocs.commands.build import build\n...
1,455
159
gh_patches_debug_12053
rasdani/github-patches
git_diff
lnbits__lnbits-215
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> No success message and URL returned with LNURLp links As the title says, the neither the URL, nor the message are returned to the wallet making the payment. This used to work when I was still on the [latest `ra...
diff --git a/lnbits/extensions/lnurlp/lnurl.py b/lnbits/extensions/lnurlp/lnurl.py --- a/lnbits/extensions/lnurlp/lnurl.py +++ b/lnbits/extensions/lnurlp/lnurl.py @@ -95,13 +95,17 @@ extra={"tag": "lnurlp", "link": link.id, "comment": comment}, ) - resp = { - "routes": [], - "pr": payme...
{"golden_diff": "diff --git a/lnbits/extensions/lnurlp/lnurl.py b/lnbits/extensions/lnurlp/lnurl.py\n--- a/lnbits/extensions/lnurlp/lnurl.py\n+++ b/lnbits/extensions/lnurlp/lnurl.py\n@@ -95,13 +95,17 @@\n extra={\"tag\": \"lnurlp\", \"link\": link.id, \"comment\": comment},\n )\n \n- resp = {\n- \...
1,755
232
gh_patches_debug_2997
rasdani/github-patches
git_diff
ivy-llc__ivy-20554
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> rfftn </issue> <code> [start of ivy/functional/frontends/scipy/fft/fft.py] 1 # global 2 import ivy 3 from ivy.functional.frontends.scipy.func_wrapper import ( 4 to_ivy_arrays_and_back, 5 ) 6 7 8 # fft 9...
diff --git a/ivy/functional/frontends/scipy/fft/fft.py b/ivy/functional/frontends/scipy/fft/fft.py --- a/ivy/functional/frontends/scipy/fft/fft.py +++ b/ivy/functional/frontends/scipy/fft/fft.py @@ -40,3 +40,10 @@ x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None ): return ivy.if...
{"golden_diff": "diff --git a/ivy/functional/frontends/scipy/fft/fft.py b/ivy/functional/frontends/scipy/fft/fft.py\n--- a/ivy/functional/frontends/scipy/fft/fft.py\n+++ b/ivy/functional/frontends/scipy/fft/fft.py\n@@ -40,3 +40,10 @@\n x, s=None, axes=None, norm=None, overwrite_x=False, workers=None, *, plan=None\n...
1,027
186
gh_patches_debug_14237
rasdani/github-patches
git_diff
mne-tools__mne-python-10739
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> montage_sgskip.py example doesn't run When trying to run the example in `examples/visualization/montage_sgskip.py`, I get an exception: ```python ValueError: A head<->mri transformation matrix (trans) is re...
diff --git a/examples/visualization/montage_sgskip.py b/examples/visualization/montage_sgskip.py --- a/examples/visualization/montage_sgskip.py +++ b/examples/visualization/montage_sgskip.py @@ -16,6 +16,7 @@ # %% import os.path as op +import numpy as np import mne from mne.channels.montage import get_builtin_m...
{"golden_diff": "diff --git a/examples/visualization/montage_sgskip.py b/examples/visualization/montage_sgskip.py\n--- a/examples/visualization/montage_sgskip.py\n+++ b/examples/visualization/montage_sgskip.py\n@@ -16,6 +16,7 @@\n # %%\n \n import os.path as op\n+import numpy as np\n \n import mne\n from mne.channels.m...
1,343
207
gh_patches_debug_27163
rasdani/github-patches
git_diff
wemake-services__wemake-python-styleguide-844
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> `if` after `else` in `try` raises false positive WPS513 # Bug report <!-- Hi, thanks for submitting a bug. We appreciate that. But, we will need some information about what's wrong to help you. --> #...
diff --git a/wemake_python_styleguide/visitors/tokenize/conditions.py b/wemake_python_styleguide/visitors/tokenize/conditions.py --- a/wemake_python_styleguide/visitors/tokenize/conditions.py +++ b/wemake_python_styleguide/visitors/tokenize/conditions.py @@ -57,11 +57,36 @@ """ self._check_implicit_el...
{"golden_diff": "diff --git a/wemake_python_styleguide/visitors/tokenize/conditions.py b/wemake_python_styleguide/visitors/tokenize/conditions.py\n--- a/wemake_python_styleguide/visitors/tokenize/conditions.py\n+++ b/wemake_python_styleguide/visitors/tokenize/conditions.py\n@@ -57,11 +57,36 @@\n \"\"\"\n ...
1,295
427
gh_patches_debug_19372
rasdani/github-patches
git_diff
aws-powertools__powertools-lambda-python-1534
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Static typing: aws_lambda_powertools.logging.utils.copy_config_to_registered_loggers argument log_level should accept int ### Static type checker used mypy (project's standard) ### AWS Lambda function run...
diff --git a/aws_lambda_powertools/logging/utils.py b/aws_lambda_powertools/logging/utils.py --- a/aws_lambda_powertools/logging/utils.py +++ b/aws_lambda_powertools/logging/utils.py @@ -8,7 +8,7 @@ def copy_config_to_registered_loggers( source_logger: Logger, - log_level: Optional[str] = None, + log_leve...
{"golden_diff": "diff --git a/aws_lambda_powertools/logging/utils.py b/aws_lambda_powertools/logging/utils.py\n--- a/aws_lambda_powertools/logging/utils.py\n+++ b/aws_lambda_powertools/logging/utils.py\n@@ -8,7 +8,7 @@\n \n def copy_config_to_registered_loggers(\n source_logger: Logger,\n- log_level: Optional[st...
1,691
213
gh_patches_debug_24756
rasdani/github-patches
git_diff
netbox-community__netbox-2290
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> deficiency in new webhook implementation <!-- Before opening a new issue, please search through the existing issues to see if your topic has already been addressed. Note that you may need to remo...
diff --git a/netbox/extras/webhooks_worker.py b/netbox/extras/webhooks_worker.py --- a/netbox/extras/webhooks_worker.py +++ b/netbox/extras/webhooks_worker.py @@ -1,8 +1,10 @@ import hashlib import hmac - import requests +import json + from django_rq import job +from rest_framework.utils.encoders import JSONEncoder...
{"golden_diff": "diff --git a/netbox/extras/webhooks_worker.py b/netbox/extras/webhooks_worker.py\n--- a/netbox/extras/webhooks_worker.py\n+++ b/netbox/extras/webhooks_worker.py\n@@ -1,8 +1,10 @@\n import hashlib\n import hmac\n-\n import requests\n+import json\n+\n from django_rq import job\n+from rest_framework.utils...
1,917
288
gh_patches_debug_31702
rasdani/github-patches
git_diff
napari__napari-6821
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Test vectors # Description This PR adds tests for the vectors layer, improves the doc strings and cleans up the code a tiny bit, but doesn't change any functionality. One question is - should the input para...
diff --git a/napari/_app_model/actions/_view_actions.py b/napari/_app_model/actions/_view_actions.py deleted file mode 100644 --- a/napari/_app_model/actions/_view_actions.py +++ /dev/null @@ -1,64 +0,0 @@ -"""Actions related to the 'View' menu that do not require Qt. - -View actions that do require Qt should go in -`n...
{"golden_diff": "diff --git a/napari/_app_model/actions/_view_actions.py b/napari/_app_model/actions/_view_actions.py\ndeleted file mode 100644\n--- a/napari/_app_model/actions/_view_actions.py\n+++ /dev/null\n@@ -1,64 +0,0 @@\n-\"\"\"Actions related to the 'View' menu that do not require Qt.\n-\n-View actions that do ...
1,549
661
gh_patches_debug_10596
rasdani/github-patches
git_diff
xonsh__xonsh-1630
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Autocomplete: don't display full path Using `prompt_kit`, when completing a path such as `/var/log/<TAB>`, the autocompletion menu shows fully prefixed entries. The problem is that when the path is very deep, ...
diff --git a/xonsh/ptk/completer.py b/xonsh/ptk/completer.py --- a/xonsh/ptk/completer.py +++ b/xonsh/ptk/completer.py @@ -40,7 +40,11 @@ pass elif len(os.path.commonprefix(completions)) <= len(prefix): self.reserve_space() + prefix, _, compprefi...
{"golden_diff": "diff --git a/xonsh/ptk/completer.py b/xonsh/ptk/completer.py\n--- a/xonsh/ptk/completer.py\n+++ b/xonsh/ptk/completer.py\n@@ -40,7 +40,11 @@\n pass\n elif len(os.path.commonprefix(completions)) <= len(prefix):\n self.reserve_space()\n+ ...
1,338
171
gh_patches_debug_33734
rasdani/github-patches
git_diff
3cn-ecn__nantralPlatform-484
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Problème avec les liens vers les auteur.ic.es des suggestions Quand quelqu'un fait une suggestion depuis le site, le lien pour avoir le nom de la personne ne fonctionne pas. </issue> <code> [start of server/ap...
diff --git a/server/apps/home/forms.py b/server/apps/home/forms.py --- a/server/apps/home/forms.py +++ b/server/apps/home/forms.py @@ -1,5 +1,14 @@ from django import forms +TYPE_CHOICES = ( + (1, ("Bug")), + (2, ("Suggestion")) +) + + class SuggestionForm(forms.Form): title = forms.CharField(max_length=...
{"golden_diff": "diff --git a/server/apps/home/forms.py b/server/apps/home/forms.py\n--- a/server/apps/home/forms.py\n+++ b/server/apps/home/forms.py\n@@ -1,5 +1,14 @@\n from django import forms\n \n+TYPE_CHOICES = (\n+ (1, (\"Bug\")),\n+ (2, (\"Suggestion\"))\n+)\n+\n+\n class SuggestionForm(forms.Form):\n t...
1,813
539
gh_patches_debug_17126
rasdani/github-patches
git_diff
rucio__rucio-5505
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Deprecation message in Paramiko Motivation ---------- Paramiko outputs a deprecation message due to an outdated security algorithm. We do not depend on that algorithm. https://github.com/paramiko/paramiko/pu...
diff --git a/lib/rucio/common/extra.py b/lib/rucio/common/extra.py --- a/lib/rucio/common/extra.py +++ b/lib/rucio/common/extra.py @@ -17,6 +17,7 @@ # - Benedikt Ziemons <benedikt.ziemons@cern.ch>, 2021 import importlib +import warnings def import_extras(module_list): @@ -24,7 +25,12 @@ for mod in module_...
{"golden_diff": "diff --git a/lib/rucio/common/extra.py b/lib/rucio/common/extra.py\n--- a/lib/rucio/common/extra.py\n+++ b/lib/rucio/common/extra.py\n@@ -17,6 +17,7 @@\n # - Benedikt Ziemons <benedikt.ziemons@cern.ch>, 2021\n \n import importlib\n+import warnings\n \n \n def import_extras(module_list):\n@@ -24,7 +25,1...
897
256
gh_patches_debug_14548
rasdani/github-patches
git_diff
zestedesavoir__zds-site-5261
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Ajouter les unités temporelles sur les graphs des stats Cete amélioration est demandée par un auteur : > Ce serait bien, aussi, de mettre les unités à côté du temps. Parce que là, j’ai 03:51, mais je ne s...
diff --git a/zds/utils/templatetags/seconds_to_duration.py b/zds/utils/templatetags/seconds_to_duration.py --- a/zds/utils/templatetags/seconds_to_duration.py +++ b/zds/utils/templatetags/seconds_to_duration.py @@ -4,6 +4,14 @@ register = template.Library() +# https://stackoverflow.com/a/8907269/2226755 +def strfd...
{"golden_diff": "diff --git a/zds/utils/templatetags/seconds_to_duration.py b/zds/utils/templatetags/seconds_to_duration.py\n--- a/zds/utils/templatetags/seconds_to_duration.py\n+++ b/zds/utils/templatetags/seconds_to_duration.py\n@@ -4,6 +4,14 @@\n register = template.Library()\n \n \n+# https://stackoverflow.com/a/89...
742
277
gh_patches_debug_1553
rasdani/github-patches
git_diff
feast-dev__feast-3756
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Postgres engine default keepalives_idle value causes setsockopt(TCP_KEEPIDLE) invalid value Get `OperationalError: connection to server at "localhost" (127.0.0.1), port 5432 failed: setsockopt(TCP_KEEPIDLE) fai...
diff --git a/sdk/python/feast/infra/utils/postgres/postgres_config.py b/sdk/python/feast/infra/utils/postgres/postgres_config.py --- a/sdk/python/feast/infra/utils/postgres/postgres_config.py +++ b/sdk/python/feast/infra/utils/postgres/postgres_config.py @@ -25,4 +25,4 @@ sslkey_path: Optional[StrictStr] = None ...
{"golden_diff": "diff --git a/sdk/python/feast/infra/utils/postgres/postgres_config.py b/sdk/python/feast/infra/utils/postgres/postgres_config.py\n--- a/sdk/python/feast/infra/utils/postgres/postgres_config.py\n+++ b/sdk/python/feast/infra/utils/postgres/postgres_config.py\n@@ -25,4 +25,4 @@\n sslkey_path: Optional...
1,036
146
gh_patches_debug_18869
rasdani/github-patches
git_diff
mathesar-foundation__mathesar-2407
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> We should be able to create new admin users, upgrade existing users to admin ## Description * `is_superuser` is currently a readonly property in Users APIs. * We should be able to set them while an admin is e...
diff --git a/mathesar/api/ui/serializers/users.py b/mathesar/api/ui/serializers/users.py --- a/mathesar/api/ui/serializers/users.py +++ b/mathesar/api/ui/serializers/users.py @@ -43,11 +43,23 @@ ] extra_kwargs = { 'password': {'write_only': True}, - 'is_superuser': {'read_only'...
{"golden_diff": "diff --git a/mathesar/api/ui/serializers/users.py b/mathesar/api/ui/serializers/users.py\n--- a/mathesar/api/ui/serializers/users.py\n+++ b/mathesar/api/ui/serializers/users.py\n@@ -43,11 +43,23 @@\n ]\n extra_kwargs = {\n 'password': {'write_only': True},\n- 'is_...
1,542
254
gh_patches_debug_22200
rasdani/github-patches
git_diff
mozilla__bugbug-1722
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Submit logged warnings to Sentry Currently, we only report exceptions to Sentry. It'd be nice to report warnings too, so we can get a sense of how often they happen. IIRC in the code-review bot (https://githu...
diff --git a/http_service/bugbug_http/worker.py b/http_service/bugbug_http/worker.py --- a/http_service/bugbug_http/worker.py +++ b/http_service/bugbug_http/worker.py @@ -4,21 +4,29 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. +i...
{"golden_diff": "diff --git a/http_service/bugbug_http/worker.py b/http_service/bugbug_http/worker.py\n--- a/http_service/bugbug_http/worker.py\n+++ b/http_service/bugbug_http/worker.py\n@@ -4,21 +4,29 @@\n # License, v. 2.0. If a copy of the MPL was not distributed with this file,\n # You can obtain one at http://mozi...
965
289
gh_patches_debug_31438
rasdani/github-patches
git_diff
pyodide__pyodide-2507
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> pyodide_build buildpkg does not install Cython as a build dependency when it is spell with a lower case c ## 🐛 Bug When trying to build [cftime](https://github.com/Unidata/cftime) the isolated env does not ...
diff --git a/pyodide-build/pyodide_build/pypabuild.py b/pyodide-build/pyodide_build/pypabuild.py --- a/pyodide-build/pyodide_build/pypabuild.py +++ b/pyodide-build/pyodide_build/pypabuild.py @@ -19,7 +19,7 @@ from .common import get_hostsitepackages, get_pyversion -UNISOLATED_PACKAGES = ["numpy", "scipy", "cffi", ...
{"golden_diff": "diff --git a/pyodide-build/pyodide_build/pypabuild.py b/pyodide-build/pyodide_build/pypabuild.py\n--- a/pyodide-build/pyodide_build/pypabuild.py\n+++ b/pyodide-build/pyodide_build/pypabuild.py\n@@ -19,7 +19,7 @@\n \n from .common import get_hostsitepackages, get_pyversion\n \n-UNISOLATED_PACKAGES = [\"...
1,806
486
gh_patches_debug_3703
rasdani/github-patches
git_diff
wright-group__WrightTools-359
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> coverage consider using [coverage](https://coverage.readthedocs.io/en/coverage-4.4.1/) </issue> <code> [start of setup.py] 1 #! /usr/bin/env python3 2 3 import os 4 from setuptools import setup, find_packages...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ packages=find_packages(), package_data={'': extra_files}, setup_requires=['pytest-runner'], - tests_require=['pytest'], + tests_require=['pytest', 'pytest-cov'], install_requires=required, extras_require={'do...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -33,7 +33,7 @@\n packages=find_packages(),\n package_data={'': extra_files},\n setup_requires=['pytest-runner'],\n- tests_require=['pytest'],\n+ tests_require=['pytest', 'pytest-cov'],\n install_requires=required...
1,140
100
gh_patches_debug_7544
rasdani/github-patches
git_diff
liqd__a4-product-375
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> [partner landing page] unpublished and archived projects are shown On the partner landing page, we show unpublished and archived projects. Unpublished projects should never be shown and archived projects should...
diff --git a/liqd_product/apps/partners/views.py b/liqd_product/apps/partners/views.py --- a/liqd_product/apps/partners/views.py +++ b/liqd_product/apps/partners/views.py @@ -20,7 +20,9 @@ context = super().get_context_data(**kwargs) context['project_list'] = Project.objects\ - .filter(or...
{"golden_diff": "diff --git a/liqd_product/apps/partners/views.py b/liqd_product/apps/partners/views.py\n--- a/liqd_product/apps/partners/views.py\n+++ b/liqd_product/apps/partners/views.py\n@@ -20,7 +20,9 @@\n context = super().get_context_data(**kwargs)\n \n context['project_list'] = Project.objects\\...
1,233
136
gh_patches_debug_13696
rasdani/github-patches
git_diff
enthought__chaco-634
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Dont use traitsui.api as tui https://github.com/enthought/chaco/blob/3de7780561fa29e79c887432d3ce408ea82d1614/chaco/plugin/plot_editor.py makes use of the odd `import traitsui.api as tui` alias which needs to b...
diff --git a/chaco/plugin/plot_editor.py b/chaco/plugin/plot_editor.py --- a/chaco/plugin/plot_editor.py +++ b/chaco/plugin/plot_editor.py @@ -2,7 +2,7 @@ from enable.component_editor import ComponentEditor from pyface.workbench.api import TraitsUIEditor from traits.api import Any, Enum, HasTraits, Property, Str -fr...
{"golden_diff": "diff --git a/chaco/plugin/plot_editor.py b/chaco/plugin/plot_editor.py\n--- a/chaco/plugin/plot_editor.py\n+++ b/chaco/plugin/plot_editor.py\n@@ -2,7 +2,7 @@\n from enable.component_editor import ComponentEditor\n from pyface.workbench.api import TraitsUIEditor\n from traits.api import Any, Enum, HasTr...
1,720
189
gh_patches_debug_35309
rasdani/github-patches
git_diff
nvaccess__nvda-9119
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Windows Store apps: use app title as product name instead of wwahost **Reported by nvdakor on 2014-07-07 13:10** Hi, Currently, when invoking appModule.productName for a Windows Store app, NVDA says "Windows op...
diff --git a/source/appModules/wwahost.py b/source/appModules/wwahost.py --- a/source/appModules/wwahost.py +++ b/source/appModules/wwahost.py @@ -1,26 +1,40 @@ -#A part of NonVisual Desktop Access (NVDA) -#This file is covered by the GNU General Public License. -#See the file COPYING for more details. -#Copyright (...
{"golden_diff": "diff --git a/source/appModules/wwahost.py b/source/appModules/wwahost.py\n--- a/source/appModules/wwahost.py\n+++ b/source/appModules/wwahost.py\n@@ -1,26 +1,40 @@\n-#A part of NonVisual Desktop Access (NVDA)\r\n-#This file is covered by the GNU General Public License.\r\n-#See the file COPYING for mor...
1,232
753
gh_patches_debug_34722
rasdani/github-patches
git_diff
sql-machine-learning__elasticdl-355
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Transform BytesCodec into a general codec. now the BytesCodec is for mnist dataset specified, and it should be modified to encode/decode any dataset using bytes format. </issue> <code> [start of record_codec/_...
diff --git a/record_codec/__init__.py b/record_codec/__init__.py --- a/record_codec/__init__.py +++ b/record_codec/__init__.py @@ -1,3 +1,4 @@ +from record_codec.bytes_codec import BytesCodec from record_codec.tf_example_codec import TFExampleCodec -__all__=[TFExampleCodec] +__all__=[BytesCodec, TFExampleCodec] diff...
{"golden_diff": "diff --git a/record_codec/__init__.py b/record_codec/__init__.py\n--- a/record_codec/__init__.py\n+++ b/record_codec/__init__.py\n@@ -1,3 +1,4 @@\n+from record_codec.bytes_codec import BytesCodec\n from record_codec.tf_example_codec import TFExampleCodec\n \n-__all__=[TFExampleCodec]\n+__all__=[BytesCo...
938
766
gh_patches_debug_1859
rasdani/github-patches
git_diff
NVIDIA__NVFlare-191
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> The "show_stats" command got broken The "show_stats server" and "show_stats client" command got the following error. This is caused by this PR change (https://github.com/NVIDIA/NVFlare/pull/162): > show_stat...
diff --git a/nvflare/fuel/hci/client/api_spec.py b/nvflare/fuel/hci/client/api_spec.py --- a/nvflare/fuel/hci/client/api_spec.py +++ b/nvflare/fuel/hci/client/api_spec.py @@ -38,6 +38,9 @@ def process_table(self, api: AdminAPISpec, table: Table): pass + def process_dict(self, api: AdminAPISpec, data:...
{"golden_diff": "diff --git a/nvflare/fuel/hci/client/api_spec.py b/nvflare/fuel/hci/client/api_spec.py\n--- a/nvflare/fuel/hci/client/api_spec.py\n+++ b/nvflare/fuel/hci/client/api_spec.py\n@@ -38,6 +38,9 @@\n def process_table(self, api: AdminAPISpec, table: Table):\n pass\n \n+ def process_dict(self, ...
1,342
132
gh_patches_debug_39747
rasdani/github-patches
git_diff
NVIDIA__NVFlare-359
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Minor inconsistency between study config generation tool and study spec </issue> <code> [start of nvflare/apis/study_manager_spec.py] 1 # Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved. 2 #...
diff --git a/nvflare/apis/study_manager_spec.py b/nvflare/apis/study_manager_spec.py --- a/nvflare/apis/study_manager_spec.py +++ b/nvflare/apis/study_manager_spec.py @@ -12,7 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import datetime +from abc ...
{"golden_diff": "diff --git a/nvflare/apis/study_manager_spec.py b/nvflare/apis/study_manager_spec.py\n--- a/nvflare/apis/study_manager_spec.py\n+++ b/nvflare/apis/study_manager_spec.py\n@@ -12,7 +12,11 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n-im...
1,221
725
gh_patches_debug_17658
rasdani/github-patches
git_diff
pantsbuild__pants-12060
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> `./pants run ...` does not work for non-venv-mode `pex_binary` targets that re-exec sys.argv[0]. In short, the `run` goal executes via ~: ``` export PEX_PATH=/path/to/requirements.pex export PEX_EXTRA_SYS_PA...
diff --git a/src/python/pants/backend/python/goals/run_pex_binary.py b/src/python/pants/backend/python/goals/run_pex_binary.py --- a/src/python/pants/backend/python/goals/run_pex_binary.py +++ b/src/python/pants/backend/python/goals/run_pex_binary.py @@ -58,7 +58,13 @@ PexRequest( output_filename=...
{"golden_diff": "diff --git a/src/python/pants/backend/python/goals/run_pex_binary.py b/src/python/pants/backend/python/goals/run_pex_binary.py\n--- a/src/python/pants/backend/python/goals/run_pex_binary.py\n+++ b/src/python/pants/backend/python/goals/run_pex_binary.py\n@@ -58,7 +58,13 @@\n PexRequest(\n ...
1,827
235
gh_patches_debug_5087
rasdani/github-patches
git_diff
readthedocs__readthedocs.org-3641
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Improve security contact webpage We need to improve our documentation about a user who found a security issue could contact us to report this vulnerability in a confidential way. This page should be clear re...
diff --git a/readthedocs/urls.py b/readthedocs/urls.py --- a/readthedocs/urls.py +++ b/readthedocs/urls.py @@ -34,6 +34,8 @@ url(r'^$', HomepageView.as_view(), name='homepage'), url(r'^support/', SupportView.as_view(), name='support'), url(r'^security/', TemplateView.as_view(template_name='security.html'...
{"golden_diff": "diff --git a/readthedocs/urls.py b/readthedocs/urls.py\n--- a/readthedocs/urls.py\n+++ b/readthedocs/urls.py\n@@ -34,6 +34,8 @@\n url(r'^$', HomepageView.as_view(), name='homepage'),\n url(r'^support/', SupportView.as_view(), name='support'),\n url(r'^security/', TemplateView.as_view(templa...
1,681
129
gh_patches_debug_876
rasdani/github-patches
git_diff
microsoft__Qcodes-867
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> missing dependency`jsonschema` in requirements.txt The latest pip installable version of QCoDeS does not list jsonschema as a dependency but requires it. This problem came to light when running tests on a p...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -61,7 +61,8 @@ 'numpy>=1.10', 'pyvisa>=1.8', 'h5py>=2.6', - 'websockets>=3.2,<3.4' + 'websockets>=3.2,<3.4', + 'jsonschema' ], test_suite='qcodes.tests',
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -61,7 +61,8 @@\n 'numpy>=1.10',\n 'pyvisa>=1.8',\n 'h5py>=2.6',\n- 'websockets>=3.2,<3.4'\n+ 'websockets>=3.2,<3.4',\n+ 'jsonschema'\n ],\n \n test_suite='qcodes.tes...
1,677
106
gh_patches_debug_60939
rasdani/github-patches
git_diff
Netflix__lemur-796
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Adding domain fails on unselectable "sensitive" Client side ![screenshot_2017-05-12_11-06-54](https://cloud.githubusercontent.com/assets/445200/25991405/528d417a-3703-11e7-9e6c-d70beb6d38e2.png) Server ...
diff --git a/lemur/domains/schemas.py b/lemur/domains/schemas.py --- a/lemur/domains/schemas.py +++ b/lemur/domains/schemas.py @@ -15,7 +15,7 @@ class DomainInputSchema(LemurInputSchema): id = fields.Integer() name = fields.String(required=True) - sensitive = fields.Boolean() + sensitive = fields.Boole...
{"golden_diff": "diff --git a/lemur/domains/schemas.py b/lemur/domains/schemas.py\n--- a/lemur/domains/schemas.py\n+++ b/lemur/domains/schemas.py\n@@ -15,7 +15,7 @@\n class DomainInputSchema(LemurInputSchema):\n id = fields.Integer()\n name = fields.String(required=True)\n- sensitive = fields.Boolean()\n+ ...
1,511
117
gh_patches_debug_10372
rasdani/github-patches
git_diff
scrapy__scrapy-4170
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Handle it gracefully when start_url is used instead of start_urls Over the last year I’ve seen a few cases ([recent example](https://stackoverflow.com/q/58664004/939364)) of this, people missing the `s` at the ...
diff --git a/scrapy/spiders/__init__.py b/scrapy/spiders/__init__.py --- a/scrapy/spiders/__init__.py +++ b/scrapy/spiders/__init__.py @@ -58,6 +58,11 @@ def start_requests(self): cls = self.__class__ + if not self.start_urls and hasattr(self, 'start_url'): + raise AttributeError( + ...
{"golden_diff": "diff --git a/scrapy/spiders/__init__.py b/scrapy/spiders/__init__.py\n--- a/scrapy/spiders/__init__.py\n+++ b/scrapy/spiders/__init__.py\n@@ -58,6 +58,11 @@\n \n def start_requests(self):\n cls = self.__class__\n+ if not self.start_urls and hasattr(self, 'start_url'):\n+ r...
1,596
170
gh_patches_debug_866
rasdani/github-patches
git_diff
streamlit__streamlit-5184
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> It should be : https://github.com/streamlit/streamlit/blob/535f11765817657892506d6904bbbe04908dbdf3/lib/streamlit/elements/alert.py#L145 </issue> <code> [start of lib/streamlit/elements/alert.py] 1 # Copyrig...
diff --git a/lib/streamlit/elements/alert.py b/lib/streamlit/elements/alert.py --- a/lib/streamlit/elements/alert.py +++ b/lib/streamlit/elements/alert.py @@ -142,7 +142,7 @@ Example ------- - >>> st.success('This is a success message!', icon:"✅") + >>> st.success('This is a success me...
{"golden_diff": "diff --git a/lib/streamlit/elements/alert.py b/lib/streamlit/elements/alert.py\n--- a/lib/streamlit/elements/alert.py\n+++ b/lib/streamlit/elements/alert.py\n@@ -142,7 +142,7 @@\n \n Example\n -------\n- >>> st.success('This is a success message!', icon:\"\u2705\")\n+ >>> ...
1,989
103
gh_patches_debug_8773
rasdani/github-patches
git_diff
google__fuzzbench-72
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Eclipser maxfilelen value I experienced the same problem that you had in choosing maxfilelen to evaluate Eclipser some time ago. I found that they used 1048576 in their experiments (https://github.com/SoftSec-...
diff --git a/fuzzers/eclipser/fuzzer.py b/fuzzers/eclipser/fuzzer.py --- a/fuzzers/eclipser/fuzzer.py +++ b/fuzzers/eclipser/fuzzer.py @@ -66,7 +66,9 @@ '-f', 'foo', '--maxfilelen', - str(10 * 1024 * 1024), # Increase since default is too low (8 bytes). + # Default is too low (...
{"golden_diff": "diff --git a/fuzzers/eclipser/fuzzer.py b/fuzzers/eclipser/fuzzer.py\n--- a/fuzzers/eclipser/fuzzer.py\n+++ b/fuzzers/eclipser/fuzzer.py\n@@ -66,7 +66,9 @@\n '-f',\n 'foo',\n '--maxfilelen',\n- str(10 * 1024 * 1024), # Increase since default is too low (8 bytes).\n+ ...
1,532
227
gh_patches_debug_9888
rasdani/github-patches
git_diff
DDMAL__CantusDB-1415
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Use Django Extensions, deprecate and remove ptvsd [Django Extensions](https://django-extensions.readthedocs.io/en/latest/) are a really useful set of management and development tools. One of the most useful one...
diff --git a/django/cantusdb_project/manage.py b/django/cantusdb_project/manage.py --- a/django/cantusdb_project/manage.py +++ b/django/cantusdb_project/manage.py @@ -6,17 +6,6 @@ def main(): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cantusdb.settings") - # start new section - from django.conf impo...
{"golden_diff": "diff --git a/django/cantusdb_project/manage.py b/django/cantusdb_project/manage.py\n--- a/django/cantusdb_project/manage.py\n+++ b/django/cantusdb_project/manage.py\n@@ -6,17 +6,6 @@\n \n def main():\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"cantusdb.settings\")\n- # start new sectio...
1,038
189
gh_patches_debug_24404
rasdani/github-patches
git_diff
mdn__kuma-6974
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> T - Add 301 redirect to Subscriptions Management page `/payments/recurring/management` is moving to `/payments/management`, therefore we need to add 301 redirect in kuma/payments/urls.py See https://github....
diff --git a/kuma/payments/urls.py b/kuma/payments/urls.py --- a/kuma/payments/urls.py +++ b/kuma/payments/urls.py @@ -1,10 +1,17 @@ from django.urls import path +from django.views.generic import RedirectView from . import views lang_urlpatterns = [ path("terms/", views.payment_terms, name="payment_terms"),...
{"golden_diff": "diff --git a/kuma/payments/urls.py b/kuma/payments/urls.py\n--- a/kuma/payments/urls.py\n+++ b/kuma/payments/urls.py\n@@ -1,10 +1,17 @@\n from django.urls import path\n+from django.views.generic import RedirectView\n \n from . import views\n \n lang_urlpatterns = [\n path(\"terms/\", views.payment_...
1,019
340
gh_patches_debug_455
rasdani/github-patches
git_diff
openfun__marsha-2411
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> 🐛(backend) licence not saved during creation video resource ## Bug Report **Problematic Behavior** When we create a video and set a licence, the licence is not saved. [error-licence-2023-09-12 143121.we...
diff --git a/src/backend/marsha/core/forms.py b/src/backend/marsha/core/forms.py --- a/src/backend/marsha/core/forms.py +++ b/src/backend/marsha/core/forms.py @@ -35,6 +35,7 @@ "playlist", "title", "upload_state", + "license", ] def clean_upload_state(se...
{"golden_diff": "diff --git a/src/backend/marsha/core/forms.py b/src/backend/marsha/core/forms.py\n--- a/src/backend/marsha/core/forms.py\n+++ b/src/backend/marsha/core/forms.py\n@@ -35,6 +35,7 @@\n \"playlist\",\n \"title\",\n \"upload_state\",\n+ \"license\",\n ]...
988
85
gh_patches_debug_22905
rasdani/github-patches
git_diff
streamlink__streamlink-1511
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Kanal 7 does not show ## **Checklist** - [x] This is a bug report. - [ ] This is a feature request. - [ ] This is a plugin (improvement) request. - [ ] I have read the contribution guidelines. ## **De...
diff --git a/src/streamlink/plugins/kanal7.py b/src/streamlink/plugins/kanal7.py --- a/src/streamlink/plugins/kanal7.py +++ b/src/streamlink/plugins/kanal7.py @@ -6,12 +6,13 @@ from streamlink.plugin.api import useragents from streamlink.plugin.api import validate from streamlink.stream import HLSStream +from stream...
{"golden_diff": "diff --git a/src/streamlink/plugins/kanal7.py b/src/streamlink/plugins/kanal7.py\n--- a/src/streamlink/plugins/kanal7.py\n+++ b/src/streamlink/plugins/kanal7.py\n@@ -6,12 +6,13 @@\n from streamlink.plugin.api import useragents\n from streamlink.plugin.api import validate\n from streamlink.stream import...
1,368
313
gh_patches_debug_15114
rasdani/github-patches
git_diff
nextcloud__appstore-246
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Email change form Among the account pages should be a page from which a user can change their email address. The email field on the `User` model needs to be updated and a correspondig django-allauth `EmailAddre...
diff --git a/nextcloudappstore/core/user/views.py b/nextcloudappstore/core/user/views.py --- a/nextcloudappstore/core/user/views.py +++ b/nextcloudappstore/core/user/views.py @@ -43,7 +43,7 @@ template_name = 'user/account.html' template_name_suffix = '' model = User - fields = ['first_name', 'last_na...
{"golden_diff": "diff --git a/nextcloudappstore/core/user/views.py b/nextcloudappstore/core/user/views.py\n--- a/nextcloudappstore/core/user/views.py\n+++ b/nextcloudappstore/core/user/views.py\n@@ -43,7 +43,7 @@\n template_name = 'user/account.html'\n template_name_suffix = ''\n model = User\n- fields =...
1,396
195
gh_patches_debug_53934
rasdani/github-patches
git_diff
bokeh__bokeh-3570
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> ImageURL example in reference guide is broken The example doesn't render an image, just a gridded, empty plot. http://bokeh.pydata.org/en/latest/docs/reference/models/glyphs.html#bokeh.models.glyphs.ImageURL ...
diff --git a/examples/glyphs/image_url.py b/examples/glyphs/image_url.py --- a/examples/glyphs/image_url.py +++ b/examples/glyphs/image_url.py @@ -8,7 +8,7 @@ from bokeh.models import ColumnDataSource, Range1d, Plot, LinearAxis, Grid from bokeh.resources import INLINE -url = "http://bokeh.pydata.org/en/latest/_stat...
{"golden_diff": "diff --git a/examples/glyphs/image_url.py b/examples/glyphs/image_url.py\n--- a/examples/glyphs/image_url.py\n+++ b/examples/glyphs/image_url.py\n@@ -8,7 +8,7 @@\n from bokeh.models import ColumnDataSource, Range1d, Plot, LinearAxis, Grid\n from bokeh.resources import INLINE\n \n-url = \"http://bokeh.p...
1,231
127
gh_patches_debug_41745
rasdani/github-patches
git_diff
sql-machine-learning__elasticdl-1051
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Modify elasticdl.layers.Embedding arguments and constructor according to design doc According to [design doc](https://github.com/wangkuiyi/elasticdl/blob/develop/elasticdl/doc/distributed_embedding_layer_design...
diff --git a/elasticdl/python/elasticdl/layers/embedding.py b/elasticdl/python/elasticdl/layers/embedding.py --- a/elasticdl/python/elasticdl/layers/embedding.py +++ b/elasticdl/python/elasticdl/layers/embedding.py @@ -6,24 +6,77 @@ """ Input: indexes for the embedding entries shape is (batch_size...
{"golden_diff": "diff --git a/elasticdl/python/elasticdl/layers/embedding.py b/elasticdl/python/elasticdl/layers/embedding.py\n--- a/elasticdl/python/elasticdl/layers/embedding.py\n+++ b/elasticdl/python/elasticdl/layers/embedding.py\n@@ -6,24 +6,77 @@\n \"\"\"\n Input: indexes for the embedding entries\n ...
1,255
1,009
gh_patches_debug_28888
rasdani/github-patches
git_diff
chainer__chainer-1376
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> GPU implementation of transpose_sequence is too slow As @jnory mentioned in #1174, `transpose_sequence` is too slow. We need to make a single kernel to make a transposed matrix. </issue> <code> [start of chai...
diff --git a/chainer/functions/array/transpose_sequence.py b/chainer/functions/array/transpose_sequence.py --- a/chainer/functions/array/transpose_sequence.py +++ b/chainer/functions/array/transpose_sequence.py @@ -6,17 +6,55 @@ def _transpose(xs, length): - xp = cuda.get_array_module(*xs) - lengths = numpy....
{"golden_diff": "diff --git a/chainer/functions/array/transpose_sequence.py b/chainer/functions/array/transpose_sequence.py\n--- a/chainer/functions/array/transpose_sequence.py\n+++ b/chainer/functions/array/transpose_sequence.py\n@@ -6,17 +6,55 @@\n \n \n def _transpose(xs, length):\n- xp = cuda.get_array_module(*x...
1,175
696
gh_patches_debug_622
rasdani/github-patches
git_diff
pex-tool__pex-1859
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Release 2.1.100 On the docket: + [x] Using --target-system linux --target-system mac can still lead to failed attempts to lock Windows requirements. #1856 </issue> <code> [start of pex/version.py] 1 # Copyrig...
diff --git a/pex/version.py b/pex/version.py --- a/pex/version.py +++ b/pex/version.py @@ -1,4 +1,4 @@ # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -__version__ = "2.1.99" +__version__ = "2.1.100"
{"golden_diff": "diff --git a/pex/version.py b/pex/version.py\n--- a/pex/version.py\n+++ b/pex/version.py\n@@ -1,4 +1,4 @@\n # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).\n # Licensed under the Apache License, Version 2.0 (see LICENSE).\n \n-__version__ = \"2.1.99\"\n+__version__ = \"2.1.100\"\n", ...
628
98
gh_patches_debug_16027
rasdani/github-patches
git_diff
SigmaHQ__sigma-1278
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Update sigma2attack to the latest navigator version the data generated for navigator is not up to date. ![Clipboard - 5 novembre 2020 15_38](https://user-images.githubusercontent.com/1626464/98255016-3675e08...
diff --git a/tools/sigma/sigma2attack.py b/tools/sigma/sigma2attack.py --- a/tools/sigma/sigma2attack.py +++ b/tools/sigma/sigma2attack.py @@ -21,7 +21,7 @@ num_rules_used = 0 for rule_file in rule_files: try: - rule = yaml.safe_load(open(rule_file).read()) + rule = yaml.safe_lo...
{"golden_diff": "diff --git a/tools/sigma/sigma2attack.py b/tools/sigma/sigma2attack.py\n--- a/tools/sigma/sigma2attack.py\n+++ b/tools/sigma/sigma2attack.py\n@@ -21,7 +21,7 @@\n num_rules_used = 0\n for rule_file in rule_files:\n try:\n- rule = yaml.safe_load(open(rule_file).read())\n+ ...
1,420
222
gh_patches_debug_21522
rasdani/github-patches
git_diff
svthalia__concrexit-3070
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Expand/improve document part of event endpoint <!-- Please add the appropriate label for what change should be made: docs: changes to the documentation) refactor: refactoring production code, eg. renaming ...
diff --git a/website/documents/api/v2/serializers/document.py b/website/documents/api/v2/serializers/document.py --- a/website/documents/api/v2/serializers/document.py +++ b/website/documents/api/v2/serializers/document.py @@ -1,10 +1,10 @@ from rest_framework.fields import SerializerMethodField -from rest_framework.r...
{"golden_diff": "diff --git a/website/documents/api/v2/serializers/document.py b/website/documents/api/v2/serializers/document.py\n--- a/website/documents/api/v2/serializers/document.py\n+++ b/website/documents/api/v2/serializers/document.py\n@@ -1,10 +1,10 @@\n from rest_framework.fields import SerializerMethodField\n...
890
267
gh_patches_debug_28907
rasdani/github-patches
git_diff
ansible__ansible-43525
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Missing all_content param in ovirt_hosts_facts ##### SUMMARY ovirt_hosts_facts misses the all_content param and so it's not possible to get back the whole host details. ovirt_vms_facts list, for instance, has ...
diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_hosts_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_hosts_facts.py --- a/lib/ansible/modules/cloud/ovirt/ovirt_hosts_facts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_hosts_facts.py @@ -41,6 +41,12 @@ - "Search term which is accepted by oVirt/RHV search ...
{"golden_diff": "diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_hosts_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_hosts_facts.py\n--- a/lib/ansible/modules/cloud/ovirt/ovirt_hosts_facts.py\n+++ b/lib/ansible/modules/cloud/ovirt/ovirt_hosts_facts.py\n@@ -41,6 +41,12 @@\n - \"Search term which is accepte...
2,017
352
gh_patches_debug_11327
rasdani/github-patches
git_diff
cloud-custodian__cloud-custodian-9504
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Add support for backup in timestream backup ### Describe the feature This will use AWS backup service to take time-stream backup. ### Extra information or context _No response_ </issue> <code> [start of c7n...
diff --git a/c7n/resources/timestream.py b/c7n/resources/timestream.py --- a/c7n/resources/timestream.py +++ b/c7n/resources/timestream.py @@ -9,6 +9,7 @@ Tag as TagAction, RemoveTag as RemoveTagAction ) +from c7n.filters.backup import ConsecutiveAwsBackupsFilter class DescribeTimestream(DescribeSource)...
{"golden_diff": "diff --git a/c7n/resources/timestream.py b/c7n/resources/timestream.py\n--- a/c7n/resources/timestream.py\n+++ b/c7n/resources/timestream.py\n@@ -9,6 +9,7 @@\n Tag as TagAction,\n RemoveTag as RemoveTagAction\n )\n+from c7n.filters.backup import ConsecutiveAwsBackupsFilter\n \n \n class Describ...
1,936
169
gh_patches_debug_23069
rasdani/github-patches
git_diff
bokeh__bokeh-6911
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Bokeh DateRangeSlider returns tuple of integers instead of dates In 0.12.7 the DateRangeSlider `.value` returns a tuple of integers. Additionally, in order to convert them back to dates you have to divide by 10...
diff --git a/bokeh/models/widgets/sliders.py b/bokeh/models/widgets/sliders.py --- a/bokeh/models/widgets/sliders.py +++ b/bokeh/models/widgets/sliders.py @@ -3,6 +3,9 @@ """ from __future__ import absolute_import +from datetime import datetime +import numbers + from ...core.has_props import abstract from ...core...
{"golden_diff": "diff --git a/bokeh/models/widgets/sliders.py b/bokeh/models/widgets/sliders.py\n--- a/bokeh/models/widgets/sliders.py\n+++ b/bokeh/models/widgets/sliders.py\n@@ -3,6 +3,9 @@\n \"\"\"\n from __future__ import absolute_import\n \n+from datetime import datetime\n+import numbers\n+\n from ...core.has_props...
1,918
321
gh_patches_debug_30011
rasdani/github-patches
git_diff
microsoft__botbuilder-python-1889
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Teams Task Module - Deserialization Error on Teams mobile app for iOS ## Version botbuilder-integration-aiohttp 4.14.0 Python 3.8.6 ## Describe the bug Error when loading Task Module on iOS iOS 14.8.1 / ...
diff --git a/libraries/botbuilder-core/botbuilder/core/serializer_helper.py b/libraries/botbuilder-core/botbuilder/core/serializer_helper.py --- a/libraries/botbuilder-core/botbuilder/core/serializer_helper.py +++ b/libraries/botbuilder-core/botbuilder/core/serializer_helper.py @@ -1,6 +1,6 @@ # Copyright (c) Microsof...
{"golden_diff": "diff --git a/libraries/botbuilder-core/botbuilder/core/serializer_helper.py b/libraries/botbuilder-core/botbuilder/core/serializer_helper.py\n--- a/libraries/botbuilder-core/botbuilder/core/serializer_helper.py\n+++ b/libraries/botbuilder-core/botbuilder/core/serializer_helper.py\n@@ -1,6 +1,6 @@\n # C...
2,007
429
gh_patches_debug_4889
rasdani/github-patches
git_diff
readthedocs__readthedocs.org-4990
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Remove $ before shell commands in docs The developers have a [preference](https://github.com/rtfd/readthedocs.org/pull/4676#discussion_r221400605) to not have a `$` before shell commands in the docs. This makes...
diff --git a/docs/conf.py b/docs/conf.py --- a/docs/conf.py +++ b/docs/conf.py @@ -28,6 +28,7 @@ 'djangodocs', 'doc_extensions', 'sphinx_tabs.tabs', + 'sphinx-prompt', ] templates_path = ['_templates'] @@ -82,3 +83,7 @@ # Activate autosectionlabel plugin autosectionlabel_prefix_document = True...
{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -28,6 +28,7 @@\n 'djangodocs',\n 'doc_extensions',\n 'sphinx_tabs.tabs',\n+ 'sphinx-prompt',\n ]\n templates_path = ['_templates']\n \n@@ -82,3 +83,7 @@\n \n # Activate autosectionlabel plugin\n autosect...
1,345
123
gh_patches_debug_19225
rasdani/github-patches
git_diff
docker__docker-py-971
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> tlsv1 alert protocol version on 1.7.1 and 1.7.2 but not on 1.7.0 Similar to #949 I'm discovering issues with latest versions of `docker-py` running against docker 1.10.2 instance. I'm using `docker.utils.kwargs...
diff --git a/docker/tls.py b/docker/tls.py --- a/docker/tls.py +++ b/docker/tls.py @@ -1,4 +1,5 @@ import os +import ssl from . import errors from .ssladapter import ssladapter @@ -19,10 +20,14 @@ # here, but also disable any public/default CA pool verification by # leaving tls_verify=False - ...
{"golden_diff": "diff --git a/docker/tls.py b/docker/tls.py\n--- a/docker/tls.py\n+++ b/docker/tls.py\n@@ -1,4 +1,5 @@\n import os\n+import ssl\n \n from . import errors\n from .ssladapter import ssladapter\n@@ -19,10 +20,14 @@\n # here, but also disable any public/default CA pool verification by\n # le...
1,450
224
gh_patches_debug_12926
rasdani/github-patches
git_diff
bokeh__bokeh-6804
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Automatic configuration of Slider.format Integer sliders should use integer formatting. </issue> <code> [start of bokeh/models/widgets/sliders.py] 1 """ Various kinds of slider widgets. 2 3 """ 4 from __fut...
diff --git a/bokeh/models/widgets/sliders.py b/bokeh/models/widgets/sliders.py --- a/bokeh/models/widgets/sliders.py +++ b/bokeh/models/widgets/sliders.py @@ -74,7 +74,7 @@ The step between consecutive values. """) - format = Override(default="0,0.00") + format = Override(default="0[.]00") class Ra...
{"golden_diff": "diff --git a/bokeh/models/widgets/sliders.py b/bokeh/models/widgets/sliders.py\n--- a/bokeh/models/widgets/sliders.py\n+++ b/bokeh/models/widgets/sliders.py\n@@ -74,7 +74,7 @@\n The step between consecutive values.\n \"\"\")\n \n- format = Override(default=\"0,0.00\")\n+ format = Override...
1,690
179
gh_patches_debug_22902
rasdani/github-patches
git_diff
Lightning-AI__pytorch-lightning-720
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> W&B: Allow for passing experiment into the WandbLogger (and logging semantics) Currently, the WandbLogger will automatically create a new internal experiment (run) whenever you create a new WandbLogger. # Is...
diff --git a/pytorch_lightning/logging/wandb.py b/pytorch_lightning/logging/wandb.py --- a/pytorch_lightning/logging/wandb.py +++ b/pytorch_lightning/logging/wandb.py @@ -33,7 +33,7 @@ """ def __init__(self, name=None, save_dir=None, offline=False, id=None, anonymous=False, - version=None, p...
{"golden_diff": "diff --git a/pytorch_lightning/logging/wandb.py b/pytorch_lightning/logging/wandb.py\n--- a/pytorch_lightning/logging/wandb.py\n+++ b/pytorch_lightning/logging/wandb.py\n@@ -33,7 +33,7 @@\n \"\"\"\n \n def __init__(self, name=None, save_dir=None, offline=False, id=None, anonymous=False,\n- ...
1,706
263
gh_patches_debug_26619
rasdani/github-patches
git_diff
benoitc__gunicorn-826
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Upcoming Tornado change breaks gunicorn.workers.gtornado The next release of Tornado (will be 4.0 when released, although the current master branch hasn't been updated to change all mentions of 3.3 to 4.0) make...
diff --git a/gunicorn/workers/gtornado.py b/gunicorn/workers/gtornado.py --- a/gunicorn/workers/gtornado.py +++ b/gunicorn/workers/gtornado.py @@ -68,20 +68,31 @@ # will help gunicorn shutdown the worker if max_requests # is exceeded. httpserver = sys.modules["tornado.httpserver"] - ol...
{"golden_diff": "diff --git a/gunicorn/workers/gtornado.py b/gunicorn/workers/gtornado.py\n--- a/gunicorn/workers/gtornado.py\n+++ b/gunicorn/workers/gtornado.py\n@@ -68,20 +68,31 @@\n # will help gunicorn shutdown the worker if max_requests\n # is exceeded.\n httpserver = sys.modules[\"tornado....
1,735
374
gh_patches_debug_61381
rasdani/github-patches
git_diff
tensorflow__addons-1213
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Proposal: Upload the nightlies at each commit on the master branch We already build the wheels already anyway. It's just missing the push to pypi. Yes/No? </issue> <code> [start of setup.py] 1 # Copyright 2019...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ exec(fp.read(), version) if project_name == TFA_NIGHTLY: - version["__version__"] += datetime.strftime(datetime.today(), "%Y%m%d") + version["__version__"] += datetime.now().strftime("%Y%m%d%H%M%S") with open("requirements...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -52,7 +52,7 @@\n exec(fp.read(), version)\n \n if project_name == TFA_NIGHTLY:\n- version[\"__version__\"] += datetime.strftime(datetime.today(), \"%Y%m%d\")\n+ version[\"__version__\"] += datetime.now().strftime(\"%Y%m%d%H%...
1,567
112
gh_patches_debug_34411
rasdani/github-patches
git_diff
ESMCI__cime-3079
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Branch a single instance case from a multi-instance case When a multi-instance CAM forecast fails, I want to use one of the failed instances as an exact restart in a single instance case, to speed debugging. ...
diff --git a/scripts/lib/CIME/Servers/wget.py b/scripts/lib/CIME/Servers/wget.py --- a/scripts/lib/CIME/Servers/wget.py +++ b/scripts/lib/CIME/Servers/wget.py @@ -15,9 +15,9 @@ self._args += "--password {} ".format(passwd) self._server_loc = address - err = run_cmd("wget {} --spider {}".f...
{"golden_diff": "diff --git a/scripts/lib/CIME/Servers/wget.py b/scripts/lib/CIME/Servers/wget.py\n--- a/scripts/lib/CIME/Servers/wget.py\n+++ b/scripts/lib/CIME/Servers/wget.py\n@@ -15,9 +15,9 @@\n self._args += \"--password {} \".format(passwd)\n self._server_loc = address\n \n- err = run_c...
1,561
573
gh_patches_debug_14006
rasdani/github-patches
git_diff
alltheplaces__alltheplaces-3341
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Spider northern_california_breweries is broken During the global build at 2021-06-23-14-42-18, spider **northern_california_breweries** failed with **0 features** and **1 errors**. Here's [the log](https://dat...
diff --git a/locations/spiders/northern_california_breweries.py b/locations/spiders/northern_california_breweries.py --- a/locations/spiders/northern_california_breweries.py +++ b/locations/spiders/northern_california_breweries.py @@ -18,10 +18,19 @@ breweryList = json.loads(jsonData) for item in brewer...
{"golden_diff": "diff --git a/locations/spiders/northern_california_breweries.py b/locations/spiders/northern_california_breweries.py\n--- a/locations/spiders/northern_california_breweries.py\n+++ b/locations/spiders/northern_california_breweries.py\n@@ -18,10 +18,19 @@\n breweryList = json.loads(jsonData)\n \n ...
1,040
222
gh_patches_debug_59836
rasdani/github-patches
git_diff
angr__angr-4105
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Duplicate member docs on subclasses ### Description e.g. the documentation on SimCC's members is also present on SimCCUsercall. This is a huge problem considering that the api docs page is already fucking giga...
diff --git a/docs/conf.py b/docs/conf.py --- a/docs/conf.py +++ b/docs/conf.py @@ -37,7 +37,6 @@ autodoc_default_options = { "members": True, "member-order": "bysource", - "inherited-members": True, "show-inheritance": True, "special-members": "__init__", "undoc-members": True,
{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -37,7 +37,6 @@\n autodoc_default_options = {\n \"members\": True,\n \"member-order\": \"bysource\",\n- \"inherited-members\": True,\n \"show-inheritance\": True,\n \"special-members\": \"__init__\",\...
1,454
94
gh_patches_debug_40226
rasdani/github-patches
git_diff
hpcaitech__ColossalAI-3113
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> [tensor] fix some unittests [tensor] fix some unittests [tensor] fix some unittests </issue> <code> [start of applications/ChatGPT/chatgpt/models/gpt/gpt_critic.py] 1 from typing import Optional 2 3 import...
diff --git a/applications/ChatGPT/chatgpt/models/gpt/gpt_actor.py b/applications/ChatGPT/chatgpt/models/gpt/gpt_actor.py --- a/applications/ChatGPT/chatgpt/models/gpt/gpt_actor.py +++ b/applications/ChatGPT/chatgpt/models/gpt/gpt_actor.py @@ -14,12 +14,16 @@ pretrained (str): Pretrained model name or path. ...
{"golden_diff": "diff --git a/applications/ChatGPT/chatgpt/models/gpt/gpt_actor.py b/applications/ChatGPT/chatgpt/models/gpt/gpt_actor.py\n--- a/applications/ChatGPT/chatgpt/models/gpt/gpt_actor.py\n+++ b/applications/ChatGPT/chatgpt/models/gpt/gpt_actor.py\n@@ -14,12 +14,16 @@\n pretrained (str): Pretrained mo...
1,579
811
gh_patches_debug_21007
rasdani/github-patches
git_diff
joke2k__faker-213
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> `.prefix`/`.suffix` returns a tuple instead of a single value `.prefix` (and `.suffix`) can occasionally return a tuple of values instead of a single value when `prefixes_male` and `prefixes_female` (or `suffix...
diff --git a/faker/providers/person/__init__.py b/faker/providers/person/__init__.py --- a/faker/providers/person/__init__.py +++ b/faker/providers/person/__init__.py @@ -71,7 +71,8 @@ if hasattr(cls, 'prefixes'): return cls.random_element(cls.prefixes) if hasattr(cls, 'prefixes_male') an...
{"golden_diff": "diff --git a/faker/providers/person/__init__.py b/faker/providers/person/__init__.py\n--- a/faker/providers/person/__init__.py\n+++ b/faker/providers/person/__init__.py\n@@ -71,7 +71,8 @@\n if hasattr(cls, 'prefixes'):\n return cls.random_element(cls.prefixes)\n if hasattr(c...
1,597
253
gh_patches_debug_24821
rasdani/github-patches
git_diff
nilearn__nilearn-3077
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> nilearn.plotting overrides the matplotlib backend, causing troubles on remote SSH development I am working on a remote settings, accessing a machine (drago/margaret for INRIA context) through a PyCharm Remote I...
diff --git a/nilearn/plotting/__init__.py b/nilearn/plotting/__init__.py --- a/nilearn/plotting/__init__.py +++ b/nilearn/plotting/__init__.py @@ -2,9 +2,8 @@ Plotting code for nilearn """ # Original Authors: Chris Filo Gorgolewski, Gael Varoquaux -import os -import sys import importlib +import warnings ######...
{"golden_diff": "diff --git a/nilearn/plotting/__init__.py b/nilearn/plotting/__init__.py\n--- a/nilearn/plotting/__init__.py\n+++ b/nilearn/plotting/__init__.py\n@@ -2,9 +2,8 @@\n Plotting code for nilearn\n \"\"\"\n # Original Authors: Chris Filo Gorgolewski, Gael Varoquaux\n-import os\n-import sys\n import importlib...
1,924
338
gh_patches_debug_130
rasdani/github-patches
git_diff
svthalia__concrexit-1750
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Event registration member serializer should be read only ### Describe the bug https://github.com/svthalia/concrexit/blob/4ab37961f50e398cc52422cdc1df66f6ab8ff2ee/website/events/api/v2/serializers/event_registr...
diff --git a/website/events/api/v2/serializers/event_registration.py b/website/events/api/v2/serializers/event_registration.py --- a/website/events/api/v2/serializers/event_registration.py +++ b/website/events/api/v2/serializers/event_registration.py @@ -31,4 +31,4 @@ "name", ) - member = Mem...
{"golden_diff": "diff --git a/website/events/api/v2/serializers/event_registration.py b/website/events/api/v2/serializers/event_registration.py\n--- a/website/events/api/v2/serializers/event_registration.py\n+++ b/website/events/api/v2/serializers/event_registration.py\n@@ -31,4 +31,4 @@\n \"name\",\n ...
936
104
gh_patches_debug_30897
rasdani/github-patches
git_diff
encode__starlette-186
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Session middleware is highly insecure The session middleware does not have any timestamp component to it, which means that if a session happens to be somehow leaked, it can be reused any time in the future. ...
diff --git a/starlette/middleware/sessions.py b/starlette/middleware/sessions.py --- a/starlette/middleware/sessions.py +++ b/starlette/middleware/sessions.py @@ -3,6 +3,7 @@ from base64 import b64decode, b64encode import itsdangerous +from itsdangerous.exc import BadTimeSignature, SignatureExpired from starlett...
{"golden_diff": "diff --git a/starlette/middleware/sessions.py b/starlette/middleware/sessions.py\n--- a/starlette/middleware/sessions.py\n+++ b/starlette/middleware/sessions.py\n@@ -3,6 +3,7 @@\n from base64 import b64decode, b64encode\n \n import itsdangerous\n+from itsdangerous.exc import BadTimeSignature, Signature...
1,212
429
gh_patches_debug_13477
rasdani/github-patches
git_diff
dj-stripe__dj-stripe-547
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> Error: Cannot resolve keyword 'customer' into field. All, Cannot get past the step `python manage.py djstripe_init_customers` in the installation. Running Python 3.6.0, Django 1.11, and the latest...
diff --git a/djstripe/management/commands/djstripe_init_customers.py b/djstripe/management/commands/djstripe_init_customers.py --- a/djstripe/management/commands/djstripe_init_customers.py +++ b/djstripe/management/commands/djstripe_init_customers.py @@ -22,7 +22,7 @@ def handle(self, *args, **options): ...
{"golden_diff": "diff --git a/djstripe/management/commands/djstripe_init_customers.py b/djstripe/management/commands/djstripe_init_customers.py\n--- a/djstripe/management/commands/djstripe_init_customers.py\n+++ b/djstripe/management/commands/djstripe_init_customers.py\n@@ -22,7 +22,7 @@\n \n def handle(self, *args...
1,700
183
gh_patches_debug_48141
rasdani/github-patches
git_diff
google__flax-270
You will be provided with a partial code base and an issue statement explaining a problem to resolve. <issue> `typing._ClassVar` cannot be accessed in the iPython shell – dataclasses package seems to mess up on Python 3.7 ### Problem you have encountered: I just installed flax and tried to import it from the iPython...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ "numpy>=1.12", "jax>=0.1.59", "matplotlib", # only needed for tensorboard export - "dataclasses", # will only install on py3.6 + "dataclasses;python_version<'3.7'", # will only install on py3.6 "msgpack", ]
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -30,7 +30,7 @@\n \"numpy>=1.12\",\n \"jax>=0.1.59\",\n \"matplotlib\", # only needed for tensorboard export\n- \"dataclasses\", # will only install on py3.6\n+ \"dataclasses;python_version<'3.7'\", # will only inst...
1,820
112