/usr/lib/python3.9/site-packages/tuned/profiles/functions
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]
.
Edit
..
Edit
__init__.py
Edit
__pycache__
Edit
base.py
Edit
function_assertion.py
Edit
function_assertion_non_equal.py
Edit
function_calc_isolated_cores.py
Edit
function_check_net_queue_count.py
Edit
function_cpuinfo_check.py
Edit
function_cpulist2devs.py
Edit
function_cpulist2hex.py
Edit
function_cpulist2hex_invert.py
Edit
function_cpulist_invert.py
Edit
function_cpulist_online.py
Edit
function_cpulist_pack.py
Edit
function_cpulist_present.py
Edit
function_cpulist_unpack.py
Edit
function_exec.py
Edit
function_hex2cpulist.py
Edit
function_intel_recommended_pstate.py
Edit
function_kb2s.py
Edit
function_log.py
Edit
function_lscpu_check.py
Edit
function_package2cpus.py
Edit
function_package2uncores.py
Edit
function_regex_search_ternary.py
Edit
function_s2kb.py
Edit
function_strip.py
Edit
function_virt_check.py
Edit
parser.py
Edit
repository.py
Edit