How to use the drama.StoryRecognizer function in drama

To help you get started, we’ve selected a few drama examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github james-owen-ryan / talktown / simulation.py View on Github external
# Prepare a listing of all people born on each day -- this is used to
        # age people on their birthdays; we start with (2, 29) initialized because
        # we need to perform a check every March 1 to ensure that all leap-year babies
        # celebrate their birthday that day on non-leap years
        self.birthdays = {(2, 29): set()}
        # Prepare a number that will hold a single random number that is generated daily -- this
        # facilitates certain things that should be determined randomly but remain constant across
        # a timestep, e.g., whether a person locked their door before leaving home
        self.random_number_this_timestep = random.random()
        self.weather = None
        # Keep track of some metadata about timesteps that have actually been simulated
        self.last_simulated_day = self.ordinal_date
        self.n_simulated_timesteps = 0
        # Prepare a story recognizer -- this a module whose job is to excavate nuggets of dramatic
        # intrigue from the raw emergent material generated by this simulation
        self.story_recognizer = StoryRecognizer(simulation=self)

drama

Delft Radar Modelling and perfornance Analysis (DRaMA)

GPL-3.0
Latest version published 11 months ago

Package Health Score

50 / 100
Full package analysis

Similar packages