<commit_before># -*- coding: utf-8 -*-
 """Memcached and in-memory cache result backend."""
 from __future__ import absolute_import
 
 from kombu.utils import cached_property
 from kombu.utils.url import _parse_url
 
 import boto3
 import logging
 import decimal
 from time import sleep
 
 from .base import KeyValueStoreBackend
 
 __all__ = ['DynamoDBBackend']
 
 
 class Client(object):
     """docstring for Client"""
 
     def __init__(self, url):
         super(Client, self).__init__()
         _, region_name, _, access_key, secret_key, table_name, _ = _parse_url(url)
         session = boto3.Session(
             aws_access_key_id=access_key,
             aws_secret_access_key=secret_key
         )
         dynamodb = session.resource('dynamodb', region_name=region_name)
         table = dynamodb.Table(table_name)
         self.table = table
         self.dynamodb = dynamodb
 
     def get(self, key):
         while True:
             response = self.table.get_item(
                 Key={
                     'id': key
                 },
                 ConsistentRead=True
             )
             item = response.get('Item')
             if item:
                 break
             else:
                 sleep(0.1)
         return item['result']<commit_msg>add in the key value backend class<commit_after># -*- coding: utf-8 -*-
 """Memcached and in-memory cache result backend."""
 from __future__ import absolute_import
 
 from kombu.utils import cached_property
 from kombu.utils.url import _parse_url
 
 import boto3
 import logging
 import decimal
 from time import sleep
 
 from .base import KeyValueStoreBackend
 
 __all__ = ['DynamoDBBackend']
 
 
 class Client(object):
     """docstring for Client"""
 
     def __init__(self, url):
         super(Client, self).__init__()
         _, region_name, _, access_key, secret_key, table_name, _ = _parse_url(url)
         session = boto3.Session(
             aws_access_key_id=access_key,
             aws_secret_access_key=secret_key
         )
         dynamodb = session.resource('dynamodb', region_name=region_name)
         table = dynamodb.Table(table_name)
         self.table = table
         self.dynamodb = dynamodb
 
     def get(self, key):
         while True:
             response = self.table.get_item(
                 Key={
                     'id': key
                 },
                 ConsistentRead=True
             )
             item = response.get('Item')
             if item:
                 break
             else:
                 sleep(0.1)
         return item['result']

class DynamoDBBackend(KeyValueStoreBackend):
 
     supports_native_join = True
     implements_incr = True
     supports_autoexpire = False
 
     def __init__(self, url=None, *args, **kwargs):
         super(DynamoDBBackend, self).__init__(*args, **kwargs)
         self.url = url
 
     def get(self, key):
         return self.client.get(key)
{'fraction_non_alphanumeric': 0.08914596801633208, 'fraction_numerical': 0.003402517863218782, 'mean_word_length': 1.942942942942943, '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': '5159888', 'n_tokens_mistral': 845, 'n_tokens_neox': 807, 'n_words': 198}