Skip to content

Instantly share code, notes, and snippets.

View shuantsu's full-sized avatar

Filipe Teixeira shuantsu

View GitHub Profile
@shuantsu
shuantsu / main.py
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
shuantsu / create-python-app.sh
Last active July 2, 2023 02:28
Create Python App
#!/usr/bin/bash
log_file="/home/$USER/Projects/log.txt"
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
shuantsu / Debugger.py
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
shuantsu / references.md
Last active May 30, 2023 23:27
NIM GINTRO GUI REFERENCES
@shuantsu
shuantsu / virus.py
Last active January 18, 2023 12:45
virus.py
import ctypes, base64;ctypes.windll.WINMM.mciSendStringW(base64.b64decode('c2V0IGNkYXVkaW8gZG9vciBvcGVu').decode('utf8'), None, 0, None)