utils/pcap_parser.py
def np_parse_pcap(pcap_list, outDir=None):
    """Parse all of the provided pcap files
    Inputs:
      - list of pcap filenames

    Returns:
      - A list of 2 element tuples: (design_matrix, time_vector). One for each
        pcap file
    """

    # Catch cases where the caller only passes a single filename
    if isinstance(pcap_list, types.StringTypes):
        pcap_list = [pcap_list]

    p = Pool(cpu_count())
    data_list = p.map(np_parse_pcap_worker, pcap_list)
    if outDir is not None:
        # save the results
        write_results(outDir, data_list, pcap_list)
    return data_list
Parse all of the provided pcap files
    Inputs:
      - list of pcap filenames

    Returns:
      - A list of 2 element tuples: (design_matrix, time_vector). One for each
        pcap file
    
Parse all of the provided pcap files
Inputs:
list of pcap filenames
Parse all of the provided pcap files Inputs : list of pcap filenames
def np_parse_pcap(pcap_list, outDir=None):
    if isinstance(pcap_list, types.StringTypes):
        pcap_list = [pcap_list]
    p = Pool(cpu_count())
    data_list = p.map(np_parse_pcap_worker, pcap_list)
    if outDir is not None:
        write_results(outDir, data_list, pcap_list)
    return data_list
def np_parse_pcap ( pcap_list , outDir = None ) : if isinstance ( pcap_list , types . StringTypes ) : pcap_list = [ pcap_list ] p = Pool ( cpu_count ( ) ) data_list = p . map ( np_parse_pcap_worker , pcap_list ) if outDir is not None : write_results ( outDir , data_list , pcap_list ) return data_list
Parse all of the provided pcap files
Inputs:
 list of pcap filenames
Parse all of the provided pcap files Inputs : list of pcap filenames
"""Parse all of the provided pcap files
    Inputs:
      - list of pcap filenames

    Returns:
      - A list of 2 element tuples: (design_matrix, time_vector). One for each
        pcap file
    """ # Catch cases where the caller only passes a single filename # save the results
A list of 2 element tuples: (design_matrix, time_vector). One for each
pcap file
A list of 2 element tuples : ( design_matrix time_vector ) . One for each pcap file
pcap_list
outDir