Skip to content

Commit 3724f4a

Browse files
committed
09_git.ipynb: Beginnings of replacing '!dir'
Use pure-Python solution (using 'pathlib' module) to print the sizes of generated files with saved commit graph in some format. This is the beginning of replacing non-portable '!dir <directory>' shell-out magic, and manual creation of the size tables.
1 parent 2cb181e commit 3724f4a

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

09_git.ipynb

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,64 @@
598598
"!dir datasets"
599599
]
600600
},
601+
{
602+
"cell_type": "code",
603+
"execution_count": null,
604+
"metadata": {},
605+
"outputs": [
606+
{
607+
"data": {
608+
"text/plain": [
609+
"['git-commit_graph.adjlist.txt.gz 1173714',\n",
610+
" 'git-commit_graph.df_edgelist.csv.gz 1629256',\n",
611+
" 'git-commit_graph.df_edgelist.pickle.gz 1332691',\n",
612+
" 'git-commit_graph.gexf.gz 3063783',\n",
613+
" 'git-commit_graph.gpickle.gz 3254690',\n",
614+
" 'git-commit_graph.graphml.gz 2231397',\n",
615+
" 'git-commit_graph.info.csv.gz 3681511',\n",
616+
" 'git-commit_graph.info.pickle.gz 2833650',\n",
617+
" 'git-commit_graph.pajek.gz 1754236']"
618+
]
619+
},
620+
"execution_count": null,
621+
"metadata": {},
622+
"output_type": "execute_result"
623+
}
624+
],
625+
"source": [
626+
"[\"{name:<50} {size:>7}\".format(name=p.name,size=p.stat().st_size) for p in Path(\"datasets\").glob(\"*.gz\")]"
627+
]
628+
},
629+
{
630+
"cell_type": "code",
631+
"execution_count": null,
632+
"metadata": {},
633+
"outputs": [
634+
{
635+
"data": {
636+
"text/plain": [
637+
"['git-commit_graph.adjlist.txt 2875179',\n",
638+
" 'git-commit_graph.df_edgelist.csv 4383858',\n",
639+
" 'git-commit_graph.df_edgelist.feather 3857818',\n",
640+
" 'git-commit_graph.df_edgelist.hdf5 3808521',\n",
641+
" 'git-commit_graph.df_edgelist.parquet 3116020',\n",
642+
" 'git-commit_graph.edgelist.txt 3692282',\n",
643+
" 'git-commit_graph.hdf5 6543155',\n",
644+
" 'git-commit_graph.info.hdf5 2735986',\n",
645+
" 'git-commit_graph.info.parquet 6079159',\n",
646+
" 'git-commit_graph.multiline_adjlist.txt 3610938',\n",
647+
" 'Spoon-Knife-commit_graph.adjlist.txt 15676794']"
648+
]
649+
},
650+
"execution_count": null,
651+
"metadata": {},
652+
"output_type": "execute_result"
653+
}
654+
],
655+
"source": [
656+
"[\"{name:<50} {size:>7}\".format(name=p.name,size=p.stat().st_size) for p in Path(\"datasets\").iterdir() if not p.match(\"*.gz\")]"
657+
]
658+
},
601659
{
602660
"cell_type": "code",
603661
"execution_count": null,

0 commit comments

Comments
 (0)