from decimal import *
from slugify import slugify


def slugify_filename(url):
    filename = slugify(url)
    return filename


def calculate_ratio(total, same_domain):
    getcontext().prec = 3
    total = Decimal(total)
    same_domain = Decimal(same_domain)
    if total == 0:
        return total
    return same_domain / total

b0a1e527320c3dc724d48c6c4a36a663d111ee4b
<mask token>

<mask token>


def slugify_filename(url):
    filename = slugify(url)
    return filename


<mask token>

<mask token>


def slugify_filename(url):
    filename = slugify(url)
    return filename


def calculate_ratio(total, same_domain):
    getcontext().prec = 3
    total = Decimal(total)
    same_domain = Decimal(same_domain)
    if total == 0:
        return total
    return same_domain / total

from decimal import *
from slugify import slugify


def slugify_filename(url):
    filename = slugify(url)
    return filename


def calculate_ratio(total, same_domain):
    getcontext().prec = 3
    total = Decimal(total)
    same_domain = Decimal(same_domain)
    if total == 0:
        return total
    return same_domain / total
