rewrite db.py
rewrite pool.py
rewrite login.py
rewrite config.py
rewrite scratch.py
rewrite analyze.py
add .gitignore
rewrite main.py