added logging, use index (id) for sql queries (id hardcoded atm), added newer version of EXPOSURE paper
This commit is contained in:
@@ -5,5 +5,31 @@ def standard_deviation(array):
|
||||
return np.std(array)
|
||||
|
||||
|
||||
def changes(array):
|
||||
current = array[0]
|
||||
changes = 0
|
||||
|
||||
for item in array:
|
||||
if item != current:
|
||||
changes += 1
|
||||
current = item
|
||||
return changes
|
||||
|
||||
|
||||
# specific ranges: [0, 1], [1, 100], [100, 300], [300, 900], [900, inf]
|
||||
def specific_range(ttl):
|
||||
specific_ttl_ranges = 4 # default is [900, inf]
|
||||
|
||||
if 0 < ttl <= 1:
|
||||
specific_ttl_ranges = 0
|
||||
elif 1 < ttl <= 100:
|
||||
specific_ttl_ranges = 1
|
||||
elif 100 < ttl <= 300:
|
||||
specific_ttl_ranges = 2
|
||||
elif 300 < ttl <= 900:
|
||||
specific_ttl_ranges = 3
|
||||
return specific_ttl_ranges
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
exit()
|
||||
|
||||
Reference in New Issue
Block a user