prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Improve examples documentation to make it clear that they are standalone
  ## 🚀 Feature
  
  Tangentially to #532, I think it would be good to add a "Usage" section to examples/README.md that makes it clear that these example scripts can be used through pip-installed CompilerGym, and possibly split the examples rules out of the top level makefile into an examples/Makefile file for standalone usage.
  
  ## Motivation
  
  It is not clear whether the included examples require building from source (they don't) or can be used on their own (they can).
  
  </issue>
  <code>
  [start of examples/setup.py]
  1 #!/usr/bin/env python3
  2 #
  3 # Copyright (c) Facebook, Inc. and its affiliates.
  4 #
  5 # This source code is licensed under the MIT license found in the
  6 # LICENSE file in the root directory of this source tree.
  7 
  8 import distutils.util
  9 
  10 import setuptools
  11 
  12 with open("../VERSION") as f:
  13     version = f.read().strip()
  14 with open("requirements.txt") as f:
  15     requirements = [ln.split("#")[0].rstrip() for ln in f.readlines()]
  16 
  17 setuptools.setup(
  18     name="compiler_gym_examples",
  19     version=version,
  20     description="Example code for CompilerGym",
  21     author="Facebook AI Research",
  22     url="https://github.com/facebookresearch/CompilerGym",
  23     license="MIT",
  24     install_requires=requirements,
  25     packages=[
  26         "llvm_autotuning",
  27         "llvm_autotuning.autotuners",
  28         "llvm_rl",
  29         "llvm_rl.model",
  30     ],
  31     python_requires=">=3.8",
  32     platforms=[distutils.util.get_platform()],
  33     zip_safe=False,
  34 )
  35
  [end of examples/setup.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/setup.py b/examples/setup.py
  --- a/examples/setup.py
  +++ b/examples/setup.py
  @@ -13,6 +13,8 @@
       version = f.read().strip()
   with open("requirements.txt") as f:
       requirements = [ln.split("#")[0].rstrip() for ln in f.readlines()]
  +with open("../tests/requirements.txt") as f:
  +    requirements += [ln.split("#")[0].rstrip() for ln in f.readlines()]
   
   setuptools.setup(
       name="compiler_gym_examples",
  
verification_info: {"golden_diff": "diff --git a/examples/setup.py b/examples/setup.py\n--- a/examples/setup.py\n+++ b/examples/setup.py\n@@ -13,6 +13,8 @@\n     version = f.read().strip()\n with open(\"requirements.txt\") as f:\n     requirements = [ln.split(\"#\")[0].rstrip() for ln in f.readlines()]\n+with open(\"../tests/requirements.txt\") as f:\n+    requirements += [ln.split(\"#\")[0].rstrip() for ln in f.readlines()]\n \n setuptools.setup(\n     name=\"compiler_gym_examples\",\n", "issue": "Improve examples documentation to make it clear that they are standalone\n## \ud83d\ude80 Feature\r\n\r\nTangentially to #532, I think it would be good to add a \"Usage\" section to examples/README.md that makes it clear that these example scripts can be used through pip-installed CompilerGym, and possibly split the examples rules out of the top level makefile into an examples/Makefile file for standalone usage.\r\n\r\n## Motivation\r\n\r\nIt is not clear whether the included examples require building from source (they don't) or can be used on their own (they can).\n", "before_files": [{"content": "#!/usr/bin/env python3\n#\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport distutils.util\n\nimport setuptools\n\nwith open(\"../VERSION\") as f:\n    version = f.read().strip()\nwith open(\"requirements.txt\") as f:\n    requirements = [ln.split(\"#\")[0].rstrip() for ln in f.readlines()]\n\nsetuptools.setup(\n    name=\"compiler_gym_examples\",\n    version=version,\n    description=\"Example code for CompilerGym\",\n    author=\"Facebook AI Research\",\n    url=\"https://github.com/facebookresearch/CompilerGym\",\n    license=\"MIT\",\n    install_requires=requirements,\n    packages=[\n        \"llvm_autotuning\",\n        \"llvm_autotuning.autotuners\",\n        \"llvm_rl\",\n        \"llvm_rl.model\",\n    ],\n    python_requires=\">=3.8\",\n    platforms=[distutils.util.get_platform()],\n    zip_safe=False,\n)\n", "path": "examples/setup.py"}]}