type=int, nargs="+", required=False, help= "if provided, a group number to restrict to (useful for debugging)", ) parser.add_argument( "-matplotlib", dest="matplotlib", action="store_const", const=True, required=False, help="if provided, output intermediate matplotlibs", ) args = parser.parse_args() name = names.getName(args.name, args.start, args.interval) topic_df = pd.read_csv(getFile(name, Datafile.TOPIC_METADATA_TSV), sep="\t", index_col=0) with open(getFile(name, Datafile.LAYOUT), "rt") as f: layout = json.load(f)["layouts"] layout = sorted([item for sl in layout for item in sl], key=lambda x: x["id"]) layout_df = pd.DataFrame(layout) layout_df.index = layout_df["id"] # this should be moved somewhere else :P assert (topic_df.index == layout_df.index).all() topic_df["x"] = layout_df["x"] topic_df["y"] = layout_df["y"]
# import the whole module # import datetime # import time # import specific class in module from camelcase import CamelCase from camelcase import CamelCase from datetime import date from time import time from names import getName c = CamelCase() today = date.today() timestamp = time() print(today) print(timestamp) print(getName()) print(c.hump('hey'))
from config import create_api from names import getName from logger import logger api = create_api() name = getName() try: api.update_status(name) logger.info(name) except Exception as e: logger.error("Error status update", exc_info=True)