From 6d7ba58f880be618ade07f8ea080fe8c4bf8a896 Mon Sep 17 00:00:00 2001 From: cyfraeviolae Date: Wed, 3 Apr 2024 03:10:44 -0400 Subject: venv --- .../faker/providers/internet/en_PH/__init__.py | 65 +++++++++++++++++++++ .../en_PH/__pycache__/__init__.cpython-311.pyc | Bin 0 -> 3020 bytes 2 files changed, 65 insertions(+) create mode 100644 venv/lib/python3.11/site-packages/faker/providers/internet/en_PH/__init__.py create mode 100644 venv/lib/python3.11/site-packages/faker/providers/internet/en_PH/__pycache__/__init__.cpython-311.pyc (limited to 'venv/lib/python3.11/site-packages/faker/providers/internet/en_PH') diff --git a/venv/lib/python3.11/site-packages/faker/providers/internet/en_PH/__init__.py b/venv/lib/python3.11/site-packages/faker/providers/internet/en_PH/__init__.py new file mode 100644 index 0000000..46c8f2e --- /dev/null +++ b/venv/lib/python3.11/site-packages/faker/providers/internet/en_PH/__init__.py @@ -0,0 +1,65 @@ +from collections import OrderedDict + +from faker.utils.decorators import lowercase, slugify + +from .. import Provider as InternetProvider + + +class Provider(InternetProvider): + """ + Provider for internet stuff for en_PH locale + + Free email domains are based on anecdotal evidence and experience. Available TLDs are based on the listed sources. + Because of the local company naming scheme, a custom generator is needed to output convincing company domains. + + Sources: + - https://en.wikipedia.org/wiki/.ph + """ + + tlds = ( + "com", + "net", + "org", + "ph", + "com.ph", + "net.ph", + "org.ph", + ) + safe_email_tlds = tlds + free_email_domains = ( + "gmail.com", + "yahoo.com", + "zohomail.com", + ) + email_formats = OrderedDict( + [ + ("{{user_name}}@{{domain_name}}", 0.75), + ("{{user_name}}@{{free_email_domain}}", 0.25), + ] + ) + + @lowercase + @slugify + def domain_word(self) -> str: + check = self.random_int(0, 99) + if check % 100 < 40: + company_acronym = self.generator.format("random_company_acronym") + if len(company_acronym) == 2: + company_type = self.generator.format("company_type") + return company_acronym + company_type + else: + return company_acronym + else: + if check % 2 == 0: + name_part = self.generator.format("last_name") + else: + name_part = self.generator.format("random_company_adjective") + company_noun_chain = self.generator.format("random_company_noun_chain") + company_nouns = company_noun_chain.split(" ") + if len(company_nouns) == 1: + return name_part + company_noun_chain + else: + company_type = self.generator.format("company_type") + company_elements = [name_part] + company_nouns + acronym = "".join([word[0] for word in company_elements]) + return acronym + company_type diff --git a/venv/lib/python3.11/site-packages/faker/providers/internet/en_PH/__pycache__/__init__.cpython-311.pyc b/venv/lib/python3.11/site-packages/faker/providers/internet/en_PH/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..26e50b5 Binary files /dev/null and b/venv/lib/python3.11/site-packages/faker/providers/internet/en_PH/__pycache__/__init__.cpython-311.pyc differ -- cgit v1.2.3