<jupyter_start><jupyter_text>nPrintML example<jupyter_code>pcap_path = 'nprintml-data/single-pcap/test.pcap'
labels_path = 'nprintml-data/single-pcap/labels.txt'

nml_cmd = f'nprintml --ipv4 --pcap-file {pcap_path} --label-file {labels_path} --aggregator index'
!{nml_cmd}<jupyter_output>[warn] nprint expected version for nprintML (1.1.6) does not match version on PATH (1.0.4 at /usr/local/bin/nprint)
step:Net → NetResult(nprint_path=PosixPath('nprintml/run-aardvark-1614280151-23676/nprint'))
Loading nPrint: nprintml/run-aardvark-1614280151-23676/nprint/test.npt
Loaded 1 nprint
  nPrint shape: (4921, 480)
Loading labels: nprintml-data/single-pcap/labels.txt
  number of labels: 9
Attaching labels to nPrints
  labels attached: missing labels for:
    missing labels caused samples to be dropped: 0
step:Label → LabelResult(features=                ipv4_ver_0  ipv4_ver_1  ...  ipv4_opt_319      label
172.16.31.10           0           1  ...             0  encrypted
172.16.31.10           0           1  ...             0  encrypted
172.16.31.10           0           1  ...             0  encrypted
172.16.31.10           0           1  ...             0  encrypted
172.16.31.10           0           1  ...             0  encrypted
...                    ...         [...]
{'fraction_non_alphanumeric': 0.11067809820732658, 'fraction_numerical': 0.08963367108339829, 'mean_word_length': 1.993006993006993, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 5, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '195145', 'license': 'Apache-2.0', 'n_tokens_mistral': 504, 'n_tokens_neox': 448, 'n_words': 99, 'path': 'example/nprintml-test.ipynb', 'repo_name': 'kaiyuhou/nprint-wlan', 'size': '1293'}