prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Examples with deprecation warnings
  As of 0.12.3, the following examples have deprecation warnings
  - plotting/file/hover.py
  - plotting/file/tap.py
  
  
  </issue>
  <code>
  [start of examples/plotting/file/tap.py]
  1 import itertools
  2 import numpy as np
  3 
  4 from bokeh.plotting import ColumnDataSource, figure, show, output_file
  5 from bokeh.models import TapTool
  6 
  7 xx, yy = np.meshgrid(range(0,101,4), range(0,101,4))
  8 x = xx.flatten()
  9 y = yy.flatten()
  10 N = len(x)
  11 inds = [str(i) for i in np.arange(N)]
  12 radii = np.random.random(size=N)*0.4 + 1.7
  13 colors = [
  14     "#%02x%02x%02x" % (int(r), int(g), 150) for r, g in zip(50+2*x, 30+2*y)
  15 ]
  16 
  17 source = ColumnDataSource(data=dict(
  18     x=x,
  19     y=y,
  20     radius=radii,
  21     colors=colors,
  22     foo=list(itertools.permutations("abcdef"))[:N],
  23     bar=np.random.normal(size=N),
  24 ))
  25 
  26 TOOLS="crosshair,pan,wheel_zoom,box_zoom,reset,tap,save"
  27 
  28 p = figure(title="Tappy Scatter", tools=TOOLS)
  29 
  30 cr = p.circle(x, y, radius=radii, source=source,
  31               fill_color=colors, fill_alpha=0.6, line_color=None)
  32 
  33 tr = p.text(x, y, text=inds, alpha=0.5, text_font_size="5pt",
  34             text_baseline="middle", text_align="center")
  35 
  36 # in the browser console, you will see messages when circles are clicked
  37 tool = p.select_one(TapTool).renderers = [cr]
  38 
  39 output_file("tap.html", title="tap.py example")
  40 
  41 show(p)  # open a browser
  42
  [end of examples/plotting/file/tap.py]
  [start of examples/plotting/file/hover.py]
  1 import itertools
  2 
  3 import numpy as np
  4 
  5 from bokeh.plotting import ColumnDataSource, figure, show, output_file
  6 from bokeh.models import HoverTool
  7 
  8 TOOLS="crosshair,pan,wheel_zoom,box_zoom,reset,hover,save"
  9 
  10 xx, yy = np.meshgrid(range(0,101,4), range(0,101,4))
  11 x = xx.flatten()
  12 y = yy.flatten()
  13 N = len(x)
  14 inds = [str(i) for i in np.arange(N)]
  15 radii = np.random.random(size=N)*0.4 + 1.7
  16 colors = [
  17     "#%02x%02x%02x" % (int(r), int(g), 150) for r, g in zip(50+2*x, 30+2*y)
  18 ]
  19 
  20 source = ColumnDataSource(data=dict(
  21     x=x,
  22     y=y,
  23     radius=radii,
  24     colors=colors,
  25     foo=list(itertools.permutations("abcdef"))[:N],
  26     bar=np.random.normal(size=N),
  27 ))
  28 
  29 p = figure(title="Hoverful Scatter", tools=TOOLS)
  30 
  31 p.circle(x, y, radius=radii, source=source,
  32          fill_color=colors, fill_alpha=0.6, line_color=None)
  33 
  34 p.text(x, y, text=inds, alpha=0.5, text_font_size="5pt",
  35        text_baseline="middle", text_align="center")
  36 
  37 hover = p.select_one(HoverTool).tooltips = [
  38     ("index", "$index"),
  39     ("(x,y)", "($x, $y)"),
  40     ("radius", "@radius"),
  41     ("fill color", "$color[hex, swatch]:fill_color"),
  42     ("foo", "@foo"),
  43     ("bar", "@bar"),
  44 ]
  45 
  46 output_file("hover.html", title="hover.py example")
  47 
  48 show(p)  # open a browser
  49
  [end of examples/plotting/file/hover.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/examples/plotting/file/hover.py b/examples/plotting/file/hover.py
  --- a/examples/plotting/file/hover.py
  +++ b/examples/plotting/file/hover.py
  @@ -28,8 +28,8 @@
   
   p = figure(title="Hoverful Scatter", tools=TOOLS)
   
  -p.circle(x, y, radius=radii, source=source,
  -         fill_color=colors, fill_alpha=0.6, line_color=None)
  +p.circle(x='x', y='y', radius='radius', source=source,
  +         fill_color='colors', fill_alpha=0.6, line_color=None)
   
   p.text(x, y, text=inds, alpha=0.5, text_font_size="5pt",
          text_baseline="middle", text_align="center")
  diff --git a/examples/plotting/file/tap.py b/examples/plotting/file/tap.py
  --- a/examples/plotting/file/tap.py
  +++ b/examples/plotting/file/tap.py
  @@ -1,7 +1,6 @@
  -import itertools
   import numpy as np
   
  -from bokeh.plotting import ColumnDataSource, figure, show, output_file
  +from bokeh.plotting import figure, show, output_file
   from bokeh.models import TapTool
   
   xx, yy = np.meshgrid(range(0,101,4), range(0,101,4))
  @@ -14,20 +13,11 @@
       "#%02x%02x%02x" % (int(r), int(g), 150) for r, g in zip(50+2*x, 30+2*y)
   ]
   
  -source = ColumnDataSource(data=dict(
  -    x=x,
  -    y=y,
  -    radius=radii,
  -    colors=colors,
  -    foo=list(itertools.permutations("abcdef"))[:N],
  -    bar=np.random.normal(size=N),
  -))
  -
   TOOLS="crosshair,pan,wheel_zoom,box_zoom,reset,tap,save"
   
   p = figure(title="Tappy Scatter", tools=TOOLS)
   
  -cr = p.circle(x, y, radius=radii, source=source,
  +cr = p.circle(x, y, radius=radii,
                 fill_color=colors, fill_alpha=0.6, line_color=None)
   
   tr = p.text(x, y, text=inds, alpha=0.5, text_font_size="5pt",
  
verification_info: {"golden_diff": "diff --git a/examples/plotting/file/hover.py b/examples/plotting/file/hover.py\n--- a/examples/plotting/file/hover.py\n+++ b/examples/plotting/file/hover.py\n@@ -28,8 +28,8 @@\n \n p = figure(title=\"Hoverful Scatter\", tools=TOOLS)\n \n-p.circle(x, y, radius=radii, source=source,\n-         fill_color=colors, fill_alpha=0.6, line_color=None)\n+p.circle(x='x', y='y', radius='radius', source=source,\n+         fill_color='colors', fill_alpha=0.6, line_color=None)\n \n p.text(x, y, text=inds, alpha=0.5, text_font_size=\"5pt\",\n        text_baseline=\"middle\", text_align=\"center\")\ndiff --git a/examples/plotting/file/tap.py b/examples/plotting/file/tap.py\n--- a/examples/plotting/file/tap.py\n+++ b/examples/plotting/file/tap.py\n@@ -1,7 +1,6 @@\n-import itertools\n import numpy as np\n \n-from bokeh.plotting import ColumnDataSource, figure, show, output_file\n+from bokeh.plotting import figure, show, output_file\n from bokeh.models import TapTool\n \n xx, yy = np.meshgrid(range(0,101,4), range(0,101,4))\n@@ -14,20 +13,11 @@\n     \"#%02x%02x%02x\" % (int(r), int(g), 150) for r, g in zip(50+2*x, 30+2*y)\n ]\n \n-source = ColumnDataSource(data=dict(\n-    x=x,\n-    y=y,\n-    radius=radii,\n-    colors=colors,\n-    foo=list(itertools.permutations(\"abcdef\"))[:N],\n-    bar=np.random.normal(size=N),\n-))\n-\n TOOLS=\"crosshair,pan,wheel_zoom,box_zoom,reset,tap,save\"\n \n p = figure(title=\"Tappy Scatter\", tools=TOOLS)\n \n-cr = p.circle(x, y, radius=radii, source=source,\n+cr = p.circle(x, y, radius=radii,\n               fill_color=colors, fill_alpha=0.6, line_color=None)\n \n tr = p.text(x, y, text=inds, alpha=0.5, text_font_size=\"5pt\",\n", "issue": "Examples with deprecation warnings\nAs of 0.12.3, the following examples have deprecation warnings\n- plotting/file/hover.py\n- plotting/file/tap.py\n\n", "before_files": [{"content": "import itertools\nimport numpy as np\n\nfrom bokeh.plotting import ColumnDataSource, figure, show, output_file\nfrom bokeh.models import TapTool\n\nxx, yy = np.meshgrid(range(0,101,4), range(0,101,4))\nx = xx.flatten()\ny = yy.flatten()\nN = len(x)\ninds = [str(i) for i in np.arange(N)]\nradii = np.random.random(size=N)*0.4 + 1.7\ncolors = [\n    \"#%02x%02x%02x\" % (int(r), int(g), 150) for r, g in zip(50+2*x, 30+2*y)\n]\n\nsource = ColumnDataSource(data=dict(\n    x=x,\n    y=y,\n    radius=radii,\n    colors=colors,\n    foo=list(itertools.permutations(\"abcdef\"))[:N],\n    bar=np.random.normal(size=N),\n))\n\nTOOLS=\"crosshair,pan,wheel_zoom,box_zoom,reset,tap,save\"\n\np = figure(title=\"Tappy Scatter\", tools=TOOLS)\n\ncr = p.circle(x, y, radius=radii, source=source,\n              fill_color=colors, fill_alpha=0.6, line_color=None)\n\ntr = p.text(x, y, text=inds, alpha=0.5, text_font_size=\"5pt\",\n            text_baseline=\"middle\", text_align=\"center\")\n\n# in the browser console, you will see messages when circles are clicked\ntool = p.select_one(TapTool).renderers = [cr]\n\noutput_file(\"tap.html\", title=\"tap.py example\")\n\nshow(p)  # open a browser\n", "path": "examples/plotting/file/tap.py"}, {"content": "import itertools\n\nimport numpy as np\n\nfrom bokeh.plotting import ColumnDataSource, figure, show, output_file\nfrom bokeh.models import HoverTool\n\nTOOLS=\"crosshair,pan,wheel_zoom,box_zoom,reset,hover,save\"\n\nxx, yy = np.meshgrid(range(0,101,4), range(0,101,4))\nx = xx.flatten()\ny = yy.flatten()\nN = len(x)\ninds = [str(i) for i in np.arange(N)]\nradii = np.random.random(size=N)*0.4 + 1.7\ncolors = [\n    \"#%02x%02x%02x\" % (int(r), int(g), 150) for r, g in zip(50+2*x, 30+2*y)\n]\n\nsource = ColumnDataSource(data=dict(\n    x=x,\n    y=y,\n    radius=radii,\n    colors=colors,\n    foo=list(itertools.permutations(\"abcdef\"))[:N],\n    bar=np.random.normal(size=N),\n))\n\np = figure(title=\"Hoverful Scatter\", tools=TOOLS)\n\np.circle(x, y, radius=radii, source=source,\n         fill_color=colors, fill_alpha=0.6, line_color=None)\n\np.text(x, y, text=inds, alpha=0.5, text_font_size=\"5pt\",\n       text_baseline=\"middle\", text_align=\"center\")\n\nhover = p.select_one(HoverTool).tooltips = [\n    (\"index\", \"$index\"),\n    (\"(x,y)\", \"($x, $y)\"),\n    (\"radius\", \"@radius\"),\n    (\"fill color\", \"$color[hex, swatch]:fill_color\"),\n    (\"foo\", \"@foo\"),\n    (\"bar\", \"@bar\"),\n]\n\noutput_file(\"hover.html\", title=\"hover.py example\")\n\nshow(p)  # open a browser\n", "path": "examples/plotting/file/hover.py"}]}