Saturday, March 21, 2009

Thesis working hours

A Python script follows, that shows the working hour statistics.


import sys
from subprocess import *

p1 = Popen(["git", "log"], stdout=PIPE)
p2 = Popen(["grep", "^Date"], stdin=p1.stdout, stdout=PIPE)
p3 = Popen(["awk", "{printf \"%d \", $5}"], stdin=p2.stdout, stdout=PIPE)
output = p3.communicate()[0]
hours = output.split()
stats = {}
for h in range(0,24):
stats[h] = 0
for h in hours:
stats[int(h)] += 1
for k in stats.keys():
print "%02d: %s" % (k, "*"*stats[k])





And the results...

00: *****
01: ***
02:
03: **
04:
05:
06:
07:
08:
09:
10: **
11: *****
12: ************
13: ************
14: **********************************
15: **********************
16: ************
17: **********
18: **
19: ***
20: ***
21: **
22: *
23:

Wednesday, March 11, 2009

LaTeX: How to change the bibliography heading title

A few months ago I needed this information and now, certainly too late, I found the answer from Ki-Joo Kim's BibTeX guide. It is simply
\renewcommand\bibname{Foo}
Another thing: why must the scripting language used in BibTeX style files (.bst) be so confusing? Anyone knows what this language is, or is this just an adhoc language created for that single purpose? Anyhow, I'd like to find a manual for it.

Tuesday, March 3, 2009

Thesis development

Today's result of playing with git-archive, shell scripting and gnuplot:
f(time)=wc -w