@testflightynoti · Post #38175 · 12.05.2026 г., 19:04
#VoicePad#AI#Dictation Join the VoicePad AI Dictation beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/bbmnyyS4 Shared by Dimitri
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #397 · 12 ное.
Использование Pydantic сегодня стало нормой, и это правильно. Но иногда на ревью вижу, что используют его не всегда корректно. Например, метод BaseModel.model_dump() по умолчанию не преобразует стандартные типы, такие как datetime, UUID или Decimal, в простой сериализуемый для JSON вид. Тогда пишут кастмоный сериализатор для этих типов чтобы функция json.dump() не падала с ошибкой. import uuid from datetime import datetime from decimal import Decimal from uuid import UUID from pydantic import BaseModel class MyModel(BaseModel): id: UUID date: datetime value: Decimal obj = MyModel( id=uuid.uuid4(), date=datetime.now(), value='1.23' ) print(obj.model_dump()) # не подходит для json.dump # { # 'id': UUID('4f8c1bc4-25fd-40cd-9dbe-2c73639b0dc1'), # 'date': datetime.datetime(2025, 12, 12, 12, 12, 12, 111111), # 'value': Decimal('1.23') # } # добавляем свой кастомный сериализатор json.dumps(obj.model_dump(), cls=MySerializer) # { # 'id': '4f8c1bc4-25fd-40cd-9dbe-2c73639b0dc1', # 'date': '2025-12-12T12:12:12.111111', # 'value': '1.23' # } В данном случае класс MySerializer обрабатывает datetime, UUID и Decimal. Например так: class MySerializer(json.JSONEncoder): def default(self, o): if isinstance(o, Decimal): return str(o) elif isinstance(o, datetime): return o.isoformat() elif isinstance(o, UUID): return str(o) return super().default(o) Специально для тех, кто всё еще так делает - в этом нет необходимости! Pydantic может это сделать сам, просто нужно добавить параметр mode="json". json.dumps(obj.model_dump(mode="json")) # { # 'id': '4f8c1bc4-25fd-40cd-9dbe-2c73639b0dc1', # 'date': '2012-12-12T12:12:12.111111', # 'value': '1.23' # } #pydantic#libs
Пребарај: #dictation
@testflightynoti · Post #38175 · 12.05.2026 г., 19:04
#VoicePad#AI#Dictation Join the VoicePad AI Dictation beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/bbmnyyS4 Shared by Dimitri
@RusEmbIndia_Ru · Post #14913 · 14.04.2026 г., 08:01
Дорогие друзья! 📚 Русский дом в Нью-Дели приглашает вас принять участие в международной исторической акции «Диктант Победы». 📆 Ждем Вас 24 апреля в 12:00. 🔗 Язык диктанта - русский и английский. 🏢 Место проведения: Русский дом в Нью-Дели. 📍Адрес: 24, Фироз Шах Роуд, г. Нью-Дели. ✅ Вход для посетителей мероприятия - свободный. 🔗При себе необходимо обязательно иметь ID-карту (на бумажном носителе). 💎 Не упустите возможность стать частью важного события! Ждем Вас! #РусскийДом#Диктант#Индия Dear friends! 📚 The Russian House in New Delhi invites you to participate in the international historical campaign "Victory Dictation." 📆 We look forward to seeing you on April 24 at 12:00 p.m. 🔗 The language of the dictation is Russian and English. 🏢 Venue: Russian House in New Delhi. 📍Address: 24, Firoz Shah Road, New Delhi. ✅ Entrance for visitors to the dictation is free. 💎 Don't miss the opportunity to become part of an important event! We are waiting for you! #RussianHouse#Dictation#India
@libreware · Post #1477 · 07.08.2025 г., 03:49
WhisperTux Simple #voice#dictation application for #Linux. Uses whisper.cpp for offline speech-to-text transcription. No fancy GPUs are required although whisper.cpp is capable of using them if available. Once your speech is transcribed, it is sent to a ydotool daemon that will write the text into the focused application. Features Local speech-to-text processing via whisper.cpp (no cloud dependencies) No expensive hardware required (works well on a plain x86 laptop with AVX instructions) Global keyboard shortcuts for system-wide operation Automatic text injection into focused applications Configurable whisper models and shortcuts https://github.com/cjams/whispertux #assistant#speech#stt