How to use the tabulate.tabulate.PRESERVE_WHITESPACE function in tabulate

To help you get started, we’ve selected a few tabulate examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github IBM / multicloud-incident-response-navigator / frontend / right_window.py View on Github external
import curses, requests, datetime, json, sys, math
from dateutil.parser import parse
import tabulate
tabulate.PRESERVE_WHITESPACE = True
from tabulate import tabulate

sys.path.insert(0,'./../backend')
import metrics

this = sys.modules[__name__]

INDENT_AMT = 5 # horizontal indent amount

status = ""

event_headers=["Type", "Reason", "Age", "From", "Message"]
metrics_headers=["","CPU (cores)","CPU Limit","MEM (bytes)","MEM Limit"]

def init(panel_height, panel_width, top_height):
	""" 
github dssg / aequitas / src / aequitas_cli / utils / report.py View on Github external
import datetime
import logging

import pandas as pd
from markdown2 import markdown
from tabulate import tabulate

tabulate.PRESERVE_WHITESPACE = True

logging.getLogger(__name__)

# Authors: Pedro Saleiro 
#          Rayid Ghani
#
# License: Copyright \xa9 2018. The University of Chicago. All Rights Reserved.


#
#  DISCLAIMER: these methods were developed with a particular version of the webapp in mind. They lack flexibility (lots of
# hardcoded things)!!!
#             If new features(fairness measures, etc..) are added to the webapp this needs to change a lot...
#

def get_group_value_report(group_value_df):
github Neo23x0 / Fnord / fnord.py View on Github external
for b, c in len_counter.most_common(num):
            s_hex = binascii.hexlify(b)
            s_value = "(non ascii)"
            s_formatted = "hex"
            if is_printable(b):
                replace_null = False
                if is_wide_formatted(b):
                    s_formatted = "wide"
                    replace_null = True
                else:
                    s_formatted = "ascii"
                s_value = replace_control_characters(b, replace_null=replace_null)
            e = entropy(b)
            seq_set_extended.append([length, c, s_value, s_formatted, s_hex, e])

    tabulate.PRESERVE_WHITESPACE = True
    print(tabulate(seq_set_extended, ["Length", "Count", "Sequence", "Formatted", "Hex Sequence", "Entropy"],
                   tablefmt="fancy_grid"))
github dssg / aequitas / src / aequitas_cli / utils / report.py View on Github external
import datetime
import logging
# import warnings
import pandas as pd
from markdown2 import markdown
from tabulate import tabulate

tabulate.PRESERVE_WHITESPACE = True

logging.getLogger(__name__)

__author__ = "Rayid Ghani, Pedro Saleiro , Loren Hinkson"
__copyright__ = "Copyright \xa9 2018. The University of Chicago. All Rights Reserved."

#
#  DISCLAIMER: these methods were developed with a particular version of the webapp in mind. They lack flexibility (lots of
# hardcoded things)!!!
#             If new features(fairness measures, etc..) are added to the webapp this needs to change a lot...
#

def get_group_value_report(group_value_df):
    """

    :param group_value_df: