Skip to content

Instantly share code, notes, and snippets.

View eusoubrasileiro's full-sized avatar
🐔
from ~

imbr eusoubrasileiro

🐔
from ~
View GitHub Profile
-- Logs begin at Thu 2023-03-02 12:58:02 UTC, end at Thu 2023-03-02 13:01:15 UTC. --
Mar 02 12:58:02 localhost kernel: Booting Linux on physical CPU 0x0
Mar 02 12:58:02 localhost kernel: Linux version 4.9.299-tegra (buildbrain@mobile-u64-5333-d8000) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05) ) #1 SMP PREEMPT Tue Nov 22 09:24:39 PST 2022
Mar 02 12:58:02 localhost kernel: Boot CPU: AArch64 Processor [411fd071]
Mar 02 12:58:02 localhost kernel: OF: fdt:memory scan node memory@80000000, reg size 48,
Mar 02 12:58:02 localhost kernel: OF: fdt: - 80000000 , 3f800000
Mar 02 12:58:02 localhost kernel: OF: fdt: - bfa00000 , 3fe00000
Mar 02 12:58:02 localhost kernel: OF: fdt: - ffa00000 , 600000
Mar 02 12:58:02 localhost kernel: earlycon: uart8250 at MMIO32 0x0000000070006000 (options '')
Mar 02 12:58:02 localhost kernel: bootconsole [uart8250] enabled
@eusoubrasileiro
eusoubrasileiro / auto property getter
Last active July 29, 2023 01:56
Decorator to create @Property getters for all my class instance attributes whose names start with one underscore Python3+
def auto_property_getters(cls):
class AutoPropertyClass(cls):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def __getattr__(self, name):
if name in [attr[1:] for attr in dir(self) if attr.startswith('_') and not attr.startswith('__')]:
return getattr(self, f"_{name}")
raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
return AutoPropertyClass
@eusoubrasileiro
eusoubrasileiro / whispertranscribe.py
Last active October 24, 2024 11:15
Transcribe pregações peregrinos after downloading from soundcloud
# pip install scdl
# this downloads all tracks from that user to the path specified
# -a download all
# -c skip and continue those already downloaded
# scdl -l https://soundcloud.com/ipperegrinos -a -c --path /home/andre/music/ipperegrinos
%cd /mnt/Data/ipperegrinos
import subprocess
import pathlib
from pathlib import Path
@eusoubrasileiro
eusoubrasileiro / data-cleanup.ipynb
Created November 9, 2024 11:57
whisper transcription sermons
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eusoubrasileiro
eusoubrasileiro / gist:d0629be76c7fac263f092ac2d99ee704
Created November 19, 2024 10:56
Customized save and load InMemoryDocumentStore `Document`s
import json
import zlib
import numpy as np
from pathlib import Path
from haystack import Document
from haystack.document_stores.in_memory import InMemoryDocumentStore
from tqdm import tqdm
# Configuration
ROOT_PATH = Path("/mnt/shared/ipp/")