I hereby claim:
- I am dleau on github.
- I am deltabravo (https://keybase.io/deltabravo) on keybase.
- I have a public key ASDyNR5FnuatZYRI0loECuYDwS8XsVmahTDb3mrwulvXVQo
To claim this, I am signing this object:
# recursively traverse a dictionary, concatenate key names, | |
# then map those names to values | |
# extremely useful in JSON to CSV translation | |
def helper(d, path=[]): | |
if isinstance(d, dict): | |
for root, child in d.items(): | |
yield from helper(child, path + [root]) | |
else: yield path + [d] |
# split list l into c "chunks" | |
def split_into_chunks(l, c): | |
chunks = [] | |
for i in range(0, c): | |
chunks.append([]) | |
for i, e in enumerate(l): | |
chunks[i % c].append(e) | |
return chunks | |
l = [1, 2, 3, 4, 5, 6] |
I hereby claim:
To claim this, I am signing this object: