Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.217.80
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
compose /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2024-07-10 10:57
cli
[ DIR ]
drwxr-xr-x
2024-07-10 10:57
config
[ DIR ]
drwxr-xr-x
2024-07-10 10:57
metrics
[ DIR ]
drwxr-xr-x
2024-07-10 10:57
__init__.py
23
B
-rw-r--r--
2021-05-10 10:30
__main__.py
42
B
-rw-r--r--
2021-05-10 10:30
const.py
1.25
KB
-rw-r--r--
2021-05-10 10:30
container.py
9.13
KB
-rw-r--r--
2021-05-10 10:30
errors.py
909
B
-rw-r--r--
2021-05-10 10:30
network.py
11.46
KB
-rw-r--r--
2021-05-10 10:30
parallel.py
11.29
KB
-rw-r--r--
2021-05-10 10:30
progress_stream.py
3.49
KB
-rw-r--r--
2021-05-10 10:30
project.py
41.37
KB
-rw-r--r--
2021-05-10 10:30
service.py
67.91
KB
-rw-r--r--
2021-05-10 10:30
timeparse.py
2.71
KB
-rw-r--r--
2021-05-10 10:30
utils.py
5.01
KB
-rw-r--r--
2021-05-10 10:30
version.py
177
B
-rw-r--r--
2021-05-10 10:30
volume.py
7.21
KB
-rw-r--r--
2021-05-10 10:30
Save
Rename
#!/usr/bin/env python ''' timeparse.py (c) Will Roberts <wildwilhelm@gmail.com> 1 February, 2014 This is a vendored and modified copy of: github.com/wroberts/pytimeparse @ cc0550d It has been modified to mimic the behaviour of https://golang.org/pkg/time/#ParseDuration ''' # MIT LICENSE # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, merge, # publish, distribute, sublicense, and/or sell copies of the Software, # and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. import re HOURS = r'(?P<hours>[\d.]+)h' MINS = r'(?P<mins>[\d.]+)m' SECS = r'(?P<secs>[\d.]+)s' MILLI = r'(?P<milli>[\d.]+)ms' MICRO = r'(?P<micro>[\d.]+)(?:us|µs)' NANO = r'(?P<nano>[\d.]+)ns' def opt(x): return r'(?:{x})?'.format(x=x) TIMEFORMAT = r'{HOURS}{MINS}{SECS}{MILLI}{MICRO}{NANO}'.format( HOURS=opt(HOURS), MINS=opt(MINS), SECS=opt(SECS), MILLI=opt(MILLI), MICRO=opt(MICRO), NANO=opt(NANO), ) MULTIPLIERS = { 'hours': 60 * 60, 'mins': 60, 'secs': 1, 'milli': 1.0 / 1000, 'micro': 1.0 / 1000.0 / 1000, 'nano': 1.0 / 1000.0 / 1000.0 / 1000.0, } def timeparse(sval): """Parse a time expression, returning it as a number of seconds. If possible, the return value will be an `int`; if this is not possible, the return will be a `float`. Returns `None` if a time expression cannot be parsed from the given string. Arguments: - `sval`: the string value to parse >>> timeparse('1m24s') 84 >>> timeparse('1.2 minutes') 72 >>> timeparse('1.2 seconds') 1.2 """ match = re.match(r'\s*' + TIMEFORMAT + r'\s*$', sval, re.I) if not match or not match.group(0).strip(): return mdict = match.groupdict() return sum( MULTIPLIERS[k] * cast(v) for (k, v) in mdict.items() if v is not None) def cast(value): return int(value) if value.isdigit() else float(value)