Skip to content

Instantly share code, notes, and snippets.

View ShriyaSami's full-sized avatar
🏠
Working from home

Shriya Sami ShriyaSami

🏠
Working from home
View GitHub Profile
CREATE TABLE organisation (
organisation_id int NOT NULL auto_increment,
organisation_name VARCHAR(150) NOT NULL,
PRIMARY KEY (organisation_id)
);
CREATE TABLE meeting (
meeting_id VARCHAR(20) NOT NULL,
meeting_title VARCHAR(50) NOT NULL,
meeting_date DATE NOT NULL,
class CameraEvent:
def __init__(self):
pass
class StartCameraMove(CameraEvent):
def __init__(self):
pass
class StopCameraMove(CameraEvent):
def __init__(self):
@ShriyaSami
ShriyaSami / alignments.py
Created January 4, 2026 23:03
Process Mining
import pm4py
def calculate_alignments(event_log, net, initial_marking, final_marking):
""" Performs alignment-based conformance checking on the given event log using PM4PY's alignment algorithm.
It returns alignment diagnostics and a fitness value which quantifies how well the petri net explains the event log.
Parameters:
event_log : pm4py.objects.log.obj.EventLog
The event log used for alignment-based conformance checking.
net : pm4py.objects.petri_net.petrinet.PetriNet
import pandas as pd
import numpy as np
import json
import random
import re
from datetime import datetime, timedelta
import missingno as msno
def generate_timestamp(id, submodule):
#if timestamp does not exist from previous run - initialised once
@ShriyaSami
ShriyaSami / gist:0886e5e1beb736e915ee649233311b0c
Created January 4, 2026 22:49
Data Generation using Synthetic Data Vault (SDV)
import json
import pandas as pd
from sdv.metadata import Metadata
from sdv.single_table import CTGANSynthesizer
from sdv.cag import FixedCombinations
from sdv.evaluation.single_table import run_diagnostic
from sdv.evaluation.single_table import evaluate_quality
from sdv.evaluation.single_table import get_column_plot