Repository Public
1#!/bin/zsh2# =============================================================================3# SP BOUCHER | INFRASTRUCTURE & AUTOMATION4# ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# Project : Lou·Ka8# File : scripts/kascores-apres-env.sh9# Module : scripts10# Repository : https://git.spboucher.ai/lou-ka11# Created : 2026-08-1812# Last Modified : 2026-08-1813#14# Author : Simon-Pierre Boucher15# Position : Professor of Finance16# Institution : Université du Québec en Outaouais (UQO)17# Organization : SP Boucher18# Website : https://spboucher.ai19# Git : https://git.spboucher.ai20#21# Preferred Contact: contact@spboucher.ai22# Technical Contact: dev@spboucher.ai23# Security/Admin : admin@spboucher.ai24#25# Copyright (c) 202626# Simon-Pierre Boucher27# All rights reserved where applicable. This file is governed by the28# applicable project license, copyright notices and relevant law.29# Existing third-party rights and notices remain unaffected.30#31# License : None specified (no license file in this repository)32#33# Do not embed credentials, private keys, access tokens,34# certificates or confidential personal information.35#36# =============================================================================37# END OF SP BOUCHER SOURCE HEADER38# =============================================================================3940# Complète les tuiles env (reprises espacées — respect des limites Overpass)41# puis calcule les KA Scores de tout le parc. Journal : /tmp/louka-kascores.log42cd ~/apps/lou-ka43for i in {1..10}; do44 .venv/bin/python run.py env >> /tmp/louka-kascores.log 2>&145 MANQ=$(.venv/bin/python - <<PY46from louka import db, environment47con = db.connect()48tiles = environment.needed_tiles(con)49have = {r["tile_key"] for r in con.execute("SELECT tile_key FROM env_tiles")}50print(sum(1 for t in tiles if f"{t[0]},{t[1]}" not in have))51PY52)53 echo "[reprise $i] tuiles manquantes: $MANQ" >> /tmp/louka-kascores.log54 [ "$MANQ" = "0" ] && break55 sleep 90056done57.venv/bin/python run.py kascores >> /tmp/louka-kascores.log 2>&158echo "TERMINE" >> /tmp/louka-kascores.log59