Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
-- IMStatus | |
-- version 2.0, Lantrix (http://techdebug.com) | |
-- idea conceived from script by Jason Kenison "theWebGuy" Blog at: | |
-- http://www.jasonkenison.com/blog.html?id=22 | |
(* | |
Copyright (c) 2008, TechDebug.com | |
Permission to use, copy, modify, and/or distribute this software for any | |
purpose with or without fee is hereby granted, provided that the above |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
diff --git a/gluon/main.py b/gluon/main.py | |
--- a/gluon/main.py | |
+++ b/gluon/main.py | |
@@ -796,6 +796,11 @@ | |
log_filename, | |
profiler_filename) } | |
+ from werkzeug.serving import run_simple | |
+ app = app_info["wsgi_app"] | |
+ run_simple('localhost', 8000, app, use_reloader=True) |
It appears that Apple somehow broke Python in Mountain Lion, so even with the latest Command Line Tools and Xcode 4.4 virtualenv won't properly work. During virtual environment creation it will try to install easy_install inside /Library hierarchy. So let's give it a quick workaround. Let's install custom python into your $HOME-directory using pythonbrew!
Without the Apple Mac Developer account you won't even see the proper download link for the latest CL Tools and the old one won't work on ML. So here's the link: http://goo.gl/iBTXh. It points towards the Apple website so don't worry.
diff -r ff5196a8c552 gluon/languages.py | |
--- a/gluon/languages.py Wed Oct 24 14:14:55 2012 +0300 | |
+++ b/gluon/languages.py Mon Nov 19 12:59:57 2012 +0200 | |
@@ -283,6 +283,7 @@ | |
def write_plural_dict(filename, contents): | |
+ return | |
if '__corrupted__' in contents: | |
return |
diff --git a/gluon/languages.py b/gluon/languages.py | |
--- a/gluon/languages.py | |
+++ b/gluon/languages.py | |
@@ -283,6 +283,7 @@ | |
def write_plural_dict(filename, contents): | |
+ return | |
if '__corrupted__' in contents: | |
return |
Apple's iMovie saves its Projects and Events files as folders named "/Documents/Movies/iMovie\ Events", "/Documents/Movies/iMovie\ Projects". You are not able to change this location using the app, however, you can use iMovie to move these folders to an external drive. On that drive, both of these folders MUST be at the root, i.e. "/Volumes/Footage/iMovie\ Events" and "/Volumes/Footage/iMovie\ Projects". If you open iMovie while an external drive has these folders at root, iMovie will automatically add them to its event and project library.
Unfortunately, you can't do this trick with network volumes by default. You can do some tricks with symlinks but when using them across volumes they are unreliable and iMovie will loose track of information.
# -*- coding: utf-8 -*- | |
''' Generates database schema graph from a relational database. | |
Usages: | |
Add database configuation in this file and then | |
python app.py | |
Note: You must have your latest database schema in the database | |
engine you are running against. | |
''' | |
from __future__ import unicode_literals, absolute_import |
/** | |
* This Google Sheets script keeps data in the specified column sorted any time | |
* the data changes. | |
* | |
* After much research, there wasn't an easy way to automatically keep a column | |
* sorted in Google Sheets, and creating a second sheet to act as a "view" to | |
* my primary one in order to achieve that was not an option. Instead, I | |
* created a script that watches for when a cell is edited and triggers | |
* an auto sort. | |
* |