Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
#!/system/bin/sh | |
# found at | |
# http://forum.xda-developers.com/showpost.php?p=58433704&postcount=6890 | |
# also see | |
# http://forum.xda-developers.com/showpost.php?p=58416801&postcount=6883 | |
for descriptor in \ | |
cast.media.CastMediaRouteProviderService \ | |
cast.media.CastRemoteDisplayProviderService \ |
{ | |
"something": true | |
} |
# http://forum.xbian.org/thread-370.html | |
sudo su #default password = 'raspberry' | |
service xbmc stop | |
apt-get update | |
apt-get install libcurl3 libva1 | |
cd /opt | |
rm -rf xbian | |
git clone -b xbian-alpha5 git://github.com/xbianonpi/xbian.git | |
cd xbian |
// this is a locale bundle | |
var locale = {"en-US":"<locale xml:lang=\"en\" xmlns=\"http://purl.org/net/xbiblio/csl\"> <style-options punctuation-in-quote=\"true\"/> <date form=\"text\"> <date-part name=\"month\" suffix=\" \"/> <date-part name=\"day\" suffix=\", \"/> <date-part name=\"year\"/> </date> <date form=\"numeric\"> <date-part name=\"year\"/> <date-part name=\"month\" form=\"numeric\" prefix=\"-\" range-delimiter=\"/\"/> <date-part name=\"day\" prefix=\"-\" range-delimiter=\"/\"/> </date> <terms> <term name=\"document-number-label\">No.</term> <term name=\"document-number-authority-suffix\">Doc.</term> <term name=\"un-sales-number-label\">U.N. Sales No.</term> <term name=\"collection-number-label\">No.</term> <term name=\"open-quote\">\u201c</term> <term name=\"close-quote\">\u201d</term> <term name=\"open-inner-quote\">\u2018</term> <term name=\"close-inner-quote\">\u2019</term> <term name=\"ordinal-01\">st</term> <term name=\"ordinal-02\">nd</ter |
<?php | |
/* | |
Author: Jim Westergren & Jeedo Aquino | |
File: index-with-redis.php | |
Updated: 2012-10-25 | |
This is a redis caching system for wordpress. | |
see more here: www.jimwestergren.com/wordpress-with-redis-as-a-frontend-cache/ |
mongoose = require("mongoose") | |
Schema = mongoose.Schema | |
languages = ['de', 'en', 'es'] | |
defaultLanguage = 'de' | |
getLanguage = () -> | |
return 'de' | |
class MultilingualSchema extends Schema | |
from wtforms.form import Form | |
from wtforms.fields import TextField, TextAreaField, FieldFist, FormField | |
class PluginForm(Form): | |
tags = TextField('Some random tags',) | |
files = TextField('Some random files',) | |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
/* | |
* Copyright (c) 2004 Novell, Inc. | |
* Copyright (c) 2005 Manuel Amador <rudd-o@rudd-o.com> | |
* Copyright (c) 2009-2011 Forest Bond <forest@alittletooquiet.net> | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a | |
* copy of this software and associated documentation files (the "Software"), | |
* to deal in the Software without restriction, including without limitation | |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
* and/or sell copies of the Software, and to permit persons to whom the |
""" | |
Simple task farm, with routed replies in pyzmq | |
For http://stackoverflow.com/questions/7809200/implementing-task-farm-messaging-pattern-with-zeromq | |
Note that things are run in threads to keep stuff in one file, there is no | |
reason they need to be. | |
License: Public Domain |