mirror of
https://github.com/epitaxy/log-watcher.git
synced 2025-10-13 17:51:14 +09:00
First Commit
This commit is contained in:
10
base.py
Normal file
10
base.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from operator import itemgetter
|
||||
|
||||
|
||||
# convertion of Json Data to list
|
||||
state, time = list( zip(*[ (x['state'], x['last_updated']) for x in raw_data]))
|
||||
|
||||
# another converion thorugh itemgetter (a little faster)
|
||||
state, time = list( zip( *map(itemgetter('state', 'last_updated'), raw_data) ))
|
||||
|
||||
state = list(map(itemgetter('state'), raw_data))
|
||||
Reference in New Issue
Block a user