prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [site_list.py] change numbering to reduce commit size
  letting the markdown renderer do the counting lets us reduce commit size and avoide possible merge conflicts.
  
  ---
  
  ```
  1.
  1.
  1.
  ```
  renders to:
  
  1.
  1.
  1.
  
  </issue>
  <code>
  [start of site_list.py]
  1 """Sherlock: Supported Site Listing
  2 This module generates the listing of supported sites
  3 which can be found in sites.md
  4 It also organizes all the sites in alphanumeric order
  5 """
  6 import json
  7 
  8 pool = list()
  9 
  10 with open("sherlock/resources/data.json", "r", encoding="utf-8") as data_file:
  11     data = json.load(data_file)
  12 
  13 with open("sites.md", "w") as site_file:
  14     data_length = len(data)
  15     site_file.write(f'## List Of Supported Sites ({data_length} Sites In Total!)\n')
  16 
  17     for social_network in data:
  18         url_main = data.get(social_network).get("urlMain")
  19         pool.append((social_network, url_main))
  20 
  21     index = 1
  22     for social_network, url_main in pool:
  23         site_file.write(f'{index}. [{social_network}]({url_main})\n')
  24         index = index + 1
  25 
  26 
  27 sorted_json_data = json.dumps(data, indent=2, sort_keys=True)
  28 
  29 with open("sherlock/resources/data.json", "w") as data_file:
  30     data_file.write(sorted_json_data)
  31 
  32 print("Finished updating supported site listing!")
  33
  [end of site_list.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/site_list.py b/site_list.py
  --- a/site_list.py
  +++ b/site_list.py
  @@ -18,11 +18,8 @@
           url_main = data.get(social_network).get("urlMain")
           pool.append((social_network, url_main))
   
  -    index = 1
       for social_network, url_main in pool:
  -        site_file.write(f'{index}. [{social_network}]({url_main})\n')
  -        index = index + 1
  -
  +        site_file.write(f'1. [{social_network}]({url_main})\n')
   
   sorted_json_data = json.dumps(data, indent=2, sort_keys=True)
  
verification_info: {"golden_diff": "diff --git a/site_list.py b/site_list.py\n--- a/site_list.py\n+++ b/site_list.py\n@@ -18,11 +18,8 @@\n         url_main = data.get(social_network).get(\"urlMain\")\n         pool.append((social_network, url_main))\n \n-    index = 1\n     for social_network, url_main in pool:\n-        site_file.write(f'{index}. [{social_network}]({url_main})\\n')\n-        index = index + 1\n-\n+        site_file.write(f'1. [{social_network}]({url_main})\\n')\n \n sorted_json_data = json.dumps(data, indent=2, sort_keys=True)\n", "issue": "[site_list.py] change numbering to reduce commit size\nletting the markdown renderer do the counting lets us reduce commit size and avoide possible merge conflicts.\r\n\r\n---\r\n\r\n```\r\n1.\r\n1.\r\n1.\r\n```\r\nrenders to:\r\n\r\n1.\r\n1.\r\n1.\n", "before_files": [{"content": "\"\"\"Sherlock: Supported Site Listing\nThis module generates the listing of supported sites\nwhich can be found in sites.md\nIt also organizes all the sites in alphanumeric order\n\"\"\"\nimport json\n\npool = list()\n\nwith open(\"sherlock/resources/data.json\", \"r\", encoding=\"utf-8\") as data_file:\n    data = json.load(data_file)\n\nwith open(\"sites.md\", \"w\") as site_file:\n    data_length = len(data)\n    site_file.write(f'## List Of Supported Sites ({data_length} Sites In Total!)\\n')\n\n    for social_network in data:\n        url_main = data.get(social_network).get(\"urlMain\")\n        pool.append((social_network, url_main))\n\n    index = 1\n    for social_network, url_main in pool:\n        site_file.write(f'{index}. [{social_network}]({url_main})\\n')\n        index = index + 1\n\n\nsorted_json_data = json.dumps(data, indent=2, sort_keys=True)\n\nwith open(\"sherlock/resources/data.json\", \"w\") as data_file:\n    data_file.write(sorted_json_data)\n\nprint(\"Finished updating supported site listing!\")\n", "path": "site_list.py"}]}