<commit_before>#

def freplace( fname, pattern, str )
  f = File.open( fname )
  strings = f.read
  f.close

  strings.gsub!( pattern, str )

  f = File.new( fname, "w" )
  f.print strings
  f.close
end

def startmds
  mdshome =  $config["env"]["paths"][$bbver]["mds"]
  args = []
  args << "/c"
  args << "run.bat"

  Jake.run("cmd.exe",args, mdshome,true)
end 

def stopmds
  mdshome =  $config["env"]["paths"][$bbver]["mds"]
  args = []
  args << "/c"
  args << "shutdown.bat"

  Jake.run("cmd.exe",args, mdshome, true, true)
end 

def startsim
  sim = $config["env"]["paths"][$bbver]["sim"]
  jde = $config["env"]["paths"][$bbver]["jde"]
    
  command =  '"' + jde + "/simulator/fledge.exe\""
  args = []
  args << "/app=Jvm.dll"
  args << "/handheld=" + sim
  args << "/session=" + sim
  args << "/app-param=DisableRegistration"
  args << "/app-param=JvmAlxConfigFile:"+sim+".xml"
  args << "/data-port=0x4d44"
  args << "/data-port=0x4d4e"
  args << "/pin=0x2100000A"
  args << "/no-compact-filesystem"
    
  if $bbver !~ /^4\.[012](\..*)?$/
    args << "/sdcard-inserted=true"
    args << "/fs-sdcard=true"
  end<commit_msg>do not utrn off screen on simulator<commit_after>#

def freplace( fname, pattern, str )
  f = File.open( fname )
  strings = f.read
  f.close

  strings.gsub!( pattern, str )

  f = File.new( fname, "w" )
  f.print strings
  f.close
end

def startmds
  mdshome =  $config["env"]["paths"][$bbver]["mds"]
  args = []
  args << "/c"
  args << "run.bat"

  Jake.run("cmd.exe",args, mdshome,true)
end 

def stopmds
  mdshome =  $config["env"]["paths"][$bbver]["mds"]
  args = []
  args << "/c"
  args << "shutdown.bat"

  Jake.run("cmd.exe",args, mdshome, true, true)
end 

def startsim
  sim = $config["env"]["paths"][$bbver]["sim"]
  jde = $config["env"]["paths"][$bbver]["jde"]
    
  command =  '"' + jde + "/simulator/fledge.exe\""
  args = []
  args << "/app=Jvm.dll"
  args << "/handheld=" + sim
  args << "/session=" + sim
  args << "/app-param=DisableRegistration"
  args << "/app-param=JvmAlxConfigFile:"+sim+".xml"
  args << "/data-port=0x4d44"
  args << "/data-port=0x4d4e"
  args << "/pin=0x2100000A"
  args << "/no-compact-filesystem"
  args << "/keep-lcd-on"
    
  if $bbver !~ /^4\.[012](\..*)?$/
    args << "/sdcard-inserted=true"
    args << "/fs-sdcard=true"
  end
  if $bbver !~ /^4\.[01235](\..*)?$/
    args << "/no-guibacklight"
  end
{'fraction_non_alphanumeric': 0.22915793883535818, 'fraction_numerical': 0.018433179723502304, 'mean_word_length': 3.1602787456445993, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '2328159', 'n_tokens_mistral': 1035, 'n_tokens_neox': 1014, 'n_words': 187}