<commit_before>from datetime import datetime, timedelta
def extremes(resp, request) : 
    response = {"before" : "", "after":""}
    earlier = "22221101T010159"
    later = "20000101T000000"
    if resp.planner != None:
        if resp.planner != None:
            for journey in resp.planner.journey:
                if journey.departure_date_time < earlier:
                    earlier = journey.departure_date_time
                if journey.arrival_date_time > later:
                    later = journey.arrival_date_time

            
            tmp = ""
            for key, value in request.iteritems():
                if key != "datetime" and key != "clockwise":
                    tmp += key + "=" +str(value) + "&"

            minute = timedelta(minutes = 1)
            if earlier != "22221101T0101" :
                print earlier
                d = datetime.strptime(earlier, "%Y%m%dT%H%M%S")
                datetime_before = d - minute
                response["before"] = tmp +"clockwise=true&datetime="+datetime_before.strftime("%Y%m%dT%H%M%S")

            if later != "20000101T000000":
                d = datetime.strptime(later, "%Y%m%dT%H%M%S")
                datetime_after = d + minute
                response["after"] = tmp + "clockwise=false&datetime="+datetime_after.strftime("%Y%m%dT%H%M%S")
    print response
    return response
<commit_msg>Frontend : Correction before after<commit_after>from datetime import datetime, timedelta
def extremes(resp, request) : 
    response = {"before" : "", "after":""}
    earlier = "22221101T010159"
    later = "20000101T000000"
    if resp.planner != None:
        if resp.planner != None:
            for journey in resp.planner.journey:
                if journey.departure_date_time < earlier:
                    earlier = journey.departure_date_time
                if journey.arrival_date_time > later:
                    later = journey.arrival_date_time

            
            tmp = ""
            for key, value in request.iteritems():
                if key != "datetime" and key != "clockwise":
                    tmp += key + "=" +str(value) + "&"

            minute = timedelta(minutes = 1)
            if earlier != "22221101T0101" :
                d = datetime.strptime(earlier, "%Y%m%dT%H%M%S")
                datetime_after = d + minute
                response["after"] = tmp + "clockwise=true&datetime="+datetime_after.strftime("%Y%m%dT%H%M%S")

            if later != "20000101T000000":
                d = datetime.strptime(later, "%Y%m%dT%H%M%S") 
                print minute
                print "later : " + d.strftime("%Y%m%dT%H%M%S")
                datetime_before = d - minute
                response["before"] = tmp +"clockwise=false&datetime="+datetime_before.strftime("%Y%m%dT%H%M%S")
    return response

{'fraction_non_alphanumeric': 0.12530973451327435, 'fraction_numerical': 0.03893805309734513, 'mean_word_length': 1.91640866873065, 'pattern_counts': {'":': 6, '<': 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': '5818388', 'n_tokens_mistral': 949, 'n_tokens_neox': 815, 'n_words': 170}