diff --git a/faker/providers/internet/__init__.py b/faker/providers/internet/__init__.py
index 60dab824..e42ff0bd 100644
--- a/faker/providers/internet/__init__.py
+++ b/faker/providers/internet/__init__.py
@@ -222,6 +222,33 @@ class Provider(BaseProvider):
         company = self._to_ascii(company_elements.pop(0))
         return company
 
+    def dga(self, year=None, month=None, day=None, tld=None, length=None):
+        """Generates a domain name by given date
+        https://en.wikipedia.org/wiki/Domain_generation_algorithm
+
+        :type year: int
+        :type month: int
+        :type day: int
+        :type tld: str
+        :type length: int
+        :rtype: str
+        """
+
+        domain = ''
+        year = year or self.random_int(min=1, max=9999)
+        month = month or self.random_int(min=1, max=12)
+        day = day or self.random_int(min=1, max=30)
+        tld = tld or self.tld()
+        length = length or self.random_int(min=2, max=63)
+
+        for _ in range(length):
+            year = ((year ^ 8 * year) >> 11) ^ ((year & 0xFFFFFFF0) << 17)
+            month = ((month ^ 4 * month) >> 25) ^ 16 * (month & 0xFFFFFFF8)
+            day = ((day ^ (day << 13)) >> 19) ^ ((day & 0xFFFFFFFE) << 12)
+            domain += chr(((year ^ month ^ day) % 25) + 97)
+
+        return domain + '.' + tld
+
     def tld(self):
         return self.random_element(self.tlds)
 
diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py
index cb99deae..f439c958 100644
--- a/faker/providers/python/__init__.py
+++ b/faker/providers/python/__init__.py
@@ -163,7 +163,7 @@ class Provider(BaseProvider):
             nb_elements = self.randomize_nb_elements(nb_elements, min=1)
 
         return dict(zip(
-            self.generator.words(nb_elements),
+            self.generator.words(nb_elements, unique=True),
             self._pyiterable(nb_elements, False, *value_types),
         ))
 

pydict(variable_nb_elements=False) returns dicts with varying number of elements
* Faker version: 4.0.1
* OS: OS X 10.15.3

pydict with `variable_nb_elements=False` still has varying number of elements.

### Steps to reproduce

```
from faker import Faker

fake = Faker()

nb = 80
for _ in range(30):  # nb is large and the faker function is called 30 times to increase the probability of reproducing the bug.
    fake_dict = fake.pydict(nb_elements=nb, variable_nb_elements=False)
    nb_reality = len(fake_dict)
    if nb_reality != nb:
        print(nb_reality)
```

### Expected behavior

The length of the dictionary should always be `nb`. 

### Actual behavior

It is often shorter as the keys are generated with [`self.generator.words(nb_elements)`](https://github.com/joke2k/faker/blob/master/faker/providers/python/__init__.py#L166). If the keys are not unique, the element is dropped.

diff --git a/tests/test_factory.py b/tests/test_factory.py
index a93df7cf..9ba55204 100644
--- a/tests/test_factory.py
+++ b/tests/test_factory.py
@@ -889,6 +889,14 @@ class FactoryTestCase(unittest.TestCase):
 
         assert expected_methods == sorted(got_methods)
 
+    def test_dga(self):
+        faker = Faker()
+
+        assert faker.dga() != faker.dga()
+
+        expected_domain = 'cqphixmpdfpptskr.com'
+        assert faker.dga(day=1, month=1, year=1000, tld='com', length=16) == expected_domain
+
     def test_random_sample_unique(self):
         from faker.providers import BaseProvider
         provider = BaseProvider(self.generator)

pip install -e .
parse_log_pytest
pytest
coverage freezegun pytest random2 ukpostcodeparser validators>=0.13.0
3.7
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///croot/attrs_1668696182826/work
certifi @ file:///croot/certifi_1671487769961/work/certifi
coverage==7.2.7
decorator==5.1.1
-e git+https://github.com/joke2k/faker.git@d5123ba865cbcc89d82ee3a30992119f09c4e5b9#egg=Faker
flit_core @ file:///opt/conda/conda-bld/flit-core_1644941570762/work/source/flit_core
freezegun==1.5.1
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1648562407465/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
packaging @ file:///croot/packaging_1671697413597/work
pluggy @ file:///tmp/build/80754af9/pluggy_1648042572264/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pytest==7.1.2
python-dateutil==2.9.0.post0
random2==1.0.2
six==1.17.0
text-unidecode==1.3
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
typing_extensions @ file:///croot/typing_extensions_1669924550328/work
UkPostcodeParser==1.1.2
validators==0.20.0
zipp @ file:///croot/zipp_1672387121353/work

name: faker
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=22.1.0=py37h06a4308_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - flit-core=3.6.0=pyhd3eb1b0_0
  - importlib-metadata=4.11.3=py37h06a4308_0
  - importlib_metadata=4.11.3=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=22.0=py37h06a4308_0
  - pip=22.3.1=py37h06a4308_0
  - pluggy=1.0.0=py37h06a4308_1
  - py=1.11.0=pyhd3eb1b0_0
  - pytest=7.1.2=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py37h06a4308_0
  - typing_extensions=4.4.0=py37h06a4308_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.11.0=py37h06a4308_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - coverage==7.2.7
      - decorator==5.1.1
      - freezegun==1.5.1
      - python-dateutil==2.9.0.post0
      - random2==1.0.2
      - six==1.17.0
      - text-unidecode==1.3
      - ukpostcodeparser==1.1.2
      - validators==0.20.0
prefix: /opt/conda/envs/faker

tests/test_factory.py::FactoryTestCase::test_dga
tests/test_factory.py::FactoryTestCase::test_add_provider_gives_priority_to_newly_added_provider tests/test_factory.py::FactoryTestCase::test_binary tests/test_factory.py::FactoryTestCase::test_cli_seed tests/test_factory.py::FactoryTestCase::test_cli_seed_with_repeat tests/test_factory.py::FactoryTestCase::test_cli_verbosity tests/test_factory.py::FactoryTestCase::test_command tests/test_factory.py::FactoryTestCase::test_command_custom_provider tests/test_factory.py::FactoryTestCase::test_documentor tests/test_factory.py::FactoryTestCase::test_email tests/test_factory.py::FactoryTestCase::test_ext_word_list tests/test_factory.py::FactoryTestCase::test_format_calls_formatter_on_provider tests/test_factory.py::FactoryTestCase::test_format_transfers_arguments_to_formatter tests/test_factory.py::FactoryTestCase::test_get_formatter_returns_callable tests/test_factory.py::FactoryTestCase::test_get_formatter_returns_correct_formatter tests/test_factory.py::FactoryTestCase::test_get_formatter_throws_exception_on_incorrect_formatter tests/test_factory.py::FactoryTestCase::test_http_method tests/test_factory.py::FactoryTestCase::test_instance_seed_chain tests/test_factory.py::FactoryTestCase::test_invalid_locale tests/test_factory.py::FactoryTestCase::test_ipv4 tests/test_factory.py::FactoryTestCase::test_ipv4_caching tests/test_factory.py::FactoryTestCase::test_ipv4_distribution_selection tests/test_factory.py::FactoryTestCase::test_ipv4_network_class tests/test_factory.py::FactoryTestCase::test_ipv4_private tests/test_factory.py::FactoryTestCase::test_ipv4_private_caching tests/test_factory.py::FactoryTestCase::test_ipv4_private_class_a tests/test_factory.py::FactoryTestCase::test_ipv4_private_class_b tests/test_factory.py::FactoryTestCase::test_ipv4_private_class_c tests/test_factory.py::FactoryTestCase::test_ipv4_public tests/test_factory.py::FactoryTestCase::test_ipv4_public_caching tests/test_factory.py::FactoryTestCase::test_ipv4_public_class_a tests/test_factory.py::FactoryTestCase::test_ipv4_public_class_b tests/test_factory.py::FactoryTestCase::test_ipv4_public_class_c tests/test_factory.py::FactoryTestCase::test_ipv6 tests/test_factory.py::FactoryTestCase::test_language_code tests/test_factory.py::FactoryTestCase::test_locale tests/test_factory.py::FactoryTestCase::test_magic_call_calls_format tests/test_factory.py::FactoryTestCase::test_magic_call_calls_format_with_arguments tests/test_factory.py::FactoryTestCase::test_negative_pyfloat tests/test_factory.py::FactoryTestCase::test_nl_BE_ssn_valid tests/test_factory.py::FactoryTestCase::test_no_words tests/test_factory.py::FactoryTestCase::test_no_words_paragraph tests/test_factory.py::FactoryTestCase::test_no_words_sentence tests/test_factory.py::FactoryTestCase::test_parse_returns_same_string_when_it_contains_no_curly_braces tests/test_factory.py::FactoryTestCase::test_parse_returns_string_with_tokens_replaced_by_formatters tests/test_factory.py::FactoryTestCase::test_password tests/test_factory.py::FactoryTestCase::test_port_number tests/test_factory.py::FactoryTestCase::test_prefix_suffix_always_string tests/test_factory.py::FactoryTestCase::test_pyfloat_empty_range_error tests/test_factory.py::FactoryTestCase::test_pyfloat_in_range tests/test_factory.py::FactoryTestCase::test_pyfloat_same_min_max tests/test_factory.py::FactoryTestCase::test_random_element tests/test_factory.py::FactoryTestCase::test_random_number tests/test_factory.py::FactoryTestCase::test_random_pyfloat tests/test_factory.py::FactoryTestCase::test_random_pystr_characters tests/test_factory.py::FactoryTestCase::test_random_sample_unique tests/test_factory.py::FactoryTestCase::test_slugify tests/test_factory.py::FactoryTestCase::test_some_words tests/test_factory.py::FactoryTestCase::test_texts_chars_count tests/test_factory.py::FactoryTestCase::test_texts_count tests/test_factory.py::FactoryTestCase::test_texts_word_list tests/test_factory.py::FactoryTestCase::test_unique_words tests/test_factory.py::FactoryTestCase::test_us_ssn_valid tests/test_factory.py::FactoryTestCase::test_words_ext_word_list tests/test_factory.py::FactoryTestCase::test_words_ext_word_list_unique tests/test_factory.py::FactoryTestCase::test_words_valueerror
faker/providers/internet/__init__.py faker/providers/python/__init__.py
faker/providers/internet/__init__.py faker/providers/python/__init__.py