<commit_before>-- j.lua: JoinMe wifi config utility
-- usage: j=require("j"); j.doinit(); j=nil
j={}
local cfile = "jconf.lua"
local function getconf() 
  status, results = pcall(dofile, cfile) -- might just do return pcall(...)
  if status then return results else return nil end
end
local function conf2string(conf)
  buf = "{"
  for k, v in pairs(conf) do
    buf = buf .. string.format(' %s = "%s",', k, v)
  end
  return buf .. " }\n"
end
local function writeconf(conf)
  f = file.open(cfile, "w")
  if not f then return nil end
  file.write("return " .. conf2string(conf))
  file.close()
  return true
end
local function joinwifi(conf)
  wifi.sta.config(conf.ssid, conf.key)
  wifi.sta.connect()
end
local wifiform = [=[ <html><body><commit_msg>notes towards generalisation of flash driven continuations<commit_after>-- j.lua: JoinMe wifi config utility
-- usage: j=require("j"); j.doinit(); j=nil
j={}
local cfile = "jconf.lua"
local function getconf() 
  status, results = pcall(dofile, cfile) -- might just do return pcall(...) or {}
  if status then return results else return nil end
end
local function conf2string(conf)
  buf = "{"
  for k, v in pairs(conf) do
    buf = buf .. string.format(' %s = "%s",', k, v)
  end
  return buf .. " }\n"
end
local function writeconf(conf)
  f = file.open(cfile, "w")
  if not f then return nil end
  file.write("return " .. conf2string(conf))
  file.close()
  return true
end
local function joinwifi(conf)
  wifi.sta.config(conf.ssid, conf.key)
  wifi.sta.connect()
end
local wifiform = [=[ <html><body>
{'fraction_non_alphanumeric': 0.1493882807469414, 'fraction_numerical': 0.0025756600128783, 'mean_word_length': 3.6666666666666665, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1295905', 'n_tokens_mistral': 546, 'n_tokens_neox': 541, 'n_words': 180}