prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Change path of storage of Evaluation Scripts
  ## Current behaviour
  
  Currently, the evaluation scripts are stored in the `submission_files` directory which should not happen ideally.
  
  ## Solution
  Modify the `RandomFile()` method such that the evaluation scripts should be uploaded in the `evaluation_scripts` directory instead of the `submission_files` directory. 
  
  
  </issue>
  <code>
  [start of apps/base/utils.py]
  1 import os
  2 import uuid
  3 
  4 from django.conf import settings
  5 from django.utils.deconstruct import deconstructible
  6 
  7 from rest_framework.exceptions import NotFound
  8 from rest_framework.pagination import PageNumberPagination
  9 
  10 
  11 class StandardResultSetPagination(PageNumberPagination):
  12     page_size = 100
  13     page_size_query_param = 'page_size'
  14     max_page_size = 1000
  15 
  16 
  17 def paginated_queryset(queryset, request, pagination_class=PageNumberPagination()):
  18     '''
  19         Return a paginated result for a queryset
  20     '''
  21     paginator = pagination_class
  22     paginator.page_size = settings.REST_FRAMEWORK['PAGE_SIZE']
  23     result_page = paginator.paginate_queryset(queryset, request)
  24     return (paginator, result_page)
  25 
  26 
  27 @deconstructible
  28 class RandomFileName(object):
  29     def __init__(self, path):
  30         self.path = path
  31 
  32     def __call__(self, instance, filename):
  33         extension = os.path.splitext(filename)[1]
  34         if 'id' in self.path and instance.pk:
  35             self.path = self.path.format(id=instance.pk)
  36         elif 'id' not in self.path and instance.pk:
  37             path = "submission_files/submission_{id}"
  38             self.path = path.format(id=instance.pk)
  39         filename = '{}{}'.format(uuid.uuid4(), extension)
  40         filename = os.path.join(self.path, filename)
  41         return filename
  42 
  43 
  44 def get_model_object(model_name):
  45     def get_model_by_pk(pk):
  46         try:
  47             model_object = model_name.objects.get(pk=pk)
  48             return model_object
  49         except model_name.DoesNotExist:
  50             raise NotFound('{} {} does not exist'.format(model_name.__name__, pk))
  51     get_model_by_pk.__name__ = 'get_{}_object'.format(model_name.__name__.lower())
  52     return get_model_by_pk
  53
  [end of apps/base/utils.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/apps/base/utils.py b/apps/base/utils.py
  --- a/apps/base/utils.py
  +++ b/apps/base/utils.py
  @@ -2,7 +2,6 @@
   import uuid
   
   from django.conf import settings
  -from django.utils.deconstruct import deconstructible
   
   from rest_framework.exceptions import NotFound
   from rest_framework.pagination import PageNumberPagination
  @@ -24,20 +23,17 @@
       return (paginator, result_page)
   
   
  -@deconstructible
   class RandomFileName(object):
       def __init__(self, path):
           self.path = path
   
       def __call__(self, instance, filename):
           extension = os.path.splitext(filename)[1]
  +        path = self.path
           if 'id' in self.path and instance.pk:
  -            self.path = self.path.format(id=instance.pk)
  -        elif 'id' not in self.path and instance.pk:
  -            path = "submission_files/submission_{id}"
  -            self.path = path.format(id=instance.pk)
  +            path = self.path.format(id=instance.pk)
           filename = '{}{}'.format(uuid.uuid4(), extension)
  -        filename = os.path.join(self.path, filename)
  +        filename = os.path.join(path, filename)
           return filename
  
verification_info: {"golden_diff": "diff --git a/apps/base/utils.py b/apps/base/utils.py\n--- a/apps/base/utils.py\n+++ b/apps/base/utils.py\n@@ -2,7 +2,6 @@\n import uuid\n \n from django.conf import settings\n-from django.utils.deconstruct import deconstructible\n \n from rest_framework.exceptions import NotFound\n from rest_framework.pagination import PageNumberPagination\n@@ -24,20 +23,17 @@\n     return (paginator, result_page)\n \n \n-@deconstructible\n class RandomFileName(object):\n     def __init__(self, path):\n         self.path = path\n \n     def __call__(self, instance, filename):\n         extension = os.path.splitext(filename)[1]\n+        path = self.path\n         if 'id' in self.path and instance.pk:\n-            self.path = self.path.format(id=instance.pk)\n-        elif 'id' not in self.path and instance.pk:\n-            path = \"submission_files/submission_{id}\"\n-            self.path = path.format(id=instance.pk)\n+            path = self.path.format(id=instance.pk)\n         filename = '{}{}'.format(uuid.uuid4(), extension)\n-        filename = os.path.join(self.path, filename)\n+        filename = os.path.join(path, filename)\n         return filename\n", "issue": "Change path of storage of Evaluation Scripts\n## Current behaviour\r\n\r\nCurrently, the evaluation scripts are stored in the `submission_files` directory which should not happen ideally.\r\n\r\n## Solution\r\nModify the `RandomFile()` method such that the evaluation scripts should be uploaded in the `evaluation_scripts` directory instead of the `submission_files` directory. \r\n\n", "before_files": [{"content": "import os\nimport uuid\n\nfrom django.conf import settings\nfrom django.utils.deconstruct import deconstructible\n\nfrom rest_framework.exceptions import NotFound\nfrom rest_framework.pagination import PageNumberPagination\n\n\nclass StandardResultSetPagination(PageNumberPagination):\n    page_size = 100\n    page_size_query_param = 'page_size'\n    max_page_size = 1000\n\n\ndef paginated_queryset(queryset, request, pagination_class=PageNumberPagination()):\n    '''\n        Return a paginated result for a queryset\n    '''\n    paginator = pagination_class\n    paginator.page_size = settings.REST_FRAMEWORK['PAGE_SIZE']\n    result_page = paginator.paginate_queryset(queryset, request)\n    return (paginator, result_page)\n\n\n@deconstructible\nclass RandomFileName(object):\n    def __init__(self, path):\n        self.path = path\n\n    def __call__(self, instance, filename):\n        extension = os.path.splitext(filename)[1]\n        if 'id' in self.path and instance.pk:\n            self.path = self.path.format(id=instance.pk)\n        elif 'id' not in self.path and instance.pk:\n            path = \"submission_files/submission_{id}\"\n            self.path = path.format(id=instance.pk)\n        filename = '{}{}'.format(uuid.uuid4(), extension)\n        filename = os.path.join(self.path, filename)\n        return filename\n\n\ndef get_model_object(model_name):\n    def get_model_by_pk(pk):\n        try:\n            model_object = model_name.objects.get(pk=pk)\n            return model_object\n        except model_name.DoesNotExist:\n            raise NotFound('{} {} does not exist'.format(model_name.__name__, pk))\n    get_model_by_pk.__name__ = 'get_{}_object'.format(model_name.__name__.lower())\n    return get_model_by_pk\n", "path": "apps/base/utils.py"}]}