@Inspiringthoughts · Post #10091 · 08.10.2024 г., 18:35
सारा दिन ईयर बड लगाने से पैरालिसिस हो गया है #ear
Hashtags
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
Пребарај: #ear
@Inspiringthoughts · Post #10091 · 08.10.2024 г., 18:35
सारा दिन ईयर बड लगाने से पैरालिसिस हो गया है #ear
Hashtags
@Inspiringthoughts · Post #10089 · 08.10.2024 г., 17:47
#ear
Hashtags
@anatomyarthub · Post #2606 · 08.02.2024 г., 08:50
#ухо#референсы#ear#references @anatomyarthub
Hashtags
@googlefactss · Post #40572 · 22.01.2026 г., 23:01
The pinna is the outer part of your ear you can see. It helps catch sound and direct it inside your ear. 👂🎧 @googlefactss #Pinna#Ear#BodyFacts
Hashtags
@trumpsear_tg · Post #1658 · 17.10.2025 г., 18:06
An American internet user, pointing to Trump's intact ear and the absence of any wounds on it, wrote: “as a former sniper, I cannot shoot a person in the ear with an AR15 automatic rifle and leave no wound. It is just impossible.” This former sniper was referring to the failed assassination attempt on Trump in 2024 and its staged portrayal, which involved the use of an AR15 weapon. He also wrote: “when I teach people how to recognize the psychological operations conducted on you, I always say that the easiest way to check a fake is to check if it can be remade again.” #trump#ear#sniper#fake 👂More on Trump's Ear ⚠️
@Futurentry · Post #4006 · 04.11.2024 г., 23:28
😳➕7️⃣5️⃣2️⃣2️⃣🔣total profit from our VIP signals for the last week 🔝(28.10 - 04.11) 🔝 😎 As usual, my weekly report! You can clearly see how our results have changed compared to last week.😊 The market is very positive and this is just the beginning, the bull run will show us all what big money is and I do not advise you to miss such a rare opportunity. ✈️ Let's fly guys! New week - New records!✈️ ✅ +825% #GMI/SOL ✅ +476% #DOUG/SOL ✅ +436% #KAMALA47/WETH ✅ +411% #AVATAROS/SOL ✅ +370% #MORT/SOL ✅ +314% #JUJU/SOL ✅ +304% #WHATITIS/SOL ✅ +304% #🗳/SOL ✅ +264% #SPEANUT/WETH ✅ +263% #SUKI/SOL ✅ +249% #ÆHEDGE/SOL ✅ +242% #DEVCAT/SOL ✅ +228% #DOGI/WETH ✅ +219% #HUMAN/SOL ✅ +215% #TRINA/SOL ✅ +209% #SENDISM/SOL ✅ +206% #MAMA/SOL ✅ +205% #REDO/SOL ✅ +184% #EGM/SOL ✅ +178% #APPLE AI/SOL ✅ +147% #SOLANA/SOL ✅ +143% #EAR/SOL ✅ +138% #BUTTERFLY/SOL ✅ +133% #GHOSTEUS/SOL ✅ +117% #DEGENAI/SOL ✅ +113% #PDJT/WETH ✅ +108% #3DMAN/SOL ✅ +103% #MOMA/SOL ✅ +83% #B4TS4K/SOL ✅ +73% #BTCWIZARD/WETH ✅ +71% #ΧΑΧΑ/SOL ✅ +70% #PRUMP/SOL ✅ +70% #CHOPIN/SOL ✅ +70% #DEFORG/SOL ✅ +67% #MERLIN/WETH ✅ +57% #XAU/WETH ✅ +52% #EZSIS/SOL ❎ -50% #TSUYU/WETH ❎ -30% #PIPI/WETH ❎ -30% #SIGH/SOL ❎ -30% #PENGUIN/WETH ❎ -30% #SNOO/WETH ❎ -15% #GRUK/SOL ❎ -10% #NEKO/SOL Join our VIP channel and get these results every day👇@Riley_Fe