CONFIGURAÇAO 4
This commit is contained in:
parent
40e64da82f
commit
688b6e4a0b
Binary file not shown.
@ -139,15 +139,24 @@
|
||||
<small class="text-muted mt-2 d-block" style="font-size: 0.75rem;">* Atualizado ao vivo conforme anulações no editor.</small>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<div class="group-title text-danger">Números Anulados (Vermelho)</div>
|
||||
<div class="group-title text-danger">Números Anulados (IA Radar Radar)</div>
|
||||
<div class="badge-grid">
|
||||
{% for number in result.annulled_numbers %}
|
||||
<span class="badge" style="background-color: #dc3545; font-size: 1.1rem;">{{ number|stringformat:"02d" }}</span>
|
||||
{% if number in result.reclaimed_numbers %}
|
||||
<span class="badge shadow-sm pulse-green" style="background: linear-gradient(135deg, #198754, #20c997); font-size: 1.1rem; border: 2px solid #fff;">{{ number|stringformat:"02d" }}</span>
|
||||
{% else %}
|
||||
<span class="badge" style="background-color: #dc3545; font-size: 1.1rem;">{{ number|stringformat:"02d" }}</span>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if not result.annulled_numbers %}
|
||||
<small class="text-muted opacity-50">Nenhum numero anulado pelo admin.</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if result.reclaimed_numbers %}
|
||||
<small class="text-success mt-2 d-block fw-bold" style="font-size: 0.8rem;">
|
||||
<i class="bi bi-radar"></i> IA DETECTOU: {{ result.reclaimed_numbers|length }} número(s) anulado(s) com alta chance de sorteio imediato (Verde)!
|
||||
</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -351,6 +360,21 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
border-color: #198754;
|
||||
box-shadow: 0 0 15px rgba(25, 135, 84, 0.4);
|
||||
}
|
||||
.pulse-green {
|
||||
animation: pulse-animation 2s infinite;
|
||||
box-shadow: 0 0 0 0 rgba(32, 201, 151, 0.7);
|
||||
}
|
||||
@keyframes pulse-animation {
|
||||
0% {
|
||||
box-shadow: 0 0 0 0 rgba(32, 201, 151, 0.7);
|
||||
}
|
||||
70% {
|
||||
box-shadow: 0 0 0 10px rgba(32, 201, 151, 0);
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 0 0 0 rgba(32, 201, 151, 0);
|
||||
}
|
||||
}
|
||||
#live-result-area {
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
@ -179,9 +179,27 @@ def home(request):
|
||||
|
||||
# Definição de Cores: Verde (Hot) e Vermelho (Frio)
|
||||
# MATEMÁTICA AO VIVO: Calcula a elite estatística no momento do acesso, ignorando anulados.
|
||||
# Pegamos os números com maior frequência que NÃO estão anulados.
|
||||
available_numbers = [n for n in range(1, lottery_obj.max_number + 1) if n not in annulled]
|
||||
|
||||
# IA DE RECLAMAÇÃO: Identifica números anulados com alta probabilidade de sorteio imediato
|
||||
# Calculamos o atraso (delay) para todos os números
|
||||
last_seen_all = {}
|
||||
for i, draw in enumerate(reversed(draw_lists)):
|
||||
for num in draw:
|
||||
if num not in last_seen_all:
|
||||
last_seen_all[num] = i
|
||||
|
||||
# Score de Reclamação para Anulados
|
||||
reclaimed_numbers = []
|
||||
for n in annulled:
|
||||
freq = frequency.get(n, 0)
|
||||
delay = last_seen_all.get(n, len(draw_lists))
|
||||
# Se o número tem frequência alta E está "atrasado", ele é um forte candidato a voltar
|
||||
reclaim_score = (freq * 0.6) + (delay * 0.4)
|
||||
# Se o score dele estiver no topo 15% de probabilidade global, nós o "reclamamos"
|
||||
if reclaim_score > (max(frequency.values()) * 0.8):
|
||||
reclaimed_numbers.append(n)
|
||||
|
||||
# Ordena os números disponíveis pela frequência (quentes primeiro)
|
||||
sorted_by_freq = sorted(available_numbers, key=lambda n: frequency.get(n, 0), reverse=True)
|
||||
|
||||
@ -224,6 +242,7 @@ def home(request):
|
||||
"hot_numbers": hot_numbers,
|
||||
"cold_numbers": cold_numbers[:15], # Amostra de frios
|
||||
"annulled_numbers": annulled,
|
||||
"reclaimed_numbers": reclaimed_numbers,
|
||||
}
|
||||
|
||||
context = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user