Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, states, initial='A'):
self.state = None
Machine.__init__(self, states=states, initial=initial)
'after': 'parse_using_delimiter'},
{'trigger': 'regex_with_item', 'source': ['start', 'regex_data'],
'dest': 'regex_data', 'after': 'parse_using_item_and_regex'},
{'trigger': 'regex_parser', 'source': 'start',
'dest': 'regex_data', 'after': 'parse_using_regex'},
{'trigger': 'regex_parser', 'source': 'regex_data',
'dest': 'regex_data', 'after': 'parse_using_regex'},
{'trigger': 'regex_parser', 'source': 'row_column',
'dest': 'regex_data', 'after': 'parse_using_regex'},
{'trigger': 'exists_check', 'source': ['start', 'regex_data',
'row_column'],
'dest': 'exists_bool_data', 'after': 'parse_exists'},
{'trigger': 'exists_check', 'source': 'title_data',
'dest': 'exists_bool_data', 'after': 'parse_exists'},
]
Machine.__init__(self, states=self.states, transitions=self.transitions,
initial='start', send_event=True)
def __init__(self, composite_solver):
Machine.__init__(self, states=states,
transitions=transitions, initial=START)
self.comp_slvr = slvr = composite_solver
self.sub_time_diff = np.array([s.ntime for s in slvr.solvers])
self.sub_time_end = np.cumsum(self.sub_time_diff)
self.sub_time_begin = self.sub_time_end - self.sub_time_diff
self.X2_gpu_arys = [None for s in slvr.solvers]
with slvr.context:
for subslvr in slvr.solvers:
subslvr.X2_tmp = slvr.pinned_mem_pool.allocate(
shape=slvr.X2_shape, dtype=slvr.X2_dtype)