<commit_before>from django.db import models

##
# Location Types
##
class World(models.Model):
	name = models.CharField(max_length=30)
	homes = models.ManyToManyField(Home)
	
class Home(models.Model):
	name = models.CharField(max_length=30)
	rooms = models.ManyToManyField(Room)

class Room(models.Model):
	name = models.CharField(max_length=30)

##
# Device Types
##
class Device(models.Model):
	name = models.CharField(max_length=30)
	
	class Meta:
		abstract = True

class OutputDevice(Device):
	actions = models.ManyToManyField(Action)
	
	class Meta:
	 	abstract = True

class InputDevice(Device):
	events = models.ManyToManyField(Event)
	
	class Meta:
		abstract = True	



##
# Input/Output
##
class Action(models.Model):
	name = models.CharField(max_length=30)
	
	def run()
	
	class Meta:
		abstract = True


class Event(models.Model):
	name = models.CharField(max_length=30)
	actions = models.ManyToMany(Action)
	
	def call():
		for (action in self.actions):
			action.run()
	
	class Meta:
		abstract = True


<commit_msg>Add table names to core model items<commit_after>from django.db import models

##
# Location Types
##
class World(models.Model):
	name = models.CharField(max_length=30)
	homes = models.ManyToManyField(Home)
	class Meta:
		db_table = u'Worlds'
	
class Home(models.Model):
	name = models.CharField(max_length=30)
	rooms = models.ManyToManyField(Room)
	class Meta:
		db_table = u'Homes'

class Room(models.Model):
	name = models.CharField(max_length=30)
	class Meta:
		db_table = u'Rooms'

##
# Device Types
##
class Device(models.Model):
	name = models.CharField(max_length=30)
	
	class Meta:
		abstract = True

class OutputDevice(Device):
	actions = models.ManyToManyField(Action)
	
	class Meta:
	 	abstract = True

class InputDevice(Device):
	events = models.ManyToManyField(Event)
	
	class Meta:
		abstract = True	



##
# Input/Output
##
class Action(models.Model):
	name = models.CharField(max_length=30)
	
	def run()
	
	class Meta:
		abstract = True


class Event(models.Model):
	name = models.CharField(max_length=30)
	actions = models.ManyToMany(Action)
	
	def call():
		for (action in self.actions):
			action.run()
	
	class Meta:
		abstract = True



{'fraction_non_alphanumeric': 0.1170018281535649, 'fraction_numerical': 0.010968921389396709, 'mean_word_length': 4.458852867830424, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1401959', 'n_tokens_mistral': 812, 'n_tokens_neox': 739, 'n_words': 170}