Skip to content

Instantly share code, notes, and snippets.

View zoltanctoth's full-sized avatar

Zoltan C. Toth zoltanctoth

View GitHub Profile
Solution Transcription Speed (1hr audio) Cost/hr Hungarian Quality Speaker Diarization Notes
MacBook Air (local) ~45-60 min Free Good Needs separate model (pyannote) Slow, pyannote adds ~20-30 min extra per hour
OpenAI Whisper API ~1-3 min $0.36 Good ❌ Not supported Need to combine with separate diarization
Whisper + pyannote ~5-10 min (GPU) Free Good ✅ Yes (local) Best free option, needs GPU + HuggingFace token
Deepgram ~30-60 sec $0.25 Decent ✅ Built-in Fast, easy API, HU quality not the best

Miért vagyunk ennyire ingerültek, amikor még soha nem volt ilyen jó dolgunk?

Dr. Ludwig Hasler előadása
Hittisauer Landgespräche - "Jólét, hogyan tovább"


Bevezetés

Lényegében Ausztriában éppen egy korábban sosem ismert anyagi jólétnek örvendünk. Ráadásul elérhető egészségügyi ellátásunk van, ingyenes iskolai oktatás, és biztonságban élünk.

Warum sind wir so gereizt, wo es uns doch besser geht als je?

Vortrag von Dr. Ludwig Hasler
Hittisauer Landgespräche - "Wohlstand, wie weiter"


Einleitung

Willkommen bei Fokus. Im Grunde erfreuen wir uns in Österreich doch gerade eines nie gekannten materiellen Wohlstands. Zudem haben wir eine leistbare Gesundheitsversorgung, eine kostenlose Schulbildung und wir leben in Sicherheit.

@zoltanctoth
zoltanctoth / gist:1c37bd3845efaf665b5d361620e8e663
Created March 12, 2025 07:04
mlflow-llm-as-a-judge-example
professionalism = mlflow.metrics.genai.make_genai_metric(
name="professionalism",
definition=(
"Professionalism refers to the use of a formal, respectful, and appropriate style of communication that is "
"tailored to the context and audience. It often involves avoiding overly casual language, slang, or "
"colloquialisms, and instead using clear, concise, and respectful language."
),
grading_prompt=(
"Professionalism: If the answer is written using a professional tone, below are the details for different scores: "
"- Score 0: Language is extremely casual, informal, and may include slang or colloquialisms. Not suitable for "
@zoltanctoth
zoltanctoth / split_text.py
Last active November 29, 2023 17:59
Split text in max 5000-character-long parts
long_text = 3000 * "Lorem ipsum dolor sit amet, consectetur adipiscing elit. "
COMPREHEND_LIMIT = 5000
lines = long_text.split(".")
current_text = ""
for line in lines:
if len(current_text + line) > COMPREHEND_LIMIT:
# EXECUTE COMPREHEND
print(f"Executing Comprehend on {len(current_text)} characters")
current_text = ""
@zoltanctoth
zoltanctoth / serving.py
Created November 16, 2023 07:14
Simplest MLflow serving with FastAPI
import os
import mlflow
import uvicorn
from fastapi import FastAPI, HTTPException
class MLService:
def __init__(self, model):
self.model = model
@zoltanctoth
zoltanctoth / schema.yml
Created September 22, 2022 09:27
An example of using dbt-expectations in practice. Check out the original file at https://github.com/nordquant/complete-dbt-bootcamp-zero-to-hero/blob/main/models/schema.yml#L56
models:
- name: dim_listings_w_hosts
tests:
- dbt_expectations.expect_table_row_count_to_equal_other_table:
compare_model: source('airbnb', 'listings')
columns:
- name: price
tests:
- dbt_expectations.expect_column_values_to_be_of_type:
column_type: number
@zoltanctoth
zoltanctoth / my_custom_test.sql
Created September 22, 2022 09:00
Creating a simple custom test (no extra parameters) in dbt
{% test valid_age(model, column_name) %}
SELECT COUNT(*) FROM {{ model }}
WHERE NOT {{ column_name}} BETWEEN 0 and 125
{% endtest %}
@zoltanctoth
zoltanctoth / packages.yml
Created September 22, 2022 08:58
dbt-expectations package definition example
packages:
- package: calogica/dbt_expectations
version: [">=0.6.0", "<0.7.0"]
@zoltanctoth
zoltanctoth / print-without-newline.py
Last active October 21, 2020 10:28
Python print without newline. This script shows how you can use python to print a string without adding a newline.
# Print a string without adding a newline
print("Hey, Python prints without a newline.", end ="")
# Alternative solution
import sys
sys.stdout.write("Hey, Python prints without a newline.")
# You are part of an experiment on how well gists can be used as "StackOverflow".
# Please add a comment or a star if you found this useful. :) Thanks!