403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.222.226.15
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python37/lib/python3.7/site-packages/paste/util/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python37/lib/python3.7/site-packages/paste/util/__pycache__/dateinterval.cpython-37.pyc
B

b�Nn	�@s�dZddlZddgZdZedZedZedZedZed	Zed
Z	e	eeeeeed�Z
e
��Ze�
dd
��ddd�Ze�d�Zdd�Zdd�Zedkr�ddlZe��dS)a
DateInterval.py

Convert interval strings (in the form of 1w2d, etc) to
seconds, and back again.  Is not exactly about months or
years (leap years in particular).

Accepts (y)ear, (b)month, (w)eek, (d)ay, (h)our, (m)inute, (s)econd.

Exports only timeEncode and timeDecode functions.  
�N�interval_decode�interval_encode��<���im)�y�b�w�d�h�m�scCst|d|d�S)Nr)�cmp)�ar
�r�H/opt/alt/python37/lib/python3.7/site-packages/paste/util/dateinterval.py�<lambda>"�rFcCsrd}|}t|�}x6tD].\}}||krt||�\}}|d||f7}qW|dkrZd|}n|sbdS|rnd|}|S)z�Encodes a number of seconds (representing a time interval)
    into a form like 1h2d3s.

    >>> interval_encode(10)
    '10s'
    >>> interval_encode(493939)
    '5d17h12m19s'
    �z%i%sr�-�0�+)�abs�timeOrdered�divmod)�secondsZinclude_signr�orig�char�amount�irrrr$s	
z[0-9]+[a-zA-Z]cCs�d}d}|��}|�d�r,|dd�}d}n|�d�rB|dd�}xRt|t�D]D}|�d�d��}t�|�spqN|t|�d�dd��t|7}qNW|S)z�Decodes a number in the format 1h4d3m (1 hour, 3 days, 3 minutes)
    into a number of seconds

    >>> interval_decode('40s')
    40
    >>> interval_decode('10000s')
    10000
    >>> interval_decode('3d1w45s')
    864045
    rrrN���r)	�strip�
startswith�
allMatches�_timeRE�group�lower�
timeValuesZhas_key�int)r�time�sign�matchrrrrr=s


&cCsDd}t|�}g}|�||�}x"|r>|�|�|�||���}qW|S)z1Return a list of matches for regex in source
    r)�len�search�append�end)�source�regex�posr1�rvr-rrrr%Ys
r%�__main__)F)�__doc__�re�__all__�second�minute�hour�day�week�month�yearr)�itemsr�sortr�compiler&rr%�__name__ZdoctestZtestmodrrrr�<module>s2



Youez - 2016 - github.com/yon3zu
LinuXploit