[google-appengine] Resizing Image with Stretching
I'm using the Image class to work with an image. When I call image.resize(width = new_width, height = new_height), it seems to honor either height or width, but not both. That is, the method maintains the original aspect ratio without stretching. Is there a way to stretch an image? Thanks. -- http://giscoder.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] My logs are starting to bite into my storage quota. Can I reclaim this space?
In my testing this morning, I've generated quite a few messages in my logs. I see that these apparently count toward my storage quota. Is there any way to reclaim this space? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Dashboard - Logs - How to clear them? - What is the Date-Time reference?
Is this still the fact? I'd bet my house that logs count against quota because this AM I was at about 0.5 MB of disk usage. I created *lots* of log messages and ended up around 1.1 MB used with only a few new data store entities. On Sep 23, 12:47 pm, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote: > Hi, > > Currently, logs do not count towards storage quota. > > -Marzia > > On Mon, Sep 22, 2008 at 7:06 PM, Alexander Kojevnikov < > > [EMAIL PROTECTED]> wrote: > > > > currently there is no way to clear log messages > > > Do the logs count towards the storage quota? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: My logs are starting to bite into my storage quota. Can I reclaim this space?
Thanks, Alexander. I don't exactly know what's up. I'd bet my house that logs count against quota because this AM I was at about 0.5 MB of disk usage. I created *lots* of log messages and ended up around 1.1 MB used with only a few new data store entities. On Sat, Nov 15, 2008 at 5:27 PM, Alexander Kojevnikov < [EMAIL PROTECTED]> wrote: > > > Is there any way to reclaim this space? Thanks. > > ...anyway, to reclaim the space you can try updating your app's > version and delete the old version after the new one is made default. > I've noticed that each version has its own log. > > > -- http://giscoder.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: My logs are starting to bite into my storage quota. Can I reclaim this space?
Yes, this is entirely possible. I did a lot of creating and deleting because I was doing load testing. Will that space be reclaimed? On Sat, Nov 15, 2008 at 5:45 PM, Alexander Kojevnikov < [EMAIL PROTECTED]> wrote: > > > Thanks, Alexander. I don't exactly know what's up. I'd bet my house that > > logs count against quota because this AM I was at about 0.5 MB of disk > > usage. I created *lots* of log messages and ended up around 1.1 MB used > with > > only a few new data store entities. > > Did you create and then delete a lot of entities? If you did, it could > be issue: > http://code.google.com/p/googleappengine/issues/detail?id=452 > > > > -- http://giscoder.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Is Memcache really needed?
One cool application of memcache: I have an RPC application that hits remote functions maybe once every few seconds per user. Part of my security scheme involves matching user ids to session keys. Hitting the data store for this on every call eats resources, but memcache brings a lot more efficiency. On Mon, Nov 17, 2008 at 9:15 AM, Ben Nevile <[EMAIL PROTECTED]> wrote: > > Hi Anders, > > In my experience with standard RMDBS, memcache is more useful for > caching arbitrary data and less useful for caching model objects. If > you have a really tuned database layer a lot of your queries will > already be resident in the database's cache, and memcache provides > only a modest efficiency gain. With GAE that seems to be less true - > in one of my apps, caching my User model reduced response time by > about 150ms. > > However, where I have found memcache most valuable is in caching more > arbitrary data constructs. Caching fragments of your rendered HTML, > for instance, can be really effective. Or perhaps there's a big chunk > of JSON that is often requested, but really only needs to be updated > once a minute. Removing the memcache API would be really really > unfortunate. > > re: whether or not you should implement it, I would say NO. until you > have a whole whack of users, concentrate on more important things. > > Ben > > > > On Nov 17, 12:26 am, Anders <[EMAIL PROTECTED]> wrote: > > Yes, removing Memcache from the GAE API is probably not a good idea. > > There must have been some reason why it was added. > > > > What I'm skeptic about is if it will be a good idea for me to use it > > or if I will only be doing something unnecessary or even worse, > > shooting myself in the foot if the Memcache does not scale well and if > > my site will start to get massive traffic (my application still has > > very low traffic but I want to be prepared for the eventuality of an > > exponential traffic increase :-). > > > > On Nov 17, 9:13 am, Greg <[EMAIL PROTECTED]> wrote: > > > > > > I don't know if this means that each server instance has its own > > > > Memcache or that all the instances access a single Memcache. > > > > > All instances access the "same" memcache - although this may be > > > distributed behind the scenes, I don't know about that. > > > > > I agree with you that it would be elegant to have automatic caching, > > > but that would impose some limitations - currently you can memcache > > > anything (including complex objects), but you can only store limited > > > data types in the datastore; and you can do (limited) querys on the > > > datastore but not on memcache. > > > > > Ideally we'd have a transparently cached queryable object store to > > > replace the datastore and memcache, but I guess this would be a > > > significant amount of development. Maybe Google should hire the Zope > > > guys to build it. > > > > > Cheers! > > > Greg. > > > -- http://giscoder.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Global Variables / Caching Question
Forgive me if this is a FAQ, but I did a little searching and did not find an answer. According to http://code.google.com/appengine/docs/python/appcaching.html, GAE caches global variables in imported modules between requests. I've got a global dictionary in a module that I'm sharing between requests. Is such a dictionary "thread safe"? In other words, if multiple users are hitting my application simultaneously, and both may be using the same global dictionary, am I going to encounter problems, or will GAE handle the situation gracefully? Thanks for any help. (By the way, I know that the dictionary may eventually disappear or get recreated unless I write its information to the data store. That's okay in the case I have in mind.) -- http://giscoder.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Hardly anything stored in appengine - already 10 MB gone?
Your not hallucinating. I've seen the same kind of problem. Apparently there is a known issue where space is sometimes not reclaimed after you delete a data store entity. If you've been creating and deleting a lot of entities, this one may be hitting you. On Wed, Nov 19, 2008 at 5:07 PM, jago <[EMAIL PROTECTED]> wrote: > > Thanks. At least I am not hallucinating. I didn't do anything and the > next morning diskspace is gone ;) > > It would be neat if we at least had the faintest view of our files > (like a html interface) - not the datastore, but the stuff we > upload...html files, images, etc. > > On Nov 19, 1:06 pm, saranpol <[EMAIL PROTECTED]> wrote: > > I found this problem too. > > > > On Nov 19, 9:37 am, jago <[EMAIL PROTECTED]> wrote: > > > > > Hello, > > > > > I have hardly anything stored in appengine. Still the dashboard claims > > > I have already 10 MB used. Can I get somehow more information about > > > what is using the 10 MB? > > > > > It cannot be the few things I have in the datastore or the website > > > hosted on the appengine. Can I somehow free all the memory on the > > > appengine? > > > > > Cheers, > > > jago > > > -- http://giscoder.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: SDK 1.1.6 Released
When will it appear on the download page? Thanks. On Fri, Nov 21, 2008 at 1:27 PM, Marce (Google) <[EMAIL PROTECTED]> wrote: > > Today we released the 1.1.7 SDK in order to fix the following issue > that occurred in 1.1.6: > http://code.google.com/p/googleappengine/issues/detail?id=877 > > -Marzia > > On Nov 20, 6:07 pm, Marzia Niccolai <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Today we released the 1.1.6 SDK. You can download it on our Google > hosting > > project (http://code.google.com/p/googleappengine/downloads/list), and > > peruse the release notes ( > http://code.google.com/p/googleappengine/wiki/SdkReleaseNotes) for more > > details on the release. > > > > This release contains some notable new features, including several > additions > > to the datastore: > > > > * You can now sort and filter on an entity's key: > http://code.google.com/appengine/docs/datastore/queriesandindexes.htm... > > * You can now delete an entity directly using its key, without > > instantiating/fetching the Model object > > * If you specify a key_name when creating a Model, its key will now be > > available before you call put() > > * URLFetch calls made in the SDK now have a 5 second timeout, matching > > production > > > > Also, it contains a number of issue fixes, including the following: > > > > * The SDK now only supports the same headers as production: > http://code.google.com/p/googleappengine/issues/detail?id=53 > > * In production, fixed an erroneous NeedIndexError when two ancestor > queries > > were specified: > http://code.google.com/p/googleappengine/issues/detail?id=423 > > * Calling to_xml on a model instance containing a BlobProperty returns > that > > BlobProperty base64 encoded: > http://code.google.com/p/googleappengine/issues/detail?id=430 > > * URLFetch now uses the original HTTP method (e.g. POST) when following a > > redirect:http://code.google.com/p/googleappengine/issues/detail?id=363 > > > > -Marzia > > > -- http://giscoder.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: What is a proper way to cache values on "per request" basis?
Try getting rid of the memcache in favor of a hard-coded value (for testing purposes only). If you're still getting high CPU usage, then the problem is not with your use of memcache. You can also use global variables to cache values, as long as you're careful. On Mon, Dec 1, 2008 at 2:28 PM, Sharp-Developer.Net < [EMAIL PROTECTED]> wrote: > > Hi, > > I have to retrieve some entities by key multiple times during single > request. > > I do use memcache but getting quite high CPU usage and lot's of > warnings. > > As I retrieve the same entity by it key multiple (many) times during a > request I wonder could I improve my code by caching results on per > request handler instance basis? I sure I could but as newbie in Python > I'm not sure what is the best place & way to do that. > > I could add variable to a request object (I use Django) but that will > require to pass it to every place where I need to use it. It's too > complicated. > > I wonder is there such a thing like a HttpContext.Current in C#? In > ASP.NET if I want to store/retrieve an object on per request basis > I'll simply do next: > > HttpContext.Current.Items["key"] = value; > var value = HttpContext.Current.Items["key"]; > > Is the anything similar in AppEngine/Python? > > Again, as a Python newbie will apreciate a working code sample. > > I think this question could be interesting to many people. > > > -- http://giscoder.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Money sum formating
Here's a little function I wrote that you may have: def formatAsDollars(amount): dollars = int(amount) cents = amount - dollars i = 0 reverseDollarPlaces = [] for p in str(dollars)[::-1]: if i % 3 == 0 and i: reverseDollarPlaces.append(',') reverseDollarPlaces.append(p) i += 1 return '$%s.%.2i' % (''.join(reverseDollarPlaces[::-1]), int(100*cents)) On Tue, Dec 23, 2008 at 2:32 PM, Shay Ben Dov wrote: > > Hi, > > I know that if > > sum = 56.0 > > then > > {{ sum|floatformat:2 }} will display 56.00 > > How we get $560,000.00 > > Thanks, > > Shay Ben Dov > > > > > > -- http://giscoder.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Django Replace Filter
Is there a simple way to do a replace with Django? (I want to replace all underscores in a string with spaces.) I can't find a built-in filter to do a simple replace, but it seems like an obvious filter that I must be missing. Thanks! -- http://giscoder.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Beginner Question - About using App Engine
This article got me started using AJAX and JSON. Works great. http://code.google.com/appengine/articles/rpc.html On Thu, Jan 8, 2009 at 7:08 PM, Faber Fedor wrote: > > > On Thu, Jan 8, 2009 at 5:56 PM, mscwd01 wrote: > >> >> >> In short, i'd like to use App Engine to return xml responses to my >> Android App - instead of using App Engine for the usual browser based >> web application. >> >> Is this allowed? > > > I hope so! I'm planning on doing the same thing! (Except with JSON :-) > > > > -- > > Faber Fedor > Cloud Computing New Jersey > http://cloudcomputingnj.com > > > > > -- http://giscoder.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: Cant start my helloworld sample
Read the error message closely. You misspelled python. On Wed, Jan 21, 2009 at 11:44 AM, ahYeop wrote: > > Hi all, > > I follow the Hello World guide but still have problem to start Apps > Engine. Here is the error: > > C:\Program Files\Google\google_appengine>dev_appserver.py helloworld/ > ERROR2009-01-21 16:40:27,203 dev_appserver_main.py] Fatal error > when loading > application configuration: > Unable to assign value 'pyhton' to attribute 'runtime': > Value 'pyhton' not in {'python': 'python'}. > in "helloworld/app.yaml", line 3, column 10 > > what is the problem? > > > > -- http://giscoder.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---
[google-appengine] Re: pricing / additional app slots
The Google App Engine customer service folks read this group. If you really need more apps or quota, you may ask them directly. I think they generally grant more apps as long as they can see that you're not abusing the service. On Tue, Feb 3, 2009 at 8:48 PM, David Wilson wrote: > > 2009/2/4 Barry Hunter : > > > > 2009/2/4 David Wilson : > >> > >> 2009/2/2 jeremy : > >>> > >>> will additional app slots be part of the pricing model? > >>> > > >>> > >> > >> Why pay for something you can have for free? :-) > >> > >> If you have exhausted the allocation of applications for your account, > >> possibly (like so many, it seems) by creating a bunch of test > >> applications, then you can follow this trick to get rid of them: > >> > >> * Create a new account. > > > > What if you only have one mobile phone number... :( > > > > Hrm. I can say at least that you don't need a new phone number when > inviting a Google Apps account to develop. I have no idea about the > non-apps workflow. > > > David > > >> * Invite the new account to be developer for each application you want > to shed. > >> * Confirm all the invitations for the new account. > >> * Log in as the new account, and remove your 'real' account from the > >> developer list for each application. > >> * Log out, log back using your real account. Observe applications are > >> gone, and you can create more. > >> > >> I think this trick is semi-officially sanctioned, so I doubt you'll > >> get kicked off the service for doing it (at least during the preview > >> period :). > >> > >> > >> David > >> > >> -- > >> It is better to be wrong than to be vague. > >> — Freeman Dyson > >> > >> > > >> > > > > > > > > -- > > Barry > > > > - www.nearby.org.uk - www.geograph.org.uk - > > > > > > > > > > > -- > It is better to be wrong than to be vague. > — Freeman Dyson > > > > -- http://giscoder.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~--~~~~--~~--~--~---