jsonify and random seed
This commit is contained in:
@@ -3,6 +3,7 @@ import time
|
||||
|
||||
class Bucket:
|
||||
def __init__(self):
|
||||
random.seed(time.time())
|
||||
self.name = Bucket.ms_to_bucket(Bucket.now_ms())
|
||||
self.content = []
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import time
|
||||
import json
|
||||
|
||||
class Writer:
|
||||
def __init__(self):
|
||||
@@ -17,7 +18,7 @@ class Line:
|
||||
self.v = v
|
||||
|
||||
def __str__(self):
|
||||
return f'@{self.t} | {self.v}'
|
||||
return json.dumps({"t":self.t, "v": self.v})
|
||||
|
||||
def choose(a, b):
|
||||
if not a:
|
||||
|
||||
Reference in New Issue
Block a user