jammy.cli package

Submodules

jammy.cli.argument module

class jammy.cli.argument.JamArgumentParser(*args, **kwargs)[source]

Bases: ArgumentParser

jammy.cli.cmdline_viz module

class jammy.cli.cmdline_viz.CmdLineViz[source]

Bases: object

flush()[source]
update(mode, eval_dict)[source]

jammy.cli.colors module

class jammy.cli.colors.COLORS[source]

Bases: object

[This class is used to color the bash shell by using {} {} {} with ‘COLORS.{}, text, COLORS.END_TOKEN’]

BBlack = '\x1b[1;30m'
BBlue = '\x1b[1;34m'
BCyan = '\x1b[1;36m'
BEST_COLOR = '\x1b[0;92m'
BGreen = '\x1b[1;32m'
BIBlack = '\x1b[1;90m'
BIBlue = '\x1b[1;94m'
BICyan = '\x1b[1;96m'
BIGreen = '\x1b[1;92m'
BIPurple = '\x1b[1;95m'
BIRed = '\x1b[1;91m'
BIWhite = '\x1b[1;97m'
BIYellow = '\x1b[1;93m'
BPurple = '\x1b[1;35m'
BRed = '\x1b[1;31m'
BWhite = '\x1b[1;37m'
BYellow = '\x1b[1;33m'
Black = '\x1b[0;30m'
Blue = '\x1b[0;34m'
Cyan = '\x1b[0;36m'
END_NO_TOKEN = '\x1b[0m'
END_TOKEN = '\x1b[0m)'
Green = '\x1b[0;32m'
IBlack = '\x1b[0;90m'
IBlue = '\x1b[0;94m'
ICyan = '\x1b[0;96m'
IGreen = '\x1b[0;92m'
IPurple = '\x1b[0;95m'
IRed = '\x1b[0;91m'
IWhite = '\x1b[0;97m'
IYellow = '\x1b[0;93m'
On_Black = '\x1b[40m'
On_Blue = '\x1b[44m'
On_Cyan = '\x1b[46m'
On_Green = '\x1b[42m'
On_IBlack = '\x1b[0;100m'
On_IBlue = '\x1b[0;104m'
On_ICyan = '\x1b[0;106m'
On_IGreen = '\x1b[0;102m'
On_IPurple = '\x1b[10;95m'
On_IRed = '\x1b[0;101m'
On_IWhite = '\x1b[0;107m'
On_IYellow = '\x1b[0;103m'
On_Purple = '\x1b[45m'
On_Red = '\x1b[41m'
On_White = '\x1b[47m'
On_Yellow = '\x1b[43m'
Purple = '\x1b[0;35m'
Red = '\x1b[0;31m'
TEST_COLOR = '\x1b[0;93m'
TRAIN_COLOR = '\x1b[0;92m'
UBlack = '\x1b[4;30m'
UBlue = '\x1b[4;34m'
UCyan = '\x1b[4;36m'
UGreen = '\x1b[4;32m'
UPurple = '\x1b[4;35m'
URed = '\x1b[4;31m'
UWhite = '\x1b[4;37m'
UYellow = '\x1b[4;33m'
VAL_COLOR = '\x1b[0;94m'
White = '\x1b[0;37m'
Yellow = '\x1b[0;33m'

jammy.cli.device module

class jammy.cli.device.DeviceNameFormat(value)[source]

Bases: JamEnum

An enumeration.

INT = 'int'
TENSORFLOW = 'tensorflow'
jammy.cli.device.canonlize_device_name(d, format=DeviceNameFormat.INT)[source]
jammy.cli.device.parse_and_set_devices(devs, format=DeviceNameFormat.INT, set_device=True)[source]
jammy.cli.device.parse_devices(devs, format=DeviceNameFormat.INT)[source]
jammy.cli.device.set_cuda_visible_devices(devs)[source]

jammy.cli.keyboard module

jammy.cli.keyboard.maybe_mkdir(dirname)[source]
jammy.cli.keyboard.str2bool(s)[source]
jammy.cli.keyboard.timeout_input(prompt, timeout=10, default='', strict=False)[source]
jammy.cli.keyboard.yes_or_no(question, default='yes')[source]

Ask a yes/no question via raw_input() and return their answer. “question” is a string that is presented to the user. “default” is the presumed answer if the user just hits <Enter>. It must be “yes” (the default), “no” or None (meaning that an answer is required from the user). The “answer” return value is True for “yes” or False for “no”.

jammy.cli.keyboard.yn2bool(s)[source]

Module contents