/opt/imunify360/venv/lib/python3.11/site-packages/humanize/__pycache__
NameSizeModeActions
filesize.cpython-311.pyc26740644editdlrm
i18n.cpython-311.pyc67290644editdlrm
number.cpython-311.pyc210180644editdlrm
time.cpython-311.pyc225790644editdlrm
__init__.cpython-311.pyc13370644editdlrm
Edit: /opt/imunify360/venv/lib/python3.11/site-packages/humanize/__pycache__/number.cpython-311.pyc (21018B)
§ j‡9öBOADãóD—UdZddlmZddlZddlZddlZddlmZddlm Z ddl m Z ddl m Z mZmZdd l mZdd l mZe rejd krdd lmZndd lmZd Zded<d?d„Zd@dAd„ZdBdCd„Zd„dD¦«Zedd¦«edd¦«edd¦«ed d ¦«ed!d!¦«ed"d"¦«ed#d#¦«ed$d$¦«ed%d%¦«ed&d&¦«ed'd'¦«ed(d(¦«f ZdDdEd+„ZdFd,„ZdFd-„Z dGdHd1„Z! dIdJd:„Z"dKdLd>„Z#dS)Mz!Humanizing functions for numbers.é)Ú annotationsN)ÚFraction)Ú TYPE_CHECKINGé)Ú_gettext)Ú _ngettextÚdecimal_separatorÚthousands_separator)Ú_ngettext_noop)Ú _pgettext)éé )Ú TypeAliasz float | strrÚNumberOrStringÚvalueÚfloatÚreturnÚstrcó¢—tj|¦«rdStj|¦«r|dkrdStj|¦«r|dkrdSdS)z2Utility function to handle infinite and nan cases.ÚNaNrz-Infz+InfÚ)ÚmathÚisnanÚisinf©rs úo/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib/python3.11/site-packages/humanize/number.pyÚ_format_not_finiters\€å „z�%ÑÔð؈uÝ „z�%ÑÔð˜U QšY˜Y؈vÝ „z�%ÑÔð˜U QšY˜Y؈vØ ˆ2óÚmaleÚgenderc óœ— tjt|¦«¦«stt|¦«¦«St |¦«}n&#t t f$rt|¦«cYSwxYw|dkr™tdd¦«tdd¦«tdd¦«tdd ¦«td d¦«td d¦«td d¦«td d¦«tdd¦«tdd¦«f }n˜tdd¦«tdd¦«tdd¦«tdd ¦«tdd¦«tdd¦«tdd¦«tdd¦«tdd¦«tdd¦«f }|dzdvr |›|d›�S|›||dz›�S)akConverts an integer to its ordinal as a string. For example, 1 is "1st", 2 is "2nd", 3 is "3rd", etc. Works for any integer or anything `int()` will turn into an integer. Anything else will return the output of str(value). Examples: ```pycon >>> ordinal(1) '1st' >>> ordinal(1002) '1002nd' >>> ordinal(103) '103rd' >>> ordinal(4) '4th' >>> ordinal(12) '12th' >>> ordinal(101) '101st' >>> ordinal(111) '111th' >>> ordinal("something else") 'something else' >>> ordinal([1, 2, 3]) == "[1, 2, 3]" True ``` Args: value (int, str, float): Integer to convert. gender (str): Gender for translations. Accepts either "male" or "female". Returns: str: Ordinal string. rz0 (male)Úthz1 (male)Ústz2 (male)Úndz3 (male)Úrdz4 (male)z5 (male)z6 (male)z7 (male)z8 (male)z9 (male)z 0 (female)z 1 (female)z 2 (female)z 3 (female)z 4 (female)z 5 (female)z 6 (female)z 7 (female)z 8 (female)z 9 (female)éd)é é é rr) rÚisfiniterrÚintÚ TypeErrorÚ ValueErrorrÚP_)rr Úts rÚordinalr0%sÓ€ðJÝŒ}�U 5™\œ\Ñ*Ô*ð 4Ý%¥e¨E¡l¤lÑ3Ô3Ð 3Ý�E‘ ” ˆˆøÝ •zÐ "ðððÝ�5‰zŒzÐÐÐðøøøà �ÒÐå ˆz˜4Ñ Ô Ý ˆz˜4Ñ Ô Ý ˆz˜4Ñ Ô Ý ˆz˜4Ñ Ô Ý ˆz˜4Ñ Ô Ý ˆz˜4Ñ Ô Ý ˆz˜4Ñ Ô Ý ˆz˜4Ñ Ô Ý ˆz˜4Ñ Ô Ý ˆz˜4Ñ Ô ð ˆˆõ ˆ|˜TÑ "Ô "Ý ˆ|˜TÑ "Ô "Ý ˆ|˜TÑ "Ô "Ý ˆ|˜TÑ "Ô "Ý ˆ|˜TÑ "Ô "Ý ˆ|˜TÑ "Ô "Ý ˆ|˜TÑ "Ô "Ý ˆ|˜TÑ "Ô "Ý ˆ|˜TÑ "Ô "Ý ˆ|˜TÑ "Ô "ð ˆð ˆs�{�lÐ"Ð"ØÐ˜˜1œÐÐÐØÐ $�Q�u˜r‘z”]Ð $Ð $Ð$ó‚>> intcomma(100) '100' >>> intcomma("1000") '1,000' >>> intcomma(1_000_000) '1,000,000' >>> intcomma(1_234_567.25) '1,234,567.25' >>> intcomma(1234.5454545, 2) '1,234.55' >>> intcomma(14308.40, 1) '14,308.4' >>> intcomma("14308.40", 1) '14,308.4' >>> intcomma(None) 'None' ``` Args: value (int, float, str): Integer or float to convert. ndigits (int, None): Digits of precision for rounding after the decimal point. Returns: str: String containing commas every three digits. rú.Nz {0:.{1}f}Tz^(-?\d+)(\d{3})z\g<1>z\g<2>)r r Ú isinstancerÚreplacerr*rrr+r,r-ÚformatÚreÚsub)rr2Ú thousands_sepÚ decimal_sepÚorigÚnews rÚintcommar?osˆ€õD(Ñ)Ô)€MÝ#Ñ%Ô%€KðÝ �e�SÑ !Ô !ð Ø—M’M -°Ñ4Ô4×<Ò<¸[È#ÑNÔNˆEÝ”=¥ u¡¤Ñ.Ô.ð 8Ý)­%°©,¬,Ñ7Ô7Ð7Ø�eˆ|ˆ|ݘe™ œ ��å˜E™ œ ��å”=¥ u¡¤Ñ.Ô.ð 8Ý)­%°©,¬,Ñ7Ô7Ð7Ý �%‰LŒLˆLøøÝ •zÐ "ðððÝ�5‰zŒzÐÐÐðøøøðÐØ×!Ò! %¨Ñ1Ô1ˆˆå�5‰zŒzˆØ �<Š<˜˜[Ñ )Ô )€DðÝŒfÐ'Ð)F°-Ð)FÐ)FÐ)FÈÑMÔMˆØ �3Š;ˆ;؈J؈ð sžA;D ÂA D Ã;D Ä D.Ä-D.có—g|]}d|z‘ŒS)r©)Ú.0Úxs rú rD¯s€Ð HÐ HÐ H�Aˆ"ˆa‰%Ð HÐ HÐ Hr) r éé r(ééééééé!r&ÚthousandÚmillionÚbillionÚtrillionÚ quadrillionÚ quintillionÚ sextillionÚ septillionÚ octillionÚ nonillionÚ decillionÚgoogolú%.1fr8c óô— tjt|¦«¦«stt|¦«¦«St |¦«}n&#t t f$rt|¦«cYSwxYw|dkr|dz}d}nd}|tdkr|t|¦«zSttdd…d¦«D�]!\}}||k�r|tt|dz ¦«z }t|t|dz z }t||z¦«|krm|tt|¦«z }t|\}}|d  |t||tj |¦«¦«g¦«z|zcSt|dz \}}|d  |t||tj |¦«¦«g¦«z|zcS�Œ#|t|¦«zS)aConverts a large integer to a friendly text representation. Works best for numbers over 1 million. For example, 1_000_000 becomes "1.0 million", 1200000 becomes "1.2 million" and "1_200_000_000" becomes "1.2 billion". Supports up to decillion (33 digits) and googol (100 digits). Examples: ```pycon >>> intword("100") '100' >>> intword("12400") '12.4 thousand' >>> intword("1000000") '1.0 million' >>> intword(1_200_000_000) '1.2 billion' >>> intword(8100000000000000000000000000000000) '8.1 decillion' >>> intword(None) 'None' >>> intword("1234000", "%0.3f") '1.234 million' ``` Args: value (int, float, str): Integer to convert. format (str): To change the number of decimal or general format of the number portion. Returns: str: Friendly text representation as a string, unless the value passed could not be coaxed into an `int`. réÿÿÿÿú-rrNú )rr*rrr+r,r-rÚpowersÚ enumerateÚ human_powersÚjoinrÚceil) rr8Únegative_prefixÚordinal_ÚpowerÚchoppedÚpowers_differenceÚsingularÚplurals rÚintwordrkÀs€ðFÝŒ}�U 5™\œ\Ñ*Ô*ð 4Ý%¥e¨E¡l¤lÑ3Ô3Ð 3Ý�E‘ ” ˆˆøÝ •zÐ "ðððÝ�5‰zŒzÐÐÐðøøøð ˆq‚y€yØ �‰ ˆØˆˆàˆà �v�aŒyÒÐØ¥ U¡¤Ñ+Ð+å$¥V¨A¨B¨B¤Z°Ñ3Ô3ðñ‰ˆ�%Ø �5Š=‰=Ø�e¥F¨8°a©<Ô$8Ñ9Ô9Ñ9ˆGÝ & xÔ 0µ6¸(ÀQ¹,Ô3GÑ GÐ Ý�V˜gÑ%Ñ&Ô&Ð*;Ò;Ð;Ø¥%­¨xÔ(8Ñ"9Ô"9Ñ9�Ý#/°Ô#9Ñ �˜&à#Ø—h’hØ¥¨8°V½T¼YÀwÑ=OÔ=OÑ!PÔ!PÐQñôñðñ ðððõ ,¨H°q©LÔ9Ñ ˆH�fàØ—(’(˜F¥I¨h¸ÅÄ È'Ñ@RÔ@RÑ$SÔ$SÐTÑUÔUñVàñð ð ð ñ ð& �S ™ZœZÑ 'Ð'r1c óN— tjt|¦«¦«stt|¦«¦«St |¦«}n&#t t f$rt|¦«cYSwxYwd|cxkrdksnt|¦«Std¦«td¦«td¦«td¦«td¦«td¦«td ¦«td ¦«td ¦«td ¦«f |S) aJConverts an integer to Associated Press style. Examples: ```pycon >>> apnumber(0) 'zero' >>> apnumber(5) 'five' >>> apnumber(10) '10' >>> apnumber("7") 'seven' >>> apnumber("foo") 'foo' >>> apnumber(None) 'None' ``` Args: value (int, float, str): Integer to convert. Returns: str: For numbers 0-9, the number spelled out. Otherwise, the number. This always returns a string unless the value was not `int`-able, then `str(value)` is returned. rrÚzeroÚoneÚtwoÚthreeÚfourÚfiveÚsixÚsevenÚeightÚnine) rr*rrr+r,r-rÚ_rs rÚapnumberrx s€ð8ÝŒ}�U 5™\œ\Ñ*Ô*ð 4Ý%¥e¨E¡l¤lÑ3Ô3Ð 3Ý�E‘ ” ˆˆøÝ •zÐ "ðððÝ�5‰zŒzÐÐÐðøøøà �ˆ?ˆ?Š?ˆ?˜Š?ˆ?ˆ?ˆ?Ý�5‰zŒzÐå ˆ&‰ Œ Ý ˆ%‰ŒÝ ˆ%‰ŒÝ ˆ'‰ Œ Ý ˆ&‰ Œ Ý ˆ&‰ Œ Ý ˆ%‰ŒÝ ˆ'‰ Œ Ý ˆ'‰ Œ Ý ˆ&‰ Œ ð ð ô ð  r1có†— t|¦«}tj|¦«st|¦«Sn&#tt f$rt |¦«cYSwxYwt|¦«}t||z ¦«  d¦«}|j }|j }|r |s |dkr|d›S|s |d›d|d›�S|d›d|d›d|d›�S)a˜Convert to fractional number. There will be some cases where one might not want to show ugly decimal places for floats and decimals. This function returns a human-readable fractional number in form of fractions and mixed fractions. Pass in a string, or a number or a float, and this function returns: * a string representation of a fraction * or a whole number * or a mixed fraction * or the str output of the value, if it could not be converted Examples: ```pycon >>> fractional(0.3) '3/10' >>> fractional(1.3) '1 3/10' >>> fractional(float(1/3)) '1/3' >>> fractional(1) '1' >>> fractional("ten") 'ten' >>> fractional(None) 'None' ``` Args: value (int, float, str): Integer to convert. Returns: str: Fractional number as a string. ièrz.0fú/r^) rrr*rr,r-rr+rÚlimit_denominatorÚ numeratorÚ denominator)rÚnumberÚ whole_numberÚfracr|r}s rÚ fractionalr�<s€ðNÝ�u‘”ˆÝŒ}˜VÑ$Ô$ð .Ý% fÑ-Ô-Ð -ð .øå •zÐ "ðððÝ�5‰zŒzÐÐÐðøøøå�v‘;”;€LÝ �F˜\Ñ)Ñ *Ô *× <Ò <¸TÑ BÔ B€DØ”€IØÔ"€KØð%˜Ið%¨+¸Ò*:Ð*:ðÐ$Ð$Ð$à ð4ØÐ3Ð3Ð3 +Ð3Ð3Ð3Ð3àÐ BÐ BÐ B Ð BÐ BÐ B°Ð BÐ BÐ BÐBs‚15µ AÁAéÚ precisionr+c ó—ddddddddd d d d œ } t|¦«}tj|¦«st|¦«Sn&#tt f$rt |¦«cYSwxYwd t t|¦«¦«z}| |¦«}|  d¦«\}}tj dd|¦«}g}|D]}|  ||¦«Œ|dzd  |¦«z} | S)uÔReturn number in string scientific notation z.wq x 10â�¿. Examples: ```pycon >>> scientific(float(0.3)) '3.00 x 10â�»Â¹' >>> scientific(int(500)) '5.00 x 10²' >>> scientific(-1000) '-1.00 x 10³' >>> scientific(1000, 1) '1.0 x 10³' >>> scientific(1000, 3) '1.000 x 10³' >>> scientific("99") '9.90 x 10¹' >>> scientific("foo") 'foo' >>> scientific(None) 'None' ``` Args: value (int, float, str): Input number. precision (int): Number of decimal for first part of the number. Returns: str: Number in scientific notation z.wq x 10â�¿. uâ�°õ¹õ²õ³uâ�´uâ�µuâ�¶uâ�·uâ�¸uâ�¹uâ�») Ú0Ú1Ú2Ú3Ú4Ú5Ú6Ú7Ú8Ú9r]z{:.%se}Úez^\+?(\-?)0*(.+)$z\1\2z x 10r)rrr*rr-r,rr+r8Úsplitr9r:Úappendrb) rrƒÚ exponentsÚfmtÚnÚpart1Úpart2Ú new_part2ÚcharÚ final_strs rÚ scientificr�xs8€ð@Ø Ø Ø Ø Ø Ø Ø Ø Ø Ø ð ð €IðÝ�e‘ ” ˆÝŒ}˜UÑ#Ô#ð -Ý% eÑ,Ô,Ð ,ð -øå � Ð "ðððÝ�5‰zŒzÐÐÐðøøøà •c�#˜i™.œ.Ñ)Ô)Ñ )€CØ � Š �5ÑÔ€AØ—7’7˜3‘<”<�L€Eˆ5å ŒFÐ&¨°Ñ 7Ô 7€Eà€IØð*ð*ˆØ×Ò˜ 4œÑ)Ô)Ð)Ð)à˜‘ "§'¢'¨)Ñ"4Ô"4Ñ4€Ià Ðs�1AÁ A&Á%A&ú{:}ú<ú>Úfloorú float | NonercÚ floor_tokenÚ ceil_tokencó>—|€dStj|¦«st|¦«S|� ||kr|}|}n|� ||kr|}|}nd}t|t¦«r|| |¦«zSt |¦«r|||¦«zSd}t|¦«‚)a¡Returns number with the specified format, clamped between floor and ceil. If the number is larger than ceil or smaller than floor, then the respective limit will be returned, formatted and prepended with a token specifying as such. Examples: ```pycon >>> clamp(123.456) '123.456' >>> clamp(0.0001, floor=0.01) '<0.01' >>> clamp(0.99, format="{:.0%}", ceil=0.99) '99%' >>> clamp(0.999, format="{:.0%}", ceil=0.99) '>99%' >>> clamp(1, format=intword, floor=1e6, floor_token="under ") 'under 1.0 million' >>> clamp(None) is None True ``` Args: value (int, float): Input number. format (str OR callable): Can either be a formatting string, or a callable function that receives value and returns a string. floor (int, float): Smallest value before clamping. ceil (int, float): Largest value before clamping. floor_token (str): If value is smaller than floor, token will be prepended to output. ceil_token (str): If value is larger than ceil, token will be prepended to output. Returns: str: Formatted number. The output is clamped between the indicated floor and ceil. If the number is larger than ceil or smaller than floor, the output will be prepended with a token indicating as such. NrzpInvalid format. Must be either a valid formatting string, or a function that accepts value and returns a string.)rr*rr6rr8Úcallabler-)rr8r¡rcr£r¤ÚtokenÚmsgs rÚclampr©¹sÌ€ð^ €}؈tå Œ=˜Ñ Ô ð)Ý! %Ñ(Ô(Ð(à ИU Uš]˜]؈؈ˆØ Ð ˜e dšl˜l؈؈ˆàˆå�&�#ÑÔð,Ø�v—}’} UÑ+Ô+Ñ+Ð+å�ÑÔð%Ø�v�v˜e‘}”}Ñ$Ð$ð 3ðõ �S‰/Œ/Ðrrr Úunitc óø—tj|¦«st|¦«S|dkr@ttjtjt |¦«¦«¦«¦«nd}|dks|dkrt||dz ¦«|zS|d|dzdzzz}|dkrd|dzdz }n|dkrd| dz dz}nd }t|d ||dzz dz z¦«}|s|r|d vrd }nd }|›|›|›|›�S) uŸReturn a value with a metric SI unit-prefix appended. Examples: ```pycon >>> metric(1500, "V") '1.50 kV' >>> metric(2e8, "W") '200 MW' >>> metric(220e-6, "F") '220 μF' >>> metric(1e-14, precision=4) '10.00 f' ``` The unit prefix is always chosen so that non-significant zero digits are required. i.e. `123,000` will become `123k` instead of `0.123M` and `1,230,000` will become `1.23M` instead of `1230K`. For numbers that are either too huge or too tiny to represent without resorting to either leading or trailing zeroes, it falls back to `scientific()`. ```pycon >>> metric(1e40) '1.00 x 10â�´â�°' ``` Args: value (int, float): Input number. unit (str): Optional base unit. precision (int): The number of digits the output should contain. Returns: str: rrMiâÿÿÿrrr Ú kMGTPEZYRQu mμnpfazyrqrz.%if)õ°u′u″r^) rr*rr+r¡Úlog10Úabsr�r8)rrªrƒÚexponentreÚvalue_Úspaces rÚmetricr³sA€õF Œ=˜Ñ Ô ð)Ý! %Ñ(Ô(Ð(Ø:?À1º*¸*�s•4”:�dœj­¨U©¬Ñ4Ô4Ñ5Ô5Ñ6Ô6Ð6È!€Hà�2‚~€~˜ Cš˜Ý˜% ¨Q¡Ñ/Ô/°$Ñ6Ð6à ˆR�H ‘M AÑ%Ñ &Ñ&€EØ�1‚}€}Ø ¨A¡ °Ñ 1Ô2ˆˆØ �AŠˆØ  8 )¨a¡-°AÑ!5Ô6ˆˆàˆÝ �E˜6 Y°(¸Q±,Ñ%?À!Ñ%CÑDÑ EÔ E€FØ ð�Hð Ð)=Ð!=Ð!=؈ˆàˆàÐ -�eÐ -˜XÐ - tÐ -Ð -Ð-r)rrrr)r)rrr rrr)N)rrr2r3rr)rZ)rrr8rrr)rrrr)r‚)rrrƒr+rr)ržNNrŸr )rrr8rr¡r¢rcr¢r£rr¤rrr)rr )rrrªrrƒr+rr)$Ú__doc__Ú __future__rrr9ÚsysÚ fractionsrÚtypingrÚi18nrrwrr r r ÚNS_r r.Ú version_inforÚtyping_extensionsrÚ__annotations__rr0r?r_rarkrxr�r�r©r³rArrúr¾sÜðØ'Ð'Ð'Ø"Ð"Ð"Ð"Ð"Ð"à € € € Ø € € € Ø € € € ØÐÐÐÐÐØ Ð Ð Ð Ð Ð àÐÐÐÐÐØCÐCÐCÐCÐCÐCÐCÐCÐCÐCØ'Ð'Ð'Ð'Ð'Ð'Ø!Ð!Ð!Ð!Ð!Ð!àð0Ø Ô˜7Ò"Ð"Ø$Ð$Ð$Ð$Ð$Ð$Ð$à/Ð/Ð/Ð/Ð/Ð/ð*€Ð)Ð)Ð)Ñ)ðððððG%ðG%ðG%ðG%ðG%ðT=ð=ð=ð=ð=ð@ IÐ HÐGÐ HÑ HÔ H€à€Cˆ �JÑÔØ€Cˆ �9ÑÔØ€Cˆ �9ÑÔØ€Cˆ �JÑÔØ€Cˆ �}Ñ%Ô%Ø€Cˆ �}Ñ%Ô%Ø€Cˆ �lÑ#Ô#Ø€Cˆ �lÑ#Ô#Ø€Cˆ �[Ñ!Ô!Ø€Cˆ �[Ñ!Ô!Ø€Cˆ �[Ñ!Ô!Ø€Cˆ�(ÑÔð € ð G(ðG(ðG(ðG(ðG(ðT/ ð/ ð/ ð/ ðd9Cð9Cð9Cð9Cðx>ð>ð>ð>ð>ðFØØØØð HðHðHðHðHðV7.ð7.ð7.ð7.ð7.ð7.ð7.r