Skip to content

Commit 44eed63

Browse files
committed
Doc updates
1 parent a030fb4 commit 44eed63

5 files changed

Lines changed: 6 additions & 385 deletions

File tree

bitmath/integrations/__init__.py

Lines changed: 0 additions & 36 deletions
This file was deleted.

bitmath/integrations/bmargparse.py

Lines changed: 0 additions & 79 deletions
This file was deleted.

docsite/source/real_life_examples.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ as such:
2323
:linenos:
2424
2525
>>> import bitmath
26-
>>> downstream = bitmath.Mib(50)
26+
>>> downstream = bitmath.Mb(50)
2727
>>> print(downstream.to_MB())
2828
MB(6.25)
2929
@@ -111,7 +111,7 @@ returns). We can use ``bitmath`` to do that too:
111111
112112
113113
Alternatively, we could simplify things and use
114-
:ref:`bitmath.getsize() <bitmath_getsize>` to read the file size
114+
:func:`bitmath.getsize` to read the file size
115115
directly into a bitmath object:
116116

117117
.. code-block:: python
@@ -249,7 +249,7 @@ using the :py:mod:`bitmath` library. Let's see how:
249249
250250
>>> from bitmath import GB
251251
252-
>>> tx = 1/8.0
252+
>>> tx = 1/8
253253
254254
>>> rtt = 0.199 * 10**-3
255255
@@ -259,14 +259,12 @@ using the :py:mod:`bitmath` library. Let's see how:
259259
260260
KiB(24.2919921875)
261261
262-
.. note::
263-
To avoid integer rounding during division, don't forget to divide by ``8.0`` rather than ``8``
264262
265263
We could shorten that even further:
266264

267265
.. code-block:: python
268266
269-
>>> print((GB((1/8.0) * (0.199 * 10**-3))).to_Byte())
267+
>>> print((GB((1/8) * (0.199 * 10**-3))).to_Byte())
270268
24875.0Byte
271269
272270
**Get the current kernel parameters**
@@ -363,8 +361,8 @@ Set the **core-network** buffer sizes:
363361
.. code-block:: console
364362
365363
$ sudo sysctl net.core.rmem_max=24875 net.core.wmem_max=24875
366-
net.core.rmem_max = 4235
367-
net.core.wmem_max = 4235
364+
net.core.rmem_max = 24875
365+
net.core.wmem_max = 24875
368366
369367
Set the **per-socket** buffer sizes:
370368

full_demo.py

Lines changed: 0 additions & 173 deletions
This file was deleted.

0 commit comments

Comments
 (0)