<commit_before>#!/usr/bin/env python

from __future__ import print_function
import argparse
import exifread
import shutil
from os import path
from datetime import datetime


def _time_created(image_file):
    exif_creation_date = 'DateTimeOriginal'
    exif_date_fmt = '%Y:%m:%d %H:%M:%S'
    with open(image_file, 'rb') as img:
        tags = exifread.process_file(img)
        date_str = None
        for k, v in tags.items():
            # print(k, ':  ', v)
            if exif_creation_date.lower() in k.lower():
                date_str = str(v)
        try:
            return datetime.strptime(date_str, exif_date_fmt)<commit_msg>Switch to python3<commit_after>#!/usr/bin/env python3

import argparse
import exifread
import shutil
from os import path
from datetime import datetime


def _time_created(image_file):
    exif_creation_date = 'DateTimeOriginal'
    exif_date_fmt = '%Y:%m:%d %H:%M:%S'
    with open(image_file, 'rb') as img:
        tags = exifread.process_file(img)
        date_str = None
        for k, v in tags.items():
            # print(k, ':  ', v)
            if exif_creation_date.lower() in k.lower():
                date_str = str(v)
        try:
            return datetime.strptime(date_str, exif_date_fmt)
{'fraction_non_alphanumeric': 0.10619469026548672, 'fraction_numerical': 0.0016090104585679806, 'mean_word_length': 2.7134328358208957, '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': '5720645', 'n_tokens_mistral': 420, 'n_tokens_neox': 406, 'n_words': 103}