- Using the
BaseModelfrompydantictakes the class members as arguments.- These arguments are displayed (along with the values) in the docs whether the user wants it or not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Format: | |
| BOLD = '\033[1m' | |
| UNDERLINE = '\033[4m' | |
| ITALIC = '\x1B[3m' | |
| class Colors: | |
| VIOLET = '\033[95m' | |
| BLUE = '\033[94m' | |
| CYAN = '\033[96m' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from random import choices | |
| from string import ascii_letters, digits | |
| def alpha_numeric(length: int = 20) -> str: | |
| """Generates alpha numeric phrase. | |
| Args: | |
| length: Length of the phrase that should be generated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cls | |
| $currentTime = Get-Date -format "MMM, dd yyyy hh:mm:ss tt" | |
| echo "StartTime: $currentTime`n`n" | |
| echo "I will keep the system busy! Go do your thing!`n`t- Vignesh Rao`n`n" | |
| echo "Questions?`n" | |
| echo "https://vigneshrao.com/contact" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from phonenumbers import geocoder, carrier, parse, timezone, is_valid_number, is_possible_number | |
| phone = parse('target number goes here') | |
| if is_valid_number(phone) and is_possible_number(phone): | |
| state = geocoder.description_for_number(phone, 'en') | |
| t_zone = timezone.time_zones_for_number(phone)[0] | |
| car = carrier.name_for_number(phone, 'en') | |
| print(f'The phone number with {phone} using the Carrier {car} is located in {state} and is currently in the timezone {t_zone}.') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from threading import Thread | |
| import cv2 | |
| import face_recognition | |
| class Face(Thread): | |
| def __init__(self): | |
| super(Face, self).__init__() |
NewerOlder