<commit_before># Python Security Project (PySec) and its related class files.
#
# PySec is a set of tools for secure application development under Linux
#
# Copyright 2014 PySec development team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# -*- coding: ascii -*-
"""A lot of utilies for:
    - Operations on paths
    - Counting
"""
from itertools import islice
import operator
import heapq
import datetime
import calendar
import re

from pysec import lang


def xrange(start, stop, step=1):
    """This xrange use python's integers and have not limits of
    machine integers."""
    stop = int(stop)
    step = int(step)
    if step < 0:
        start, stop = stop, start
        bcmp = operator.gt
    elif step > 0:
        bcmp = operator.lt
    else:<commit_msg>make pysec.xrange() signature equal to builtins' xrange()<commit_after># Python Security Project (PySec) and its related class files.
#
# PySec is a set of tools for secure application development under Linux
#
# Copyright 2014 PySec development team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# -*- coding: ascii -*-
"""A lot of utilies for:
    - Operations on paths
    - Counting
"""
from itertools import islice
import operator
import heapq
import datetime
import calendar
import re

from pysec import lang


def xrange(*args):
    """xrange([start,] stop[, step]) -> xrange object

    This xrange use python's integers and has not limits of
    machine integers."""
    len_args = len(args)
    if len_args == 1:
        stop = int(args[0])
        start = 0
        step = 1
    elif len_args == 2:
        start = int(args[0])
        stop = int(args[1])
        step = 1
    elif len_args == 3:
        start = int(args[0])
        stop = int(args[1])
        step = int(args[2])
    else:
        raise TypeError("xrange() requires 1-3 int arguments")
    if step < 0:
        start, stop = stop, start
        bcmp = operator.gt
    elif step > 0:
        bcmp = operator.lt
    else:
{'fraction_non_alphanumeric': 0.08588750421017177, 'fraction_numerical': 0.011788480970023578, 'mean_word_length': 3.1022099447513813, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2076049', 'n_tokens_mistral': 847, 'n_tokens_neox': 815, 'n_words': 378}