code stringlengths 3 6.57k |
|---|
tempname() |
tempfile.mkstemp() |
os.close(handle) |
test(unittest.TestCase) |
setUpClass(cls) |
os.path.abspath(__file__) |
os.path.dirname(os.path.abspath(__file__) |
sys.path.append(os.path.dirname(os.path.dirname(cls.script_path) |
random.seed() |
test_compilation(self) |
compile(self.script_path) |
self.assertTrue(compiled_path) |
unittest.skipIf(sys.platform.startswith('win') |
test_basic_logging(self) |
unittest.mock.Mock(side_effect = lambda fmt, time=0:fmt) |
tempname() |
agutil.src.logger.Logger(output_file, loglevel=agutil.src.logger.Logger.LOGLEVEL_DETAIL) |
log.log("Test message") |
log.log("More messages!", sender="me") |
log.log("OH NO! This one's an error!", "Foo", "ERROR") |
log.bindToSender("Foo") |
log.mute("Foo", "Bar") |
foo_bound("Message 1") |
foo_bound("Message 2") |
log.log("This should appear in the log, but not the dump", "Bar", "WARN") |
foo_bound("Message 3") |
log.unmute("Foo") |
log.log("I've been unmuted!", "Foo") |
log.log("This should be a warning", "Anyone", "BLORG") |
time.sleep(.2) |
log.addChannel("BLORG", 15) |
log.setChannelCollection("BLORG", True) |
log.log("This should be seen", "Anyone", "BLORG") |
log.setChannelCollection("WARN", False) |
log.setChannelCollection("WARN", True) |
time.sleep(.2) |
log.log("This should appear in the dump", "Bar", "WARN") |
time.sleep(.1) |
self.assertFalse(log.close() |
os.remove(output_file) |
filtered_log_df(log, top_trace_n = MAX_TRACES) |
case_statistics.get_variant_statistics(log) |
pd.DataFrame.from_dict([dict(x) |
pd.DataFrame() |
timestamp() |
caseid.append(n_cases) |
actid.append(event['concept:name']) |
actseq.append(actidx) |
resid.append(event['org:resource']) |
ts.append(event['time:timestamp'].timestamp() |
startTime.append(event['time:timestamp'].timestamp() |
shift(1) |
df.apply(lambda row: row['preid'] if row['actseq']!=0 else 'START', axis = 1) |
n_cases(log, top_trace_n = MAX_TRACES) |
filtered_log_df(log) |
filtered_log_df(log, top_trace_n) |
len(df['caseid'].unique() |
n_events(log) |
filtered_log_df(log) |
len(df) |
n_activities(log) |
filtered_log_df(log) |
len(df['actid'].unique() |
n_resources(log) |
filtered_log_df(log) |
len(df['resid'].unique() |
n_traces(log, top_trace_n = MAX_TRACES) |
case_statistics.get_variant_statistics(log) |
case_statistics.get_variant_statistics(log, parameters={"max_variants_to_return":top_trace_n}) |
pd.DataFrame.from_dict([dict(x) |
len(df) |
acts_df(log) |
attributes_filter.get_attribute_values(log, "concept:name") |
activities.items() |
actid.append(act0[0]) |
cnt.append(act0[1]) |
pd.DataFrame({'id':actid, 'cnt':cnt}) |
traces_df(log) |
case_statistics.get_variant_statistics(log) |
acts.split(',') |
tid.append(n_traces) |
actid.append(s) |
actseq.append(actidx) |
cnt.append(trace['count']) |
pd.DataFrame({'id': tid, 'actid': actid, 'actseq':actseq, 'cnt':cnt}) |
shift(1) |
trace_df.apply(lambda row: row['preid'] if row['actseq']!=0 else 'START', axis = 1) |
trace_df.apply(lambda row: row['preid']+"@@"+row['actid'], axis = 1) |
actid2num(sactid, df) |
range(0, len(df) |
len(df) |
acts_df(log) |
apply(lambda i:actid2num(i, act_df) |
sort_df(log) |
filtered_log_df(log) |
np.zeros(len(df) |
range(0, len(df) |
len(df) |
range(evS, evE+1) |
df.sort_values(by=['dur','caseid', 'actseq'], ascending = [0,1,1]) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.