Skip to content

Instantly share code, notes, and snippets.

View markjoshwel's full-sized avatar

mark markjoshwel

  • student, ngee ann polytechnic
  • Singapore
View GitHub Profile
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "tqdm",
# "ziglang",
# ]
# ///
from enum import Enum
from io import IOBase
from math import ceil
@markjoshwel
markjoshwel / MulipeaConverter.py
Last active April 30, 2026 14:59
MulipeaConverter: the script i use to encode my music library into iPod-friendly AAC files
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "mutagen",
# "pillow",
# "rich",
# ]
# ///
#
# Copyright 2025 mark joshwel <mark@joshwel.co>
@markjoshwel
markjoshwel / subpath.md
Last active July 14, 2024 17:52
subpath checking adventures: "str(subpath) in str(path)" is faster than "subpath in path.parents"

subpath checking adventures

code

from pathlib import Path
from time import time

td = Path(r'C:/Users/mark/Desktop/School/Outsync/sotastaircase/BukitTimahGame/Library')
tf = Path(r'C:/Users/mark/Desktop/School/Outsync/sotastaircase/BukitTimahGame/Library/Artifacts/aa/aa7bceae7798cf70fb772a3c5430b72a')
@markjoshwel
markjoshwel / parser.py
Created May 4, 2024 20:05
Historical 3yu Parser
from enum import Enum
from sys import stderr
from typing import Any, Generator, NamedTuple
class TyuUnits(Enum):
WHITESPACE = 0
COMMENT = 1
SCOPE = 2
DECLARATION = 3
@markjoshwel
markjoshwel / prg1-assignment-extra1.py
Last active April 30, 2026 15:01
NP Programming 1: Final Assignment
"""
Programming 1 Assignment
Mark Joshwel - SXXXXXXXX (IM02/P12) - 12/08/2023
------------------------------------------------
with Extra Feature 1:
Use real-time carpark available data from data.gov.sg
Updates Menu Option [3] to ask user if they want to read from a file or
use real-time carpark available data from data.gov.sg
@markjoshwel
markjoshwel / parsingwa.md
Last active February 20, 2022 13:38
Parsing WhatsApp Chat Exports in Python

Parsing WhatsApp Chat Exports in Python

Notes:

  • Only has been tested with group chats.
  • Works on Python 3.10.1, however should work with Python versions >=3.7.
  • Code has been formatted using black and has been type checked using mypy.
  • Incorrect parsing of message sender will occur if contact name has a colon in their name, this can be avoided with handling the chat export before processing.

Example snippet of a WhatsApp Chat Export: