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 _tf_idf_match( | |
| original: Sequence[str], | |
| lookup: Sequence[str], | |
| k_matches: int = 3, | |
| ngram_range: tuple[int, int] = (3, 3), | |
| ) -> tuple[Sequence[str], Sequence[str], list[list[float]], list[list[int]]]: | |
| """Takes two tuples, returns top `k` matches from `lookup` dataset. | |
| This function does this by: | |
| - Transform the lookup strings into TF-IDF sparse matrix. | |
| - Fit a NearestNeighbours Model to the lookup matrix. | 
  
    
      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
    
  
  
    
  | # See last successful ssh logins | |
| alias ssh_success = "sudo tail -100000 /var/log/auth.log | grep 'sshd.*Accepted'" | |
| # To add to profile, run command: source ~/.zshrc | |
| #------------------------------------------------------------------------------------------------ | |
| # Operating System | |
| #------------------------------------------------------------------------------------------------ | |
| # update and upgrade | |
| alias update="sudo apt update && sudo apt dist-upgrade -y && sudo apt autoremove -y" | 
  
    
      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 | |
| class UserInputMultiChoice: | |
| """ | |
| gets multiple choice response from user via CLI | |
| Attributes: | |
| message: string to diplay to the user asking for input. Defaults to "User input required. Choose from the following:." | |
| sort_options: bool determining if the options should be sorted alphabetically. Defaults to False. | |
| options_always_included: list of options to alwasy display regardless of other options. Defaults to "Skip" and "Exit." | 
  
    
      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 configparser | |
| from dataclasses import dataclass | |
| @dataclass | |
| class Sections: | |
| raw_sections: dict | |
| def __post_init__(self): | |
| for section_key, section_value in self.raw_sections.items(): |