This file contains hidden or 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
// ========================================================================== | |
// Welcome | |
// ========================================================================== | |
Welcome = SC.Object.create({ | |
// This will create the server for your application. Add any namespaces | |
// your model objects are defined in to the prefix array. | |
server: SC.Server.create({ prefix: ['Welcome'] }), | |
This file contains hidden or 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
FF3.0+FB1.2b13 | |
C1: [] observer: [] 0 | |
C1 | |
A is empty | |
C1: [] observer: [] 0 | |
C1: [] observer: [] 0 | |
A has one item | |
C1: [] observer: [] 0 | |
C1: [] observer: [] 0 |
This file contains hidden or 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
require "rubygems" | |
require "json" | |
tohle_je_json_z_fajlu = <<HEREDOC | |
{ | |
"disp": "nejaky text", | |
"platforma": [ | |
{ | |
"ido": 1, | |
"jmeno": "prvni", |
This file contains hidden or 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
[~] which python | |
/usr/bin/python | |
[~] python | |
Python 2.5.2 (r252:60911, Nov 15 2008, 13:18:06) | |
[GCC 4.0.1 (Apple Inc. build 5488)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import _md5 | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
ImportError: No module named _md5 |
This file contains hidden or 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] ./python2.5 | |
Python 2.5.2 (r252:60911, Nov 15 2008, 13:18:06) | |
[GCC 4.0.1 (Apple Inc. build 5488)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> | |
This file contains hidden or 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
class PickleProperty(db.TextProperty): | |
def get_value_for_datastore(self, model_instance): | |
value = self.__get__(model_instance, model_instance.__class__) | |
return db.Text(self._deflate(value)) | |
def validate(self, value): | |
return value | |
def make_value_from_datastore(self, value): |
This file contains hidden or 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
# encoding: utf-8 | |
import logging | |
import re | |
import sys | |
import os | |
from traceback import * | |
from root import DEVELOPMENT_PROJECT_ROOT | |
# generate nice traceback with optional textmate links | |
def format_nice_traceback(traceback): |
This file contains hidden or 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
from google.appengine.api import urlfetch | |
... | |
r = urlfetch.fetch('http://api.flickr.com/services/rest/?'+parameters) | |
response = simplejson.loads(r.content, object_hook = Response) | |
#response = simplejson.load(urllib.urlopen('http://api.flickr.com/services/rest/', parameters), object_hook = Response) | |
This file contains hidden or 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
class Application(object): | |
def __call__(self, environ, start_response): | |
import logging | |
import base64 | |
from root import LOCAL_DEVELOPMENT | |
request = webapp.Request(environ) | |
response = webapp.Response() | |
Application.active_instance = self |
This file contains hidden or 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
class Service(dict): | |
def __init__(self, id, name, profileUrl): | |
super(Service, self).__init__() | |
self['id'] = id | |
self['name'] = name | |
self['profileUrl'] = profileUrl | |
OlderNewer