<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals

import json
from itertools import groupby
from operator import itemgetter

import re
import time

from six import iteritems

from docker.errors import NotFound


KWARG_MAP = {
    'network_mode': 'net',
    'timeout': 'time',
    'ports': 'expose',
    'extra_hosts': 'add-host',
}
NONE_TAG = '<none>'
CONTAINER_FORMAT_ARG = ('--format='
                        '"{{.ID}}||{{.Image}}||{{.CreatedAt}}||{{.Status}}||{{.Names}}||{{.Command}}||{{.Ports}}"')
_arg_format = '--{0}={1}'.format
_quoted_arg_format = '--{0}="{1}"'.format
_mapping_format = '--{0}={1}:{2}'.format
_format_tag = '{0[0]}:{0[1]}'.format
_get_image_id = itemgetter(2)


def _summarize_tags(image_id, image_lines):
    first_line = next(image_lines)
    image_tags = [_format_tag(first_line)] if first_line[0] != NONE_TAG else []
    image_tags.extend(_format_tag(image) for image in image_lines if image[0] != NONE_TAG)
    return {
        'Id': image_id,
        'RepoTags': image_tags or NONE_TAG,
        'ParentId': '',
        'Created': 0,
        'VirtualSize': 0,
        'Size': 0,
    }
<commit_msg>Added no-cache option to kwarg translation.<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals

import json
from itertools import groupby
from operator import itemgetter

import re
import time

from six import iteritems

from docker.errors import NotFound


KWARG_MAP = {
    'network_mode': 'net',
    'timeout': 'time',
    'ports': 'expose',
    'extra_hosts': 'add-host',
    'nocache': 'no-cache',
}
NONE_TAG = '<none>'
CONTAINER_FORMAT_ARG = ('--format='
                        '"{{.ID}}||{{.Image}}||{{.CreatedAt}}||{{.Status}}||{{.Names}}||{{.Command}}||{{.Ports}}"')
_arg_format = '--{0}={1}'.format
_quoted_arg_format = '--{0}="{1}"'.format
_mapping_format = '--{0}={1}:{2}'.format
_format_tag = '{0[0]}:{0[1]}'.format
_get_image_id = itemgetter(2)


def _summarize_tags(image_id, image_lines):
    first_line = next(image_lines)
    image_tags = [_format_tag(first_line)] if first_line[0] != NONE_TAG else []
    image_tags.extend(_format_tag(image) for image in image_lines if image[0] != NONE_TAG)
    return {
        'Id': image_id,
        'RepoTags': image_tags or NONE_TAG,
        'ParentId': '',
        'Created': 0,
        'VirtualSize': 0,
        'Size': 0,
    }

{'fraction_non_alphanumeric': 0.184, 'fraction_numerical': 0.015157894736842105, 'mean_word_length': 3.6315789473684212, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '735332', 'n_tokens_mistral': 876, 'n_tokens_neox': 860, 'n_words': 179}