-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathinformation.py
More file actions
121 lines (117 loc) · 2.71 KB
/
information.py
File metadata and controls
121 lines (117 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
"""
"""
from ..unitquantity import UnitQuantity, UnitInformation, dimensionless
from .time import s
bit = UnitInformation(
'bit',
aliases=['bits']
)
B = byte = o = octet = UnitInformation(
'byte',
8*bit,
symbol='B',
aliases=['bytes', 'o', 'octet', 'octets']
)
kB = kilobyte = ko = UnitInformation(
'kilobyte',
1000 * byte,
symbol='kB',
aliases=['kilobytes', 'kilooctet', 'kilooctets']
)
MB = megabyte = Mo = UnitInformation(
'megabyte',
1000 * kilobyte,
symbol='MB',
aliases=['megabytes', 'megaoctet', 'megaoctets']
)
GB = gigabyte = Go = UnitInformation(
'gigabyte',
1000 * megabyte,
symbol='GB',
aliases=['gigabytes', 'gigaoctet', 'gigaoctets']
)
TB = terabyte = To = UnitInformation(
'terabyte',
1000 * gigabyte,
symbol='TB',
aliases=['terabytes', 'teraoctet', 'teraoctets']
)
PB = petabyte = Po = UnitInformation(
'petabyte',
1000 * terabyte,
symbol='PB',
aliases=['petabytes', 'petaoctet', 'petaoctets']
)
EB = exabyte = Eo = UnitInformation(
'exabyte',
1000 * petabyte,
symbol='EB',
aliases=['exabytes', 'exaoctet', 'exaoctets']
)
ZB = zettabyte = Zo = UnitInformation(
'zettabyte',
1000 * exabyte,
symbol='ZB',
aliases=['zettabytes', 'zettaoctet', 'zettaoctets']
)
YB = yottabyte = Yo = UnitInformation(
'yottabyte',
1000 * zettabyte,
symbol='YB',
aliases=['yottabytes', 'yottaoctet', 'yottaoctets']
)
Bd = baud = bps = UnitQuantity(
'baud',
bit/s,
symbol='Bd',
)
# IEC
KiB = kibibyte = Kio = UnitInformation(
'kibibyte',
1024 * byte,
symbol='KiB',
aliases=['kibibytes', 'kibioctet', 'kibioctets']
)
MiB = mebibyte = Mio = UnitInformation(
'mebibyte',
1024 * kibibyte,
symbol='MiB',
aliases=['mebibytes', 'mebioctet', 'mebioctets']
)
GiB = gibibyte = Gio = UnitInformation(
'gibibyte',
1024 * mebibyte,
symbol='GiB',
aliases=['gibibytes', 'gibioctet', 'gibioctets']
)
TiB = tebibyte = Tio = UnitInformation(
'tebibyte',
1024 * gibibyte,
symbol='TiB',
aliases=['tebibytes', 'tebioctet', 'tebioctets']
)
PiB = pebibyte = Pio = UnitInformation(
'pebibyte',
1024 * tebibyte,
symbol='PiB',
aliases=['pebibytes', 'pebioctet', 'pebioctets']
)
EiB = exbibyte = Eio = UnitInformation(
'exbibyte',
1024 * pebibyte,
symbol='EiB',
aliases=['exbibytes', 'exbioctet', 'exbioctets']
)
ZiB = zebibyte = Zio = UnitInformation(
'zebibyte',
1024 * exbibyte,
symbol='ZiB',
aliases=['zebibytes', 'zebioctet', 'zebioctets']
)
YiB = yobibyte = Yio = UnitInformation(
'yobibyte',
1024 * zebibyte,
symbol='YiB',
aliases=['yobibytes', 'yobioctet', 'yobioctets']
)
del UnitQuantity, s, dimensionless