Skip to content

Instantly share code, notes, and snippets.

View shuantsu's full-sized avatar

Filipe Teixeira shuantsu

View GitHub Profile
shuantsu /
Created September 5, 2023 01:36
total audio length
import tinytag
import glob
import sys
def get_mp3_duration(filename):
"""Function to get the duration of an MP3 file using TinyTag"""
tag = tinytag.TinyTag.get(filename)
return tag.duration
def format_duration_in_minutes_seconds(seconds):
shuantsu /
Last active July 2, 2023 02:28
Create Python App
export LC_ALL="en_US.UTF-8"
exec > >(tee -a "$log_file") 2>&1
function create-python-app() {
echo "Creating and entering folder..."
mkdir $1
shuantsu /
Last active June 22, 2023 18:34
Debugger context manager in python
#!/usr/bin/env python3
import time
class Debugger:
debug = True
def __init__(self, message):
self.message = message
self.t1 = time.time()
def __enter__(self):
shuantsu /
Last active May 30, 2023 23:27
shuantsu /
Last active January 18, 2023 12:45
import ctypes, base64;ctypes.windll.WINMM.mciSendStringW(base64.b64decode('c2V0IGNkYXVkaW8gZG9vciBvcGVu').decode('utf8'), None, 0, None)