prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  docs: Enable hiding of Python prompts
  This will be very helpful for copy pasting examples.
  
  References:
  - https://github.com/readthedocs/sphinx_rtd_theme/issues/167
  
  </issue>
  <code>
  [start of docs/conf.py]
  1 # Configuration file for the Sphinx documentation builder.
  2 #
  3 # This file only contains a selection of the most common options. For a full
  4 # list see the documentation:
  5 # http://www.sphinx-doc.org/en/master/config
  6 
  7 # -- Path setup --------------------------------------------------------------
  8 
  9 # If extensions (or modules to document with autodoc) are in another directory,
  10 # add these directories to sys.path here. If the directory is relative to the
  11 # documentation root, use os.path.abspath to make it absolute, like shown here.
  12 #
  13 import os
  14 import sys
  15 import pathlib
  16 
  17 sys.path.insert(0, os.path.abspath("."))
  18 from dffml.version import VERSION
  19 
  20 # -- Project information -----------------------------------------------------
  21 
  22 project = "DFFML"
  23 copyright = "2019, Intel"
  24 author = "John Andersen"
  25 
  26 # The short X.Y version
  27 version = VERSION
  28 
  29 # The full version, including alpha/beta/rc tags
  30 release = version
  31 
  32 
  33 # -- General configuration ---------------------------------------------------
  34 
  35 # Add any Sphinx extension module names here, as strings. They can be
  36 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
  37 # ones.
  38 extensions = [
  39     "sphinx.ext.intersphinx",
  40     "sphinx.ext.autodoc",
  41     "sphinx.ext.viewcode",
  42     "sphinx.ext.napoleon",
  43     "sphinx.ext.doctest",
  44     "recommonmark",
  45 ]
  46 
  47 intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
  48 
  49 # Add any paths that contain templates here, relative to this directory.
  50 templates_path = ["_templates"]
  51 
  52 # List of patterns, relative to source directory, that match files and
  53 # directories to ignore when looking for source files.
  54 # This pattern also affects html_static_path and html_extra_path.
  55 exclude_patterns = []
  56 
  57 # Enable markdown
  58 source_suffix = {
  59     ".rst": "restructuredtext",
  60     ".txt": "markdown",
  61     ".md": "markdown",
  62 }
  63 
  64 
  65 # -- Options for HTML output -------------------------------------------------
  66 
  67 # The theme to use for HTML and HTML Help pages.  See the documentation for
  68 # a list of builtin themes.
  69 #
  70 html_theme = "sphinx_rtd_theme"
  71 
  72 html_context = {
  73     "github_user": "intel",
  74     "github_repo": "dffml",
  75     "github_version": "master",
  76     "conf_py_path": "/docs/",
  77     "display_github": True,
  78 }
  79 
  80 html_theme_options = {
  81     "description": "The fastest path to machine learning integration",
  82     "github_url": "https://github.com/intel/dffml/",
  83 }
  84 
  85 # Add any paths that contain custom static files (such as style sheets) here,
  86 # relative to this directory. They are copied after the builtin static files,
  87 # so a file named "default.css" will overwrite the builtin "default.css".
  88 html_static_path = ["_static"]
  89 
  90 # -- Extension configuration -------------------------------------------------
  91 
  92 napoleon_numpy_docstring = True
  93 
  94 doctest_global_setup = (
  95     pathlib.Path(__file__).parent / "doctest_header.py"
  96 ).read_text()
  97
  [end of docs/conf.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/docs/conf.py b/docs/conf.py
  --- a/docs/conf.py
  +++ b/docs/conf.py
  @@ -87,6 +87,11 @@
   # so a file named "default.css" will overwrite the builtin "default.css".
   html_static_path = ["_static"]
   
  +
  +def setup(app):
  +    app.add_javascript("copybutton.js")
  +
  +
   # -- Extension configuration -------------------------------------------------
   
   napoleon_numpy_docstring = True
  
verification_info: {"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -87,6 +87,11 @@\n # so a file named \"default.css\" will overwrite the builtin \"default.css\".\n html_static_path = [\"_static\"]\n \n+\n+def setup(app):\n+    app.add_javascript(\"copybutton.js\")\n+\n+\n # -- Extension configuration -------------------------------------------------\n \n napoleon_numpy_docstring = True\n", "issue": "docs: Enable hiding of Python prompts\nThis will be very helpful for copy pasting examples.\r\n\r\nReferences:\r\n- https://github.com/readthedocs/sphinx_rtd_theme/issues/167\n", "before_files": [{"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup --------------------------------------------------------------\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\nimport os\nimport sys\nimport pathlib\n\nsys.path.insert(0, os.path.abspath(\".\"))\nfrom dffml.version import VERSION\n\n# -- Project information -----------------------------------------------------\n\nproject = \"DFFML\"\ncopyright = \"2019, Intel\"\nauthor = \"John Andersen\"\n\n# The short X.Y version\nversion = VERSION\n\n# The full version, including alpha/beta/rc tags\nrelease = version\n\n\n# -- General configuration ---------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    \"sphinx.ext.intersphinx\",\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.viewcode\",\n    \"sphinx.ext.napoleon\",\n    \"sphinx.ext.doctest\",\n    \"recommonmark\",\n]\n\nintersphinx_mapping = {\"python\": (\"https://docs.python.org/3\", None)}\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = []\n\n# Enable markdown\nsource_suffix = {\n    \".rst\": \"restructuredtext\",\n    \".txt\": \"markdown\",\n    \".md\": \"markdown\",\n}\n\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = \"sphinx_rtd_theme\"\n\nhtml_context = {\n    \"github_user\": \"intel\",\n    \"github_repo\": \"dffml\",\n    \"github_version\": \"master\",\n    \"conf_py_path\": \"/docs/\",\n    \"display_github\": True,\n}\n\nhtml_theme_options = {\n    \"description\": \"The fastest path to machine learning integration\",\n    \"github_url\": \"https://github.com/intel/dffml/\",\n}\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\n\n# -- Extension configuration -------------------------------------------------\n\nnapoleon_numpy_docstring = True\n\ndoctest_global_setup = (\n    pathlib.Path(__file__).parent / \"doctest_header.py\"\n).read_text()\n", "path": "docs/conf.py"}]}