Skip to content

Instantly share code, notes, and snippets.

View AdamBanham's full-sized avatar

Adam Peter Banham AdamBanham

  • Queensland University of Technology
  • Brisbane , Australia
View GitHub Profile
@AdamBanham
AdamBanham / create.py
Last active September 24, 2021 02:47
Handling a pm4py event log with more specificity
import pm4py
from pm4py.objects.log.obj import EventLog,Event,Trace # under the hood objects within pm4py, subject to change
import pandas as pd
from tqdm import tqdm
from joblib import Parallel,delayed
from typing import Tuple
def thread_work(group:str,concept:Tuple[str,str,str],xtrace:int,exo_series:pd.DataFrame) -> Trace:
"""
Thread work to create a single trace, given some group id, key values from dataframe groupby, trace instance number and some dataframe of events to handle for this trace.
@AdamBanham
AdamBanham / main.py
Created April 24, 2022 02:19
Making a coloured progress bar using python (3.9.9)
from ast import Global
from math import factorial
from time import time
from colorama import Fore, init as colorama_int
colorama_int()
PRGRESS_CHAR = '█'
PROGRESS_LENGTH = 25
PROGRESS_COLOUR_INC = Fore.YELLOW