This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The Monty Hall Problem | |
import random | |
# Instantiating a random treasure map | |
def single_run(): | |
maps = ['wasteland', 'wasteland', 'wasteland'] | |
treasure_index = random.randint(0, 2) | |
maps[treasure_index] = 'one piece' | |
return maps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from .urlreduce_utils import create_shortened_url | |
# Create your models here. | |
class Shortener(models.Model): | |
''' | |
This model creates a short url using the long url as the input | |
created -> time and date the shortener was created | |
times_followed = the number of times the shortened link has been followed |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.