Root/ 0000755 0001750 0001750 00000000000 11515365642 010071 5 ustar jae jae Root/favicon.ico 0000777 0001750 0001750 00000000000 11037012020 014314 2favicon.png ustar jae jae Root/projects/ 0000750 0001750 0001750 00000000000 11542006753 011710 5 ustar jae jae Root/projects/menu_2_shelf 0000644 0001750 0001750 00000000464 11443274431 014212 0 ustar jae jae Shelved Projects
Python Game AI: Some Python/C AI code I wrote for a game project I was helping out. Included are an implementation of the A* algorithm and a simple influence map.
Root/projects/shell/ 0000755 0001750 0001750 00000000000 11542005301 013010 5 ustar jae jae Root/projects/shell/mutt_view_images 0000777 0001750 0001750 00000000000 11037012200 024104 2/home/jae/bin/mutt_view_images ustar jae jae Root/projects/shell/pager.vim 0000777 0001750 0001750 00000000000 11037012200 022331 2/home/jae/.vim/macros/pager.vim ustar jae jae Root/projects/shell/realmemory 0000777 0001750 0001750 00000000000 11037012200 021514 2/home/jae/bin/realmemory ustar jae jae Root/projects/shell/scripts 0000644 0001750 0001750 00000005311 11471366415 014443 0 ustar jae jaeScript useful for mail. The mutt viewers are particularly handy.
{{default site_path=this.site_path()}}Scripts handy while in X Windows. I have these all bound to keys and use them all the time.
Other scripts I've found useful. Use the 2 vim ones quite a bit. Though the memory usage script is the best I've found.
This is a collection of a few of my shell scripts that I've shared with others. Had them around on the site so I thought I'd give them a real home. Tried to add a bit of documentation in a comment at the top of each as well.
{{default site_path=this.site_path()}}Here is a collection of a few of my shell scripts that I've shared with others. Had them around on the site so I thought I'd give them a real home. Tried to add a bit of documentation in a comment at the top of each as well.
{{scripts}} {{# vim: set ft=htmltempita: }} Root/projects/menu_3_arc 0000644 0001750 0001750 00000001051 11443274431 013650 0 ustar jae jae Archived ProjectsProtoSpider: Using Semantic Networks for Keyword Analysis and Document Classification. Info and code from my MSAI thesis. Written in python.
Vworld: A virtual environment for the use of experimenting with autonomous logic based agents. Written in Prolog with Prolog agent programming.
Pliant: An old tutorial on interfacing C from Pliant plus a few other odds and ends related to that programming language.
Root/projects/title 0000644 0001750 0001750 00000000025 11442763246 012764 0 ustar jae jae Programming Projects Root/projects/snippets/ 0000755 0001750 0001750 00000000000 11524546022 013560 5 ustar jae jae Root/projects/snippets/title 0000644 0001750 0001750 00000000016 11442763246 014631 0 ustar jae jae Code Snippets Root/projects/snippets/index_html 0000644 0001750 0001750 00000003113 11524546022 015634 0 ustar jae jaeThis is a new section dedicated to small snippets (well, just one so far) of code I've written that I am particularly fond of...
This is the description of the problem.
Given a data structure like this:
x = {
'lion':['a','b'],
'tiger':['m','o'],
'cheetah':['y','z'],
}
I want to end up with this:
y = [
{ 'lion':'a', 'tiger':'m', 'cheetah':'y', },
{ 'lion':'a', 'tiger':'m', 'cheetah':'z', },
{ 'lion':'a', 'tiger':'o', 'cheetah':'y', },
{ 'lion':'a', 'tiger':'o', 'cheetah':'z', },
{ 'lion':'b', 'tiger':'m', 'cheetah':'y', },
{ 'lion':'b', 'tiger':'m', 'cheetah':'z', },
{ 'lion':'b', 'tiger':'o', 'cheetah':'y', },
{ 'lion':'b', 'tiger':'o', 'cheetah':'z', },
]
And here is what I came up with. I really like how generators and recursion play well together. Makes for an elegant solution IMO.
def combinator(items):
expanded = [[(key, v) for v in values] for (key, values) in items]
return (dict(l) for l in _citer(expanded))
def _citer(lst):
if lst:
(head, tail) = (lst[0], lst[1:])
if not tail:
for t in head:
yield [t]
else:
for t in head:
for h in _citer(tail):
yield [t] + h
if __name__=="__main__":
from pprint import pprint
val = combinator(x.items())
pprint(val)
Root/projects/gameai/ 0000755 0001750 0001750 00000000000 11471026042 013132 5 ustar jae jae Root/projects/gameai/heapqc-0.2.zip 0000640 0001750 0001750 00000005062 10334252425 015416 0 ustar jae jae PK
. heapqc-0.2/UT ? ?Ux PK .;ڊC $ heapqc-0.2/heapq.cUT Y$> ?Ux X[o6~ׯ8veX.X]\PcD-w(R7[vhc߹^~L)płÈ}@~R.?|^xQ;X!WbZ ,Ћ?%D"HC!ٜq/pW?1\}}*8/ke `
e҇3,/I($4Fi|Vyܛ# !Jk})'?>f!-<>P̿ƙb^C$`?x|gkݓD J|ooC N2>=,Qӓ8Frvh3^^ݾȧ_($(D i($,SFq.*#R;=q?LR-/+kDL%gc)P ]&_xK54Y˵Ù[xrt6ɊlY2
ӄT xE*.EbKp7'YwmLYs5ьVBNj8_W &T_'r>{2IJ㡭MW-eB|Uu:NN*jV32e%oglkAa>٦Miݲj%k
ӳ[2=3myTW2.]jߡvM{E G0B
͓}=_HPȾ"3Dvh֔q$Ս4({zQB
3)"(V4ɓu&?}Cu02\
;yW E6zG0\VMF
KPAr.VCYCJǴ