[ SYSTEM ]: Linux srv.persadacompanies.com 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
[ SERVER ]: Apache | PHP: 8.4.19
[ USER ]: persadamedika | IP: 45.64.1.108
GEFORCE FILE MANAGER
/
usr
/
lib64
/
python3.12
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📁 __pycache__
SET
[ DEL ]
📁 asyncio
SET
[ DEL ]
📁 collections
SET
[ DEL ]
📁 concurrent
SET
[ DEL ]
📁 config-3.12-x86_64-linux-gnu
SET
[ DEL ]
📁 ctypes
SET
[ DEL ]
📁 curses
SET
[ DEL ]
📁 dbm
SET
[ DEL ]
📁 email
SET
[ DEL ]
📁 encodings
SET
[ DEL ]
📁 ensurepip
SET
[ DEL ]
📁 html
SET
[ DEL ]
📁 http
SET
[ DEL ]
📁 importlib
SET
[ DEL ]
📁 json
SET
[ DEL ]
📁 lib-dynload
SET
[ DEL ]
📁 lib2to3
SET
[ DEL ]
📁 logging
SET
[ DEL ]
📁 multiprocessing
SET
[ DEL ]
📁 pydoc_data
SET
[ DEL ]
📁 re
SET
[ DEL ]
📁 site-packages
SET
[ DEL ]
📁 sqlite3
SET
[ DEL ]
📁 tomllib
SET
[ DEL ]
📁 unittest
SET
[ DEL ]
📁 urllib
SET
[ DEL ]
📁 venv
SET
[ DEL ]
📁 wsgiref
SET
[ DEL ]
📁 xml
SET
[ DEL ]
📁 xmlrpc
SET
[ DEL ]
📁 zipfile
SET
[ DEL ]
📁 zoneinfo
SET
[ DEL ]
📄 LICENSE.txt
13,936 B
SET
[ EDIT ]
|
[ DEL ]
📄 __future__.py
5,218 B
SET
[ EDIT ]
|
[ DEL ]
📄 __hello__.py
227 B
SET
[ EDIT ]
|
[ DEL ]
📄 _aix_support.py
4,021 B
SET
[ EDIT ]
|
[ DEL ]
📄 _collections_abc.py
32,089 B
SET
[ EDIT ]
|
[ DEL ]
📄 _compat_pickle.py
8,761 B
SET
[ EDIT ]
|
[ DEL ]
📄 _compression.py
5,681 B
SET
[ EDIT ]
|
[ DEL ]
📄 _markupbase.py
14,653 B
SET
[ EDIT ]
|
[ DEL ]
📄 _osx_support.py
22,023 B
SET
[ EDIT ]
|
[ DEL ]
📄 _py_abc.py
6,189 B
SET
[ EDIT ]
|
[ DEL ]
📄 _pydatetime.py
92,087 B
SET
[ EDIT ]
|
[ DEL ]
📄 _pydecimal.py
227,283 B
SET
[ EDIT ]
|
[ DEL ]
📄 _pyio.py
93,593 B
SET
[ EDIT ]
|
[ DEL ]
📄 _pylong.py
10,790 B
SET
[ EDIT ]
|
[ DEL ]
📄 _sitebuiltins.py
3,128 B
SET
[ EDIT ]
|
[ DEL ]
📄 _strptime.py
28,393 B
SET
[ EDIT ]
|
[ DEL ]
📄 _sysconfigdata__linux_x86_64-linux-gnu.py
72,132 B
SET
[ EDIT ]
|
[ DEL ]
📄 _threading_local.py
7,220 B
SET
[ EDIT ]
|
[ DEL ]
📄 _weakrefset.py
5,893 B
SET
[ EDIT ]
|
[ DEL ]
📄 abc.py
6,538 B
SET
[ EDIT ]
|
[ DEL ]
📄 aifc.py
34,211 B
SET
[ EDIT ]
|
[ DEL ]
📄 antigravity.py
500 B
SET
[ EDIT ]
|
[ DEL ]
📄 argparse.py
101,155 B
SET
[ EDIT ]
|
[ DEL ]
📄 ast.py
64,452 B
SET
[ EDIT ]
|
[ DEL ]
📄 base64.py
20,634 B
SET
[ EDIT ]
|
[ DEL ]
📄 bdb.py
33,573 B
SET
[ EDIT ]
|
[ DEL ]
📄 bisect.py
3,423 B
SET
[ EDIT ]
|
[ DEL ]
📄 bz2.py
11,847 B
SET
[ EDIT ]
|
[ DEL ]
📄 cProfile.py
6,555 B
SET
[ EDIT ]
|
[ DEL ]
📄 calendar.py
25,864 B
SET
[ EDIT ]
|
[ DEL ]
📄 cgi.py
34,418 B
SET
[ EDIT ]
|
[ DEL ]
📄 cgitb.py
12,421 B
SET
[ EDIT ]
|
[ DEL ]
📄 chunk.py
5,500 B
SET
[ EDIT ]
|
[ DEL ]
📄 cmd.py
14,873 B
SET
[ EDIT ]
|
[ DEL ]
📄 code.py
10,962 B
SET
[ EDIT ]
|
[ DEL ]
📄 codecs.py
36,870 B
SET
[ EDIT ]
|
[ DEL ]
📄 codeop.py
5,908 B
SET
[ EDIT ]
|
[ DEL ]
📄 colorsys.py
4,062 B
SET
[ EDIT ]
|
[ DEL ]
📄 compileall.py
20,507 B
SET
[ EDIT ]
|
[ DEL ]
📄 configparser.py
53,789 B
SET
[ EDIT ]
|
[ DEL ]
📄 contextlib.py
27,637 B
SET
[ EDIT ]
|
[ DEL ]
📄 contextvars.py
129 B
SET
[ EDIT ]
|
[ DEL ]
📄 copy.py
8,412 B
SET
[ EDIT ]
|
[ DEL ]
📄 copyreg.py
7,614 B
SET
[ EDIT ]
|
[ DEL ]
📄 crypt.py
3,913 B
SET
[ EDIT ]
|
[ DEL ]
📄 csv.py
16,386 B
SET
[ EDIT ]
|
[ DEL ]
📄 dataclasses.py
62,085 B
SET
[ EDIT ]
|
[ DEL ]
📄 datetime.py
268 B
SET
[ EDIT ]
|
[ DEL ]
📄 decimal.py
2,805 B
SET
[ EDIT ]
|
[ DEL ]
📄 difflib.py
83,368 B
SET
[ EDIT ]
|
[ DEL ]
📄 dis.py
30,227 B
SET
[ EDIT ]
|
[ DEL ]
📄 doctest.py
106,749 B
SET
[ EDIT ]
|
[ DEL ]
📄 enum.py
81,540 B
SET
[ EDIT ]
|
[ DEL ]
📄 filecmp.py
10,381 B
SET
[ EDIT ]
|
[ DEL ]
📄 fileinput.py
15,714 B
SET
[ EDIT ]
|
[ DEL ]
📄 fnmatch.py
5,999 B
SET
[ EDIT ]
|
[ DEL ]
📄 fractions.py
38,147 B
SET
[ EDIT ]
|
[ DEL ]
📄 ftplib.py
34,735 B
SET
[ EDIT ]
|
[ DEL ]
📄 functools.py
37,940 B
SET
[ EDIT ]
|
[ DEL ]
📄 genericpath.py
5,572 B
SET
[ EDIT ]
|
[ DEL ]
📄 getopt.py
7,488 B
SET
[ EDIT ]
|
[ DEL ]
📄 getpass.py
5,990 B
SET
[ EDIT ]
|
[ DEL ]
📄 gettext.py
21,320 B
SET
[ EDIT ]
|
[ DEL ]
📄 glob.py
8,732 B
SET
[ EDIT ]
|
[ DEL ]
📄 graphlib.py
9,648 B
SET
[ EDIT ]
|
[ DEL ]
📄 gzip.py
25,402 B
SET
[ EDIT ]
|
[ DEL ]
📄 hashlib.py
9,683 B
SET
[ EDIT ]
|
[ DEL ]
📄 heapq.py
23,024 B
SET
[ EDIT ]
|
[ DEL ]
📄 hmac.py
8,043 B
SET
[ EDIT ]
|
[ DEL ]
📄 imaplib.py
54,209 B
SET
[ EDIT ]
|
[ DEL ]
📄 imghdr.py
4,398 B
SET
[ EDIT ]
|
[ DEL ]
📄 inspect.py
127,125 B
SET
[ EDIT ]
|
[ DEL ]
📄 io.py
3,582 B
SET
[ EDIT ]
|
[ DEL ]
📄 ipaddress.py
81,414 B
SET
[ EDIT ]
|
[ DEL ]
📄 keyword.py
1,073 B
SET
[ EDIT ]
|
[ DEL ]
📄 linecache.py
5,800 B
SET
[ EDIT ]
|
[ DEL ]
📄 locale.py
78,599 B
SET
[ EDIT ]
|
[ DEL ]
📄 lzma.py
13,277 B
SET
[ EDIT ]
|
[ DEL ]
📄 mailbox.py
78,911 B
SET
[ EDIT ]
|
[ DEL ]
📄 mailcap.py
9,333 B
SET
[ EDIT ]
|
[ DEL ]
📄 mimetypes.py
23,037 B
SET
[ EDIT ]
|
[ DEL ]
📄 modulefinder.py
23,699 B
SET
[ EDIT ]
|
[ DEL ]
📄 netrc.py
6,922 B
SET
[ EDIT ]
|
[ DEL ]
📄 nntplib.py
41,087 B
SET
[ EDIT ]
|
[ DEL ]
📄 ntpath.py
32,324 B
SET
[ EDIT ]
|
[ DEL ]
📄 nturl2path.py
2,374 B
SET
[ EDIT ]
|
[ DEL ]
📄 numbers.py
11,467 B
SET
[ EDIT ]
|
[ DEL ]
📄 opcode.py
13,174 B
SET
[ EDIT ]
|
[ DEL ]
📄 operator.py
10,965 B
SET
[ EDIT ]
|
[ DEL ]
📄 optparse.py
60,369 B
SET
[ EDIT ]
|
[ DEL ]
📄 os.py
40,821 B
SET
[ EDIT ]
|
[ DEL ]
📄 pathlib.py
51,052 B
SET
[ EDIT ]
|
[ DEL ]
📄 pdb.py
70,297 B
SET
[ EDIT ]
|
[ DEL ]
📄 pickle.py
66,911 B
SET
[ EDIT ]
|
[ DEL ]
📄 pickletools.py
94,052 B
SET
[ EDIT ]
|
[ DEL ]
📄 pipes.py
8,978 B
SET
[ EDIT ]
|
[ DEL ]
📄 pkgutil.py
18,281 B
SET
[ EDIT ]
|
[ DEL ]
📄 platform.py
43,388 B
SET
[ EDIT ]
|
[ DEL ]
📄 plistlib.py
28,342 B
SET
[ EDIT ]
|
[ DEL ]
📄 poplib.py
14,742 B
SET
[ EDIT ]
|
[ DEL ]
📄 posixpath.py
17,483 B
SET
[ EDIT ]
|
[ DEL ]
📄 pprint.py
24,158 B
SET
[ EDIT ]
|
[ DEL ]
📄 profile.py
23,092 B
SET
[ EDIT ]
|
[ DEL ]
📄 pstats.py
29,289 B
SET
[ EDIT ]
|
[ DEL ]
📄 pty.py
6,137 B
SET
[ EDIT ]
|
[ DEL ]
📄 py_compile.py
7,837 B
SET
[ EDIT ]
|
[ DEL ]
📄 pyclbr.py
11,396 B
SET
[ EDIT ]
|
[ DEL ]
📄 pydoc.py
113,508 B
SET
[ EDIT ]
|
[ DEL ]
📄 queue.py
11,496 B
SET
[ EDIT ]
|
[ DEL ]
📄 quopri.py
7,183 B
SET
[ EDIT ]
|
[ DEL ]
📄 random.py
34,689 B
SET
[ EDIT ]
|
[ DEL ]
📄 reprlib.py
7,148 B
SET
[ EDIT ]
|
[ DEL ]
📄 rlcompleter.py
7,827 B
SET
[ EDIT ]
|
[ DEL ]
📄 runpy.py
12,885 B
SET
[ EDIT ]
|
[ DEL ]
📄 sched.py
6,351 B
SET
[ EDIT ]
|
[ DEL ]
📄 secrets.py
1,984 B
SET
[ EDIT ]
|
[ DEL ]
📄 selectors.py
19,671 B
SET
[ EDIT ]
|
[ DEL ]
📄 shelve.py
8,560 B
SET
[ EDIT ]
|
[ DEL ]
📄 shlex.py
13,353 B
SET
[ EDIT ]
|
[ DEL ]
📄 shutil.py
56,762 B
SET
[ EDIT ]
|
[ DEL ]
📄 signal.py
2,495 B
SET
[ EDIT ]
|
[ DEL ]
📄 site.py
23,439 B
SET
[ EDIT ]
|
[ DEL ]
📄 smtplib.py
43,531 B
SET
[ EDIT ]
|
[ DEL ]
📄 sndhdr.py
7,448 B
SET
[ EDIT ]
|
[ DEL ]
📄 socket.py
37,815 B
SET
[ EDIT ]
|
[ DEL ]
📄 socketserver.py
28,065 B
SET
[ EDIT ]
|
[ DEL ]
📄 sre_compile.py
231 B
SET
[ EDIT ]
|
[ DEL ]
📄 sre_constants.py
232 B
SET
[ EDIT ]
|
[ DEL ]
📄 sre_parse.py
229 B
SET
[ EDIT ]
|
[ DEL ]
📄 ssl.py
50,904 B
SET
[ EDIT ]
|
[ DEL ]
📄 stat.py
5,485 B
SET
[ EDIT ]
|
[ DEL ]
📄 statistics.py
50,227 B
SET
[ EDIT ]
|
[ DEL ]
📄 string.py
11,786 B
SET
[ EDIT ]
|
[ DEL ]
📄 stringprep.py
12,917 B
SET
[ EDIT ]
|
[ DEL ]
📄 struct.py
257 B
SET
[ EDIT ]
|
[ DEL ]
📄 subprocess.py
88,747 B
SET
[ EDIT ]
|
[ DEL ]
📄 sunau.py
18,478 B
SET
[ EDIT ]
|
[ DEL ]
📄 symtable.py
12,477 B
SET
[ EDIT ]
|
[ DEL ]
📄 sysconfig.py
33,773 B
SET
[ EDIT ]
|
[ DEL ]
📄 tabnanny.py
11,531 B
SET
[ EDIT ]
|
[ DEL ]
📄 tarfile.py
114,250 B
SET
[ EDIT ]
|
[ DEL ]
📄 telnetlib.py
23,334 B
SET
[ EDIT ]
|
[ DEL ]
📄 tempfile.py
32,386 B
SET
[ EDIT ]
|
[ DEL ]
📄 textwrap.py
19,718 B
SET
[ EDIT ]
|
[ DEL ]
📄 this.py
1,003 B
SET
[ EDIT ]
|
[ DEL ]
📄 threading.py
59,742 B
SET
[ EDIT ]
|
[ DEL ]
📄 timeit.py
13,463 B
SET
[ EDIT ]
|
[ DEL ]
📄 token.py
2,511 B
SET
[ EDIT ]
|
[ DEL ]
📄 tokenize.py
21,570 B
SET
[ EDIT ]
|
[ DEL ]
📄 trace.py
29,352 B
SET
[ EDIT ]
|
[ DEL ]
📄 traceback.py
46,393 B
SET
[ EDIT ]
|
[ DEL ]
📄 tracemalloc.py
18,047 B
SET
[ EDIT ]
|
[ DEL ]
📄 tty.py
2,035 B
SET
[ EDIT ]
|
[ DEL ]
📄 types.py
10,993 B
SET
[ EDIT ]
|
[ DEL ]
📄 typing.py
118,836 B
SET
[ EDIT ]
|
[ DEL ]
📄 uu.py
7,341 B
SET
[ EDIT ]
|
[ DEL ]
📄 uuid.py
29,656 B
SET
[ EDIT ]
|
[ DEL ]
📄 warnings.py
21,909 B
SET
[ EDIT ]
|
[ DEL ]
📄 wave.py
22,769 B
SET
[ EDIT ]
|
[ DEL ]
📄 weakref.py
21,513 B
SET
[ EDIT ]
|
[ DEL ]
📄 webbrowser.py
24,141 B
SET
[ EDIT ]
|
[ DEL ]
📄 xdrlib.py
5,942 B
SET
[ EDIT ]
|
[ DEL ]
📄 zipapp.py
7,543 B
SET
[ EDIT ]
|
[ DEL ]
📄 zipimport.py
27,840 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: colorsys.py
"""Conversion functions between RGB and other color systems. This modules provides two functions for each color system ABC: rgb_to_abc(r, g, b) --> a, b, c abc_to_rgb(a, b, c) --> r, g, b All inputs and outputs are triples of floats in the range [0.0...1.0] (with the exception of I and Q, which covers a slightly larger range). Inputs outside the valid range may cause exceptions or invalid outputs. Supported color systems: RGB: Red, Green, Blue components YIQ: Luminance, Chrominance (used by composite video signals) HLS: Hue, Luminance, Saturation HSV: Hue, Saturation, Value """ # References: # http://en.wikipedia.org/wiki/YIQ # http://en.wikipedia.org/wiki/HLS_color_space # http://en.wikipedia.org/wiki/HSV_color_space __all__ = ["rgb_to_yiq","yiq_to_rgb","rgb_to_hls","hls_to_rgb", "rgb_to_hsv","hsv_to_rgb"] # Some floating-point constants ONE_THIRD = 1.0/3.0 ONE_SIXTH = 1.0/6.0 TWO_THIRD = 2.0/3.0 # YIQ: used by composite video signals (linear combinations of RGB) # Y: perceived grey level (0.0 == black, 1.0 == white) # I, Q: color components # # There are a great many versions of the constants used in these formulae. # The ones in this library uses constants from the FCC version of NTSC. def rgb_to_yiq(r, g, b): y = 0.30*r + 0.59*g + 0.11*b i = 0.74*(r-y) - 0.27*(b-y) q = 0.48*(r-y) + 0.41*(b-y) return (y, i, q) def yiq_to_rgb(y, i, q): # r = y + (0.27*q + 0.41*i) / (0.74*0.41 + 0.27*0.48) # b = y + (0.74*q - 0.48*i) / (0.74*0.41 + 0.27*0.48) # g = y - (0.30*(r-y) + 0.11*(b-y)) / 0.59 r = y + 0.9468822170900693*i + 0.6235565819861433*q g = y - 0.27478764629897834*i - 0.6356910791873801*q b = y - 1.1085450346420322*i + 1.7090069284064666*q if r < 0.0: r = 0.0 if g < 0.0: g = 0.0 if b < 0.0: b = 0.0 if r > 1.0: r = 1.0 if g > 1.0: g = 1.0 if b > 1.0: b = 1.0 return (r, g, b) # HLS: Hue, Luminance, Saturation # H: position in the spectrum # L: color lightness # S: color saturation def rgb_to_hls(r, g, b): maxc = max(r, g, b) minc = min(r, g, b) sumc = (maxc+minc) rangec = (maxc-minc) l = sumc/2.0 if minc == maxc: return 0.0, l, 0.0 if l <= 0.5: s = rangec / sumc else: s = rangec / (2.0-maxc-minc) # Not always 2.0-sumc: gh-106498. rc = (maxc-r) / rangec gc = (maxc-g) / rangec bc = (maxc-b) / rangec if r == maxc: h = bc-gc elif g == maxc: h = 2.0+rc-bc else: h = 4.0+gc-rc h = (h/6.0) % 1.0 return h, l, s def hls_to_rgb(h, l, s): if s == 0.0: return l, l, l if l <= 0.5: m2 = l * (1.0+s) else: m2 = l+s-(l*s) m1 = 2.0*l - m2 return (_v(m1, m2, h+ONE_THIRD), _v(m1, m2, h), _v(m1, m2, h-ONE_THIRD)) def _v(m1, m2, hue): hue = hue % 1.0 if hue < ONE_SIXTH: return m1 + (m2-m1)*hue*6.0 if hue < 0.5: return m2 if hue < TWO_THIRD: return m1 + (m2-m1)*(TWO_THIRD-hue)*6.0 return m1 # HSV: Hue, Saturation, Value # H: position in the spectrum # S: color saturation ("purity") # V: color brightness def rgb_to_hsv(r, g, b): maxc = max(r, g, b) minc = min(r, g, b) rangec = (maxc-minc) v = maxc if minc == maxc: return 0.0, 0.0, v s = rangec / maxc rc = (maxc-r) / rangec gc = (maxc-g) / rangec bc = (maxc-b) / rangec if r == maxc: h = bc-gc elif g == maxc: h = 2.0+rc-bc else: h = 4.0+gc-rc h = (h/6.0) % 1.0 return h, s, v def hsv_to_rgb(h, s, v): if s == 0.0: return v, v, v i = int(h*6.0) # XXX assume int() truncates! f = (h*6.0) - i p = v*(1.0 - s) q = v*(1.0 - s*f) t = v*(1.0 - s*(1.0-f)) i = i%6 if i == 0: return v, t, p if i == 1: return q, v, p if i == 2: return p, v, t if i == 3: return p, q, v if i == 4: return t, p, v if i == 5: return v, p, q # Cannot get here