__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

aptanhua@216.73.216.189: ~ $
�

�֦i�����dZddl�ddlZGd�de�ZGd�de�Zd�Zd	�Zd
�Z	d�Z
d�Zdd
�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�ZdZdZedk(re�Ze�yy)a�

         sorting_animation.py

A minimal sorting algorithm animation:
Sorts a shelf of 10 blocks using insertion
sort, selection sort and quicksort.

Shelves are implemented using builtin lists.

Blocks are turtles with shape "square", but
stretched to rectangles by shapesize()
 ---------------------------------------
       To exit press space button
 ---------------------------------------
�)�*Nc�$�eZdZd�Zd�Zd�Zd�Zy)�Blockc���||_tj|dd��|j�|j	|dzdd�|jd�|j
�y)N�squareF)�shape�visibleg�?��black)�size�Turtle�__init__�pu�	shapesize�	fillcolor�st)�selfrs  �3/usr/lib64/python3.12/turtledemo/sorting_animate.pyrzBlock.__init__sM����	�����H�e��<����	����t�c�z�3��*����w�����	�c�&�|jd�y)N�red�r�rs r�glowz
Block.glow s�����u�rc�&�|jd�y)Nrrrs r�unglowzBlock.unglow#s�����w�rc�8�dj|j�S)NzBlock size: {0})�formatrrs r�__repr__zBlock.__repr__&s�� �'�'��	�	�2�2rN)�__name__�
__module__�__qualname__rrrr�rrrrs���� �3rrc�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�Shelfc� �||_d|_y)z.create a shelf. y is y-position of first blockij���N)�y�x)rr's  rrzShelf.__init__,s�������rc���|j�\}}}|dzdz}|j|j|z�|j|jdt|�zz�|j
|�y)Nr
��")r�setyr'�setxr(�len�append)r�d�width�_�y_offsets     r�pushz
Shelf.push1s]���k�k�m���q�!��1�9�r�>��	���t�v�v�� �!�	���t�v�v��S��Y��&�'����A�rc�f�||dD])}|j�\}}|j|dz
��+y�Nr+��posr-�r�i�b�xposr2s     r�_close_gap_from_izShelf._close_gap_from_i9�1���a�b��A��e�e�g�G�D�!�
�F�F�4�"�9��rc�f�||dD])}|j�\}}|j|dz��+yr6r7r9s     r�_open_gap_from_izShelf._open_gap_from_i>r>rc��tj||�}|j�|jd�|j	|�|S)N��)�list�poprr,r=)r�keyr;s   rrDz	Shelf.popCs9���H�H�T�3���	����	���s�����s�#��rc�*�|j|�tj|||�|j|jd|zz�|j�\}}}|dzdz}|j
|j|z�|j�y)Nr+r
r*)	r@rC�insertr-r(rr,r'r)rrEr;r1r2r3s      rrGzShelf.insertJsu�����c�"����D�#�q�!�	���t�v�v��S�� �!��k�k�m���q�!��1�9�r�>��	���t�v�v�� �!�	���
rN)	r r!r"rr4r=r@rDrGr#rrr%r%*s ���
��
�
�rr%c�*�t|�}td|�D]y}|}|dkDrO||j||dz
jkr-|dz
}|dkDr#||j||dz
jkr�-|j||j	|���{y)N�r�r.�rangerrGrD)�shelf�lengthr:�holes    r�isortrOTs���
��Z�F�
�1�f�
�����Q�h�5��8�=�=�5����?�+?�+?�?��!�8�D��Q�h�5��8�=�=�5����?�+?�+?�?�
���T�5�9�9�Q�<�(�	�
rc��t|�}td|dz
�D]a}|}t|dz|�D]$}||j||jks�#|}�&||k7s�A|j||j	|���cy)NrrIrJ)rLrM�j�iminr:s     r�ssortrS]sx��
��Z�F�
�1�f�q�j�
!�����q�1�u�f�%�A��Q�x�}�}�u�T�{�/�/�/���&��1�9��L�L��E�I�I�d�O�,�
"rc�@�||}|j||j|��|}t||�D]E}||j|jks� |j||j|��|dz}�G|j||j|��|S�NrI)rGrDrKr)rL�left�right�pivot_index�pivot�store_indexr:s       r�	partitionr[gs����+��E�	�L�L���	�	�+�.�/��K�
�4��
����8�=�=�5�:�:�%��L�L��e�i�i��l�3�%��/�K� �
�L�L��e�i�i��.�/��rc�p�||kr1|}t||||�}t|||dz
�t||dz|�yyrU)r[�qsort)rLrVrWrX�pivot_new_indexs     rr]r]rsE���e�|���#�E�4���D��
�e�T�?�Q�.�/�
�e�_�q�(�%�0�	rc��t�t�ttd��}t	j
|�t
|�D]f\}}t|tt��D]E}t|j|dzk(s�tj|tj|���G�htt�ttd��t�y)N�
rI��line)�disable_keys�clearrCrK�random�shuffle�	enumerater.�srrGrD�	show_text�
instructions1�
instructions2�enable_keys)�targetr:�trQs    r�	randomizeroys����N�	�G�
�%��)�_�F�
�N�N�6���&�!���1��q�#�a�&�!�A���t�y�y�A��E�!�����A�E�E�!�H�%�"�"��m��
�m�!�$��Mrc�H�d|z}tdd|z
�t|dd��y)Nr*ri����center)�Courier��bold)�align�font)�goto�write)�textrbs  rriri�s&��
��9�D���4�$�;��	�$�h�%<�=rc���t�t�td�tt�t�tt
�ttd��t�y)NzSelection SortrIra)rcrdrirSrhrjrkrlr#rr�start_ssortr{��8���N�	�G�
���	�!�H�	�G�
�m��
�m�!�$��Mrc���t�t�td�tt�t�tt
�ttd��t�y)NzInsertion SortrIra)rcrdrirOrhrjrkrlr#rr�start_isortr~�r|rc���t�t�td�ttdtt�dz
�t�tt�ttd��t�y)N�	QuicksortrrIra)	rcrdrir]rhr.rjrkrlr#rr�start_qsortr��sD���N�	�G�
�k��	�!�Q��A���
��	�G�
�m��
�m�!�$��Mrc�h�td�ad}|D] }tjt|���"y)Ni8���)
�r
��	rI�r`���)r%rhr4r)�valsr:s  r�
init_shelfr��s*��
�d��A�*�D�
��	���u�Q�x��rc�d�tdd�tdd�tdd�tdd�y)Nrhr:�q�r)�onkeyr#rrrcrc�s*��	�$���	�$���	�$���	�$��rc��ttd�ttd�ttd�ttd�tt
d�y)Nr:rhr�r��space)r�r~r{r�ro�byer#rrrlrl�s4��	�+�s��	�+�s��	�+�s��	�)�S��	�#�w�rc���t�j�t�t�t	�tt�ttd��t�t�y)NrIra�	EVENTLOOP)
�	getscreen�clearscreen�ht�penupr�rirjrkrl�listenr#rr�mainr��s=��
�K�����D�%�'��L�
�m��
�m�!�$��M�
�H�rzApress i for insertion sort, s for selection sort, q for quicksortz spacebar to quit, r to randomize�__main__)r)�__doc__�turtlerer
rrCr%rOrSr[r]rorir{r~r�r�rcrlr�rjrkr �msg�mainloopr#rr�<module>r�s���� �
�3�F�3�((�D�(�T�-�	�1��>�
�������T�
�2�
��Z��
�&�C��J�r

Filemanager

Name Type Size Permission Actions
__init__.cpython-312.opt-1.pyc File 468 B 0644
__init__.cpython-312.opt-2.pyc File 146 B 0644
__init__.cpython-312.pyc File 468 B 0644
__main__.cpython-312.opt-1.pyc File 20.97 KB 0644
__main__.cpython-312.opt-2.pyc File 17.82 KB 0644
__main__.cpython-312.pyc File 20.97 KB 0644
bytedesign.cpython-312.opt-1.pyc File 8.01 KB 0644
bytedesign.cpython-312.opt-2.pyc File 7.54 KB 0644
bytedesign.cpython-312.pyc File 8.01 KB 0644
chaos.cpython-312.opt-1.pyc File 2.42 KB 0644
chaos.cpython-312.opt-2.pyc File 2.42 KB 0644
chaos.cpython-312.pyc File 2.42 KB 0644
clock.cpython-312.opt-1.pyc File 6.17 KB 0644
clock.cpython-312.opt-2.pyc File 5.94 KB 0644
clock.cpython-312.pyc File 6.17 KB 0644
colormixer.cpython-312.opt-1.pyc File 3.24 KB 0644
colormixer.cpython-312.opt-2.pyc File 3.24 KB 0644
colormixer.cpython-312.pyc File 3.24 KB 0644
forest.cpython-312.opt-1.pyc File 4.96 KB 0644
forest.cpython-312.opt-2.pyc File 4.65 KB 0644
forest.cpython-312.pyc File 4.96 KB 0644
fractalcurves.cpython-312.opt-1.pyc File 5.64 KB 0644
fractalcurves.cpython-312.opt-2.pyc File 5.34 KB 0644
fractalcurves.cpython-312.pyc File 5.64 KB 0644
lindenmayer.cpython-312.opt-1.pyc File 3.68 KB 0644
lindenmayer.cpython-312.opt-2.pyc File 3.18 KB 0644
lindenmayer.cpython-312.pyc File 3.68 KB 0644
minimal_hanoi.cpython-312.opt-1.pyc File 3.88 KB 0644
minimal_hanoi.cpython-312.opt-2.pyc File 3.3 KB 0644
minimal_hanoi.cpython-312.pyc File 3.88 KB 0644
nim.cpython-312.opt-1.pyc File 13.17 KB 0644
nim.cpython-312.opt-2.pyc File 12.97 KB 0644
nim.cpython-312.pyc File 13.17 KB 0644
paint.cpython-312.opt-1.pyc File 2.02 KB 0644
paint.cpython-312.opt-2.pyc File 1.4 KB 0644
paint.cpython-312.pyc File 2.02 KB 0644
peace.cpython-312.opt-1.pyc File 1.77 KB 0644
peace.cpython-312.opt-2.pyc File 1.55 KB 0644
peace.cpython-312.pyc File 1.77 KB 0644
penrose.cpython-312.opt-1.pyc File 7.03 KB 0644
penrose.cpython-312.opt-2.pyc File 6.63 KB 0644
penrose.cpython-312.pyc File 7.03 KB 0644
planet_and_moon.cpython-312.opt-1.pyc File 6.14 KB 0644
planet_and_moon.cpython-312.opt-2.pyc File 5.71 KB 0644
planet_and_moon.cpython-312.pyc File 6.14 KB 0644
rosette.cpython-312.opt-1.pyc File 2.75 KB 0644
rosette.cpython-312.opt-2.pyc File 2.42 KB 0644
rosette.cpython-312.pyc File 2.75 KB 0644
round_dance.cpython-312.opt-1.pyc File 2.75 KB 0644
round_dance.cpython-312.opt-2.pyc File 2.17 KB 0644
round_dance.cpython-312.pyc File 2.75 KB 0644
sorting_animate.cpython-312.opt-1.pyc File 10 KB 0644
sorting_animate.cpython-312.opt-2.pyc File 9.55 KB 0644
sorting_animate.cpython-312.pyc File 10 KB 0644
tree.cpython-312.opt-1.pyc File 2.47 KB 0644
tree.cpython-312.opt-2.pyc File 1.91 KB 0644
tree.cpython-312.pyc File 2.47 KB 0644
two_canvases.cpython-312.opt-1.pyc File 2.23 KB 0644
two_canvases.cpython-312.opt-2.pyc File 2.03 KB 0644
two_canvases.cpython-312.pyc File 2.23 KB 0644
yinyang.cpython-312.opt-1.pyc File 1.62 KB 0644
yinyang.cpython-312.opt-2.pyc File 1.44 KB 0644
yinyang.cpython-312.pyc File 1.62 KB 0644