Skip to content

Instantly share code, notes, and snippets.

View AboTyim's full-sized avatar

Abo Tyim AboTyim

View GitHub Profile
@AboTyim
AboTyim / utils.py
Last active September 7, 2024 09:45
Make every field as optional with Pydantic v2
from copy import deepcopy
from typing import Any, Tuple
from pydantic import BaseModel, create_model, Field
from pydantic.fields import FieldInfo
def fields_optional(model: type[BaseModel]):
def make_field_optional(
field: FieldInfo, default: Any = None
@AboTyim
AboTyim / AdbCommands
Created November 22, 2021 23:46 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader