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
| { | |
| ".ac": { | |
| "price": 4500, | |
| "renewal": 4500 | |
| }, | |
| ".academy": { | |
| "price": 3318, | |
| "renewal": 3318 | |
| }, | |
| ".accountant": { |
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
| status_200 = [ | |
| {'count': 2542, 'route': '/'}, | |
| {'count': 455, 'route': '/robots.txt'} | |
| ] | |
| status_404 = [ | |
| {'count': 74, 'route': '/favicon.ico'}, | |
| {'count': 33, 'route': '/xmlrpc.php'}, | |
| {'count': 30, 'route': '/cms/wp-includes/wlwmanifest.xml'}, | |
| {'count': 30, 'route': '/site/wp-includes/wlwmanifest.xml'}, |
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 random | |
| OFFICIAL_LOCAL_MNEMONICS_LOOKUP = { | |
| "A": "anglia", | |
| "B": "birmingham", | |
| "C": "cymru", | |
| "D": "deeside", | |
| "E": "essex", | |
| "F": "forest_and_fens", |
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
| """ | |
| Setup: | |
| python3 -m venv .venv | |
| source .venv/bin/activate | |
| Requirements: | |
| pip install beautifulsoup4 selenium |
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
| """ | |
| requirements: | |
| pip install pytz | |
| pip install python-dotenv | |
| pip install requests | |
| - create .env file with the following - | |
| DVLA_VES_API_KEY="" |
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
| """ | |
| requirements: | |
| python-dotenv | |
| requests | |
| """ | |
| import os | |
| from json import JSONDecodeError |
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 typing as t | |
| def is_truly(value: t.Optional[t.Union[str, bool, int]]) -> bool: | |
| if isinstance(value, int): | |
| return True if value > 0 else False | |
| if isinstance(value, bool): | |
| return value |
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
| def camel_case_to_snake_case(value: str) -> str: | |
| """ | |
| Switches name of the class CamelCase to snake_case | |
| """ | |
| special_characters = [ | |
| " ", | |
| "-", | |
| "(", | |
| ")", | |
| ".", |
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 Colors: | |
| @classmethod | |
| def color_names(cls): | |
| return cls.colors.keys() | |
| @classmethod | |
| def color_values(cls): | |
| return cls.colors.values() |
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 re | |
| from typing import Literal, Optional, List | |
| def clean_string( | |
| string: str, | |
| remove_these: Optional[ | |
| List[Literal["new_line", "tab", "dead_space"]] | |
| ] = None | |
| ) -> str: |
NewerOlder