splitted db into separate files

added redis
train using csv files instead of sql
This commit is contained in:
2017-11-30 15:51:46 +01:00
parent 42fce4f17c
commit cf0536483b
12 changed files with 22775 additions and 73 deletions

View File

@@ -1,4 +1,8 @@
import numpy as np
import logging
logger = logging.getLogger('ttl')
logger.setLevel(logging.DEBUG)
def standard_deviation(array):
@@ -20,6 +24,12 @@ def changes(array):
def specific_range(ttl):
specific_ttl_ranges = 4 # default is [900, inf]
try:
ttl = int(ttl)
except ValueError:
logger.error('ttl not a number')
return specific_ttl_ranges
if 0 < ttl <= 1:
specific_ttl_ranges = 0
elif 1 < ttl <= 100: