X7ROOT File Manager
Current Path:
/usr/lib/python3.6/site-packages/tuned/profiles/functions
usr
/
lib
/
python3.6
/
site-packages
/
tuned
/
profiles
/
functions
/
📁
..
📄
__init__.py
(35 B)
📁
__pycache__
📄
base.py
(1.02 KB)
📄
function_assertion.py
(767 B)
📄
function_assertion_non_equal.py
(811 B)
📄
function_calc_isolated_cores.py
(1.6 KB)
📄
function_check_net_queue_count.py
(650 B)
📄
function_cpuinfo_check.py
(1011 B)
📄
function_cpulist2devs.py
(460 B)
📄
function_cpulist2hex.py
(470 B)
📄
function_cpulist2hex_invert.py
(624 B)
📄
function_cpulist_invert.py
(659 B)
📄
function_cpulist_online.py
(651 B)
📄
function_cpulist_pack.py
(637 B)
📄
function_cpulist_present.py
(691 B)
📄
function_cpulist_unpack.py
(511 B)
📄
function_exec.py
(487 B)
📄
function_hex2cpulist.py
(472 B)
📄
function_kb2s.py
(405 B)
📄
function_regex_search_ternary.py
(554 B)
📄
function_s2kb.py
(417 B)
📄
function_strip.py
(406 B)
📄
function_virt_check.py
(595 B)
📄
functions.py
(2.1 KB)
📄
repository.py
(1.25 KB)
Editing: function_regex_search_ternary.py
import re from . import base class regex_search_ternary(base.Function): """ Ternary regex operator, it takes arguments in the following form STR1, REGEX, STR2, STR3 If REGEX matches STR1 (re.search is used), STR2 is returned, otherwise STR3 is returned """ def __init__(self): # 4 arguments super(regex_search_ternary, self).__init__("regex_search_ternary", 4, 4) def execute(self, args): if not super(regex_search_ternary, self).execute(args): return None if re.search(args[1], args[0]): return args[2] else: return args[3]
Upload File
Create Folder