text: #import board
  #import neopixel
  import socket
  import time
  import mysql.connector
  
  s = socket.socket()
  s.bind(('',4444))
  s.listen(5)
  s.settimeout(0)
  
  num_leds = 60
  num_seats = 8
  
  mydb = mysql.connector.connect(
    host="129.21.124.24",
    user="jabbate",
    password="Communism69",
    database="LightTable"
  )
  mycursor = mydb.cursor()
  
  #pixels = neopixel.NeoPixel(board.D18, 60)
  
  data = None
  
  # Function that prints
  # the required sequence
  def split(x, n):
   
      # If we cannot split the
      # number into exactly 'N' parts
      if(x < n):
          return None
   
      # If x % n == 0 then the minimum
      # difference is 0 and all
      # numbers are x / n
      elif (x % n == 0):
        out = []
        for i in range(n):
            out.append(x//n)
        return out
      else:
        # upto n-(x % n) the values
        # will be x / n
        # after that the values
        # will be x / n + 1
        zp = n - (x % n)
        pp = x//n
        out = []
        for i in range(n):
          if(i>= zp):
            out.append(pp + 1)
          else:
            out.append(pp)
        return out
  
  def main():
    print("Nums:",split(60,8))
    while True:
      try:
        c, addr = s.accept()
        msg = c.recv(1024).decode()
        c.close()
      except:
        msg = "N/A"
      if msg == "UPDATE":
            print( "UPDATING SYSTEM" )
            mycursor.execute("SELECT * FROM seat")
            data = mycursor.fetchall()
            print(data)
            break
      time.sleep(0.01)
  
  if __name__ == "__main__":
    main()