Personal blog

Random stuff from the bottom of my mind

How to me guide

The Traceback That Ate Memory

Let’s write a tiny program. At first glance, it seems unremarkable. from dataclasses import dataclass @dataclass(slots=True) class Book: title: str description: str cost: float ParseBookException = Exception("parse book failed!") def validate_book(book: Book) -> Book: if book.cost % 2 == 0: return book raise ParseBookException def process_books() -> list[Book]: books = [] for book in ( Book( title="title", cost=i, description="lorem" * 10**6, ) for i in range(2000) ): try: books.append(validate_book(book=book)) except Exception: continue books....

April 14, 2024 · 3 min

Let the whisper

Without further ado, let’s get to it. Target: Make a summary of the youtube video Installation Install python 3.10. Strongly recommend using pyenv. Install ffmpeg and yt-dlp. Scripts for mac. # ffmpeg brew install ffmpeg # yt-dlp wget chmod +x yt-dlp_macos sudo mv yt-dlp_macos /usr/local/bin/yt-dlp Install whisper. For greater good use virtualenv: pip install -U openai-whisper Usage Download video as an audio. ba == bestaudio. yt-dlp -f "ba" -o "to_transcribe....

July 9, 2023 · 1 min

How to work with me guide

What is it and who is it for This post is both for those who have never worked with me before, and for those who worked, but it was a long time ago. This is a short and simplified summary of my values, approach to work and organization of work. This note should not be taken as a complete description of me as a colleague, but it is a good starting point....

May 4, 2022 · 4 min

Calathea in the eye of the beholder

Disclaimer: I stricltly encourage you not to use code from this article in production In this article I’m… Using an old webcam with a raspberry pi Writing stupid telegram bot Downloading images from bot Stitching images into a gif with ffmpeg Idea So. Plants are weird. They move, like, A LOT, but you never see plants moving. So I’ve decided to spy on them. It was time to shake off the dust from my raspberry pi and the damn old webcam and write some code to ocassionaly take pictures....

November 7, 2021 · 3 min