Last active
April 19, 2018 17:11
-
-
Save tcmoore3/043ca3de20039f18f19ff7f2fe0c97ad to your computer and use it in GitHub Desktop.
This file contains 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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"from collections import Counter" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"First, run this on my laptop" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"ls: 194\n", | |
"cd: 59\n", | |
"pwd: 56\n", | |
"vi: 38\n", | |
"git: 30\n", | |
"open: 24\n", | |
"ssh: 18\n", | |
"mv: 11\n", | |
"python: 11\n", | |
"make: 10\n", | |
"vmd: 8\n", | |
"scp: 7\n", | |
"grep: 5\n", | |
"cp: 5\n", | |
"export: 3\n", | |
"ps: 3\n", | |
"rm: 3\n", | |
"ccmake: 3\n", | |
"cat: 2\n", | |
"mkcd: 2\n", | |
"mkdir: 1\n", | |
"s: 1\n", | |
"lr: 1\n", | |
"pd: 1\n", | |
"angles-math/: 1\n", | |
"killall: 1\n", | |
"py.test: 1\n", | |
"hoomd: 1\n" | |
] | |
} | |
], | |
"source": [ | |
"with open('/Users/tcmoore3/.bash_history') as f:\n", | |
" lines = f.readlines()\n", | |
"counter = Counter([x.split()[0] for x in lines])\n", | |
"for item in counter.most_common():\n", | |
" print('{0}: {1}'.format(item[0], item[1]))" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"And now, on my desktop" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"ls: 201\n", | |
"cd: 76\n", | |
"pwd: 40\n", | |
"vi: 38\n", | |
"du: 33\n", | |
"vmd: 28\n", | |
"cat: 13\n", | |
"open: 13\n", | |
"cp: 12\n", | |
"mv: 10\n", | |
"scp: 9\n", | |
"rm: 6\n", | |
"mkdir: 3\n", | |
"jupyter-notebook: 3\n", | |
"ssh: 2\n", | |
"viv: 2\n", | |
"for: 2\n", | |
"PWD: 1\n", | |
"s: 1\n", | |
"LS: 1\n", | |
"nohup: 1\n", | |
"qstat: 1\n", | |
"sl: 1\n", | |
"ps: 1\n", | |
"python: 1\n", | |
"make: 1\n" | |
] | |
} | |
], | |
"source": [ | |
"with open('/Users/tcmoore3/.bash_history') as f:\n", | |
" lines = f.readlines()\n", | |
"counter = Counter([x.split()[0] for x in lines])\n", | |
"for item in counter.most_common():\n", | |
" print('{0}: {1}'.format(item[0], item[1]))" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Basically, ~75% of the commands I run are `ls`, `cd`, `pwd`, and `vi`/`vim`." | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python [default]", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.5.2" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment