<commit_before>from django.db import models
from decimal import Decimal
from datetime import datetime, timedelta


# Create your models here.

class OpticFilter(models.Model):
	name = models.TextField(db_index=True)
	description = models.TextField(db_index=True)

	def __str__(self):
            return self.name

class Brand(models.Model):
	name = models.TextField(db_index=True)
	
	def __str__(self):
            return self.name

class Product(models.Model):
	name = models.TextField(db_index=True)
	brand = models.ForeignKey(Brand)

	def __str__(self):
            return self.name

class Sensor(models.Model):
	serial_number = models.IntegerField()
	optic_filter = models.ForeignKey(OpticFilter)
	product = models.ForeignKey(Product)
	
        def sensor_pretty_name(self):
            return '%i %s %s' % (self.serial_number, self.optic_filter.name, self.product.name) 

        def __str__(self):
            return str(self.serial_number)
	
class Position(models.Model):
	latitude = models.DecimalField(max_digits=10,decimal_places=7)
	longitude = models.DecimalField(max_digits=10,decimal_places=7)

        def coordinates(self):
            return '(%2f, %2f)' %  (self.latitude, self.longitude)

        def __str__(self):
            return self.coordinates()


class Station(models.Model):
	name = models.TextField(db_index=True)
	position = models.ForeignKey(Position)

        def __str__(self):
            return self.name
        def coordinates(self):
            return self.position.coordinates()


class Configuration(models.Model):
	datetime = models.DateTimeField()
	frequency = models.TimeField()          
	frequency_save = models.TimeField()
	calibration_value = models.DecimalField(max_digits=7,decimal_places=4)
	sensor = models.ForeignKey(Sensor)
        position = models.ForeignKey(Position)
        multiplier = models.DecimalField(max_digits=5,decimal_places=2)

class Measure(models.Model):
	value = models.DecimalField(max_digits=5,decimal_places=2)
	date = models.DateTimeField()
	configuration = models.ForeignKey(Configuration)

class Datalogger(models.Model):
	label = models.TextField(db_index=True)

	def __str__(self):
            return self.label

class Channel(models.Model):
	name = models.TextField(db_index=True)

	datalogger = models.ForeignKey(Datalogger)
	def __str__(self):
            return self.name

class StaticConfiguration(Configuration):
	angle = models.DecimalField(max_digits=4,decimal_places=2)

class Diffuse(StaticConfiguration):
	shadow_ball = models.BooleanField()

class Global(StaticConfiguration):
	pass

class Direct(Configuration):
	pass

<commit_msg>Normalize de identation.<commit_after>from django.db import models
from decimal import Decimal
from datetime import datetime, timedelta

class OpticFilter(models.Model):
	name = models.TextField(db_index=True)
	description = models.TextField(db_index=True)
	def __str__(self):
		return self.name

class Brand(models.Model):
	name = models.TextField(db_index=True)
	def __str__(self):
		return self.name

class Product(models.Model):
	name = models.TextField(db_index=True)
	brand = models.ForeignKey(Brand)
	def __str__(self):
		return self.name

class Sensor(models.Model):
	serial_number = models.IntegerField()
	optic_filter = models.ForeignKey(OpticFilter)
	product = models.ForeignKey(Product)
	def sensor_pretty_name(self):
		return '%i %s %s' % (self.serial_number, self.optic_filter.name, self.product.name) 
	def __str__(self):
		return str(self.serial_number)

class Position(models.Model):
	latitude = models.DecimalField(max_digits=10,decimal_places=7)
	longitude = models.DecimalField(max_digits=10,decimal_places=7)
	def coordinates(self):
		return '(%2f, %2f)' %  (self.latitude, self.longitude)
	def __str__(self):
		return self.coordinates()

class Station(models.Model):
	name = models.TextField(db_index=True)
	position = models.ForeignKey(Position)
	def __str__(self):
		return self.name
	def coordinates(self):
		return self.position.coordinates()

class Configuration(models.Model):
	datetime = models.DateTimeField()
	frequency = models.TimeField()          
	frequency_save = models.TimeField()
	calibration_value = models.DecimalField(max_digits=7,decimal_places=4)
	sensor = models.ForeignKey(Sensor)
    position = models.ForeignKey(Position)
    multiplier = models.DecimalField(max_digits=5,decimal_places=2)

class Measure(models.Model):
	value = models.DecimalField(max_digits=5,decimal_places=2)
	date = models.DateTimeField()
	configuration = models.ForeignKey(Configuration)

class Datalogger(models.Model):
	label = models.TextField(db_index=True)
	def __str__(self):
		return self.label

class Channel(models.Model):
	name = models.TextField(db_index=True)
	datalogger = models.ForeignKey(Datalogger)
	def __str__(self):
		return self.name

class StaticConfiguration(Configuration):
	angle = models.DecimalField(max_digits=4,decimal_places=2)

class Diffuse(StaticConfiguration):
	shadow_ball = models.BooleanField()

class Global(StaticConfiguration):
	pass

class Direct(Configuration):
	pass
{'fraction_non_alphanumeric': 0.10623145400593471, 'fraction_numerical': 0.006330365974282888, 'mean_word_length': 5.011890606420928, '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': '3931505', 'n_tokens_mistral': 1616, 'n_tokens_neox': 1566, 'n_words': 304}