<commit_before># -*- coding: utf-8 -*-
# @Author: <NAME>
# @Date:   2016-10-12 23:18:17
# @Last Modified by:   <NAME>
# @Last Modified time: 2016-10-17 22:19:40

import json

import pickle

from core import deviceDB
from sys import modules

from core import ffScheduler

class DeviceViews(object):

  def __init__(self):
    self.deviceViewsList = getDeviceViewsList()
    self.deviceStatusDict = getDeviceStatusDict()

    ffScheduler.runEveryS(5, self.refreshViews, job_id='Device_Refresher')

  def refreshViews(self):
    self.deviceViewsList = getDeviceViewsList()
    self.deviceStatusDict = getDeviceStatusDict()


def getDeviceList(lower=True):
  device_list = {}<commit_msg>refresh faster<commit_after># -*- coding: utf-8 -*-
# @Author: <NAME>
# @Date:   2016-10-12 23:18:17
# @Last Modified by:   <NAME>
# @Last Modified time: 2016-10-17 22:24:12

import json

import pickle

from core import deviceDB
from sys import modules

from core import ffScheduler

class DeviceViews(object):

  def __init__(self):
    self.deviceViewsList = getDeviceViewsList()
    self.deviceStatusDict = getDeviceStatusDict()

    ffScheduler.runEveryS(2, self.refreshViews, job_id='Device_Refresher')

  def refreshViews(self):
    self.deviceViewsList = getDeviceViewsList()
    self.deviceStatusDict = getDeviceStatusDict()


def getDeviceList(lower=True):
  device_list = {}
{'fraction_non_alphanumeric': 0.11265544989027067, 'fraction_numerical': 0.043891733723482075, 'mean_word_length': 4.7, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7537681', 'n_tokens_mistral': 492, 'n_tokens_neox': 437, 'n_words': 107}