|
@@ -3,6 +3,8 @@ try:
|
|
|
except ImportError:
|
|
except ImportError:
|
|
|
import pickle
|
|
import pickle
|
|
|
import sample
|
|
import sample
|
|
|
|
|
+import typing
|
|
|
|
|
+from typing import List
|
|
|
|
|
|
|
|
|
|
|
|
|
class FeatureVector:
|
|
class FeatureVector:
|
|
@@ -66,11 +68,13 @@ def readPickledData(filename):
|
|
|
|
|
|
|
|
def main():
|
|
def main():
|
|
|
fv = FeatureVector()
|
|
fv = FeatureVector()
|
|
|
- writePickledData("test.bin")
|
|
|
|
|
- readPickledData("test.txt")
|
|
|
|
|
- s = sample.Sample(3)
|
|
|
|
|
-
|
|
|
|
|
- fv = SampleToFeatureVector()
|
|
|
|
|
|
|
+ # writePickledData("test.bin")
|
|
|
|
|
+ # readPickledData("test.txt")
|
|
|
|
|
+ s = sample.Sample([{"delta": 0, "time": '09/19/18 13:55:26', }], open("./results.txt"))
|
|
|
|
|
+ s.dead_time = 30
|
|
|
|
|
+ s.average_iat = 3
|
|
|
|
|
+ s.total_time = 30
|
|
|
|
|
+ fv = SampleToFeatureVector(s)
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|