<commit_before>from createDB import Person, Chore
from app import db
from random import randint
from datetime import date

#adds the chore specified by the name, n, and the frequency, f.
def createChore(n, f):
  db.session.add(Chore(n, f))
  db.session.commit()

def createPerson(name, fullname):
  db.session.add(Person(name, fullname))
  db.session.commit()

def rotate():
  #TODO func rotates the weekly chores
  i = 0
  chores = Chore.query.filter_by(freq=1)

  people = Person.query.order_by(Person.tickets).all()
  people = people[::-1]
  chores = shuffle(chores.all())
  for c in chores:
    if(c.untilRotate <= 0):
<<<<<<< HEAD
=======
      c.lastRotate = date.today()
>>>>>>> 462c5fc316eaaebee86c6ccbee15d5c41b7941d5
      c.untilRotate = c.freq
      c.assigned = people[i].displayName
      people[i].tickets -= 1
      if(people[i].tickets <= 0):<commit_msg>Stupid rebase stuff<commit_after>from createDB import Person, Chore
from app import db
from random import randint
from datetime import date

#adds the chore specified by the name, n, and the frequency, f.
def createChore(n, f):
  db.session.add(Chore(n, f))
  db.session.commit()

def createPerson(name, fullname):
  db.session.add(Person(name, fullname))
  db.session.commit()

def rotate():
  #TODO func rotates the weekly chores
  i = 0
  chores = Chore.query.filter_by(freq=1)

  people = Person.query.order_by(Person.tickets).all()
  people = people[::-1]
  chores = shuffle(chores.all())
  for c in chores:
    if(c.untilRotate <= 0):
      c.untilRotate = c.freq
      c.assigned = people[i].displayName
      people[i].tickets -= 1
      if(people[i].tickets <= 0):
{'fraction_non_alphanumeric': 0.1362530413625304, 'fraction_numerical': 0.019464720194647202, 'mean_word_length': 3.8240469208211145, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 10, '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': '5783852', 'n_tokens_mistral': 615, 'n_tokens_neox': 582, 'n_words': 151}