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 argparse | |
| parser = argparse.ArgumentParser(description='Process some integers.') | |
| parser.add_argument('integers', metavar='N', type=int, nargs='+', | |
| help='an integer for the accumulator') | |
| parser.add_argument('--sum', dest='accumulate', action='store_const', | |
| const=sum, default=max, | |
| help='sum the integers (default: find the max)') | |
| args = parser.parse_args() |
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 prettytable import PrettyTable | |
| table = PrettyTable(["animal", "ferocity"]) | |
| table.add_row(["wolverine", 100]) |
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
| download from ===> https://vim.sourceforge.io/scripts/download_script.php?src_id=14498 | |
| install details | |
| vim AnsiEsc.vba.gz | |
| :so % | |
| :q | |
| Usage: edit a file containing escape sequences, then type :AnsiEsc | |
| color setting: |
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 | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.INFO) | |
| fmt = logging.Formatter('%(asctime)s: [ %(message)s ]','%m/%d/%Y %I:%M:%S %p') | |
| console = logging.StreamHandler() | |
| console.setFormatter(fmt) | |
| logger.addHandler(console) | |
| log_file = 'tmp.log' | |
| if log_file: |
NewerOlder