<commit_before>sudo apt-get install picocom
sudo apt-get instal python-serial

https://github.com/themadinventor/esptool
https://github.com/4refr0nt/luatool
https://github.com/nodemcu/nodemcu-firmware
wget https://github.com/nodemcu/nodemcu-firmware/raw/master/pre_build/latest/nodemcu_latest.bin

esptool/esptool.py --port /dev/ttyS2 --baud 9600 write_flash 0x000000 nodemcu_latest.bin
https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en

sudo gpio mode 1 out
sudo gpio write 1 0 && gpio write 1 1

picocom /dev/ttyS2 -omap crcrlf -b 9600

~/luatool.py --port /dev/ttyS2 --baud 9600 --src init.lua --dest init.lua --verbose

l = file.list() for k,v in pairs(l) do print(v .. " -- " .. k) end

majorVer, minorVer, devVer, chipid, flashid, flashsize, flashmode, flashspeed = node.info();
print("flashsize: " .. flashsize)

file.open("config.lua", "r") print(file.readline()) file.close()

f = file.open("debug.lua", "r") repeat line = file.readline() print(line) until line ~= nil

while true do line = file.readline() if line == nil then break end print (line) end
       
file.open("debug.lua", "a+")
file.writeline('testing')
file.flush()
file.close()

file.remove("ap_mode.lua")

<commit_msg>Update notes.txt<commit_after>sudo apt-get install picocom
sudo apt-get instal python-serial

https://github.com/themadinventor/esptool
https://github.com/4refr0nt/luatool
https://github.com/nodemcu/nodemcu-firmware
wget https://github.com/nodemcu/nodemcu-firmware/raw/master/pre_build/latest/nodemcu_latest.bin

esptool/esptool.py --port /dev/ttyS2 --baud 9600 write_flash 0x000000 nodemcu_latest.bin
https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en

sudo gpio mode 1 out
sudo gpio write 1 0 && gpio write 1 1

picocom /dev/ttyS2 -omap crcrlf -b 9600

~/luatool.py --port /dev/ttyS2 --baud 9600 --src init.lua --dest init.lua --verbose

l = file.list() for k,v in pairs(l) do print(v .. " -- " .. k) end

majorVer, minorVer, devVer, chipid, flashid, flashsize, flashmode, flashspeed = node.info();
print("flashsize: " .. flashsize)

file.open("config.lua", "r") print(file.readline()) file.close()

f = file.open("debug.lua", "r") repeat line = file.readline() print(line) until line ~= nil

while true do line = file.readline() if line == nil then break end print (line) end
       
file.open("debug.lua", "a+")
file.writeline('testing')
file.flush()
file.close()

file.remove("config.lua")


{'fraction_non_alphanumeric': 0.15355960264900662, 'fraction_numerical': 0.024006622516556293, 'mean_word_length': 4.1099365750528545, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, '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': '7613322', 'n_tokens_mistral': 952, 'n_tokens_neox': 892, 'n_words': 215}