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 insights import make_fail, rule, run, parser, Parser | |
| from insights.core import dr | |
| from insights.parsers import ParseException, SkipException, SkipComponent | |
| from insights.specs import Specs | |
| @parser(Specs.uname) | |
| class ExcParser(Parser): | |
| def parse_content(self, content): | |
| self.data = content[0] |
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 logging | |
| import pandas as pd | |
| import pyarrow.parquet as pq | |
| import pyarrow.orc as orc | |
| import pyarrow as pa | |
| def read_parquet(filepath): | |
| logging.debug('Reading parquet file: %s', filepath) |
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
| #!/usr/bin/env python | |
| """ | |
| This is sample code to show how you can run insights-core from a | |
| stand alone Python script. It also demonstrates missing requirements. | |
| Run from the command line:: | |
| `$ ./stand_alone_missing.py -m` | |
| """ | |
| from __future__ import print_function |
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 os | |
| import pytest | |
| import tempfile | |
| # This is the data that will be the file contents | |
| TEST_DATA = """ | |
| Some text in the test file | |
| more text in the test file | |
| # Stuff | |
| still more stuff |