Skip to content

Instantly share code, notes, and snippets.



Created Jan 7, 2021
What would you like to do?
termgraph test cases
import glob
import json
import chalk
import asyncio
import aiofiles
import tabulate
import pandas as pd
import itertools as it
async def read_tags(f):
async with, mode='r') as reader:
content = json.loads(await['labels']
return [x for x in map(lambda x: x['value'], content)]
files = glob.glob('./*.json')
tags = []
for file in files:
tag_set = set(it.chain.from_iterable(tags))
df = pd.Series([*tag_set]).rename('tags').to_frame()
print(df.tags.str.split(":").apply(pd.Series).rename(columns={0:'tag', 1:'case'}).case.str.split("-").apply(pd.Series)[0].value_counts())
# run script
# ./ | grep -v ":" | termgraph --color black
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment