Download testbed/django__django/tests/cache/models.py from hc99/FEA-Bench: direct link, hf CLI and curl.
- Browser
- Download file 367 Bytes
-
https://huggingface.co/datasets/hc99/FEA-Bench/resolve/main/testbed/django__django/tests/cache/models.py
- Command line
-
hf download hf://datasets/hc99/FEA-Bench/testbed/django__django/tests/cache/models.py
-
curl -L -o models.py https://huggingface.co/datasets/hc99/FEA-Bench/resolve/main/testbed/django__django/tests/cache/models.py
367 Bytes
| from django.db import models | |
| from django.utils import timezone | |
| def expensive_calculation(): | |
| expensive_calculation.num_runs += 1 | |
| return timezone.now() | |
| class Poll(models.Model): | |
| question = models.CharField(max_length=200) | |
| answer = models.CharField(max_length=200) | |
| pub_date = models.DateTimeField("date published", default=expensive_calculation) | |