<commit_before>require 'gtk2'
require 'etc'
require 'shadow'
require 'webkit'
require 'erb'

def startXServer
  Process.fork do 
    exec("/usr/bin/X")
  end
  if waitForXServer
  else
  end
end

def waitForXServer
  cycles = 120
  for i in 0..cycles
    begin
      Gtk::init
    rescue
      sleep(1)
    end
  end
end

def authenticate(username, password)
  pwnam = Etc.getpwnam(username) 
  Etc.endpwent()

  if pwnam.passwd == "x"
    correct = Shadow::Passwd.getspnam(pwnam.name).sp_pwdp<commit_msg>Moved requires to other side of startXServer command<commit_after>require 'etc'
require 'shadow'
require 'webkit'
require 'erb'

def startXServer
  Process.fork do 
    exec("/usr/bin/X")
  end
  if waitForXServer
  else
  end
end

def waitForXServer
  for i in 0..60
    begin
      require 'gtk2'
    rescue
      sleep(1)
    end
  end
end

def authenticate(username, password)
  pwnam = Etc.getpwnam(username) 
  Etc.endpwent()

  if pwnam.passwd == "x"
    correct = Shadow::Passwd.getspnam(pwnam.name).sp_pwdp
{'fraction_non_alphanumeric': 0.09705882352941177, 'fraction_numerical': 0.010784313725490196, 'mean_word_length': 3.1504065040650406, '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': '3758757', 'n_tokens_mistral': 404, 'n_tokens_neox': 384, 'n_words': 97}