@anatomyarthub · Post #5116 · 15.05.2025 г., 04:25
#лицо#face @anatomyarthub
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
Пребарај: #face
@anatomyarthub · Post #5116 · 15.05.2025 г., 04:25
#лицо#face @anatomyarthub
@libreware · Post #1048 · 22.02.2022 г., 03:21
Random Face Generator A Cross-Platform app to Generate Faces of (non-existing) People Random Face Generator is a flutter app to generate random faces. The Generated faces do not actually exist in real life.This app uses the thispersondoesnotexist and the fakeface API. Each image has been pre-analyzed by an AI algorithm called pypy-agender to identify the gender and age. Download - https://github.com/adityar224/Random-Face-Generator/releases https://github.com/adityar224/Random-Face-Generator #Face#Generator#AI @foss_Android
Hashtags
@AloneSnowflake · Post #192 · 15.11.2023 г., 00:50
๛ᴀᴘᴘʟʏ ᴛʜᴇᴍᴇ🤍 ๛ᴀᴘᴘʟʏ ᴛʜᴇᴍᴇ ᴛɢx ๛sᴇᴛ ᴡᴀʟʟᴘᴀᴘᴇʀ ๛ᴊᴏɪɴ ᴄʜᴀɴɴᴇʟ🩶 #Girl#Gray#Face#Aesthetic
Hashtags
@googlefactss · Post #40579 · 23.01.2026 г., 23:05
The glabella is the smooth area of skin between your eyebrows and above your nose. It helps show facial expressions like frowning. 👁️🗨️🙂 @googlefactss #Glabella#Face#BodyFacts
Hashtags
@blackwallp · Post #68098 · 04.04.2026 г., 05:35
#девчата#лицо#girls#face 🎥Videowallpaper |😀Emoji |🎼Ringtone
@anatomyarthub · Post #5228 · 16.06.2025 г., 10:38
#референсы#лицо#references#face @anatomyarthub
Hashtags
@anatomyarthub · Post #2945 · 15.04.2024 г., 10:25
#лицо#референсы#face#references @anatomyarthub
Hashtags
@anatomyarthub · Post #2798 · 17.03.2024 г., 11:51
#референсы#лицо#references#face @anatomyarthub
Hashtags
@anatomyarthub · Post #2788 · 16.03.2024 г., 11:43
#референсы#лицо#references#face @anatomyarthub
Hashtags
@anatomyarthub · Post #2712 · 01.03.2024 г., 06:10
#референсы#references#лицо#face @anatomyarthub
Hashtags
@testflightynoti · Post #37945 · 09.05.2026 г., 19:52
#Aww#That#Face Join the Aww… That Face beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/XXjasct4 Shared by Dimitri
Hashtags
@googlefactss · Post #40692 · 22.02.2026 г., 15:02
The nasion is the point where the frontal bone and the two nasal bones meet, located right between your eyes at the top of your nose bridge. It’s a key landmark in facial anatomy and measurements. 👃📏 [Source picture] @googlefactss #Nasion#Face#AnatomyFacts
Hashtags