tomoino / Alibi

いつどこで何をしていたか自動で記録してくれるトラッキングアプリ
MIT License
0 stars 0 forks source link

サイト閲覧履歴による過去の作業内容推定と記録(Python) #38

Closed tomoino closed 3 years ago

tomoino commented 3 years ago

Beaconを運用し始めた12/11 12:10以降を対象とする。

実装手順

  1. 時間指定で取得するAPI作成
    http://localhost:8080/events?from=2020-12-11_12:10:00&to=2020-12-11_12:30:00
    http://localhost:8080/events?from=2020-12-11_12:10&to=2020-12-11_12:30
  2. Pythonで時間指定で更新するプログラム作成
  3. Pythonでpredict作成

参考

tomoino commented 3 years ago

APIのUPDATEがうまくいっていなかったようでTimeが上書きされてしまったので、復元する。 id = 27 ~ 50 time = ~ 2020-12-11 15:50:00.847595

UPDATE events SET time='2020-12-11 12:00:00.847595' WHERE id=27;
UPDATE events SET time='2020-12-11 12:10:00.847595' WHERE id=28;
UPDATE events SET time='2020-12-11 12:20:00.847595' WHERE id=29;
UPDATE events SET time='2020-12-11 12:30:00.847595' WHERE id=30;
UPDATE events SET time='2020-12-11 12:40:00.847595' WHERE id=31;
UPDATE events SET time='2020-12-11 12:50:00.847595' WHERE id=32;
UPDATE events SET time='2020-12-11 13:00:00.847595' WHERE id=33;
UPDATE events SET time='2020-12-11 13:10:00.847595' WHERE id=34;
UPDATE events SET time='2020-12-11 13:20:00.847595' WHERE id=35;
UPDATE events SET time='2020-12-11 13:30:00.847595' WHERE id=36;
UPDATE events SET time='2020-12-11 13:40:00.847595' WHERE id=37;
UPDATE events SET time='2020-12-11 13:50:00.847595' WHERE id=38;
UPDATE events SET time='2020-12-11 14:00:00.847595' WHERE id=39;
UPDATE events SET time='2020-12-11 14:10:00.847595' WHERE id=40;
UPDATE events SET time='2020-12-11 14:20:00.847595' WHERE id=41;
UPDATE events SET time='2020-12-11 14:30:00.847595' WHERE id=42;
UPDATE events SET time='2020-12-11 14:40:00.847595' WHERE id=43;
UPDATE events SET time='2020-12-11 14:50:00.847595' WHERE id=44;
UPDATE events SET time='2020-12-11 15:00:00.847595' WHERE id=45;
UPDATE events SET time='2020-12-11 15:10:00.847595' WHERE id=46;
UPDATE events SET time='2020-12-11 15:20:00.847595' WHERE id=47;
UPDATE events SET time='2020-12-11 15:30:00.847595' WHERE id=48;
UPDATE events SET time='2020-12-11 15:40:00.847595' WHERE id=49;
UPDATE events SET time='2020-12-11 15:50:00.847595' WHERE id=50;
tomoino commented 3 years ago

ビーコンのテストとなっているところのeventをNULLにする

UPDATE events SET event=NULL WHERE id>26 and id<2310;