Download diskcache/modified_testcases/models.py from Dorothydu/gitrepo_top_sample_50: direct link, hf CLI and curl.
- Browser
- Download file 381 Bytes
-
https://huggingface.co/datasets/Dorothydu/gitrepo_top_sample_50/resolve/main/diskcache/modified_testcases/models.py
- Command line
-
hf download hf://datasets/Dorothydu/gitrepo_top_sample_50/diskcache/modified_testcases/models.py
-
curl -L -o models.py https://huggingface.co/datasets/Dorothydu/gitrepo_top_sample_50/resolve/main/diskcache/modified_testcases/models.py
381 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 | |
| ) | |