[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@18.222.91.173: ~ $
U

<_9Y�$�@s�ddlmZmZmZddlmZmZmZddlm	Z	m
Z
mZddlm
Z
mZmZddlmZmZmZGdd�de�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZGdd�de�ZdS)�)�EUCTW_CHAR_TO_FREQ_ORDER�EUCTW_TABLE_SIZE� EUCTW_TYPICAL_DISTRIBUTION_RATIO)�EUCKR_CHAR_TO_FREQ_ORDER�EUCKR_TABLE_SIZE� EUCKR_TYPICAL_DISTRIBUTION_RATIO)�GB2312_CHAR_TO_FREQ_ORDER�GB2312_TABLE_SIZE�!GB2312_TYPICAL_DISTRIBUTION_RATIO)�BIG5_CHAR_TO_FREQ_ORDER�BIG5_TABLE_SIZE�BIG5_TYPICAL_DISTRIBUTION_RATIO)�JIS_CHAR_TO_FREQ_ORDER�JIS_TABLE_SIZE�JIS_TYPICAL_DISTRIBUTION_RATIOc@sLeZdZdZdZdZdZdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�ZdS)�CharDistributionAnalysisig�G�z��?g{�G�z�?�cCs0d|_d|_d|_d|_d|_d|_|��dS�N)�_char_to_freq_order�_table_size�typical_distribution_ratio�_done�_total_chars�_freq_chars�reset��self�r�I/opt/alt/python38/lib/python3.8/site-packages/chardet/chardistribution.py�__init__.sz!CharDistributionAnalysis.__init__cCsd|_d|_d|_dS)zreset analyser, clear any stateF�N)rrrrrrrr=szCharDistributionAnalysis.resetcCsX|dkr|�|�}nd}|dkrT|jd7_||jkrTd|j|krT|jd7_dS)z"feed a character with known length����r riN)�	get_orderrrrr)r�charZchar_len�orderrrr�feedFs
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�rrrr�get_confidenceTs�
z'CharDistributionAnalysis.get_confidencecCs|j|jkSr)r�ENOUGH_DATA_THRESHOLDrrrr�got_enough_datadsz(CharDistributionAnalysis.got_enough_datacCsdS)Nr"r)r�byte_strrrrr#isz"CharDistributionAnalysis.get_orderN)
�__name__�
__module__�__qualname__r,r)r(r'rrr&r+r-r#rrrrr(s	rcs$eZdZ�fdd�Zdd�Z�ZS)�EUCTWDistributionAnalysiscs$tt|���t|_t|_t|_dSr)	�superr2rrrrrrrr��	__class__rrrrsz"EUCTWDistributionAnalysis.__init__cCs0|d}|dkr(d|d|ddSdSdS)Nr ���^r�r"r�rr.�
first_charrrrr#xsz#EUCTWDistributionAnalysis.get_order�r/r0r1rr#�
__classcell__rrr4rr2qsr2cs$eZdZ�fdd�Zdd�Z�ZS)�EUCKRDistributionAnalysiscs$tt|���t|_t|_t|_dSr)	r3r=rrrrrrrrr4rrr�sz"EUCKRDistributionAnalysis.__init__cCs0|d}|dkr(d|d|ddSdSdS)Nr �r7rr8r"rr9rrrr#�sz#EUCKRDistributionAnalysis.get_orderr;rrr4rr=�sr=cs$eZdZ�fdd�Zdd�Z�ZS)�GB2312DistributionAnalysiscs$tt|���t|_t|_t|_dSr)	r3r?rrrr	rr
rrr4rrr�sz#GB2312DistributionAnalysis.__init__cCs>|d|d}}|dkr6|dkr6d|d|dSdSdS)Nr rr>r8r7r"r�rr.r:�second_charrrrr#�sz$GB2312DistributionAnalysis.get_orderr;rrr4rr?�sr?cs$eZdZ�fdd�Zdd�Z�ZS)�Big5DistributionAnalysiscs$tt|���t|_t|_t|_dSr)	r3rBrrrrrr
rrr4rrr�sz!Big5DistributionAnalysis.__init__cCsX|d|d}}|dkrP|dkr:d|d|ddSd|d|dSndSdS)	Nr r�r8��?�@r"rr@rrrr#�sz"Big5DistributionAnalysis.get_orderr;rrr4rrB�srBcs$eZdZ�fdd�Zdd�Z�ZS)�SJISDistributionAnalysiscs$tt|���t|_t|_t|_dSr)	r3rGrrrrrrrrr4rrr�sz!SJISDistributionAnalysis.__init__cCsr|d|d}}|dkr0|dkr0d|d}n&|dkrR|dkrRd|dd}nd	S||d
}|dkrnd	}|S)Nr r��������r"rF�r)rr.r:rAr%rrrr#�sz"SJISDistributionAnalysis.get_orderr;rrr4rrG�srGcs$eZdZ�fdd�Zdd�Z�ZS)�EUCJPDistributionAnalysiscs$tt|���t|_t|_t|_dSr)	r3rOrrrrrrrrr4rrr�sz"EUCJPDistributionAnalysis.__init__cCs0|d}|dkr(d|d|ddSdSdS)Nr �r7r8rr"r)rr.r$rrrr#�sz#EUCJPDistributionAnalysis.get_orderr;rrr4rrO�srON)Z	euctwfreqrrrZ	euckrfreqrrrZ
gb2312freqrr	r
Zbig5freqrrr
Zjisfreqrrr�objectrr2r=r?rBrGrOrrrr�<module>sI

Filemanager

Name Type Size Permission Actions
__init__.cpython-38.opt-1.pyc File 814 B 0644
__init__.cpython-38.pyc File 814 B 0644
big5freq.cpython-38.opt-1.pyc File 26.51 KB 0644
big5freq.cpython-38.pyc File 26.51 KB 0644
big5prober.cpython-38.opt-1.pyc File 1.07 KB 0644
big5prober.cpython-38.pyc File 1.07 KB 0644
chardistribution.cpython-38.opt-1.pyc File 6.04 KB 0644
chardistribution.cpython-38.pyc File 6.04 KB 0644
charsetgroupprober.cpython-38.opt-1.pyc File 2.16 KB 0644
charsetgroupprober.cpython-38.pyc File 2.16 KB 0644
charsetprober.cpython-38.opt-1.pyc File 3.37 KB 0644
charsetprober.cpython-38.pyc File 3.37 KB 0644
codingstatemachine.cpython-38.opt-1.pyc File 2.81 KB 0644
codingstatemachine.cpython-38.pyc File 2.81 KB 0644
compat.cpython-38.opt-1.pyc File 319 B 0644
compat.cpython-38.pyc File 319 B 0644
cp949prober.cpython-38.opt-1.pyc File 1.08 KB 0644
cp949prober.cpython-38.pyc File 1.08 KB 0644
enums.cpython-38.opt-1.pyc File 2.55 KB 0644
enums.cpython-38.pyc File 2.55 KB 0644
escprober.cpython-38.opt-1.pyc File 2.54 KB 0644
escprober.cpython-38.pyc File 2.54 KB 0644
escsm.cpython-38.opt-1.pyc File 7.26 KB 0644
escsm.cpython-38.pyc File 7.26 KB 0644
eucjpprober.cpython-38.opt-1.pyc File 2.36 KB 0644
eucjpprober.cpython-38.pyc File 2.36 KB 0644
euckrfreq.cpython-38.opt-1.pyc File 11.75 KB 0644
euckrfreq.cpython-38.pyc File 11.75 KB 0644
euckrprober.cpython-38.opt-1.pyc File 1.08 KB 0644
euckrprober.cpython-38.pyc File 1.08 KB 0644
euctwfreq.cpython-38.opt-1.pyc File 26.51 KB 0644
euctwfreq.cpython-38.pyc File 26.51 KB 0644
euctwprober.cpython-38.opt-1.pyc File 1.08 KB 0644
euctwprober.cpython-38.pyc File 1.08 KB 0644
gb2312freq.cpython-38.opt-1.pyc File 18.62 KB 0644
gb2312freq.cpython-38.pyc File 18.62 KB 0644
gb2312prober.cpython-38.opt-1.pyc File 1.09 KB 0644
gb2312prober.cpython-38.pyc File 1.09 KB 0644
hebrewprober.cpython-38.opt-1.pyc File 2.92 KB 0644
hebrewprober.cpython-38.pyc File 2.92 KB 0644
jisfreq.cpython-38.opt-1.pyc File 21.58 KB 0644
jisfreq.cpython-38.pyc File 21.58 KB 0644
jpcntx.cpython-38.opt-1.pyc File 36.69 KB 0644
jpcntx.cpython-38.pyc File 36.69 KB 0644
langbulgarianmodel.cpython-38.opt-1.pyc File 23.04 KB 0644
langbulgarianmodel.cpython-38.pyc File 23.04 KB 0644
langcyrillicmodel.cpython-38.opt-1.pyc File 28.38 KB 0644
langcyrillicmodel.cpython-38.pyc File 28.38 KB 0644
langgreekmodel.cpython-38.opt-1.pyc File 23 KB 0644
langgreekmodel.cpython-38.pyc File 23 KB 0644
langhebrewmodel.cpython-38.opt-1.pyc File 21.66 KB 0644
langhebrewmodel.cpython-38.pyc File 21.66 KB 0644
langhungarianmodel.cpython-38.opt-1.pyc File 23.03 KB 0644
langhungarianmodel.cpython-38.pyc File 23.03 KB 0644
langthaimodel.cpython-38.opt-1.pyc File 21.64 KB 0644
langthaimodel.cpython-38.pyc File 21.64 KB 0644
langturkishmodel.cpython-38.opt-1.pyc File 21.66 KB 0644
langturkishmodel.cpython-38.pyc File 21.66 KB 0644
latin1prober.cpython-38.opt-1.pyc File 3.29 KB 0644
latin1prober.cpython-38.pyc File 3.29 KB 0644
mbcharsetprober.cpython-38.opt-1.pyc File 2.18 KB 0644
mbcharsetprober.cpython-38.pyc File 2.18 KB 0644
mbcsgroupprober.cpython-38.opt-1.pyc File 1.07 KB 0644
mbcsgroupprober.cpython-38.pyc File 1.07 KB 0644
mbcssm.cpython-38.opt-1.pyc File 16.33 KB 0644
mbcssm.cpython-38.pyc File 16.33 KB 0644
sbcharsetprober.cpython-38.opt-1.pyc File 2.91 KB 0644
sbcharsetprober.cpython-38.pyc File 2.91 KB 0644
sbcsgroupprober.cpython-38.opt-1.pyc File 1.56 KB 0644
sbcsgroupprober.cpython-38.pyc File 1.56 KB 0644
sjisprober.cpython-38.opt-1.pyc File 2.39 KB 0644
sjisprober.cpython-38.pyc File 2.39 KB 0644
universaldetector.cpython-38.opt-1.pyc File 5.66 KB 0644
universaldetector.cpython-38.pyc File 5.66 KB 0644
utf8prober.cpython-38.opt-1.pyc File 1.91 KB 0644
utf8prober.cpython-38.pyc File 1.91 KB 0644
version.cpython-38.opt-1.pyc File 403 B 0644
version.cpython-38.pyc File 403 B 0644