<commit_before>import click
import re
from irail.cli import pass_context
from irail.commands.utils import *


class NoConnectionsFound(Exception):
    pass


def parse_duration(duration):
    hours, minutes = divmod(int(duration), 3600)
    return str(hours) + ":" + str(minutes // 60).rjust(2, "0")


def get_duration(connection):
    return parse_duration(connection["duration"])


def get_nr_of_vias(connection):
    try:
        return int(connection["vias"]["number"])
    except KeyError:
        return 0


def get_direction(connection):
    return connection["direction"]["name"]

def generate_vehicle_string(connection):
    vehicle = get_vehicle(connection)
    direction = get_direction(connection)

    return u'\u2193 ' + vehicle + " (" + direction + ") " + u'\u2193'

def expand_via(context, via):
    station_name = get_station_name(via)<commit_msg>Beginnings of stops func<commit_after>import click
import re
from irail.cli import pass_context
from irail.commands.utils import *


class NoConnectionsFound(Exception):
    pass


def parse_duration(duration):
    hours, minutes = divmod(int(duration), 3600)
    return str(hours) + ":" + str(minutes // 60).rjust(2, "0")


def get_duration(connection):
    return parse_duration(connection["duration"])


def get_nr_of_vias(connection):
    try:
        return int(connection["vias"]["number"])
    except KeyError:
        return 0


def get_direction(connection):
    return connection["direction"]["name"]


def generate_vehicle_string(connection):
    vehicle = get_vehicle(connection)
    direction = get_direction(connection)

    return u'\u2193 ' + vehicle + " (" + direction + ") " + u'\u2193'


def show_stops(context, via):
    vehicle = via["vehicle"]
    from_station = ""


def expand_via(context, via):
    station_name = get_station_name(via)
{'fraction_non_alphanumeric': 0.12171052631578948, 'fraction_numerical': 0.01864035087719298, 'mean_word_length': 4.383480825958702, 'pattern_counts': {'":': 2, '<': 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': '5187629', 'n_tokens_mistral': 588, 'n_tokens_neox': 550, 'n_words': 124}