@midjourneyuzofficial · Post #3007 · 08.05.2023 г., 16:26
Inson Mars sayyorasida daraxt ekmoqda. Kelajak👍#mars🌖 ✈️@Midjourneyuzoffical - Neyron tarmoq ijodi ⛰
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
Пребарај: #mars
@midjourneyuzofficial · Post #3007 · 08.05.2023 г., 16:26
Inson Mars sayyorasida daraxt ekmoqda. Kelajak👍#mars🌖 ✈️@Midjourneyuzoffical - Neyron tarmoq ijodi ⛰
Hashtags
@EuropeanTribalism · Post #616 · 14.09.2020 г., 08:11
On the God of War (1) If you are looking for a piece of music perfectly representing Mars, the Bringer of War, you should listen to this masterpiece from Gustav Holst. https://youtu.be/L0bcRCCg01I He conserved the athmosphere which must have been present at the Bronze Age breakdown, when the God of War obliterated big parts of Southern Europe including Greece. Yes, you read that right: the devastation can be contributed to Mars, the God of War. The established explanation of 'Sea People' bringing the major civilizations to an almost simultaneous downfall is not credible. We will learn that the Greek Dark Age (~1200BC - ~650BC) and all the contradicting information only are consequences, not explanation for the breakdown. In short: people lived under a different sky, which was dominated by the mighty bodies of the old gods. In the time of the transition into the Iron Age Mars was the most important. Further articles will establish a consistant narrative, explaining history. #mars @EuropeanTribalism
Hashtags
@vpstuijianaaa · Post #32 · 01.11.2021 г., 14:39
#VPN#mars 【已亲测可用,🤣下载速度100k】
@PixelExperience · Post #9431 · 07.03.2024 г., 17:40
➡️New build available for Xiaomi Mi 11 Pro (mars) 👤 by Flower Sea ℹ️ Version: 14 📆 Build date: March 7, 2024 00:41 📂 File size: 2.11 GB ⬇️ Download now #mars#pixelexperience
Hashtags
@PixelExperience · Post #9226 · 24.11.2023 г., 02:31
➡️New build available for Xiaomi Mi 11 Pro (mars) 👤 by Flower Sea ℹ️ Version: 13 (Plus edition) 📆 Build date: November 23, 2023 09:23 📂 File size: 1.89 GB ⬇️ Download now #mars#pixelexperience
Hashtags
@PixelExperience · Post #9225 · 24.11.2023 г., 02:31
➡️New build available for Xiaomi Mi 11 Pro (mars) 👤 by Flower Sea ℹ️ Version: 13 📆 Build date: November 23, 2023 08:20 📂 File size: 1.88 GB ⬇️ Download now #mars#pixelexperience
Hashtags
@PixelExperience · Post #9169 · 17.10.2023 г., 13:45
➡️New build available for Xiaomi Mi 11 Pro (mars) 👤 by Flower Sea ℹ️ Version: 13 (Plus edition) 📆 Build date: October 17, 2023 12:03 📂 File size: 1.87 GB ⬇️ Download now #mars#pixelexperience
Hashtags
@PixelExperience · Post #9168 · 17.10.2023 г., 13:40
➡️New build available for Xiaomi Mi 11 Pro (mars) 👤 by Flower Sea ℹ️ Version: 13 📆 Build date: October 17, 2023 11:24 📂 File size: 1.86 GB ⬇️ Download now #mars#pixelexperience
Hashtags
@PixelExperience · Post #9058 · 25.09.2023 г., 12:13
➡️New build available for Xiaomi Mi 11 Pro (mars) 👤 by Flower Sea ℹ️ Version: 13 📆 Build date: September 25, 2023 04:30 📂 File size: 1.88 GB ⬇️ Download now #mars#pixelexperience
Hashtags
@PixelExperience · Post #9057 · 25.09.2023 г., 12:12
➡️New build available for Xiaomi Mi 11 Pro (mars) 👤 by Flower Sea ℹ️ Version: 13 (Plus edition) 📆 Build date: September 25, 2023 05:29 📂 File size: 1.89 GB ⬇️ Download now #mars#pixelexperience
Hashtags
@PixelExperience · Post #8871 · 15.08.2023 г., 05:46
➡️New build available for Xiaomi Mi 11 Pro (mars) 👤 by Flower Sea ℹ️ Version: 13 (Plus edition) 📆 Build date: August 15, 2023 03:37 📂 File size: 1.89 GB ⬇️ Download now #mars#pixelexperience
Hashtags
@PixelExperience · Post #8870 · 15.08.2023 г., 04:35
➡️New build available for Xiaomi Mi 11 Pro (mars) 👤 by Flower Sea ℹ️ Version: 13 📆 Build date: August 15, 2023 02:33 📂 File size: 1.88 GB ⬇️ Download now #mars#pixelexperience
Hashtags