<commit_before>from __future__ import absolute_import, division, print_function, unicode_literals

import six
import sys

from echomesh.base import Config
from echomesh.base import GetPrefix
from echomesh.expression import Expression
from echomesh.util.thread import Lock

class _Client(object):
  def __init__(self):
    self.clients = {}
    self.lock = Lock.Lock()

  def get(self, *path):
    Config.add_client(self)
    with self.lock:
      value = self.clients.get(path)
      if not value:
        value = Expression.convert(Config.get(*path))
        self.clients[path] = value
      return value

  def config_update(self, get):
    with self.lock:
      for path in six.iterkeys(self.clients):
        self.clients[path] = Expression.convert(Config.get(*path))

_CLIENT = _Client()

get = _CLIENT.get
<commit_msg>Continuing the change to timeouts.<commit_after>from __future__ import absolute_import, division, print_function, unicode_literals

import six
import sys

from echomesh.base import Config
from echomesh.base import GetPrefix
from echomesh.expression import Expression
from echomesh.util.thread import Lock

class _Client(object):
  def __init__(self):
    self.clients = {}
    self.lock = Lock.Lock()
    Config.add_client(self)

  def get(self, *path):
    with self.lock:
      value = self.clients.get(path)
      if not value:
        value = Expression.convert(Config.get(*path))
        self.clients[path] = value
      return value

  def config_update(self, get):
    with self.lock:
      for path in six.iterkeys(self.clients):
        self.clients[path] = Expression.convert(Config.get(*path))

_CLIENT = _Client()

get = _CLIENT.get

{'fraction_non_alphanumeric': 0.09766327142001198, 'fraction_numerical': 0.0, 'mean_word_length': 3.613259668508287, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1075542', 'n_tokens_mistral': 527, 'n_tokens_neox': 516, 'n_words': 136}