Commit 9b0d69bd authored by Skia's avatar Skia Committed by Skia

Add good data set

parent 5746f130
Pipeline #710 passed with stage
in 2 minutes and 59 seconds
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/env python3
# -*- coding:utf-8 -*
#
# Skia < skia AT libskia DOT so >
#
# Beerware licensed software - 2016
#
import os
import sys
from datetime import datetime, timedelta
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sith.settings")
import django
django.setup()
from counter.models import Selling, Product
with open("data.dat", 'w') as f:
for date in Selling.objects.filter(date__gte=datetime(year=2016, month=12, day=9)).datetimes("date", "minute"):
print(date)
prods = [s.product.id for s in Selling.objects.filter(date__gte=date, date__lt=date+timedelta(minutes=1)).all() if s.product]
f.write(" ".join([str(p) for p in prods]))
# f.write(" ".join([str(p.id)+"="+("1" if p in [s.product for s in Selling.objects.filter(date__gte=date,
# date__lt=date+timedelta(minutes=1)).all()] else "0") for p in Product.objects.filter(archived=False)]))
f.write("\n")
......@@ -440,9 +440,9 @@ SITH_LAST_OPERATIONS_LIMIT=5
SITH_COUNTER_MINUTE_INACTIVE=10
# Counter sellings statistics
SITH_MINIMUM_SUPPORT=0.5
SITH_MINIMUM_CONFIANCE=0.85
#SITH_MINIMUM_ATM_METRIC=[0,1]
SITH_MINIMUM_SUPPORT=0.001
SITH_MINIMUM_CONFIANCE=0.1
# SITH_MINIMUM_ATM_METRIC=[0,1]
# ET variables
SITH_EBOUTIC_ET_URL = "https://preprod-tpeweb.e-transactions.fr/cgi/MYchoix_pagepaiement.cgi"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment