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
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
_shootemup.py | |
Created by fish on 2009-06-04. | |
Copyright (c) 2009 OST LLC. All rights reserved. | |
I wrote this in 10min so YMMV; but you really don't need an over-the-top | |
API binding for Tumblr cuz it's so simple, which I appreciate. |
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
export JANGY_PROJECT='/Users/fish/Dropbox/ost2/ost2' | |
export BPYTHON_INIT_SCRIPT='${JANGY_PROJECT}/utils/django_shell_imports.py' | |
export PYTHONPATH="${JANGY_PROJECT}:${PYTHONPATH}" | |
alias jangy="python manage.py" | |
alias bp="cd $JANGY_PROJECT && bpython --interactive $BPYTHON_INIT_SCRIPT" | |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
whereismyshit.py | |
Created by FI$H 2000 on 2010-09-16. | |
Copyright (c) 2010 OST, LLC. All rights reserved. | |
""" | |
from __future__ import with_statement |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
backupmodelstofixtures.py | |
TARBALL DATABASE FIXTURE DUMPER. | |
Created by FI$H 2000 on 2010-04-18. | |
Copyright (c) 2010 OST, LLC. | |
MIT License. It works, bitches. |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
isbnwrangle.py | |
Created by FI$H 2000 on 2010-03-24. | |
Copyright (c) 2010 OST, LLC. All rights reserved. | |
""" | |
import sys, os, unittest, pyisbn, urllib2, simplejson |
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
#!/usr/bin/env python | |
# find /usr /opt /System /Library ~ -name "site-packages" -print 2> /dev/null | |
import os | |
print ">>>\t FINDING MY SHIT...." | |
whwreismyshit = os.execv('/usr/bin/find', ( |
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
def cl_get(what=None): | |
def cl(self, yodogg): | |
print u"cl_get(what): %s" % what | |
print u"cl.func_name: %s" % cl.func_name | |
print u"cl(self) type: %s" % type(self) | |
print u"cl(yodogg): %s" % yodogg | |
return cl | |
class Stuff(Thingy): | |
@staticmethod |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
##### | |
##### Readability.py -- by fish. © 2009, Some Rights Reserved But Some May Be | |
##### http://objectsinspaceandtime.com/ | |
##### | |
##### it's a python port of the Readability JavaScript bookmarklet, | |
##### by Arc90 Labs -- | |
##### http://lab.arc90.com/2009/03/readability.php |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
autoshot.py | |
Extend the Windows Service to do a real task | |
(the PIL call did not work here, hence the entirely | |
separate oneshot.py script) | |
Created by fish on 2009-12-08. |
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
portype = ContentType.objects.get(model='axitem') | |
starthue = colors.Color('#585852') | |
endhue = colors.Color('#FFCB36') | |
mosttags = cloud = None | |
if len(Tagg.objects.cloud_for_model(AXItem)) > 0: | |
mosttags = reduce(lambda ti, to: (float(ti) < float(to)) and float(to) or float(ti), | |
map(lambda tg: int(tg.items.filter(content_type=portype).count()), | |
Tagg.objects.cloud_for_model(AXItem))) | |
cloud = map(lambda tt: (tt[0], starthue.blend(endhue, 0.7-(float(tt[1])/mosttags))), |
OlderNewer