Skip to content

Instantly share code, notes, and snippets.

View shuantsu's full-sized avatar
🏡
workando em casa

Filipe Teixeira shuantsu

🏡
workando em casa
View GitHub Profile
// Utility micro library "LocalStorj"
const LocalStorj = {
get: (key, defaultValue = null) => {
const result = localStorage.getItem(key)
if (result === null) {
return defaultValue;
}
return result;

KOTLIN + OKHTTP3


Dependency

com.squareup.okhttp3:okhttp:4.12.0

Get

KOTLIN WEBVIEW (HTML+CSS+JS HYBRID ANDROID APP)


Useful snippets

MainActivity.kt

@shuantsu
shuantsu / app.py
Last active October 4, 2024 18:07
Sintetizador de voz offline no python usando o sintetizador do microsoft edge
'''
exemplo de uso: python app.py artigo.txt
lembre de instalar esses módulos:
asyncio
edge_tts
@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