403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/IPython/core/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/IPython/core/__pycache__/pylabtools.cpython-311.pyc
�

�@�c�5���dZddlmZddlmZddlmZddlZddlm	Z	ddl
mZidd	�d
d�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d �d!d!�d"d#�d$d$d%��Ze
ee���e�������Zd
xed&<ed'<ded(<ded)<ded*<ded+<ded<ded<ded<ed=ed=ed=ed =ed!=ed#=ed$=d,�Zd-�Zd;d1�Zd<d2�Zd3�Zd4�Zd5�Zd=d6�Zd7�Zd>d9�Zd:�ZdS)?z%Pylab (matplotlib) support utilities.�)�BytesIO)�
b2a_base64)�partialN)�_pngxy)�
flag_calls�tk�TkAgg�gtk�GTKAgg�gtk3�GTK3Agg�gtk4�GTK4Agg�wx�WXAgg�qt4�Qt4Agg�qt5�Qt5Agg�qt6�QtAgg�qt�osx�MacOSX�nbagg�nbAgg�notebook�agg�svg�pdf�ps�inlinez)module://matplotlib_inline.backend_inline�module://ipympl.backend_nbagg)�ipympl�widget�GTK�GTKCairo�	GTK3Cairo�	GTK4Cairo�WX�CocoaAggc��ddlm}|s |���}d�|D��Sg}|D]P}|j�|��}|�td|z���1|�|jj���Q|S)a�Get a list of matplotlib figures by figure numbers.

    If no arguments are given, all available figures are returned.  If the
    argument list contains references to invalid figures, a warning is printed
    but the function continues pasting further figures.

    Parameters
    ----------
    figs : tuple
        A tuple of ints giving the figure numbers of the figures to return.
    r)�Gcfc�&�g|]}|jj��S�)�canvas�figure)�.0�fms  �9/usr/lib/python3/dist-packages/IPython/core/pylabtools.py�
<listcomp>zgetfigs.<locals>.<listcomp>Ws��8�8�8�R��	� �8�8�8�Nz!Warning: figure %s not available.)	�matplotlib._pylab_helpersr-�get_all_fig_managers�figs�get�print�appendr0r1)�fig_numsr-�fig_managersr9�num�fs      r4�getfigsrAHs���.�-�-�-�-�-����/�/�1�1��8�8�<�8�8�8�8����	-�	-�C�����S�!�!�A��y��9�C�?�@�@�@�@����A�H�O�,�,�,�,��r6c�&�ddl}||g|jd<dS)z�Set the default figure size to be [sizex, sizey].

    This is just an easy to remember, convenience wrapper that sets::

      matplotlib.rcParams['figure.figsize'] = [sizex, sizey]
    rNzfigure.figsize)�
matplotlib�rcParams)�sizex�sizeyrCs   r4�figsizerGcs(������-2�E�N�J��(�)�)�)r6�png�tightFc���|js	|jsdS|j}|dkr|dz}d}||���|���||d�}|�|��t
��}|j�ddlm	}||��|jj
|fi|��|���}	|dkr|	�d	��}	n$|r"t|	���d
��}	|	S)a�Print a figure to an image, and return the resulting file data

    Returned data will be bytes unless ``fmt='svg'``,
    in which case it will be unicode.

    Any keyword args are passed to fig.canvas.print_figure,
    such as ``quality`` or ``bbox_inches``.

    If `base64` is True, return base64-encoded str instead of raw bytes
    for binary-encoded image formats

    .. versionadded:: 7.29
        base64 argument
    N�retina�rH)�format�	facecolor�	edgecolor�dpi�bbox_inchesr)�FigureCanvasBaserzutf-8�ascii)�axes�linesrP�
get_facecolor�
get_edgecolor�updaterr0�matplotlib.backend_basesrR�print_figure�getvalue�decoder)
�fig�fmtrQ�base64�kwargsrP�kw�bytes_iorR�datas
          r4rZrZns)��"�8��C�I����

�'�C�
�h����A�g������%�%�'�'��%�%�'�'��!�
�
�B��I�I�f�����y�y�H�
�z��=�=�=�=�=�=��������C�J��H�+�+��+�+�+������D�
�e�|�|��{�{�7�#�#���	�0��$���&�&�w�/�/���Kr6c��t|fddd�|��}|�dSt|��\}}|dz|dzd�}|r"t|���d��}||fS)z�format a figure as a pixel-doubled (retina) PNG

    If `base64` is True, return base64-encoded str instead of raw bytes
    for binary-encoded image formats

    .. versionadded:: 7.29
        base64 argument
    rKF�r^r_NrL)�width�heightrS)rZrrr\)r]r_r`�pngdata�w�h�metadatas       r4�
retina_figurerl�s~���3�E�H�U�E�E�f�E�E�G������'�?�?�D�A�q��A���1��-�-�H�
�6��W�%�%�,�,�W�5�5���H��r6c����fd�}|S)a\Factory to return a matplotlib-enabled runner for %run.

    Parameters
    ----------
    safe_execfile : function
        This must be a function with the same interface as the
        :meth:`safe_execfile` method of IPython.

    Returns
    -------
    A function suitable for use as the ``runner`` argument of the %run magic
    function.
    c�@��ddl}ddlm}|jd}|�d���|g|�Ri|��|�|��|jjr |���d|j_	|j}|��dS#t$rYdSwxYw)z�matplotlib-aware wrapper around safe_execfile.

        Its interface is identical to that of the :func:`execfile` builtin.

        This is ultimately a call to execfile(), but wrapped in safeties to
        properly handle interactive rendering.rN�interactiveF)
rC�matplotlib.pyplot�pyplotrDro�draw_if_interactive�called�draw�draw_all�AttributeError)�fname�whererarC�plt�is_interactive�da�
safe_execfiles       �r4�mpl_execfilez mpl_runner.<locals>.mpl_execfile�s����	����'�'�'�'�'�'�$�,�]�;�����u�%�%�%��
�e�(�U�(�(�(�R�(�(�(����~�.�.�.��"�)�	3��H�H�J�J�J�-2�C�#�*�	���B�
�B�D�D�D�D�D���	�	�	��D�D�	���s�<B�
B�Br/)r|r}s` r4�
mpl_runnerr~�s$��������<�r6c��	|jjj}|��dS#t$r}t	��|�d}~wwxYw)zreshow an nbagg figureN)r0�manager�reshowrv�NotImplementedError)r]r��es   r4�_reshow_nbagg_figurer��sT�����#�*��	���������+�+�+�!�#�#��*�����+���s��
=�8�=c	���ddl}ddlm�|jjd}|jjd}|jjd}|jjd}t|t��r|h}t|��}�fd�|jj���D��|�	���
��}|d	ks|d
kr'|jj}	|	��t��hd�}
|�|
��}|rYdd
�d�|D����z}dd
�d�|
D����z}
t!d|
�d|�����d|vr)|��t#t$fddd�|����d|vsd|vr(|��t#t&fddi|����d|vsd|vr)|��t#t$fddd�|����d|vr(|��t#t$fddi|����d|vr+|��t#t$fddd�|����dSdS)a_Select figure formats for the inline backend.

    Parameters
    ----------
    shell : InteractiveShell
        The main IPython instance.
    formats : str or set
        One or a set of figure formats to enable: 'png', 'retina', 'jpeg', 'svg', 'pdf'.
    **kwargs : any
        Extra keyword arguments to be passed to fig.canvas.print_figure.
    rN)�Figurez
image/svg+xmlz	image/pngz
image/jpegzapplication/pdfc�<��g|]}|��d����S)N)�pop)r2r@r�s  �r4r5z)select_figure_formats.<locals>.<listcomp>	s'���P�P�P�a�a�e�e�F�D���P�P�Pr6rr#>�jpgr rHr�jpeg�png2xrKz%s�,c�,�g|]}t|����Sr/��repr�r2r@s  r4r5z)select_figure_formats.<locals>.<listcomp>s��3�3�3�!�d�1�g�g�3�3�3r6c�,�g|]}t|����Sr/r�r�s  r4r5z)select_figure_formats.<locals>.<listcomp>s��9�9�9�!�d�1�g�g�9�9�9r6zsupported formats are: z not rHTrerKr�r_r�r�rr^r )rC�matplotlib.figurer��display_formatter�
formatters�
isinstance�str�set�values�get_backend�lower�ipython_display_formatter�for_typer��
difference�join�
ValueErrorrrZrl)�shell�formatsr`rC�
svg_formatter�
png_formatter�
jpg_formatter�
pdf_formatter�
mplbackend�	formatter�	supported�bad�bs�gsr�s              @r4�select_figure_formatsr��s��������(�(�(�(�(�(��+�6��G�M��+�6�{�C�M��+�6�|�D�M��+�6�7H�I�M��'�3�����)���'�l�l�G�P�P�P�P�5�#:�#E�#L�#L�#N�#N�P�P�P�P��'�'�)�)�/�/�1�1�J��W���
�.M� M� M��+�E�	����6�#7�8�8�8�G�G�G�I�
�
�
�Y�
'�
'�C�
�H�
�C�H�H�3�3�s�3�3�3�4�4�
4��
�C�H�H�9�9�y�9�9�9�:�:�
:���j�r�r�r�2�2�F�G�G�G���������G�L�K�e�D�K�K�F�K�K�	
�	
�	
��7���g��0�0����v�w�}�'T�'T�T�'T�V�'T�'T�U�U�U�����6�W�,�,�����G�L�K�e�D�K�K�F�K�K�	
�	
�	
�
�������v�w�|�'Q�'Q��'Q�&�'Q�'Q�R�R�R���������G�L�K�e�D�K�K�F�K�K�	
�	
�	
�	
�	
��r6c���ddl}|r|dkrt|}|dkrd}n?|jd}t�|d��}|r||kr|}t|}||fS)a�Given a gui string return the gui and mpl backend.

    Parameters
    ----------
    gui : str
        Can be one of ('tk','gtk','wx','qt','qt4','inline','agg').
    gui_select : str
        Can be one of ('tk','gtk','wx','qt','qt4','inline').
        This is any gui already selected by the shell.

    Returns
    -------
    A tuple of (gui, backend) where backend is one of ('TkAgg','GTKAgg',
    'WXAgg','Qt4Agg','module://matplotlib_inline.backend_inline','agg').
    rN�autor�backend)rC�backends�rcParamsOrig�backend2guir:)�gui�
gui_selectrCr�s    r4�find_gui_and_backendr�,s���"����
�$�s�f�}�}��3�-���%�<�<��C���)�)�4���o�o�g�t�,�,���	$�#��+�+��C��s�m�G���<�r6c���ddl}|�d��||jd<ddlm}|�|��d|j_t|j��|_dS)z7Activate the given backend and set interactive to True.rNTr�)rqF)	rCrorDrq�switch_backend�show�	_needmainrrr)r�rCrys   r4�activate_matplotlibr�Ws����������4� � � �
&-�J��	�"�
)�(�(�(�(�(����w�����C�H��)��)@�A�A�C���r6Tc��d}t||��|rd}t||��t|d<ddlm}||d<t|d<dS)	z�Populate the namespace with pylab-related values.

    Imports matplotlib, pylab, numpy, and everything from pylab and numpy.

    Also imports a few names from IPython (figsize, display, getfigs)

    zbimport numpy
import matplotlib
from matplotlib import pylab, mlab, pyplot
np = numpy
plt = pyplot
z3from matplotlib.pylab import *
from numpy import *
rGr)�displayr�rAN)�execrG�IPython.displayr�rA)�user_ns�
import_all�sr�s    r4�import_pylabr�osr��
�A�	��G������%���Q�����!�G�I��'�'�'�'�'�'� �G�I�� �G�I���r6c�b�tjdtd���ddlm}|||��dS)a

    .. deprecated:: 7.23

        use `matplotlib_inline.backend_inline.configure_inline_support()`

    Configure an IPython shell object for matplotlib use.

    Parameters
    ----------
    shell : InteractiveShell instance
    backend : matplotlib backend
    z�`configure_inline_support` is deprecated since IPython 7.23, directly use `matplotlib_inline.backend_inline.configure_inline_support()`rL)�
stacklevelr)�configure_inline_supportN)�warnings�warn�DeprecationWarning� matplotlib_inline.backend_inliner�)r�r��configure_inline_support_origs   r4r�r��sb��
�M�	L���	����������"�!�%��1�1�1�1�1r6)rHrIF)F)NN)T)�__doc__�ior�binasciir�	functoolsrr��IPython.core.displayr�IPython.utils.decoratorsrr��dict�zipr��keysr�rArGrZrlr~r�r�r�r�r�r�r/r6r4�<module>r�s���+�+�
����������������������'�'�'�'�'�'�/�/�/�/�/�/���'��	�8���I���I�	�
	�'��
�8�
�
�8��
�7��	�(��
�8���W�����
�5��
�5��
�5�� 	�$�!�"
�9�#�$.�-�'����4�d�3�3�x���(�(�(�-�-�/�/�:�:�;�;��05�4��E��[��,�!��K��!��K����D����J����G����H����H������������������;�<��/�0����6;�;�;�/�/�/�/�b����.-�-�-�`���5
�5
�5
�x(�(�(�(�VB�B�B�0!�!�!�!�B2�2�2�2�2r6

Youez - 2016 - github.com/yon3zu
LinuXploit