Skip to content

Instantly share code, notes, and snippets.

View samehkamaleldin's full-sized avatar

Sameh Mohamed samehkamaleldin

View GitHub Profile
@samehkamaleldin
samehkamaleldin / xml_cases_merger.py
Created July 30, 2025 22:54
xml_cases_merger.py
import xml.etree.ElementTree as ET
import re
from pathlib import Path
from typing import Dict, List, Any, Optional
from dataclasses import dataclass, field
import logging
import pandas as pd
from datetime import datetime
# Set up logging
@samehkamaleldin
samehkamaleldin / group_data.py
Created July 21, 2025 20:49
Group case data
#!/usr/bin/env python3
import argparse
import re
import shutil
from pathlib import Path
from typing import Dict, List, Set
DATA_DIRPATH = r"PATH_TO_YOUR_DATA_DIRECTORY" # Replace with your actual data directory path
@samehkamaleldin
samehkamaleldin / angio_xlsx_aggregation.py
Last active July 28, 2025 19:37
Parse 3mensio xlms
import xml.etree.ElementTree as ET
import re
from pathlib import Path
from typing import Dict, List, Any, Optional
from dataclasses import dataclass, field
import logging
import pandas as pd
from datetime import datetime
# Set up logging
@samehkamaleldin
samehkamaleldin / mocha.omp.toml
Created October 30, 2024 16:23
omp cappuccino
version = 2
console_title_template = '{{ .Shell }} in {{ .PWD }}'
shell_integration = true
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
@samehkamaleldin
samehkamaleldin / .tmux.conf
Created October 13, 2024 22:37
TMUX config
# : << 'EOF'
# https://github.com/gpakosz/.tmux
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
#
# ------------------------------------------------------------------------------
# /!\ DO NOT EDIT THIS FILE
# instead, override your .local customization file copy, see README.md /!\
# ------------------------------------------------------------------------------
from collections import Counter
from typing import Dict
def main():
# ----------------- Configuration ----------------- #
fasta_filepath = "./data/Hsym_primary_v1.0.aa.fasta"
window_size = 16
slide_size = 4
aa_min_occurrences = {'R': 5, 'G': 3}
@samehkamaleldin
samehkamaleldin / generate_pse_dataset.py
Last active August 27, 2020 15:46
Generate pse dataset
# -*- coding: utf-8 -*-
import os
import numpy as np
import gzip
import math
def export_entry(entry, out_fd):
"""
\documentclass{standalone}
\usepackage{times}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=2]
%\fontfamily{times}
\tikzstyle{rect}=[rectangle,draw=black!75,fill=black!20,minimum size=0mm, node distance=7.5pt]
\tikzstyle{circ}=[circle,thick,draw=black!75,fill=blue!30,minimum size=0mm, node distance=80pt]
@samehkamaleldin
samehkamaleldin / record_renamer.py
Last active June 29, 2018 11:16
Record RENAMING
import os
from datetime import datetime, timedelta
from shutil import copyfile
# ------------------------------------------------------------------------------------
# [Things to Change] please input exact format of the date and time like the example
# ------------------------------------------------------------------------------------
records_directory = "/Users/sameh/Downloads/records"
site_name = "Cork_7"
first_date = "21/5/2012 14:31:51"
@samehkamaleldin
samehkamaleldin / awesome-kge.md
Created October 29, 2017 11:56 — forked from mommi84/awesome-kge.md
Awesome Knowledge Graph Embedding Approaches