cli/streamingphish/streamingphish/features.py
def _load_from_directory(path):
        """
        Read all text files from a directory on disk, creates list, and returns.

        Args:
            path (string): Path to directory on disk, i.e. '/opt/streamingphish/keywords/'

        Returns:
            values (list): Values from all text files in the supplied directory.
        """
        values = []

        # Load brand names from all the text files in the provided folder.
        for root, _, files in os.walk(path):
            files = [f for f in files if not f[0] == "."]
            for f in files:
                with open(os.path.join(root, f)) as infile:
                    for item in infile.readlines():
                        values.append(item.strip('\n'))

        return values

        Read all text files from a directory on disk, creates list, and returns.

        Args:
            path (string): Path to directory on disk, i.e. '/opt/streamingphish/keywords/'

        Returns:
            values (list): Values from all text files in the supplied directory.
        
Read all text files from a directory on disk, creates list, and returns.
Read all text files from a directory on disk creates list and returns .
def _load_from_directory(path):
        values = []
        for root, _, files in os.walk(path):
            files = [f for f in files if not f[0] == "."]
            for f in files:
                with open(os.path.join(root, f)) as infile:
                    for item in infile.readlines():
                        values.append(item.strip('\n'))
        return values
def _load_from_directory ( path ) : values = [ ] for root , _ , files in os . walk ( path ) : files = [ f for f in files if not f [ 0 ] == "." ] for f in files : with open ( os . path . join ( root , f ) ) as infile : for item in infile . readlines ( ) : values . append ( item . strip ( '\n' ) ) return values
Read all text files from a directory on disk, creates list, and returns.
Read all text files from a directory on disk creates list and returns .
"""
        Read all text files from a directory on disk, creates list, and returns.

        Args:
            path (string): Path to directory on disk, i.e. '/opt/streamingphish/keywords/'

        Returns:
            values (list): Values from all text files in the supplied directory.
        """ # Load brand names from all the text files in the provided folder.
values (list): Values from all text files in the supplied directory.
values ( list ) : Values from all text files in the supplied directory .
path
Path to directory on disk, i.e. '/opt/streamingphish/keywords/'
Path to directory on disk i . e . ' / opt / streamingphish / keywords / '