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 typing import Optional, Tuple, Union | |
| import numpy as np | |
| class OnlineVariance: | |
| def __init__( | |
| self, | |
| initial_state: Optional[Tuple[Union[int, float]]] = None | |
| ) -> None: |
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 | |
| import shutil | |
| from typing import Tuple | |
| def generate_output(**kwargs) -> None: | |
| print(create_output(*shutil.get_terminal_size(), **kwargs)) | |
| def create_output( |
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 typing import List, Union | |
| import numpy as np | |
| def sparkbar(values: Union[List, np.ndarray], sort: bool = False) -> str: | |
| """ | |
| Create an inline bar plot | |
| The bar plot will show the relative sizes of the values within the |