403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.217.120
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/matplotlib/backends/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/matplotlib/backends/__pycache__/backend_nbagg.cpython-312.pyc
�

G8�c-��D�dZddlmZddlZddlZddlZddlZddlmZddl	m
Z
mZmZddl
mZddlmZddlmZmZd	d
lmZmZmZd	dlmZmZd�Zd
ddddddd�ZGd�de�ZGd�de�ZGd�de�ZGd�d�Zej@Gd�de��Z!y)z,Interactive figures in the IPython notebook.�)�	b64encodeN)�Comm)�display�
Javascript�HTML)�is_interactive��Gcf)�_Backend�NavigationToolbar2�)�FigureCanvasWebAggCore�FigureManagerWebAgg�NavigationToolbar2WebAgg)�TimerTornado�TimerAsyncioc��tj�D�cgc]^}dj|jjj�xsdj|j�|j����`}}t�s+|jdttj����dj|�Scc}w)z�
    Return a string showing the figure and connection status for the backend.

    This is intended as a diagnostic tool, and not for general use.
    z{fig} - {socket}z	Figure {})�fig�socketzFigures pending show: �
)
r
�get_all_fig_managers�format�canvas�figure�	get_label�num�web_socketsr�append�len�figs�join)�manager�results  �C/usr/lib/python3/dist-packages/matplotlib/backends/backend_nbagg.py�connection_infor%s����/�/�1��

�		�!�!����&�&�0�0�2�4��&�&�w�{�{�3��&�&�	"�	(��F�����
�
�.�s�3�8�8�}�o�>�?��9�9�V����s�A#Cz
fa fa-homezfa fa-arrow-leftzfa fa-arrow-rightzfa fa-square-ozfa fa-arrowszfa fa-floppy-o)�home�back�forward�zoom_to_rect�move�downloadNc��eZdZejdzD������cgc]\}}}}|t
vr
||t
||f��c}}}}}}Zycc}}}}}}w)�
NavigationIPy))�Downloadz
Download plotr+r+N)�__name__�
__module__�__qualname__r�	toolitems�_FONT_AWESOME_CLASSES)�.0�text�tooltip_text�
image_file�name_of_methodr3s000000r$r-r-5sZ��(�1�1�M�N�9�9�C�T�<��^��"7�7���'�
�3�^�E�9�I��9s�!Ar-c���eZdZexZZ�fd�Zed��Zd�Z	d�Z
d�Zed��Z
ed�fd�	�Zd�Zd	�Zd
�Zd�Z�xZS)
�FigureManagerNbAggc�4��d|_t�|�	||�y)NF)�_shown�super�__init__)�selfrr�	__class__s   �r$r>zFigureManagerNbAgg.__init__Cs������
�����%�c�����||��|�|��t�r �j��j����fd�}�jd|���S)Nc�R���j��tj��y�N)�mpl_disconnectr
�destroy)�eventr�cidr"s ���r$rFz6FigureManagerNbAgg.create_with_canvas.<locals>.destroyOs����!�!�#�&��K�K�� rA�close_event)r�show�	draw_idle�mpl_connect)�cls�canvas_classrrrFrrHr"s     @@@r$�create_with_canvasz%FigureManagerNbAgg.create_with_canvasGsR����f�%���f�c�"�����L�L�N�����	!�� � ���8���rAc�P�tttj���yrD)rrr:�get_javascript�r?s r$�
display_jszFigureManagerNbAgg.display_jsVs��	�
�-�<�<�>�?�@rAc�p�|js!|j�|j�n|jj	�d|_t|d�r%|jj
|j�t�s-ddl	m
}|jj|jd�yy)NT�_cidgcfrr	)r<rS�_create_commrrK�hasattrrErUr�matplotlib._pylab_helpersr
r �popr)r?r
s  r$rJzFigureManagerNbAgg.show\s|���{�{��O�O�������K�K�!�!�#����
�4��#��K�K�&�&�t�|�|�4���5��H�H�L�L����4�(� rAc�2�d|_|j�y)zJ
        A special method to re-show the figure in the notebook.

        FN)r<rJrRs r$�reshowzFigureManagerNbAgg.reshowms��
����	�	�rAc�,�t|j�SrD)�boolrrRs r$�	connectedzFigureManagerNbAgg.connectedus���D�$�$�%�%rAc���|�tj�}n|}t�|�
|��|j	tjt�jdzjd���|�|j�Sy)N)�streamzweb_backend/js/nbagg_mpl.jszutf-8)�encoding)�io�StringIOr=rQ�write�pathlib�Path�__file__�parent�	read_text�getvalue)rMr`�outputr@s   �r$rQz!FigureManagerNbAgg.get_javascriptysr����>��[�[�]�F��F�
���f��-����g�l�l�8�,�3�3�5�6��i��i�1�	3��>��?�?�$�$�rAc�>�t|�}|j|�|SrD)�
CommSocket�add_web_socket�r?�comms  r$rVzFigureManagerNbAgg._create_comm�s���$������D�!��rAc��|jd�t|j�D]}|j��|j	�y)N�close)�_send_event�listr�on_close�clearup_closedros  r$rFzFigureManagerNbAgg.destroy�s?������!���)�)�*�	�D��M�M�O�	����rAc���|jD�chc]}|j�r|��c}|_t|j�dk(r|jj	�yycc}w)zClear up any closed Comms.rN)r�is_openrrrI)r?rs  r$rvz!FigureManagerNbAgg.clearup_closed�s[��15�1A�1A�1�v�%�~�~�/�#�1����t��� �A�%��K�K�#�#�%�&��1s�A$c�~�|jD�chc]}|jj|k7r|��c}|_ycc}wrD)rrp�comm_id)r?rzrs   r$�remove_commzFigureManagerNbAgg.remove_comm�s9��15�1A�1A�?�v�%�{�{�2�2�g�=�#�?����?s�":rD)r/r0r1r-�_toolbar2_class�
ToolbarClsr>�classmethodrOrSrJr[�propertyr^rQrVrFrvr{�
__classcell__)r@s@r$r:r:@sr���#0�0�O�j�&�����A�)�"��&��&��
%��
%��
�&�?rAr:c��eZdZeZy)�FigureCanvasNbAggN)r/r0r1r:�
manager_class�rAr$r�r��s��&�MrAr�c�4�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	y)	rmaL
    Manages the Comm connection between IPython and the browser (client).

    Comms are 2 way, with the CommSocket being able to publish a message
    via the send_json method, and handle a message with on_message. On the
    JS side figure.send_message and figure.ws.onmessage do the sending and
    receiving respectively.

    c�����d�_��_ttj���_tt
d�jz��	tdd�ji���_�jj�j��j�d�_
��fd�}�jj|�y#t$r}td�|�d}~wwxYw)Nz<div id=%r></div>�
matplotlib�id)�datazTUnable to create an IPython notebook Comm instance. Are you in the IPython notebook?Fc�b��d�_�j|dd��j�y)NT�contentrz)�
_ext_closer{rv)�
close_messager"r?s ��r$�	_on_closez&CommSocket.__init__.<locals>._on_close�s.���"�D�O����
�i� 8�� C�D��"�"�$rA)�supports_binaryr"�str�uuid�uuid4rrrrp�AttributeError�RuntimeError�on_msg�
on_messager�ru)r?r"�errr�s``  r$r>zCommSocket.__init__�s����#��������
�
��%��	�	��(�4�9�9�4�5�6�	5��\��t�y�y�0A�B�D�I�
	
�	�	������)��,�,�����	%�
	
�	�	���9�%���	5�� +�,�14�
5��	5�s�C
�
	C'�C"�"C'c�L�|jxs|jjSrD)r�rp�_closedrRs r$rxzCommSocket.is_open�s���O�O�8�t�y�y�'8�'8�9�9rAc�z�|j�r	|jj�yy#t$rYywxYwrD)rxrprr�KeyErrorrRs r$ruzCommSocket.on_close�s9���<�<�>�
��	�	���!����
��
�s�.�	:�:c�d�|jjdtj|�i�y)Nr�)rp�send�json�dumps)r?r�s  r$�	send_jsonzCommSocket.send_json�s ���	�	�����
�
�7� 3�4�5rAc���|jr!|jjddi|g��yt|�j	d�}dj|�}|jjd|i�y)N�blobz	image/png)�buffers�asciizdata:image/png;base64,{0}r�)r�rpr�r�decoder)r?r�r��data_uris    r$�send_binaryzCommSocket.send_binary�sa������I�I�N�N�F�K�0�4�&�N�A��T�?�)�)�'�2�D�2�9�9�$�?�H��I�I�N�N�F�H�-�.rAc��tj|dd�}|ddk(r+|j�|jj	�y|ddk(r|d|_y|jj
|�y)Nr�r��type�closingr��value)r��loadsrur"rvr��handle_json)r?�messages  r$r�zCommSocket.on_message�sm���*�*�W�Y�/��7�8���6�?�i�'��M�M�O��L�L�'�'�)�
�V�_� 1�
1�#*�7�#3�D� ��L�L�$�$�W�-rAN)
r/r0r1�__doc__r>rxrur�r�r�r�rAr$rmrm�s%���&�2:��6�/�
.rArmc��eZdZeZeZy)�
_BackendNbAggN)r/r0r1r��FigureCanvasr:�
FigureManagerr�rAr$r�r��s��$�L�&�MrAr�)"r��base64rrbr�rer��ipykernel.commr�IPython.displayrrrr�rrXr
�matplotlib.backend_basesrr�backend_webagg_corerrrrrr%r3r-r:r�rm�exportr�r�rAr$�<module>r�s���2�
�	�����5�5�%�)�A�K�K� ��&
��"�$�� �
���9�,�9�\?�,�\?�~'�.�'�J.�J.�Z
���'�H�'��'rA

Youez - 2016 - github.com/yon3zu
LinuXploit