<commit_before>import cv2
import numpy as np


def task_1():
    image = cv2.imread('_data/sw_s01e09/img_21130751_0005.bmp')

    flag_found, corners = cv2.findChessboardCorners(image, (8, 5))
    print(corners[0])

    if flag_found:
        print('Corners found, refining their positions')
        corners = cv2.cornerSubPix(
            cv2.cvtColor(image, cv2.COLOR_BGR2GRAY),
            corners, (11, 11), (-1, -1),
            (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.1)
        )
        print(corners[0])

        # prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0)
        object_points = np.zeros((8 * 5, 3), np.float32)
        # print(object_points[1])
        # print(object_points.shape)
        object_points[:, :2] = np.mgrid[0:8, 0:5].T.reshape(-1, 2)
        # print(object_points)
        # print(object_points.shape)

        object_points_for = []#np.zeros_like(object_points)
        for i in range(0, 5):
            for j in range(0, 8):<commit_msg>Fixes to camera calibration<commit_after>import cv2
import numpy as np


def task_1():
    image = cv2.imread('./../_data/sw_s01e09/img_21130751_0005.bmp')

    flag_found, corners = cv2.findChessboardCorners(image, (8, 5))
    print(corners[0])

    if flag_found:
        print('Corners found, refining their positions')
        corners = cv2.cornerSubPix(
            cv2.cvtColor(image, cv2.COLOR_BGR2GRAY),
            corners, (11, 11), (-1, -1),
            (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.1)
        )
        print(corners[0])

        # prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0)
        object_points = np.zeros((8 * 5, 3), np.float32)
        print(object_points[1])
        print(object_points.shape)
        object_points[:, :2] = np.mgrid[0:8, 0:5].T.reshape(-1, 2)
        print(object_points)
        print(object_points.shape)

        object_points_for = []#np.zeros_like(object_points)
        for i in range(0, 5):
            for j in range(0, 8):
{'fraction_non_alphanumeric': 0.14933464760965992, 'fraction_numerical': 0.06801379990142928, 'mean_word_length': 2.5427574171029668, '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': '4994536', 'n_tokens_mistral': 835, 'n_tokens_neox': 767, 'n_words': 144}