Skip to content

Instantly share code, notes, and snippets.

@maszaa
maszaa / system_check.py
Created May 22, 2020 15:59
System checks with Python
import logging
import psutil
import sys
class RAMUsageTooHigh(Exception):
pass
class CPUTemperatureTooHigh(Exception):
pass
@maszaa
maszaa / genre_splitting_flac_wrapper.py
Created March 5, 2020 23:01
Genre tag splitting Python wrapper for flac
import subprocess
import sys
FLAC_EXE = "C:\Program Files (x86)\Exact Audio Copy\FLAC\FLAC.EXE"
TAG_FIELD = "--tag"
TAG_GENRE = "GENRE"
TAG_GENRE_SPLITTER = ", "
def split_genres(genre_tag):
if TAG_FIELD in genre_tag and TAG_GENRE in genre_tag: