403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.52
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/IPython/utils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/IPython/utils/__pycache__/sysinfo.cpython-312.pyc
�

}�e
���dZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZmZde
dee
e
ffd�Zde
defd	�Zdefd
�Zd�Zd�Zy)
zQ
Utilities for getting information about IPython and the system it's running in.
�N)�Path)�release)�_sysinfo�encoding�pkg_path�returnc�<�tjrdtjfStjdj	d�tj
tj
|��}|j
�\}}|r!d|j�jd�fSy)a"Get short form of commit hash given directory `pkg_path`

    We get the commit hash from (in order of preference):

    * IPython.utils._sysinfo.commit
    * git output, if we are in a git repository

    If these fail, we return a not-found placeholder tuple

    Parameters
    ----------
    pkg_path : str
        directory containing package
        only used for getting commit from active repo

    Returns
    -------
    hash_from : str
        Where we got the hash from - description
    hash_str : str
        short form of hash
    �installationzgit rev-parse --short HEAD� )�stdout�stderr�cwd�
repository�ascii)z(none found)z<not found>)	r�commit�
subprocess�Popen�split�PIPE�communicate�strip�decode)r�proc�repo_commit�_s    �7/usr/lib/python3/dist-packages/IPython/utils/sysinfo.py�pkg_commit_hashr s���0����x���.�.����8�>�>�s�C�#-�?�?�#-�?�?� (�*�D��%�%�'�N�K����[�.�.�0�7�7��@�@�@�(�c��t|�\}}ttj|||tjtj
tjt
j�tjtj��
S)z�Return dict describing the context of this package

    Parameters
    ----------
    pkg_path : str
        path containing __init__.py for package

    Returns
    -------
    context : dict
        with named parameters of interest
    )
�ipython_version�ipython_path�
commit_source�commit_hash�sys_version�sys_executable�sys_platform�platform�os_name�default_encoding)r�dictr�version�sys�
executabler'�os�namer�DEFAULT_ENCODING)r�src�hshs   r�pkg_infor3Fs`���x�(�H�C����������K�K��~�~��\�\��"�"�$����!�2�2�
�
rc�z�ttd�j�j}t	t|��S)zBReturn useful information about IPython and the system, as a dict.z..)r�__file__�resolve�parentr3�str)�paths r�get_sys_infor:as,����$��'�'�)�0�0�D��C��I��rc�<�tjt��S)auReturn useful information about IPython and the system, as a string.

    Examples
    --------
    ::
    
        In [2]: print(sys_info())
        {'commit_hash': '144fdae',      # random
         'commit_source': 'repository',
         'ipython_path': '/home/fperez/usr/lib/python2.6/site-packages/IPython',
         'ipython_version': '0.11.dev',
         'os_name': 'posix',
         'platform': 'Linux-2.6.35-22-generic-i686-with-Ubuntu-10.10-maverick',
         'sys_executable': '/usr/bin/python',
         'sys_platform': 'linux2',
         'sys_version': '2.6.6 (r266:84292, Sep 15 2010, 15:52:39) \n[GCC 4.4.5]'}
    )�pprint�pformatr:�rr�sys_infor?fs��$�>�>�,�.�)�)rc�j�ddl}|jdtd��tj�xsdS)a�DEPRECATED

    Return the effective number of CPUs in the system as an integer.

    This cross-platform function makes an attempt at finding the total number of
    available CPUs in the system, as returned by various underlying system and
    python calls.

    If it can't find a sensible answer, it returns 1 (though an error *may* make
    it return a large positive number that's actually incorrect).
    rNzG`num_cpus` is deprecated since IPython 8.0. Use `os.cpu_count` instead.�)�
stacklevel�)�warnings�warn�DeprecationWarningr.�	cpu_count)rDs r�num_cpusrH{s4����M�M�Q������<�<�>��Q�r)�__doc__r.r'r<r,r�pathlibr�IPython.corer�
IPython.utilsrrr8�tuplerr*r3r:r?rHr>rr�<module>rNsi���
��
�
��� �,�#)�c�#)�e�C��H�o�#)�L
�s�
�t�
�6�d��
*�*r

Youez - 2016 - github.com/yon3zu
LinuXploit