<commit_before>'''
interval.py - Deal with intervals.
author: <NAME> <<EMAIL>>
version: 1.0
'''

import copy

class Interval:
    '''
    Class: Interval

    Maintainer: <NAME>

    Version: 1.0

    Usage: a = Interval(list)
           (nested list: [[x,x,f1...],[x,x,f2...]...] / [[x,x],[x,x]...] or
            simple list: [x,x,f1...] / [x,x])
    Notes: all the intervals in the list will become mutually exclusive and
           be sorted after instantiation.

    For example: input:  [[1, 10, 'a'], [17, 22, 'b'], [7, 12, 'c'], [20, 25, 'd'], [30, 35, 'e']]
                 output: [[1, 12, 'a', 'c'], [17, 25, 'b', 'd'], [30, 35, 'e']]

    Attributes: interval

    Functions: c = a + b or a += b
               c = b + a
               c = a * b or a *= b
               c = b * a
               c = a - b or a -= b
               c = b - a
               a[n] or a[n:m]<commit_msg>use new class for python 2<commit_after>'''
interval.py - Deal with intervals.
author: <NAME> <<EMAIL>>
version: 1.0
'''

import copy

class Interval(object):
    '''
    Class: Interval

    Maintainer: <NAME>

    Version: 1.0

    Usage: a = Interval(list)
           (nested list: [[x,x,f1...],[x,x,f2...]...] / [[x,x],[x,x]...] or
            simple list: [x,x,f1...] / [x,x])
    Notes: all the intervals in the list will become mutually exclusive and
           be sorted after instantiation.

    For example: input:  [[1, 10, 'a'], [17, 22, 'b'], [7, 12, 'c'], [20, 25, 'd'], [30, 35, 'e']]
                 output: [[1, 12, 'a', 'c'], [17, 25, 'b', 'd'], [30, 35, 'e']]

    Attributes: interval

    Functions: c = a + b or a += b
               c = b + a
               c = a * b or a *= b
               c = b * a
               c = a - b or a -= b
               c = b - a
               a[n] or a[n:m]
{'fraction_non_alphanumeric': 0.1965764770844837, 'fraction_numerical': 0.04030922142462728, 'mean_word_length': 1.6184971098265897, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3039520', 'n_tokens_mistral': 720, 'n_tokens_neox': 640, 'n_words': 226}