We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The matrix generators for provider Numbers()
# Feature request

<!-- Thanks for coming up with a proposal! -->

## Thesis
The matrix can be useful in working in Jupyter Notebook. So, it would be awesome to support generators of matrix in provider `Numbers()`.

I sketched a rough implementation example:

```python
import random

from typing import Tuple, Optional, Union, List

ValuesRange = Union[
    List[int],
    Tuple[int, int],
]


def matrix(m: int = 3, n: int = 3, values_range: Optional[ValuesRange] = None) -> list:
    """Creates an 𝑚×𝑛 matrix which has 𝑚 rows and 𝑛 columns.

    :param m: Rows count.
    :param n: Columns count.
    :param values_range: Range of values of matrix items.
    :return: Matrix 𝑚×𝑛.
    """
    if values_range is None:
        values_range = (-100, 100)

    if len(values_range) > 2:
        raise ValueError('Invalid items range! Usage example: items_range=(-10, 10)')

    result = [
        [random.randint(*values_range) for _ in range(m)]
        for _ in range(n)
    ]

    return result

matrix(m=5, n=4, values_range=[-50, 50])
```

Output:
```python
[[29, 7, 17, -24, -29],
 [-26, 13, 29, -25, 6],
 [-5, 16, 13, -45, 49],
 [23, 20, -25, 14, -25]]
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mimesis/providers/numbers.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 
3 """Provides data related to numbers."""
4 
5 from typing import List, Union
6 
7 from mimesis.providers.base import BaseProvider
8 
9 __all__ = ['Numbers']
10 
11 
12 class Numbers(BaseProvider):
13     """Class for generating numbers."""
14 
15     class Meta:
16         """Class for metadata."""
17 
18         name = 'numbers'
19 
20     def floats(self, start: float = 0, end: float = 1, n: int = 10,
21                rounding: int = 15) -> List[float]:
22         """Generate a list of random float numbers.
23 
24         :param start: Start range.
25         :param end: End range.
26         :param n: Length of the list.
27         :param rounding: Max number of decimal digits.
28         :return: The list of floating-point numbers.
29         """
30         return [self.random.uniform(start, end, rounding) for _ in range(n)]
31 
32     def integers(self, start: int = 0, end: int = 10,
33                  n: int = 10) -> List[int]:
34         """Generate a list of random integers.
35 
36         Integers can be negative or positive numbers.
37         .. note: You can use both positive and negative numbers.
38 
39         :param start: Start.
40         :param end: End.
41         :param n: Length of list.
42         :return: List of integers.
43 
44         :Example:
45             [-20, -19, -18, -17]
46         """
47         return self.random.randints(n, start, end)
48 
49     def complexes(self, start_real: float = 0, end_real: float = 1,
50                   start_imag: float = 0, end_imag: float = 1,
51                   rounding_real: int = 15, rounding_imag: int = 15,
52                   n: int = 10) -> List[complex]:
53         """Generate a list of random complex numbers.
54 
55         :param start_real: Start real range.
56         :param end_real: End real range.
57         :param start_imag: Start imaginary range.
58         :param end_imag: End imaginary range.
59         :param rounding_real: Rounding real part.
60         :param rounding_imag: Roungind imaginary part.
61         :param n: Length of the list.
62         :return: A list of random complex numbers.
63         """
64         return [
65             complex(self.random.uniform(start_real, end_real, rounding_real),
66                     self.random.uniform(start_imag, end_imag, rounding_imag))
67             for _ in range(n)]
68 
69     @staticmethod
70     def primes(start: int = 1, end: int = 999) -> List[int]:
71         """Generate a list of prime numbers.
72 
73         :param start: First value of range.
74         :param end: Last value of range.
75         :return: A list of prime numbers from start to end.
76         """
77         # TODO: It should generate random primes with passed length.
78         sieve_size = (end // 2 - 1) if end % 2 == 0 else (end // 2)
79         sieve = [True] * sieve_size
80 
81         primes = []  # list of primes
82         # add 2 to the list if it's in the given range
83         if end >= 2:
84             primes.append(2)
85         for i in range(sieve_size):
86             if sieve[i]:
87                 value_at_i = i * 2 + 3
88                 primes.append(value_at_i)
89                 for j in range(i, sieve_size, value_at_i):
90                     sieve[j] = False
91 
92         chop_index = 0
93         for i in range(len(primes)):
94             if primes[i] >= start:
95                 chop_index = i
96                 break
97         return primes[chop_index:]
98 
99     def digit(self, to_bin: bool = False) -> Union[str, int]:
100         """Get a random digit.
101 
102         :param to_bin: If True then convert to binary.
103         :return: Digit.
104 
105         :Example:
106             4.
107         """
108         digit = self.random.randint(0, 9)
109 
110         if to_bin:
111             return bin(digit)
112 
113         return digit
114 
115     def between(self, minimum: int = 1, maximum: int = 1000) -> int:
116         """Generate a random number between minimum and maximum.
117 
118         :param minimum: Minimum of range.
119         :param maximum: Maximum of range.
120         :return: Number.
121         """
122         return self.random.randint(minimum, maximum)
123
```

Path: `mimesis/enums.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 
3 """Implements enums for a lot of methods.
4 
5 Enums from this module are used in a lot of methods.
6 You should always import enums from this module if you want
7 behavior for the methods that differ from the default behavior.
8 
9 You should never use your own enums in methods because in this case,
10 there no guarantee that you will get the result which you actually expected.
11 
12 Below you can see an example of usage enums in methods of data providers.
13 
14 Example:
15     >>> from mimesis import Person
16     >>> from mimesis.enums import Gender
17     >>> person = Person()
18     >>> name = person.name(gender=Gender.FEMALE)
19     >>> name in person._data['names']['female']
20     True
21 """
22 
23 from enum import Enum
24 
25 
26 class PortRange(Enum):
27     """Represents port ranges.
28 
29     An argument for :meth:`~mimesis.Internet.port()`.
30     """
31 
32     ALL = (1, 65535)
33     WELL_KNOWN = (1, 1023)
34     EPHEMERAL = (49152, 65535)
35     REGISTERED = (1024, 49151)
36 
37 
38 class Gender(Enum):
39     """Represents genders.
40 
41     An argument for a lot of methods which
42     takes argument ``gender``.
43     """
44 
45     FEMALE = 'female'
46     MALE = 'male'
47 
48 
49 class TitleType(Enum):
50     """Represents title types.
51 
52     An argument for :meth:`~mimesis.Person.title()`.
53     """
54 
55     TYPICAL = 'typical'
56     ACADEMIC = 'academic'
57 
58 
59 class CardType(Enum):
60     """Provides credit card types.
61 
62     An argument for :meth:`~mimesis.Payment.credit_card_number()`.
63     """
64 
65     MASTER_CARD = 'MasterCard'
66     VISA = 'Visa'
67     AMERICAN_EXPRESS = 'American Express'
68 
69 
70 class Algorithm(Enum):
71     """Provides algorithms which available."""
72 
73     MD5 = 'md5'
74     SHA1 = 'sha1'
75     SHA224 = 'sha224'
76     SHA256 = 'sha256'
77     SHA384 = 'sha384'
78     SHA512 = 'sha512'
79 
80 
81 class TLDType(Enum):
82     """Provides top level domain types.
83 
84     An argument for :meth:`~mimesis.Internet.top_level_domain()`.
85     """
86 
87     CCTLD = 'cctld'
88     GTLD = 'gtld'
89     GEOTLD = 'geotld'
90     UTLD = 'utld'
91     STLD = 'stld'
92 
93 
94 class Layer(Enum):
95     """Provides network protocol layers.
96 
97     An argument for :meth:`~mimesis.Internet.network_protocol()`.
98     """
99 
100     APPLICATION = 'application'
101     DATA_LINK = 'data_link'
102     NETWORK = 'network'
103     PHYSICAL = 'physical'
104     PRESENTATION = 'presentation'
105     SESSION = 'session'
106     TRANSPORT = 'transport'
107 
108 
109 class FileType(Enum):
110     """Provides file types."""
111 
112     SOURCE = 'source'
113     TEXT = 'text'
114     DATA = 'data'
115     AUDIO = 'audio'
116     VIDEO = 'video'
117     IMAGE = 'image'
118     EXECUTABLE = 'executable'
119     COMPRESSED = 'compressed'
120 
121 
122 class MimeType(Enum):
123     """Provides common mime types.
124 
125     An argument for :meth:`~mimesis.File.mime_type()`.
126     """
127 
128     APPLICATION = 'application'
129     AUDIO = 'audio'
130     IMAGE = 'image'
131     MESSAGE = 'message'
132     TEXT = 'text'
133     VIDEO = 'video'
134 
135 
136 class PrefixSign(Enum):
137     """Provides prefix signs.
138 
139     An argument for :meth:`~mimesis.UnitSystem.prefix()``.
140     """
141 
142     POSITIVE = 'positive'
143     NEGATIVE = 'negative'
144 
145 
146 class CountryCode(Enum):
147     """Provides types of country codes.
148 
149     An argument for :meth:`~mimesis.Address.country_code()`.
150     """
151 
152     A2 = 'a2'
153     A3 = 'a3'
154     NUMERIC = 'numeric'
155     IOC = 'ioc'
156     FIFA = 'fifa'
157 
158 
159 class ISBNFormat(Enum):
160     """Provides formats of ISBN.
161 
162     An argument for :meth:`~mimesis.Code.isbn()`.
163     """
164 
165     ISBN13 = 'isbn-13'
166     ISBN10 = 'isbn-10'
167 
168 
169 class EANFormat(Enum):
170     """Provides formats of EAN.
171 
172     An argument for :meth:`~mimesis.Code.ean()`.
173     """
174 
175     EAN8 = 'ean-8'
176     EAN13 = 'ean-13'
177 
178 
179 class SocialNetwork(Enum):
180     """Provides most popular social networks.
181 
182     An argument for :meth:`~mimesis.Person.social_media_profile()``.
183     """
184 
185     FACEBOOK = 'facebook'
186     TWITTER = 'twitter'
187     INSTAGRAM = 'instagram'
188     VK = 'vk'
189 
190 
191 class UnitName(Enum):
192     """Provide unit names.
193 
194     An argument for :meth:`~mimesis.UnitSystem.unit()`.
195     """
196 
197     MASS = ('gram', 'gr')
198     INFORMATION = ('byte', 'b')
199     THERMODYNAMIC_TEMPERATURE = ('kelvin', 'K')
200     AMOUNT_OF_SUBSTANCE = ('mole', 'mol')
201     ANGLE = ('radian', 'r')
202     SOLID_ANGLE = ('steradian', '㏛')
203     FREQUENCY = ('hertz', 'Hz')
204     FORCE = ('newton', 'N')
205     PRESSURE = ('pascal', 'P')
206     ENERGY = ('joule', 'J')
207     POWER = ('watt', 'W')
208     FLUX = ('watt', 'W')
209     ELECTRIC_CHARGE = ('coulomb', 'C')
210     VOLTAGE = ('volt', 'V')
211     ELECTRIC_CAPACITANCE = ('farad', 'F')
212     ELECTRIC_RESISTANCE = ('ohm', 'Ω')
213     ELECTRICAL_CONDUCTANCE = ('siemens', 'S')
214     MAGNETIC_FLUX = ('weber', 'Wb')
215     MAGNETIC_FLUX_DENSITY = ('tesla', 'T')
216     INDUCTANCE = ('henry', 'H')
217     TEMPERATURE = ('Celsius', '°C')
218     RADIOACTIVITY = ('becquerel', 'Bq')
219
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/mimesis/enums.py b/mimesis/enums.py
--- a/mimesis/enums.py
+++ b/mimesis/enums.py
@@ -216,3 +216,14 @@
     INDUCTANCE = ('henry', 'H')
     TEMPERATURE = ('Celsius', '°C')
     RADIOACTIVITY = ('becquerel', 'Bq')
+
+
+class NumTypes(Enum):
+    """Provide number types.
+
+    An argument for :meth:`~mimesis.Numbers.matrix()`.
+    """
+
+    FLOATS = 'floats'
+    INTEGERS = 'integers'
+    COMPLEXES = 'complexes'
diff --git a/mimesis/providers/numbers.py b/mimesis/providers/numbers.py
--- a/mimesis/providers/numbers.py
+++ b/mimesis/providers/numbers.py
@@ -2,8 +2,9 @@
 
 """Provides data related to numbers."""
 
-from typing import List, Union
+from typing import Callable, List, Union
 
+from mimesis.enums import NumTypes
 from mimesis.providers.base import BaseProvider
 
 __all__ = ['Numbers']
@@ -66,6 +67,21 @@
                     self.random.uniform(start_imag, end_imag, rounding_imag))
             for _ in range(n)]
 
+    def matrix(self, m: int = 10, n: int = 10,
+               num_type: NumTypes = NumTypes.FLOATS, **kwargs) -> List[List]:
+        """Generate a m x n matrix with random numbers.
+
+        :param m: Number of rows.
+        :param n: Number of columns.
+        :param num_type: NumTypes enum object.
+        :param **kwargs: Other specific arguments.
+        :return: A matrix of random numbers.
+        """
+        key = self._validate_enum(num_type, NumTypes)
+        kwargs.update({'n': n})
+        method = getattr(self, key)
+        return [method(**kwargs) for _ in range(m)]
+
     @staticmethod
     def primes(start: int = 1, end: int = 999) -> List[int]:
         """Generate a list of prime numbers.

{"golden_diff": "diff --git a/mimesis/enums.py b/mimesis/enums.py\n--- a/mimesis/enums.py\n+++ b/mimesis/enums.py\n@@ -216,3 +216,14 @@\n     INDUCTANCE = ('henry', 'H')\n     TEMPERATURE = ('Celsius', '\u00b0C')\n     RADIOACTIVITY = ('becquerel', 'Bq')\n+\n+\n+class NumTypes(Enum):\n+    \"\"\"Provide number types.\n+\n+    An argument for :meth:`~mimesis.Numbers.matrix()`.\n+    \"\"\"\n+\n+    FLOATS = 'floats'\n+    INTEGERS = 'integers'\n+    COMPLEXES = 'complexes'\ndiff --git a/mimesis/providers/numbers.py b/mimesis/providers/numbers.py\n--- a/mimesis/providers/numbers.py\n+++ b/mimesis/providers/numbers.py\n@@ -2,8 +2,9 @@\n \n \"\"\"Provides data related to numbers.\"\"\"\n \n-from typing import List, Union\n+from typing import Callable, List, Union\n \n+from mimesis.enums import NumTypes\n from mimesis.providers.base import BaseProvider\n \n __all__ = ['Numbers']\n@@ -66,6 +67,21 @@\n                     self.random.uniform(start_imag, end_imag, rounding_imag))\n             for _ in range(n)]\n \n+    def matrix(self, m: int = 10, n: int = 10,\n+               num_type: NumTypes = NumTypes.FLOATS, **kwargs) -> List[List]:\n+        \"\"\"Generate a m x n matrix with random numbers.\n+\n+        :param m: Number of rows.\n+        :param n: Number of columns.\n+        :param num_type: NumTypes enum object.\n+        :param **kwargs: Other specific arguments.\n+        :return: A matrix of random numbers.\n+        \"\"\"\n+        key = self._validate_enum(num_type, NumTypes)\n+        kwargs.update({'n': n})\n+        method = getattr(self, key)\n+        return [method(**kwargs) for _ in range(m)]\n+\n     @staticmethod\n     def primes(start: int = 1, end: int = 999) -> List[int]:\n         \"\"\"Generate a list of prime numbers.\n", "issue": "The matrix generators for provider Numbers()\n# Feature request\r\n\r\n<!-- Thanks for coming up with a proposal! -->\r\n\r\n## Thesis\r\nThe matrix can be useful in working in Jupyter Notebook. So, it would be awesome to support generators of matrix in provider `Numbers()`.\r\n\r\nI sketched a rough implementation example:\r\n\r\n```python\r\nimport random\r\n\r\nfrom typing import Tuple, Optional, Union, List\r\n\r\nValuesRange = Union[\r\n    List[int],\r\n    Tuple[int, int],\r\n]\r\n\r\n\r\ndef matrix(m: int = 3, n: int = 3, values_range: Optional[ValuesRange] = None) -> list:\r\n    \"\"\"Creates an \ud835\udc5a\u00d7\ud835\udc5b matrix which has \ud835\udc5a rows and \ud835\udc5b columns.\r\n\r\n    :param m: Rows count.\r\n    :param n: Columns count.\r\n    :param values_range: Range of values of matrix items.\r\n    :return: Matrix \ud835\udc5a\u00d7\ud835\udc5b.\r\n    \"\"\"\r\n    if values_range is None:\r\n        values_range = (-100, 100)\r\n\r\n    if len(values_range) > 2:\r\n        raise ValueError('Invalid items range! Usage example: items_range=(-10, 10)')\r\n\r\n    result = [\r\n        [random.randint(*values_range) for _ in range(m)]\r\n        for _ in range(n)\r\n    ]\r\n\r\n    return result\r\n\r\nmatrix(m=5, n=4, values_range=[-50, 50])\r\n```\r\n\r\nOutput:\r\n```python\r\n[[29, 7, 17, -24, -29],\r\n [-26, 13, 29, -25, 6],\r\n [-5, 16, 13, -45, 49],\r\n [23, 20, -25, 14, -25]]\r\n```\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\n\"\"\"Provides data related to numbers.\"\"\"\n\nfrom typing import List, Union\n\nfrom mimesis.providers.base import BaseProvider\n\n__all__ = ['Numbers']\n\n\nclass Numbers(BaseProvider):\n    \"\"\"Class for generating numbers.\"\"\"\n\n    class Meta:\n        \"\"\"Class for metadata.\"\"\"\n\n        name = 'numbers'\n\n    def floats(self, start: float = 0, end: float = 1, n: int = 10,\n               rounding: int = 15) -> List[float]:\n        \"\"\"Generate a list of random float numbers.\n\n        :param start: Start range.\n        :param end: End range.\n        :param n: Length of the list.\n        :param rounding: Max number of decimal digits.\n        :return: The list of floating-point numbers.\n        \"\"\"\n        return [self.random.uniform(start, end, rounding) for _ in range(n)]\n\n    def integers(self, start: int = 0, end: int = 10,\n                 n: int = 10) -> List[int]:\n        \"\"\"Generate a list of random integers.\n\n        Integers can be negative or positive numbers.\n        .. note: You can use both positive and negative numbers.\n\n        :param start: Start.\n        :param end: End.\n        :param n: Length of list.\n        :return: List of integers.\n\n        :Example:\n            [-20, -19, -18, -17]\n        \"\"\"\n        return self.random.randints(n, start, end)\n\n    def complexes(self, start_real: float = 0, end_real: float = 1,\n                  start_imag: float = 0, end_imag: float = 1,\n                  rounding_real: int = 15, rounding_imag: int = 15,\n                  n: int = 10) -> List[complex]:\n        \"\"\"Generate a list of random complex numbers.\n\n        :param start_real: Start real range.\n        :param end_real: End real range.\n        :param start_imag: Start imaginary range.\n        :param end_imag: End imaginary range.\n        :param rounding_real: Rounding real part.\n        :param rounding_imag: Roungind imaginary part.\n        :param n: Length of the list.\n        :return: A list of random complex numbers.\n        \"\"\"\n        return [\n            complex(self.random.uniform(start_real, end_real, rounding_real),\n                    self.random.uniform(start_imag, end_imag, rounding_imag))\n            for _ in range(n)]\n\n    @staticmethod\n    def primes(start: int = 1, end: int = 999) -> List[int]:\n        \"\"\"Generate a list of prime numbers.\n\n        :param start: First value of range.\n        :param end: Last value of range.\n        :return: A list of prime numbers from start to end.\n        \"\"\"\n        # TODO: It should generate random primes with passed length.\n        sieve_size = (end // 2 - 1) if end % 2 == 0 else (end // 2)\n        sieve = [True] * sieve_size\n\n        primes = []  # list of primes\n        # add 2 to the list if it's in the given range\n        if end >= 2:\n            primes.append(2)\n        for i in range(sieve_size):\n            if sieve[i]:\n                value_at_i = i * 2 + 3\n                primes.append(value_at_i)\n                for j in range(i, sieve_size, value_at_i):\n                    sieve[j] = False\n\n        chop_index = 0\n        for i in range(len(primes)):\n            if primes[i] >= start:\n                chop_index = i\n                break\n        return primes[chop_index:]\n\n    def digit(self, to_bin: bool = False) -> Union[str, int]:\n        \"\"\"Get a random digit.\n\n        :param to_bin: If True then convert to binary.\n        :return: Digit.\n\n        :Example:\n            4.\n        \"\"\"\n        digit = self.random.randint(0, 9)\n\n        if to_bin:\n            return bin(digit)\n\n        return digit\n\n    def between(self, minimum: int = 1, maximum: int = 1000) -> int:\n        \"\"\"Generate a random number between minimum and maximum.\n\n        :param minimum: Minimum of range.\n        :param maximum: Maximum of range.\n        :return: Number.\n        \"\"\"\n        return self.random.randint(minimum, maximum)\n", "path": "mimesis/providers/numbers.py"}, {"content": "# -*- coding: utf-8 -*-\n\n\"\"\"Implements enums for a lot of methods.\n\nEnums from this module are used in a lot of methods.\nYou should always import enums from this module if you want\nbehavior for the methods that differ from the default behavior.\n\nYou should never use your own enums in methods because in this case,\nthere no guarantee that you will get the result which you actually expected.\n\nBelow you can see an example of usage enums in methods of data providers.\n\nExample:\n    >>> from mimesis import Person\n    >>> from mimesis.enums import Gender\n    >>> person = Person()\n    >>> name = person.name(gender=Gender.FEMALE)\n    >>> name in person._data['names']['female']\n    True\n\"\"\"\n\nfrom enum import Enum\n\n\nclass PortRange(Enum):\n    \"\"\"Represents port ranges.\n\n    An argument for :meth:`~mimesis.Internet.port()`.\n    \"\"\"\n\n    ALL = (1, 65535)\n    WELL_KNOWN = (1, 1023)\n    EPHEMERAL = (49152, 65535)\n    REGISTERED = (1024, 49151)\n\n\nclass Gender(Enum):\n    \"\"\"Represents genders.\n\n    An argument for a lot of methods which\n    takes argument ``gender``.\n    \"\"\"\n\n    FEMALE = 'female'\n    MALE = 'male'\n\n\nclass TitleType(Enum):\n    \"\"\"Represents title types.\n\n    An argument for :meth:`~mimesis.Person.title()`.\n    \"\"\"\n\n    TYPICAL = 'typical'\n    ACADEMIC = 'academic'\n\n\nclass CardType(Enum):\n    \"\"\"Provides credit card types.\n\n    An argument for :meth:`~mimesis.Payment.credit_card_number()`.\n    \"\"\"\n\n    MASTER_CARD = 'MasterCard'\n    VISA = 'Visa'\n    AMERICAN_EXPRESS = 'American Express'\n\n\nclass Algorithm(Enum):\n    \"\"\"Provides algorithms which available.\"\"\"\n\n    MD5 = 'md5'\n    SHA1 = 'sha1'\n    SHA224 = 'sha224'\n    SHA256 = 'sha256'\n    SHA384 = 'sha384'\n    SHA512 = 'sha512'\n\n\nclass TLDType(Enum):\n    \"\"\"Provides top level domain types.\n\n    An argument for :meth:`~mimesis.Internet.top_level_domain()`.\n    \"\"\"\n\n    CCTLD = 'cctld'\n    GTLD = 'gtld'\n    GEOTLD = 'geotld'\n    UTLD = 'utld'\n    STLD = 'stld'\n\n\nclass Layer(Enum):\n    \"\"\"Provides network protocol layers.\n\n    An argument for :meth:`~mimesis.Internet.network_protocol()`.\n    \"\"\"\n\n    APPLICATION = 'application'\n    DATA_LINK = 'data_link'\n    NETWORK = 'network'\n    PHYSICAL = 'physical'\n    PRESENTATION = 'presentation'\n    SESSION = 'session'\n    TRANSPORT = 'transport'\n\n\nclass FileType(Enum):\n    \"\"\"Provides file types.\"\"\"\n\n    SOURCE = 'source'\n    TEXT = 'text'\n    DATA = 'data'\n    AUDIO = 'audio'\n    VIDEO = 'video'\n    IMAGE = 'image'\n    EXECUTABLE = 'executable'\n    COMPRESSED = 'compressed'\n\n\nclass MimeType(Enum):\n    \"\"\"Provides common mime types.\n\n    An argument for :meth:`~mimesis.File.mime_type()`.\n    \"\"\"\n\n    APPLICATION = 'application'\n    AUDIO = 'audio'\n    IMAGE = 'image'\n    MESSAGE = 'message'\n    TEXT = 'text'\n    VIDEO = 'video'\n\n\nclass PrefixSign(Enum):\n    \"\"\"Provides prefix signs.\n\n    An argument for :meth:`~mimesis.UnitSystem.prefix()``.\n    \"\"\"\n\n    POSITIVE = 'positive'\n    NEGATIVE = 'negative'\n\n\nclass CountryCode(Enum):\n    \"\"\"Provides types of country codes.\n\n    An argument for :meth:`~mimesis.Address.country_code()`.\n    \"\"\"\n\n    A2 = 'a2'\n    A3 = 'a3'\n    NUMERIC = 'numeric'\n    IOC = 'ioc'\n    FIFA = 'fifa'\n\n\nclass ISBNFormat(Enum):\n    \"\"\"Provides formats of ISBN.\n\n    An argument for :meth:`~mimesis.Code.isbn()`.\n    \"\"\"\n\n    ISBN13 = 'isbn-13'\n    ISBN10 = 'isbn-10'\n\n\nclass EANFormat(Enum):\n    \"\"\"Provides formats of EAN.\n\n    An argument for :meth:`~mimesis.Code.ean()`.\n    \"\"\"\n\n    EAN8 = 'ean-8'\n    EAN13 = 'ean-13'\n\n\nclass SocialNetwork(Enum):\n    \"\"\"Provides most popular social networks.\n\n    An argument for :meth:`~mimesis.Person.social_media_profile()``.\n    \"\"\"\n\n    FACEBOOK = 'facebook'\n    TWITTER = 'twitter'\n    INSTAGRAM = 'instagram'\n    VK = 'vk'\n\n\nclass UnitName(Enum):\n    \"\"\"Provide unit names.\n\n    An argument for :meth:`~mimesis.UnitSystem.unit()`.\n    \"\"\"\n\n    MASS = ('gram', 'gr')\n    INFORMATION = ('byte', 'b')\n    THERMODYNAMIC_TEMPERATURE = ('kelvin', 'K')\n    AMOUNT_OF_SUBSTANCE = ('mole', 'mol')\n    ANGLE = ('radian', 'r')\n    SOLID_ANGLE = ('steradian', '\u33db')\n    FREQUENCY = ('hertz', 'Hz')\n    FORCE = ('newton', 'N')\n    PRESSURE = ('pascal', 'P')\n    ENERGY = ('joule', 'J')\n    POWER = ('watt', 'W')\n    FLUX = ('watt', 'W')\n    ELECTRIC_CHARGE = ('coulomb', 'C')\n    VOLTAGE = ('volt', 'V')\n    ELECTRIC_CAPACITANCE = ('farad', 'F')\n    ELECTRIC_RESISTANCE = ('ohm', '\u03a9')\n    ELECTRICAL_CONDUCTANCE = ('siemens', 'S')\n    MAGNETIC_FLUX = ('weber', 'Wb')\n    MAGNETIC_FLUX_DENSITY = ('tesla', 'T')\n    INDUCTANCE = ('henry', 'H')\n    TEMPERATURE = ('Celsius', '\u00b0C')\n    RADIOACTIVITY = ('becquerel', 'Bq')\n", "path": "mimesis/enums.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\n\"\"\"Provides data related to numbers.\"\"\"\n\nfrom typing import Callable, List, Union\n\nfrom mimesis.enums import NumTypes\nfrom mimesis.providers.base import BaseProvider\n\n__all__ = ['Numbers']\n\n\nclass Numbers(BaseProvider):\n    \"\"\"Class for generating numbers.\"\"\"\n\n    class Meta:\n        \"\"\"Class for metadata.\"\"\"\n\n        name = 'numbers'\n\n    def floats(self, start: float = 0, end: float = 1, n: int = 10,\n               rounding: int = 15) -> List[float]:\n        \"\"\"Generate a list of random float numbers.\n\n        :param start: Start range.\n        :param end: End range.\n        :param n: Length of the list.\n        :param rounding: Max number of decimal digits.\n        :return: The list of floating-point numbers.\n        \"\"\"\n        return [self.random.uniform(start, end, rounding) for _ in range(n)]\n\n    def integers(self, start: int = 0, end: int = 10,\n                 n: int = 10) -> List[int]:\n        \"\"\"Generate a list of random integers.\n\n        Integers can be negative or positive numbers.\n        .. note: You can use both positive and negative numbers.\n\n        :param start: Start.\n        :param end: End.\n        :param n: Length of list.\n        :return: List of integers.\n\n        :Example:\n            [-20, -19, -18, -17]\n        \"\"\"\n        return self.random.randints(n, start, end)\n\n    def complexes(self, start_real: float = 0, end_real: float = 1,\n                  start_imag: float = 0, end_imag: float = 1,\n                  rounding_real: int = 15, rounding_imag: int = 15,\n                  n: int = 10) -> List[complex]:\n        \"\"\"Generate a list of random complex numbers.\n\n        :param start_real: Start real range.\n        :param end_real: End real range.\n        :param start_imag: Start imaginary range.\n        :param end_imag: End imaginary range.\n        :param rounding_real: Rounding real part.\n        :param rounding_imag: Roungind imaginary part.\n        :param n: Length of the list.\n        :return: A list of random complex numbers.\n        \"\"\"\n        return [\n            complex(self.random.uniform(start_real, end_real, rounding_real),\n                    self.random.uniform(start_imag, end_imag, rounding_imag))\n            for _ in range(n)]\n\n    def matrix(self, m: int = 10, n: int = 10,\n               num_type: NumTypes = NumTypes.FLOATS, **kwargs) -> List[List]:\n        \"\"\"Generate a m x n matrix with random numbers.\n\n        :param m: Number of rows.\n        :param n: Number of columns.\n        :param num_type: NumTypes enum object.\n        :param **kwargs: Other specific arguments.\n        :return: A matrix of random numbers.\n        \"\"\"\n        key = self._validate_enum(num_type, NumTypes)\n        kwargs.update({'n': n})\n        method = getattr(self, key)\n        return [method(**kwargs) for _ in range(m)]\n\n    @staticmethod\n    def primes(start: int = 1, end: int = 999) -> List[int]:\n        \"\"\"Generate a list of prime numbers.\n\n        :param start: First value of range.\n        :param end: Last value of range.\n        :return: A list of prime numbers from start to end.\n        \"\"\"\n        # TODO: It should generate random primes with passed length.\n        sieve_size = (end // 2 - 1) if end % 2 == 0 else (end // 2)\n        sieve = [True] * sieve_size\n\n        primes = []  # list of primes\n        # add 2 to the list if it's in the given range\n        if end >= 2:\n            primes.append(2)\n        for i in range(sieve_size):\n            if sieve[i]:\n                value_at_i = i * 2 + 3\n                primes.append(value_at_i)\n                for j in range(i, sieve_size, value_at_i):\n                    sieve[j] = False\n\n        chop_index = 0\n        for i in range(len(primes)):\n            if primes[i] >= start:\n                chop_index = i\n                break\n        return primes[chop_index:]\n\n    def digit(self, to_bin: bool = False) -> Union[str, int]:\n        \"\"\"Get a random digit.\n\n        :param to_bin: If True then convert to binary.\n        :return: Digit.\n\n        :Example:\n            4.\n        \"\"\"\n        digit = self.random.randint(0, 9)\n\n        if to_bin:\n            return bin(digit)\n\n        return digit\n\n    def between(self, minimum: int = 1, maximum: int = 1000) -> int:\n        \"\"\"Generate a random number between minimum and maximum.\n\n        :param minimum: Minimum of range.\n        :param maximum: Maximum of range.\n        :return: Number.\n        \"\"\"\n        return self.random.randint(minimum, maximum)\n", "path": "mimesis/providers/numbers.py"}, {"content": "# -*- coding: utf-8 -*-\n\n\"\"\"Implements enums for a lot of methods.\n\nEnums from this module are used in a lot of methods.\nYou should always import enums from this module if you want\nbehavior for the methods that differ from the default behavior.\n\nYou should never use your own enums in methods because in this case,\nthere no guarantee that you will get the result which you actually expected.\n\nBelow you can see an example of usage enums in methods of data providers.\n\nExample:\n    >>> from mimesis import Person\n    >>> from mimesis.enums import Gender\n    >>> person = Person()\n    >>> name = person.name(gender=Gender.FEMALE)\n    >>> name in person._data['names']['female']\n    True\n\"\"\"\n\nfrom enum import Enum\n\n\nclass PortRange(Enum):\n    \"\"\"Represents port ranges.\n\n    An argument for :meth:`~mimesis.Internet.port()`.\n    \"\"\"\n\n    ALL = (1, 65535)\n    WELL_KNOWN = (1, 1023)\n    EPHEMERAL = (49152, 65535)\n    REGISTERED = (1024, 49151)\n\n\nclass Gender(Enum):\n    \"\"\"Represents genders.\n\n    An argument for a lot of methods which\n    takes argument ``gender``.\n    \"\"\"\n\n    FEMALE = 'female'\n    MALE = 'male'\n\n\nclass TitleType(Enum):\n    \"\"\"Represents title types.\n\n    An argument for :meth:`~mimesis.Person.title()`.\n    \"\"\"\n\n    TYPICAL = 'typical'\n    ACADEMIC = 'academic'\n\n\nclass CardType(Enum):\n    \"\"\"Provides credit card types.\n\n    An argument for :meth:`~mimesis.Payment.credit_card_number()`.\n    \"\"\"\n\n    MASTER_CARD = 'MasterCard'\n    VISA = 'Visa'\n    AMERICAN_EXPRESS = 'American Express'\n\n\nclass Algorithm(Enum):\n    \"\"\"Provides algorithms which available.\"\"\"\n\n    MD5 = 'md5'\n    SHA1 = 'sha1'\n    SHA224 = 'sha224'\n    SHA256 = 'sha256'\n    SHA384 = 'sha384'\n    SHA512 = 'sha512'\n\n\nclass TLDType(Enum):\n    \"\"\"Provides top level domain types.\n\n    An argument for :meth:`~mimesis.Internet.top_level_domain()`.\n    \"\"\"\n\n    CCTLD = 'cctld'\n    GTLD = 'gtld'\n    GEOTLD = 'geotld'\n    UTLD = 'utld'\n    STLD = 'stld'\n\n\nclass Layer(Enum):\n    \"\"\"Provides network protocol layers.\n\n    An argument for :meth:`~mimesis.Internet.network_protocol()`.\n    \"\"\"\n\n    APPLICATION = 'application'\n    DATA_LINK = 'data_link'\n    NETWORK = 'network'\n    PHYSICAL = 'physical'\n    PRESENTATION = 'presentation'\n    SESSION = 'session'\n    TRANSPORT = 'transport'\n\n\nclass FileType(Enum):\n    \"\"\"Provides file types.\"\"\"\n\n    SOURCE = 'source'\n    TEXT = 'text'\n    DATA = 'data'\n    AUDIO = 'audio'\n    VIDEO = 'video'\n    IMAGE = 'image'\n    EXECUTABLE = 'executable'\n    COMPRESSED = 'compressed'\n\n\nclass MimeType(Enum):\n    \"\"\"Provides common mime types.\n\n    An argument for :meth:`~mimesis.File.mime_type()`.\n    \"\"\"\n\n    APPLICATION = 'application'\n    AUDIO = 'audio'\n    IMAGE = 'image'\n    MESSAGE = 'message'\n    TEXT = 'text'\n    VIDEO = 'video'\n\n\nclass PrefixSign(Enum):\n    \"\"\"Provides prefix signs.\n\n    An argument for :meth:`~mimesis.UnitSystem.prefix()``.\n    \"\"\"\n\n    POSITIVE = 'positive'\n    NEGATIVE = 'negative'\n\n\nclass CountryCode(Enum):\n    \"\"\"Provides types of country codes.\n\n    An argument for :meth:`~mimesis.Address.country_code()`.\n    \"\"\"\n\n    A2 = 'a2'\n    A3 = 'a3'\n    NUMERIC = 'numeric'\n    IOC = 'ioc'\n    FIFA = 'fifa'\n\n\nclass ISBNFormat(Enum):\n    \"\"\"Provides formats of ISBN.\n\n    An argument for :meth:`~mimesis.Code.isbn()`.\n    \"\"\"\n\n    ISBN13 = 'isbn-13'\n    ISBN10 = 'isbn-10'\n\n\nclass EANFormat(Enum):\n    \"\"\"Provides formats of EAN.\n\n    An argument for :meth:`~mimesis.Code.ean()`.\n    \"\"\"\n\n    EAN8 = 'ean-8'\n    EAN13 = 'ean-13'\n\n\nclass SocialNetwork(Enum):\n    \"\"\"Provides most popular social networks.\n\n    An argument for :meth:`~mimesis.Person.social_media_profile()``.\n    \"\"\"\n\n    FACEBOOK = 'facebook'\n    TWITTER = 'twitter'\n    INSTAGRAM = 'instagram'\n    VK = 'vk'\n\n\nclass UnitName(Enum):\n    \"\"\"Provide unit names.\n\n    An argument for :meth:`~mimesis.UnitSystem.unit()`.\n    \"\"\"\n\n    MASS = ('gram', 'gr')\n    INFORMATION = ('byte', 'b')\n    THERMODYNAMIC_TEMPERATURE = ('kelvin', 'K')\n    AMOUNT_OF_SUBSTANCE = ('mole', 'mol')\n    ANGLE = ('radian', 'r')\n    SOLID_ANGLE = ('steradian', '\u33db')\n    FREQUENCY = ('hertz', 'Hz')\n    FORCE = ('newton', 'N')\n    PRESSURE = ('pascal', 'P')\n    ENERGY = ('joule', 'J')\n    POWER = ('watt', 'W')\n    FLUX = ('watt', 'W')\n    ELECTRIC_CHARGE = ('coulomb', 'C')\n    VOLTAGE = ('volt', 'V')\n    ELECTRIC_CAPACITANCE = ('farad', 'F')\n    ELECTRIC_RESISTANCE = ('ohm', '\u03a9')\n    ELECTRICAL_CONDUCTANCE = ('siemens', 'S')\n    MAGNETIC_FLUX = ('weber', 'Wb')\n    MAGNETIC_FLUX_DENSITY = ('tesla', 'T')\n    INDUCTANCE = ('henry', 'H')\n    TEMPERATURE = ('Celsius', '\u00b0C')\n    RADIOACTIVITY = ('becquerel', 'Bq')\n\n\nclass NumTypes(Enum):\n    \"\"\"Provide number types.\n\n    An argument for :meth:`~mimesis.Numbers.matrix()`.\n    \"\"\"\n\n    FLOATS = 'floats'\n    INTEGERS = 'integers'\n    COMPLEXES = 'complexes'\n", "path": "mimesis/enums.py"}]}