<commit_before>#!/usr/bin/python
from __future__ import division
import copy


def round_point(point):
    return [int(point[0]), int(point[1])]


def scale_point(point, k):
    return [k[0]*point[0], k[1]*point[1]]


def shift_point(point, offset):
    return [point[0]+offset[0], point[1]+offset[1]]


def round_points(points):
    return [round_point(p) for p in points]


def scale_points(points, k):
    return [scale_point(p, k) for p in points]


def shift_points(points, offset):
    return [shift_point(p, offset) for p in points]


def get_square():
    return [[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]


def get_rectangular(w, h):
    return scale_points(get_square(), [w, h])


def get_color(text):
    t = {
        'white': '#fff',
        'black': '#000',
        'red': '#f00',
        'green': '#0f0',
        'blue': '#00f'
    }
    return t.get(text, text)


def close_points(points):
    res = points[:]
    first = res[0]
    last = res[-1]
    res.append([last[0], 0])
    res.append([first[0], 0])
    res.append(first)<commit_msg>fix empy list issue, close points<commit_after>#!/usr/bin/python
from __future__ import division
import copy


def round_point(point):
    return [int(point[0]), int(point[1])]


def scale_point(point, k):
    return [k[0]*point[0], k[1]*point[1]]


def shift_point(point, offset):
    return [point[0]+offset[0], point[1]+offset[1]]


def round_points(points):
    return [round_point(p) for p in points]


def scale_points(points, k):
    return [scale_point(p, k) for p in points]


def shift_points(points, offset):
    return [shift_point(p, offset) for p in points]


def get_square():
    return [[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]


def get_rectangular(w, h):
    return scale_points(get_square(), [w, h])


def get_color(text):
    t = {
        'white': '#fff',
        'black': '#000',
        'red': '#f00',
        'green': '#0f0',
        'blue': '#00f'
    }
    return t.get(text, text)


def close_points(points):
    res = points[:]
    if len(res) < 1:
        return res
    first = res[0]
    last = res[-1]
    res.append([last[0], 0])
    res.append([first[0], 0])
    res.append(first)
{'fraction_non_alphanumeric': 0.1812730627306273, 'fraction_numerical': 0.03274907749077491, 'mean_word_length': 3.2696850393700787, 'pattern_counts': {'":': 0, '<': 4, '<?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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2436892', 'n_tokens_mistral': 851, 'n_tokens_neox': 804, 'n_words': 211}